Re: [HACKERS] make install fails in perl5 ... - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] make install fails in perl5 ...
Date
Msg-id 6030.909505644@sss.pgh.pa.us
Whole thread Raw
In response to make install fails in perl5 ...  (The Hermit Hacker <scrappy@hub.org>)
Responses Re: [HACKERS] make install fails in perl5 ...  (Vince Vielhaber <vev@michvhf.com>)
Re: [HACKERS] make install fails in perl5 ...  (Brook Milligan <brook@trillium.NMSU.Edu>)
Re: [HACKERS] make install fails in perl5 ...  ("Billy G. Allie" <Bill.Allie@mug.org>)
List pgsql-hackers
The Hermit Hacker <scrappy@hub.org> writes:
> So, who took the root check out, and when, and why?  

Well, I didn't do it, but I agree with whoever took it out.  You cannot
test at *configure* time to see whether the invoker of configure is
root.  It is not reasonable to expect people to do the configure and
build as root, even if they su to root for the install step (which
is surely the WRONG thing for a Postgres install anyway!)

I wouldn't care for a test on rootness even if it were done at the right
time, ie, install step.  That's an entirely unwarranted assumption about
how people set up their file ownership.  (For example, on my machine the
Perl5 tree belongs to user "gnu", not root.)  A more useful test would
be whether you have write permission on the Perl5 install tree top-level
directory, but that seems to require knowing where the Perl5 install
tree *is*, a fact that's buried inside the Perl-generated makefile.

Maybe we could modify src/interfaces/Makefile along this line:

install-perl5:$(MAKE) -C perl5 cleancd perl5 && POSTGRES_HOME="$(POSTGRESDIR)" perl Makefile.PLif test -w `PERL-LIB`
then   $(MAKE) -C perl5 install    rm -f perl5/Makefileelse    echo "Postponing Perl install, don't have permissions."
 echo "To install, cd into interfaces/perl5, su to Perl"    echo "file owner, and do 'make install'."fi
 

where PERL-LIB is some sed hackery to extract the PERL_LIB
definition from the just-built perl5/Makefile.

If you like this I will see what I can do with the idea.

We'll also need to discuss this whole business in the INSTALL
directions.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Last call?
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Last call?