[php-maint] Problems building a patched version of debian's php packages

Marc Pujol shadow+dphp at la3.org
Fri Sep 2 23:16:30 UTC 2011

Hi everyone,

I have been trying to (re)build the debian's php packages, patched to add
the ondemand process manager to php-fpm, but I can't get them to compile.

The ondemand process manager is an alternative to the static and dynamic
process managers already included in php's stable releases (and therefore
the latest debian's packages). Basically, this process manager spawns
workers "on demand", without a minimum of workers for any given pool. As a
result, it will become the manager of choice for "massive virtual hosting"
if it ever takes off. The full discussion about it can be found on php's
bug #52569 [1].

First of all, I found the debian's php wiki page for developers [2].
Hence, I cloned the php repository [3]. However, the lastest version there
(debian-sid branch) corresponds to version 5.3.6-13, whereas the current
sid packages are already at 5.3.8-1.

Therefore, I took a more classical approach to customize the packages.
Basically, I adopted the following recipe (the patch I applied here has
already been modified to apply correctly to the package's sources after
applying all the other packages, and is attached to this mail):

    # apt-get source php5
    # cd php5-5.3.8
    # quilt push -a
    # quilt import /tmp/fpm-add-ondemand.patch
    # quilt push
    # dch --nmu
    (Fill the changelog)
    # debuild -us -uc

Right after running this command, debuild complains that it can not find
the upstream's tgz, because it looks for an archive named
"php5_5.3.8.orig.tar.gz" whereas the file is named "php5_5.3.8.tar.gz".
Thus, I first symlinked the former to the latter and tried to build,
ending in an error. Afterwards, I repeated the operation by telling
debuild to continue without the upstream's tgz, which resulted in the
exact same failure.

At compile time, the build fails when it tries to compile the first file
*created* by the patch (sapi/fpm/fpm/events/select.c), complaining that it
does not exist. However, as shown in the attached build log, the patch
seems to be correctly applied (creating the file), since it is listed as
being "patched" near the top.

At this point I am pretty much stuck without any further ideas on how to
proceed. Hence, I will be very grateful if any of you can tell me why is
it failing and/or how can I overcome the issue at hand.

Thank you,


[1] https://bugs.php.net/bug.php?id=52569
[2] http://wiki.debian.org/PHP/GitUsage
[3] git://git.debian.org/pkg-php/php.git
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fpm-add-ondemand.patch
Type: application/octet-stream
Size: 73171 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-php-maint/attachments/20110903/5cf291f9/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: php5_5.3.8-1.1_amd64.build.gz
Type: application/x-tar
Size: 297066 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-php-maint/attachments/20110903/5cf291f9/attachment-0001.tar>

More information about the pkg-php-maint mailing list