Subject: install -o bin should be ${BINOWN} ?
To: None <current-users@NetBSD.ORG>
From: Arne H Juul <arnej@dsl.unit.no>
List: current-users
Date: 01/03/1995 11:23:02
I've noted when cross-compiling that some Makefiles install things
with -o bin -g bin instead of ${BINOWN} and ${BINGRP}. My guess is that
the makefiles should use ${BINOWN} consistently, so I've made this patch.

Also note that two of the directory installs here conflict with the
mtree files, as /usr/include/rpcsvc and /usr/include/g+ are installed
with bin/bin but the mtree files specify root/wheel - my guess here is
that the mtree files are wrong, so I haven't made any changes in this
patch.

Hope this is useful.

Yours,
  - Arne H. J.

diff -ru src.orig/etc/etc.i386/Makefile.kc src/etc/etc.i386/Makefile.kc
--- src.orig/etc/etc.i386/Makefile.kc	Mon Nov 21 22:22:41 1994
+++ src/etc/etc.i386/Makefile.kc	Mon Jan  2 14:02:25 1995
@@ -27,7 +27,8 @@
 		install -d -o root -g wheel -m 755 ${MOUNT_POINT}$$d ; \
 	done
 	for d in ${BINDIRLIST} ; do \
-		install -d -o bin -g bin -m 755 ${MOUNT_POINT}$$d ; \
+		install -d -o ${BINOWN} -g ${BINGRP} -m 755 \
+			${MOUNT_POINT}$$d ; \
 	done
 	cp ${KERNEL} ${MOUNT_POINT}
 	cp ${.CURDIR}/etc.i386/MAKEDEV ${MOUNT_POINT}/dev
diff -ru src.orig/games/fish/Makefile src/games/fish/Makefile
--- src.orig/games/fish/Makefile	Thu Dec 22 12:50:47 1994
+++ src/games/fish/Makefile	Mon Jan  2 13:57:13 1995
@@ -6,7 +6,7 @@
 HIDEGAME=hidegame
 
 beforeinstall: 
-	install -c -o bin -g bin -m 444 ${.CURDIR}/fish.instr \
+	install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/fish.instr \
 		${DESTDIR}/usr/share/games
 
 .include <bsd.prog.mk>
diff -ru src.orig/gnu/lib/libg++/Makefile src/gnu/lib/libg++/Makefile
--- src.orig/gnu/lib/libg++/Makefile	Thu Feb 10 11:58:47 1994
+++ src/gnu/lib/libg++/Makefile	Mon Jan  2 14:01:51 1995
@@ -5,8 +5,10 @@
 INCLUDEDIRS=	iostream libg++ g++-include
 
 beforeinstall:
-	install -d -o bin -g bin -m 755 ${DESTDIR}/usr/include/g++
-	install -d -o bin -g bin -m 755 ${DESTDIR}/usr/include/g++/gen
+	install -d -o ${BINOWN} -g ${BINGRP} -m 755 \
+		${DESTDIR}/usr/include/g++
+	install -d -o ${BINOWN} -g ${BINGRP} -m 755 \
+		${DESTDIR}/usr/include/g++/gen
 	@-for i in ${INCLUDEDIRS}; do \
 		echo installing includes from $$i ; \
 		(cd $$i; for j in *.[ih]; do \
diff -ru src.orig/gnu/usr.bin/groff/troff/Makefile src/gnu/usr.bin/groff/troff/Makefile
--- src.orig/gnu/usr.bin/groff/troff/Makefile	Fri Dec 17 07:15:37 1993
+++ src/gnu/usr.bin/groff/troff/Makefile	Mon Jan  2 13:57:13 1995
@@ -20,7 +20,7 @@
 TMACDIR=/usr/share/tmac
 
 afterinstall:
-	install -c -o bin -g bin -m 444 $(.CURDIR)/hyphen.us \
+	install -c -o ${BINOWN} -g ${BINGRP} -m 444 $(.CURDIR)/hyphen.us \
 		$(DESTDIR)$(TMACDIR)/hyphen.us
 
 .include "../../Makefile.inc"
diff -ru src.orig/include/Makefile src/include/Makefile
--- src.orig/include/Makefile	Sat Dec  3 12:11:50 1994
+++ src/include/Makefile	Mon Jan  2 14:01:20 1995
@@ -38,7 +38,8 @@
 	done
 	@echo installing ${DIRS}
 	@-for i in ${DIRS}; do \
-		install -d -o bin -g bin -m 755 ${DESTDIR}/usr/include/$$i; \
+		install -d -o ${BINOWN} -g ${BINGRP} -m 755 \
+			${DESTDIR}/usr/include/$$i; \
 		(cd $$i; for j in *.[ih]; do \
 			cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j || \
 			install -c -m 444 $$j ${DESTDIR}/usr/include/$$i/$$j; \
@@ -61,27 +62,29 @@
 		xargs chmod u=rwx,go=rx
 
 beforeinstall:
-	install -d -o bin -g bin -m 755 ${DESTDIR}/usr/include
+	install -d -o ${BINOWN} -g ${BINGRP} -m 755 ${DESTDIR}/usr/include
 
 copies:
 	@echo copies: ${LDIRS}
 	@-for i in ${LDIRS}; do \
 		rm -rf ${DESTDIR}/usr/include/$$i; \
-		install -d -o bin -g bin -m 755 ${DESTDIR}/usr/include/$$i ; \
+		install -d -o ${BINOWN} -g ${BINGRP} -m 755 \
+			${DESTDIR}/usr/include/$$i ; \
 	done
 	cd ../sys; \
 	pax -rw -pa -L \
 	    `find ${LDIRS} -type f -name '*.h' '!' -path 'netiso/xebec/*' \
 	    -print` ${DESTDIR}/usr/include
 	rm -rf ${DESTDIR}/usr/include/machine
-	install -d -o bin -g bin -m 755 ${DESTDIR}/usr/include/machine
+	install -d -o ${BINOWN} -g ${BINGRP} -m 755 \
+		${DESTDIR}/usr/include/machine
 	pax -rw -pa -s "|../sys/arch/${MACHINE}/include||" \
 	    ../sys/arch/${MACHINE}/include/*.h \
 	    ${DESTDIR}/usr/include/machine   
 	rm -rf ${DESTDIR}/usr/include/${MACHINE_ARCH}
 	if test ${MACHINE} != ${MACHINE_ARCH} -a \
 	    -d ../sys/arch/${MACHINE_ARCH}/include; then \
-		install -d -o bin -g bin -m 755 \
+		install -d -o ${BINOWN} -g ${BINGRP} -m 755 \
     	    	    ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
 		pax -rw -pa -s "|../sys/arch/${MACHINE_ARCH}/include||" \
 		    ../sys/arch/${MACHINE_ARCH}/include/*.h \
diff -ru src.orig/lib/librpcsvc/Makefile src/lib/librpcsvc/Makefile
--- src.orig/lib/librpcsvc/Makefile	Tue Jun 14 12:21:46 1994
+++ src/lib/librpcsvc/Makefile	Mon Jan  2 14:00:39 1995
@@ -18,7 +18,8 @@
 beforedepend:	${HDRS}
 
 beforeinstall:
-	install -d -o bin -g bin -m 755 ${DESTDIR}/usr/include/rpcsvc
+	install -d -o ${BINOWN} -g ${BINGRP} -m 755 \
+		${DESTDIR}/usr/include/rpcsvc
 	@for i in $(HDRS); do \
 	    cmp -s $$i ${DESTDIR}/usr/include/rpcsvc/$$i > /dev/null 2>&1 || \
 		install -c -o ${BINOWN} -g ${BINGRP} -m 444 $$i \
diff -ru src.orig/sys/arch/hp300/stand/Makefile src/sys/arch/hp300/stand/Makefile
--- src.orig/sys/arch/hp300/stand/Makefile	Mon Nov 21 22:57:36 1994
+++ src/sys/arch/hp300/stand/Makefile	Mon Jan  2 14:00:04 1995
@@ -143,20 +143,27 @@
 	./mkboot dboot diskboot.lif
 	./mkboot nboot ndiskboot.lif
 	./mkboot tboot tcopy tapeboot.lif
-	install -c -o bin -g bin -m 555 installboot ${DESTDIR}/usr/mdec
-	install -c -o bin -g bin -m 444 netbsdboot.lif ${DESTDIR}/usr/mdec/rdboot
+	install -c -o ${BINOWN} -g ${BINGRP} -m 555 installboot \
+		${DESTDIR}/usr/mdec
+	install -c -o ${BINOWN} -g ${BINGRP} -m 444 netbsdboot.lif \
+		${DESTDIR}/usr/mdec/rdboot
 	rm -f ${DESTDIR}/usr/mdec/bootrd
 	ln ${DESTDIR}/usr/mdec/rdboot ${DESTDIR}/usr/mdec/bootrd
 	rm -f ${DESTDIR}/usr/mdec/sdboot
 	ln ${DESTDIR}/usr/mdec/rdboot ${DESTDIR}/usr/mdec/sdboot
 	rm -f ${DESTDIR}/usr/mdec/bootsd
 	ln ${DESTDIR}/usr/mdec/sdboot ${DESTDIR}/usr/mdec/bootsd
-	install -c -o bin -g bin -m 644 tapeboot.lif ${DESTDIR}/usr/mdec/bootct
-#	install -o bin -g bin -m 755 -d ${DESTDIR}/sys/hpdist/tp
-#	install -o bin -g bin -m 444 netbsdboot.lif ${DESTDIR}/sys/hpdist/tp
-#	install -o bin -g bin -m 444 tapeboot.lif ${DESTDIR}/sys/hpdist/tp
-#	install -o bin -g bin -m 444 diskboot.lif ${DESTDIR}/sys/hpdist/tp
-#	install -o bin -g bin -m 444 ndiskboot.lif ${DESTDIR}/sys/hpdist/tp
+	install -c -o ${BINOWN} -g ${BINGRP} -m 644 tapeboot.lif \
+		${DESTDIR}/usr/mdec/bootct
+#	install -o ${BINOWN} -g ${BINGRP} -m 755 -d ${DESTDIR}/sys/hpdist/tp
+#	install -o ${BINOWN} -g ${BINGRP} -m 444 netbsdboot.lif \
+#		${DESTDIR}/sys/hpdist/tp
+#	install -o ${BINOWN} -g ${BINGRP} -m 444 tapeboot.lif \
+#		${DESTDIR}/sys/hpdist/tp
+#	install -o ${BINOWN} -g ${BINGRP} -m 444 diskboot.lif \
+#		${DESTDIR}/sys/hpdist/tp
+#	install -o ${BINOWN} -g ${BINGRP} -m 444 ndiskboot.lif \
+#		${DESTDIR}/sys/hpdist/tp
 
 .include <bsd.dep.mk>
 .include <bsd.obj.mk>
diff -ru src.orig/sys/arch/i386/isa/pcvt/Util/fed/Makefile src/sys/arch/i386/isa/pcvt/Util/fed/Makefile
--- src.orig/sys/arch/i386/isa/pcvt/Util/fed/Makefile	Mon Nov 21 23:00:35 1994
+++ src/sys/arch/i386/isa/pcvt/Util/fed/Makefile	Mon Jan  2 13:57:13 1995
@@ -25,6 +25,6 @@
 	rm -f *.o fed *core* trace*
 
 install:	fed
-	install -c -s -o bin -g bin fed $(DEST)
+	install -c -s -o ${BINOWN} -g ${BINGRP} fed $(DEST)
 
 .endif
diff -ru src.orig/sys/arch/pmax/stand/Makefile src/sys/arch/pmax/stand/Makefile
--- src.orig/sys/arch/pmax/stand/Makefile	Mon Nov 21 23:41:05 1994
+++ src/sys/arch/pmax/stand/Makefile	Mon Jan  2 13:57:14 1995
@@ -71,8 +71,8 @@
 
 install:
 	./mkboot boot rzboot bootrz
-	install -o bin -g bin -m 444 rzboot ${DESTDIR}/usr/mdec
-	install -o bin -g bin -m 444 bootrz ${DESTDIR}/usr/mdec
+	install -o ${BINOWN} -g ${BINGRP} -m 444 rzboot ${DESTDIR}/usr/mdec
+	install -o ${BINOWN} -g ${BINGRP} -m 444 bootrz ${DESTDIR}/usr/mdec
 
 depend: ${SRCS}
 	mkdep ${INCPATH} ${DEFS} ${SRCS}