Bug 22405

Summary: installworld still bombs on perl and other packages
Product: Base System Reporter: cwasser <cwasser>
Component: kernAssignee: Sheldon Hearn <sheldonh>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.1.1-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description cwasser 2000-10-30 04:30:00 UTC
	Installworld still fails with missing chmod, sort, tr.
	Temporary fix was submitted to freebsd-stable by Warner Losh <imp@village.org>
	on Tue, 29 Aug 2000 14:28:39 -0600

	Can reliably produce same results on fresh new sources. Seems to be
	still related with perl build in buildworld.

How-To-Repeat: 
	This seems to happen when either updated sources from previous 4.x
	cvsups and even fresh new sources from cvs respository. To reproduce,
	cvsup sources and buildworld, then installworld. Had to patch 6
	different machines yesterday, all with this problem.

	If this is in error (can't see how 6 fresh boxes can be wrong) then
	please disregard.
Comment 1 Sheldon Hearn freebsd_committer freebsd_triage 2000-10-30 15:19:10 UTC
Responsible Changed
From-To: freebsd-bugs->sheldonh

If this makes it through a ``make world'' tonight (which it should, 
since none of these programs rely on any weird dependencies), 
I'll be able to commit the patch in time for 4.2-RELEASE. 

Thanks!
Comment 2 Sheldon Hearn 2000-11-02 09:44:25 UTC
Hi Chris,

It occurs to me that some of these dependencies might be removed with
the use of better shell tricks and stuff.  Could you send the actual
build failures you see without your patch?  I'd like to take a crack at
fixing this "properly" if I can.  Those tools which simply can't be done
without will be added, of course.

Ciao,
Sheldon.
Comment 3 Sheldon Hearn 2000-11-02 11:55:41 UTC
On Thu, 02 Nov 2000 04:53:12 MST, Chris Wasser wrote:

> As soon as I have actual build and install output to show you
> I'll have it mailed so you can examine it (and hopefully
> doesn't make a liar out of me :))

Great!  The exact build failures will help me isolate the places where
things things are actually used.  From there, I can figure out whether
their use can be replaced with something else.

Ciao,
Sheldon.
Comment 4 Bruce A. Mah freebsd_committer freebsd_triage 2000-11-22 18:11:55 UTC
I have some data that may be useful.  I've been experiencing
similar problems on 4-STABLE for awhile.  Logs of my latest buildworld/
buildkernel/installworld (4.2-STABLE) can be found at:

http://people.freebsd.org/~bmah/world/

In particular, please see:

http://people.freebsd.org/~bmah/world/installworld.out

Thanks!

Bruce.

Comment 5 Sheldon Hearn 2000-11-23 12:22:30 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.

Ciao,
Sheldon.
Comment 6 Sheldon Hearn 2000-11-23 16:40:33 UTC
On Thu, 23 Nov 2000 08:34:21 PST, Bruce A. Mah wrote:

> Yeah.  I looked at this once (thinking it was a two minute fix).  Quickly
> learned the opposite.  I would suggest putting the chmod(1) hack in
> for now, [...]

I don't like that idea.  So much crud gets buried like that, and a few
more days (if that) won't hurt.

Could you (or any other interested parties) try to hack static_lib() in
src/contrib/perl/lib/ExtUtils/MM_Unix.pm so that $(CHMOD) is passed
$(PERM_RW) instead of $(PERM_RWX) and let me know how that influences
the installworld problem?

I haven't tested this at all, but if you have a few CPU cycles to spare,
I'd really appreciate the help.  You could probably install into a
different DESTDIR if you don't trust the change.  I wouldn't trust the
change myself.

Ciao,
Sheldon.
Comment 7 Sheldon Hearn 2000-11-23 16:44:02 UTC
On Thu, 23 Nov 2000 18:40:33 +0200, Sheldon Hearn wrote:

> Could you (or any other interested parties) try to hack static_lib() in
> src/contrib/perl/lib/ExtUtils/MM_Unix.pm so that $(CHMOD) is passed
> $(PERM_RW) instead of $(PERM_RWX) and let me know how that influences
> the installworld problem?

Woooah!  Waaay too much LSD.  :-)

I should have asked you to remove that line entirely.  I'm talking about
this in static_lib():

	$(CHMOD) $(PERM_RWX) $@

You should get away with ripping that entire line out.

Ciao,
Sheldon.
Comment 8 Sheldon Hearn freebsd_committer freebsd_triage 2000-11-24 12:42:19 UTC
State Changed
From-To: open->closed

I've added chmod(1) to the ${INSTALLTMP} tools in RELENG_4. 
If we ever find that sort(1) and tr(1) are real problems, we 
can look at adding those as well.
Comment 9 Bruce A. Mah freebsd_committer freebsd_triage 2000-11-27 22:26:28 UTC
If memory serves me right, Sheldon Hearn wrote:

> On Thu, 23 Nov 2000 18:40:33 +0200, Sheldon Hearn wrote:
> 
> > Could you (or any other interested parties) try to hack static_lib() in
> > src/contrib/perl/lib/ExtUtils/MM_Unix.pm so that $(CHMOD) is passed
> > $(PERM_RW) instead of $(PERM_RWX) and let me know how that influences
> > the installworld problem?
> 
> Woooah!  Waaay too much LSD.  :-)
> 
> I should have asked you to remove that line entirely.  I'm talking about
> this in static_lib():
> 
> 	$(CHMOD) $(PERM_RWX) $@
> 
> You should get away with ripping that entire line out.

Sorry I didn't get back to you until now...American Turkey Day (not to
be confused with American Election Day) and all that.  I just saw your
commits to Makefile.inc1, should I assume that the Perl build will stay
this way at least for awhile?  I'm not even familiar with the script 
you mentioned, so it'll take me a little while to play with it.  (What 
I mean is:  I can take a look, but it won't be immediately, alas.)

It'd be nice to get rid of that chmod, aesthetics aside, since it's one
of the things that would get in the way of an install from a read-only
partition.

Thanks for the help...

Bruce.

Comment 10 Bruce A. Mah freebsd_committer freebsd_triage 2000-11-30 19:16:11 UTC
If memory serves me right, Sheldon Hearn wrote:

> I should have asked you to remove that line entirely.  I'm talking about
> this in static_lib():
> 
> 	$(CHMOD) $(PERM_RWX) $@

Hi Sheldon--

I just completed a buildworld/buildkernel/installkernel/installworld on 
4-STABLE, as of about Monday, patched as shown below.

Everything completed without incident, and the machine is up and running
in multi-user mode.  So far it looks like a success.  I do not know how
to test the libraries further, other than to say that they seem to have 
the same permissions as before:

48 -r-xr-xr-x  1 root  wheel  24525 Nov 27 16:32 SDBM_File.so

If you tell me what to do, I can try some checks and report back.

Bruce.

Index: Makefile.inc1
===================================================================
RCS file: /cvsroot/src/Makefile.inc1,v
retrieving revision 1.141.2.17
diff -c -r1.141.2.17 Makefile.inc1
*** Makefile.inc1	2000/11/24 11:16:02	1.141.2.17
--- Makefile.inc1	2000/11/30 10:38:52
***************
*** 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}; \
--- 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}; \
Index: contrib/perl5/lib/ExtUtils/MM_Unix.pm
===================================================================
RCS file: /cvsroot/src/contrib/perl5/lib/ExtUtils/MM_Unix.pm,v
retrieving revision 1.4
diff -c -r1.4 MM_Unix.pm
*** contrib/perl5/lib/ExtUtils/MM_Unix.pm	1999/05/02 15:18:28	1.4
--- contrib/perl5/lib/ExtUtils/MM_Unix.pm	2000/11/27 22:58:16
***************
*** 3008,3014 ****
  
      push @m,
  q{	$(AR) $(AR_STATIC_ARGS) $@ $(OBJECT) && $(RANLIB) $@
- 	$(CHMOD) $(PERM_RWX) $@
  	}.$self->{NOECHO}.q{echo "$(EXTRALIBS)" > $(INST_ARCHAUTODIR)/extralibs.ld
  };
      # Old mechanism - still available:
--- 3008,3013 ----