Hi Andrej,

* Jochen Sprickerhof <[email protected]> [2025-09-09 09:55]:
9mount currently requires (fake)root while building binary
targets. This is not available on the reproduce.d.n infrastructure,
and the binary package changes contents when built without root.

Please make your package buildable with `Rules-Requires-Root:
binary-targets` removed.

See glhack/debian/debputy.manifest for an example how this can be done.

Please find a patch to fix this attached. Can you do the upload?

Thanks!

Jochen
diff --git a/debian/control b/debian/control
index 5fc84bd..eac4e1d 100644
--- a/debian/control
+++ b/debian/control
@@ -2,8 +2,7 @@ Source: 9mount
 Section: admin
 Priority: optional
 Maintainer: Andrej Shadura <[email protected]>
-Build-Depends: debhelper (>= 11)
-Rules-Requires-Root: binary-targets
+Build-Depends: debhelper (>= 11), dh-sequence-zz-debputy-rrr,
 Standards-Version: 4.1.2
 Homepage: http://sqweek.net/code/9mount/
 Vcs-Browser: https://browse.dgit.debian.org/9mount.git/
diff --git a/debian/debputy.manifest b/debian/debputy.manifest
new file mode 100644
index 0000000..34c8f5c
--- /dev/null
+++ b/debian/debputy.manifest
@@ -0,0 +1,13 @@
+manifest-version: '0.1'
+packages:
+  9mount:
+    transformations:
+    - path-metadata:
+        path: usr/bin/9bind
+        mode: "u=rwxs,go=rx"
+    - path-metadata:
+        path: usr/bin/9mount
+        mode: "u=rwxs,go=rx"
+    - path-metadata:
+        path: usr/bin/9umount
+        mode: "u=rwxs,go=rx"
diff --git a/debian/patches/chown.patch b/debian/patches/chown.patch
new file mode 100644
index 0000000..640c6fb
--- /dev/null
+++ b/debian/patches/chown.patch
@@ -0,0 +1,10 @@
+--- a/Makefile
++++ b/Makefile
+@@ -22,7 +22,5 @@
+ 	cp -f 9mount $(bindir)
+ 	cp -f 9umount $(bindir)
+ 	cp -f 9bind $(bindir)
+-	chown root:users $(bindir)/9mount $(bindir)/9umount $(bindir)/9bind
+-	chmod 4755 $(bindir)/9mount $(bindir)/9umount $(bindir)/9bind
+ 	mkdir -p $(mandir)/man1
+ 	cp -f 9mount.1 $(mandir)/man1
diff --git a/debian/patches/series b/debian/patches/series
index 8654805..84a49bf 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 manpages.patch
+chown.patch
diff --git a/debian/rules b/debian/rules
index 662befd..340d039 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,9 +11,4 @@ override_dh_auto_test:
 override_dh_auto_install:
 	$(MAKE) prefix=$(CURDIR)/debian/9mount/usr install
 
-	chown root:root debian/9mount/usr/bin/*
-
-override_dh_fixperms:
-	dh_fixperms -Xusr/bin/9bind -Xusr/bin/9mount -Xusr/bin/9umount
-
-.PHONY: override_dh_auto_test override_dh_auto_install override_dh_fixperms
+.PHONY: override_dh_auto_test override_dh_auto_install

Attachment: signature.asc
Description: PGP signature

Reply via email to