[Fakeroot-commits] [SCM] fakeroot branch, upstream, updated. debian/1.14.3-200-gb232f8a

Kyle J. McKay mackyle at gmail.com
Tue Aug 23 13:06:37 UTC 2011


The following commit has been merged in the upstream branch:
commit 0c721a3df1b6b8d13b8aa96d8834884471190064
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