[php-maint] Bug#656960: Advice needed using pkg-php-tools on PEAR packages

Mathieu Parent (Debian) sathieu at debian.org
Mon Jan 23 09:39:22 UTC 2012


(cc-ing the pkg-php list)

2012/1/14 Luis Uribe <acme at eviled.org>:
> Hi Mathieu,

Hi Luis,

> I'm trying to package [1]php-timer with pkg-php-tools but i'm having a
> bit of trouble, since is a package that is in another PEAR channel.

Yes, I also had this problem with the php-horde-* packages.
I have created a bug about this (656960) until we find a correct solution.

> First i have to do this before install it with PEAR:
>
>        $(PEAR) config-set php_dir debian/$(package)/usr/share/php/
>        $(PEAR) config-set doc_dir debian/$(package)/usr/share/doc/
>        $(PEAR) channel-add channel.xml
>
> So PEAR don't complains because the channel is not registered.

This is one solution. Another one: For the php-horde-* packages, they
depend on the pear-horde-channel package which include the registred
channel.

I don't know which solution is better. Perhaps we need another easier solution

[pear-horde-channel]:
http://packages.debian.org/sid/all/pear-horde-channel/filelist

> But then, when i build it with pbuilder, it fails:
>
> Here is the pbuilder related log:
>
> dh build --buildsystem=phppear --with phppear --with quilt
>   dh_testdir -O--buildsystem=phppear
>   dh_quilt_patch -O--buildsystem=phppear
> Applying patch 01_add_channel_info
> patching file channel.xml
>
> Now at patch 01_add_channel_info
>   dh_auto_configure -O--buildsystem=phppear
>   debian/rules override_dh_auto_build
> make[1]: Entering directory `/tmp/buildd/php-timer-1.0.2'
> dh_auto_build -O--buildsystem=phppear
> make[1]: Leaving directory `/tmp/buildd/php-timer-1.0.2'
>   dh_auto_test -O--buildsystem=phppear
>  fakeroot debian/rules binary
> dh binary --buildsystem=phppear --with phppear --with quilt
>   dh_testroot -O--buildsystem=phppear
>   dh_prep -O--buildsystem=phppear
>   dh_installdirs -O--buildsystem=phppear
>   dh_auto_install -O--buildsystem=phppear
> Unknown channel "pear.phpunit.de"
> Parsing of package.xml from file "./PHP_Timer-1.0.2/package.xml" failed
> Cannot download non-local package "./PHP_Timer-1.0.2/package.xml"
> install failed
> dh_auto_install: /usr/bin/pear -c debian/pearrc -d download_dir=/tmp
> -d include_path=/usr/share/php -d php_bin=/usr/bin/php -d
> bin_dir=/usr/bin -d php_dir=/usr/share/php -d
> data_dir=/usr/share/php/data -d doc_dir=/usr/share/doc/php-timer -d
> test_dir=/usr/share/php/tests install --offline --nodeps -P
> /tmp/buildd/php-timer-1.0.2/debian/php-timer
> ./PHP_Timer-1.0.2/package.xml returned exit code 1
> make: *** [binary] Error 1
> dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2

I should investigate this one.

> So i add override_dh_auto_install to debian/rules as i explain in my
> debian-mentors at l.d.o [2]email and seems to work.
>
> Thomas tell me that it's better to ask you about this, what do you
> think about my approach? I haven't time to check the code of
> pkg-php-tools so perhaps i'm doing something complete horrible here.

Yes, you are[*]. And I am doing something completely horrible also ;-)

[*] joking

> I will try to check it next week and -if it's the case- make a patch
> or something to support PEAR installation of packages in another PEAR
> channel.
>
> Here are the links of my packages: [3]One with
> override_dh_auto_install (Right now on mentors.d.o) and the [4]other
> one without it (thats the one that fail).
>
> [1] https://github.com/sebastianbergmann/php-timer
> [2] http://lists.debian.org/debian-mentors/2012/01/msg00268.html
> [3] http://mentors.debian.net/debian/pool/main/p/php-timer/php-timer_1.0.2-1.dsc
> [4] http://labs.eviled.org/debian/php-timer_1.0.2-1.dsc
>
> Thanks,
>
> --
> Luis

Regards

-- 
Mathieu Parent





More information about the pkg-php-maint mailing list