Drew Parsons <[EMAIL PROTECTED]> writes: > I just noticed the debian/rules file for mirrormagic which I inherited from > Joey Hess uses dh_testroot to check that the build is run as root (or > fakeroot).
There are two parts to building a Debian package: (a) compiling/linking/etc. the application(s) (b) installing these and any supplementary data into a staging area, which is then packaged into a deb Step (a) is normally invoked by the "build" target, and should not usually need root rights. I don't know if mirrormagic is an exception. This could even be a bug. Step (b) (the "binary*" targets) needs a root-like environment so that file owners etc. are handled without permission problems. A normal user can't simply install a file owned by root, or sgid games, for example. This needs (probably simulated) root rights. > I'm wondering what the justification for doing this is. It prevents, for > instance, a home user compiling his own deb before installing unless he > specifically compiles it under root or fakeroot. Your home user can always do (a) from above. Most programs will also support running from their build dir. If s/he wants to do (b) as well, ... just use fakeroot - it's free! -- Robbe
signature.ng
Description: PGP signature