Intelligente Lösungen
in neuer Dimension

Git: Fehler bei dpkg-buildpackage

Bei der Aktualisierung auf Version 2.22.0 scheitert das Bauen meines Git-Paketes:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
$ cd git-2.21.0
$ uupdate -u ../git-2.22.0.tar.xz
uupdate: New Release will be 1:2.22.0-0ubuntu1.
uupdate: Untarring the new sourcecode archive ../git-2.22.0.tar.xz
uupdate: Unpacking the debian/ directory from version 1:2.21.0-0dp07~xenial1 worked fine.
uupdate: Remember: Your current directory is the OLD sourcearchive!
uupdate: Do a "cd ../git-2.22.0" to see the new package
$ cd ../git-2.22.0
$ dpkg-buildpackage
...
dpkg-source: info: using source format '3.0 (quilt)'
dpkg-source: info: building git using existing ./git_2.22.0.orig.tar.xz
patching file Documentation/Makefile
Hunk #1 succeeded at 436 (offset 46 lines).
Hunk #2 FAILED at 401.
1 out of 2 hunks FAILED
patching file Documentation/technical/api-index.sh
dpkg-source: info: the patch has fuzz which is not allowed, or is malformed
dpkg-source: info: if patch 'Normalize-generated-asciidoc-timestamps-with-SOURCE_D.diff' is correctly applied by quilt, use 'quilt refresh' to update it
dpkg-source: error: LC_ALL=C patch -t -F 0 -N -p1 -u -V never -E -b -B .pc/Normalize-generated-asciidoc-timestamps-with-SOURCE_D.diff/ --reject-file=- < git-2.22.0.orig.RiMq1I/debian/patches/Normalize-generated-asciidoc-timestamps-with-SOURCE_D.diff gave error exit status 1
dpkg-buildpackage: error: dpkg-source -b git-2.22.0 gave error exit status 2
$

Nachfolgend beschreibe ich, wie ich das Problem korrigiere.

Sichtung der Fehlermeldung

Die Fehlermeldung sieht grob so aus:

1
dpkg-source: info: the patch has fuzz which is not allowed, or is malformed

Ich gehe davon aus, dass der Patch möglicherweise funktionieren kann, sofern man ihn “unscharf” anwendet. Das verbietet QUILT üblicherweise!

Quilt initialisieren

1
$ export QUILT_PATCHES=debian/patches

Patch unscharf anwenden

1
2
3
4
5
6
7
8
$ quilt push
Applying patch debian/patches/Normalize-generated-asciidoc-timestamps-with-SOURCE_D.diff
patching file Documentation/Makefile
Hunk #1 succeeded at 436 (offset 46 lines).
Hunk #2 succeeded at 447 with fuzz 2 (offset 46 lines).
patching file Documentation/technical/api-index.sh

Now at patch debian/patches/Normalize-generated-asciidoc-timestamps-with-SOURCE_D.diff

Patch festschreiben

1
2
$ quilt refresh
Refreshed patch debian/patches/Normalize-generated-asciidoc-timestamps-with-SOURCE_D.diff

Paket bauen

1
2
3
4
5
$ dpkg-buildpackage
dpkg-buildpackage: source package git
dpkg-buildpackage: source version 1:2.22.0-0dp08~xenial1
dpkg-buildpackage: source distribution xenial
...

Läuft nun durch, Problem scheint korrigiert!