[opensuse-packaging] Specfile Guidelines sweep over Factory
vuntz mentioned it might be good to inform people, though I doubt anyone is going to read this.. As you may have noticed I am going through all factory packages to implement a few of the specfile guidelines[1] in semi-automated fashion, among them the following subtasks: [1] http://en.opensuse.org/openSUSE:Specfile_guidelines automated: - removal of '# norootforbuild' - removal of 'AutoReqProv: on' since this is default anyway manual: - removal of Authors list, no longer desired in factory - removal of %clean section, no longer required - removal of rm -Rf %buildroot in %install when spotted, [1] - changing %{?%jobs:-j%jobs} to %_smp_mflags, [1] - adding %{?_smp_mflags} whereever there is none, or - tagging places more explicitly where parallel build does not work by utilizing the grepable string "-j1" plus a comment if none exists - replacing CFLAGS="$RPM_OPT_FLAGS" ./configure --bindir=%_bindir --infodir=%_infodir ... (and similar) by %configure [shorter] - shlib policy where it seems quick - killing old %changelog (because it's in .changes already) Keep in mind: - obs-service-format_spec_file has been configured for a handful of projects and is adding more line noise besides my actual changes So far. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Mon, 19 Sep 2011 02:44:36 +0200 (CEST) Jan Engelhardt <jengelh@medozas.de> wrote:
vuntz mentioned it might be good to inform people, though I doubt anyone is going to read this..
As you may have noticed I am going through all factory packages to implement a few of the specfile guidelines[1] in semi-automated fashion, among them the following subtasks:
[1] http://en.opensuse.org/openSUSE:Specfile_guidelines
automated: - removal of '# norootforbuild' - removal of 'AutoReqProv: on' since this is default anyway manual: - removal of Authors list, no longer desired in factory - removal of %clean section, no longer required - removal of rm -Rf %buildroot in %install when spotted, [1] - changing %{?%jobs:-j%jobs} to %_smp_mflags, [1] - adding %{?_smp_mflags} whereever there is none, or - tagging places more explicitly where parallel build does not work by utilizing the grepable string "-j1" plus a comment if none exists - replacing CFLAGS="$RPM_OPT_FLAGS" ./configure --bindir=%_bindir --infodir=%_infodir ... (and similar) by %configure [shorter] - shlib policy where it seems quick - killing old %changelog (because it's in .changes already)
Keep in mind: - obs-service-format_spec_file has been configured for a handful of projects and is adding more line noise besides my actual changes
So far.
Hi I noticed and read ;) So a couple of questions how will these changes affect for example SLE rpms (I'm a SLED/SLES user as well) and if a user decided to use rpmbuild on an older system, will these changes break this? -- Cheers Malcolm °¿° (Linux Counter #276890) openSUSE 11.4 (x86_64) Kernel 2.6.37.6-0.7-desktop up 6 days 6:38, 3 users, load average: 0.09, 0.21, 0.19 GPU GeForce 8600 GTS Silent - Driver Version: 280.13 -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Monday 2011-09-19 05:39, Malcolm wrote:
vuntz mentioned it might be good to inform people, though I doubt anyone is going to read this..
As you may have noticed I am going through all factory packages to implement a few of the specfile guidelines[1] in semi-automated fashion[...] [cleanups...]
So a couple of questions how will these changes affect for example SLE rpms (I'm a SLED/SLES user as well) and if a user decided to use rpmbuild on an older system, will these changes break this?
Running rpmbuild outside protected environments (chroot, etc.), like Open Build Service provides, was never really supported (cf. bnc#176528 c4). -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Am 19.09.2011 10:04, schrieb Jan Engelhardt:
On Monday 2011-09-19 05:39, Malcolm wrote:
vuntz mentioned it might be good to inform people, though I doubt anyone is going to read this..
As you may have noticed I am going through all factory packages to implement a few of the specfile guidelines[1] in semi-automated fashion[...] [cleanups...]
So a couple of questions how will these changes affect for example SLE rpms (I'm a SLED/SLES user as well) and if a user decided to use rpmbuild on an older system, will these changes break this?
Running rpmbuild outside protected environments (chroot, etc.), like Open Build Service provides, was never really supported (cf. bnc#176528 c4).
This is not the point. Are every changes above compatible to build the packages successfully for SLE11 or even older with SLE10? If not I won't follow the guidelines for every package since I want to have the same spec for Factory and SLE10 in worst case. Wolfgang -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Monday 2011-09-19 10:06, Wolfgang Rosenauer wrote:
So a couple of questions how will these changes affect for example SLE rpms (I'm a SLED/SLES user as well) and if a user decided to use rpmbuild on an older system, will these changes break this?
Running rpmbuild outside protected environments (chroot, etc.), like Open Build Service provides, was never really supported (cf. bnc#176528 c4).
This is not the point. Are every changes above compatible to build the packages successfully for SLE11 or even older with SLE10? If not I won't follow the guidelines for every package since I want to have the same spec for Factory and SLE10 in worst case.
I seem to remember there was a short mention of ‘what about SLE?’ in the "Packaging Guidelines" 1-hour block on oSC2011 which was answered - (was it kkaempf who gave the response?) - like so, paraphrasing, ‘not your issue but mine’, implying that he or SUSE.com has to deal with SLE's divergence and not block changes in openSUSE. That said, the changes should work for SLE too; as I have not consciously added any constructs where I know they are not available on SLE10&11 (like %_initddir). If you get a SLE build failure, call me and you get an extra patch. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Am 19.09.2011 10:25, schrieb Jan Engelhardt:
I seem to remember there was a short mention of ‘what about SLE?’ in the "Packaging Guidelines" 1-hour block on oSC2011 which was answered - (was it kkaempf who gave the response?) - like so, paraphrasing, ‘not your issue but mine’, implying that he or SUSE.com has to deal with SLE's divergence and not block changes in openSUSE.
Again not really the point since I want to support at least openSUSE 11.1 with some packages and I also want to keep my packages building with SLE10 (in rare cases) although I'm not suse.com. Especially as I see no harm done to Factory as none of the changes give real improvements but only style. Or did I miss an important change needed for Factory?
That said, the changes should work for SLE too; as I have not consciously added any constructs where I know they are not available on SLE10&11 (like %_initddir).
If you get a SLE build failure, call me and you get an extra patch.
Ok ;-) That was the answer I was looking for. Thanks! Wolfgang -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On 09/18/2011 08:44 PM, Jan Engelhardt wrote:
vuntz mentioned it might be good to inform people, though I doubt anyone is going to read this..
Don't be so pessimistic ;)
As you may have noticed I am going through all factory packages to implement a few of the specfile guidelines[1] in semi-automated fashion, among them the following subtasks:
[1] http://en.opensuse.org/openSUSE:Specfile_guidelines
automated: - removal of '# norootforbuild' - removal of 'AutoReqProv: on' since this is default anyway manual: - removal of Authors list, no longer desired in factory - removal of %clean section, no longer required - removal of rm -Rf %buildroot in %install when spotted, [1] - changing %{?%jobs:-j%jobs} to %_smp_mflags, [1] - adding %{?_smp_mflags} whereever there is none, or - tagging places more explicitly where parallel build does not work by utilizing the grepable string "-j1" plus a comment if none exists - replacing CFLAGS="$RPM_OPT_FLAGS" ./configure --bindir=%_bindir --infodir=%_infodir ... (and similar) by %configure [shorter] - shlib policy where it seems quick - killing old %changelog (because it's in .changes already)
Thanks for doing this clean up work. If you have a script it might be nice to run this over the devel projects as well or make it available such that devel project maintainers can use it. Later, Robert -- Robert Schweikert MAY THE SOURCE BE WITH YOU SUSE-IBM Software Integration Center LINUX Tech Lead rjschwei@suse.com rschweik@ca.ibm.com 781-464-8147 -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Monday 2011-09-19 09:14, Robert Schweikert wrote:
On 09/18/2011 08:44 PM, Jan Engelhardt wrote:
vuntz mentioned it might be good to inform people, though I doubt anyone is going to read this..
Don't be so pessimistic ;)
As you may have noticed I am going through all factory packages to implement a few of the specfile guidelines[1] in semi-automated fashion, among them the following subtasks:
[1] http://en.opensuse.org/openSUSE:Specfile_guidelines
automated: - removal of '# norootforbuild' - removal of 'AutoReqProv: on' since this is default anyway manual: - removal of Authors list, no longer desired in factory - removal of %clean section, no longer required - removal of rm -Rf %buildroot in %install when spotted, [1] - changing %{?%jobs:-j%jobs} to %_smp_mflags, [1] - adding %{?_smp_mflags} whereever there is none, or - tagging places more explicitly where parallel build does not work by utilizing the grepable string "-j1" plus a comment if none exists - replacing CFLAGS="$RPM_OPT_FLAGS" ./configure --bindir=%_bindir --infodir=%_infodir ... (and similar) by %configure [shorter] - shlib policy where it seems quick - killing old %changelog (because it's in .changes already)
Thanks for doing this clean up work.
If you have a script it might be nice to run this over the devel projects as well or make it available such that devel project maintainers can use it.
Not really; I figured that many of the changes are context-sensitive and would require extensive scripting. Take for example this one: %clean rm -rf foo %if 0%{?sles_version} %files ... %else %files ... %endif Since %if is resolved before %clean, one would need a static analyzer-like tool (work, work, work) and walk all possible paths to determine just how far the %clean section goes. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Sep 19, 11 10:36:41 +0200, Jan Engelhardt wrote:
[1] http://en.opensuse.org/openSUSE:Specfile_guidelines
manual: - removal of %clean section, no longer required
Not really; I figured that many of the changes are context-sensitive and would require extensive scripting. Take for example this one:
%clean rm -rf foo %if 0%{?sles_version}
%files ... %else %files ... %endif
Ouch, this is a horrible mess!
Since %if is resolved before %clean, one would need a static analyzer-like tool (work, work, work) and walk all possible paths to determine just how far the %clean section goes.
No. This needs a Specfile_guideline, saying that %if-%else-%endif must not reach across sections. Then, the cleanup-script will happily break those specfiles, that violate the guidelines. cheers, JW- -- o \ Juergen Weigert paint it green! __/ _=======.=======_ <V> | jw@suse.de back to ascii! __/ _---|____________\/ \ | 0911 74053-508 __/ (____/ /\ (/) | _____________________________/ _/ \_ vim:set sw=2 wm=8 SUSE LINUX Products GmbH, GF: Jeff Hawn, J.Guild, F.Imendoerffer, HRB 16746 (AG Nuernberg), Maxfeldstrasse 5, 90409 Nuernberg, Germany SuSE. Supporting Linux since 1992. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Monday 2011-09-19 11:22, Juergen Weigert wrote:
On Sep 19, 11 10:36:41 +0200, Jan Engelhardt wrote:
[1] http://en.opensuse.org/openSUSE:Specfile_guidelines
manual: - removal of %clean section, no longer required
Not really; I figured that many of the changes are context-sensitive and would require extensive scripting. Take for example this one:
%clean rm -rf foo %if 0%{?sles_version}
%files ... %else %files ... %endif
Ouch, this is a horrible mess!
Since %if is resolved before %clean, one would need a static analyzer-like tool (work, work, work) and walk all possible paths to determine just how far the %clean section goes.
No. This needs a Specfile_guideline, saying that %if-%else-%endif must not reach across sections.
In a way, it did not. The sample %if..%endif section spans exactly one %files subsection. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Sep 19, 11 11:34:49 +0200, Jan Engelhardt wrote:
No. This needs a Specfile_guideline, saying that %if-%else-%endif must not reach across sections.
In a way, it did not. The sample %if..%endif section spans exactly one %files subsection.
It did. It did span across the the %files heading. Desired effect: %section headings must not be inside %if...%else cheers, JW- -- o \ Juergen Weigert paint it green! __/ _=======.=======_ <V> | jw@suse.de back to ascii! __/ _---|____________\/ \ | 0911 74053-508 __/ (____/ /\ (/) | _____________________________/ _/ \_ vim:set sw=2 wm=8 SUSE LINUX Products GmbH, GF: Jeff Hawn, J.Guild, F.Imendoerffer, HRB 16746 (AG Nuernberg), Maxfeldstrasse 5, 90409 Nuernberg, Germany SuSE. Supporting Linux since 1992. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Am 19.09.2011 12:11, schrieb Juergen Weigert:
On Sep 19, 11 11:34:49 +0200, Jan Engelhardt wrote:
No. This needs a Specfile_guideline, saying that %if-%else-%endif must not reach across sections.
In a way, it did not. The sample %if..%endif section spans exactly one %files subsection.
It did. It did span across the the %files heading. Desired effect: %section headings must not be inside %if...%else
Huh, I heavily rely on that feature. Think about having different subpackages to support different distribution versions or simple config flags to enable/disable subpackages. Wolfgang -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Monday 2011-09-19 12:11, Juergen Weigert wrote:
On Sep 19, 11 11:34:49 +0200, Jan Engelhardt wrote:
No. This needs a Specfile_guideline, saying that %if-%else-%endif must not reach across sections.
In a way, it did not. The sample %if..%endif section spans exactly one %files subsection.
It did. It did span across the the %files heading. Desired effect: %section headings must not be inside %if...%else
MozillaFirefox-branding-SLED NetworkManager PolicyKit/*.spec Terminal ... there's lots. Running $(grep -A5 '^%clean' */*.spec | less) inside a complete checkout of openSUSE:Factory and searching for "%if" with less(1) will reveal those specfiles. And I guess they have a reason to wrap %post inside %if, rather than putting the %if block inside %post. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Am Montag, 19. September 2011, 02:44:36 schrieb Jan Engelhardt:
vuntz mentioned it might be good to inform people, though I doubt anyone is going to read this..
As you may have noticed I am going through all factory packages to implement a few of the specfile guidelines[1] in semi-automated fashion, among them the following subtasks:
[1] http://en.opensuse.org/openSUSE:Specfile_guidelines
automated: - removal of '# norootforbuild' - removal of 'AutoReqProv: on' since this is default anyway manual: - removal of Authors list, no longer desired in factory - removal of %clean section, no longer required - removal of rm -Rf %buildroot in %install when spotted, [1] - changing %{?%jobs:-j%jobs} to %_smp_mflags, [1] - adding %{?_smp_mflags} whereever there is none, or - tagging places more explicitly where parallel build does not work by utilizing the grepable string "-j1" plus a comment if none exists - replacing CFLAGS="$RPM_OPT_FLAGS" ./configure --bindir=%_bindir --infodir=%_infodir ... (and similar) by %configure [shorter] - shlib policy where it seems quick - killing old %changelog (because it's in .changes already)
Keep in mind: - obs-service-format_spec_file has been configured for a handful of projects and is adding more line noise besides my actual changes
So far.
It's nice to have this in factory but how can I use it to spot problems right in the devel repos or in packages which should be compliant but won't be submitted for some reason (lack of maintainence commitment etc)? -- Ralf Lang Linux Consultant / Developer B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537 -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Am Montag, 19. September 2011 schrieb Ralf Lang:
It's nice to have this in factory but how can I use it to spot problems right in the devel repos or in packages which should be compliant but won't be submitted for some reason (lack of maintainence commitment etc)?
None of this is a problem, it's all nice to have. Greetings, Stephan -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Monday 2011-09-19 09:48, Stephan Kulow wrote:
Am Montag, 19. September 2011 schrieb Ralf Lang:
It's nice to have this in factory but how can I use it to spot problems right in the devel repos or in packages which should be compliant but won't be submitted for some reason (lack of maintainence commitment etc)?
None of this is a problem, it's all nice to have.
It all goes through develprojs first. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
At Mon, 19 Sep 2011 02:44:36 +0200 (CEST), Jan Engelhardt wrote:
- removal of %clean section, no longer required
Does this work for old distros, too? Many repos are set up to be applicable to old distro versions. Maybe for OBS, it doesn't matter, though. thanks, Takashi -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Monday 2011-09-19 10:00, Takashi Iwai wrote:
At Mon, 19 Sep 2011 02:44:36 +0200 (CEST), Jan Engelhardt wrote:
- removal of %clean section, no longer required
Does this work for old distros, too?
Yes. I have removed the wrong claim on the wiki page about %clean being a must-have for specfiled fed to rpm < 4.7. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
At Mon, 19 Sep 2011 10:06:59 +0200 (CEST), Jan Engelhardt wrote:
On Monday 2011-09-19 10:00, Takashi Iwai wrote:
At Mon, 19 Sep 2011 02:44:36 +0200 (CEST), Jan Engelhardt wrote:
- removal of %clean section, no longer required
Does this work for old distros, too?
Yes. I have removed the wrong claim on the wiki page about %clean being a must-have for specfiled fed to rpm < 4.7.
Good to hear. Thanks for clarification! Takashi -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Hi, Le lundi 19 septembre 2011, à 02:44 +0200, Jan Engelhardt a écrit :
automated: - removal of '# norootforbuild' - removal of 'AutoReqProv: on' since this is default anyway manual: - removal of Authors list, no longer desired in factory - removal of %clean section, no longer required - removal of rm -Rf %buildroot in %install when spotted, [1] - changing %{?%jobs:-j%jobs} to %_smp_mflags, [1] - adding %{?_smp_mflags} whereever there is none, or - tagging places more explicitly where parallel build does not work by utilizing the grepable string "-j1" plus a comment if none exists - replacing CFLAGS="$RPM_OPT_FLAGS" ./configure --bindir=%_bindir --infodir=%_infodir ... (and similar) by %configure [shorter] - shlib policy where it seems quick - killing old %changelog (because it's in .changes already)
I didn't know it was doing all that :-) Just wondering: is this based on spec-cleaner? Most of this is done by spec-cleaner (although it doesn't remove %clean right now, iirc). Cheers, Vincent -- Les gens heureux ne sont pas pressés. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Monday 2011-09-19 12:22, Vincent Untz wrote:
Hi,
Le lundi 19 septembre 2011, à 02:44 +0200, Jan Engelhardt a écrit :
automated: - removal of '# norootforbuild' - removal of 'AutoReqProv: on' since this is default anyway manual: - removal of Authors list, no longer desired in factory - removal of %clean section, no longer required - removal of rm -Rf %buildroot in %install when spotted, [1] - changing %{?%jobs:-j%jobs} to %_smp_mflags, [1] - adding %{?_smp_mflags} whereever there is none, or - tagging places more explicitly where parallel build does not work by utilizing the grepable string "-j1" plus a comment if none exists - replacing CFLAGS="$RPM_OPT_FLAGS" ./configure --bindir=%_bindir --infodir=%_infodir ... (and similar) by %configure [shorter] - shlib policy where it seems quick - killing old %changelog (because it's in .changes already)
I didn't know it was doing all that :-)
Just wondering: is this based on spec-cleaner? Most of this is done by spec-cleaner (although it doesn't remove %clean right now, iirc).
What part of the word "manual" was imprecise? -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Le lundi 19 septembre 2011, à 12:23 +0200, Jan Engelhardt a écrit :
On Monday 2011-09-19 12:22, Vincent Untz wrote:
Hi,
Le lundi 19 septembre 2011, à 02:44 +0200, Jan Engelhardt a écrit :
automated: - removal of '# norootforbuild' - removal of 'AutoReqProv: on' since this is default anyway manual: - removal of Authors list, no longer desired in factory - removal of %clean section, no longer required - removal of rm -Rf %buildroot in %install when spotted, [1] - changing %{?%jobs:-j%jobs} to %_smp_mflags, [1] - adding %{?_smp_mflags} whereever there is none, or - tagging places more explicitly where parallel build does not work by utilizing the grepable string "-j1" plus a comment if none exists - replacing CFLAGS="$RPM_OPT_FLAGS" ./configure --bindir=%_bindir --infodir=%_infodir ... (and similar) by %configure [shorter] - shlib policy where it seems quick - killing old %changelog (because it's in .changes already)
I didn't know it was doing all that :-)
Just wondering: is this based on spec-cleaner? Most of this is done by spec-cleaner (although it doesn't remove %clean right now, iirc).
What part of the word "manual" was imprecise?
The part where it was not visible to me since it's in the middle of a rather big list, I guess. In that case, did you consider re-using spec-cleaner for this? It can be trimmed down to do only the changes you're looking at. Thanks, Vincent -- Les gens heureux ne sont pas pressés. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Am 19.09.2011 12:25, schrieb Vincent Untz:
Le lundi 19 septembre 2011, à 12:23 +0200, Jan Engelhardt a écrit :
On Monday 2011-09-19 12:22, Vincent Untz wrote:
Hi,
Le lundi 19 septembre 2011, à 02:44 +0200, Jan Engelhardt a écrit :
automated: - removal of '# norootforbuild' - removal of 'AutoReqProv: on' since this is default anyway manual: - removal of Authors list, no longer desired in factory - removal of %clean section, no longer required - removal of rm -Rf %buildroot in %install when spotted, [1] - changing %{?%jobs:-j%jobs} to %_smp_mflags, [1] - adding %{?_smp_mflags} whereever there is none, or - tagging places more explicitly where parallel build does not work by utilizing the grepable string "-j1" plus a comment if none exists - replacing CFLAGS="$RPM_OPT_FLAGS" ./configure --bindir=%_bindir --infodir=%_infodir ... (and similar) by %configure [shorter] - shlib policy where it seems quick - killing old %changelog (because it's in .changes already)
I didn't know it was doing all that :-)
Just wondering: is this based on spec-cleaner? Most of this is done by spec-cleaner (although it doesn't remove %clean right now, iirc).
What part of the word "manual" was imprecise?
The part where it was not visible to me since it's in the middle of a rather big list, I guess.
In that case, did you consider re-using spec-cleaner for this? It can be trimmed down to do only the changes you're looking at.
BTW, I tried spec-cleaner the first time now and immediately had to revert at least one thing. %makeinstall -> %make_install this is NOT available on SLE11 (and most likely 11.1). Where to file bugs about it? Or is it desired behaviour? Wolfgang -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Monday 2011-09-19 12:29, Wolfgang Rosenauer wrote:
The part where it was not visible to me since it's in the middle of a rather big list, I guess.
In that case, did you consider re-using spec-cleaner for this? It can be trimmed down to do only the changes you're looking at.
BTW, I tried spec-cleaner the first time now and immediately had to revert at least one thing. %makeinstall -> %make_install this is NOT available on SLE11 (and most likely 11.1).
*mindboggles* In rpm.git, you find: # The make install analogue of %configure for modern autotools: %make_install make install DESTDIR=%{?buildroot} # Former make install analogue, kept for compatibility and for old/broken # packages that don't support DESTDIR properly. %makeinstall \ And now, in suse_macros: %make_install make install DESTDIR=%{?buildroot} %makeinstall make DESTDIR=%{?buildroot:%{buildroot}} install Bah. One minus point for rpm for keeping around this confusing similar-naming. No wonder all users mix it up, and that sadly includes me. The hell with everlasting backwards compat. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Am Montag, 19. September 2011, 12:29:08 schrieb Wolfgang Rosenauer:
Am 19.09.2011 12:25, schrieb Vincent Untz:
Le lundi 19 septembre 2011, à 12:23 +0200, Jan Engelhardt a écrit :
On Monday 2011-09-19 12:22, Vincent Untz wrote:
Hi,
Le lundi 19 septembre 2011, à 02:44 +0200, Jan Engelhardt a écrit :
automated: - removal of '# norootforbuild' - removal of 'AutoReqProv: on' since this is default anyway manual: - removal of Authors list, no longer desired in factory - removal of %clean section, no longer required - removal of rm -Rf %buildroot in %install when spotted, [1] - changing %{?%jobs:-j%jobs} to %_smp_mflags, [1] - adding %{?_smp_mflags} whereever there is none, or - tagging places more explicitly where parallel build does not work
by utilizing the grepable string "-j1" plus a comment if none exists
- replacing CFLAGS="$RPM_OPT_FLAGS" ./configure --bindir=%_bindir
--infodir=%_infodir ... (and similar) by %configure [shorter]
- shlib policy where it seems quick - killing old %changelog (because it's in .changes already)
I didn't know it was doing all that :-)
Just wondering: is this based on spec-cleaner? Most of this is done by spec-cleaner (although it doesn't remove %clean right now, iirc).
What part of the word "manual" was imprecise?
The part where it was not visible to me since it's in the middle of a rather big list, I guess.
In that case, did you consider re-using spec-cleaner for this? It can be trimmed down to do only the changes you're looking at.
BTW, I tried spec-cleaner the first time now and immediately had to revert at least one thing. %makeinstall -> %make_install this is NOT available on SLE11 (and most likely 11.1).
Where to file bugs about it? Or is it desired behaviour?
This is the new cross-distro default. But yes, it is not working on old ones.
Wolfgang
-- Adrian Schroeter SUSE Linux Products GmbH email: adrian@suse.de
Hi Wolfgang, Le lundi 19 septembre 2011, à 12:29 +0200, Wolfgang Rosenauer a écrit :
Am 19.09.2011 12:25, schrieb Vincent Untz:
In that case, did you consider re-using spec-cleaner for this? It can be trimmed down to do only the changes you're looking at.
BTW, I tried spec-cleaner the first time now and immediately had to revert at least one thing. %makeinstall -> %make_install this is NOT available on SLE11 (and most likely 11.1).
Where to file bugs about it? Or is it desired behaviour?
This is currently the desired behavior of spec-cleaner: it targets the current version of rpm. That's one of the reasons it's not advisable to blindly use it on all packages (which is also why I suggested a trimmed down version earlier). However, there's definitely a use case for targetting a specific version of rpm. If there's demand for that, we can add an option. As for the bug tracker, we don't have any right now. Pavol, I don't think we discussed this topic. Do you have a preference for this? Cheers, Vincent -- Les gens heureux ne sont pas pressés. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Hi Jan, Le lundi 19 septembre 2011, à 02:44 +0200, Jan Engelhardt a écrit :
automated: - removal of '# norootforbuild' - removal of 'AutoReqProv: on' since this is default anyway manual: - removal of Authors list, no longer desired in factory - removal of %clean section, no longer required - removal of rm -Rf %buildroot in %install when spotted, [1] - changing %{?%jobs:-j%jobs} to %_smp_mflags, [1] - adding %{?_smp_mflags} whereever there is none, or - tagging places more explicitly where parallel build does not work by utilizing the grepable string "-j1" plus a comment if none exists - replacing CFLAGS="$RPM_OPT_FLAGS" ./configure --bindir=%_bindir --infodir=%_infodir ... (and similar) by %configure [shorter] - shlib policy where it seems quick - killing old %changelog (because it's in .changes already)
One other change I'm seeing in some sr is the addition of devel subpackages to baselibs.conf. I don't think it's needed in most cases. Or is there some rationale for it? Vincent -- Les gens heureux ne sont pas pressés. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Monday 2011-09-19 14:58, Vincent Untz wrote:
Hi Jan,
Le lundi 19 septembre 2011, à 02:44 +0200, Jan Engelhardt a écrit :
automated: - removal of '# norootforbuild' - removal of 'AutoReqProv: on' since this is default anyway manual: - removal of Authors list, no longer desired in factory - removal of %clean section, no longer required - removal of rm -Rf %buildroot in %install when spotted, [1] - changing %{?%jobs:-j%jobs} to %_smp_mflags, [1] - adding %{?_smp_mflags} whereever there is none, or - tagging places more explicitly where parallel build does not work by utilizing the grepable string "-j1" plus a comment if none exists - replacing CFLAGS="$RPM_OPT_FLAGS" ./configure --bindir=%_bindir --infodir=%_infodir ... (and similar) by %configure [shorter] - shlib policy where it seems quick - killing old %changelog (because it's in .changes already)
One other change I'm seeing in some sr is the addition of devel subpackages to baselibs.conf. I don't think it's needed in most cases. Or is there some rationale for it?
Often enough I have found myself in a position where I would like to test $PROGRAM in a non-default compilation mode, and that requires that all libraries also exist. (Point in case, I was asked to try prboom-plus in 32-bit mode, which required adding -devel to baselibs for at least the entire SDL stack. And some developers prefer a quick local compile rather than having to upload a new tarball into OBS and wait for the result -- also the latter has licensing constraints.) I am therefore of the opinion that -devel in [certain] baselibs that I am interested in is alright. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Mon, Sep 19, 2011 at 03:50:29PM +0200, Jan Engelhardt wrote:
On Monday 2011-09-19 14:58, Vincent Untz wrote:
Hi Jan,
Le lundi 19 septembre 2011, à 02:44 +0200, Jan Engelhardt a écrit :
automated: - removal of '# norootforbuild' - removal of 'AutoReqProv: on' since this is default anyway manual: - removal of Authors list, no longer desired in factory - removal of %clean section, no longer required - removal of rm -Rf %buildroot in %install when spotted, [1] - changing %{?%jobs:-j%jobs} to %_smp_mflags, [1] - adding %{?_smp_mflags} whereever there is none, or - tagging places more explicitly where parallel build does not work by utilizing the grepable string "-j1" plus a comment if none exists - replacing CFLAGS="$RPM_OPT_FLAGS" ./configure --bindir=%_bindir --infodir=%_infodir ... (and similar) by %configure [shorter] - shlib policy where it seems quick - killing old %changelog (because it's in .changes already)
One other change I'm seeing in some sr is the addition of devel subpackages to baselibs.conf. I don't think it's needed in most cases. Or is there some rationale for it?
Often enough I have found myself in a position where I would like to test $PROGRAM in a non-default compilation mode, and that requires that all libraries also exist.
(Point in case, I was asked to try prboom-plus in 32-bit mode, which required adding -devel to baselibs for at least the entire SDL stack. And some developers prefer a quick local compile rather than having to upload a new tarball into OBS and wait for the result -- also the latter has licensing constraints.)
I am therefore of the opinion that -devel in [certain] baselibs that I am interested in is alright.
This is for instance useful for people building Wine on 64bit, where you usually want to build the 32bit version and not just the 64bit version. Ciao, Marcus -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Montag 19 September 2011 15:50:29 Jan Engelhardt wrote:
On Monday 2011-09-19 14:58, Vincent Untz wrote:
Hi Jan, [..] One other change I'm seeing in some sr is the addition of devel subpackages to baselibs.conf. I don't think it's needed in most cases. Or is there some rationale for it? Yeah, I was wondering about that as well.
Often enough I have found myself in a position where I would like to test $PROGRAM in a non-default compilation mode, and that requires that all libraries also exist.
(Point in case, I was asked to try prboom-plus in 32-bit mode, which required adding -devel to baselibs for at least the entire SDL stack. And some developers prefer a quick local compile rather than having to upload a new tarball into OBS and wait for the result -- also the latter has licensing constraints.)
I am therefore of the opinion that -devel in [certain] baselibs that I am interested in is alright. Wouldn't it be better to setup a 32bit chroot enviroment (or osc build) for such a usecase? It just seems wrong to ship lots of libraries and headers as -32bit packages for that purpose. IIRC the baselibs mechanism was introduced to just provide some core libraries to be able to run binaries which either don't build or are otherwise not available for the native (64bit) platform.
Ralf -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Am Montag, 19. September 2011, 02:44:36 schrieb Jan Engelhardt:
vuntz mentioned it might be good to inform people, though I doubt anyone is going to read this..
As you may have noticed I am going through all factory packages to implement a few of the specfile guidelines[1] in semi-automated fashion, among them the following subtasks:
It's fine that you do that, but stop the request spam now. You know, we're trying to do a 12.1 release and all I'm doing all day long (and with me tons of others) is trying to get your spam out of the way. So submit it, but not more than 100 a week please. Greetings, Stephan -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Monday 2011-09-19 21:02, Stephan Kulow wrote:
Am Montag, 19. September 2011, 02:44:36 schrieb Jan Engelhardt:
vuntz mentioned it might be good to inform people, though I doubt anyone is going to read this..
As you may have noticed I am going through all factory packages to implement a few of the specfile guidelines[1] in semi-automated fashion, among them the following subtasks:
It's fine that you do that, but stop the request spam now. You know, we're trying to do a 12.1 release and all I'm doing all day long (and with me tons of others) is trying to get your spam out of the way.
So submit it, but not more than 100 a week please.
With 100/w, it would take next to a year to go through all factory packages. I think we need better tools... off I go. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Am Dienstag, 20. September 2011 schrieb Jan Engelhardt:
On Monday 2011-09-19 21:02, Stephan Kulow wrote:
Am Montag, 19. September 2011, 02:44:36 schrieb Jan Engelhardt:
vuntz mentioned it might be good to inform people, though I doubt anyone is going to read this..
As you may have noticed I am going through all factory packages to implement a few of the specfile guidelines[1] in semi-automated fashion,
among them the following subtasks: It's fine that you do that, but stop the request spam now. You know, we're trying to do a 12.1 release and all I'm doing all day long (and with me tons of others) is trying to get your spam out of the way.
So submit it, but not more than 100 a week please.
With 100/w, it would take next to a year to go through all factory packages. I think we need better tools... off I go.
Well, the simple things should be integrated into the format_spec thingy - either based on the current perl script or a stripped down spec-cleaner. Greetings, Stephan -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Tuesday 2011-09-20 13:37, Stephan Kulow wrote:
Am Dienstag, 20. September 2011 schrieb Jan Engelhardt:
On Monday 2011-09-19 21:02, Stephan Kulow wrote:
Am Montag, 19. September 2011, 02:44:36 schrieb Jan Engelhardt:
vuntz mentioned it might be good to inform people, though I doubt anyone is going to read this..
As you may have noticed I am going through all factory packages to implement a few of the specfile guidelines[1] in semi-automated fashion,
among them the following subtasks: It's fine that you do that, but stop the request spam now. You know, we're trying to do a 12.1 release and all I'm doing all day long (and with me tons of others) is trying to get your spam out of the way.
So submit it, but not more than 100 a week please.
With 100/w, it would take next to a year to go through all factory packages. I think we need better tools... off I go.
Well, the simple things should be integrated into the format_spec thingy - either based on the current perl script or a stripped down spec-cleaner.
That should work.. ## /usr/lib/osc/source_validators/10-the-way-of-the-dodo #!/bin/bash DIR_TO_CHECK="$1" if [[ -z "$DIR_TO_CHECK" ]]; then DIR_TO_CHECK="$PWD"; fi; for i in "$DIR_TO_CHECK"/*.spec; do if [[ ! -f "$i" ]]; then continue; fi; if pcregrep -iq '^autoreqprov\s*:\s*(?!off)(?!no)' "$i"; then echo "*** $i: Undesired AutoReqProv tag"; fail=1; fi; if pcregrep -iq '^#\*snorootforbuild' "$i"; then echo "*** $i: Undesired norootforbuild tag"; fail=1; fi; if pcregrep -iq '^#\*suseforbuild' "$i"; then echo "*** $i: Undesired useforbuild tag"; fail=1; fi; if pcregrep -iq '^Author(\(?s\))?:?' "$i"; then echo "*** $i: Author list no longer desired"; # don't fail, could be false positive fi; if pcregrep -q '^%clean\b' "$i"; then echo "*** $i: %clean section no longer required"; fail=1; fi; if pcregrep -q '%{\?jobs:\s*-j\s*%{?jobs}?}' "$i"; then echo "*** $i: Consider replacing %{?jobs:-j%jobs} by %{?_smp_mflags} if possible."; # Don't fail; things like scons can also be told the number of # jobs, but naturally, scons does not know make's other options. fi; done; if [[ "$fail" -ne "" ]]; then echo "*** Please see http://en.opensuse.org/openSUSE:Specfile_guidelines for details."; exit 1; fi; -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Tuesday 20 September 2011 22:51:16 Jan Engelhardt wrote:
On Tuesday 2011-09-20 13:37, Stephan Kulow wrote:
Well, the simple things should be integrated into the format_spec thingy - either based on the current perl script or a stripped down spec-cleaner.
That should work..
well, this way you would make probably 80+ % of the specfiles in factory fail to pass the normal checks. Wouln'd it make more sense for at least the one-liner things below to fix it automatically in the spec-file formatter ? I'm simply afraid if we make all packages fail this way, developers will simply be annoyed and start ignoring/workarounding these checks instead of just fixing the specfile (which we could do automatically anyway). I'm completely fine with such a script for the more questionable places like the "Authors" or "jobs" tasks, but on the other hand if we don't plan to fail these, I guess this could just as well live inside rpmlint, AFAIR it has some tests that run on the specfile anyway.
## /usr/lib/osc/source_validators/10-the-way-of-the-dodo #!/bin/bash
DIR_TO_CHECK="$1" if [[ -z "$DIR_TO_CHECK" ]]; then DIR_TO_CHECK="$PWD"; fi; for i in "$DIR_TO_CHECK"/*.spec; do if [[ ! -f "$i" ]]; then continue; fi; if pcregrep -iq '^autoreqprov\s*:\s*(?!off)(?!no)' "$i"; then echo "*** $i: Undesired AutoReqProv tag"; fail=1; fi; if pcregrep -iq '^#\*snorootforbuild' "$i"; then echo "*** $i: Undesired norootforbuild tag"; fail=1; fi; if pcregrep -iq '^#\*suseforbuild' "$i"; then echo "*** $i: Undesired useforbuild tag"; fail=1; fi; if pcregrep -iq '^Author(\(?s\))?:?' "$i"; then echo "*** $i: Author list no longer desired"; # don't fail, could be false positive fi; if pcregrep -q '^%clean\b' "$i"; then echo "*** $i: %clean section no longer required"; fail=1; fi; if pcregrep -q '%{\?jobs:\s*-j\s*%{?jobs}?}' "$i"; then echo "*** $i: Consider replacing %{?jobs:-j%jobs} by %{?_smp_mflags} if possible."; # Don't fail; things like scons can also be told the number of # jobs, but naturally, scons does not know make's other options. fi; done; if [[ "$fail" -ne "" ]]; then echo "*** Please see http://en.opensuse.org/openSUSE:Specfile_guidelines for details."; exit 1; fi;
-- with kind regards (mit freundlichem Grinsen), Ruediger Oertel (ro@suse.com,ro@suse.de,bugfinder@t-online.de) GPG Key fingerprint = 17DC 6553 86A7 384B 53C5 CA5C 3CE4 F2E7 23F2 B417 -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Am Mittwoch, 21. September 2011, 14:03:33 schrieb Ruediger Oertel:
On Tuesday 20 September 2011 22:51:16 Jan Engelhardt wrote:
On Tuesday 2011-09-20 13:37, Stephan Kulow wrote:
Well, the simple things should be integrated into the format_spec thingy - either based on the current perl script or a stripped down spec-cleaner.
That should work..
well, this way you would make probably 80+ % of the specfiles in factory fail to pass the normal checks. Wouln'd it make more sense for at least the one-liner things below to fix it automatically in the spec-file formatter ?
Or we could just warn in first step without aborting. So users of osc would see it (and we could turn this into an error later on).
I'm simply afraid if we make all packages fail this way, developers will simply be annoyed and start ignoring/workarounding these checks instead of just fixing the specfile (which we could do automatically anyway).
I'm completely fine with such a script for the more questionable places like the "Authors" or "jobs" tasks, but on the other hand if we don't plan to fail these, I guess this could just as well live inside rpmlint, AFAIR it has some tests that run on the specfile anyway.
IMHO such thing are better handled in source-validator so there is no need to re-run entire builds just to fix it.
## /usr/lib/osc/source_validators/10-the-way-of-the-dodo #!/bin/bash
DIR_TO_CHECK="$1" if [[ -z "$DIR_TO_CHECK" ]]; then
DIR_TO_CHECK="$PWD";
fi; for i in "$DIR_TO_CHECK"/*.spec; do
if [[ ! -f "$i" ]]; then
continue;
fi; if pcregrep -iq '^autoreqprov\s*:\s*(?!off)(?!no)' "$i"; then
echo "*** $i: Undesired AutoReqProv tag"; fail=1;
fi; if pcregrep -iq '^#\*snorootforbuild' "$i"; then
echo "*** $i: Undesired norootforbuild tag"; fail=1;
fi; if pcregrep -iq '^#\*suseforbuild' "$i"; then
echo "*** $i: Undesired useforbuild tag"; fail=1;
fi; if pcregrep -iq '^Author(\(?s\))?:?' "$i"; then
echo "*** $i: Author list no longer desired"; # don't fail, could be false positive
fi; if pcregrep -q '^%clean\b' "$i"; then
echo "*** $i: %clean section no longer required"; fail=1;
fi; if pcregrep -q '%{\?jobs:\s*-j\s*%{?jobs}?}' "$i"; then
echo "*** $i: Consider replacing %{?jobs:-j%jobs} by %{?_smp_mflags} if possible."; # Don't fail; things like scons can also be told the number of # jobs, but naturally, scons does not know make's other options.
fi;
done; if [[ "$fail" -ne "" ]]; then
echo "*** Please see http://en.opensuse.org/openSUSE:Specfile_guidelines for details."; exit 1;
fi;h -- Adrian Schroeter SUSE Linux Products GmbH email: adrian@suse.de
On Wednesday 2011-09-21 14:03, Ruediger Oertel wrote:
On Tuesday 20 September 2011 22:51:16 Jan Engelhardt wrote:
On Tuesday 2011-09-20 13:37, Stephan Kulow wrote:
Well, the simple things should be integrated into the format_spec thingy - either based on the current perl script or a stripped down spec-cleaner.
That should work..
well, this way you would make probably 80+ % of the specfiles in factory fail to pass the normal checks. Wouln'd it make more sense for at least the one-liner things below to fix it automatically in the spec-file formatter ?
That osc validator script was not really meant to be serious. :)
I'm simply afraid if we make all packages fail this way, developers will simply be annoyed and start ignoring/workarounding these checks instead of just fixing the specfile (which we could do automatically anyway).
I don't quite like force without interactivity, so I shall be updating spec-beautifier to provide a nice solution to that. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Monday 19 September 2011 02:44:36 Jan Engelhardt wrote:
vuntz mentioned it might be good to inform people, though I doubt anyone is going to read this..
As you may have noticed I am going through all factory packages to implement a few of the specfile guidelines[1] in semi-automated fashion, among them the following subtasks:
Thanks for the effort, this should really help new packagers that look for spec file examples. It's good to see that we actually start to honor our guidelines. As for the Factory submit requests, I don't mind the extra load but let's respect coolo's effort to get a stable 12.1 :-) -- Mit freundlichen Grüßen, Sascha Peilicke
participants (14)
-
Adrian Schröter
-
Jan Engelhardt
-
Juergen Weigert
-
Malcolm
-
Marcus Meissner
-
Ralf Haferkamp
-
Ralf Lang
-
Robert Schweikert
-
Ruediger Oertel
-
Sascha Peilicke
-
Stephan Kulow
-
Takashi Iwai
-
Vincent Untz
-
Wolfgang Rosenauer