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

Bug#975637: debian-policy: deprecate Rules-Requires-Root other than "no", "binary-targets" in Debian



Hello,

On Sun 02 Oct 2022 at 09:03PM +02, Niels Thykier wrote:

> Here is my view in short: As I see it, only the values `no` and
> `binary-targets` for `Rules-Requires-Root` makes sense for the *policy defined
> targets*[1] at the moment.  Accordingly, Debian policy can probably reduce the
> field to only cover `binary-targets` and `no` (and describe the remaining
> values as "[they] will mostly behave like `no`, but read more in the dpkg
> documentation for concrete the non-policy relevant use-case")
>
> In theory, you could use `Rules-Requires-Root` to cover the static ownership
> cases (where you need to chown files and store that ownership in the deb).
> However, that would require people to consistently use fakeroot with -l + -s
> (which, to my knowledge, no one does) - failure to do so would just silently
> loose the ownership and the files would end up with the wrong owner.
>
> On a related note, both Guillem and I agreed a while back that ownership
> (among other) should ideally be specifiably without using chown.  While a
> concrete method has not yet materialized, I am not working on supporting
> static ownership via chown in debhelper (nor do I plan to do so), so in
> practice `binary-targets` is the only reliable way to setup static ownership
> for any package built via debhelper[2].
>
> So in summary, with the current tooling, only `no` and `binary-targets` make
> sense for *policy defined targets* and I am not aware of anything that would
> change that.

Many thanks for the input.

Could you just confirm that there isn't any info in Policy which isn't
also in dpkg documentation?

If so, then if someone particularly wants to see this gone from the
manual they can prepare a patch for seconding.

> PS: As for the adding a recommendation to use `Rules-Requires-Root: no` where
> possible. I would second such as change. Over half of all Debian source
> packages in testing have the value, and adoption has been quite fast despite
> very little push from Guillem and I on it.  For me, the recommendation would
> be documenting public sentiment on this topic.
>
> Source: https://trends.debian.net/rulesreqroot_testing-percent.png

Cool.  I think that would be fine too.

-- 
Sean Whitton

Attachment: signature.asc
Description: PGP signature


Reply to: