Обсуждение: Installation location of Perl and Python modules

Поиск
Список
Период
Сортировка

Installation location of Perl and Python modules

От
Peter Eisentraut
Дата:
I need a user poll regarding a PostgreSQL 7.2 development issue.  In what
follows I only speak of Perl, but you may substitute Python almost
everywhere.

There have been complaints that the Perl module automatically installs
itself under /usr/lib/perl5, even if the installer is not the root user
and even if he specified a different --prefix.  It would naturally be
beneficial if users without root access, or those that don't want to
overwrite their system installation, had the chance to install the Perl
module somewhere, somehow.

The question is which of the following installation schemes would be
useful to provide, and which one should be the default.

1. Install it under /usr/lib/perl5 (or whatever the default location).

2. Install it under $prefix/lib/perl5, where $prefix is what is chosen for
   PostgreSQL.  This would improve the likelyhood of write access to the
   location, give you a perlish layout, and (usually) fall back to the
   default if you specify --prefix=/usr.  It might also be rather compliant
   to some file system standard.

3. Install it under $prefix/lib/postgresql.  This would guarantee
   write access, and enhance the consistency with the GNU-style configure
   process.  It could also be compliant to some file system standard.

4. Provide an option to freely choose the location.  But keep in mind that
   "free to choose" also means "inconsistent" and "easy to get lost".

Anything but #1 will require setting the environment variable PERLLIB or
use -I flags or some such.  This is not inconsistent with the requirement
to set PATH, MANPATH, etc., at least if Perl were to search something in
/usr/local by default.

Currently, we have #1 as the default and incomplete, hidden support for
#3.  If we were to start in a green field we might make #2 the default
with an option for #4.

The questions are, "what would users expect" and "what would users like"?

--
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter


Re: Installation location of Perl and Python modules

От
Bradley McLean
Дата:
Is it out of the question to do #3 (or #2), and offer an alternate
install target to copy to #1?

If I'm actively using postgres with a scripting language, I'll want
it installed in the standard system installation of that language.
This would require a separate install step (or an additional .rpm
or .deb).

If, I'm not, and perhaps trying to careful control the standard system
install of that language, I won't want it installed there.

So I'd argue that placing it completely within the postgres environment,
and then offering a post-install step to transfer it to the installing
person's choice of location (generally the standard language location)
would be an appropriate solution.

I would expect that the install of one package not ding the install of
another.  I would like the above.  I would settle for #3.

-Brad McLean

* Peter Eisentraut (peter_e@gmx.net) [010911 13:58]:
> I need a user poll regarding a PostgreSQL 7.2 development issue.  In what
> follows I only speak of Perl, but you may substitute Python almost
> everywhere.
>
> There have been complaints that the Perl module automatically installs
> itself under /usr/lib/perl5, even if the installer is not the root user
> and even if he specified a different --prefix.  It would naturally be
> beneficial if users without root access, or those that don't want to
> overwrite their system installation, had the chance to install the Perl
> module somewhere, somehow.
>
> The question is which of the following installation schemes would be
> useful to provide, and which one should be the default.
>
> 1. Install it under /usr/lib/perl5 (or whatever the default location).
>
> 2. Install it under $prefix/lib/perl5, where $prefix is what is chosen for
>    PostgreSQL.  This would improve the likelyhood of write access to the
>    location, give you a perlish layout, and (usually) fall back to the
>    default if you specify --prefix=/usr.  It might also be rather compliant
>    to some file system standard.
>
> 3. Install it under $prefix/lib/postgresql.  This would guarantee
>    write access, and enhance the consistency with the GNU-style configure
>    process.  It could also be compliant to some file system standard.
>
> 4. Provide an option to freely choose the location.  But keep in mind that
>    "free to choose" also means "inconsistent" and "easy to get lost".
>
> Anything but #1 will require setting the environment variable PERLLIB or
> use -I flags or some such.  This is not inconsistent with the requirement
> to set PATH, MANPATH, etc., at least if Perl were to search something in
> /usr/local by default.
>
> Currently, we have #1 as the default and incomplete, hidden support for
> #3.  If we were to start in a green field we might make #2 the default
> with an option for #4.
>
> The questions are, "what would users expect" and "what would users like"?

Re: Installation location of Perl and Python modules

От
"Oliver Elphick"
Дата:
Peter Eisentraut wrote:
  >The question is which of the following installation schemes would be
  >useful to provide, and which one should be the default.
  >
  >1. Install it under /usr/lib/perl5 (or whatever the default location).
  >
  >2. Install it under $prefix/lib/perl5, where $prefix is what is chosen for
  >   PostgreSQL.  This would improve the likelyhood of write access to the
  >   location, give you a perlish layout, and (usually) fall back to the
  >   default if you specify --prefix=/usr.  It might also be rather compliant
  >   to some file system standard.
  >
  >3. Install it under $prefix/lib/postgresql.  This would guarantee
  >   write access, and enhance the consistency with the GNU-style configure
  >   process.  It could also be compliant to some file system standard.
  >
  >4. Provide an option to freely choose the location.  But keep in mind that
  >   "free to choose" also means "inconsistent" and "easy to get lost".

#2 sounds like the closest to what I need for building the Debian package,
which is to install to $(DESTDIR)/usr/lib/perl5 in such a way that it will
work fine when $(DESTDIR) is copied to /. I also want the man page under
$(DESTDIR)/usr/share/man.  So the package ends up like this:

$ dpkg -L libpgperl
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/libpgperl
/usr/share/doc/libpgperl/copyright
/usr/share/doc/libpgperl/README.gz
/usr/share/doc/libpgperl/changelog.Debian.gz
/usr/share/man
/usr/share/man/man3
/usr/share/man/man3/Pg.3pm.gz
/usr/share/lintian
/usr/lib
/usr/lib/postgresql
/usr/lib/postgresql/lib
/usr/lib/postgresql/lib/plperl.so
/usr/lib/perl5
/usr/lib/perl5/auto
/usr/lib/perl5/auto/Pg
/usr/lib/perl5/auto/Pg/Pg.so
/usr/lib/perl5/auto/Pg/Pg.bs
/usr/lib/perl5/auto/Pg/autosplit.ix
/usr/lib/perl5/Pg.pm

but has been built under $(DESTDIR).

I have to do a bit of tweaking at the moment to get it right.

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47  6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "I am crucified with Christ; nevertheless I live; yet
      not I, but Christ liveth in me; and the life which I
      now live in the flesh I live by the faith of the Son
      of God, who loved me, and gave himself for me."
                                         Galatians 2:20



Re: Installation location of Perl and Python modules

От
Lamar Owen
Дата:
On Tuesday 11 September 2001 04:51 pm, Oliver Elphick wrote:
> #2 sounds like the closest to what I need for building the Debian package,
> which is to install to $(DESTDIR)/usr/lib/perl5 in such a way that it will
> work fine when $(DESTDIR) is copied to /. I also want the man page under
> $(DESTDIR)/usr/share/man.  So the package ends up like this:

> but has been built under $(DESTDIR).

> I have to do a bit of tweaking at the moment to get it right.

You and me both...

Currently, the RPATH setting deal is the hardest to deal with, thanks to
MakeMaker.  And that is one of the hardest parts of all this -- MakeMaker has
its own deals.  So editing the generated Makefile to change the LD_RUN_PATH
is necessary.
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11

Re: Installation location of Perl and Python modules

От
Marko Kreen
Дата:
On Tue, Sep 11, 2001 at 06:11:58PM +0200, Peter Eisentraut wrote:
> There have been complaints that the Perl module automatically installs
> itself under /usr/lib/perl5, even if the installer is not the root user
> and even if he specified a different --prefix.  It would naturally be
> beneficial if users without root access, or those that don't want to
> overwrite their system installation, had the chance to install the Perl
> module somewhere, somehow.


I would vote for the #2 + #4:

> 2. Install it under $prefix/lib/perl5, where $prefix is what is chosen for
>    PostgreSQL.  This would improve the likelyhood of write access to the
>    location, give you a perlish layout, and (usually) fall back to the
>    default if you specify --prefix=/usr.  It might also be rather compliant
>    to some file system standard.

> 4. Provide an option to freely choose the location.  But keep in mind that
>    "free to choose" also means "inconsistent" and "easy to get lost".

> If we were to start in a green field we might make #2 the default
> with an option for #4.

If users accepts default settings, he probably installs it into
some separate location anyway.  (At least I do that)  If
PostgreSQL starts modifing outside tree it would come as bad
surprise.

But lets allow people who want or need to choose location to do
that freely - they are probably distributors or other people who
know about their system layout more than we.

Thay way the default wont hurt anyone, and if needed can be
overrided.


--
marko


Re: Installation location of Perl and Python modules

От
Peter Eisentraut
Дата:
Oliver Elphick writes:

> #2 sounds like the closest to what I need for building the Debian package,
> which is to install to $(DESTDIR)/usr/lib/perl5 in such a way that it will
> work fine when $(DESTDIR) is copied to /.

That is an entirely different question.  The Perl module already supports
$(DESTDIR) in current sources.

--
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter