[Pkg-zsh-devel] Refreshing patches for z-sy-h 0.7.0
Daniel Shahaf
danielsh at apache.org
Sun Jul 21 04:08:16 BST 2019
[ tl;dr: Building z-sy-h for current sid fails to apply debian/patches/set-version.patch. ]
z-sy-h upstream plans to release 0.7.0 soon. (Upstream just fixed the
last issue on the milestone, is waiting for possible regression reports
and will tag if none are received.)
I went through the motions of packaging it for sid to see if anything
was amiss, and ran into a problem refreshing the patch series.
First things first, I updated Standards-Version to 4.4.0.0.
Then, I did:
.
% git checkout debian/master
% git remote -v | grep git at github.com:zsh-users/zsh-syntax-highlighting
upstream git at github.com:zsh-users/zsh-syntax-highlighting (fetch)
upstream git at github.com:zsh-users/zsh-syntax-highlighting (push)
% git merge upstream/master
% git archive --format=tar --output=../${PWD:t}_0.7.0.orig.tar --prefix=${PWD:t}-0.7.0 upstream/master
% xz -7v ../${PWD:t}_0.7.0.orig.tar
% dch -v 0.7.0-1 -r
% : <<EOC
(I used "0.7.0-1" just for testing; I won't push that, of course, since
upstream hasn't tagged 0.7.0 yet.)
EOC
And then I tried to build the resulting tree in a fresh sid chroot. It
failed because not all patches had been refreshed, so I logged into the
chroot and refreshed the patches using sid's quilt(1):
$ quilt() { QUILT_PATCHES=debian/patches quilt "$@"; }
$ quilt push && quilt refresh
$ quilt push && quilt refresh
$ quilt push && quilt refresh
$ dpkg-buildpackage -uc -us -ui
dpkg-buildpackage: info: source package zsh-syntax-highlighting
dpkg-buildpackage: info: source version 0.7.0-1
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Daniel Shahaf <danielsh at apache.org>
dpkg-buildpackage: info: host architecture amd64
dpkg-source --before-build .
dpkg-source: info: using options from zsh-syntax-highlighting/debian/source/options: --extend-diff-ignore=(^|/)(\.revision-hash)$
dpkg-source: warning: unknown information field 'Rules-Require-Root' in input data in general section of control info file
dpkg-source: info: using patch list from debian/patches/series
dpkg-source: info: applying set-version.patch
dpkg-source: info: applying fix-test-failures-due-to-ps.patch
dpkg-source: info: applying noop-use-slash-nonexistent.patch
debian/rules clean
dh clean
dh_auto_clean
make -j4 clean
make[1]: Entering directory '/tmp/debian-parent/zsh-syntax-highlighting'
rm -f docs/all.md
make[1]: Leaving directory '/tmp/debian-parent/zsh-syntax-highlighting'
dh_clean
dpkg-source -b .
dpkg-source: info: using options from zsh-syntax-highlighting/debian/source/options: --extend-diff-ignore=(^|/)(\.revision-hash)$
dpkg-source: warning: unknown information field 'Rules-Require-Root' in input data in general section of control info file
dpkg-source: info: using source format '3.0 (quilt)'
dpkg-source: info: building zsh-syntax-highlighting using existing ./zsh-syntax-highlighting_0.7.0.orig.tar.xz
dpkg-source: info: using patch list from debian/patches/series
can't find file to patch at input line 22
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Description: Set $ZSH_HIGHLIGHT_VERSION to the package version
| The first two $(shell ...) invocations are taken from debian/rules of the
| zsh package[1] with permission.
| .
| [1] git://anonscm.debian.org/collab-maint/zsh.git
|Author: Daniel Shahaf <danielsh at apache.org>
|Forwarded: not-needed
|Last-Update: 2017-07-31
|
|This patch implements setting .revision-hash to a valid gitrevisions(7)
|expression identifying the source control revision of the packaging (and, by
|extension, of zsh-syntax-highlighting itself). This is needed to make
|generation of binary packages independent of whether or not the build is
|occurring within the packaging's git repository, and to ensure .revision-hash
|always reports a revision pertaining to the same source (the packaging source,
|rather than upstream's).
|---
|Index: zsh-syntax-highlighting/Makefile
|===================================================================
|--- zsh-syntax-highlighting.orig/Makefile
|+++ zsh-syntax-highlighting/Makefile
--------------------------
No file to patch. Skipping patch.
2 out of 2 hunks ignored
dpkg-source: info: the patch has fuzz which is not allowed, or is malformed
dpkg-source: info: if patch 'set-version.patch' 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/set-version.patch/ --reject-file=- < zsh-syntax-highlighting.orig.iOgnHm/debian/patches/set-version.patch subprocess returned exit status 1
dpkg-buildpackage: error: dpkg-source -b . subprocess returned exit status 2
(The "Index:" line there, which isn't in HEAD of master, was added by
the «quilt refresh» at the start of the transcript.)
What's the problem? The patch doesn't have fuzz:
.
$ QUILT_PATCHES=debian/patches quilt pop -a > /dev/null
$ patch -p1 < debian/patches/set-version.patch
patching file Makefile
$
.
and doesn't need to be refreshed:
.
$ QUILT_PATCHES=debian/patches quilt refresh
Patch debian/patches/set-version.patch is unchanged
I've also tried changing deleting the "---\n" line from the preamble of
the patch, but that didn't help either. I haven't tried rebuilding the
latest version of the package against current sid (ENOTIME).
Cheers,
Daniel
P.S. Upstream may release an 0.7.0-rc1 prerelease shortly, in which
case, we might package it for experimental.
More information about the Pkg-zsh-devel
mailing list