This post is very old; Ive had it sitting as a draft for ages.
rpmlint is a tool for checking common errors in rpm packages. It can be used to test individual packages and spec files before uploading or to check an entire distribution. By default all applicable checks are processed but specific checks can be performed by using command line parameters.
I love man pages; they always have the best descriptions. rpmlint is one of the most sensitive tools I’ve ever used on Linux. One little thing and it warns you even if its commented out. In the users perspective that’s a good thing since it sort of forces developers to create better installation scripts; however developing an RPM to get warnings for some pretty useless things gets not necessarily frustrating but really annoying.
Ive built 3 RPM packages recently:
- Installation of a yum repository (special thanks to rpmfusion)
- 64-bit Firefox nightly
- 32-bit Firefox nightly
The amount of time i spent on making these RPMs was actually fairly short considering the emo tools that have to be used to validate them. Both Firefox nightly RPMs are the same (save for the source tar ball).
Mock is a simple program that will build source RPMs inside a chroot.
It doesn’t do anything terribly fancy other than populate a chroot with
the contents specified by a configuration file, then build any input
SRPM(s) in that chroot.
I haven’t worked with Mock too much however from what i can tell so far; it is a fairly strong tool however just as annoying as rpmlint if not more. The tool just compiles a program with the default packages just like the description above says however what it doesn’t tell you is that it also checks for really small things such as the use of wild cards.
Now lets see how mock works; you must build a package and its source RPM (rpmbuild -ba ~/rpmbuild/SPECS/file.spec) and then run mock for a preferred operating system (mock -r fedora-13-x86_64 ~/rpmbuild/SRPS/file.src.rpm) then see the output for any errors; Heres the kicker; for you to create a source RPM the package must build correctly; therefore you assume that everything is fine minus any non-default packages.
File not found by glob: /builddir/build/BUILDROOT/minefield-4.0b8pre-1.fc14.x86_64/usr/lib64/minefield-4.0b8pre/*
I got this error every time i used mock; I tried to fix it about a dozen times and i just couldn’t figure out where this issue was in the spec file. After a couple frustrating hours i figured out that it was the wild card being used in the %files section of the spec file.
After fixing that ridiculous issues; mock successfully completes; but just because it completes doesn’t mean everything works; you now have to comb through a log file and attempt to spot any errors.



