Le 25/01/2012 03:23, Jason L Tibbitts III a écrit :
Greetings, PHP experts.
Hi,
Quite a long answer...
I currently maintain (rather poorly) the Horde
groupware suite (horde, imp, ingo, jeta, kronolith, turba) in Fedora.
(There are also a few pieces of the suite that aren't packaged, mainly
because I have no use for them.)
Our version is quite outdated at this point, held up by the fact that
the Horde developers split there monolithic packages up into a multitude
of small packages delivered through a PEAR channel. And while this
makes it pretty simple from a non-distro deployment standpoint, getting
this all packaged up for Fedora looks rather un-fun.
We have done such a work for the Ez components (php-ezc-*)
Not funny but really useful
(some components are also used/required by other applications).
So, a few questions:
Is there any existing utility for automating the conversion of a PEAR
channel full of stuff into Fedora-acceptable specs?
Yes :)
(of course, we don't like doing work which can be scripted)
# yum install php-pear-PEAR-Command-Packaging
For the Channel
$ wget
http://pear.horde.org/channel.xml
$ pear make-rpm-spec channel.xml
Wrote RPM spec file php-channel-horde.spec
For each component :
$ pear download horde/Horde_Log
File /tmp/Horde_Log-1.1.2.tgz downloaded
$ pear make-rpm-spec Horde_Log-1.1.2.tgz
Wrote RPM spec file php-horde-Horde-Log.spec
The generated spec is quite good and respect the Fedora PHP Guildeline
Just a few check / cleanup
This can be a good opportunity to improve
php-pear-PEAR-Command-Packaging (still a minor bug on non standard
channel provides, Tim Jackson is upstream and maintainer, I also
co-maintain it and could work to improve the fedora template)
Dependencies are generally well defined by upstream in the package.xml
and then managed by "make-rpm-spec", but phpci could also detect some
requirement on PHP version / extension.
$ phpci print -r Horde_Log-1.1.2
...
=> REQUIRED PHP 5.1.0 (MIN)
$ phpci print --report extension -R Horde_Log-1.1.2
=> Core, SPL, SimpleXML, date, dom, pcre, standard, xml
As this package requires php 5.2 with dom extension (from upstream),
result will be, in this case (other extensions are in php-common)
Requires: php-xml >= 5.2.0
How about anything to help with monitoring said PEAR channel for
updates
to make sure things stay properly updated?
pear list-upgrades
Or, "my" upstream monitoring tool
ex
http://rpms.famillecollet.com/rpmphp/rpm.php?type=pear&what=%23phpunit
Of course I can add a new channel easily.
Any chance of assistance with something on the order of a hundred
new
package reviews? Or, even better, any chance of anyone wanting to help
out with maintenance?
I can help, for the reviewsss, and why not, for some packages
I will propose to start with the channel + 2-3 packages
I also notice than this packages come with test suite.
I have work quite a lot to be able to run this test suite during %check,
which is, I think, a good practice, so I can also help on this (phpunit
is, of course, available in the repo)
After, this will be a nearly automatic process (only a few check needed,
mainly on Provides/Requires)
I've maintained PHP-related stuff before and I know it's not
terribly
difficult, but I've never undertaken anything of this magnitude.
I have to write some update for the PHP Guideline (php 5.4 related)
I think this packaging "tips" probably worth a page somewhere (under the
PHP Sig ?, with a link from PHP Guidelines ?)
Thanks in advance for any info.
Hope this helps...
Remi