[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#835451: debian-policy: Building as root should be discouraged



Package: debian-policy
Version: 3.9.8

Greetings.

Debian Policy 4.9 says:

 For some packages, notably ones where the same source tree is compiled
 in different ways to produce two binary packages, the build target
 does not make much sense. For these packages it is good enough to
 provide two (or more) targets (build-a and build-b or whatever) for
 each of the ways of building the package, and a build target that does
 nothing. The binary target will have to build the package in each of
 the possible ways and make the binary package out of each. 

Actually, no, I don't think that's "good enough".

We should better avoid building packages as root (including fakeroot).

Otherwise we will find nasty surprises like the libtool Bug #806654,
where a badly written debian/rules made the whole build to be done as
root, including the tests, which in turn made the build to fail.

My proposal to fix this would be to remove the quoted paragraph
entirely.

Then the paragraph above it would prevail and it would be the only
policy regarding this:

 The build target should perform all the configuration and compilation
 of the package. [...]


I don't know if there are a lot of packages building things as root,
but at the very minimum we should deprecate that and stop saying it is
"good enough".

Thanks.


Reply to: