misc/54004: Incorrect usr/src/release/sysinstall Makefile behaviour

Sergey Akifyev asa at gascom.ru
Wed Jul 2 04:20:16 PDT 2003


>Number:         54004
>Category:       misc
>Synopsis:       Incorrect usr/src/release/sysinstall Makefile behaviour
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 02 04:20:13 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Sergey Akifyev
>Release:        FreeBSD 4.8-RELEASE i386
>Organization:
JSC Gascom
>Environment:
System: FreeBSD asa.gascom.net.ru 4.8-RELEASE FreeBSD 4.8-RELEASE #5: Fri May 16 11:18:03 MSD 2003 asa at boulder.gascom.ru:/usr/src/sys/compile/ASA i386

>Description:
Makefile in /usr/src/release/sysinstall does 'make install' incorrectly,
when DESTDIR is set and ${DESTDIR}/stand directory does not exist. This
happens because /some/empty/dir/stand doesn't get greated by Makefile
and /stand (without respect to DESTDIR) is get greated instead.
>How-To-Repeat:
# cd /usr/src && make buildworld
	...
# cd /usr/src/release/sysinstall && make all
	...
# make install DESTDIR=/some/empty/dir
	...
# ls -l /some/empty/dir
-r-xr-xr-x  1 root  wheel  923632  2 ÉÀÌ 15:13 sysinstall
>Fix:

--- Makefile.orig	Wed Jul  2 15:04:16 2003
+++ Makefile	Wed Jul  2 15:13:43 2003
@@ -99,8 +99,8 @@
 	mv keymap.tmp keymap.h
 
 beforeinstall:
-	@if [ ! -d ${BINDIR}/ ]; then \
-		mkdir -p ${BINDIR}; \
+	@if [ ! -d ${DESTDIR}${BINDIR}/ ]; then \
+		mkdir -p ${DESTDIR}${BINDIR}; \
 	fi
 
 .include <bsd.prog.mk>

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list