[opensuse-packaging] automatic packporting of Factory packages

Hallo. I wrote a script, which attempts to backport packages to be compilable on older products. It means replacing of Requires and BuildRequires by an appropriate %if. It is intended to prevent hardly maintainable %if %suse_version hell in Factory. If there will be an interest, I can maintain it in OpenSUSE:Tools. Usage is trivial: - cd to unpacked sources. - Run it. TODO: - Move configuration outside script (trivial). - Support for "this new name is already used in this repository" (trivial - delete appropriate line or use "%if %suse_version foo || 0%{?opensuse_bs}". (trivial) - Support for rules more packages -> anything (not so trivial) - Support for fixes of "has choice for" (already written, but it is not part of this attachment, because it has a large configuration. -- Best Regards / S pozdravem, Stanislav Brabec software developer --------------------------------------------------------------------- SUSE LINUX, s. r. o. e-mail: sbrabec@suse.cz Lihovarská 1060/12 tel: +420 284 028 966 190 00 Praha 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/

On Friday, 18. May 2007, Stanislav Brabec wrote:
I wrote a script, which attempts to backport packages to be compilable on older products. It means replacing of Requires and BuildRequires by an appropriate %if.
There is afaik a mapping for the opensuse buildservice. all it needs is actually telling the buildservice maintainers about missing mappings. Dirk --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

Dirk Mueller píše v Pá 18. 05. 2007 v 14:01 +0200:
On Friday, 18. May 2007, Stanislav Brabec wrote:
I wrote a script, which attempts to backport packages to be compilable on older products. It means replacing of Requires and BuildRequires by an appropriate %if.
There is afaik a mapping for the opensuse buildservice. all it needs is actually telling the buildservice maintainers about missing mappings.
See at the top of the script. BS mapping is not complete - because at least some of these package are (have been) a must. Is BS mapping smart enough to not map packages which have been updated in the particular repository? Example: In GNOME:UNSTABLE I have updated dbus-1-glib and mapping dbus-1-glib-devel to dbus-1-devel dbus-1-glib on older distros will lead into build failure. And does this mapping support also Requires? I have several -devel packages which fails to upgrade due to missing libopenssl-devel. -- Best Regards / S pozdravem, Stanislav Brabec software developer --------------------------------------------------------------------- SUSE LINUX, s. r. o. e-mail: sbrabec@suse.cz Lihovarská 1060/12 tel: +420 284 028 966 190 00 Praha 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/ --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

Here is a new version: - Fixed Requires x BuildRequires confusion. - Support for "this new name is already used in this repository" (by using "%if %suse_version foo || 0%{?opensuse_bs}") - Support for fixes of "has choice for". AFAIK, with exception of Requires auto-editing and adding of % debug_package, everything else is already supported outside spec files in the BS config, so I plan to drop these functions soon and keep only Requires editing. -- Best Regards / S pozdravem, Stanislav Brabec software developer --------------------------------------------------------------------- SUSE LINUX, s. r. o. e-mail: sbrabec@suse.cz Lihovarská 1060/12 tel: +420 284 028 966 190 00 Praha 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/

On Tuesday 22 May 2007 16:24:32 wrote Stanislav Brabec:
Here is a new version:
- Fixed Requires x BuildRequires confusion. - Support for "this new name is already used in this repository" (by using "%if %suse_version foo || 0%{?opensuse_bs}") - Support for fixes of "has choice for".
AFAIK, with exception of Requires auto-editing and adding of % debug_package, everything else is already supported outside spec files in the BS config, so I plan to drop these functions soon and keep only Requires editing.
JFYI, the old package name should remain to work to avoid %if deserts in spec files. -- Adrian Schroeter SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG N�rnberg) email: adrian@suse.de --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

Adrian Schröter wrote:
On Tuesday 22 May 2007 16:24:32 wrote Stanislav Brabec:
Here is a new version:
- Fixed Requires x BuildRequires confusion. - Support for "this new name is already used in this repository" (by using "%if %suse_version foo || 0%{?opensuse_bs}") - Support for fixes of "has choice for".
AFAIK, with exception of Requires auto-editing and adding of % debug_package, everything else is already supported outside spec files in the BS config, so I plan to drop these functions soon and keep only Requires editing.
JFYI, the old package name should remain to work to avoid %if deserts in spec files.
It fixes only half of my problem - if package requires old name, but there is only new one. It does not fix the case, it package requires new name. If I mirror only part of packages from Factory to GNOME:UNSTABLE BS, I have no package providing libopenssl-devel. It can be fixed in BuildRequires by BS config, but it cannot be fixed in Requires - nothing in OpenSUSE 10.2 provides libopenssl-devel. Only automatic collection of devel dependencies or a compat package can fix it without %if deserts. -- Best Regards / S pozdravem, Stanislav Brabec software developer --------------------------------------------------------------------- SUSE LINUX, s. r. o. e-mail: sbrabec@suse.cz Lihovarská 1060/12 tel: +420 284 028 966 190 00 Praha 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/ --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

On Tuesday 22 May 2007 16:41:46 wrote Stanislav Brabec:
Adrian Schröter wrote:
On Tuesday 22 May 2007 16:24:32 wrote Stanislav Brabec:
Here is a new version:
- Fixed Requires x BuildRequires confusion. - Support for "this new name is already used in this repository" (by using "%if %suse_version foo || 0%{?opensuse_bs}") - Support for fixes of "has choice for".
AFAIK, with exception of Requires auto-editing and adding of % debug_package, everything else is already supported outside spec files in the BS config, so I plan to drop these functions soon and keep only Requires editing.
JFYI, the old package name should remain to work to avoid %if deserts in spec files.
It fixes only half of my problem - if package requires old name, but there is only new one. It does not fix the case, it package requires new name.
If I mirror only part of packages from Factory to GNOME:UNSTABLE BS, I have no package providing libopenssl-devel. It can be fixed in BuildRequires by BS config, but it cannot be fixed in Requires - nothing in OpenSUSE 10.2 provides libopenssl-devel.
right, did you tried to change the config as Andreas describe you before ? If you have problems right now to access the config, we should fix this instead of running any script hacks (you can also use directly source links afterwards, so you do not need to duplicate the source and two checkin twice). I can also change the config for any project, if you have trouble right now to do this. bye adrian -- Adrian Schroeter SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG N�rnberg) email: adrian@suse.de --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

Adrian Schröter wrote:
AFAIK, with exception of Requires auto-editing and adding of % debug_package, everything else is already supported outside spec files in the BS config, so I plan to drop these functions soon and keep only Requires editing.
JFYI, the old package name should remain to work to avoid %if deserts in spec files.
It fixes only half of my problem - if package requires old name, but there is only new one. It does not fix the case, it package requires new name.
If I mirror only part of packages from Factory to GNOME:UNSTABLE BS, I have no package providing libopenssl-devel. It can be fixed in BuildRequires by BS config, but it cannot be fixed in Requires - nothing in OpenSUSE 10.2 provides libopenssl-devel.
right, did you tried to change the config as Andreas describe you before ?
Just did it. (It would be definitely nice to have _config editing in osc.) Prefer works, but Substitute does not: GNOME:UNSTABLE for openSUSE_10.2: ekiga: Nothing provides libexpat-devel needed by pwlib-devel ekiga and pwlib-devel are parts of GNOME:UNSTABLE, expat and libexpat-devel are not. I am not sure, where is the problem: osc buildconfig openSUSE_10.2 x86_64 ... ### from openSUSE:10.2 ... Ignore: ...expat... ... ### from GNOME:UNSTABLE ... %if %suse_version <= 1020 ... Substitute: libexpat-devel expat ... %endif And a question: Will resulting SRPM work for "rpmbuild --rebuild" outside BS in native installation of GNOME:UNSTABLE/openSUSE:10.2 without --nodeps? -- Best Regards / S pozdravem, Stanislav Brabec software developer --------------------------------------------------------------------- SUSE LINUX, s. r. o. e-mail: sbrabec@suse.cz Lihovarská 1060/12 tel: +420 284 028 966 190 00 Praha 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/ --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

On Thu, May 24, 2007 at 11:23:56AM +0200, Stanislav Brabec wrote:
Prefer works, but Substitute does not:
GNOME:UNSTABLE for openSUSE_10.2:
ekiga: Nothing provides libexpat-devel needed by pwlib-devel
This is not a BuildRequires from the ekiga package, but a runtime Requires from pwlib-devel. You can't map those with Substitute.
ekiga and pwlib-devel are parts of GNOME:UNSTABLE, expat and libexpat-devel are not.
Then please fix your pwlib-devel package so that it requires libexpat for 10.2.
And a question: Will resulting SRPM work for "rpmbuild --rebuild" outside BS in native installation of GNOME:UNSTABLE/openSUSE:10.2 without --nodeps?
Yes, the spec file gets adapted, too. (Otherwise the build in the BS would also report a missing BuildRequires.) Cheers, Michael. -- Michael Schroeder mls@suse.de SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);} --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

Michael Schroeder wrote:
Then please fix your pwlib-devel package so that it requires libexpat for 10.2.
It would be nice to adapt Requires, too. It's not so complicated and the fixing rule is exactly the same as BuildRequires need, so it should be trivial. And optionally it may keep commented out original line to be able to recover original version from srpm. My script just does both, but having it in BS itself would be better. But my solution has one spec for all, so it adds %if %suse version to spec file·
And a question: Will resulting SRPM work for "rpmbuild --rebuild" outside BS in native installation of GNOME:UNSTABLE/openSUSE:10.2 without --nodeps?
Yes, the spec file gets adapted, too. (Otherwise the build in the BS would also report a missing BuildRequires.)
I have tested it now and it works. -- Best Regards / S pozdravem, Stanislav Brabec software developer --------------------------------------------------------------------- SUSE LINUX, s. r. o. e-mail: sbrabec@suse.cz Lihovarská 1060/12 tel: +420 284 028 966 190 00 Praha 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/ --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (4)
-
Adrian Schröter
-
Dirk Mueller
-
Michael Schroeder
-
Stanislav Brabec