Hello,
I've been building a powerpc-linux cross development environment and came
across this nasty bug in the sh-utils install.
To keep any hardcoded paths anchored at the filesystem root ( some packages,
ie. inetutils, libraries ) I configure with '--prefix=/usr' and
'--exec-prefix='. Then install is typically run like so:
make DESTDIR=/home/me/projects/aproject/nfsroot install
where the DESTDIR is the root filesystem for mounting via nfs,
making cramfs images, etc.
Well, in the 'src/Makefile' there is an expression evaluated during the
installation of 'su' that ends up writing of the host cpus '/bin/su' with the
cross-compiled executable. This only happens if installing as root but
sometimes I do this to save endless chowning of the target filesystem.
I've attached a patch to fix this...against 'sh-utils-2.0'. Don't know if
this has been fixed by now, but here it is.
--
Paul Ruhland
diff -rNu sh-utils-2.0.ORIG/src/Makefile.in sh-utils-2.0/src/Makefile.in
--- sh-utils-2.0.ORIG/src/Makefile.in Sat Aug 14 10:42:37 1999
+++ sh-utils-2.0/src/Makefile.in Mon Apr 1 00:50:22 2002
@@ -150,7 +150,7 @@
SUFFIXES = .sh
-installed_su = $(bindir)/`echo su|sed '$(transform)'`
+installed_su = $(DESTDIR)$(bindir)/`echo su|sed '$(transform)'`
setuid_root_mode = a=rx,u+s