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

Re: Bug#845715: debian-policy: Please document that packages are not allowed to write outside their source directories



On Sat, 26 Nov 2016 at 12:54:12 +0000, Johannes Schauer wrote:
> Quoting Adam D. Barratt (2016-11-26 09:40:17)
> > On Sat, 2016-11-26 at 03:34 +0000, Johannes Schauer wrote:
> > > +         None of the required targets must attempt to write outside of the
> > 
> > the current wording means "None of the
> > required targets is required to attempt".
> 
> I do not understand why what I wrote is equal to [that].
> Could you elaborate? I was not able to find the reason myself.

"None of [set X] must [action y]" can be read as "there is no x in X
for which x must y" - a statement about the absence of a requirement.

What you were trying to say was "it must be true that there is no x
in X for which x *does* y" - a requirement.

(In this case X = the required targets, and y = write outside
{ build directory, /tmp })

> Most notably, the
> required targets must not attempt to write into <file>$HOME</file>.

I would prefer this to be phrased more like:

    Most notably, the required targets must not attempt to write to the
    building user's home directory

because otherwise, it could be interpreted as forbidding packages in which
the build *does* write to $HOME, but to prevent this from causing the
problems you described, the package's debian/rules does something like
"export HOME = $(CURDIR)/debian/tmp-home" so that the real home directory
remains unaffected.

glib2.0 is one such package: it has build-time regression tests that
write to $HOME, but its debian/rules sets $HOME to a harmless value to
avoid failing on buildds or violating the spirit of the proposed policy.
I would like to make sure this also does not violate the letter of the
policy.

    S


Reply to: