Package: dpkg-dev
Version: 1.16.1.2
Severity: important
File: /usr/share/man/man1/dpkg-source.1.gz
Tags: patch
Usertags: debian-packaging

Hi there!

While building the bacula package I found out that a quilt patch
(actually, the following Git commit) caused a dpkg-source error:

  
<http://anonscm.debian.org/gitweb/?p=pkg-bacula/bacula.git;a=commitdiff;h=fc7990abb396b0f0bd488e948cf97f1444d63415>

The output below self explains:
=====
$ git-buildpackage --git-ignore-new
dpkg-checkbuilddeps: Unmet build dependencies:
[...]
rm -f build-arch-flavor-stamp
 dpkg-source -I 
-i(?:^|/).*~$|(?:^|/)\.#.*$|(?:^|/)\..*\.swp$|(?:^|/),,.*(?:$|/.*$)| \
 (?:^|/)(?:DEADJOE|\.cvsignore|\.arch-inventory|\.bzrignore|\.gitignore)$| \
 
(?:^|/)(?:CVS|RCS|\.deps|\{arch\}|\.arch-ids|\.svn|\.hg|_darcs|\.git|\.shelf|_MTN|\.be|\.bzr(?:\.backup|tags)?)
 \
 (?:$|/.*$)|.gbp.conf -b bacula
dpkg-source: info: using source format `3.0 (quilt)'
dpkg-source: info: building bacula using existing ./bacula_5.0.3.orig.tar.gz
patching file src/cats/update_postgresql_tables.in
Hunk #2 FAILED at 72.
1 out of 2 hunks FAILED -- saving rejects to file 
src/cats/update_postgresql_tables.in.rej
dpkg-source: error: LC_ALL=C patch -t -F 0 -N -p1 -u -V never -g0 -E -b \
 -B .pc/upstream-1623_debian-591293___file_jpfid_idx.patch/ \
 < 
bacula.orig.f9qlSG/debian/patches/upstream-1623_debian-591293___file_jpfid_idx.patch
 gave error exit status 1
[...]

$ quilt pop -a
No patch removed

$ quilt push
Applying patch upstream-1623_debian-591293___file_jpfid_idx.patch
patching file src/cats/update_postgresql_tables.in
Hunk #2 succeeded at 74 with fuzz 2 (offset 2 lines).

Now at patch upstream-1623_debian-591293___file_jpfid_idx.patch
=====

The problem is patch's '-F 0', removing it (which actually restores the
default fuzz factor, i.e. 2) is enough.  I could not find anything in
the dpkg-dev documentation, the only hint being a FAQ in the wiki:

  
<http://wiki.debian.org/Projects/DebSrc3.0#I_converted_my_package_but_it_fails_to_build_or_fails_to_unpack_on_all_buildds>

Feel free to close this bug if I missed something, otherwise here is a
patch for dpkg-source(1):

--8<---------------cut here---------------start------------->8---
diff --git a/debian/changelog b/debian/changelog
index a6ece05..2d966bf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,11 @@ dpkg (1.16.3) UNRELEASED; urgency=low
   * Check update-alternative name and link arguments for all commands.
     Closes: #665050
 
+  [ Luca Capello ]
+  * Document in manpage that from version 1.15.5.3 dpkg-source expects
+    patches with no fuzz.
+    Closes: #NNNNNN
+
   [ Updated dpkg translations ]
   * French (Christian Perrier)
   * German (Sven Joachim).
@@ -12,7 +17,7 @@ dpkg (1.16.3) UNRELEASED; urgency=low
   [ Updated dselect translations ]
   * German (Sven Joachim).
 
- -- Guillem Jover <[email protected]>  Mon, 19 Mar 2012 09:53:29 +0100
+ --
 
 dpkg (1.16.2) unstable; urgency=low
 
diff --git a/man/dpkg-source.1 b/man/dpkg-source.1
index 7778ae1..d0573de 100644
--- a/man/dpkg-source.1
+++ b/man/dpkg-source.1
@@ -450,7 +450,9 @@ explicit options used for patch application (stored on each 
line
 after the patch filename and one or more spaces), it does ignore those
 options and always expect patches that can be applied with the \fB\-p1\fP
 option of \fBpatch\fP. It will thus emit a warning when it encounters
-such options, and the build is likely to fail.
+such options, and the build is likely to fail. Note also that from
+version 1.15.5.3 \fBdpkg\-source\fP expects patches with no fuzz, the
+solution is to refresh such patches.
 .PP
 Similarly to quilt's default behaviour, the patches can remove files too.
 .PP
--8<---------------cut here---------------end--------------->8---

Thx, bye,
Gismo / Luca

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages dpkg-dev depends on:
ii  base-files    6.7
ii  binutils      2.22-6
ii  bzip2         1.0.6-1
ii  libdpkg-perl  1.16.1.2
ii  make          3.81-8.1
ii  patch         2.6.1-3
ii  xz-utils      5.1.1alpha+20110809-3

Versions of packages dpkg-dev recommends:
pn  build-essential          11.5
pn  fakeroot                 1.18.2-1
pn  gcc [c-compiler]         4:4.6.2-4
pn  gcc-4.5 [c-compiler]     4.5.3-12
pn  gcc-4.6 [c-compiler]     4.6.3-1
pn  gnupg                    1.4.12-4
pn  gpgv                     1.4.12-4
pn  libalgorithm-merge-perl  <none>

Versions of packages dpkg-dev suggests:
ii  debian-keyring  2012.02.22

-- no debconf information

Attachment: pgpZFWnqy6MKo.pgp
Description: PGP signature

Reply via email to