Bug 22025

Summary: perl does chmod in installworld
Product: Base System Reporter: Lowell Gilbert <lowell>
Component: gnuAssignee: Mark Murray <markm>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.1.1-STABLE   
Hardware: Any   
OS: Any   

Description Lowell Gilbert 2000-10-16 15:20:01 UTC
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...

Fix: The obvious workaround is:
================================================================


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.]--IRmghn4uyk01DFp7Yja5rsqw0Hre25NRw6q4T2Lr8BnIdtuQ
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

*** 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}; \
================================================================
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.
Comment 1 Johan Karlsson freebsd_committer freebsd_triage 2000-10-16 22:19:35 UTC
Responsible Changed
From-To: freebsd-bugs->markm

Over to perl maintainer who might know if pern install 
should use chmod.
Comment 2 Sheldon Hearn 2000-11-23 12:21:45 UTC
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.
Comment 3 Sheldon Hearn freebsd_committer freebsd_triage 2000-11-24 12:43:23 UTC
State Changed
From-To: open->suspended

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.
Comment 4 Mark Murray freebsd_committer freebsd_triage 2001-07-08 08:16:48 UTC
State Changed
From-To: suspended->closed

Fixed by marcel, Makefile.inc1 1.176,1.178