dh_testroot (1) Linux Manual Page
NAME
dh_testroot – ensure that a package is built with necessary level of root permissions
SYNOPSIS
dh_testroot [debhelper options]
DESCRIPTION
dh_testroot is used to determine if the package has access to at least the level of root access that it declared it needed via the Rules-Requires-Root (R³) field.
The following is how dh_testroot behaves based on the effective value of the R³ field:
- "binary-targets"
-
dh_testrootasserts that it is run as root or under fakeroot(1). - "no"
-
dh_testrootreturns successfully. - Any other value than the above
-
dh_testrootasserts that it is either run as root (or under fakeroot(1)) or the builder has provided theDEB_GAIN_ROOT_CMDenvironment variable (e.g. via dpkg-buildpackage -r).
For backwards compatibility, dh_testroot will consider the absence of the R³ field as if the R³ field was set to “binary-targets”.
SEE ALSO
debhelper(7)
This program is a part of debhelper.
AUTHOR
Joey Hess <joeyh [at] debian.org>
