]> git.tue.mpg.de Git - lopsub.git/commitdiff
debian: Enable `Rules-Requires-Root: no`. debian
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 9 Dec 2024 18:29:01 +0000 (19:29 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Thu, 12 Dec 2024 20:03:23 +0000 (21:03 +0100)
During a test rebuild for building packages with `Rules-Requires-Root:
no` as the default in `dpkg`, liblopsub failed to rebuild.

The problem is the rule of the `binary` target in `debian/rules` which
runs `install(1)` with -o root -g root to set the owner and group ID of
the files and directories being installed. With `Rules-Requires-Root:
no`, this fails due to insufficient permissions. This commit removes
the problematic options in favor of running `dh_fixperms(1)` just
before `dh_makeshlibs(1)`.

With these changes in place, the build no longer requires any form of
root during the `binary` target. Consequently, we may enable rootless
builds in `debian/control`.

Reported-by: Niels Thykier <niels@thykier.net>
Suggested-by: Niels Thykier <niels@thykier.net>
Reviewed--by: Niels Thykier <niels@thykier.net>
debian/changelog
debian/control
debian/rules

index dc53520e8746f6a3adf0972253255ba1a740f98b..eb0f917cd5035657082c328b521b975212b8663a 100644 (file)
@@ -1,3 +1,9 @@
+liblopsub (1.0.5-3) experimental; urgency=low
+
+  * Support rootless builds. Closes: #1089365
+
+ -- Andre Noll <maan@tuebingen.mpg.de>  Tue, 10 Dec 2024 18:40:23 +0100
+
 liblopsub (1.0.5-2) experimental; urgency=medium
 
   [ Helmut Grohne ]
index 668fbd9058dd06040c3e72cd73b7c8343af14b0e..b349eba8bd2293fe789165553dd9673860fe2a28 100644 (file)
@@ -7,6 +7,7 @@ Standards-Version: 4.6.2
 Homepage: https://people.tuebingen.mpg.de/maan/lopsub
 Vcs-Browser: https://git.tuebingen.mpg.de/lopsub.git
 Vcs-Git: https://git.tuebingen.mpg.de/lopsub.git
+Rules-Requires-Root: no
 
 Package: liblopsub1t64
 Section: libs
index 4f5f5ca83cb2520e7697fa645ca8b40aa6ea8de9..9801fe6e0b20503fa6acbcc3896107cd535afdd3 100755 (executable)
@@ -36,9 +36,8 @@ clean:
        $(MAKE) distclean
        dh_clean
 
-INST_OWN = -o root -g root
-MAKE_DIR = install -p -d $(INST_OWN) -m 755
-INST_FILE = install -c $(INST_OWN) -m 644
+MAKE_DIR = install -p -d -m 755
+INST_FILE = install -c -m 644
 
 binary: build
        $(checkdir)
@@ -59,6 +58,7 @@ binary: build
        $(INST_FILE) debian/changelog $(DEVDOCS_DIR)/changelog.Debian
        gzip -fn9 $(DOCS_DIR)/changelog.Debian
        gzip -fn9 $(DEVDOCS_DIR)/changelog.Debian
+       dh_fixperms
        dh_makeshlibs
        dh_shlibdeps
        dh_strip