[Pkg-clamav-devel] Bug#1089455: tomsfastmath: Supporting rootless builds by default

Niels Thykier niels at thykier.net
Mon Dec 30 10:23:08 GMT 2024


Control: tags -1 patch

On Sat, 7 Dec 2024 21:55:32 +0100 Niels Thykier <niels at thykier.net> wrote:
> Source: tomsfastmath
> Version: 0.13.1-1
> Severity: important
> Tags: ftbfs
> Justification: FTBFS
> X-Debbugs-Cc: niels at thykier.net
> User: niels at thykier.net
> Usertags: rrr-no-as-default-issue
> 
> Dear maintainer,
> 
> During a test rebuild for building packages with
> `Rules-Requires-Root: no` as the default in `dpkg`,
> tomsfastmath failed to rebuild.
> 
> [...]

Please see attached as a patch.

I intend to NMU to make process on the MBF if I do not hear from you on 
this. It would help me if you either uploaded this soon or approved the 
NMU (enabling me to skip the delay). Thanks in advance.

Best regards,
Niels

-------------- next part --------------
diff -Nru tomsfastmath-0.13.1/debian/changelog tomsfastmath-0.13.1/debian/changelog
--- tomsfastmath-0.13.1/debian/changelog	2022-12-23 19:24:59.000000000 +0100
+++ tomsfastmath-0.13.1/debian/changelog	2024-12-30 11:19:46.000000000 +0100
@@ -1,3 +1,10 @@
+tomsfastmath (0.13.1-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Make package build without requiring root. (Closes: #1089455)
+
+ -- Niels Thykier <niels at thykier.net>  Mon, 30 Dec 2024 10:19:46 +0000
+
 tomsfastmath (0.13.1-1) unstable; urgency=medium
 
   * Import new upstream.
diff -Nru tomsfastmath-0.13.1/debian/control tomsfastmath-0.13.1/debian/control
--- tomsfastmath-0.13.1/debian/control	2022-12-23 19:24:23.000000000 +0100
+++ tomsfastmath-0.13.1/debian/control	2024-12-30 11:17:52.000000000 +0100
@@ -3,6 +3,7 @@
 Maintainer: ClamAV Team <pkg-clamav-devel at lists.alioth.debian.org>
 Uploaders: Sebastian Andrzej Siewior <sebastian at breakpoint.cc>
 Build-Depends: debhelper (>= 9), libtool-bin
+Rules-Requires-Root: no
 Standards-Version: 3.9.8
 Section: libs
 Homepage: http://www.libtom.net/
diff -Nru tomsfastmath-0.13.1/debian/rules tomsfastmath-0.13.1/debian/rules
--- tomsfastmath-0.13.1/debian/rules	2022-12-23 19:24:04.000000000 +0100
+++ tomsfastmath-0.13.1/debian/rules	2024-12-30 11:19:02.000000000 +0100
@@ -32,7 +32,9 @@
 
 PKGVER := $(shell dpkg-parsechangelog -SVersion | sed 's/-.*//')
 override_dh_auto_install:
-	dh_auto_install -- -f makefile.shared GROUP=root USER=root LIBPATH=/usr/lib/$(DEB_HOST_MULTIARCH)
+	# Pass the current user and group to work around chown'ing. The packaging stack will reset it to root:root
+	# later.
+	dh_auto_install -- -f makefile.shared GROUP=$$(id -g) USER=$$(id -u) LIBPATH=/usr/lib/$(DEB_HOST_MULTIARCH)
 	mkdir -p debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig
 	sed < debian/tomsfastmath.pc.in > debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/tomsfastmath.pc \
 		"s/@VERSION@/$(PKGVER)/"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-clamav-devel/attachments/20241230/6716aadd/attachment.sig>


More information about the Pkg-clamav-devel mailing list