[opensuse-factory] spec-cleaner to replace obs-service-format_spec_file extensive testing needed
Hello everybody, As per $SUBJ we are trying to phase out the obs-service- format_spec_file which has a lots of bugs on complex packages (huge preamble definitions). Ie. binutils have to keep hacks to actually pass the format_spec_file run. For this and because spec-cleaner itself is quite extensive on the work it does we introduced minimal mode "-m" [1]. In this mode it should be quite compatible on what it does on the format_spec_file. The minimal run of the spec-cleaner is just subset of the regular one and there should be no diff produced on packages already parsed by the regular run. To provide some examples see attached packages and diff produced for them. Gcc5, postgresql9.4, and xteddy are used as samples. As you can see on the diffs we create large change on header ordering which is equal to the full run of spec-cleaner apart from some fixmes. The reason is techincal where I store it based on identification to different buffers and then print out the buffers in pre-determined order. format_spec_file tries to do this too, but was always buggy so that's why spec-cleaner does bigger job there as it needed to identify and understand all sections. Alternative to this is to abolish the sort order in the minimal run completely and that would be quite unfortunate and we should try to avoid that even at a price of larger diff on the first run. The other huge changeset is curlification, adding the curly bracket around variables {}. I am now figuring out best way how to deal with that because more internal stuff works on premise that everything is curlified per the spec-cleaner actions. If you find any bugs or you think something intrusive should be too disabled on the minimal spec-cleaner run feel free to comment on [1] or report new bugs. Also I would like to ask you all testing it to not just report bugs on github, but even spent a bit of time to provide testsuite updates per [2]. The more problems we cover the better the automatic cleaning can get. Also please do not report the issues here on mailinglist but go to the github and keep the discussions there if possible. Cheers Tom [1] https://github.com/openSUSE/spec-cleaner/issues/76 [2] https://github.com/openSUSE/spec-cleaner/blob/master/TESTSUITE.md
On Wednesday 2016-02-10 12:20, Tomas Chvatal wrote:
As per $SUBJ we are trying to phase out the obs-service- format_spec_file.
The other huge changeset is curlification, adding the curly bracket around variables {}. I am now figuring out best way how to deal with that because more internal stuff works on premise that everything is curlified per the spec-cleaner actions.
All you really need is to drop the curlies at the end of the run. spec-beautifier does the same - to first curlify everything, then run all the regexes over it (because ${foo} is much easier to match than any case of $foo), and then remove them again where permitted by syntax. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Tomas Chvatal
-# We don't want to build java -%ifarch mips -%define build_java 0 -%define build_libjava 0 -%else -%define build_java 1 -%define build_libjava 0%{?building_libjava:1}%{?building_libffi:1}%{?building_testsuite:1} -%endif - %define build_cp 1 %define build_fortran !0%{?building_libjava:1}%{?building_libffi:1} %define build_objc !0%{?building_libjava:1}%{?building_libffi:1} %define build_objcp !0%{?building_libjava:1}%{?building_libffi:1} %define build_go !0%{?building_libjava:1}%{?building_libffi:1} - -%if %{build_objcp} -%define build_cp 1 -%define build_objc 1 -%endif - -%if %{build_libjava} -%define build_cp 1 -%endif - -# For optional compilers only build C, C++, Fortran, Ada and Go -%if 0%{?build_optional_compiler_languages:1} -%define build_java 0 -%define build_libjava 0 -%define build_objc 0 -%define build_objcp 0 -%endif
Moving related build_foo macro definitions far apart from each others makes it harder to grok the specfile.
-%define separate_bi32 0 -%define separate_bi64 0 %ifarch ppc sparcv9 # Beware, this does _not_ separate libgcj, as for that one multilibing # is inactive for the time being @@ -210,9 +165,6 @@ %ifarch x86_64 s390x ppc64 sparc64 %define separate_bi32 1 %endif - -# Define two macros to trigger -32bit or -64bit package variants -%define separate_biarch 0 %if %{separate_bi32} %define separate_biarch 1 %define separate_biarch_suffix -32bit @@ -221,64 +173,20 @@ %define separate_biarch 1 %define separate_biarch_suffix -64bit %endif
Similarily, separating the default definition for a macro from its arch-specific redefinition is also not nice, especially since the comment is moved away as well.
+#testpatch end +Summary: The GNU C Compiler and Support Files +License: GPL-3.0+ +Group: Development/Languages/C and C++ +Url: http://gcc.gnu.org/ Source: gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2 Source1: change_spec Source2: libffi-gcc5-rpmlintrc @@ -287,9 +195,7 @@ Source5: README.First-for.SuSE.packagers Source6: baselibs.conf Source7: libgcj-gcc5-rpmlintrc - #testpatch begin - Patch1: gcc-dir-version.patch Patch2: gcc-add-defaultsspec.diff Patch3: Wunprototyped-calls.diff @@ -308,12 +214,80 @@ Patch61: gcc44-rename-info-files.patch # Some libgo patches Patch70: gcc5-libgo-fix-certificates-lookup.patch - -#testpatch end
Moving the comment will probably break some scripts. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
As per $SUBJ we are trying to phase out the obs-service- format_spec_file which has a lots of bugs on complex packages (huge preamble definitions). Ie. binutils have to keep hacks to actually pass the format_spec_file run. I'm interested, what does obs-service-format_spec_file actually do wrong. It changes the date in the opensuse header, and minor changes to
On 10/02/2016 13:20, Tomas Chvatal wrote: the ordering of the spec. Your package on the other hand prevented me from getting blender to factory with it's %ifarch conditional intact and commanded me to use the %cmake macro. I use spec cleaner once on new spec files when I wish, I don't want something a radical as spec cleaner touching my spec files on checkin without any warning. Dave Plater -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Dave Plater píše v St 10. 02. 2016 v 20:37 +0200:
As per $SUBJ we are trying to phase out the obs-service- format_spec_file which has a lots of bugs on complex packages (huge preamble definitions). Ie. binutils have to keep hacks to actually pass the format_spec_file run. I'm interested, what does obs-service-format_spec_file actually do wrong. It changes the date in the opensuse header, and minor changes to
On 10/02/2016 13:20, Tomas Chvatal wrote: the ordering of the spec. Your package on the other hand prevented me from getting blender to factory with it's %ifarch conditional intact and commanded me to use the %cmake macro. I use spec cleaner once on new spec files when I wish, I don't want something a radical as spec cleaner touching my spec files on checkin without any warning.
Dave that is the key for the minimal mode. It does not add those fixmes and most of the intrusive changes. It breaks too often on parsing the header. In the bug mentioned in previous mail you have checklist of what format_spec_file tries to do. Cheers Tom
On 10/02/2016 21:17, Tomas Chvatal wrote:
Dave Plater píše v St 10. 02. 2016 v 20:37 +0200:
On 10/02/2016 13:20, Tomas Chvatal wrote:
As per $SUBJ we are trying to phase out the obs-service- format_spec_file which has a lots of bugs on complex packages (huge preamble definitions). Ie. binutils have to keep hacks to actually pass the format_spec_file run. I'm interested, what does obs-service-format_spec_file actually do wrong. It changes the date in the opensuse header, and minor changes to the ordering of the spec. Your package on the other hand prevented me from getting blender to factory with it's %ifarch conditional intact and commanded me to use the %cmake macro. I use spec cleaner once on new spec files when I wish, I don't want something a radical as spec cleaner touching my spec files on checkin without any warning.
Dave that is the key for the minimal mode. It does not add those fixmes and most of the intrusive changes.
It breaks too often on parsing the header. In the bug mentioned in previous mail you have checklist of what format_spec_file tries to do.
Cheers
Tom
A bit of positive feedback, I created a new package today from a PCLinuxOS src rpm and spec cleaner helped speed up the process. Regards Dave P -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Wed, 10 Feb 2016, Dave Plater wrote:
As per $SUBJ we are trying to phase out the obs-service- format_spec_file which has a lots of bugs on complex packages (huge preamble definitions). Ie. binutils have to keep hacks to actually pass the format_spec_file run. I'm interested, what does obs-service-format_spec_file actually do wrong. It changes the date in the opensuse header, and minor changes to the ordering of
On 10/02/2016 13:20, Tomas Chvatal wrote: the spec. Your package on the other hand prevented me from getting blender to factory with it's %ifarch conditional intact and commanded me to use the %cmake macro. I use spec cleaner once on new spec files when I wish, I don't want something a radical as spec cleaner touching my spec files on checkin without any warning.
Seconded. In the past this only caused breakage and difficulty to recover to a working state. Please leave this to a manual process. Richard. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Richard Biener píše v Čt 11. 02. 2016 v 09:08 +0100:
On Wed, 10 Feb 2016, Dave Plater wrote:
As per $SUBJ we are trying to phase out the obs-service- format_spec_file which has a lots of bugs on complex packages (huge preamble definitions). Ie. binutils have to keep hacks to actually pass the format_spec_file run. I'm interested, what does obs-service-format_spec_file actually do wrong. It changes the date in the opensuse header, and minor changes to the ordering of
On 10/02/2016 13:20, Tomas Chvatal wrote: the spec. Your package on the other hand prevented me from getting blender to factory with it's %ifarch conditional intact and commanded me to use the %cmake macro. I use spec cleaner once on new spec files when I wish, I don't want something a radical as spec cleaner touching my spec files on checkin without any warning.
Seconded. In the past this only caused breakage and difficulty to recover to a working state.
Please leave this to a manual process.
Richard.
As I told in a first email. It is to be minimal mode that does not do most of the stuff the regular does. Anyway could you please point me to some bugreport or open a bugreport about breakages it caused in a full run? We are very keen on fixing those. Cheers Tom
Hello, Bunch of bugs were fixed. Now the postgresql94 changeset looks exactly as desired (this is git state not the 0.7.7 that is in Tumbleweed). Andreas your point aboug gcc are not all yet integrated. But would you mind creating some minimal case about how it should behave? Cheers Tom
On Friday 2016-02-12 19:42, Tomas Chvatal wrote:
Bunch of bugs were fixed. Now the postgresql94 changeset looks exactly as desired (this is git state not the 0.7.7 that is in Tumbleweed).
Normally you don't want to edit the %description and hunt for strings which look like directories.
--- postgresql94.spec 2016-02-12 19:29:32.066550175 +0100 +++ postgresql94.minimal.spec 2016-02-12 19:38:25.194956608 +0100 @@ -239,15 +233,15 @@ officially part of the PostgreSQL core.
Documentation for the modules contained in this package can be found in -/usr/share/doc/packages/postgresql/contrib. +%{_docdir}/postgresql/contrib.
-mkdir -p %buildroot/etc/alternatives +mkdir -p %buildroot%{_sysconfdir}/alternatives Somehow this would look better if it had an extra slash in there (%buildroot/%_sysconfdir/alternatives) -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Am 13.02.2016 um 16:55 schrieb Jan Engelhardt:
Documentation for the modules contained in this package can be found in -/usr/share/doc/packages/postgresql/contrib. +%{_docdir}/postgresql/contrib.
-mkdir -p %buildroot/etc/alternatives +mkdir -p %buildroot%{_sysconfdir}/alternatives
These are the exact reasons I'm detesting these automatic "fixes". Holy crap. Does anyone out there really build with %_sysconfdir not being /etc? If yes, they deserve to suffer. But do not make *my* specfiles unreadable and untypable by replacing it with %{_sysconfdir}. I would (not happily, but still) go with %etc (no curly brackets), but not that long and impossible to type %{_sysconfdir}. -- Stefan Seyfried "For a successful technology, reality must take precedence over public relations, for nature cannot be fooled." -- Richard Feynman -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Sun, 14 Feb 2016 13:05, Stefan Seyfried
Am 13.02.2016 um 16:55 schrieb Jan Engelhardt:
Documentation for the modules contained in this package can be found in -/usr/share/doc/packages/postgresql/contrib. +%{_docdir}/postgresql/contrib.
-mkdir -p %buildroot/etc/alternatives +mkdir -p %buildroot%{_sysconfdir}/alternatives
These are the exact reasons I'm detesting these automatic "fixes".
Holy crap. Does anyone out there really build with %_sysconfdir not being /etc? If yes, they deserve to suffer. But do not make *my* specfiles unreadable and untypable by replacing it with %{_sysconfdir}.
I would (not happily, but still) go with %etc (no curly brackets), but not that long and impossible to type %{_sysconfdir}.
For testing conflicting packages, I'm setting (in my @home obs instance) %_sysconfdir to either "/usr/local/etc" or "/opt/etc" depending on the software. IMHO %_sysconfdir and consorts are very helpful in isolating bad / new stuff during testing in a near normal system, without going the full hoops of a fully installed virtual system setup. I'm catching more uglies that way. YMMV, but for me it's very nice to have. Have a nice sunday - Yamaban. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
YMMV, but for me it's very nice to have.
Yes, but the name of it is suboptimal. It's confusing, for example, to write %{_sysconfdir}/sysconfig. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Tuesday 2016-02-16 09:04, Nathan Cutler wrote:
YMMV, but for me it's very nice to have.
Yes, but the name of it is suboptimal. It's confusing, for example, to write %{_sysconfdir}/sysconfig.
But that is a problem of whoever came up with /etc/sysconfig in the first place, because /etc itself was called sysconfdir for a lot longer if I am not mistaken. (./configure has --sysconfdir=). -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Nathan Cutler wrote:
YMMV, but for me it's very nice to have.
Yes, but the name of it is suboptimal.
I guess the name is derived from autoconf option: --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
It's confusing, for example, to write %{_sysconfdir}/sysconfig.
Whatever name is chosen there will always be such a confusion with some other path name. CIao, Michael.
Jan Engelhardt
Somehow this would look better if it had an extra slash in there (%buildroot/%_sysconfdir/alternatives)
%_sysconfdir already starts with a slash. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Monday 2016-02-15 10:33, Andreas Schwab wrote:
Jan Engelhardt
writes: Somehow this would look better if it had an extra slash in there (%buildroot/%_sysconfdir/alternatives)
%_sysconfdir already starts with a slash.
I know that. Hence "look better", not "work better" -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Hello, On Feb 15 10:33 Andreas Schwab wrote:
Jan Engelhardt
writes: Somehow this would look better if it had an extra slash in there (%buildroot/%_sysconfdir/alternatives)
%_sysconfdir already starts with a slash.
Hereby I strongly reqest to let any build horribly crash with a terribly error message wheneverr therre is a path detected that contains two or morre consecutive slash charracterrs! Such bad style mussst be forrrbiddden! Regarrrds frrrom overrrcorrrect Gerrrmany! ;-) Johannes Meixner -- SUSE LINUX GmbH - GF: Felix Imendoerffer, Jane Smithard, Graham Norton - HRB 21284 (AG Nuernberg) -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
participants (10)
-
Andreas Schwab
-
Dave Plater
-
Jan Engelhardt
-
Johannes Meixner
-
Michael Ströder
-
Nathan Cutler
-
Richard Biener
-
Stefan Seyfried
-
Tomas Chvatal
-
Yamaban