[php-maint] Bug#338315: php5: Please improve handling of patches (use dpatch?)

Sven Mueller debian at incase.de
Wed Nov 9 12:51:48 UTC 2005

Package: php5
Version: 5.0.5-3
Severity: wishlist


I have been trying to backport your php5 package to sarge as well as
enabling the mysqli extension (to make use of the extended features of
my mysql5 installation, which are not available through the mysql
extension). However, building the package has been a pain in the a**,
when anything went wrong. Especially troublesome was the handling of the
patches in debian/patches because your patch method doesn't keep track
of which patches have already been applied and which haven't. Moving the
patches to dpatch would handle that. Doing the move would be relatively
easy to do: Prepend the following lines to each patch:

------------------ cut here ---------------------
#! /bin/sh /usr/share/dpatch/dpatch-run
## 65-sieveshell-enhancements.dpatch by Sven Mueller <debian at incase.de>
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.

------------------ cut here ---------------------

Obviously, it would make sense to change the second line to something
matching the relevant patch and to add a description in line 5, but that
is no must.

Then replace your previous patch handling (patch, patch-stamp and
unpatch targets) by including the dpatch makefile snippet somewhere
near the top of debian/rules like this:

------------------ cut here ---------------------
# enable dpatch usage
include /usr/share/dpatch/dpatch.make
------------------ cut here ---------------------

Finally, create a 00list file in debian/patches which includes the
filenames of all the patches you want to have applied.

If you want that, I could also provide a patch against 5.0.5-3 which
does just that.


-- System Information:
Debian Release: 3.1
  APT prefers stable
  APT policy: (990, 'stable'), (400, 'experimental'), (90, 'testing'), (50, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

More information about the pkg-php-maint mailing list