Bug#1065643: debian-policy: Refer to «dpkg-buildtree clean» for dpkg generated files
Hello, On Thu 07 Mar 2024 at 11:22pm +01, Guillem Jover wrote: > From afac52fa956087eb737c123682f634fc739c7e20 Mon Sep 17 00:00:00 2001 > From: Guillem Jover > Date: Tue, 27 Feb 2024 23:37:06 +0100 > Subject: [PATCH] =?UTF-8?q?Add=20references=20to=20=C2=ABdpkg-buildtree=20?= > =?UTF-8?q?clean=C2=BB=20for=20debian/{substvars,files}?= > MIME-Version: 1.0 > Content-Type: text/plain; charset=UTF-8 > Content-Transfer-Encoding: 8bit > > These files are generated by dpkg tools (and in some cases by helpers), > but the maintainer was responsible for cleaning them up. There is now > a new command that will take care of cleaning these (and any other > future) files that the dpkg suite might end up generating, making their > introduction easier as the responsibility to remove them shifts back > where it belongs. > --- > policy/ch-source.rst | 7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/policy/ch-source.rst b/policy/ch-source.rst > index 4307e89..2fb05cd 100644 > --- a/policy/ch-source.rst > +++ b/policy/ch-source.rst > @@ -685,7 +685,7 @@ variables are also available. > > The ``debian/substvars`` file is usually generated and modified > dynamically by ``debian/rules`` targets, in which case it must be > -removed by the ``clean`` target. > +removed by the ``clean`` target (for example with ``dpkg-buildtree clean``). > > See :manpage:`deb-substvars(5)` for full details about source variable > substitutions, including the format of ``debian/substvars``. > @@ -725,8 +725,9 @@ building packages to record which files are being > generated. > > It should not exist in a shipped source package, and so it (and any > backup files or temporary files such as ``files.new``) [#]_ should be > -removed by the ``clean`` target. It may also be wise to ensure a fresh > -start by emptying or removing it at the start of the ``binary`` target. > +removed by the ``clean`` target (for example with ``dpkg-buildtree clean``). > +It may also be wise to ensure a fresh start by emptying or removing it at the > +start of the ``binary`` target. > > When ``dpkg-gencontrol`` is run for a binary package, it adds an entry > to ``debian/files`` for the ``.deb`` file that will be created when Seconded. It seems prudent to get reference to this tool into Policy as soon as possible, even if we're not yet sure how it relates to debhelper. -- Sean Whitton signature.asc Description: PGP signature
Bug#1065643: debian-policy: Refer to «dpkg-buildtree clean» for dpkg generated files
Hello, On Sat 20 Apr 2024 at 09:00pm +02, Guillem Jover wrote: > Hi! > > On Thu, 2024-03-28 at 09:58:29 +0800, Sean Whitton wrote: >> On Thu 07 Mar 2024 at 11:22pm +01, Guillem Jover wrote: >> > diff --git a/policy/ch-source.rst b/policy/ch-source.rst >> > index 4307e89..2fb05cd 100644 >> > --- a/policy/ch-source.rst >> > +++ b/policy/ch-source.rst >> > @@ -685,7 +685,7 @@ variables are also available. >> > >> > The ``debian/substvars`` file is usually generated and modified >> > dynamically by ``debian/rules`` targets, in which case it must be >> > -removed by the ``clean`` target. >> > +removed by the ``clean`` target (for example with ``dpkg-buildtree >> > clean``). >> > >> > See :manpage:`deb-substvars(5)` for full details about source variable >> > substitutions, including the format of ``debian/substvars``. >> > @@ -725,8 +725,9 @@ building packages to record which files are being >> > generated. >> > >> > It should not exist in a shipped source package, and so it (and any >> > backup files or temporary files such as ``files.new``) [#]_ should be >> > -removed by the ``clean`` target. It may also be wise to ensure a fresh >> > -start by emptying or removing it at the start of the ``binary`` target. >> > +removed by the ``clean`` target (for example with ``dpkg-buildtree >> > clean``). >> > +It may also be wise to ensure a fresh start by emptying or removing it at >> > the >> > +start of the ``binary`` target. >> > >> > When ``dpkg-gencontrol`` is run for a binary package, it adds an entry >> > to ``debian/files`` for the ``.deb`` file that will be created when >> >> Instead of "It may also be wise ..." can you use one of the sets of >> magic words from Policy 1.1, please? > > This text was already part of policy and the proposed patch did not > really touch it, except for wrapping it into a new line. I think > modifying it feels a bit out-of-scope for this request? But if you > think it's relevant, and the sentence should be improved as part of > this, then I'll try to provide some wording. :) Ah yes, sorry, that is indeed out-of-scope. -- Sean Whitton signature.asc Description: PGP signature
Bug#1065643: debian-policy: Refer to «dpkg-buildtree clean» for dpkg generated files
Hi! On Thu, 2024-03-28 at 09:58:29 +0800, Sean Whitton wrote: > On Thu 07 Mar 2024 at 11:22pm +01, Guillem Jover wrote: > > diff --git a/policy/ch-source.rst b/policy/ch-source.rst > > index 4307e89..2fb05cd 100644 > > --- a/policy/ch-source.rst > > +++ b/policy/ch-source.rst > > @@ -685,7 +685,7 @@ variables are also available. > > > > The ``debian/substvars`` file is usually generated and modified > > dynamically by ``debian/rules`` targets, in which case it must be > > -removed by the ``clean`` target. > > +removed by the ``clean`` target (for example with ``dpkg-buildtree > > clean``). > > > > See :manpage:`deb-substvars(5)` for full details about source variable > > substitutions, including the format of ``debian/substvars``. > > @@ -725,8 +725,9 @@ building packages to record which files are being > > generated. > > > > It should not exist in a shipped source package, and so it (and any > > backup files or temporary files such as ``files.new``) [#]_ should be > > -removed by the ``clean`` target. It may also be wise to ensure a fresh > > -start by emptying or removing it at the start of the ``binary`` target. > > +removed by the ``clean`` target (for example with ``dpkg-buildtree > > clean``). > > +It may also be wise to ensure a fresh start by emptying or removing it at > > the > > +start of the ``binary`` target. > > > > When ``dpkg-gencontrol`` is run for a binary package, it adds an entry > > to ``debian/files`` for the ``.deb`` file that will be created when > > Instead of "It may also be wise ..." can you use one of the sets of > magic words from Policy 1.1, please? This text was already part of policy and the proposed patch did not really touch it, except for wrapping it into a new line. I think modifying it feels a bit out-of-scope for this request? But if you think it's relevant, and the sentence should be improved as part of this, then I'll try to provide some wording. :) Thanks, Guillem
Bug#1065643: debian-policy: Refer to «dpkg-buildtree clean» for dpkg generated files
Hello, On Thu 07 Mar 2024 at 11:22pm +01, Guillem Jover wrote: > diff --git a/policy/ch-source.rst b/policy/ch-source.rst > index 4307e89..2fb05cd 100644 > --- a/policy/ch-source.rst > +++ b/policy/ch-source.rst > @@ -685,7 +685,7 @@ variables are also available. > > The ``debian/substvars`` file is usually generated and modified > dynamically by ``debian/rules`` targets, in which case it must be > -removed by the ``clean`` target. > +removed by the ``clean`` target (for example with ``dpkg-buildtree clean``). > > See :manpage:`deb-substvars(5)` for full details about source variable > substitutions, including the format of ``debian/substvars``. > @@ -725,8 +725,9 @@ building packages to record which files are being > generated. > > It should not exist in a shipped source package, and so it (and any > backup files or temporary files such as ``files.new``) [#]_ should be > -removed by the ``clean`` target. It may also be wise to ensure a fresh > -start by emptying or removing it at the start of the ``binary`` target. > +removed by the ``clean`` target (for example with ``dpkg-buildtree clean``). > +It may also be wise to ensure a fresh start by emptying or removing it at the > +start of the ``binary`` target. > > When ``dpkg-gencontrol`` is run for a binary package, it adds an entry > to ``debian/files`` for the ``.deb`` file that will be created when Instead of "It may also be wise ..." can you use one of the sets of magic words from Policy 1.1, please? -- Sean Whitton signature.asc Description: PGP signature
Bug#1065643: debian-policy: Refer to «dpkg-buildtree clean» for dpkg generated files
Package: debian-policy Version: 4.6.2.1 Severity: wishlist Hi! Currently the Debian policy lists several files that are generated by dpkg tools, but because there was no matching dpkg tool to clean them up, it delegates that responsibility to packagers. With dpkg 1.22.3 a new dpkg-buildtree tool was introduced that supports a «clean» action precisely to take care of removing all these files. In the future I'd like to change the location of some of these files, but that requires for packages that do not use a helper to be updated to match the dpkg behavior. While I expect this to be controlled via dpkg-build-api, it would be best if such packages switched to use dpkg-buildtree to have automatic handling when that time comes. I've worded the changes as an example, because I don't want to impose that packages should be using this if they are using a helper or that helpers necessarily have to call it. If you'd prefer me to spell that out more explicitly I'm happy to try to come up with some wording. It intends to be more informational than a requirement, as I am going to be filing wishlist bugs with patches as time permits, anyway. I'm attaching a patch to add references to that new tool. Thanks, Guillem From afac52fa956087eb737c123682f634fc739c7e20 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Tue, 27 Feb 2024 23:37:06 +0100 Subject: [PATCH] =?UTF-8?q?Add=20references=20to=20=C2=ABdpkg-buildtree=20?= =?UTF-8?q?clean=C2=BB=20for=20debian/{substvars,files}?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These files are generated by dpkg tools (and in some cases by helpers), but the maintainer was responsible for cleaning them up. There is now a new command that will take care of cleaning these (and any other future) files that the dpkg suite might end up generating, making their introduction easier as the responsibility to remove them shifts back where it belongs. --- policy/ch-source.rst | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/policy/ch-source.rst b/policy/ch-source.rst index 4307e89..2fb05cd 100644 --- a/policy/ch-source.rst +++ b/policy/ch-source.rst @@ -685,7 +685,7 @@ variables are also available. The ``debian/substvars`` file is usually generated and modified dynamically by ``debian/rules`` targets, in which case it must be -removed by the ``clean`` target. +removed by the ``clean`` target (for example with ``dpkg-buildtree clean``). See :manpage:`deb-substvars(5)` for full details about source variable substitutions, including the format of ``debian/substvars``. @@ -725,8 +725,9 @@ building packages to record which files are being generated. It should not exist in a shipped source package, and so it (and any backup files or temporary files such as ``files.new``) [#]_ should be -removed by the ``clean`` target. It may also be wise to ensure a fresh -start by emptying or removing it at the start of the ``binary`` target. +removed by the ``clean`` target (for example with ``dpkg-buildtree clean``). +It may also be wise to ensure a fresh start by emptying or removing it at the +start of the ``binary`` target. When ``dpkg-gencontrol`` is run for a binary package, it adds an entry to ``debian/files`` for the ``.deb`` file that will be created when -- 2.43.0