From takamune@avrl.mei.co.jp Tue Mar 16 03:23:32 1999
Return-Path: <takamune@avrl.mei.co.jp>
Received: from bulls.mei.co.jp (bulls.mei.co.jp [202.224.189.102])
	by hub.freebsd.org (Postfix) with ESMTP id 3B74614E51
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 16 Mar 1999 03:23:14 -0800 (PST)
	(envelope-from takamune@avrl.mei.co.jp)
Received: by bulls.mei.co.jp (8.9.1/3.7W) with ESMTP id UAA07522
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 16 Mar 1999 20:22:54 +0900 (JST)
Received: by dodgers.mei.co.jp (8.9.1/3.7W) with SMTP id UAA14065
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 16 Mar 1999 20:22:54 +0900 (JST)
Received: by avrlgate1.avrl.mei.co.jp (8.6.10+2.4W/3.3W3-avrl3.0)
	id UAA03767; Tue, 16 Mar 1999 20:22:53 +0900
Received: by dream.avrl.mei.co.jp (8.9.2/3.6W-03/04/98-dream)
	id UAA07854; Tue, 16 Mar 1999 20:22:01 +0900 (JST)
Message-Id: <199903161122.UAA07854@dream.avrl.mei.co.jp>
Date: Tue, 16 Mar 1999 20:22:01 +0900 (JST)
From: takamune@avrl.mei.co.jp
Reply-To: takamune@avrl.mei.co.jp
To: FreeBSD-gnats-submit@freebsd.org
Cc: takamune@avrl.mei.co.jp
Subject: make installworld DESTDIR=/some/dir
X-Send-Pr-Version: 3.2

>Number:         10615
>Category:       bin
>Synopsis:       make installworld DESTDIR=/some/dir
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 16 03:30:01 PST 1999
>Closed-Date:    Wed Aug 23 04:46:14 PDT 2000
>Last-Modified:  Wed Aug 23 04:47:16 PDT 2000
>Originator:     Kazutoki TAKAMUNE
>Release:        FreeBSD 3.1-STABLE i386
>Organization:
Matsushita Electric Industrial Co., Ltd.
>Environment:

FreeBSD 3.1-STABLE(Mon Mar  8 14:54:10 JST 1999)

>Description:

In making world even with DESTDIR=/some/dir,
some files will not be correctly installed under ${DESTDIR}.

I found this problem by following steps:
  o  do 'make buildworld installworld'		# DESTDIR=/
  o  do 'make installworld DESTDIR=/S'
  o  compare between / and /S
     on the file mode, pathname, owner, group and size, not on time stamp.

There are some problems.
  o  /usr/sbin/sysctl has a missing link to ${DESTDIR}/sbin/sysctl.
  o 'dhclient-script' is installed not in ${DESTDIR}/sbin but in /sbin.
  o  /S/usr/libdata/perl/5.00502/mach/auto/*/.packlist has ${DESTDIR} in itself.
  o  {,/S}/usr/libdata/perl/5.00502/mach/perllocal.pod are different.
  o  /S/usr/libdata/perl/5.00502/mach/f2c.ph does not exist.

When DESTDIR is not defined, no problem will occur.
But DESTDIR is always defined for 'make release'.

1st problem:
   It occured only in 2.2-STABLE.
   In 3.x system, the link /usr/sbin/sysctl does not exist.

   But when 'LN_FLAGS= -s' is used in a Makefile,
   the same problem will be occur.

   A patch to fix was in PR8279, see also please.

2nd problem:
   It will be fixed by following patch for src/sbin/dhclient/Makefile.

I can't detect the cause and effect of the last 3 problems,
   because I have few infomation of perl5's installation mechanism.

>How-To-Repeat:

# cd /usr/src; make buildworld installworld DESTDIR=/S

(snip)
===> sbin/dhclient
install -c -o root -g wheel -m 555  /cvs/releng3/src/sbin/dhclient/../../contrib/isc-dhcp/client/scripts/freebsd /sbin/dhclient-script
install -c -s -o root -g wheel -m 555   dhclient /S/sbin
install -c -o root -g wheel -m 444 dhclient.conf.5.gz dhclient.leases.5.gz dhcp-options.5.gz  /S/usr/share/man/man5
install -c -o root -g wheel -m 444 dhclient.8.gz dhclient-script.8.gz  /S/usr/share/man/man8
(snip)

>Fix:
--- src/sbin/dhclient/Makefile.orig	Fri Feb 19 19:32:57 1999
+++ src/sbin/dhclient/Makefile	Tue Mar 16 19:56:06 1999
@@ -17,6 +17,6 @@

 beforeinstall:
 	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
-	    ${DIST_DIR}/client/scripts/freebsd ${BINDIR}/dhclient-script
+	    ${DIST_DIR}/client/scripts/freebsd ${DESTDIR}${BINDIR}/dhclient-script

 .include <bsd.prog.mk>

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: johan 
State-Changed-When: Wed Aug 23 04:46:14 PDT 2000 
State-Changed-Why:  
Fixed by bde in rev 1.4. 


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