From 3b5491a04802246375d14f1108e6c6cccb9c784d Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Mon, 18 Nov 2024 20:48:26 +0100 Subject: [PATCH] MT#61568 debian: Switch to Rules-Requires-Root no MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This field tells dpkg-buildpackage that no debian/rules target needs to run as root-like (usually via fakeroot), and can be built with no privileges (real or faked ones). This should make the build either faster as there will be no interposed libc calls via an LD_PRELOAD library like fakeroot does, and more robust as fakeroot needs to keep up with implementation details from the system libc; or more secure if the build was being done via real root. The full documentation can be found with «man deb-src-control» and at «/usr/share/doc/dpkg/spec/rootless-builds.txt». Some test cases in the test suite require execution under root-like, and if not will fallback to use `fakeroot`. Once we stop running the build as root-like (via fakeroot), the test then tries to execute fakeroot which cannot be found any longer as there is no explicit Build-Depends on it, so we need to add it explicitly. After the above, there is no longer any need to run the build as root-like. A rebuild before and after this change produces the same file list and permissions. Change-Id: I639a3c77dc0a74430813377124eedf197589121a --- debian/control | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 7ccd5bb0..7d1e4343 100644 --- a/debian/control +++ b/debian/control @@ -4,11 +4,12 @@ Priority: optional Maintainer: Sipwise Development Team Homepage: https://www.sipwise.com/ Standards-Version: 4.6.2 -Rules-Requires-Root: binary-targets +Rules-Requires-Root: no Build-Depends: asciidoctor, bash-completion (>= 1:2.1-4.2~), debhelper-compat (= 13), + fakeroot, git, libcapture-tiny-perl, libclone-perl,