Skip to content

Commit

Permalink
MT#61568 debian: Switch to Rules-Requires-Root no
Browse files Browse the repository at this point in the history
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
  • Loading branch information
guillemj committed Nov 22, 2024
1 parent 03f4cda commit 3b5491a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ Priority: optional
Maintainer: Sipwise Development Team <support@sipwise.com>
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,
Expand Down

0 comments on commit 3b5491a

Please sign in to comment.