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

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



control: tag -1 +patch

Hello Santiago,

On Thu, Aug 25, 2016 at 09:41:26PM +0200, Santiago Vila wrote:
> 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.

The next paragraph says:

    The build target must not do anything that might require root
    privilege.

I think that we could respond to your concern with the following patch,
which I believe reflects current project consensus, and thus for which I
am seeking seconds:

diff --git a/policy.xml b/policy.xml
index 3daa532..829cda4 100644
--- a/policy.xml
+++ b/policy.xml
@@ -2059,8 +2059,11 @@
               possible ways and make the binary package out of each.
             </para>
             <para>
-              The <literal>build</literal> target must not do anything
-              that might require root privilege.
+              The <literal>build</literal> target, and targets like
+              <literal>build-a</literal> and
+              <literal>build-b</literal> used per the previous
+              paragraph, must not do anything that might require root
+              privilege.
             </para>
             <para>
               The <literal>build</literal> target may need to run the

-- 
Sean Whitton

Attachment: signature.asc
Description: PGP signature


Reply to: