• Bug#1104037: golang-github-iovisor-gobpf: Add utsname support for riscv

    From Bo YU@21:1/5 to All on Thu Apr 24 18:00:01 2025
    --jcc72ml63osl47ez
    Content-Type: text/plain; charset=us-ascii
    Content-Disposition: inline
    Content-Transfer-Encoding: quoted-printable

    Source: golang-github-iovisor-gobpf
    Version: 0.2.0-9
    Severity: important
    Tags: patch
    User: debian-riscv@lists.debian.org
    Usertags: riscv64
    User: debian-loongarch@lists.debian.org
    Usertags: loong64
    X-Debbugs-Cc: debian-riscv@lists.debian.org, debian-loongarch@lists.debian.org

    Dear Maintainer,

    now golang-github-iovisor-gobpf is missing utsname support for riscv64
    and loong64, this will lead to FTBFS from opensnitch on these
    architectures, see [0] and [1]. In fact this will also casuse the build
    to fail on these two architectures. Two PRs to support both architectures separately has been sent upstream, but has not yet been merged(inactive upstream), so I backport them to here.

    [0]: https://buildd.debian.org/status/fetch.php?pkg=opensnitch&arch=riscv64&ver=1.6.8-9&stamp=1745472487&raw=0
    [1]: https://buildd.debian.org/status/fetch.php?pkg=opensnitch&arch=loong64&ver=1.6.8-9&stamp=1745476108&raw=0

    Please note, even if apply this patch, the build will still fail on
    riscv64(I test it on riscv64 not on loong64), but this is another
    reason to lead this like:

    ```
    ...
    -tautological-compare -Wno-unknown-warning-option -g -O2 -emit-llvm -c opensnitch.c -o opensnitch.o.partial
    In file included from opensnitch.c:3:
    In file included from ./common_defs.h:4:
    /lib/modules/6.12.22-riscv64/source/include/linux/sched.h:12:10: fatal error: 'asm/current.h' file not found
    12 | #include <asm/current.h>
    | ^~~~~~~~~~~~~~~
    1 error generated.
    make[2]: *** [Makefile:57: opensnitch.o] Error 1
    ```

    The same error has occurred on s390x[2] and I believe this is different issue. I will dig more this later.

    [2]: https://buildd.debian.org/status/fetch.php?pkg=opensnitch&arch=s390x&ver=1.6.8-9&stamp=1745476829&raw=0

    Could you apply this on next upload?

    --
    Regards,
    --
    Bo YU


    --jcc72ml63osl47ez
    Content-Type: text/plain; charset=us-ascii
    Content-Disposition: attachment;
    filename="iovisor-gobpf-add-support-loong64-and-rv64.debdiff" Content-Transfer-Encoding: quoted-printable

    diff -Nru golang-github-iovisor-gobpf-0.2.0/debian/changelog golang-github-iovisor-gobpf-0.2.0/debian/changelog
    --- golang-github-iovisor-gobpf-0.2.0/debian/changelog 2025-04-15 15:42:23.000000000 +0000
    +++ golang-github-iovisor-gobpf-0.2.0/debian/changelog 2025-04-24 12:16:21.000000000 +0000
    @@ -1,3 +1,10 @@
    +golang-github-iovisor-gobpf (0.2.0-9.1) UNRELEASED; urgency=medium
    +
    + * Non-maintainer upload.
    + * Add build support for loong64 and riscv64. (Closes: #-1)
    +
    + -- Bo YU <vimer@debian.org> Thu, 24 Apr 2025 12:16:21 +0000
    +
    golang-github-iovisor-gobpf (0.2.0-9) unstable; urgency=medium

    * While checking if debian/copyright-scan is up to date, skip all the
    diff -Nru golang-github-iovisor-gobpf-0.2.0/debian/patches/series golang-github-iovisor-gob
  • From Domenico Andreoli@21:1/5 to Bo YU on Thu Apr 24 21:40:01 2025
    On Thu, Apr 24, 2025 at 11:56:10PM +0800, Bo YU wrote:
    Source: golang-github-iovisor-gobpf
    Version: 0.2.0-9
    Severity: important
    Tags: patch
    User: debian-riscv@lists.debian.org
    Usertags: riscv64
    User: debian-loongarch@lists.debian.org
    Usertags: loong64
    X-Debbugs-Cc: debian-riscv@lists.debian.org, debian-loongarch@lists.debian.org

    Dear Maintainer,

    Hi Bo,

    now golang-github-iovisor-gobpf is missing utsname support for riscv64
    and loong64, this will lead to FTBFS from opensnitch on these
    architectures, see [0] and [1]. In fact this will also casuse the build
    to fail on these two architectures. Two PRs to support both architectures separately has been sent upstream, but has not yet been merged(inactive upstream), so I backport them to here.

    I see that your backport is not consistent with https://github.com/iovisor/gobpf/pull/316,
    where the utsname for loong64 is of type int8. Any reason for this?

    ...


    Could you apply this on next upload?

    Give me a couple of more days so that the package migrates to testing.

    I'd be glad to hear from the longarch porters whether to use int8 or uint8.

    --
    Regards,
    --
    Bo YU

    Thanks!
    Dom

    --
    rsa4096: 3B10 0CA1 8674 ACBA B4FE FCD2 CE5B CF17 9960 DE13
    ed25519: FFB4 0CC3 7F2E 091D F7DA 356E CC79 2832 ED38 CB05

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

    iQIzBAABCgAdFiEEGSWGdoKrcEzTtUezikr1XMf+zOIFAmgKkU0ACgkQikr1XMf+ zOKM6hAAlcvrV7ST/mR4RZPfVUuh0YItSsFYVpzi0OXulRQMacZt82eWNIP6MaNE r0LniNZ1SMtxVR3B0H670JXj8+L1T9oEpWkOwDTFny4o2Ytb0P2e/QNMfCXMCg0z MZwdrwkUFF4i1QyJp7tbipVQntl1OzG9dkQhQqu1StoSuIrXdRjuZiqXhRZW07gX U+77zR/xiERHkQgszOkjLfpwIeTyi1fkbNbdQ5DONfRxnlIe9jeQGF4bkidH1xaR xgKmTZMK8IoJf6SamqVp0dE+c+wrTZwTySRG8e+Br6g0tNM95gjsQlXPrtJRrC5d JSJz1dVOcrN/JKfDmWPdSb6ZiWtW/DwlCRjk4bOUJyTAnIPoU/U7I1v7D2NquvS1 dR05YG0uobDYBoqxoGC28GSUP79ozCTWdPBpzcNzlok80E+uVVqYWCpG+ath4M+v d27gT/EMCxBRfd+l0uOnPiJoPYvwoIoGkQ3moKTQ9tb1II0yCTRnZFUUMEauGnbp KFSfvj/74SAkrkIiexOgWFdvvRFG2wr6MLI2G+AgKDnOqcdHrj0Iud7FSysTp/tK kRV5t+u76i/IT8cMJ6wQzgtFYV14ohCdar9T8Q4wqZFfQrWCwbyS0M2l9gF2C+CP wm8JYmNkkgZcPydLSOvYQTyFqroyQpgA5fMoLqYC4CpGM4V4wcQ=
    =YcLj
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet
  • From Bo YU@21:1/5 to Domenico Andreoli on Fri Apr 25 02:50:01 2025
    --rdoazw6pmb3azut2
    Content-Type: text/plain; charset=us-ascii; format=flowed
    Content-Disposition: inline
    Content-Transfer-Encoding: quoted-printable

    Hi,

    On Thu, Apr 24, 2025 at 09:30:25PM +0200, Domenico Andreoli wrote:
    [...]

    Hi Bo,

    now golang-github-iovisor-gobpf is missing utsname support for riscv64
    and loong64, this will lead to FTBFS from opensnitch on these
    architectures, see [0] and [1]. In fact this will also casuse the build
    to fail on these two architectures. Two PRs to support both architectures
    separately has been sent upstream, but has not yet been merged(inactive
    upstream), so I backport them to here.

    I see that your backport is not consistent with https://github.com/iovisor/gobpf/pull/316,
    where the utsname for loong64 is of type int8. Any reason for this?

    Thanks for the review!

    You're right -- I mistakenly merged the two upstream PRs into one, thinking it would make
    things simpler to reduce maintenance burden, but I missed the fact that they touched different
    files and handled things differently (especially the utsname type for loong64). Sorry about
    the confusion!

    I have separated the patch to match the original upstream changes more closely. I'd really
    appreciate it if someone familiar with the loong64 port could also take a look.

    ...


    Could you apply this on next upload?

    Give me a couple of more days so that the package migrates to testing.

    Thank you. :) and please let me know any issue next.

    --
    Regards,
    --
    Bo YU


    --rdoazw6pmb3azut2
    Content-Type: text/plain; charset=us-ascii
    Content-Disposition: attachment;
    filename="iovisor-gobpf-add-utsname-support-loong64-and-rv64-v2.debdiff"
    Content-Transfer-Encoding: quoted-printable

    diff -Nru golang-github-iovisor-gobpf-0.2.0/debian/changelog golang-github-iovisor-gobpf-0.2.0/debian/changelog
    --- golang-github-iovisor-gobpf-0.2.0/debian/changelog 2025-04-15 15:42:23.000000000 +0000
    +++ golang-github-iovisor-gobpf-0.2.0/debian/changelog 2025-04-24 12:16:21.000000000 +0000
    @@ -1,3 +1,10 @@
    +golang-github-iovisor-gobpf (0.2.0-9.1) UNRELEASED; urgency=medium
    +
    + * Non-maintainer upload.
    + * Add build support for loong64 and riscv64. (Closes: #1104037)
    +
    + -- Bo YU <vimer@debian.org> Thu, 24 Apr 2025 12:16:21 +0000
    +
    golang-github-iovisor-gobpf (0.2.0-9) unstable; urgency=medium

    * While checking if debian/copyright-scan is up to date, skip all the
    diff -Nru golang-github-iovisor-gobpf-0.2.0/debian/patches/add-utsname-sup