pkg-plist, +CONTENTS, make package, and the ports cluster
Jon Passki
jon.passki at hursk.com
Sun Jan 28 23:52:43 UTC 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
Ports such as mysql-server, apache22 and many others I've noticed
have a disconnect between pkg-plist entries and what actually gets
installed. Some especially annoying components missed are etc/rc.d
scripts or in the case of gettext, a library file. In the short term
I was going to create a PR for some of these ports. My major
assumption, with variables enumerated, a +CONTENTS file should be a
subset of a pkg-plist file. With this, my basic approach was to diff
the +CONTENTS file from the build system and the +CONTENTS file from
the install via pkg_add system (ignoring comments, sample output
below). Should these files be the same? When would they not be
(again, stripping comments)? This output could be used to check the
pkg-plist file, accepting that variables in the pkg-plist will need
to be enumerated. Is this a decent method?
In the long term, would this be something that makes sense for the
ports cluster to check on? Are there situations where a port may
install something that a pkg-plist file should never record?
Cheers,
Jon
[apache22 sample diff output]
grep -v "^@comment" [bulidbox]/var/db/pkg/apache-2.2.4/+CONTENTS > /
tmp/+CONTENTS_make_package_apache22
grep -v "^@comment" [installbox]/var/db/pkg/apache-2.2.4/+CONTENTS > /
tmp/+CONTENTS_make_install_apache22
diff -u /tmp/+CONTENTS_make_install_apache22 /tmp/
+CONTENTS_make_package_apache22 | wc -l
755
diff -u /tmp/+CONTENTS_make_install_apache22 /tmp/
+CONTENTS_make_package_apache22 | grep '^-' | wc -l
737
diff -u /tmp/+CONTENTS_make_install_apache22 /tmp/
+CONTENTS_make_package_apache22 | grep '^+' | wc -l
14
diff -u /tmp/+CONTENTS_make_install_apache22 /tmp/
+CONTENTS_make_package_apache22 | head
- --- /tmp/+CONTENTS_make_install_apache22 Sun Jan 28 21:52:47 2007
+++ /tmp/+CONTENTS_make_package_apache22 Sun Jan 28 21:53:39 2007
@@ -567,739 +567,16 @@
@unexec rmdir %D/etc/apache22 2> /dev/null || echo "===> If you plan
to do not reinstall apache22, you can safely remove %D/etc/apache22."
@exec /sbin/ldconfig -m /usr/local/lib
@unexec /sbin/ldconfig -R
- -share/doc/apache22/LICENSE
- -share/doc/apache22/NOTICE
- -share/doc/apache22/bind.html
- -share/doc/apache22/bind.html.de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)
iD8DBQFFvTEUZpJsLIS+QSIRAs8XAJ9aleKmRSkPATrLwSzW77F0AE6NsACdEMgb
VOoNLhcNV/4KgPKXj05GV9M=
=LFvx
-----END PGP SIGNATURE-----
More information about the freebsd-ports
mailing list