🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.debian.bugs.dist
1 messages
1 total messages Started by Helmut Grohne Thu, 05 Nov 2026 09:30
Bug#1153086: prometheus-ipmi-exporter FTCBFS: multiple reasons
#3309
Author: Helmut Grohne
Date: Thu, 05 Nov 2026 09:30
93 lines
5529 bytes
--O6XKH7RIjdlAfABg
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Source: prometheus-ipmi-exporter
Version: 1.10.1-1
Tags: patch
User: debian-cross@lists.debian.org
Usertags: ftcbfs

prometheus-ipmi-exporter fails to cross build from source. On the
surface it fails running the host's Go compiler. Since gccgo became
unsupported, we can change it to golang-go and since the golang
implementation is multitarget we can annotate it :native.

At this point, we get an ipmi_exporter executable, but moving it around
fails, because cross compilation uses a different directory hierarchy
below the _build folder. I suggest renaming the file after
dh_auto_install where the path becomes predictable.

Last but not least, the manual page generation wants to run it and we
cannot do that. I suggest adding a native build pass. Due to the
different layout, we can reuse the same build directory.

Please consider applying the attached patch.

Helmut

--O6XKH7RIjdlAfABg
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment;
	filename="prometheus-ipmi-exporter_1.10.1-1.1.debdiff"

diff -Nru prometheus-ipmi-exporter-1.10.1/debian/changelog prometheus-ipmi-exporter-1.10.1/debian/changelog
--- prometheus-ipmi-exporter-1.10.1/debian/changelog	2025-08-14 14:52:46.000000000 +0200
+++ prometheus-ipmi-exporter-1.10.1/debian/changelog	2026-11-04 19:46:40.000000000 +0100
@@ -1,3 +1,13 @@
+prometheus-ipmi-exporter (1.10.1-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Use a native golang Go compiler.
+    + Reduce assumptions on build paths.
+    + Add a native pass for generating the manual page.
+
+ -- Helmut Grohne <helmut@subdivi.de>  Wed, 04 Nov 2026 19:46:40 +0100
+
 prometheus-ipmi-exporter (1.10.1-1) unstable; urgency=medium
 
   * New upstream release
diff -Nru prometheus-ipmi-exporter-1.10.1/debian/control prometheus-ipmi-exporter-1.10.1/debian/control
--- prometheus-ipmi-exporter-1.10.1/debian/control	2025-08-14 14:52:34.000000000 +0200
+++ prometheus-ipmi-exporter-1.10.1/debian/control	2026-11-04 19:46:39.000000000 +0100
@@ -6,7 +6,7 @@
 Rules-Requires-Root: no
 Build-Depends: debhelper-compat (= 13),
                dh-sequence-golang,
-               golang-any,
+               golang-go:native,
                golang-github-bougou-go-ipmi-dev,
                golang-github-prometheus-client-golang-dev,
                golang-github-prometheus-common-dev,
diff -Nru prometheus-ipmi-exporter-1.10.1/debian/rules prometheus-ipmi-exporter-1.10.1/debian/rules
--- prometheus-ipmi-exporter-1.10.1/debian/rules	2025-08-14 14:47:56.000000000 +0200
+++ prometheus-ipmi-exporter-1.10.1/debian/rules	2026-11-04 19:46:40.000000000 +0100
@@ -26,14 +26,16 @@
 
 override_dh_auto_build:
 	dh_auto_build -- $(BUILDFLAGS)
-	# Rename the binary to match the debian package.
-	mv -v _build/bin/ipmi_exporter _build/bin/$(BINNAME)
 
 MAN_WHATIS := $(BINNAME) \\- Prometheus exporter for IPMI devices
 MAN_PROG := $(shell echo $(BINNAME) | tr [:lower:] [:upper:])
 MAN_DATE := $(shell date --utc --date='@$(SOURCE_DATE_EPOCH)' '+%B %Y')
 
 execute_before_dh_installman:
+ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+	dpkg-architecture -a$(DEB_BUILD_ARCH) -f -c dh_auto_build -- $(BUILDFLAGS)
+endif
+	cp _build/bin/ipmi_exporter _build/bin/$(BINNAME)
 	_build/bin/$(BINNAME) --help-man > _build/$(BINNAME).1
 	# Fix title header and footer.
 	sed -i '/^.TH .*/c.TH $(MAN_PROG) "1" "$(MAN_DATE)" "$(DEB_SOURCE) $(DEB_VERSION_UPSTREAM)" "Prometheus"/' \
@@ -47,3 +49,5 @@
 
 override_dh_auto_install:
 	dh_auto_install -- --no-source
+	# Rename the binary to match the debian package.
+	mv -v debian/prometheus-ipmi-exporter/usr/bin/ipmi_exporter debian/prometheus-ipmi-exporter/usr/bin/$(BINNAME)

--O6XKH7RIjdlAfABg--
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads