[php-maint] Packaging questions re: ITP: php-crypt-blowfish (#597324)

Thomas Goirand zigo at debian.org
Fri Sep 24 16:55:47 UTC 2010


John Morrissey wrote:
> I'm a non-DD and am working on packaging Crypt_Blowfish. It seems like a
> good idea to coordinate with the Debian PHP maintainers. :-)

Yes it is. Thanks for doing so.

By seeing your email, I wonder: are you working on the horde project?

> - Some PEAR packages allow tests to be included in /usr/share/php/test{,s},
>   but some packages (php-mail, for example) explicitly remove the tests.
>   However, php-mail never moves the tests to /usr/share/doc/$package,
>   as the rules comment says:
> 
>     # remove duplicated files, these files are in /usr/share/doc/package
>     rm -rf debian/$(package)/usr/share/php/tests
> 
>   Should I just leave the tests for Crypt_Blowfish in /usr/share/php/test?

By Debian policy, the docs of all packages have to be in /usr/share/doc,
and PEAR packages are no exception. However, it is a good idea to to add
a symlink. Something like this:

	ln -s ../../doc/$(package) \
		debian/$(package)/usr/share/php/tests/$(PEAR_PKG)

I have in fact found that CDBS does that, my own PEAR packages aren't
doing it yet, but I guess I will be able to add this later on.

> A few questions on the draft PHP policy at
> http://webapps-common.alioth.debian.org/draft-php/html/ch-php-libs.html :
> 
> - Has there been a consensus on package naming? It looks like existing PEAR
>   modules are named php-$PEAR_PACKAGE_NAME, so I went with that and used
>   php-crypt-blowfish.

It seems to me that PEAR packages are always named:

php-$PEAR_PACKAGE_NAME

because we consider they are part of PHP. If we didn't consider they
were part of PHP, then any PEAR package using the PHP 2.02 license
wouldn't be able to make it to Debian, as this license is considered
non-free when used outside php itself.

Libraries that aren't PEAR module shall be called:

lib$PACKAGENAME-php

You can see libnusoap-php as an example.

I'm not sure all this is in the Debian policy, however, that's what I
always saw in Debian.

> - Section 4.2.2 says maintainer scripts should register/unregister PEAR
>   packages, but it looks like existing packages just allow the .reg to be
>   included in the package. Is including the .reg Good Enough?

What we always do is using:

$(PEAR) install -f -n -R debian/$(package) $(pear_pkg)/package.xml;

to install the PEAR library, because the source package xml file is
containing path where to install all .php source code. You should do
like that too. Then yes, keeping the .reg is what should be done, as
much as I understand, and you should remove other files in
/usr/share/php/.registry once the package is installed.

While I think about it, I think it would be a good idea to put your
packaging in git.debian.org (which is also Alioth). I've put absolutely
all of my PEAR packages there, and I would expect others to do the same.
Feel free to get some of them as examples if you like.

Once you are done, I'd be happy to have a quick review of your package.

I'd appreciate if others could correct me if I was wrong above.

Thomas Goirand (zigo)



More information about the pkg-php-maint mailing list