- Package:
- debian-policy
- Source:
- debian-policy
- Submitter:
- Guillem Jover
- Date:
- 2024-08-25 07:45:04 UTC
- Severity:
- normal
Hi! Starting with dpkg 1.22.0, it implements a dpkg-build-api mechanism similar in concept to the debhelper-compat levels. You can check its documentation in the dpkg-build-api(7) and dpkg-buildapi(1) manual pages. I think at least the part that involves the Rules-Requires-Root field which in level 1 defaults to value «no» instead of «binary-targets» should be documented in the Debian policy. I'm ambivalent on whether documenting the general mechanism in Debian policy makes sense though. [ I noticed I didn't update the deb-src-control(5) manual page, so I did that locally and will be part of the next dpkg release. ] Thanks, Guillem
Note that I proposed that in bug #229357 in 2004, this was even fully implemented, commited to the VCS and finally reverted without explanation. I am still not sure why I suffered so much hostility over such a simple design. Cheers,
Hello, Agreed. Thanks for the report. When many/most Debian package maintainers need to know about this, as they do debhelper compat, then we should add it, but until then, perhaps not.
On Fri, 15 Dec 2023 16:42:34 +0000 Sean Whitton <spwhitton@spwhitton.name> wrote: Can we have a trivial editorial change to the Rules-Requires-Root paragraph saying that default depends on the `dpkg-build-api` used? Bringing it up, because we are seeing a recommendation for people to add a `Rules-Requires-Root: no` even though it is the default and redundant because "policy and lintian said so". Best regards, Niels PS: Concrete example I noticed was in #1078267, but I doubt it is a lone case if we dig deeper.
Hello, That's not good. Let's fix this. It's not quite trivial, because I think we need to say what a dpkg-build-api is, somewhere, and how it's selected. A patch would be welcome and it would still be an informative/editorial change that I could just upload, I think.
Sean Whitton: How about adding """ The default for Rules-Requires-Root depends on the dpkg-build-api level (the dpkg-build-api is defined in "man 7 dpkg-build-api"). At level 0 (or when not declared), Rules-Requires-Root defaults to binary-targets. In later versions, it defaults to no. """ in 5.6.31 and then removing the `(default)` next `binary-targets` in 5.6.31? I think that would do wonders. Best regards, Niels
Hi! That would look good to me. Thanks, Guillem
Hello, Based on this I came up with the following, which I think is slightly cleaner than adding a whole paragraph. Would you mind checking it?--- debian/changelog | 2 ++ policy/ch-controlfields.rst | 17 ++++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index c1fc3c3..2d5d204 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,8 @@ debian-policy (4.7.0.1) UNRELEASED; urgency=medium Thanks to Paul Gevers for the report. * Fix markup problem in 3.9 (Closes: #1074040). Thanks to Ke Zhang for the report & patch. + * Update specification of the default value for Rules-Requires-Root. + See #1057238.
Hi! Ah, indeed, this looks better to me too! Thanks, Guillem
Sean Whitton: LGTM/seconded. Thanks for providing. Best regards, Niels