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

Re: Automatic trimming of changelogs in binary packages



On Fri, 19 Aug 2022 00:46:21 +0200, Guillem Jover wrote:
My objections from that time still stand:

  <https://lists.debian.org/debian-devel/2020/03/msg00482.html>

I would also like to highlight David Kalnischkies reply:

  <https://lists.debian.org/debian-devel/2020/03/msg00309.html>

Dear Guillem,

I believe all factual objections raised in those two email are well handled by the proposed `dh_installchangelogs` MR.

Here are the factual objections in those emails, reordered and reformatted for sake of readability:

Doing that trimming globally would also mean that this applies even to packages that are for local or derived use where something like «apt changelog» will in most cases not work.
Maintainers of packages _meant_ to be installed locally (i.e., distributed outside repos) can use `--no-trim`.

Packages distributed by Debian derivatives can (and should) set the `Changelogs` field in their Release files [1], or provide an appropriate `Acquire::Changelogs::URI::Origin::DISTRO` apt.conf.d snippet.

Assuming the repository supports it. I have yet to encounter a
third-party which does, so if Debian would trim e.g. in debhelper by default some care might need to be applied so that this happens only
to packages which end up in Debians repositories… which could
complicate reproducibility as its clear for a buildd, but my local
sbuild…
Similar to the point above, if the third-party developers are

1) willingly distributing their packages via a repository that does not set `Changelogs:` and
2) also really want to make the full changelogs available,

then they can pass `--no-trim` to `dh_installchangelogs`.

The explicit use of `--no-trim` will make the packages reproducible.

The benefit of treating all packages the same is that tools working
with changelogs can handle the grunt work: "apt{,-get} changelog pkg"
prefers the changelog on disk if available – except for repositories
which identify as "Ubuntu" for which it will always download the
online changelog for display.
(I read this as a comment _in favor_ of automatic trimming, but maybe I'm just reading it through rose-tinted glasses.)

Once automatic changelog trimming is the default, then fixing `apt changelog` is a matter of setting `Acquire::Changelogs::AlwaysOnline::Origin::Debian` to true in apt.conf.d/

A proposal I've been floating around from time to time has been to instead make the changelog and copyright files deb/dpkg metadata (which they really are anyway IMO).
That is indeed a good idea. And, by implementing it in addition to `dh_installchangelogs` auto-trimming, it will even further reduce the amount of wasted space and bandwidth.

Regards,

[1] https://salsa.debian.org/apt-team/apt/-/blob/main/doc/apt.conf.5.xml#L628

--
Gioele Barabucci


Reply to: