Source: vonsh
Version: 1.0+ds-0.1
Tags: patch
User: debian-cr...@lists.debian.org
Usertags: ftcbfs

vonsh fails to cross build from source, because it strips with the build
architecture strip. Once I looked into the package, I encountered more
issues. It does not generate a -dbgsym package. It does not honour
DEB_BUILD_OPTIONS=nostrip. It does not honour dpkg-buildflags and thus
uses 32bit time still. The attached patch fixes all of this.

Is this really a package worth keeping in Debian? No maintainer upload
in 5 years, 2 NMUs. Consider RoQA.

Helmut
--- vonsh-1.0+ds/debian/changelog
+++ vonsh-1.0+ds/debian/changelog
@@ -1,3 +1,12 @@
+vonsh (1.0+ds-0.2) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + cross.patch: Make CFLAGS, LDFLAGS and strip configurable.
+    + Force a non-stripping strip
+
+ -- Helmut Grohne <hel...@subdivi.de>  Thu, 25 Apr 2024 16:40:11 +0200
+
 vonsh (1.0+ds-0.1) unstable; urgency=medium
 
   * Non-maintainer upload.
--- vonsh-1.0+ds/debian/patches/cross.patch
+++ vonsh-1.0+ds/debian/patches/cross.patch
@@ -0,0 +1,22 @@
+--- vonsh-1.0+ds.orig/Makefile
++++ vonsh-1.0+ds/Makefile
+@@ -9,14 +9,16 @@
+ SRC = $(wildcard $(SRC_DIR)/*.c)
+ OBJ = $(SRC:$(SRC_DIR)/%.c=$(OBJ_DIR)/%.o)
+ EXE = $(EXE_DIR)/vonsh
+-CFLAGS = -I$(INC_DIR) -DVERSION_STR=\"$(VERSION_STR)\" -Wall -Wformat 
-Werror=format-security
+-LDFLAGS = -Wl,-z,relro,-z,now
++STRIP ?= strip
++CFLAGS ?= -Wall -Wformat -Werror=format-security
++CFLAGS += -I$(INC_DIR) -DVERSION_STR=\"$(VERSION_STR)\"
++LDFLAGS ?= -Wl,-z,relro,-z,now
+ LDLIBS = -lSDL2 -lSDL2main -lSDL2_image -lSDL2_mixer
+ .PHONY: all clean install
+ all: release
+ release: CFLAGS += -O2 -D_FORTIFY_SOURCE=2 -fstack-protector-strong
+ release: $(EXE)
+-      strip --strip-all $^
++      $(STRIP) --strip-all $^
+ debug: CFLAGS += -g
+ debug: $(EXE)
+ $(EXE): $(OBJ)
--- vonsh-1.0+ds/debian/patches/series
+++ vonsh-1.0+ds/debian/patches/series
@@ -0,0 +1 @@
+cross.patch
--- vonsh-1.0+ds/debian/rules
+++ vonsh-1.0+ds/debian/rules
@@ -3,6 +3,8 @@
 #export DH_VERBOSE=1
 include /usr/share/dpkg/pkg-info.mk
 export VERSION_STR=$(DEB_VERSION)
+# Do not strip.
+export STRIP=true
 
 %:
        dh $@

Reply via email to