Source: zutils
Version: 1.15-3
Severity: wishlist

Hi,

zutils is one of the packages in the archive that doesn't build with
hardening flags.  I took the liberty to do a few improvements to the
package and enable the necessary flags for hardening.

I was going to submit a Merge Request, but I noticed the package isn't
maintained on salsa and I don't have an account at the forge.

Thanks,

-- 
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF  31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
https://sergiodj.net/

diff -Nru zutils-1.15/debian/changelog zutils-1.15/debian/changelog
--- zutils-1.15/debian/changelog	2025-08-24 12:59:48.000000000 -0400
+++ zutils-1.15/debian/changelog	2025-09-18 21:15:21.000000000 -0400
@@ -1,3 +1,12 @@
+zutils (1.15-4) sid; urgency=medium
+
+  * d/p/d/0002-zupdate.patch: Remove unnecessary patch.
+  * d/rules: Rework configure; remove override_dh_auto_install.
+    Pass more build flags when invoking configure.
+  * d/rules: Enable hardening.
+
+ -- Sergio Durigan Junior <[email protected]>  Thu, 18 Sep 2025 21:15:21 -0400
+
 zutils (1.15-3) sid; urgency=medium
 
   * Removing pre-trixie usr-is-merged handling in preparation for
diff -Nru zutils-1.15/debian/patches/debian/0002-zupdate.patch zutils-1.15/debian/patches/debian/0002-zupdate.patch
--- zutils-1.15/debian/patches/debian/0002-zupdate.patch	2025-08-24 12:36:13.000000000 -0400
+++ zutils-1.15/debian/patches/debian/0002-zupdate.patch	1969-12-31 19:00:00.000000000 -0500
@@ -1,15 +0,0 @@
-Author: Daniel Baumann <[email protected]>
-Description: Avoid linking zupdate statically.
-
-diff -Naurp zutils.orig/Makefile.in zutils/Makefile.in
---- zutils.orig/Makefile.in
-+++ zutils/Makefile.in
-@@ -52,7 +52,7 @@ ztest : $(ztest_objs)
- 	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(ztest_objs)
- 
- zupdate : $(zupdate_objs)
--	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(zupdate_objs)
-+	$(CXX) $(CXXFLAGS) -o $@ $(zupdate_objs)
- 
- rc.o : rc.cc
- 	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -DPROGVERSION=\"$(pkgversion)\" -DSYSCONFDIR=\"$(sysconfdir)\" -c -o $@ $<
diff -Nru zutils-1.15/debian/patches/series zutils-1.15/debian/patches/series
--- zutils-1.15/debian/patches/series	2025-06-07 14:51:32.000000000 -0400
+++ zutils-1.15/debian/patches/series	2025-09-18 21:09:41.000000000 -0400
@@ -1,2 +1 @@
 debian/0001-build.patch
-debian/0002-zupdate.patch
diff -Nru zutils-1.15/debian/rules zutils-1.15/debian/rules
--- zutils-1.15/debian/rules	2025-08-24 12:36:13.000000000 -0400
+++ zutils-1.15/debian/rules	2025-09-18 21:11:29.000000000 -0400
@@ -2,14 +2,17 @@
 
 include /usr/share/dpkg/buildtools.mk
 
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
 %:
 	dh ${@}
 
 override_dh_auto_configure:
-	dh_auto_configure -- CXX=$(CXX)
-
-override_dh_auto_install:
-	dh_auto_install -- DESTDIR=$(CURDIR)/debian/zutils
+	dh_auto_configure -- \
+		CXX="$(CXX)" \
+		CXXFLAGS="$(CXXFLAGS)" \
+		CPPFLAGS="$(CPPFLAGS)" \
+		LDFLAGS="$(LDFLAGS)"
 
 execute_after_dh_auto_install:
 	# removing unused files

Attachment: signature.asc
Description: PGP signature

Reply via email to