From asa@asa.gascom.net.ru  Wed Jul  2 04:17:53 2003
Return-Path: <asa@asa.gascom.net.ru>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id BA6ED37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  2 Jul 2003 04:17:53 -0700 (PDT)
Received: from asa.gascom.net.ru (gsn.gascom.ru [217.17.160.121])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 284564400D
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  2 Jul 2003 04:17:52 -0700 (PDT)
	(envelope-from asa@asa.gascom.net.ru)
Received: from asa.gascom.net.ru (localhost [127.0.0.1])
	by asa.gascom.net.ru (8.12.8p1/8.12.8) with ESMTP id h62BHoQh001283
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 2 Jul 2003 15:17:50 +0400 (MSD)
	(envelope-from asa@asa.gascom.net.ru)
Received: (from asa@localhost)
	by asa.gascom.net.ru (8.12.8p1/8.12.8/Submit) id h62BHoeN001282;
	Wed, 2 Jul 2003 15:17:50 +0400 (MSD)
Message-Id: <200307021117.h62BHoeN001282@asa.gascom.net.ru>
Date: Wed, 2 Jul 2003 15:17:50 +0400 (MSD)
From: Sergey Akifyev <asa@gascom.ru>
Reply-To: Sergey Akifyev <asa@gascom.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Incorrect usr/src/release/sysinstall Makefile behaviour
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         54004
>Category:       misc
>Synopsis:       Incorrect usr/src/release/sysinstall Makefile behaviour
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ru
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 02 04:20:13 PDT 2003
>Closed-Date:    Tue Oct 07 00:01:29 PDT 2003
>Last-Modified:  Tue Oct 07 00:01:29 PDT 2003
>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@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:
Responsible-Changed-From-To: freebsd-bugs->ru 
Responsible-Changed-By: ru 
Responsible-Changed-When: Fri Oct 3 12:07:11 PDT 2003 
Responsible-Changed-Why:  
I will take care of it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=54004 
State-Changed-From-To: open->closed 
State-Changed-By: ru 
State-Changed-When: Tue Oct 7 00:01:12 PDT 2003 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=54004 
>Unformatted:
