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

Clint Adams schizo at debian.org
Tue Aug 23 13:05:39 UTC 2011


The following commit has been merged in the upstream branch:
commit e46835541c46f635a5fafbd831e7da7b1ef7f462
Author: Clint Adams <schizo at debian.org>
Date:   Wed Jun 29 14:53:54 2005 +0000

    detect and use POSIX-conformant shell because Solaris sucks
    
      * Steal shell detection code from bogofilter, and use a
        POSIX-conformant shell rather than /bin/sh.  This is
        necessary because Solaris is still using a /bin/sh from
        the early Cretaceous period.  closes: #316070.
    
    git-archimport-id: fakeroot at packages.debian.org--fakeroot/fakeroot--main--0.0--patch-72

diff --git a/configure.ac b/configure.ac
index ce5419c..643ba6d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -390,6 +390,24 @@ AH_VERBATIM([WRAP_STAT],
 ])
 dnl kludge end
 
+dnl check for b0rked Solaris (and other shells) and find one that works
+AC_MSG_CHECKING(for a working shell...)
+for i in /usr/xpg6/bin/sh /usr/xpg4/bin/sh /usr/ccs/bin/sh /bin/sh /usr/bin/sh /bin/ksh /bin/bash /usr/lo
+cal/bin/bash ; do
+    $i -c 'if ! false ; then echo $(echo ok) ; fi' >config.$$ 2>/dev/null
+    j=`cat config.$$`
+    rm -f config.$$
+    if test "x$j" = "xok" ; then
+        SHELL=$i
+        AC_SUBST(SHELL)
+        break
+    fi
+done
+AC_MSG_RESULT($SHELL)
+if test "x$SHELL" = "x" ; then
+    AC_MSG_ERROR(no SUS compliant shell found - on Solaris, install SUNWxcu4)
+fi
+
 AC_CONFIG_FILES([Makefile scripts/Makefile doc/Makefile doc/es/Makefile doc/fr/Makefile doc/sv/Makefile test/Makefile])
 AC_OUTPUT
 
diff --git a/debian/changelog b/debian/changelog
index b822947..14dbe6f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,28 @@
+fakeroot (1.4) unstable; urgency=low
+
+  Timo Savola:
+
+  * Daemon support (TCP version): faked goes into "detached" mode when it
+    receives SIGHUP: it will terminate as soon as all clients close their
+    connections. The fakeroot script kills faked with SIGHUP instead of
+    SIGTERM when it exits. This is done in order to provide a working
+    (although isolated) fakeroot environment for daemon processes that are
+    launched from a fakeroot session.
+
+  * Forward-declare cleanup().
+
+  * Undo unnecessary "fix" in fork wrapper.  (There is no reason to preserve
+    errno when not returning -1.)
+
+  Clint Adams:
+
+  * Steal shell detection code from bogofilter, and use a
+    POSIX-conformant shell rather than /bin/sh.  This is
+    necessary because Solaris is still using a /bin/sh from
+    the early Cretaceous period.  closes: #316070.
+
+ -- Clint Adams <schizo at debian.org>  Wed, 29 Jun 2005 10:23:12 -0400
+
 fakeroot (1.3) unstable; urgency=low
 
   Timo Savola:
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index cd7be43..be2f0a0 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -9,6 +9,7 @@ do_subst = sed -e 's,[@]prefix[@],$(prefix),g' \
 	   -e 's,[@]fakeroot_transformed[@],'`echo fakeroot | sed -e '$(transform)'`',g' \
 	   -e 's,[@]faked_transformed[@],'`echo faked | sed -e '$(transform)'`',g' \
 	   -e 's,[@]signal[@],$(signal),g' \
+	   -e 's,[@]SHELL[@],$(SHELL),g' \
 	   -e 's,[@]VERSION[@],$(VERSION),g' 
 
 fakeroot: $(srcdir)/fakeroot.in Makefile
diff --git a/scripts/fakeroot.in b/scripts/fakeroot.in
index ce871fb..d9dc69b 100755
--- a/scripts/fakeroot.in
+++ b/scripts/fakeroot.in
@@ -1,4 +1,4 @@
-#!/bin/sh
+ at SHELL@
 
 # This script first starts faked (the daemon), and then it will run
 # the requested program with fake root privileges.
diff --git a/test/Makefile.am b/test/Makefile.am
index 7668554..7c70265 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -4,7 +4,7 @@ TESTS = t.echoarg t.mknod t.tar t.truereturn t.falsereturn t.option \
 	t.touchinstall
 
 suffix =
-TESTS_ENVIRONMENT = libfakeroot=libfakeroot.so.0 suffix=$(suffix)
+TESTS_ENVIRONMENT = libfakeroot=libfakeroot.so.0 suffix=$(suffix) posixshell=$(SHELL)
 
 CLEANFILES = tmp* tartest.tar.gz hda3
 
diff --git a/test/t.echoarg b/test/t.echoarg
index b7f42ee..bcceb5e 100755
--- a/test/t.echoarg
+++ b/test/t.echoarg
@@ -1,4 +1,4 @@
 #!/bin/sh
 
 ../scripts/fakeroot${tcp} -f ../faked${tcp} -l ../.libs/${libfakeroot} -- \
- sh -c 'RET="$('"${srcdir}"'/echo_arg 3 a b c d e)"; echo RET=$RET; test "$RET" = "b"'
+ ${posixshell} -c 'RET="$('"${srcdir}"'/echo_arg 3 a b c d e)"; echo RET=$RET; test "$RET" = "b"'
diff --git a/test/t.mknod b/test/t.mknod
index 91f11d1..749e1f8 100755
--- a/test/t.mknod
+++ b/test/t.mknod
@@ -1,4 +1,4 @@
 #!/bin/sh
 
 ../scripts/fakeroot${tcp} -f ../faked${tcp} -l ../.libs/${libfakeroot} -- \
- sh -c 'mknod hda3 b 3 1; ls -l hda3' | grep "^b"
+ ${posixshell} -c 'mknod hda3 b 3 1; ls -l hda3' | grep "^b"
diff --git a/test/t.touchinstall b/test/t.touchinstall
index ecdf953..612e00d 100755
--- a/test/t.touchinstall
+++ b/test/t.touchinstall
@@ -2,7 +2,7 @@
 
 mkdir tmp
 ../scripts/fakeroot${tcp} -f ../faked${tcp} -l ../.libs/${libfakeroot} -- \
- sh -c "touch tmp/iamnotuser; ls -al tmp/iamnotuser" | grep root
+ ${posixshell} -c "touch tmp/iamnotuser; ls -al tmp/iamnotuser" | grep root
 TEMP=$?
 rm -r tmp
 exit $TEMP

-- 
fakeroot



More information about the Fakeroot-commits mailing list