[Fedora-packaging] %check script issues

Marius Feraru altblue at n0i.net
Sun Jun 26 22:59:00 UTC 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


hello folks.

Current Packaging Guidelines [1] don't say anything about the 
%check script, so the only source of _documentation_ for now is the mere 
paragraph from Maximum RPM [2] which states:
"
   This script's primary function is to run the test suite of the built
   software to ensure that the binaries work correctly. Some typical
   commands to run in this script are make test or make check.
"

Ok, nothing new for now, but there is one footnote [3] there:
"
   One popular hack to make spec files containing the %check script
   work with RPM versions older than 4.2 roughly similarly as in newer
   versions is to include it immediately after the %install script in the
   spec file and append '|| :' to it, like:
   %check || :
"

Fedora Extras team (seeing provided template specs from fedora-rpmdevtools)
and everybody in fact (reviewing prior discussions on the various Fedora 
related channels - mailing list, websites) seems to agree on this and 
already started using this procedure on some of the current packages in 
Fedora Core/Extras.

The hack suggested in [3] ("%check || :" _after_ %install) and the 
testing done determined that this %check is done after %install (sort of 
"%__spec_install_post").

So, here come my issues:
a) Maybe I really don't get it (reading [2] again and again), but it 
seems more appropiate to append this %check to %build (or even prepend 
it to %install), but I see no point for doing it _after_ %install.
b) What is the "easy" way to disable %check? "--define 'check exit 0'" 
doesn't sound as "easy" as e.g. "--without check".

Ok, b) is more like a rant or something, but a) bothers me a lot. Before 
knowing about this %check, I was adding a %{!?_without_test:make test}
to the %build script and this seems good enough for me. Why should I 
"upgrade" to using this %check script?

TIA.

References:
[1] http://fedoraproject.org/wiki/PackagingGuidelines
[2] http://rpm.org/max-rpm-snapshot/s1-rpm-inside-scripts.html
[3] http://rpm.org/max-rpm-snapshot/s1-rpm-inside-scripts.html#FTN.AEN8053

- -- 
Marius Feraru                                   http://www.altblue.com/
"It isn't easy being the parent of a three-years-old.
  However, it's a pretty small price to pay for having somebody
  around the house who understands computers."
-----BEGIN PGP SIGNATURE-----

iD8DBQFCvzM3n0ZKufYp8iURAgwbAJ9vq/rGlUqL/iO+wOmtcqmg0F6uiACfTGFm
4v5UcwUaSoVvhiJtDq7FUUA=
=3s5Z
-----END PGP SIGNATURE-----




More information about the Fedora-packaging mailing list