5

I am trying to add a patch to a Debian package (on an amd64 machine running Ubuntu 14.10 "Trusty").

While troubleshooting the issue, I've reduced the patch to one that adds a single file. (For the sake of context, this file modifies a fluxbox package so that it also creates a fluxbox-dbg file with debugging symbols.)

I created the patch by following these steps:

  • (Made sure I had all existing patches applied.)
  • quilt new add-dbg-package.patch
  • quilt add debian/rules.d/70-debug-symbols.mk
  • (Created that file with the contents I wanted.)
  • quilt refresh

The patch seems fine:

  • With all patches applied, the file exists and has the correct contents.
  • The patch contains a delta that adds the complete contents of the file, and nothing else.
  • No other patch references the file.
  • When I pop the new patch, the file is removed; when I push it again, it is recreated.

However, when I try to rebuild the package with debuild, I get this:

The next patch would create the file debian/rules.d/70-debug-symbols.mk, which already exists!  Skipping patch.
1 out of 1 hunk ignored
dpkg-source: info: the patch has fuzz which is not allowed, or is malformed
dpkg-source: info: if patch 'add-dbg-package.patch' is correctly applied by quilt, use 'quilt refresh' to update it

If I take its advice, quilt tells me that the patch is up-to-date (as it seems to be). quilt diff tells me that there are no changes.

As one thought: is it incorrect to add quilt patches for changes to Debian control files?

Can anyone help me understand what I've done to offend debuild?

  • Breno is correct. It looks like the Debian build system is getting confused by this unexpected circumstance. It doesn't know how to handle patches to the Debian subdirectory. Sure you can use quilt to add patches to the Debian subdirectory, just don't apply it as part of the build. And if you think that the build system is coping with this gracefully, you could file a wishlist bug, though I doubt the maintainers will rush to produce a clearer error message. – Faheem Mitha Apr 15 '15 at 13:23

1 Answers1

2

You should not add quilt patches over /debian/ files. The patches are for the code only. Just change the debian/rules.d/70-debug-symbols.mk file and build the package.

The Debian/Ubuntu policy says:

The program quilt offers a basic method for recording modifications to the *upstream source* for Debian packaging.
Lætitia
  • 1,388
  • 1
  • 20
  • 30
Breno Leitão
  • 3,487
  • 2
  • 19
  • 23