# better management of php-src/pear and PEAR's future in php

- Thread: https://externals.io/message/45005
- Original archive: https://news-web.php.net/php.internals/45005
- Started by Greg Beaver on 2009-07-16T23:20:25+00:00
- Messages: 9
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #45005 — Greg Beaver — 2009-07-16T23:20:25+00:00

URL: https://externals.io/message/45005#45005

Hi,

I'd like to start a discussion on php-src/pear and how we can manage it
better for PHP 5.3, and to discuss the future of PEAR in PHP.

First, take note that both internals@ and pear-dev@ are copied on this
email.

For some background, currently the pear components are dynamically added
to a checkout by downloading from pear.php.net.  These components are
install-pear-nozlib.phar and go-pear.phar (for windows).  In addition,
the windows go-pear.phar is only downloaded by the build script for
windows.  Although this works, it adds some obscurity to how the process
really works.

I'd like to consider instead using svn:externals to pull in PEAR stuff
directly from a STABLE branch from somewhere in the pear/ hierarchy. 
This would allow us over at PEAR to push the installation phars into
that branch at the same time a release is made, and would also allow
quick fixes by a quick revert to a previous revision.

In terms of the future of PEAR in php-src, now that Pyrus is approaching
its first public releases, I'd like to brainstorm how best to replace
PEAR when the time is right.  Some questions that I have:

1) how important is the backwards compatibility of the "pear" and "pecl"
script commands?  I.e. does Pyrus need to provide a way to emulate the
interface to these scripts or can we break backwards compatibility on
this point by having these scripts just call pyrus's frontend with
default channels pear/pecl?
2) what about php 6?  Any interest in providing Pyrus with php 6? (this
is much more long-term hypothetical than the previous question since few
of you know anything about pyrus.  Pyrus is a PHP 5.3+ re-write of the
PEAR installer)

Thanks,
Greg

---

## #45007 — Pierre Joye — 2009-07-16T23:46:50+00:00

URL: https://externals.io/message/45005#45007 · In reply to: #45005

hi,


> Hi,
>
> I'd like to start a discussion on php-src/pear and how we can manage it
> better for PHP 5.3, and to discuss the future of PEAR in PHP.
>
> First, take note that both internals@ and pear-dev@ are copied on this
> email.
>
> For some background, currently the pear components are dynamically added
> to a checkout by downloading from pear.php.net.  These components are
> install-pear-nozlib.phar and go-pear.phar (for windows).  In addition,
> the windows go-pear.phar is only downloaded by the build script for
> windows.  Although this works, it adds some obscurity to how the process
> really works.

Is it possible to have one single phar for all platforms? That would
already make the whole thing easier to manage.

> I'd like to consider instead using svn:externals to pull in PEAR stuff
> directly from a STABLE branch from somewhere in the pear/ hierarchy.
> This would allow us over at PEAR to push the installation phars into
> that branch at the same time a release is made, and would also allow
> quick fixes by a quick revert to a previous revision.

Sounds clean enough and will hopefully avoid the recent issues.

> 1) how important is the backwards compatibility of the "pear" and "pecl"
> script commands?  I.e. does Pyrus need to provide a way to emulate the
> interface to these scripts or can we break backwards compatibility on
> this point by having these scripts just call pyrus's frontend with
> default channels pear/pecl?

New tools, new commands. How different is it to install a package?

Too early for php6 :)

Cheers,
-- 
Pierre

http://blog.thepimp.net | http://www.libgd.org

---

## #45009 — Greg Beaver — 2009-07-17T00:23:08+00:00

URL: https://externals.io/message/45005#45009 · In reply to: #45007

Pierre Joye wrote:
> hi,
>
> 
>   
> > […]
>
> Is it possible to have one single phar for all platforms? That would
> already make the whole thing easier to manage.
>   
This would be more challenging to do, but may be possible.  The biggest
problem is that go-pear is interactive, and install-pear is not.

One thing that is good to note is that both go-pear/install-pear may be
obsoleted by Pyrus since it doesn't need to be installed to work.  The
only thing that we'd need to distribute would be scripts to invoke
Pyrus.  My question is mainly whether to make stub "pear" and "pecl"
scripts that will invoke Pyrus, and if these should pretend to be PEAR
(support some of the more obscure things PEAR supports).
> > […]
>
> Sounds clean enough and will hopefully avoid the recent issues.
>
>   
> > […]
>
> New tools, new commands. How different is it to install a package?
Basic stuff is all the same, install/upgrade/uninstall work as PEAR
does, identical syntax and all.  Some of the more obscure stuff has been
removed, such as --soft, --register-only and --ignore-errors. 
Configuration has changed a bit, and the config-set command has been
replaced with just "set"  The "info" command performs the duty of both
info and remote-info, and remote-list has replaced list-all.  In
addition, the --installroot option as implemented by PEAR (which was
always strange) is gone, --packagingroot is the option for those doing
RPM building.

Pyrus, however, is alpha, which is why I'm asking what is really
important, we can still change it if anything is really crucial.

Greg

---

## #45010 — Pierre Joye — 2009-07-17T00:36:18+00:00

URL: https://externals.io/message/45005#45010 · In reply to: #45009

> > […]
> This would be more challenging to do, but may be possible.  The biggest
> problem is that go-pear is interactive, and install-pear is not.
>
> One thing that is good to note is that both go-pear/install-pear may be
> obsoleted by Pyrus since it doesn't need to be installed to work.  The
> only thing that we'd need to distribute would be scripts to invoke
> Pyrus.  My question is mainly whether to make stub "pear" and "pecl"
> scripts that will invoke Pyrus, and if these should pretend to be PEAR
> (support some of the more obscure things PEAR supports).

Even better :)

> > […]
> Basic stuff is all the same, install/upgrade/uninstall work as PEAR
> does, identical syntax and all.  Some of the more obscure stuff has been
> removed, such as --soft, --register-only and --ignore-errors.
> Configuration has changed a bit, and the config-set command has been
> replaced with just "set"  The "info" command performs the duty of both
> info and remote-info, and remote-list has replaced list-all.  In
> addition, the --installroot option as implemented by PEAR (which was
> always strange) is gone, --packagingroot is the option for those doing
> RPM building.
>
> Pyrus, however, is alpha, which is why I'm asking what is really
> important, we can still change it if anything is really crucial.

I would go with the new syntax, there is no need to keep BC here.

Cheers,
-- 
Pierre

http://blog.thepimp.net | http://www.libgd.org

---

## #45011 — johannes@php.net — 2009-07-17T01:04:59+00:00

URL: https://externals.io/message/45005#45011 · In reply to: #45005

> I'd like to consider instead using svn:externals to pull in PEAR stuff
> directly from a STABLE branch from somewhere in the pear/ hierarchy. 
> This would allow us over at PEAR to push the installation phars into
> that branch at the same time a release is made, and would also allow
> quick fixes by a quick revert to a previous revision.

How does this work with tagging or releases?
Currently the phar thing isn't tagged at all when building PHP releases,
but I assume the svn:externals would be copied as is and might lead to
wrong assumptions (like that a newer version was included) meaning we
make the tagging more complex or avoiding confusion.

Additionally: With the current process I can be assured that the package
being used is a released" package, such a linkage might catch a random
dev version or bad version numbers or ....

johannes

---

## #45019 — Lukas Kahwe Smith — 2009-07-17T19:19:28+00:00

URL: https://externals.io/message/45005#45019 · In reply to: #45011

> 
> > […]
>
> How does this work with tagging or releases?
> Currently the phar thing isn't tagged at all when building PHP  
> releases,
> but I assume the svn:externals would be copied as is and might lead to
> wrong assumptions (like that a newer version was included) meaning we
> make the tagging more complex or avoiding confusion.


if you svn copy .. it will copy the externals ..

regards,
Lukas Kahwe Smith
mls@pooteeweet.org

---

## #45025 — Matteo Beccati — 2009-07-17T23:01:38+00:00

URL: https://externals.io/message/45005#45025

Greg Beaver ha scritto:
> Matteo Beccati wrote:
> > […]
> 
> This sounds easy to forget - is it possible to script this?

Not sure how packaging currently works, but I'm pretty sure it is
possible to extend whatever we currently have to create an svn tag and
do the required changes before exporting for packaging.

If needed I can help with it once the whole process is defined.


Cheers
-- 
Matteo Beccati

OpenX - http://www.openx.org

---

## #45026 — Lukas Kahwe Smith — 2009-07-18T04:46:08+00:00

URL: https://externals.io/message/45005#45026 · In reply to: #45025

> Greg Beaver ha scritto:
> > […]
>
> Not sure how packaging currently works, but I'm pretty sure it is
> possible to extend whatever we currently have to create an svn tag and
> do the required changes before exporting for packaging.
>
> If needed I can help with it once the whole process is defined.


err .. of course you need to either point to a specific revision .. or  
better yet to a tag.

regards,
Lukas Kahwe Smith
mls@pooteeweet.org

---

## #45030 — Matthew Weier O'Phinney — 2009-07-18T22:09:05+00:00

URL: https://externals.io/message/45005#45030

> Matteo Beccati wrote:
> > […]
>
> This sounds easy to forget - is it possible to script this?

Yes -- we do it in ZF as we pull in Dojo via svn:externals.

We use "svn propget" to find where the svn:externals point, and then use
"svn info" on that externals URL to determine what the current revision
is. When we build the tag, we then create a new svn:externals definition
for the new tag that pins to that specific revision.

I'll find the relevant code from our build scripts and paste it in here
if you need specifics.

-- 
Matthew Weier O'Phinney
mweierophinney@gmail.com
http://weierophinney.net/matthew/
