Hi all, based on Johannes' ideas and performance specification [1] I've written a simple utility, called portverify, to check CRUX ports for typical errors. It's a shell script which calls gawk with a bunch of small scripts, each of them containing one or more tests. Following test are implemented yet: - port - missing files Pkgfile/.footprint/.md5sum - Pkgfile - existence of name/version/release/source variables - match of portname to name variable - wrong release number - cd/rm command outside the work directory - .footprint - world writable files/directories - junk files like perllocal.pod - invalid directories like /usr/info - invalid users - files not owned by root - SUID/SGID files To use the utility call it with one ore more ports like: portverify /usr/ports/{core,opt}/* All test are categorized into 4 levels, from FATAL to INFO, which can be used to adjust the output of portverify, see the help message for more information. For now portverify is available from a darcs repository [2] or as an CRUX package [3]. To do: - missing stuff from [1] - more test ? - improve shell script - man-page - other ideas ? Contributions and any kind of feedback are highly appreciated. kind regards Jürgen [1] http://crux.nu/Main/WantedTools [2] darcs get http://jue.ods.org/repos/portverify [3] http://jue.ods.org/files/portverify%230.1.2.pkg.tar.gz -- Juergen Daubert | mailto:jue@jue.li Korb, Germany | http://jue.li/crux
Juergen Daubert wrote:
Hi all,
based on Johannes' ideas and performance specification [1] I've written a simple utility, called portverify, to check CRUX ports for typical errors. It's a shell script which calls gawk with a bunch of small scripts, each of them containing one or more tests.
Following test are implemented yet:
- port - missing files Pkgfile/.footprint/.md5sum - Pkgfile - existence of name/version/release/source variables - match of portname to name variable - wrong release number - cd/rm command outside the work directory - .footprint - world writable files/directories - junk files like perllocal.pod - invalid directories like /usr/info - invalid users - files not owned by root - SUID/SGID files
Pretty cool. As I read this at 7am with my eyes half open, I thought you were announcing "poverty," and I started to feel bad for you. Maybe we can call it poverty for short? -- Jay Dolan jdolan.dyndns.org A: Because it's difficult to read. Q: Why is top-posting bad? A: Top posting. Q: What's the most annoying thing about usenet?
Hi all, an updated version of portverify is available from [1], [2]. Besides some small fixes I've added a test for the Pkgfile headers Maintainer/Description/URL. Below a statistic for our core/opt/contrib ports. The first number is the count of error lines produced by portverify, the second the number of ports affected. core opt contrib --------------------------------------- FATAL 4 - 1 3 - 3 2087 - 9 ERROR 0 - 0 26 - 26 376 - 104 WARN 17 - 7 660 - 49 169 - 42 INFO 20 - 10 30 - 20 296 - 13 kind regards Jürgen [1] darcs get http://jue.ods.org/repos/portverify [2] http://jue.ods.org/files/portverify%230.1.4.pkg.tar.gz -- Juergen Daubert | mailto:jue@jue.li Korb, Germany | http://jue.li/crux
Juergen Daubert [2006-07-31 16:17]:
an updated version of portverify is available from [1], [2]. Besides some small fixes I've added a test for the Pkgfile headers Maintainer/Description/URL.
FYI, I had to change MODDIR to /usr/lib/portverify/ to get it to work. Regards, Tilman -- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail?
On Mon, Jul 31, 2006 at 07:36:36PM +0200, Tilman Sauerbeck wrote:
Juergen Daubert [2006-07-31 16:17]:
an updated version of portverify is available from [1], [2]. Besides some small fixes I've added a test for the Pkgfile headers Maintainer/Description/URL.
FYI, I had to change MODDIR to /usr/lib/portverify/ to get it to work.
Thanks, forgot to adjust that. Fixed now. Regards Jürgen -- Juergen Daubert | mailto:jue@jue.li Korb, Germany | http://jue.li/crux
Juergen Daubert [2006-07-24 18:57]:
- junk files like perllocal.pod
WARN core/autoconf ... junk file found: usr/share/autoconf/INSTALL WARN core/automake ... junk file found: usr/share/automake-1.9/COPYING WARN core/automake ... junk file found: usr/share/automake-1.9/INSTALL Maybe these should be put on a whitelist? These files are the templates that are copied to your working directory if you're setting up a new autotool-ed project. Regards, Tilman -- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail?
On Wed, Aug 02, 2006 at 12:32:18AM +0200, Tilman Sauerbeck wrote:
Juergen Daubert [2006-07-24 18:57]:
- junk files like perllocal.pod
WARN core/autoconf ... junk file found: usr/share/autoconf/INSTALL WARN core/automake ... junk file found: usr/share/automake-1.9/COPYING WARN core/automake ... junk file found: usr/share/automake-1.9/INSTALL
Maybe these should be put on a whitelist?
Thanks, good call, see [1]. I've added the FATAL warnings for core/filesystem to the whitelist as well. The implementation is a little bit lazy, because I simply compare the formatted output with the list entries, but should work for now. regards Jürgen [1] http://jue.ods.org/files/portverify%230.2.0.pkg.tar.gz -- Juergen Daubert | mailto:jue@jue.li Korb, Germany | http://jue.li/crux
Hi all, prtverify 0.4.0 is available now. Changes worth mentioning: - added test for file-conflicts with other ports - added test for missing dependencies - added test for invalid files/dirs within the port, patch by Johannes Winkelmann, thanks ! - added test for the mandatory comment-headers - renamed from portverify to prtverify For me prtverify seems to be feature-complete now, please test and report any problems and suggestion now. After that, prtverify will be included in our prt-utils. Thanks and kind regards Juergen [1] http://jue.ods.org/prtverify/prtverify%230.4.0-1.pkg.tar.gz [2] http://jue.ods.org/prtverify/prtverify.1.html -- Juergen Daubert | mailto:jue@jue.li Korb, Germany | http://jue.li/crux
participants (3)
-
Jay Dolan
-
Juergen Daubert
-
Tilman Sauerbeck