• Bug#1109655: bookworm -> trixie upgrade issues with protobuf dependenci

    From Simon Josefsson@21:1/5 to All on Mon Jul 21 11:30:01 2025
    --=-=-=
    Content-Type: text/plain

    So are these the right patches? It seems both golang-github-golang-protobuf-1-3 and golang-github-golang-protobuf-1-5
    uses Conflicts and needs to be modified. The first patch below is for
    1-3 and the last one for 1-5. I have limited time so if anyone has time
    to test, revise patches and do the upload, please don't wait for me.

    /Simon

    --=-=-=
    Content-Type: text/x-diff
    Content-Disposition: inline;
    filename=0001-Use-Breaks-instead-of-Conflicts.patch
    Content-Transfer-Encoding: quoted-printable

    From f54c8aee95597558491fbbbff6fe87d406ff9722 Mon Sep 17 00:00:00 2001
    From: Simon Josefsson <[email protected]>
    Date: Mon, 21 Jul 2025 10:33:31 +0200
    Subject: [PATCH] Use Breaks: instead of Conflicts:.

    ---
    debian/control | 8 ++++----
    1 file changed, 4 insertions(+), 4 deletions(-)

    diff --git a/debian/control b/debian/control
    index ce48496..f98eae7 100644
    --- a/debian/control
    +++ b/debian/control
    @@ -31,8 +31,8 @@ Package: golang-github-golang-protobuf-1-3-dev
    Architecture: all
    Multi-Arch: foreign
    Depends: ${misc:Depends},
    -Conflicts: golang-github-golang-protobuf-1-5-dev,
    -Breaks: golang-goprotobuf-dev (<< 1.3.5-1~),
    +Breaks: golang-github-golang-protobuf-1-5-dev,
    + golang-goprotobuf-dev (<< 1.3.5-1~),
    Replaces: golang-goprotobuf-dev (<< 1.3.5-1~),
    Description: Go support for protocol buffers (version v1.3.x)
    This module (github.com/golang/protobuf) contains Go bindings for protocol
    @@ -50,8 +50,8 @@ Depends: libprotobuf-dev,
    ${misc:Depends},
    ${shlibs:Depends},
    Breaks: golang-goprotobuf-dev (<< 1.3.5-1~),
    -Conflicts: protoc-gen-go,
    - protoc-gen-go-1-5,
    + protoc-gen-go,
    + protoc-gen-go-1-5,
    Replaces: golang-goprotobuf-d
  • From =?UTF-8?B?SsOpcsOpbXkgTGFs?=@21:1/5 to All on Mon Jul 28 11:10:01 2025
    Le lun. 28 juil. 2025, 10:03, Reinhard Tartler <[email protected]> a
    écrit :

    I believe Simon is on the right track, but I see that the patches
    completely remove the "Conflicts" relationship. Given that the following package do have file conflicts, I think that change is incomplete:


    https://packages.debian.org/bookworm/all/golang-github-golang-protobuf-1-3-dev/filelist

    https://packages.debian.org/trixie/all/golang-github-golang-protobuf-1-5-dev/filelist

    I am thinking that the "Conflicts" relationship needs to remain, but needs
    to be accompanied with a mutual "Breaks" relationship.



    I do not believe this is what Debian policy explains, in case of files conflict.

    Additionally, I suggest modifying the golang-github-golang-protobuf-1-5-dev
    package to declare a "Replaces" relationship against the package golang-github-golang-protobuf-1-3-dev. The thinking here is to help apt to prefer packages that do work with protobuf 1.5 in favor of those that don't.

    In general, Matthias is correct and protobuf 1.3 and 1.5 are known to
    cause runtime crashes. As such, packages that still require 1.3 need to be updated or removed from testing.

    -rt

    On Mon, Jul 21, 2025 at 10:39 AM Simon Josefsson <[email protected]> wrote:

    So are these the right patches? It seems both
    golang-github-golang-protobuf-1-3 and golang-github-golang-protobuf-1-5
    uses Conflicts and needs to be modified. The first patch below is for
    1-3 and the last one for 1-5. I have limited time so if anyone has time
    to test, revise patches and do the upload, please don't wait for me.

    /Simon



    --
    regards,
    Reinhard


    <div dir="auto"><div><br><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">Le lun. 28 juil. 2025, 10:03, Reinhard Tartler &lt;<a href="mailto:[email protected]">[email protected]</a>&gt; a écrit :<br></div><
    blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:courier new,monospace">I believe Simon is on the right track, but I see that the patches
    completely remove the &quot;Conflicts&quot; relationship. Given that the following package do have file conflicts, I think that change is incomplete:<br><br><a href="https://packages.debian.org/bookworm/all/golang-github-golang-protobuf-1-3-dev/filelist"
    target="_blank" rel="noreferrer">https://packages.debian.org/bookworm/all/golang-github-golang-protobuf-1-3-dev/filelist</a><br><a href="https://packages.debian.org/trixie/all/golang-github-golang-protobuf-1-5-dev/filelist" target="_blank" rel="
    noreferrer">https://packages.debian.org/trixie/all/golang-github-golang-protobuf-1-5-dev/filelist</a><br><br>I am thinking that the &quot;Conflicts&quot; relationship needs to remain, but needs to be accompanied with a mutual &quot;Breaks&quot;
    relationship.</div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">I do not believe this is what Debian policy explains, in case of files conflict.</div><div dir="auto"><br></div><div dir="auto"><div
    class="gmail_quote gmail_quote_container"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:courier new,monospace"> Additionally, I suggest
    modifying the golang-github-golang-protobuf-1-5-dev package to declare a &quot;Replaces&quot; relationship against the package golang-github-golang-protobuf-1-3-dev. The thinking here is to help apt to prefer packages that do work with protobuf 1.5 in
    favor of those that don&#39;t.<br><br>In general, Matthias is correct and protobuf 1.3 and 1.5 are known to cause runtime crashes. As such, packages that still require 1.3 need to be updated or removed from testing.</div><div class="gmail_default" style=
    "font-family:courier new,monospace"><br></div><div class="gmail_default" style="font-family:courier new,monospace">-rt</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 21, 2025 at 10:39 AM Simon Josefsson &lt;<a
    href="mailto:[email protected]" target="_blank" rel="noreferrer">[email protected]</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">So are these the right
    patches?  It seems both<br>
    golang-github-golang-protobuf-1-3 and golang-github-golang-protobuf-1-5<br> uses Conflicts and needs to be modified.  The first patch below is for<br>
    1-3 and the last one for 1-5.  I have limited time so if anyone has time<br> to test, revise patches and do the upload, please don&#39;t wait for me.<br>

    /Simon<br>
    </blockquote></div><div><br clear="all"></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature">regards,<br>    Reinhard</div>
    </blockquote></div></div></div>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jochen Sprickerhof@21:1/5 to All on Mon Jul 28 21:00:01 2025
    XPost: linux.debian.devel.release

    * Simon Josefsson <[email protected]> [2025-07-21 10:35]:
    So are these the right patches? It seems both >golang-github-golang-protobuf-1-3 and golang-github-golang-protobuf-1-5
    uses Conflicts and needs to be modified. The first patch below is for
    1-3 and the last one for 1-5. I have limited time so if anyone has time
    to test, revise patches and do the upload, please don't wait for me.

    I did a quick test and this does not solve the upgrade problem.
    To test yourself you can simply run:

    PKG=golang-github-denverdino-aliyungo-dev; mmdebstrap \
    --chrooted-customize-hook="set -x ; apt -y install $PKG && sed -e s/bookworm/trixie/ -i /etc/apt/sources.list && apt update" \
    --chrooted-customize-hook=bash bookworm /dev/null

    once it dropped into the shell edit the Packages file from outside:

    unshare --map-root-user --map-auto vi \
    /tmp/mmdebstrap.*/var/lib/apt/lists/deb.debian.org_debian_dists_trixie_main_binary-amd64_Packages

    and then run apt dist-upgrade inside the mmdebstrap shell.

    * Mathias Gibbens <[email protected]> [2025-07-27 17:50]:
    What makes this tricky is that golang-github-golang-protobuf-1-3
    provides pre-APIv2 protobuf libraries and golang-github-golang-
    protobuf-1-5 provides APIv2. While some code might compile with both >versions, they are runtime incompatible and mixing resulting binaries
    will result most likely in crashes.

    That sounds bad. Given that most packages now have an alternative
    dependency on 1-3 and 1-5 I guess we have packages compiled against both versions in the repo. Do you know an example for mixing the binaries
    where we should check?

    I think that a Breaks+Replaces as suggested in bug #1109655 isn't
    correct. I'm not familiar enough with the details to be able to
    confidently suggest the correct solution to this problem. I did mention
    this on the debian-go mailing list hoping to solicit feedback from
    others.

    Correct, the problem is at dependency resolution time where this is
    unrelated. Also see above.

    The affected packages in bugs #1109513-7 are all golang development
    libraries, which aren't expected to be used other than building golang >packages. I think the odds of an end user encountering the upgrade
    issue is low, although it would still be good to fix.

    I agree with this.

    Cheers Jochen

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

    iQIzBAEBCgAdFiEEc7KZy9TurdzAF+h6W//cwljmlDMFAmiHxz4ACgkQW//cwljm lDNKIQ//RSxmm7qll3K/6pyoSvgLmCAqAmVrp7I2oAtJMN9uXoWX/nWjNjVbgJPX ib+/fn6jlWd1PPTl8uWXZOIxzJJa83JEmZKycIJ6mKuYkwzc+W1N7LccINysBvo5 2ZBWecN62fP3rWHj2oZpQfRXOJww+DJzK9mSRtpuuV9ZH1kwPNao3FVtkCxNMvN1 tNfU6B68+LA3FEHTFLixDnpV6qhUXT2vO1WIV2TZDfIHBTVfh8nKepbxN0d1lccJ KGgpGT8RiGJT6PFPX2Vhm86vnQm0xWvEjnKg4ypddnZWeaBzIIOUIBXT7L9l0ABw MoIW3etWp4MtxxjMzJ0IdvKLeGa6e6/wwU5IlHEYY16YVsnkpS46NFNqbVaacrRi CzYlZomMMQxoaRPevetjuxKx61DVc2Ey9gE8tdG9SSgNVj8xeYMHgL84GVjXgD2q 17kyv/RjT6whUXWtV8ZBEC3aP7VP+Q0Rl9YCFq0JrZ0Hp2XCeZPBcBDxRWcttbbZ 9sbhdeHxFSjipB5ymnwmwx4oGjgg6bXavBXCPr/thUOsvo0cVmlbFy/IWhJg5hVn v2stx6+VxcQzJm848sOpTdgyX2hqWkgqmU3Z/jZfklYFTplfSXU5OuvNha6ozx+3 YEqmEsvyZqO0p9HsqM4wdxTu7CMKOTYld4UMeqqts+ga4wzKBls=
    =qv+g
    -----END PGP SIGNATURE-----

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