From malekith at pld-linux.org Thu May 8 11:22:15 2003 From: malekith at pld-linux.org (Michal Moskal) Date: Thu, 8 May 2003 11:22:15 +0200 Subject: SPECS: gc.spec (HEAD) In-Reply-To: References: Message-ID: <20030508092215.GA5469@roke.freak> On Mon, May 05, 2003 at 04:49:40PM +0200, undefine wrote: > -%configure2_13 > -sed -e 's/-lpthread/& -ldl/' Makefile > Makefile.tmp > -mv -f Makefile.tmp Makefile > +%configure2_13 \ > + --enable-threads=posix > +#sed -e 's/-lpthread/& -ldl/' Makefile > Makefile.tmp > +#mv -f Makefile.tmp Makefile > %{__make} This is wrong. libgc is now not linked against libdl, which it uses. Threads was not enabled only in Ra version (in Nest everything was fine), since it has ancient compiler (but forcing =posix should work). -- : Michal Moskal :: http://www.kernel.pl/~malekith : GCS {C,UL}++++$ a? !tv : PLD Linux ::::::::: Wroclaw University, CS Dept : {E-,w}-- {b++,e}>+++ h From malekith at pld-linux.org Sat May 17 13:24:26 2003 From: malekith at pld-linux.org (Michal Moskal) Date: Sat, 17 May 2003 13:24:26 +0200 Subject: RFC: spec preprocessor Message-ID: <20030517112426.GA4988@roke.freak> Hello, As everyone see bcond syntax in rpm is ugly. A solution to this (and maybe few more) problems would be to run spec files through some kind of preprocessor. For example: #v+ %bcond foo default_off "foo support" %bcond bar default_on "bar support" %if foo ... %else ... %endif %if bar ... %endif %{if foo: .... } %{if !foo: ... } %{if_else !foo: { ... } else { ... } } #v- Would be translated to: #v+ # --with foo -- build with foo support # --without bar -- build without bar support %if %{?_with_foo:1}0 ... %else ... %endif %if %{!?_without_bar:1}0 ... %endif %{?_with_foo: .... } %{!?_with_foo: ... } %{?_with_foo: .... }%{!?_with_foo: ... } #v- I'm not sure about usefulness of if_else. Advantages: - simpler, shorter and more readable syntax - no information is lost in spec files in source rpm (one can rebuild source rpm with different options, even using some older rpm) - all this can be done using simple perl script and small patch against rpm Disadvantages: - spec in CVS is different then in source rpm - one cannot use older/non-PLD rpm to build specs directly from CVS I don't think these disadvantages are important though. Hmm.. maybe we can even allow something like: %if (foo && !bar) || baz It would require a bit more perl in preprocessing but I think it's worth it. -- : Michal Moskal :: http://www.kernel.pl/~malekith : GCS {C,UL}++++$ a? !tv : PLD Linux ::::::::: Wroclaw University, CS Dept : {E-,w}-- {b++,e}>+++ h From malekith at pld-linux.org Sat May 17 13:32:18 2003 From: malekith at pld-linux.org (Michal Moskal) Date: Sat, 17 May 2003 13:32:18 +0200 Subject: RFC: spec preprocessor In-Reply-To: <20030517112426.GA4988@roke.freak> References: <20030517112426.GA4988@roke.freak> Message-ID: <20030517113218.GA6301@roke.freak> On Sat, May 17, 2003 at 01:24:26PM +0200, Michal Moskal wrote: > - all this can be done using simple perl script and small patch > against rpm One more thing: this doesn't need to be *perl* script, it can be also done rather simply in some other language, even in C. -- : Michal Moskal :: http://www.kernel.pl/~malekith : GCS {C,UL}++++$ a? !tv : PLD Linux ::::::::: Wroclaw University, CS Dept : {E-,w}-- {b++,e}>+++ h From qboosh at pld.org.pl Sun May 18 23:44:59 2003 From: qboosh at pld.org.pl (Jakub Bogusz) Date: Sun, 18 May 2003 23:44:59 +0200 Subject: RFC: spec preprocessor In-Reply-To: <20030517112426.GA4988@roke.freak> References: <20030517112426.GA4988@roke.freak> Message-ID: <20030518214459.GD26990@satan.blackhosts> On Sat, May 17, 2003 at 01:24:26PM +0200, Michal Moskal wrote: > Hello, > > As everyone see bcond syntax in rpm is ugly. A solution to this (and > maybe few more) problems would be to run spec files through some kind of > preprocessor. For example: > #v+ > %bcond foo default_off "foo support" > %bcond bar default_on "bar support" > %if foo > ... > %else > ... > %endif [...] > Would be translated to: > > #v+ > # --with foo -- build with foo support > # --without bar -- build without bar support > %if %{?_with_foo:1}0 > ... > %else > ... > %endif > %if %{!?_without_bar:1}0 > ... > %endif [...] Well... doesn't look much better to me. Too little to be the reason for upgrading rpm or preprocessing specs somewhere else whenever I have to build some packages from post-Ra resources... Lack of nested comments was more disturbing. Maybe implementing %ifdef and %ifndef (to be used instead of 0%{?...:1} and 0%{!?...:1}) would be worth... but it would make many specs incompatible with rpm from Ra :/ -- Jakub Bogusz http://cyber.cs.net.pl/~qboosh/ From wiget at pld.org.pl Tue May 20 10:36:51 2003 From: wiget at pld.org.pl (Artur Frysiak) Date: 20 May 2003 10:36:51 +0200 Subject: RFC: spec preprocessor In-Reply-To: <20030518214459.GD26990@satan.blackhosts> References: <20030517112426.GA4988@roke.freak> <20030518214459.GD26990@satan.blackhosts> Message-ID: <1053419810.4509.4.camel@wiget> W li?cie z nie, 18-05-2003, godz. 23:44, Jakub Bogusz pisze: > Lack of nested comments was more disturbing. > Nasted comments ? You mean: nasted %ifs ? This is posible with rpm 4.3-snap. > Maybe implementing %ifdef and %ifndef (to be used instead of > 0%{?...:1} and 0%{!?...:1}) would be worth... but it would make many > specs incompatible with rpm from Ra :/ %ifdef and %ifndef .... hmm, look in rpm-list archive for jbj proposition about implementing it as macro (with sample implementation). Regards -- Artur Frysiak From qboosh at pld.org.pl Tue May 20 10:56:17 2003 From: qboosh at pld.org.pl (Jakub Bogusz) Date: Tue, 20 May 2003 10:56:17 +0200 Subject: RFC: spec preprocessor In-Reply-To: <1053419810.4509.4.camel@wiget> References: <20030517112426.GA4988@roke.freak> <20030518214459.GD26990@satan.blackhosts> <1053419810.4509.4.camel@wiget> Message-ID: <20030520085615.GA13168@gruby.cs.net.pl> On Tue, May 20, 2003 at 10:36:51AM +0200, Artur Frysiak wrote: > W li?cie z nie, 18-05-2003, godz. 23:44, Jakub Bogusz pisze: > > Lack of nested comments was more disturbing. > > > Nasted comments ? You mean: nasted %ifs ? > This is posible with rpm 4.3-snap. I saw it in spec - that's the reason I wrote "was", not "is" :) (but I haven't installed this version yet) > > Maybe implementing %ifdef and %ifndef (to be used instead of > > 0%{?...:1} and 0%{!?...:1}) would be worth... but it would make many > > specs incompatible with rpm from Ra :/ > > %ifdef and %ifndef .... hmm, look in rpm-list archive for jbj > proposition about implementing it as macro (with sample implementation). Is the archive accessible to non-members? >From http://www.rpm.org/ I've found only: https://listman.redhat.com/mailman/listinfo/rpm-list "The current archive is only available to the list members." http://www.redhat.com/mailing-lists/rpm-list/index.html "Page Not Found (404)" -- Jakub Bogusz http://cyber.cs.net.pl/~qboosh/ From malekith at pld-linux.org Tue May 20 14:33:06 2003 From: malekith at pld-linux.org (Michal Moskal) Date: Tue, 20 May 2003 14:33:06 +0200 Subject: RFC: spec preprocessor In-Reply-To: <20030520085615.GA13168@gruby.cs.net.pl> References: <20030517112426.GA4988@roke.freak> <20030518214459.GD26990@satan.blackhosts> <1053419810.4509.4.camel@wiget> <20030520085615.GA13168@gruby.cs.net.pl> Message-ID: <20030520123306.GA8494@roke.freak> On Tue, May 20, 2003 at 10:56:17AM +0200, Jakub Bogusz wrote: > > > Maybe implementing %ifdef and %ifndef (to be used instead of > > > 0%{?...:1} and 0%{!?...:1}) would be worth... but it would make many > > > specs incompatible with rpm from Ra :/ > > > > %ifdef and %ifndef .... hmm, look in rpm-list archive for jbj > > proposition about implementing it as macro (with sample implementation). > > Is the archive accessible to non-members? > > >From http://www.rpm.org/ I've found only: > > https://listman.redhat.com/mailman/listinfo/rpm-list > "The current archive is only available to the list members." > > http://www.redhat.com/mailing-lists/rpm-list/index.html > "Page Not Found (404)" http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&group=linux.redhat.rpm %ifdef() %if %{expand:%%{?%{1}:1}%%{!?%{1}:0}} from: http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&frame=right&th=a62c054cf0f6ee10&seekm=200202221248.AA3247047188%40snip.net#link2 -- : Michal Moskal :: http://www.kernel.pl/~malekith : GCS {C,UL}++++$ a? !tv : PLD Linux ::::::::: Wroclaw University, CS Dept : {E-,w}-- {b++,e}>+++ h From wiget at pld.org.pl Tue May 20 14:59:32 2003 From: wiget at pld.org.pl (Artur Frysiak) Date: 20 May 2003 14:59:32 +0200 Subject: RFC: spec preprocessor In-Reply-To: <20030520085615.GA13168@gruby.cs.net.pl> References: <20030517112426.GA4988@roke.freak> <20030518214459.GD26990@satan.blackhosts> <1053419810.4509.4.camel@wiget> <20030520085615.GA13168@gruby.cs.net.pl> Message-ID: <1053435572.4494.24.camel@wiget> W li?cie z wto, 20-05-2003, godz. 10:56, Jakub Bogusz pisze: > On Tue, May 20, 2003 at 10:36:51AM +0200, Artur Frysiak wrote: > > > Maybe implementing %ifdef and %ifndef (to be used instead of > > > 0%{?...:1} and 0%{!?...:1}) would be worth... but it would make many > > > specs incompatible with rpm from Ra :/ > > > > %ifdef and %ifndef .... hmm, look in rpm-list archive for jbj > > proposition about implementing it as macro (with sample implementation). > > Is the archive accessible to non-members? Sorry, its members only. >From archive: %define defined() %{expand:%%{?%{1}:1}%%{!?%{1}:0}} %define undefined() %{expand:%%{?%{1}:0}%%{!?%{1}:1}} %define ifdef() %if %{expand:%%{?%{1}:1}%%{!?%{1}:0}} %define ifndef() %if %{expand:%%{?%{1}:0}%%{!?%{1}:1}} And additionaly (by me, not tested yet): %define ifwith() %if %{expand:%%{?_with_%{1}:1}0} %define ifwithout() %if %{expand:%%{?_without_%{1}:1}0} Regards -- Artur Frysiak From malekith at pld-linux.org Tue May 20 15:44:35 2003 From: malekith at pld-linux.org (Michal Moskal) Date: Tue, 20 May 2003 15:44:35 +0200 Subject: RFC: spec preprocessor In-Reply-To: <1053435572.4494.24.camel@wiget> References: <20030517112426.GA4988@roke.freak> <20030518214459.GD26990@satan.blackhosts> <1053419810.4509.4.camel@wiget> <20030520085615.GA13168@gruby.cs.net.pl> <1053435572.4494.24.camel@wiget> Message-ID: <20030520134435.GA17795@roke.freak> On Tue, May 20, 2003 at 02:59:32PM +0200, Artur Frysiak wrote: > Sorry, its members only. > >From archive: > > %define defined() %{expand:%%{?%{1}:1}%%{!?%{1}:0}} > %define undefined() %{expand:%%{?%{1}:0}%%{!?%{1}:1}} > > %define ifdef() %if %{expand:%%{?%{1}:1}%%{!?%{1}:0}} > %define ifndef() %if %{expand:%%{?%{1}:0}%%{!?%{1}:1}} > > And additionaly (by me, not tested yet): > %define ifwith() %if %{expand:%%{?_with_%{1}:1}0} > %define ifwithout() %if %{expand:%%{?_without_%{1}:1}0} Maybe something like: %define bcond_with() %{expand:%%{?_with_%{1}:%%define %{1} 1}} %define bcond_without() %{expand:%%{!?_without_%{1}:%%define %{1} 1}} And then: %bcond_with foo # foo inc. support %bcond_without bar # bar fonts support %ifdef foo ... %endif %ifdef bar ... %endif %{?foo: ... } %{?bar: ... } Would be nice? But it doesn't seem to work... -- : Michal Moskal :: http://www.kernel.pl/~malekith : GCS {C,UL}++++$ a? !tv : PLD Linux ::::::::: Wroclaw University, CS Dept : {E-,w}-- {b++,e}>+++ h From wiget at pld.org.pl Tue May 20 17:07:05 2003 From: wiget at pld.org.pl (Artur Frysiak) Date: 20 May 2003 17:07:05 +0200 Subject: RFC: spec preprocessor In-Reply-To: <20030520134435.GA17795@roke.freak> References: <20030517112426.GA4988@roke.freak> <20030518214459.GD26990@satan.blackhosts> <1053419810.4509.4.camel@wiget> <20030520085615.GA13168@gruby.cs.net.pl> <1053435572.4494.24.camel@wiget> <20030520134435.GA17795@roke.freak> Message-ID: <1053443224.4511.32.camel@wiget> W li?cie z wto, 20-05-2003, godz. 15:44, Michal Moskal pisze: > On Tue, May 20, 2003 at 02:59:32PM +0200, Artur Frysiak wrote: > Maybe something like: > > %define bcond_with() %{expand:%%{?_with_%{1}:%%define %{1} 1}} > %define bcond_without() %{expand:%%{!?_without_%{1}:%%define %{1} 1}} > > And then: > > %bcond_with foo # foo inc. support > %bcond_without bar # bar fonts support %define bcond_with() %{expand:%%{?_with_%{1}:%%global %{1} 1}} And works. Any volunteer to describe this in some documentation and implement in /usr/lib/rpm/macros ? Regards -- Artur Frysiak From malekith at pld-linux.org Tue May 20 23:18:07 2003 From: malekith at pld-linux.org (Michal Moskal) Date: Tue, 20 May 2003 23:18:07 +0200 Subject: RFC: spec preprocessor In-Reply-To: <1053443224.4511.32.camel@wiget> References: <20030517112426.GA4988@roke.freak> <20030518214459.GD26990@satan.blackhosts> <1053419810.4509.4.camel@wiget> <20030520085615.GA13168@gruby.cs.net.pl> <1053435572.4494.24.camel@wiget> <20030520134435.GA17795@roke.freak> <1053443224.4511.32.camel@wiget> Message-ID: <20030520211807.GA9323@roke.freak> On Tue, May 20, 2003 at 05:07:05PM +0200, Artur Frysiak wrote: > W li?cie z wto, 20-05-2003, godz. 15:44, Michal Moskal pisze: > > On Tue, May 20, 2003 at 02:59:32PM +0200, Artur Frysiak wrote: > > Maybe something like: > > > > %define bcond_with() %{expand:%%{?_with_%{1}:%%define %{1} 1}} > > %define bcond_without() %{expand:%%{!?_without_%{1}:%%define %{1} 1}} > > > > And then: > > > > %bcond_with foo # foo inc. support > > %bcond_without bar # bar fonts support > > %define bcond_with() %{expand:%%{?_with_%{1}:%%global %{1} 1}} > > And works. > > Any volunteer to describe this in some documentation and implement in > /usr/lib/rpm/macros ? I'm not quite sure, if symbol to be defined should be name of bcond. For example consider --with patch or --with setup or something like this. Maybe define with_foo for --with foo or lack of --without foo? -- : Michal Moskal :: http://www.kernel.pl/~malekith : GCS {C,UL}++++$ a? !tv : PLD Linux ::::::::: Wroclaw University, CS Dept : {E-,w}-- {b++,e}>+++ h From wiget at koelner.com.pl Wed May 21 08:57:20 2003 From: wiget at koelner.com.pl (Artur Frysiak) Date: Wed, 21 May 2003 08:57:20 +0200 Subject: RFC: spec preprocessor In-Reply-To: <20030520211807.GA9323@roke.freak> References: <20030517112426.GA4988@roke.freak> <20030518214459.GD26990@satan.blackhosts> <1053419810.4509.4.camel@wiget> <20030520085615.GA13168@gruby.cs.net.pl> <1053435572.4494.24.camel@wiget> <20030520134435.GA17795@roke.freak> <1053443224.4511.32.camel@wiget> <20030520211807.GA9323@roke.freak> Message-ID: <20030521065720.GA2393@k3> On Tue, May 20, 2003 at 11:18:07PM +0200, Michal Moskal wrote: > On Tue, May 20, 2003 at 05:07:05PM +0200, Artur Frysiak wrote: > > W li?cie z wto, 20-05-2003, godz. 15:44, Michal Moskal pisze: > > > On Tue, May 20, 2003 at 02:59:32PM +0200, Artur Frysiak wrote: > > > Maybe something like: > > > > > > %define bcond_with() %{expand:%%{?_with_%{1}:%%define %{1} 1}} > > > %define bcond_without() %{expand:%%{!?_without_%{1}:%%define %{1} 1}} > > > > > > And then: > > > > > > %bcond_with foo # foo inc. support > > > %bcond_without bar # bar fonts support > > > > %define bcond_with() %{expand:%%{?_with_%{1}:%%global %{1} 1}} > > > > And works. > > > > Any volunteer to describe this in some documentation and implement in > > /usr/lib/rpm/macros ? > > I'm not quite sure, if symbol to be defined should be name of bcond. For > example consider --with patch or --with setup or something like this. > > Maybe define with_foo for --with foo or lack of --without foo? Whats about default value ? Maybe: %define bcond() %{expand:%%{?_with_%{1}:%%{?_without_%{1}:%%{error:Bcond colision} exit1}%%global %{1} %%{!?_without_%{1}:%%{?_with_%{1}:1}%%{!?_with_%{1}:%{2}}}0} And usage: %bcond foo 1 # foo support %if %{foo} %if %{bar} with foo and bar %else with foo and without bar %endif %endif -- wiget From malekith at pld-linux.org Wed May 21 10:26:10 2003 From: malekith at pld-linux.org (Michal Moskal) Date: Wed, 21 May 2003 10:26:10 +0200 Subject: RFC: spec preprocessor In-Reply-To: <20030521065720.GA2393@k3> References: <20030517112426.GA4988@roke.freak> <20030518214459.GD26990@satan.blackhosts> <1053419810.4509.4.camel@wiget> <20030520085615.GA13168@gruby.cs.net.pl> <1053435572.4494.24.camel@wiget> <20030520134435.GA17795@roke.freak> <1053443224.4511.32.camel@wiget> <20030520211807.GA9323@roke.freak> <20030521065720.GA2393@k3> Message-ID: <20030521082610.GA3986@roke.freak> On Wed, May 21, 2003 at 08:57:20AM +0200, Artur Frysiak wrote: > > Maybe define with_foo for --with foo or lack of --without foo? > > Whats about default value ? > Maybe: > %define bcond() %{expand:%%{?_with_%{1}:%%{?_without_%{1}:%%{error:Bcond colision} exit1}%%global %{1} %%{!?_without_%{1}:%%{?_with_%{1}:1}%%{!?_with_%{1}:%{2}}}0} > > And usage: > %bcond foo 1 # foo support > > %if %{foo} > %if %{bar} > with foo and bar > %else > with foo and without bar > %endif > %endif Default depends on whatever you specify %bcond_with or %bcond_without. But you may be right, that additional argument would be better. But: 1. foo=1 or foo=0 (as opposed to defined/undefined) makes %{?foo:...} impossible (or I don't know something) 2. foo for --with foo isn't best idea because of --with setup or similar. -- : Michal Moskal :: http://www.kernel.pl/~malekith : GCS {C,UL}++++$ a? !tv : PLD Linux ::::::::: Wroclaw University, CS Dept : {E-,w}-- {b++,e}>+++ h From malekith at pld-linux.org Fri May 23 01:50:55 2003 From: malekith at pld-linux.org (Michal Moskal) Date: Fri, 23 May 2003 01:50:55 +0200 Subject: e3.spec and magic rpm Message-ID: <20030522235055.GA19788@roke.freak> Trying to build e3 with rpm gives: [...] Documentation compressed. + exit 0 rpmbuild: corrupted program header size. e3 is written in assembler, so it has slightly non-standard ELF header RPM apparently cannot handle. Is it possible to turn this magic stuff off? -- : Michal Moskal :: http://www.kernel.pl/~malekith : GCS {C,UL}++++$ a? !tv : PLD Linux ::::::::: Wroclaw University, CS Dept : {E-,w}-- {b++,e}>+++ h From wiget at pld.org.pl Fri May 23 11:12:55 2003 From: wiget at pld.org.pl (Artur Frysiak) Date: Fri, 23 May 2003 11:12:55 +0200 Subject: e3.spec and magic rpm In-Reply-To: <20030522235055.GA19788@roke.freak> References: <20030522235055.GA19788@roke.freak> Message-ID: <20030523091255.GA6443@ikar.t17.ds.pwr.wroc.pl> On Fri, May 23, 2003 at 01:50:55AM +0200, Michal Moskal wrote: > Trying to build e3 with rpm gives: > > [...] > Documentation compressed. > + exit 0 > rpmbuild: corrupted program header size. > > e3 is written in assembler, so it has slightly non-standard ELF header > RPM apparently cannot handle. > > Is it possible to turn this magic stuff off? %define _use_internal_dependency_generator 0 -- Artur Frysiak http://www.pld.org.pl/