[Fakeroot-commits] [SCM] fakeroot branch, upstream, updated. 08ed00124d8b6b445d3b91a9aa15eec638b02f05
Clint Adams
schizo at debian.org
Sun Nov 15 03:17:02 UTC 2009
The following commit has been merged in the upstream branch:
commit 5aaff75a513cb27325c5124694db49f298cfda64
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/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