Source: libcap2
Version: 1:2.75-6
Severity: important
Justification: architecture cross bootstrap regression
Tags: patch
User: debian-cr...@lists.debian.org
Usertags: ftcbfs
User: helm...@debian.org
Usertags: rebootstrap

Hi,

libcap2 broke architecture cross bootstrap by adding a dependency on
golang-any. That's not available early. It also doesn't have to be as
it's only used for building arch:all packages whereas cross bootstrap
performs an arch-only build.

Concurrently, regular non-bootstrap cross builds are broken as the build
tries to execute the host's go binary and that doesn't go well.

We can easily fix both by skipping all go stuff in arch-only builds. I'm
attaching a patch and hope you can fix this regression in trixie.

Helmut
diff --minimal -Nru libcap2-2.75/debian/changelog libcap2-2.75/debian/changelog
--- libcap2-2.75/debian/changelog       2025-04-11 20:52:04.000000000 +0200
+++ libcap2-2.75/debian/changelog       2025-04-21 18:32:37.000000000 +0200
@@ -1,3 +1,10 @@
+libcap2 (1:2.75-6.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Move go dependencies to B-D-I. (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Mon, 21 Apr 2025 18:32:37 +0200
+
 libcap2 (1:2.75-6) unstable; urgency=medium
 
   * Add cleaning for Golang build
diff --minimal -Nru libcap2-2.75/debian/control libcap2-2.75/debian/control
--- libcap2-2.75/debian/control 2025-04-11 20:52:04.000000000 +0200
+++ libcap2-2.75/debian/control 2025-04-21 18:31:57.000000000 +0200
@@ -4,11 +4,11 @@
 Maintainer: Christian Kastner <c...@debian.org>
 Build-Depends: patchelf,
                debhelper-compat (= 13),
-               dh-golang,
-               golang-any,
                gperf (>= 3.1),
                indent,
                libpam0g-dev,
+Build-Depends-Indep: dh-golang,
+                     golang-any,
 Rules-Requires-Root: no
 Standards-Version: 4.7.0
 Homepage: https://sites.google.com/site/fullycapable/
diff --minimal -Nru libcap2-2.75/debian/rules libcap2-2.75/debian/rules
--- libcap2-2.75/debian/rules   2025-04-11 20:52:04.000000000 +0200
+++ libcap2-2.75/debian/rules   2025-04-21 18:32:33.000000000 +0200
@@ -37,8 +37,10 @@
        dh_auto_clean -- $(MAKE_ASSIGNMENTS)
        # The Golang build system does not appear to fully honor -B, so we need
        # two cleans
-       dh_auto_clean -B_build -O--buildsystem=golang
-       dh_auto_clean O--buildsystem=golang
+       set -e; if test -d _build; then \
+               dh_auto_clean -B_build -O--buildsystem=golang; \
+               dh_auto_clean O--buildsystem=golang; \
+       fi
        # Undo change of lookup (see override_dh_auto_build)
        sed -i -e 's,\./tcapsh-static,../progs/tcapsh-static,g' 
tests/libcap_launch_test.c
 
@@ -110,11 +112,11 @@
        kernel.org/pub/linux/libs/security/libcap/cap \
        kernel.org/pub/linux/libs/security/libcap/psx
 
-execute_after_dh_auto_configure:
+execute_after_dh_auto_configure-indep:
        dh_auto_configure -B_build -O--buildsystem=golang
 
-execute_after_dh_auto_install:
+execute_after_dh_auto_install-indep:
        dh_auto_install -B_build -O--buildsystem=golang
 
-execute_after_dh_auto_build:
+execute_after_dh_auto_build-indep:
        dh_auto_build -B_build -O--buildsystem=golang

Reply via email to