[Fedora-packaging] proposed "should" requirement: clean "make check" run w/valgrind

Jim Meyering meyering at redhat.com
Sat Nov 4 17:11:40 UTC 2006

Jesse Keating <jkeating at redhat.com> wrote:
> On Saturday 04 November 2006 09:38, Jim Meyering wrote:
>> Hey!  Maybe there *is* an easier way.
> So how would you write this up in the wiki to explain to reviewers and
> packagers?  Remember, the majority of our maintainers are just packagers, not
> necessarily developers.  This has to be really easy and simple to do, along
> the lines of rpmlint.

I can imagine a tool that'd take an RPM -- or even just a tarball where
"configure && make" works -- build (maybe with CFLAGS=-g for better stack
traces), and use a heuristic to identify the just-built binaries (e.g.,
find+file so it doesn't depend on whether the package uses automake).
Then it would move each binary into a "."-relative temporary subdir and
put the wrapper script in its place.  Finally, it'd run "make check" or
"make test", and search the valgrind log for warnings and errors.

Given such a tool, the wiki instructions would be simply:

Run this command:

  vg-rpm your-package.rpm

If it reports any errors, or memory or file-descriptor leaks, try to
determine whether they originate in your package.  Errors may originate
in a library used by your package, in which case you should append a
valgrind suppression[*] to some well-known file that is already included
in your package.  If you don't have such a file yet, add it, and ensure
that it becomes part of the RPM.  Of course, you should also inform the
upstream library maintainer of the problem and see if they can fix it.

[*] not hard, but would require instructions.

More information about the Fedora-packaging mailing list