Hi Santiago,

On  Mi 02 Aug 2017 19:15:28 CEST, Santiago Vila wrote:

On Wed, Aug 02, 2017 at 10:52:59AM -0400, Sean Whitton wrote:
control: tag -1 -patch

Hello again Santiago,

Some of us here at DebCamp have been reading your message and we're
still not sure of your intention.

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

We already have in policy both:

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

    (iI) The binary targets must be invoked as root [or fakeroot].

However, in the paragraph you quoted, there is a loophole: if the
build-a and build-b targets are not invoked by the build target, instead
directly invoked by the binary target, then (i) does not apply, and
indeed (ii) applies and they will be invoked as root.

Is that why you want to delete that paragraph?

Yes, indeed!

There is some background in libtool Bug #806654. It was a really
strange build failure and it was not self-evident that the failure was
the result of building as root. In this particular case, the package
had only standard build-indep and build-arch targets, but it made me
to read policy again and that's when I found about the "good enough"
thing.

Then my suggestion (as discussed here in DebCamp) would be to rephrase that paragraph rather then removing it entirely.

What needs to be said is that if you have a package that builds the software multiple times (e.g. once against gtk2, next against gtk3), you need to define each of the build processes as build-a, build-b, etc.

These build sub-targets need to be called from the build target and _must_ _not_ be called from the binary target.


e.g.

build: build-a build-b
<------>BUILD SOMETHING HERE THAT build-a AND build-b NEED ALIKE (optional)

build-a:
<------>BUILD SOMETHING IN THE a-WAY

build-b:
<------>BUILD SOMETHING IN THE b-WAY


binary: binary-a binary-b
<------>COMMON FILES SHARED BETWEEN binary-a AND binary-b (optional)

binary-a:
<------>INSTALL FILES FROM build-a INTO BIN:PACKAGE(S)

binary-b:
<------>INSTALL FILES FROM build-b INTO BIN:PACKAGE(S)


Right?

Mike
--

DAS-NETZWERKTEAM
mike gabriel, herweg 7, 24357 fleckeby
mobile: +49 (1520) 1976 148
landline: +49 (4354) 8390 139

GnuPG Fingerprint: 9BFB AEE8 6C0A A5FF BF22  0782 9AF4 6B30 2577 1B31
mail: mike.gabr...@das-netzwerkteam.de, http://das-netzwerkteam.de

Attachment: pgp76N9Biuibm.pgp
Description: Digitale PGP-Signatur

Reply via email to