From 6a68ed330a5133d4d4d3aa7ae0c9c26bb7a7e59b Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Fri, 12 Sep 2008 18:20:28 -0400 Subject: [PATCH] make calls to hostname portable; more tweaks to FreeBSD packaging. --- Makefile | 3 +++ debian/changelog | 1 + packaging/freebsd/distinfo | 6 +++--- packaging/freebsd/pkg-deinstall | 2 +- packaging/freebsd/pkg-install | 2 +- src/monkeysphere-server | 2 +- 6 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 97b3d0e..779bb1a 100644 --- a/Makefile +++ b/Makefile @@ -26,6 +26,9 @@ debian-package: tarball (cd monkeysphere-$(MONKEYSPHERE_VERSION) && debuild -uc -us) rm -rf monkeysphere-$(MONKEYSPHERE_VERSION) +freebsd-distinfo: tarball + ./utils/build-freebsd-distinfo + clean: $(MAKE) -C src/keytrans clean # clean up old monkeysphere packages lying around as well. diff --git a/debian/changelog b/debian/changelog index fb0788e..bf7c219 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,7 @@ monkeysphere (0.16~pre-1) UNRELEASED; urgency=low * replaced "#!/bin/bash" with "#!/usr/bin/env bash" for better portability. * fixed busted lockfile arrangement, where empty file was being locked + * portability fixes for date, mktemp, hostname -- Daniel Kahn Gillmor Thu, 11 Sep 2008 23:16:31 -0400 diff --git a/packaging/freebsd/distinfo b/packaging/freebsd/distinfo index e962627..84fa981 100644 --- a/packaging/freebsd/distinfo +++ b/packaging/freebsd/distinfo @@ -1,3 +1,3 @@ -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 +MD5 (monkeysphere_0.16~pre.orig.tar.gz) = e495b71d28afc36d65217e1935c43535 +SHA256 (monkeysphere_0.16~pre.orig.tar.gz) = c2c3c4203ac28d025e63a2e0683dfbb5ec558e4f061f3c3b1c2b736af2b38ba9 +SIZE (monkeysphere_0.16~pre.orig.tar.gz) = 58501 diff --git a/packaging/freebsd/pkg-deinstall b/packaging/freebsd/pkg-deinstall index 966f252..3000878 100755 --- a/packaging/freebsd/pkg-deinstall +++ b/packaging/freebsd/pkg-deinstall @@ -19,7 +19,7 @@ POST-DEINSTALL) # (note: FreeBSD does not seem to want the package-specific user to be # purged at package removal) - if pw user show "${USER}" 2>/dev/null; then + if pw user show "${USER}" 2>/dev/null >/dev/null; then echo "Warning: If you will *NOT* use this package anymore, please remove the monkeysphere user manually." fi if [ -d "$VARLIB" ] ; then diff --git a/packaging/freebsd/pkg-install b/packaging/freebsd/pkg-install index 5601bb5..b832190 100755 --- a/packaging/freebsd/pkg-install +++ b/packaging/freebsd/pkg-install @@ -38,7 +38,7 @@ POST-INSTALL) echo "You already have a user \"${USER}\", so I will use it." else if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ - -d "$VARLIB" -s /sbin/sh -c "monkeysphere authentication user,,," + -d "$VARLIB" -s /bin/sh -c "monkeysphere authentication user,,," then echo "Added user \"${USER}\"." else diff --git a/src/monkeysphere-server b/src/monkeysphere-server index b96a659..f4bdd1b 100755 --- a/src/monkeysphere-server +++ b/src/monkeysphere-server @@ -299,7 +299,7 @@ gen_key() { esac done - hostName=${1:-$(hostname --fqdn)} + hostName=${1:-$(hostname -f)} userID="ssh://${hostName}" # check for presense of key with user ID -- 2.26.2