make calls to hostname portable; more tweaks to FreeBSD packaging.
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Fri, 12 Sep 2008 22:20:28 +0000 (18:20 -0400)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Fri, 12 Sep 2008 22:20:28 +0000 (18:20 -0400)
Makefile
debian/changelog
packaging/freebsd/distinfo
packaging/freebsd/pkg-deinstall
packaging/freebsd/pkg-install
src/monkeysphere-server

index 97b3d0ec1dd9c659e27549fa9866dab5c60f6f05..779bb1a81c11f64490548029467760c8da749562 100644 (file)
--- 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.
index fb0788e48668cd345f320818122f7481903e31eb..bf7c21920a8daece8a85a574e5dd3dbf56814e48 100644 (file)
@@ -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 <dkg@fifthhorseman.net>  Thu, 11 Sep 2008 23:16:31 -0400
 
index e962627c259bc50b4e4a41387c984184db353856..84fa981543edfe7f259120d996836ec493c1072b 100644 (file)
@@ -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
index 966f25247466e83ac33e7c5aa7abb28e216c927e..30008784182a835c800541d5e7f9a33617c750d1 100755 (executable)
@@ -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
index 5601bb5ed6c2742e38425994e7f84cbaea4558fe..b832190c37708eb96e712bc063b4fe2fb87e321a 100755 (executable)
@@ -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
index b96a65986a7f516f5f5747f07da266c178fb6446..f4bdd1b83b7de3c3c701c7da0d8c6d70972c7a41 100755 (executable)
@@ -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