From lowell@be-well.ilk.org  Mon Oct 16 07:19:56 2000
Return-Path: <lowell@be-well.ilk.org>
Received: from be-well.ilk.org (lowellg.ne.mediaone.net [24.147.184.128])
	by hub.freebsd.org (Postfix) with ESMTP id D889337B503
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 16 Oct 2000 07:19:55 -0700 (PDT)
Received: (from lowell@localhost)
	by be-well.ilk.org (8.11.1/8.11.1) id e9GEJsl08797;
	Mon, 16 Oct 2000 10:19:54 -0400 (EDT)
	(envelope-from lowell)
Message-Id: <200010161419.e9GEJsl08797@be-well.ilk.org>
Date: Mon, 16 Oct 2000 10:19:54 -0400 (EDT)
From: lowell@world.std.com
Sender: lowell@be-well.ilk.org
Reply-To: lowell@world.std.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: perl build 
X-Send-Pr-Version: 3.2

>Number:         22025
>Category:       gnu
>Synopsis:       perl does chmod in installworld
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    markm
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 16 07:20:01 PDT 2000
>Closed-Date:    Sun Jul 8 00:16:48 PDT 2001
>Last-Modified:  Sun Jul 08 00:18:05 PDT 2001
>Originator:     Lowell Gilbert
>Release:        FreeBSD 4.1.1-STABLE i386
>Organization:
n/a
>Environment:

4-STABLE (for the last few weeks, apparently)
My environment is vanilla in every respect I can imagine to be 
relevant.

The only entries in my make.conf are:
 CFLAGS= -O -pipe
 COPY=-C
 USA_RESIDENT=YES
 MAKE_IDEA=YES
 CD_MOUNTPT=/mnt/cdrom
 FETCH_BEFORE_ARGS=-p
 FTP_PASSIVE_MODE=YES
 TOP_TABLE_SIZE= 101

>Description:

The perl install tries to do a chmod, which isn't in the installworld
limited environment.  I'm not sure why there are so few of us getting
bitten by this, but it's an interaction between perl's own build
system and FreeBSD's.

This keeps a normal installworld from working...

>How-To-Repeat:

"make installworld" eventually leads to:

  ===> gnu/usr.bin/perl/library/SDBM_File
  cd /usr/obj/usr/src/gnu/usr.bin/perl/library/SDBM_File/ext/SDBM_File ; make -B install  INSTALLPRIVLIB=/usr/libdata/perl/5.00503  INSTALLARCHLIB=/usr/libdata/perl/5.00503/mach
  cd sdbm && make all
  rm -rf libsdbm.a
  ar cr libsdbm.a sdbm.o  pair.o  hash.o && : libsdbm.a
  chmod 755 libsdbm.a
  chmod:No such file or directory
  *** Error code 1

  Stop in /usr/obj/usr/src/gnu/usr.bin/perl/library/SDBM_File/ext/SDBM_File/sdbm.
  *** Error code 1

etc.


>Fix:

The obvious workaround is:
================================================================
*** Makefile.inc1~      Mon Oct 16 10:05:12 2000
--- Makefile.inc1       Mon Oct 16 10:05:30 2000
***************
*** 298,304 ****
  #
  installworld:
        mkdir -p ${INSTALLTMP}
!       for prog in [ awk cat chflags chown date echo egrep find grep \
            install ln make makewhatis mtree mv perl rm sed sh sysctl \
            test true uname wc zic; do \
                cp `which $$prog` ${INSTALLTMP}; \
--- 298,304 ----
  #
  installworld:
        mkdir -p ${INSTALLTMP}
!       for prog in [ awk cat chflags chmod chown date echo egrep find grep \
            install ln make makewhatis mtree mv perl rm sed sh sysctl \
            test true uname wc zic; do \
                cp `which $$prog` ${INSTALLTMP}; \
================================================================

However, I don't think perl should *need* the chmod, so there's
probably a better answer.

[I can think of some other workarounds, such as using '-k' on the make
command, but this one is less ugly.]

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->markm 
Responsible-Changed-By: johan 
Responsible-Changed-When: Mon Oct 16 14:19:35 PDT 2000 
Responsible-Changed-Why:  
Over to perl maintainer who might know if pern install 
should use chmod. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=22025 

From: Sheldon Hearn <sheldonh@uunet.co.za>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: gnu/22025: perl does chmod in installworld
Date: Thu, 23 Nov 2000 14:21:45 +0200

 On Tue, 21 Nov 2000 16:29:01 MST, Chris Wasser wrote:
 
 > Hi Sheldon, sorry it took so long for me to get back to you on this,
 > this is exactly the problem that happens with PR 22025, I'm attaching
 > my logs I made to you so you can examine the problem (as requested).
 
 The install failure given has been discussed recently on one of the
 mailing lists.  Changing the permissions on the file using chmod is just
 plain silly.
 
 The install process should use install(1) to install the file with the
 correct ownerships and permissions.
 
 Therefore, the patch provided in the PR should not be adopted.  It would
 only obscure the real problem.
 
 I'm still waiting for feedback that shows why tr is needed (as suggested
 in kern/22405).  But that should probably not be sent in as follow-up on
 _this_ PR.
 
 Ciao,
 Sheldon.
 
State-Changed-From-To: open->suspended 
State-Changed-By: sheldonh 
State-Changed-When: Fri Nov 24 04:43:23 PST 2000 
State-Changed-Why:  
I've added chmod to the list of ${INSTALLTMP} files in Makefile.inc1. 
This works around the horrendous perl5 build, which isn't going to 
change in a hurry. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=22025 
State-Changed-From-To: suspended->closed 
State-Changed-By: markm 
State-Changed-When: Sun Jul 8 00:16:48 PDT 2001 
State-Changed-Why:  
Fixed by marcel, Makefile.inc1 1.176,1.178                   


http://www.FreeBSD.org/cgi/query-pr.cgi?pr=22025 
>Unformatted:
