Nasty install bug / patch

Paul Ruhland <[email protected]>
Newsgroups gmane.comp.gnu.sh-utils.bugs
Message-ID <[email protected]>
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
sh-utils-2.0.patch (text/x-diff, 387 B)
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.