Re: Question wrt dual-PEAR
| From: | MadCoder | Date: | Tue, 01 Feb 2005 06:01:23 +0000 |
| Subject: | Re: Question wrt dual-PEAR | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-35848@lists.php.net to get a copy of this message | ||
Greg Beaver wrote:
> Pierre Habouzit wrote:
>> Hi, I'm interested into PEAR packaging for debian (I'm currently near
>> to be Debian Developper [1]).
>>
>> I'm really interested into web apps packaging in debian, and mostly in
>> php which is the language I use the most for web apps. The thing is
>> that (IMHO) php, especially PEAR isn't in a very good shape in debian.
>>
>> Our major problem is that We (I say *we* because I've talk a bit with
>> PHP debian maintainer that are /de/ /facto/ PEAR maintainer atm) do not
>> have found any good way to maintain two branch of PEAR on the same box.
>> I'll explain :
>>
>> * we have PEAR libraries that are in real debian packages that live
>> in /usr/share/php/
>>
>> * OTOH we would like to have a way to allow a user to install with the
>> 'pear' command his packages into /usr/local/share/php, without
>> having to duplicate the whole /usr/share/php tree.
>
> So, you would like each user in a multi-user situation, or a superuser?
sorry, I used multi-user with a quite wrong meaning. I meant the distinction
between debian specific packages that live in /usr/share/php and localy
installed (not through debian package) should live in /usr/local/...
In fact, what I would like is that by default pear used by root installs all
his things in /usr/local/share/php but that it takes in account what lives
in /usr/share/php (that we can assume beeing always older that what the
root installs, so I belive it's sane to make /usr/local/share/php live
before /usr/share/php in the include_path... I belive it's the way perl and
python packages work in debian, and it's a nice way)
see [1] and [2]. In fact, it's the way emacsen, python, perl packages work,
but not pear, and it's a real problem.
> If you wish a superuser to install, the best solution is to distribute a
> file with debian, /root/.pearrc. This file would define the install
[...]
> PEAR will first check the .pearrc file, and then check the system-wide
> pear.conf file. This will only work for root, so you would need to
> create .pearrc files in the ~ directory for each superuser that needs
> this facility.
I cannot write in /root
an /etc/pearrc would be really greath though.
the main reason is that a sudo user that keeps his environment will need
a .pearrc and that is quite a bad idea : if I need some upgrade of
those .pearrc ... then I in the big s**t (TM)
> If you wish to have each user install pear in a multi-user situation,
> then you would want to do the same thing for each user, except have it
> install into /usr/local/share/username/php and make sure the permissions
> are set up with the user management tool.
for the multi-user, users are on their own. the right solution is to ask to
the root a sudo, or to use the same mechanism as root wrt /usr/local/....
because I really think we can find a good solution ;)
> Does this answer the question?
partially. What I'd love in fact, would be to say in /etc/pear.conf
or /etc/pearrc whatever the name is :
hey dear pear :
* you install all your stuff in /usr/local/share/php (datas in ..../data,
and so on)
* BUT for the dependencies, you have to check /usr/share/php _too_
I need sth like that AND the ability to override the settings on pear
command line in order to make dpkg work. I won't post my link again. but
basically , what I do is :
(1) during the package creation : a forced install in a forced dir
ignoring deps
(2) during postinst I use pear install -r (register only) since the files
of the module already are in the good place thanks to dpkg. and with that,
I have both pear and dpkg happy. that was quite hard to write, but since it
work great, the packaging is ok.
My only concern is that atm as I said multiple time, i don't know how to
make default 'pear' command wanting to make modules live
in /usr/local/share/php by default, but still taking /usr/share/php into
acount
> It would be great to have better debian support for PEAR, please ask any
> time if there is something that we can do.
yeah, As a php programmer (I program an alumni site for my school, and it's
a _huge_ site) I'm allways sad to see how many lib*-perl live in debian,
wrt so few php-* :/
[1] http://www.nl.debian.org/doc/debian-policy/ch-opersys.html#s9.1.2
[2] http://www.pathname.com/fhs/2.2/fhs-4.9.html
--
·O· Pierre Habouzit
··O
OOO http://www.madism.org