[opensuse-packaging] Trouble with the neededforbuild macro

Hi, I'm trying to build an evolution-brutus (e-b) RPM in OpenSUSE 10.2. A few additional packages are required for e-b to build in OpenSUSE as opposed to Fedora for which the spec file is originally developed. The additional packages are: mDNSResponder-lib lsb gnome-common libidl-devel I've experimented with the neededforbuild macro instead of adding additional BuildRequires statements. This unfortunately makes 'build' complain about failed build dependencies. In other words - it works if I add additional BuildRequires statements: BuildRequires: mDNSResponder-lib BuildRequires: lsb BuildRequires: gnome-common BuildRequires: libidl-devel But it does not work if I use the neededforbuild macro like this: # neededforbuild mDNSResponder-lib lsb gnome-common libidl-devel Any ideas? Thanks, jules --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

Jules Colding wrote:
I've experimented with the neededforbuild macro instead of adding additional BuildRequires statements. This unfortunately makes 'build' complain about failed build dependencies.
You shouldn't use # neededforbuild anymore. The build script supports it only to be able to rebuild build packages from SUSE Linux <= 10.0, but then it disregards BuildRequires:. %if 0%{?suse_version} BuildRequires: ... %endif is the way to go. Michal --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

On Wed, 2007-03-21 at 11:07 +0100, Michal Marek wrote:
Jules Colding wrote:
I've experimented with the neededforbuild macro instead of adding additional BuildRequires statements. This unfortunately makes 'build' complain about failed build dependencies.
You shouldn't use # neededforbuild anymore. The build script supports it only to be able to rebuild build packages from SUSE Linux <= 10.0, but then it disregards BuildRequires:.
OK, that explains my observations.
%if 0%{?suse_version} BuildRequires: ... %endif
What does 0%{?suse_version} do? Does it only evaluates to true if suse_version is defined or something like that??
is the way to go.
Thanks, jules --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

2007/3/21, Jules Colding <colding@omesc.com>:
%if 0%{?suse_version} BuildRequires: ... %endif
What does 0%{?suse_version} do? Does it only evaluates to true if suse_version is defined or something like that??
If the suseversion macro is defined it returns 1 otherwise 0. IMHO it should be %if %suse_version > 1000 BuildRequires: ... %else # neededforbuild ... %endif But AFAIK in Build Service is Buildrequires macro always used also for older distributions e.g. 9.3 So forgot the # neededforbuild and use always BuildRequires: . Regards Ladislav. --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

On 2007-03-21 14:34:56 +0100, Ladislav Michnovič wrote:
IMHO it should be %if %suse_version > 1000 BuildRequires: ... %else # neededforbuild ... %endif
why? your line will fail on fedora e.g., while michal's line works there aswell. and often the buildrequires works without a version specific part. and when using the buildservice it might even work on all distros. that said i would leave out all %if in first place. ;) 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

2007/3/21, Marcus Rueckert <darix@web.de>:
that said i would leave out all %if in first place. ;) Yes right, it will break Fedora. But i think # needeforbuild is not used any more in OBS. Am I right? Regards Ladislav.
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

On Wed, Mar 21, 2007 at 02:54:57PM +0100, Ladislav Michnovi?? wrote:
2007/3/21, Marcus Rueckert <darix@web.de>:
that said i would leave out all %if in first place. ;) Yes right, it will break Fedora. But i think # needeforbuild is not used any more in OBS. Am I right?
Right, please always use 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

Jules Colding wrote:
Hi,
I'm trying to build an evolution-brutus (e-b) RPM in OpenSUSE 10.2.
A few additional packages are required for e-b to build in OpenSUSE as opposed to Fedora for which the spec file is originally developed. The additional packages are:
I am adding comments to particular requirements. It does not affects comments from other sub-threads:
mDNSResponder-lib False dependency. In some moment in past, dependency chain was broken somewhere and mDNSResponder-lib was added to packages, where it should be included implicitly. Fot 10.3 it will be replaced by avahi.
You can also look to GNOME:STABLE or GNOME:UNSTABLE for %if % suse_version dependency branching.
lsb Probably part of the base system.
gnome-common
May be needed for autoreconf, otherwise false dependency.
libidl-devel
No idea. Again may be false dependency or bad implicit chain. -- 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

Hi, On Thu, 22 Mar 2007, Stanislav Brabec wrote:
lsb Probably part of the base system.
Nope. This requirement seems a bit strange anyway, 'lsb' doesn't provide that many interesting services. We also are in the process of stripping down the base system somewhat, so even if it were in the base system right now, you should still list it. Ciao, Michael. --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (7)
-
Jules Colding
-
Ladislav Michnovič
-
Marcus Rueckert
-
Michael Matz
-
Michael Schroeder
-
Michal Marek
-
Stanislav Brabec