[opensuse-packaging] Convert existing changelog from .spec file to .changes file
Sometimes I find a package with a long changelog that has always lived directly in the .spec file. I would like to continue the changelog in a .changes file... but how should I convert all the existing entries? Thanks. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On 23/10/09 14:48, Cristian Morales Vega wrote:
Sometimes I find a package with a long changelog that has always lived directly in the .spec file. I would like to continue the changelog in a .changes file... but how should I convert all the existing entries?
I can't find any tool to do this and your use case sounds reasonable, I think it is worth an enhancement request against "build" package. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On 10/24/2009 05:17 AM, Cristian Rodríguez wrote:
On 23/10/09 14:48, Cristian Morales Vega wrote:
Sometimes I find a package with a long changelog that has always lived directly in the .spec file. I would like to continue the changelog in a .changes file... but how should I convert all the existing entries?
I can't find any tool to do this and your use case sounds reasonable, I think it is worth an enhancement request against "build" package.
For these kind of packages I continue using changelog inside .spec file and don't create .changes file at all. -- Best Regards / S pozdravom, Pavol RUSNAK SUSE LINUX, s.r.o openSUSE Boosters Team Lihovarska 1060/12 PGP 0xA6917144 19000 Praha 9, CR prusnak[at]suse.cz http://www.suse.cz -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Hello, on Freitag, 23. Oktober 2009, Cristian Morales Vega wrote:
Sometimes I find a package with a long changelog that has always lived directly in the .spec file. I would like to continue the changelog in a .changes file... but how should I convert all the existing entries?
Use sed ;-) LANG=C rpm -q --changelog aaa_base |head -n30 | \ sed '1,/^%changelog/ d ; s§^* \(...\) \(...\) \([0-3][0-9]\) \([12][0-9][0-9][0-9]\) \(.*\)§-------------------------------------------------------------------\n\1 \2 \3 12:34:56 CET \4 - \5\n§' If you want to run it against a spec file, add another sed command: sed '1,/^%changelog/ d' (running both in one sed command works also, of course) LANG=C is used to enforce english weekday names - otherwise rpm translates them to $LANG (not needed when parsing a specfile directly). Known issues: - The time and timezone are not listed in the spec, therefore a dummy is used. - the sed command will fail for years > 2999 ;-) because of the "[12]" part (which ensures that at least very broken dates get filtered out) To make sure everything went right, grep '^*' in the resulting .changes file (it shouldn't find anything). BTW: I license the above sed command as GPL v2 or later so that it is compatible with the build package ;-) Regards, Christian Boltz -- Also, ich hab mit win3.11 (damals war ich 2 jahre alt) angefangen und hab dann alle Win-versionen erlebt, bis xp. Das war entgültig zuviel. Danach war Schluss. Jetzt nur noch SuSE Linux. [Soeren Wengerowsky in suse-linux] -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Am Samstag 24 Oktober 2009 18:49:11 wrote Christian Boltz:
Hello,
on Freitag, 23. Oktober 2009, Cristian Morales Vega wrote:
Sometimes I find a package with a long changelog that has always lived directly in the .spec file. I would like to continue the changelog in a .changes file... but how should I convert all the existing entries?
Use sed ;-)
LANG=C rpm -q --changelog aaa_base |head -n30 | \ sed '1,/^%changelog/ d ; s§^* \(...\) \(...\) \([0-3][0-9]\) \([12][0-9][0-9][0-9]\) \(.*\)§------------------------------------------------------------- ------\n\1 \2 \3 12:34:56 CET \4 - \5\n§' Maybe we can make an Script for that and put it in an rpm-tools Package.
-- Sincerely yours Sascha Manns openSUSE Member openSUSE Ambassador openSUSE Marketing Team openSUSE Build Service Web: http://saschamanns.gulli.to Blog: http://saigkill.wordpress.com ClaimID: http://claimid.com/saigkill -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Hi, have written a script to just do that. ;) get it from here: http://pastie.org/678268 Kind Regards Chris Cristian Morales Vega schrieb:
Sometimes I find a package with a long changelog that has always lived directly in the .spec file. I would like to continue the changelog in a .changes file... but how should I convert all the existing entries?
Thanks.
-- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Hi, Update: http://en.opensuse.org/Packaging/Utilities Kind Regards Chris Christian schrieb:
Hi,
have written a script to just do that. ;)
get it from here: http://pastie.org/678268
Kind Regards Chris
Cristian Morales Vega schrieb:
Sometimes I find a package with a long changelog that has always lived directly in the .spec file. I would like to continue the changelog in a .changes file... but how should I convert all the existing entries?
Thanks.
-- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 11/01/2009 01:21 AM, Christian wrote:
Sorry, couldn't resist making a simpler one ;-) http://linux01.gwdg.de/~pbleser/files/rpm/spec2changelog.pl cheers - -- -o) Pascal Bleser http://linux01.gwdg.de/~pbleser/ /\\ <pascal.bleser@skynet.be> <guru@unixtech.be> _\_v The more things change, the more they stay insane. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iD8DBQFK7oDQr3NMWliFcXcRAtr6AKC/xhm9FPU8sL8VAeGwScn1heIWHACgk1nT X1immMz6LmT9jCXfTyhE1dY= =Cr+F -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Hi Pascal, Pascal Bleser schrieb:
On 11/01/2009 01:21 AM, Christian wrote:
Sorry, couldn't resist making a simpler one ;-)
http://linux01.gwdg.de/~pbleser/files/rpm/spec2changelog.pl Hmm, url not found. :(
cheers Chris -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On 11/2/2009 at 10:05, Christian <chris@computersalat.de> wrote: Hi Pascal,
Pascal Bleser schrieb:
On 11/01/2009 01:21 AM, Christian wrote:
Sorry, couldn't resist making a simpler one ;-)
http://linux01.gwdg.de/~pbleser/files/rpm/spec2changelog.pl Hmm, url not found. :(
As directory browsing is not disabled on that server, it was not that difficult to find the right one: http://linux01.gwdg.de/~pbleser/files/rpm/spec2changes.pl Dominique -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
2009/11/2 Christian <chris@computersalat.de>:
Hi Pascal,
Pascal Bleser schrieb:
On 11/01/2009 01:21 AM, Christian wrote:
Sorry, couldn't resist making a simpler one ;-)
http://linux01.gwdg.de/~pbleser/files/rpm/spec2changelog.pl Hmm, url not found. :(
The correct URL is in the wiki: http://linux01.gwdg.de/~pbleser/files/rpm/spec2changes.pl Thanks everybody. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 11/02/2009 10:05 AM, Christian wrote:
Pascal Bleser schrieb:
On 11/01/2009 01:21 AM, Christian wrote:
Update: http://en.opensuse.org/Packaging/Utilities Sorry, couldn't resist making a simpler one ;-) http://linux01.gwdg.de/~pbleser/files/rpm/spec2changelog.pl Hmm, url not found. :(
Sorry, my bad -- as Dominique and Cristian already pointed out, the correct URL is the following: http://linux01.gwdg.de/~pbleser/files/rpm/spec2changes.pl I guess I could actually make a proper package around it, e.g. in openSUSE:Tools - -- will do that later today. It does require the installation of the perl-TimeDate package though (heck, it's Perl, no point reinventing the wheel ;D) Please send feature requests and bugs directly to me. cheers - -- -o) Pascal Bleser http://linux01.gwdg.de/~pbleser/ /\\ <pascal.bleser@skynet.be> <guru@unixtech.be> _\_v http://www.fosdem.org http://opensuse.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAkruo68ACgkQr3NMWliFcXd+qACgieNo0Rqrn++QfALAdrLZy5lf Im0AoKHLPWlhKObnR422GQPM0f/I22RU =dX4H -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Pascal Bleser wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 11/02/2009 10:05 AM, Christian wrote:
Pascal Bleser schrieb:
On 11/01/2009 01:21 AM, Christian wrote:
Update: http://en.opensuse.org/Packaging/Utilities Sorry, couldn't resist making a simpler one ;-) http://linux01.gwdg.de/~pbleser/files/rpm/spec2changelog.pl Hmm, url not found. :(
Sorry, my bad -- as Dominique and Cristian already pointed out, the correct URL is the following:
http://linux01.gwdg.de/~pbleser/files/rpm/spec2changes.pl
I guess I could actually make a proper package around it, e.g. in openSUSE:Tools - -- will do that later today.
It does require the installation of the perl-TimeDate package though (heck, it's Perl, no point reinventing the wheel ;D)
What about calling it spec2changelog and including it in the build package? changelog2spec is already there and also requires perl-TimeDate already. cu Ludwig -- (o_ Ludwig Nussel //\ V_/_ http://www.suse.de/ SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On 11/02/2009 10:30 AM, Ludwig Nussel wrote:
What about calling it spec2changelog and including it in the build package? changelog2spec is already there and also requires perl-TimeDate already.
Argh, it's the same story over and over again. Why don't we drop the .changes file in favour of using %changelog in spec? -- Best Regards / S pozdravom, Pavol RUSNAK SUSE LINUX, s.r.o openSUSE Boosters Team Lihovarska 1060/12 PGP 0xA6917144 19000 Praha 9, CR prusnak[at]suse.cz http://www.suse.cz -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Mon, Nov 2, 2009 at 6:11 AM, Pavol Rusnak <prusnak@suse.cz> wrote:
On 11/02/2009 10:30 AM, Ludwig Nussel wrote:
What about calling it spec2changelog and including it in the build package? changelog2spec is already there and also requires perl-TimeDate already.
Argh, it's the same story over and over again. Why don't we drop the .changes file in favour of using %changelog in spec?
-- Best Regards / S pozdravom,
Pavol RUSNAK SUSE LINUX, s.r.o
I agree. What are the benefits of keeping them separate? -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Am Montag, 2. November 2009 17:16:08 schrieb Stephen Shaw:
On Mon, Nov 2, 2009 at 6:11 AM, Pavol Rusnak <prusnak@suse.cz> wrote:
On 11/02/2009 10:30 AM, Ludwig Nussel wrote:
What about calling it spec2changelog and including it in the build package? changelog2spec is already there and also requires perl-TimeDate already.
Argh, it's the same story over and over again. Why don't we drop the .changes file in favour of using %changelog in spec?
-- Best Regards / S pozdravom,
Pavol RUSNAK SUSE LINUX, s.r.o
I agree. What are the benefits of keeping them separate?
in the past the .changes contains the full history, while the .spec file one got stripped (for size and speed reasons). Dunno if this is still needed. However, our dream (okay maybe not everybody;) was since the beginn of OBS to get an improved changelog handling. One changelog system, but with tags to declare changes as important for user, developers, feature freeks (read marketing people), security, .... So we can generate and search for entries which are important for the use case. However, that needs some thinking, esp. about the tools to keep us efficient with that. bye adrian -- Adrian Schroeter SUSE Linux Products GmbH email: adrian@suse.de -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Hi, On Mon, 2 Nov 2009, Adrian Schröter wrote:
Argh, it's the same story over and over again. Why don't we drop the .changes file in favour of using %changelog in spec?
I agree. What are the benefits of keeping them separate?
in the past the .changes contains the full history, while the .spec file one got stripped (for size and speed reasons).
Dunno if this is still needed.
I think it is, it's at least very convenient to have the full history somewhere easily accessible (and to me that means without having to use special commands to retrieve them). And it's not very nice to bloat the package meta-info with all that history. Ciao, Michael.
On 11/02/2009 05:45 PM, Michael Matz wrote:
Hi,
On Mon, 2 Nov 2009, Adrian Schröter wrote:
Argh, it's the same story over and over again. Why don't we drop the .changes file in favour of using %changelog in spec?
I agree. What are the benefits of keeping them separate?
in the past the .changes contains the full history, while the .spec file one got stripped (for size and speed reasons).
Dunno if this is still needed.
I think it is, it's at least very convenient to have the full history somewhere easily accessible (and to me that means without having to use special commands to retrieve them). And it's not very nice to bloat the package meta-info with all that history.
We started to misuse .changes file to contain changes from upstream, not only the changes of the package itself. AFAIK all these contents are being transcribed into %changelog section of specfile, so the bloat already _IS_ there.
Ciao, Michael.
-- Best Regards / S pozdravom, Pavol RUSNAK SUSE LINUX, s.r.o openSUSE Boosters Team Lihovarska 1060/12 PGP 0xA6917144 19000 Praha 9, CR prusnak[at]suse.cz http://www.suse.cz -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Hi, On Mon, 2 Nov 2009, Pavol Rusnak wrote:
Dunno if this is still needed.
I think it is, it's at least very convenient to have the full history somewhere easily accessible (and to me that means without having to use special commands to retrieve them). And it's not very nice to bloat the package meta-info with all that history.
We started to misuse .changes file to contain changes from upstream, not only the changes of the package itself. AFAIK all these contents are being transcribed into %changelog section of specfile, so the bloat already _IS_ there.
That's no reason to block our way back to reduced %changelog sections. I'm not so much worried about the content of the log (only local changes, only package changes, or all changes), but about the time frame. I want to have/retain an automatic mean of generating the (say) last two years of .changes into the package meta-data, which means generating the %changelog section. Ciao, Michael. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Monday 02 November 2009 10:30:57 Ludwig Nussel wrote: [....]
Sorry, my bad -- as Dominique and Cristian already pointed out, the correct URL is the following:
http://linux01.gwdg.de/~pbleser/files/rpm/spec2changes.pl
I guess I could actually make a proper package around it, e.g. in openSUSE:Tools - -- will do that later today.
It does require the installation of the perl-TimeDate package though (heck, it's Perl, no point reinventing the wheel ;D)
What about calling it spec2changelog and including it in the build package? changelog2spec is already there and also requires perl-TimeDate already.
the one I'm using is based on the same code that changelog2spec came from and does both directions. It's called convert_changes_to_rpm_changelog and I've uploaded a copy to home:oertel/changelog-convert in OBS. By default it converts from .changes to rpm changelog, if called with "--changes" it converts changelog or changes entries to a changes file syntax. For the discussion, just two issues, I'll try to keep out of the rest: - yes, I like the changes format mostly for one reason: though rpm stores the date in the binary rpm in a complete time tag, the specfile parser from rpm is not able to parse a time but only a date and I really do not want to loose that information, some packages are changed more than once a day and sometimes you want to know about the sequence. - the format for .changes is: default output of `date` in POSIX/C locale, which means the day is in english locale and has three letters, eg. "Thu_Nov__5_02:16:10_CET_2009" (spaces just here replaced by underscores for better visibility). -- with kind regards (mit freundlichem Grinsen), Ruediger Oertel (ro@novell.com,ro@suse.de,bugfinder@t-online.de) ---------------------------------------------------------------------- Linux MacBookRudi 2.6.31.4-3-desktop #1 SMP PREEMPT 2009-10-26 14:54:00 +0100 x86_64 Key fingerprint = 17DC 6553 86A7 384B 53C5 CA5C 3CE4 F2E7 23F2 B417 SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On 11/05/2009 02:19 AM, Ruediger Oertel wrote:
do not want to loose that information, some packages are changed more than once a day and sometimes you want to know about the sequence.
AFAIK you don't lose the sequence, just the time information, when using %changelog. -- Best Regards / S pozdravom, Pavol RUSNAK SUSE LINUX, s.r.o openSUSE Boosters Team Lihovarska 1060/12 PGP 0xA6917144 19000 Praha 9, CR prusnak[at]suse.cz http://www.suse.cz -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On 2009-11-05 14:03:36 +0100, Pavol Rusnak wrote:
On 11/05/2009 02:19 AM, Ruediger Oertel wrote:
do not want to loose that information, some packages are changed more than once a day and sometimes you want to know about the sequence.
AFAIK you don't lose the sequence, just the time information, when using %changelog.
that is assuming that not multiple people work on the same package on the same day concurrently. :) then the fun starts with merging. with the changes file format that is easier. darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On 11/01/2009 01:21 AM, Christian wrote:
Sorry, couldn't resist making a simpler one ;-)
Pascal Bleser schrieb: thanks, but the regex need to get improved :( yours and mine does not yet work for any "head" line :( - yours is missing "empty line" before sep "when there is > 1 change entry. * Sat Apr 14 2007 - kay.sievers@suse.de - New upstream version 1.5.1 - install README, LICENCE * Wed Jan 25 2006 - mls@suse.de ------------------------------------------------------------------- Sa Apr 14 00:00:00 CEST 2007 - kay.sievers@suse.d - New upstream version 1.5.1 - install README, LICENCE ------------------------------------------------------------------- Mi Jan 25 00:00:00 CET 2006 - mls@suse.d - email is cut at the end - why not using a random time ? Kind Regards Chris -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (14)
-
Adrian Schröter
-
Christian
-
Christian Boltz
-
Cristian Morales Vega
-
Cristian Rodríguez
-
Dominique Leuenberger
-
Ludwig Nussel
-
Marcus Rueckert
-
Michael Matz
-
Pascal Bleser
-
Pavol Rusnak
-
Ruediger Oertel
-
Sascha 'saigkill' Manns
-
Stephen Shaw