Skip to content

Commit 439d5d8

Browse files
author
Wayne Davison
committed
Better fakeroot support helps Solaris.
1 parent de21910 commit 439d5d8

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

configure.ac

+5-1
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ else
134134
MAKE_MAN=man-copy
135135
fi
136136

137+
# Some programs on solaris are only found in /usr/xpg4/bin (or work better than others versions).
138+
AC_PATH_PROG(SHELL_PATH, sh, /bin/sh, [/usr/xpg4/bin$PATH_SEPARATOR$PATH])
139+
AC_PATH_PROG(FAKEROOT_PATH, fakeroot, /usr/bin/fakeroot, [/usr/xpg4/bin$PATH_SEPARATOR$PATH])
140+
137141
AC_ARG_WITH(nobody-group,
138142
AC_HELP_STRING([--with-nobody-group=GROUP],
139143
[set the default unprivileged group (default nobody or nogroup)]),
@@ -942,7 +946,7 @@ else
942946
AC_DEFINE(HAVE_UNIXWARE_ACLS, 1, [true if you have UnixWare ACLs])
943947
AC_DEFINE(SUPPORT_ACLS, 1, [Define to 1 to add support for ACLs])
944948
;;
945-
*solaris*|*cygwin*)
949+
solaris*|*cygwin*)
946950
AC_MSG_RESULT(Using solaris ACLs)
947951
AC_DEFINE(HAVE_SOLARIS_ACLS, 1, [true if you have solaris ACLs])
948952
AC_DEFINE(SUPPORT_ACLS, 1)

shconfig.in

+4-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,8 @@
88
ECHO_T="@ECHO_T@"
99
ECHO_N="@ECHO_N@"
1010
ECHO_C="@ECHO_C@"
11+
HOST_OS="@host_os@"
12+
SHELL_PATH="@SHELL_PATH@"
13+
FAKEROOT_PATH="@FAKEROOT_PATH@"
1114

12-
export ECHO_T ECHO_N ECHO_C
15+
export ECHO_T ECHO_N ECHO_C HOST_OS SHELL_PATH FAKEROOT_PATH

testsuite/chown.test

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ case $0 in
4040
case `get_testuid` in
4141
'') ;; # If "id" failed, try to continue...
4242
0) ;;
43-
*) if [ -f /usr/bin/fakeroot ]; then
43+
*) if [ -e "$FAKEROOT_PATH" ]; then
4444
echo "Let's try re-running the script under fakeroot..."
45-
exec /usr/bin/fakeroot /bin/sh "$0"
45+
exec "$FAKEROOT_PATH" "$SHELL_PATH" "$0"
4646
fi
4747
;;
4848
esac

testsuite/devices.test

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ case $0 in
5454
case `get_testuid` in
5555
'') ;; # If "id" failed, try to continue...
5656
0) ;;
57-
*) if [ -f /usr/bin/fakeroot ]; then
57+
*) if [ -e "$FAKEROOT_PATH" ]; then
5858
echo "Let's try re-running the script under fakeroot..."
59-
exec /usr/bin/fakeroot /bin/sh $RUNSHFLAGS "$0"
59+
exec "$FAKEROOT_PATH" "$SHELL_PATH" $RUNSHFLAGS "$0"
6060
fi
6161
test_skipped "Rsync needs root/fakeroot for device tests"
6262
;;

0 commit comments

Comments
 (0)