summaryrefslogtreecommitdiff
path: root/dh_testroot
diff options
context:
space:
mode:
Diffstat (limited to 'dh_testroot')
-rwxr-xr-xdh_testroot39
1 files changed, 31 insertions, 8 deletions
diff --git a/dh_testroot b/dh_testroot
index 6ce2a134..34684768 100755
--- a/dh_testroot
+++ b/dh_testroot
@@ -1,13 +1,36 @@
#!/usr/bin/perl -w
-#
-# Checks to make sure you are root.
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
-init();
+=head1 NAME
+
+dh_testroot - ensure that a package is built as root
+
+=head1 SYNOPSIS
+
+B<dh_testroot> [S<I<debhelper options>>]
+
+=head1 DESCRIPTION
+
+dh_testroot simply checks to see if you are root. If not, it exits with an
+error. Debian packages must be built as root, though you can use
+L<fakeroot(1)>
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
-# Test for uid = 0, not username of root, becuase
-# some people rename root.
if ($< != 0) {
- error("You must run this as root.");
+ error("You must run this as root (or use fakeroot).");
}
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut