[Fakeroot-commits] [SCM] fakeroot branch, upstream, updated. 7688f1b398a9e71f239b1a7a6142a2d2d9f2beeb

Clint Adams clint at debian.org
Tue Aug 23 13:12:56 UTC 2011


The following commit has been merged in the upstream branch:
commit 94bed17c9d3821fe6c5143fe661997cd8532ec9e
Author: Kyle J. McKay <mackyle at gmail.com>
Date:   Thu May 26 06:07:38 2011 -0700

    Support tartest on Darwin and FreeBSD where the group of root is "wheel" not "root"

diff --git a/test/compare-tar b/test/compare-tar
index d764705..1333c8f 100755
--- a/test/compare-tar
+++ b/test/compare-tar
@@ -1,9 +1,22 @@
 #!/bin/sh
+ROOTGROUP=root
+
+SYSNAME="`uname -s 2>/dev/null`"
+
+case x"$SYSNAME" in
+  x"Darwin")
+    ROOTGROUP=wheel
+    ;;
+  x*BSD*)
+    ROOTGROUP=wheel
+    ;;
+esac
+
 set -e
 echo compare-tar:
 
-gzip -dc $1 | tar -tvf - |awk '{print $1, $2, $3, $NF}' |sort > tmp-1
-gzip -dc $2 | tar -tvf - |awk '{print $1, $2, $3, $NF}' |sort > tmp-2
+gzip -dc $1 | tar -tvf - |awk '{print $1, $2, $3, $NF}' |sed -e "s/$ROOTGROUP/root/" |sort > tmp-1
+gzip -dc $2 | tar -tvf - |awk '{print $1, $2, $3, $NF}' |sed -e "s/$ROOTGROUP/root/" |sort > tmp-2
 
 diff tmp-1 tmp-2 > tmp-diff || true
 
diff --git a/test/tartest b/test/tartest
index c35d8e2..0972923 100755
--- a/test/tartest
+++ b/test/tartest
@@ -14,6 +14,18 @@ fi
 
 cd $TMP;
 
+ROOTGROUP=root
+
+SYSNAME="`uname -s 2>/dev/null`"
+
+case x"$SYSNAME" in
+  x"Darwin")
+    ROOTGROUP=wheel
+    ;;
+  x*BSD*)
+    ROOTGROUP=wheel
+    ;;
+esac
 
 #test 1: try some silly mkdir, chmod, chown commands
 #        and see if we get the same tar file as I
@@ -47,7 +59,7 @@ for f in $LIST; do
 done
 
 chown -R daemon:sys 2
-chown -R daemon:root 3 4
+chown -R daemon:$ROOTGROUP 3 4
 chmod -R u+xs 2
 chmod u+s  5
 

-- 
fakeroot



More information about the Fakeroot-commits mailing list