• Re: git pq after an upstream upgrade when patches no longer apply

    From Marc Haber@21:1/5 to Andrey Rakhmatullin on Sat May 31 14:10:02 2025
    On Sat, May 31, 2025 at 04:44:24PM +0500, Andrey Rakhmatullin wrote:
    gbp pq import --time-machine=<something> and rebase them via the
    familiar git rebase interface that will be shown.

    Thank you, that was helpful.

    gbp pq import --time-machine=10 something
    followed by
    gbp pq rebase
    followed be
    gbp pq export --drop
    followed by
    git add debian/patches/*
    git commit

    Is it expected that gbp push would not push the current branch,
    debian/latest?

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to All on Sat May 31 13:40:01 2025
    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?

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andrey Rakhmatullin@21:1/5 to Marc Haber on Sat May 31 13:50:01 2025
    On Sat, May 31, 2025 at 01:35:31PM +0200, Marc Haber wrote: >[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?

    gbp pq import --time-machine=<something> and rebase them via the familiar
    git rebase interface that will be shown.

    --
    WBR, wRAR

    -----BEGIN PGP SIGNATURE-----

    iQJhBAABCgBLFiEEolIP6gqGcKZh3YxVM2L3AxpJkuEFAmg665EtFIAAAAAAFQAP cGthLWFkZHJlc3NAZ251cGcub3Jnd3JhckBkZWJpYW4ub3JnAAoJEDNi9wMaSZLh /GUP/A8hQ85ii5/ujmkhn0DGwEOjRowlyFRXLrvRtQpjLtrsos2M9EbjD4F9d27J dSGcbdP2ivMKukQqgMvQ/hapyXVRbnQfdFVbRuIIzNIX4MRytRZSROi5Z1AO2tct VwHLHAMAA2UaJa63KRjUBCgri98xVUhbzOVqZQwUmGpMBliFneRBKBA+hb7TN5sA OgewWYw1agidS2h1v3WOlvGjy0m3icFU6ZecezQpcXR864dlpRuLi/eJLBZlC93z 1Nvzcq1qjqbx5k6z8iJb8q/O7j4R057SsCZ2KB5anDZ3vyI4kQm8P1gpPz1tevfV 8YPeOUln4EgpPeJi0IePYlqG4fniRqCuiXhTfUiNKsm+gvWCZT/cZ3aT18TtTQD2 oCjTmRYYvd+XsPtHVjxv2SQF2PRNGnO8Dx+ezOn3TXmLsPXRzCjzvcn4FZuJKqmS 28aJoFH+4V12QUyLH8KvLg5Qwm/Gxm3u6XtwNb+7d7r5eNSXcgf1emL9qA/G7nZG 4iZei9tD8HnNUmtkuaEU/ScvUWddyOs1tZF9TyNnwFrnUq1iaDI0Qt90318vmk+V /DJKJlUsxlgxDvThGIAE7GfTrD24tMSCCbS44alzcPy+GplQSfkRpg1vFrawd2/T 9q9IZ9L2WxgYDG5Txn1JKbp2CQ/wTwy39fZRoCy9oWyvtVgs
    =xxxd
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nicholas D Steeves@21:1/5 to Marc Haber on Sat May 31 20:00:01 2025
    Marc Haber <mh+debian-mentors@zugschlus.de> writes:

    Is it expected that gbp push would not push the current branch, debian/latest?

    It sounds like the git repository's gbp.conf is absent, or
    misconfigured. Another possibility is that defaults have been
    overridden some place like ~/.gbp.conf.

    --=-=-Content-Type: application/pgp-signature; name="signature.asc"

    -----BEGIN PGP SIGNATURE-----

    iQJEBAEBCgAuFiEE4qYmHjkArtfNxmcIWogwR199EGEFAmg7QtMQHHN0ZW5AZGVi aWFuLm9yZwAKCRBaiDBHX30QYWgqD/91E0NZgtf30vcZ7NVDaftKn9GG3ioFJs8Z zadKSsMoNbsrU9aRugUCk6uw9dWD4Oi0PilrH96COFbqYiDRrgA1WBG5CNA/B89W LBeQjCNLFCXNS50oUx87uaKy6VaK6WFxrvykpLnHNe2iHw0h5OBC+8DBxsTZoUWY +HNS7vlxQ1EoiVrl/8JHm2bRHbfYUnSQf5DwefuO3ep04ySyWv7E6EI+KZ8zq3bv ByTYsNnwW1OL5idyztq2A+oE8ZPhXRRs4wtcj/6moKzndBfrFF5Tux4yngQzoSL3 SgXjWLADbSUel0qUmfRRDNf9aYqW2x/b9PjwP/NjMO9fQahAiUDWbIMMH4cIC9eU rarttIgiMav8g/UoyuQf7vWxL8Q8k6zUP2FRmG7r7zbkRo9b5bwRrMrIjru5vkte UYtna3ueDBxIz64WjaxTyusd0xWcCtdDCjdV5LPdve8GtiHFNo4N0EYuYiZPJe9G k9BohfVHdX4+6H5t00rKOBPXuE8bCDydp8ZLP31gYOMLxavjg5JOzF+p+adpnqj7 3H4dLIQUYJom/LgejpCxrLp/WV1tl0HYf752eF/TIxWou/gGJ2Vw2nakiAYNAgoA o6c0xle6Vb8ZUfBabKQ0PQpSmjjIXYaZ3K6Df/gbaKKVPrAbeBrgbB3x7OxFQVdR CtmsL8nGcg==JdjZ
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to Nicholas D Steeves on Sun Jun 1 15:30:01 2025
    On Sat, May 31, 2025 at 01:56:34PM -0400, Nicholas D Steeves wrote:
    Marc Haber <mh+debian-mentors@zugschlus.de> writes:
    Is it expected that gbp push would not push the current branch,
    debian/latest?

    It sounds like the git repository's gbp.conf is absent, or
    misconfigured. Another possibility is that defaults have been
    overridden some place like ~/.gbp.conf.

    [DEFAULT]
    debian-branch=debian/latest
    upstream-branch=upstream/latest

    is in ~/.gbp.conf.

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andrey Rakhmatullin@21:1/5 to Marc Haber on Sun Jun 1 16:40:01 2025
    On Sat, May 31, 2025 at 02:05:48PM +0200, Marc Haber wrote:
    Is it expected that gbp push would not push the current branch, >debian/latest?

    AFAIK yes, assuming you haven't tagged the upload yet.

    --
    WBR, wRAR

    -----BEGIN PGP SIGNATURE-----

    iQJhBAABCgBLFiEEolIP6gqGcKZh3YxVM2L3AxpJkuEFAmg8ZfMtFIAAAAAAFQAP cGthLWFkZHJlc3NAZ251cGcub3Jnd3JhckBkZWJpYW4ub3JnAAoJEDNi9wMaSZLh yNsP/ibgjm+7cXyyXuWdKQyphaiNRR9j1BkTs/SYjvC1S8xCPNHDPF6PUnK6AXA5 +6M8UUfcl9ctQo/ON9/X4ZWUYJLmo3tFFN6vV+9hdLaIfOFoylOZki0BABAIMfsD 6P2uoUtZt53NNe/vGN+9FOI9qpTgvZsDR6rhVR8vcDBhqkkvo62cQJmrAWxuq2Jv FKnE8E0SjI6Y8JN/EyLEe545MiEMA1CPaT29hUfMp2ru71QZI9ELRkJz2+eZ9Q9/ 5Z4fKNN7p7zwttb2avUGw3Ezcuuui+It+pRLB7ThHky8IRv7Ojy8OGCUNWAZ9GGi BG7UDZv5iKLYl3JCQlHRj8Zw9wygjPRXuTzrDqYiqNBb36T0u25ovoj7yH016ImC k34eu1jjm4+yZjZx3L/CVOCJKHmDuBehHCpAfhhdNfD3UutzhjbP8OHPTvKtpgQ2 Rxz2kCEzJmms1nbDNiGeQ16IxXybdrIFN48gSLxyNSNNzcttNkvpOqRUN+uQ1m/E UOwk1Qu1NrCRwM2mibI9X3gWHV507y/zzi+Jjwhmqj4JlEYDzT5KZrkSKGfP1FJE o7/tIbFkP6iTGPWhaBrl1ddxDYaja0MMJm/wE4iddpHPISEc7udHIjTbncL0jbX2 OSGltaBY5s9j1DOUemWds4MX5pWblOFTiL1DBVJblu5jIKgo
    =97ZZ
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to Andrey Rakhmatullin on Sun Jun 1 19:50:01 2025
    On Sun, Jun 01, 2025 at 07:38:48PM +0500, Andrey Rakhmatullin wrote:
    On Sat, May 31, 2025 at 02:05:48PM +0200, Marc Haber wrote:
    Is it expected that gbp push would not push the current branch, >>debian/latest?

    AFAIK yes, assuming you haven't tagged the upload yet.

    That would be bad. My workflow is:

    - push
    - wait for pipelines to finish
    - upload
    - wait for the package to be accepted to the archive
    - tag and push tag

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andrey Rakhmatullin@21:1/5 to Xiyue Deng on Sun Jun 1 22:40:02 2025
    On Sun, Jun 01, 2025 at 12:48:21PM -0700, Xiyue Deng wrote:
    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.

    That's like my suggestion but doing it manually.


    --
    WBR, wRAR

    -----BEGIN PGP SIGNATURE-----

    iQJhBAABCgBLFiEEolIP6gqGcKZh3YxVM2L3AxpJkuEFAmg8uSQtFIAAAAAAFQAP cGthLWFkZHJlc3NAZ251cGcub3Jnd3JhckBkZWJpYW4ub3JnAAoJEDNi9wMaSZLh 7AkP/0Jf48fcHwFNIa0QSmVq+mz16jM8VB8tLFHRLqUBd/bhCcxhbu75898qcoji pPRpzsKBffYzhrvyM+4fOPNDl+0TXxF4LH5kgIrsjBsJixyU3jexTLm3Mvj3evEm RqfJdzS22yE0q69TJfyzNBBY+MKQWakdRaIktasmKcOJh8b1Zr8dHSJao8LnqVIg Puexzdv2160etoH2R+N9EtIebA16JeL4UAtkP8nG9ViLW/aFmbv6+xh+lBqOA6xn LcODFySjnbDx1V5KSpx/+0UhT3Sc0FasZNcKcWXtSXtexf2orn1jRrmz1LbSUa3e CLLpvfKE/4d2tvNlPwvQkTkl1JY94NkaVGFqEInpo8hY6sDsXT2D2tgHiUPnZdph qC+AQB5G6UTAdmELUxXMUpJ1W/XKpNelLICl51D9jZ+G1scMnlk3wRDtZVfivjlr 1GTQ0hbydjciL+L7XuT5Vq4iKLw6BWE3bmDs661xEC4QIfZImyK1DgYwG5V06TUk 0I4c7yH/tay3tJSkKmw3PGOLbCo6Z6gN8feBEohIeCK0R5EbDrE8+hKXxUHwnnrp iyZWSLfZt7XhqOXZtpB8ZWzk/IZ8M6LhmgwyVo3lMC0eTZL8du66PpdgizteFvMA xse6ocd+NrslJ8jaPXUgkogwMFBUJChinJeEczdKse0uu11H
    =0hX8
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)