Source: wego
Version: 2.4-2
Tags: patch
User: [email protected]
Usertags: ftcbfs

wego fails to cross build from source, because it fails running the
host's Go compiler. Since gccgo became unsupported, we can change the
compiler dependency to golang-go and since the latter is a multitarget
compiler, we can annotate it :native. Once this is fixed, generation of
the manual page fails. I suggest adding a secondary build pass here. As
go uses a different build directory layout for cross compilation, we can
share the build place and reference the wego binary for manual page
generation there. Please consider applying the attached patch.

Helmut
diff -Nru wego-2.4/debian/changelog wego-2.4/debian/changelog
--- wego-2.4/debian/changelog   2026-08-19 20:23:22.000000000 +0200
+++ wego-2.4/debian/changelog   2026-11-05 10:09:36.000000000 +0100
@@ -1,3 +1,12 @@
+wego (2.4-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Use a native golang Go compiler.
+    + Add a build pass for the manual page.
+
+ -- Helmut Grohne <[email protected]>  Thu, 05 Nov 2026 10:09:36 +0100
+
 wego (2.4-2) unstable; urgency=medium
 
   * Team upload
diff -Nru wego-2.4/debian/control wego-2.4/debian/control
--- wego-2.4/debian/control     2026-08-19 20:23:22.000000000 +0200
+++ wego-2.4/debian/control     2026-11-05 10:08:32.000000000 +0100
@@ -4,7 +4,7 @@
 Uploaders: Philipp Kern <[email protected]>
 Build-Depends: debhelper-compat (= 14),
                dh-sequence-golang,
-               golang-any,
+               golang-go:native,
                golang-github-mattn-go-colorable-dev,
                golang-github-mattn-go-runewidth-dev,
                golang-github-muesli-mango-dev (>> 0.2.0-3~),
diff -Nru wego-2.4/debian/rules wego-2.4/debian/rules
--- wego-2.4/debian/rules       2026-08-19 20:23:22.000000000 +0200
+++ wego-2.4/debian/rules       2026-11-05 10:09:36.000000000 +0100
@@ -1,10 +1,15 @@
 #!/usr/bin/make -f
 
+include /usr/share/dpkg/architecture.mk
+
 %:
        dh $@ --builddirectory=_build --buildsystem=golang
 
 override_dh_auto_install:
        dh_auto_install -- --no-source
        mkdir -p debian/tmp/usr/share/man/man1
-       debian/tmp/usr/bin/wego --man \
+ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+       dpkg-architecture -a$(DEB_BUILD_ARCH) -f -c dh_auto_build
+endif
+       _build/bin/wego --man \
                > debian/tmp/usr/share/man/man1/wego.1

Reply via email to