-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi folks Following "issue": to set the %{DISTRIBUTION} header in my RPMs, I use the following trick in my spec files: Distribution: %(head -1 /etc/SuSE-release) When one doesn't explicitely specify the Distribution: tag, the RPM ends up with "Distribution: (none)". Now I wonder, has anyone a better solution for this ? How is this solved @SUSE ? Are you setting it using build/abuild/y2pmbuild ? spec-file postprocessing ? 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 v1.4.2 (GNU/Linux) iD8DBQFEFEDir3NMWliFcXcRAh1jAJ496KvD5J7DCQKt88ebyy4F6KG2GgCeJ7lW snWyLGCok7UJM3DvsWzuB8Q= =UyXw -----END PGP SIGNATURE-----
Am Sunday 12 March 2006 16:40 schrieb Pascal Bleser:
Hi folks
Following "issue": to set the %{DISTRIBUTION} header in my RPMs, I use the following trick in my spec files:
Distribution: %(head -1 /etc/SuSE-release)
When one doesn't explicitely specify the Distribution: tag, the RPM ends up with "Distribution: (none)".
Now I wonder, has anyone a better solution for this ? How is this solved @SUSE ? Are you setting it using build/abuild/y2pmbuild ? spec-file postprocessing ?
the build system does automatically edit the Distribution tag. We should do as well with the Build Service. bye adrian -- Adrian Schroeter SUSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany email: adrian@suse.de
On Sunday 12 March 2006 16:40, Pascal Bleser wrote:
Following "issue": to set the %{DISTRIBUTION} header in my RPMs, I use the following trick in my spec files:
Distribution: %(head -1 /etc/SuSE-release)
That's nasty.
When one doesn't explicitely specify the Distribution: tag, the RPM ends up with "Distribution: (none)".
Now I wonder, has anyone a better solution for this ? How is this solved @SUSE ? Are you setting it using build/abuild/y2pmbuild ? spec-file postprocessing ?
/etc/y2pmbuild/files/*/etc/rpm/macros cu Ludwig -- (o_ Ludwig Nussel //\ SUSE LINUX Products GmbH, Development V_/_ http://www.suse.de/
Ludwig Nussel wrote:
On Sunday 12 March 2006 16:40, Pascal Bleser wrote:
Following "issue": to set the %{DISTRIBUTION} header in my RPMs, I use the following trick in my spec files:
Distribution: %(head -1 /etc/SuSE-release)
That's nasty.
Nasty but works, except for 10.1 betas (because they have 10.0.42 instead of 10.1 in /etc/SuSE-release). I don't want to pass something from the "outside" (e.g. passing a variable through rpmbuild or adding a macro in an rpmrc/macros file) because it will break source rpm rebuilding, in the sense that if you don't have those settings in your rpmrc/macros, it won't work properly. That's a very evil thing to do IMO, I really care a lot about src.rpm's being rebuildable by users. And I don't want to end up with a non-standard build environment because I use macros that are only defined in my environment.
When one doesn't explicitely specify the Distribution: tag, the RPM ends up with "Distribution: (none)".
Now I wonder, has anyone a better solution for this ? How is this solved @SUSE ? Are you setting it using build/abuild/y2pmbuild ? spec-file postprocessing ?
/etc/y2pmbuild/files/*/etc/rpm/macros
Ok. Unfortunately y2pmbuild is no option for me, I have my own build scripts that better fit my environment (and that support any BuildRequires syntax). I'll probably use something like this: %if %{?distribution:1}0 Distribution: %{distribution} %endif to pass my own RPM macros but fall back more or less nicely if it isn't defined. It would be nice if RPM(build) did something like #include /etc/rpm.d/* when pulling macro definition files because that way, one could provide his macros as an RPM package and "BuildRequires" it in the spec file. Even more, that way we could use the RPM macros from the Build Service even without the Build Service in a very clean way, e.g.: BuildRequires: suse-build-service-macros Anyway, thanks for the information ;) cheers -- -o) Pascal Bleser http://linux01.gwdg.de/~pbleser/ /\\ <pascal.bleser@skynet.be> <guru@unixtech.be> _\_v FOSDEM 2006 -- 25+26 February 2006 in Brussels
On Mon, Mar 13, 2006 at 12:14:47PM +0100, Pascal Bleser wrote:
It would be nice if RPM(build) did something like #include /etc/rpm.d/* when pulling macro definition files because that way, one could provide his macros as an RPM package and "BuildRequires" it in the spec file.
Actually it does for 10.1: $ grep macros /usr/lib/rpm/rpmrc macrofiles: /usr/lib/rpm/macros:/usr/lib/rpm/%{_target}/macros:/usr/lib/rpm/suse_macros:/etc/rpm/macros.*:/etc/rpm/macros:/etc/rpm/%{_target}/macros:~/.rpmmacros There's a 'wildcard' entry in it: /etc/rpm/macros.* Cheers, Michael. -- Michael Schroeder mls@suse.de main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}
On 2006-03-13 12:14:47 +0100, Pascal Bleser wrote:
/etc/y2pmbuild/files/*/etc/rpm/macros
Ok. Unfortunately y2pmbuild is no option for me, I have my own build scripts that better fit my environment (and that support any BuildRequires syntax).
i am getting bored telling you that the y2pmbuild from 10.1 can do all the conditionals stuff for BuildRequires too. Would you mind trying it? it should be easy to rebuild y2pmsh on 10.0 thanks in advance darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org
Marcus Rueckert wrote:
On 2006-03-13 12:14:47 +0100, Pascal Bleser wrote:
/etc/y2pmbuild/files/*/etc/rpm/macros Ok. Unfortunately y2pmbuild is no option for me, I have my own build scripts that better fit my environment (and that support any BuildRequires syntax).
i am getting bored telling you that the y2pmbuild from 10.1 can do all the conditionals stuff for BuildRequires too. Would you mind trying it? it should be easy to rebuild y2pmsh on 10.0
I have 10.0, 9.3, 9.2 and 9.1 And I have a different process for signing RPMs, where to deposit binary RPMs and builds logs, where to fetch sources from (with a local cache or from the SVN sandbox), automatically transform URLs to fetch from sourceforge with my preferred mirror, etc... So I most probably won't be using y2pmbuild. cheers -- -o) Pascal Bleser http://linux01.gwdg.de/~pbleser/ /\\ <pascal.bleser@skynet.be> <guru@unixtech.be> _\_v FOSDEM 2006 -- 25+26 February 2006 in Brussels
On 2006-03-13 17:28:25 +0100, Pascal Bleser wrote:
I have 10.0, 9.3, 9.2 and 9.1
And I have a different process for signing RPMs, where to deposit binary RPMs and builds logs, where to fetch sources from (with a local cache or from the SVN sandbox), automatically transform URLs to fetch from sourceforge with my preferred mirror, etc...
So I most probably won't be using y2pmbuild.
now ... y2pmbuild is just a replacment for build/rpmbuild ... so what ever you do before and after the build is done ... doesnt touch that part at all. or do i miss some point? darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org
On Mon, Mar 13, 2006 at 06:39:20PM +0100, Marcus Rueckert wrote:
now ... y2pmbuild is just a replacment for build/rpmbuild ... so what ever you do before and after the build is done ... doesnt touch that part at all. or do i miss some point?
You might find the answer yourself if you ask yourself why you don't use y2pmbuild at SUSE internally to build the distribution. Robert -- Robert Schiele Tel.: +49-621-181-2214 Dipl.-Wirtsch.informatiker mailto:rschiele@uni-mannheim.de "Quidquid latine dictum sit, altum sonatur."
participants (6)
-
Adrian Schröter
-
Ludwig Nussel
-
Marcus Rueckert
-
Michael Schroeder
-
Pascal Bleser
-
Robert Schiele