[opensuse-packaging] Request for testcases on spec-cleaner
Hello guys, Now for something completely different apart from my previous mail. As part of the hackweek efforts we in openSUSE Team are going to have next week I plan to work forward on spec-cleaner tool that is intended to be superset of the prepare_spec perl magic with something more readable and with testcases. [1] So what I would need is if you could take it on your specs and if it screw up (like for sure it will in its current state) write out start -> desired output files so I can convert it to testsuite and have it checked. There are currently known bugs for sure. Just grep for FIXME in the spec_cleaner subdir to get some picture, also there are few failing tests which already verify for something that it is doing poorly/uttery wrong. Overall one of biggest problems you can see with your specs now is that if you use %if... in your preamble it gets matched poorly and breaks ordering of that section. But when we tried it on mysql.spec it coped quite well and trivial specs are already parsed decently well. In the end really if you could try to run it (after git clone just run "python repo/spec_cleaner/__init__py myspec.spec -o output.spec") and report with issues here as reply or on github. TIA Tom [1] http://github.com/openSUSE/spec-cleaner/
Hello, Am Donnerstag, 21. November 2013 schrieb Tomáš Chvátal:
As part of the hackweek efforts we in openSUSE Team are going to have next week I plan to work forward on spec-cleaner tool that is intended to be superset of the prepare_spec perl magic with something more readable and with testcases. [1]
So what I would need is if you could take it on your specs and if it screw up (like for sure it will in its current state) write out start -> desired output files so I can convert it to testsuite and have it checked.
You asked for it... ;-) I just tested with security:apparmor apparmor.spec, and the result looks interesting[tm]. I'm quite sure you can make some testcases from it ;-) Some examples: - Requires: perl(DBD::SQLite) -> Requires: perl(DBD Requires: SQLite) It should be obvious what is wrong ;-) - %makeinstall -C utils -> make DESTDIR=%{buildroot} install %{?_smp_mflags} Are you really serious about not using %makeinstall? IMHO DESTDIR=... just adds noise to the spec. - rm -fv %{buildroot}%{_libdir}/libapparmor.la %{buildroot}%{_libdir}/libimmunix.la -> find %{buildroot} -type f -name "*.la" -delete -print The original code removes only two *.la files, not all. (I'd have to check if there are other *.la files, but the point is that spec-cleaner changes the behaviour.) - %dir %attr(-, root, root) %{_sysconfdir}/apparmor -> %dir %attr(-, Already known as https://bugzilla.novell.com/show_bug.cgi?id=734920 That are the most important issues I noticed. spec-cleaner does many more changes, so I'd like to ask you to check the changes it does to apparmor.spec yourself. Many changes are OK, but I'm quite sure there are also some not-so-good changes that I didn't mention above. That all said - enjoy the hackweek! Regards, Christian Boltz --
Antwort: AW: Antwort: AW: Antwort: AW: Arrgl ... <mit Schaum vor dem Mund nach hinten umkipp> [Martin Wilhelm Leidig in suse-linux]
-- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Dne Čt 21. listopadu 2013 21:23:17, Christian Boltz napsal(a):
Hello,
I just tested with security:apparmor apparmor.spec, and the result looks interesting[tm]. I'm quite sure you can make some testcases from it ;-)
Some examples:
- Requires: perl(DBD::SQLite) -> Requires: perl(DBD Requires: SQLite) It should be obvious what is wrong ;-)
Yup will convert to testcase, on that note i should probably put there the tex deps too.
- %makeinstall -C utils -> make DESTDIR=%{buildroot} install %{?_smp_mflags} Are you really serious about not using %makeinstall? IMHO DESTDIR=... just adds noise to the spec.
%makeinstall is horrid thing that needed to die 5 years ago :) What I would love to is to use %make_install macro but then people complain that it was introduced in 11.4 or 12.1 and so it is too new (christ we need easy way how to move macros in obs from newer version if they do not alter behaviour and just be done with it :)) ^ This apply also for other macros like %cmake and many on. Because if bug for something is in macro, we adjust it once, but if each package is spawned with own command good luck with that. Perfect example is the issue before, if we had macro like %prune_la life would be lovely :)
- rm -fv %{buildroot}%{_libdir}/libapparmor.la %{buildroot}%{_libdir}/libimmunix.la -> find %{buildroot} -type f -name "*.la" -delete -print
Aha that is bug it should only prune those that use * there. Well honestly we don't want la files anyway so it won't do harm. Only package I was ever aware of using libtool archives for modules loading is imagemagick or something like that. If the filelist is still happy I would say we are covered.
- %dir %attr(-, root, root) %{_sysconfdir}/apparmor -> %dir %attr(-, Already known as https://bugzilla.novell.com/show_bug.cgi?id=734920
Hmm was not aware of the bug but seen the behaviour myself :) So I already have testcase in place there something like installargs it is called :)
That are the most important issues I noticed. spec-cleaner does many more changes, so I'd like to ask you to check the changes it does to apparmor.spec yourself. Many changes are OK, but I'm quite sure there are also some not-so-good changes that I didn't mention above.
I will test it for sure, I so far tried with Michal on libreoffice mysql and few libs from there and it at least built which is certain improvement. So I will for sure try to convert it to tests. If you try it somewhere else and find it failing somewhere that it aint covered yet just really reply here again or open issue on github.
That all said - enjoy the hackweek!
Thanks Tom
On Thursday 2013-11-21 21:23, Christian Boltz wrote:
- %makeinstall -C utils -> make DESTDIR=%{buildroot} install %{?_smp_mflags} Are you really serious about not using %makeinstall? IMHO DESTDIR=... just adds noise to the spec.
It does not currently do that (but it should). Are you on an old version?
- rm -fv %{buildroot}%{_libdir}/libapparmor.la %{buildroot}%{_libdir}/libimmunix.la -> find %{buildroot} -type f -name "*.la" -delete -print
Does it really do that? Then that is a bug. Killing .la files in all of %buildroot is _wrong_. They may at most be removed from directories that the runtime linker (ld.so) searches by default. I see my spec-cleaner proposed changes still were not merged. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Dne Pá 22. listopadu 2013 04:50:44, Jan Engelhardt napsal(a):
On Thursday 2013-11-21 21:23, Christian Boltz wrote:
- %makeinstall -C utils -> make DESTDIR=%{buildroot} install %{?_smp_mflags}> Are you really serious about not using %makeinstall? IMHO DESTDIR=... just adds noise to the spec.
It does not currently do that (but it should). Are you on an old version?
Oh but it does on latest version, dunno what git you use.
- rm -fv %{buildroot}%{_libdir}/libapparmor.la %{buildroot}%{_libdir}/libimmunix.la> -> find %{buildroot} -type f -name "*.la" -delete -print
Does it really do that? Then that is a bug.
Killing .la files in all of %buildroot is _wrong_. They may at most be removed from directories that the runtime linker (ld.so) searches by default.
As I said, it is a bug but quite harmless one as I explained the only known package to use them properly is the imagemagick. I will still write test for it. Basically apart from imagemagic the only thing that should provide .la files on your system is gcc.
I see my spec-cleaner proposed changes still were not merged.
Because, 1 you were obviously unable to use github to create request and, 2 I implemented in meantime different approach for your prolbem. So if you think something is lacking just create the pull and I will gladly review/merge it. Tom
On Friday 2013-11-22 09:23, Tomáš Chvátal wrote:
Dne Pá 22. listopadu 2013 04:50:44, Jan Engelhardt napsal(a):
On Thursday 2013-11-21 21:23, Christian Boltz wrote:
- %makeinstall -C utils -> make DESTDIR=%{buildroot} install %{?_smp_mflags}> Are you really serious about not using %makeinstall? IMHO DESTDIR=... just adds noise to the spec.
It does not currently do that (but it should). Are you on an old version?
Oh but it does on latest version, dunno what git you use.
3399f4e7fff8b319f1f5451b7979775689757d32. I gave it xterm.spec which has a %makeinstall, and running `./spec-cleaner xterm.spec` fails to replace it.
- rm -fv %{buildroot}%{_libdir}/libapparmor.la %{buildroot}%{_libdir}/libimmunix.la> -> find %{buildroot} -type f -name "*.la" -delete -print
Does it really do that? Then that is a bug.
Killing .la files in all of %buildroot is _wrong_. They may at most be removed from directories that the runtime linker (ld.so) searches by default.
As I said, it is a bug but quite harmless one as I explained the only known package to use them properly is the imagemagick. I will still write test for it.
Basically apart from imagemagic the only thing that should provide .la files on your system is gcc.
Nope. la files should be provided, like I said, whenever libraries (not plugins though) are out of a standard dir. That is indeed not common, but it can happen. When libtool finds a .la file, it will add the -rpath which is required for a program to find the .so file again (if ld.so can't already).
I see my spec-cleaner proposed changes still were not merged.
Because, 1 you were obviously unable to use github to create request
git is all about distributedness, I do not have to use github for a technical reason. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (3)
-
Christian Boltz
-
Jan Engelhardt
-
Tomáš Chvátal