Hi Marc, Marc Haber <mh+debian-mentors@zugschlus.de> writes: > Hi, > > I have chosen ferm to be my second target to follow Otto's excellent > aricle about creating Debian packages using upstream git > (https://optimizedbyotto.com/post/debian-packaging-from-git/). > > My repository is organized like: > origin git@salsa.debian.org:debian/ferm.git (fetch) > origin git@salsa.debian.org:debian/ferm.git (push) > upstreamvcs https://github.com/MaxKellermann/ferm.git (fetch) > upstreamvcs https://github.com/MaxKellermann/ferm.git (push) > > The salsa repository looks clean, and contains the Debianization of ferm > 2.5.1 > > gbp import-orig --uscan properly detects ferm's upstream release 2.7 and > imports it: > > [28/4930]mh@salida:~/packages/ferm/ferm (debian/latest|u=) $ gbp import-orig --uscan > gbp:info: Launching uscan... > Newest version of ferm on remote site is 2.7, local version is 2.5.1 > => Newer package available from: > => https://api.github.com/repos/MaxKellermann/ferm/tarball/refs/tags/v2.7 > Successfully symlinked ../ferm-2.7.tar.gz to ../ferm_2.7.orig.tar.gz. > gbp:info: Using uscan downloaded tarball ../ferm_2.7.orig.tar.gz > What is the upstream version? [2.7] > gbp:info: Importing '../ferm_2.7.orig.tar.gz' to branch 'upstream/latest'... > gbp:info: Source package is ferm > gbp:info: Upstream version is 2.7 > gbp:info: Replacing upstream source on 'debian/latest' > gbp:info: Successfully imported version 2.7 of ../ferm_2.7.orig.tar.gz > [29/4930]mh@salida:~/packages/ferm/ferm (debian/latest|u+2) $ > > However, the Debian patches no longer apply, and gbp pq import fails: > > [31/4931]mh@salida:~/packages/ferm/ferm (debian/latest|u+2) $ gbp pq import > gbp:info: Trying to apply patches at 'a154bfe4f897bbe8dc738b30824148f1aeaf89f2' > gbp:warning: Patch 0001-Fix-deferred-functions-within-target-arguments.patch failed to apply, retrying with whitespace fixup > gbp:error: Failed to apply '/home/mh/packages/ferm/ferm/debian/patches/0001-Fix-deferred-functions-within-target-arguments.patch': Error running git apply: warning: src/ferm has type 100755, expected 100644 > error: patch failed: src/ferm:548 > error: src/ferm: patch does not apply > error: patch failed: test/misc/ipfilter.ferm:10 > error: test/misc/ipfilter.ferm: patch does not apply > error: patch failed: test/misc/ipfilter.result:2 > error: test/misc/ipfilter.result: patch does not apply > gbp:error: Couldn't apply patches > 1 [32/4932]mh@salida:~/packages/ferm/ferm (debian/latest|u+2) $ > > So does gbp pq rebase (same result). > > In a traditional workflow, I would now install quilt, run quilt push > --force and sort out the rejects followed by a quilt refresh. > > How am I supposed to handle this in a modern workflow? > There may be better ways to handle this, but I usually handle this situation this way: assuming the patches can apply to the previous packaged version of the package, I would go back to that version (may be by a "git reset --hard"), and run "gbp pq import" there. This should import the patches to gbp-pq just fine. Then import the newer version as usual, and "gbp pq rebase" should let you revise the patch conflicts like a usual git rebase. HTH. > Thank you for commenting. Whatever you do, please do not push to > debian/latest on salsa. I do not only want to have the repository in > the desired state, I also want to learn how to get there. You can push > new branches as you want to, just please dont touch the existing ones. > > Thanks! > > Greetings > Marc > > -- > ----------------------------------------------------------------------------- > Marc Haber | "I don't trust Computers. They | Mailadresse im Header > Leimen, Germany | lose things." Winona Ryder | Fon: *49 6224 1600402 > Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421 > -- Regards, Xiyue Deng
Attachment:
signature.asc
Description: PGP signature