From 82c97a3d7799dcbd722523f251de8836d5956318 Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Fri, 12 Sep 2008 17:41:53 -0400 Subject: more tweaks to freebsd packaging. --- packaging/freebsd/Makefile | 4 ++++ packaging/freebsd/distinfo | 6 +++--- packaging/freebsd/files/patch-varlocation | 6 +++--- packaging/freebsd/pkg-deinstall | 13 +++++++++---- packaging/freebsd/pkg-install | 4 ++-- 5 files changed, 21 insertions(+), 12 deletions(-) diff --git a/packaging/freebsd/Makefile b/packaging/freebsd/Makefile index 1381ba4..2bdb283 100644 --- a/packaging/freebsd/Makefile +++ b/packaging/freebsd/Makefile @@ -31,6 +31,10 @@ MANCOMPRESSED= yes MAKE_ARGS= ETCPREFIX=/usr/local MANPREFIX=/usr/local/man ETCSUFFIX=.sample +# get rid of cruft after the patching: +post-patch: + find . -iname '*.orig' -delete + post-install: @if [ ! -f ${PREFIX}/etc/monkeysphere/monkeysphere.conf ]; then \ ${CP} -p ${PREFIX}/etc/monkeysphere/monkeysphere.conf.sample ${PREFIX}/etc/monkeysphere/monkeysphere.conf ; \ diff --git a/packaging/freebsd/distinfo b/packaging/freebsd/distinfo index 6a4f99d..e962627 100644 --- a/packaging/freebsd/distinfo +++ b/packaging/freebsd/distinfo @@ -1,3 +1,3 @@ -MD5 (monkeysphere_0.16~pre.orig.tar.gz) = f56a757c5191100565f7da4c30fca846 -SHA256 (monkeysphere_0.16~pre.orig.tar.gz) = e520dc44d8b4d9b9506cb7f2c99389b39a997c4372d6b7218237ec7baf2be1bb -SIZE (monkeysphere_0.16~pre.orig.tar.gz) = 58193 +MD5 (monkeysphere_0.16~pre.orig.tar.gz) = 0dc82d6e81bf469326b6801147d93bbb +SHA256 (monkeysphere_0.16~pre.orig.tar.gz) = e8147afaae0bef44dd659f0cfc47b12a90b23776b750a58756ca32c2c5605332 +SIZE (monkeysphere_0.16~pre.orig.tar.gz) = 58204 diff --git a/packaging/freebsd/files/patch-varlocation b/packaging/freebsd/files/patch-varlocation index 899c19e..27f1527 100644 --- a/packaging/freebsd/files/patch-varlocation +++ b/packaging/freebsd/files/patch-varlocation @@ -55,10 +55,10 @@ index e590f3c..f46e8bb 100755 export VARLIB # UTC date in ISO 8601 format if needed -diff --git website/getting-started-admin.mdwn website/getting-started-admin.mdwn +diff --git doc/getting-started-admin.mdwn doc/getting-started-admin.mdwn index 6c8ad53..67fdda1 100644 ---- website/getting-started-admin.mdwn -+++ website/getting-started-admin.mdwn +--- doc/getting-started-admin.mdwn ++++ doc/getting-started-admin.mdwn @@ -30,7 +30,7 @@ To use the newly-generated host key for ssh connections, put the following line in `/etc/ssh/sshd_config` (be sure to remove references to any other keys): diff --git a/packaging/freebsd/pkg-deinstall b/packaging/freebsd/pkg-deinstall index 03db8e8..966f252 100755 --- a/packaging/freebsd/pkg-deinstall +++ b/packaging/freebsd/pkg-deinstall @@ -13,12 +13,17 @@ VARLIB="/var/monkeysphere" case $2 in POST-DEINSTALL) -# FIXME: This needs to be filled in! Under what circumstances do we -# want to actually purge all of /var/monkeysphere? + USER=monkeysphere +# FIXME: This doesn't do anything! Under what circumstances do we +# want to actually automatically purge all of /var/monkeysphere? # (note: FreeBSD does not seem to want the package-specific user to be # purged at package removal) - echo "Warning: If you will *NOT* use this package anymore, please remove the monkeysphere user manually." - echo " You may also want to remove the cached authentication data and keyrings in $VARLIB" + if pw user show "${USER}" 2>/dev/null; then + echo "Warning: If you will *NOT* use this package anymore, please remove the monkeysphere user manually." + fi + if [ -d "$VARLIB" ] ; then + echo "Warning: You may want to remove monkeysphere's cached authentication data and keyrings in $VARLIB" + fi ;; esac diff --git a/packaging/freebsd/pkg-install b/packaging/freebsd/pkg-install index dc75cf7..5601bb5 100755 --- a/packaging/freebsd/pkg-install +++ b/packaging/freebsd/pkg-install @@ -49,12 +49,12 @@ POST-INSTALL) ## set up the cache directories: - install --owner root --group monkeysphere --mode 750 -d "$VARLIB"/gnupg-host + install -d -o root -g monkeysphere -m 750 "$VARLIB"/gnupg-host cat < "$VARLIB"/gnupg-host/gpg.conf list-options show-uid-validity EOF - install --owner monkeysphere --group monkeysphere --mode 700 -d "$VARLIB"/gnupg-authentication + install -d -o monkeysphere -g monkeysphere -m 700 "$VARLIB"/gnupg-authentication # install authentication gpg.conf cat < "$VARLIB"/gnupg-authentication/gpg.conf list-options show-uid-validity -- cgit v1.2.3