develooper Front page | perl.perl5.porters | Postings from November 2003

Re: [perl #24486] 'make install' should not assume writable build directory

Thread Previous | Thread Next
From:
Slaven Rezic
Date:
November 13, 2003 05:16
Subject:
Re: [perl #24486] 'make install' should not assume writable build directory
Message ID:
1068728948.21396@devpc01.iconmobile.de
"david_wallis@bmc.com (via RT)" <perlbug-followup@perl.org> wrote:
> # New Ticket Created by  david_wallis@bmc.com 
> # Please include the string:  [perl #24486]
> # in the subject line of all future correspondence about this issue. 
> # <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=24486 >
> 
> 
> This is a bug report for perl from dawallis@gyoza.bmc.com,
> generated with the help of perlbug 1.34 running under perl v5.8.2.
> 
> 
> -----------------------------------------------------------------
> [Please enter your report here]
> 
> 'make install' should not attempt to change any file or directory
> that has previously been created by 'make'. Both AIX and HPUX 
> installs attempt to rebuild Dynaloader.a, and possibly other
> files. Not only is this unnecessary because Dynaloader is already
> up to date, but it also causes permission problems:
> 
> If I have changed to a different userid for the install, I probably
> don't have permission to make such changes any more. (Remember that
> root has NO PRIVILEGES on an NFS filesystem as a general rule.)
> 
> Also, remember that developers may or may not have the password to
> root on their build machines, which causes problems creating perl
> to be included in other products.
> 

Here's some analysis of the problem. The blibdirs sections of DynaLoader's
Makefile looks like this on my system:

blibdirs :: 
	$(NOECHO) $(MKPATH) \
	  $(INST_LIBDIR) $(INST_AUTODIR) \
	  $(INST_ARCHAUTODIR) $(INST_BIN) \
	  $(INST_SCRIPT) $(INST_MAN1DIR) \
	  $(INST_MAN3DIR) 
	$(NOECHO) $(CHMOD) 755 \
	  $(INST_LIBDIR) $(INST_AUTODIR) \
	  $(INST_ARCHAUTODIR) $(INST_BIN) \
	  $(INST_SCRIPT) $(INST_MAN1DIR) \
	  $(INST_MAN3DIR) 
	$(NOECHO) $(TOUCH) blibdirs

As it stands, this rule gets always fired in a static DynaLoader
build. Maybe it would be better if ExtUtils::MM_Any::blibdirs spit
out something like:

blibdirs :: $(INST_LIBDIR) $(INST_AUTODIR) \
	    $(INST_ARCHAUTODIR) $(INST_BIN) \
	    $(INST_SCRIPT) $(INST_MAN1DIR) \
	    $(INST_MAN3DIR)
	$(NOECHO) $(TOUCH) blibdirs

$(INST_LIBDIR) :
	$(NOECHO) $(MKPATH) $(INST_LIBDIR)
	$(NOECHO) $(CHMOD) 755 $(INST_LIBDIR)

$(INST_AUTODIR) :
	$(NOECHO) $(MKPATH) $(INST_AUTODIR)
	$(NOECHO) $(CHMOD) 755 $(INST_AUTODIR)

$(INST_ARCHAUTODIR) :
	$(NOECHO) $(MKPATH) $(INST_ARCHAUTODIR)
	$(NOECHO) $(CHMOD) 755 $(INST_ARCHAUTODIR)

$(INST_BIN)  :
	$(NOECHO) $(MKPATH) $(INST_BIN) 
	$(NOECHO) $(CHMOD) 755 $(INST_BIN) 

$(INST_SCRIPT) :
	$(NOECHO) $(MKPATH) $(INST_SCRIPT)
	$(NOECHO) $(CHMOD) 755 $(INST_SCRIPT)

$(INST_MAN1DIR)  :
	$(NOECHO) $(MKPATH) $(INST_MAN1DIR) 
	$(NOECHO) $(CHMOD) 755 $(INST_MAN1DIR) 

$(INST_MAN3DIR)  :
	$(NOECHO) $(MKPATH) $(INST_MAN3DIR) 
	$(NOECHO) $(CHMOD) 755 $(INST_MAN3DIR) 


This is not perfect, either, because GNU make emits some warnings
about overridden targets ($(INST_ARCHAUTODIR) and $(INST_AUTODIR) are
the same here).

Regards,
    Slaven

-- 
     __o		Slaven Rezic
   _`\<,_		slaven <at> rezic <dot> de
__(_)/ (_)____
______________________________________________________________________________

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About