[opensuse-buildservice] different control files for different debian platforms?

Is it possible to have different control files for different debian platforms? I have a package that has a Build-requires dependancy of libboost-dev for most debian platforms, however, xUbuntu 9.04 wants this to be libboost1.35-dev. Is it possible to have a control-xUbuntu_9.04 file the same way you can have a foo-Fedora_Extras_6.spec for rpm based distributions? What is the best way to handle this? I don't think you can ifdef a debian control file the way you can a rpm spec file. Thank You. -- Paul Elliott 1(512)837-1096 pelliott@BlackPatchPanel.com PMB 181, 11900 Metric Blvd Suite J http://www.free.blackpatchpanel.com/pme/ Austin TX 78758-3117

On Tue, Aug 18, 2009 at 05:32:02PM -0500, Paul Elliott wrote:
In "Build Service/prjconf" http://en.opensuse.org/Build_Service/prjconf I find: Substitute Packages get renamed or are named different for different distributions. You can specify per repository dependency rewrite rules. %if 0%{?suse_version} Substitute: Canna-libs canna-libs %endif %if 0%{?fedora_version} Substitute: canna-libs Canna-libs %endif On openSUSE, the package is named "canna-libs", so replace all requirements for "Canna-libs" to "canna-libs" - and vice versa for Fedora. Could I use this feature to do a substitute of libboost1.35-dev for libboost-dev only for xUbuntu 9.04? Is there an "%if" expression for the ubuntu and debian versions? How are they named? That is, how do I write the following psudo-code formally? if (ubumtu 9.04) then Substitute: libboost1.35-dev libboost-dev endif Could I put an "Required:" statement inside such a conditional scructure? How do I write the following psudo-code formally? if (debian_based distribution) then Required: build-essential endif If this could be written it might be the solution to this bug! : https://bugzilla.novell.com/show_bug.cgi?id=471298 Thank You. -- Paul Elliott 1(512)837-1096 pelliott@BlackPatchPanel.com PMB 181, 11900 Metric Blvd Suite J http://www.free.blackpatchpanel.com/pme/ Austin TX 78758-3117

Am Mittwoch, 19. August 2009 08:22:16 schrieb Paul Elliott:
Yes, you can find it yourself via looking at the project config of Ubuntu and Debian projects. Or just trust me when I say to use %ubuntu_version ;)
Substitute: libboost1.35-dev libboost-dev endif
%endif
%if 0%{?debian_version}
-- Adrian Schroeter SUSE Linux Products GmbH email: adrian@suse.de -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org

On Wed, Aug 19, 2009 at 09:44:35AM +0200, Adrian Schröter wrote:
How is ?ubuntu_version numbered? Do I write %if 0%{?ubuntu_version} == 904 or %if 0%{?ubuntu_version} == 9.04 There is a nice table in: "Build Service/cross distribution package how to" http://en.opensuse.org/Build_Service/cross_distribution_package_how_to but it only mentions versions for rpm based distros! -- Paul Elliott 1(512)837-1096 pelliott@BlackPatchPanel.com PMB 181, 11900 Metric Blvd Suite J http://www.free.blackpatchpanel.com/pme/ Austin TX 78758-3117

Am Mittwoch, 19. August 2009 15:21:44 schrieb Paul Elliott:
you can check this your self via osc meta prjconf Ubuntu:9.04 | grep ubuntu_version %define ubuntu_version 904 %ubuntu_version 904
-- Adrian Schroeter SUSE Linux Products GmbH email: adrian@suse.de -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org

On Wed, Aug 19, 2009 at 09:44:35AM +0200, Adrian Schröter wrote:
%if 0%{?debian_version}
I have experimented with conditionals like this and the behaviour I observe is that the build service behaves like they are always false. Substitute, required works if used unconditionaly. But if you use %if expressions like the above, and it behaves as if it is always false. I am trying to vary the way my project builds depending on platform. Therefore I should not define, but only use these macros. Where are these expressions documented? What is and example project that uses expressions like this to vary behaviour depending on platform? -- Paul Elliott 1(512)837-1096 pelliott@BlackPatchPanel.com PMB 181, 11900 Metric Blvd Suite J http://www.free.blackpatchpanel.com/pme/ Austin TX 78758-3117

Am Freitag, 21. August 2009 02:03:24 schrieb Paul Elliott:
They are rpm like, so rpm macros are basically the specification.
What is and example project that uses expressions like this to vary behaviour depending on platform?
osc meta prjconf openSUSE:Tools There is a different definition for the images repo. -- Adrian Schroeter SUSE Linux Products GmbH email: adrian@suse.de -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org

On Fri, Aug 21, 2009 at 10:10:15AM +0200, Adrian Schröter wrote:
-----------------cut here with a chain saw osc meta prjconf openSUSE:Tools %if "%_repository" == "images" Type: kiwi Repotype: none Patterntype: none %endif # Test build-compare #%if "%_repository" == "openSUSE_11.1" #Support: build-compare #Keep: build-compare #%endif Prefer: openSUSE-release openSUSE-release-ftp Substitute: kiwi-filesystem:ext3 e2fsprogs procps psmisc reiserfs Substitute: kiwi-boot:netboot kiwi-desc-netboot kiwi-desc-xenboot ncurses-utils curl dhcpcd iputils nbd net-tools netcfg nfs-client parted grub mdadm cromfs Substitute: kiwi-packagemanager:zypper zypper Substitute: kiwi-packagemanager:smart smart -------------------------------------------cut here with a chain saw. My experiments show that %if 0%{?debian_version} acts as if it is always false. -- Paul Elliott 1(512)837-1096 pelliott@BlackPatchPanel.com PMB 181, 11900 Metric Blvd Suite J http://www.free.blackpatchpanel.com/pme/ Austin TX 78758-3117

I tried %if 0%{?debian_version} and %if 0%{?ubuntu_version} they do not work. They always act as if false. What does work is: %if "%_repository" == "Debian_Etch" || "%_repository" == "Debian_4.0" || "%_repository" == "Debian_5.0" || "%_repository" == "xUbuntu_6.06" || "%_repository" == "xUbuntu_8.04" || "%_repository" == "xUbuntu_8.10" || "%_repository" == "xUbuntu_9.04" Required: build-essential %endif But of course this has the disadvantage of needing to be edited everytime a new debian distribution is added. -- Paul Elliott 1(512)837-1096 pelliott@BlackPatchPanel.com PMB 181, 11900 Metric Blvd Suite J http://www.free.blackpatchpanel.com/pme/ Austin TX 78758-3117

On Sunday 23 August 2009 22:34:28 Paul Elliott wrote:
Did you try filing this as a bug so that it will end up on the right person's TODO list? Thanks, Andreas -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org

Did you try to be explicit by added version, for example : %if 0%{?debian_version} >= 10 or %if 0%{?mandriva_version} >= 2008 ? 2009/8/24 Andreas Gruenbacher <agruen@suse.de>:
-- Cordially. Small Eric Quotations of the days: --------------------------------------------------------------------------- I have no special talents. I am only passionately curious -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org

On Mon, Aug 24, 2009 at 02:02:01PM +0200, Andreas Gruenbacher wrote:
Well since I found out about the macro via a communication on this list and ?debian_version and ?ubuntu_version don't seem to be documented anywhere, maybe its a feature and not a bug. What I need is a way in a project configuration file to conditionalize on being a debian based distro. There seems to be too much folklore associated with the BS and not enough documentation.
Thanks, Andreas
-- Paul Elliott 1(512)837-1096 pelliott@BlackPatchPanel.com PMB 181, 11900 Metric Blvd Suite J http://www.free.blackpatchpanel.com/pme/ Austin TX 78758-3117

On Tue, Aug 18, 2009 at 05:32:02PM -0500, Paul Elliott wrote:
In "Build Service/prjconf" http://en.opensuse.org/Build_Service/prjconf I find: Substitute Packages get renamed or are named different for different distributions. You can specify per repository dependency rewrite rules. %if 0%{?suse_version} Substitute: Canna-libs canna-libs %endif %if 0%{?fedora_version} Substitute: canna-libs Canna-libs %endif On openSUSE, the package is named "canna-libs", so replace all requirements for "Canna-libs" to "canna-libs" - and vice versa for Fedora. Could I use this feature to do a substitute of libboost1.35-dev for libboost-dev only for xUbuntu 9.04? Is there an "%if" expression for the ubuntu and debian versions? How are they named? That is, how do I write the following psudo-code formally? if (ubumtu 9.04) then Substitute: libboost1.35-dev libboost-dev endif Could I put an "Required:" statement inside such a conditional scructure? How do I write the following psudo-code formally? if (debian_based distribution) then Required: build-essential endif If this could be written it might be the solution to this bug! : https://bugzilla.novell.com/show_bug.cgi?id=471298 Thank You. -- Paul Elliott 1(512)837-1096 pelliott@BlackPatchPanel.com PMB 181, 11900 Metric Blvd Suite J http://www.free.blackpatchpanel.com/pme/ Austin TX 78758-3117

Am Mittwoch, 19. August 2009 08:22:16 schrieb Paul Elliott:
Yes, you can find it yourself via looking at the project config of Ubuntu and Debian projects. Or just trust me when I say to use %ubuntu_version ;)
Substitute: libboost1.35-dev libboost-dev endif
%endif
%if 0%{?debian_version}
-- Adrian Schroeter SUSE Linux Products GmbH email: adrian@suse.de -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org

On Wed, Aug 19, 2009 at 09:44:35AM +0200, Adrian Schröter wrote:
How is ?ubuntu_version numbered? Do I write %if 0%{?ubuntu_version} == 904 or %if 0%{?ubuntu_version} == 9.04 There is a nice table in: "Build Service/cross distribution package how to" http://en.opensuse.org/Build_Service/cross_distribution_package_how_to but it only mentions versions for rpm based distros! -- Paul Elliott 1(512)837-1096 pelliott@BlackPatchPanel.com PMB 181, 11900 Metric Blvd Suite J http://www.free.blackpatchpanel.com/pme/ Austin TX 78758-3117

Am Mittwoch, 19. August 2009 15:21:44 schrieb Paul Elliott:
you can check this your self via osc meta prjconf Ubuntu:9.04 | grep ubuntu_version %define ubuntu_version 904 %ubuntu_version 904
-- Adrian Schroeter SUSE Linux Products GmbH email: adrian@suse.de -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org

On Wed, Aug 19, 2009 at 09:44:35AM +0200, Adrian Schröter wrote:
%if 0%{?debian_version}
I have experimented with conditionals like this and the behaviour I observe is that the build service behaves like they are always false. Substitute, required works if used unconditionaly. But if you use %if expressions like the above, and it behaves as if it is always false. I am trying to vary the way my project builds depending on platform. Therefore I should not define, but only use these macros. Where are these expressions documented? What is and example project that uses expressions like this to vary behaviour depending on platform? -- Paul Elliott 1(512)837-1096 pelliott@BlackPatchPanel.com PMB 181, 11900 Metric Blvd Suite J http://www.free.blackpatchpanel.com/pme/ Austin TX 78758-3117

Am Freitag, 21. August 2009 02:03:24 schrieb Paul Elliott:
They are rpm like, so rpm macros are basically the specification.
What is and example project that uses expressions like this to vary behaviour depending on platform?
osc meta prjconf openSUSE:Tools There is a different definition for the images repo. -- Adrian Schroeter SUSE Linux Products GmbH email: adrian@suse.de -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
participants (4)
-
Adrian Schröter
-
Andreas Gruenbacher
-
Paul Elliott
-
Petit Eric