Article View: linux.debian.bugs.dist
Article #6150Bug#1155323: dpkg-dev: .changes file format has no way to indicate the target archive/repository
From: Colin Watson
Date: Wed, 25 Nov 2026 16:20
Date: Wed, 25 Nov 2026 16:20
88 lines
6441 bytes
6441 bytes
Package: dpkg-dev
Version: 1.23.11
Severity: wishlist
This has been a design issue in the .changes file format for as long as
I can remember, and I've seen it worked around in several different
places. I could have sworn I'd had a discussion about it in a bug
report at some point, but I just looked through all of dpkg's archived
and unarchived bugs for likely keywords and to my surprise couldn't find
anything. I suspect I'll end up working around this again, but it seems
like a good idea to at least start figuring out how things could be
improved for the future.
The deb-changes(5) file format is essentially a signed instruction to a
target archive to install new files into a particular suite
("Distribution:") if they pass the target archive's checks. When it was
first designed, there was pretty much only one archive anyone cared
about, namely the Debian archive. Nowadays there are lots: we have
derived distributions, Ubuntu PPAs hosted on Launchpad, Debusine
repositories, reprepro deployments, and so on. This means that a signed
.changes file can be used to replay an upload into an entirely different
archive as long as it happens to have a suite with a matching name.
Unlike signed .dsc files, therefore, the signature on the .changes file
has to be treated as somewhat radioactive, which is an inconvenience.
Making sure that suites have globally-unique names is one defence
against this, although it's often impractical, even leaving aside the
fact that Launchpad's PPAs only allow using the suite names from the
base Ubuntu archive. More realistically, archive implementations
generally take care to avoid exposing signed .changes files publicly.
In Debian you can find recent ones if you poke around on coccia, but
they aren't visible in the archive; Launchpad strips the signature
before making the .changes file visible (e.g.
https://git.launchpad.net/launchpad/tree/lib/lp/soyuz/model/queue.py#:~:text=Strip%20any%20PGP%20signature);
and I'm sure there are other cases. But all this is quite poorly
documented and (in my experience) easy to get wrong.
Because there's no record of the intended target archive anywhere other
than the uploader's `dput` command, it's easy to make mistakes, either
manually or when using more intelligent wrappers. There's the Launchpad
PPA suite naming problem above (which I would certainly design
differently with hindsight; fortunately maintaining it is no longer my
problem). Debian and Devuan both have an "experimental" suite (see
https://bugs.debian.org/1145095). And even if we did have
globally-unique suite names, that still leaves people doing a lot of
manual guessing when reading through old changelog entries; I've seen
packages that went through three or more archives over their history,
and I only know that because I have far too much information in my head
about what all the names mean.
Systems that support multiple archives need bespoke ways to figure out
which of their hosted archives an upload should end up in. This is
usually done with some kind of arrangement where the path is sent
alongside the upload, maybe using an FTP/SFTP directory (e.g.
https://git.launchpad.net/launchpad/tree/lib/lp/archiveuploader/uploadprocessor.py#:~:text=def%20parse_upload_path)
or parameters to an API request (e.g.
https://freexian-team.pages.debian.net/debusine/reference/dput-ng-profiles.html).
But as above, that isn't recorded anywhere in the package itself, and
it's easy to get wrong.
Is it too late to fix this? Probably not, although it would take a
while. I could imagine adding another field to deb-changes(5)
("Archive:" or "Repository:" or something) that identifies the target
archive somehow. There could be a registry of short names for archives,
with some kind of namespacing mechanism for systems like Launchpad and
Debusine that support many archives. Perhaps there could be a way to
annotate .changes entries with the intended target distribution, at
least if it isn't Debian.
Archive implementations would need to check the new field, and reject
uploads where it doesn't match what they expect.
It would only be safe to publish signed .changes files once all known
archive implementations that accept them have been updated to check this
field, so realistically even if you were to magically do this yesterday
then it would still be years before we could simplify code that deals
with .changes files. All the same, it would be good to start that
process if possible.
I expect that all this may need broader discussion, but dpkg seems like
a good place to start.
Thanks,
--
Colin Watson (he/him) [cjwatson@debian.org]
Technical Details
Message-ID:
<O3nSV-e66R-7@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!bofh.it!news.nic.it!robomodShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!bofh.it!news.nic.it!robomod From: Colin Watson <cjwatson@debian.org> Newsgroups: linux.debian.bugs.dist,linux.debian.maint.dpkg Subject: Bug#1155323: dpkg-dev: .changes file format has no way to indicate the target archive/repository Date: Wed, 25 Nov 2026 17:20:01 +0100 Message-ID: <O3nSV-e66R-7@gated-at.bofh.it> X-Original-To: Debian Bug Tracking System <submit@bugs.debian.org> X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Wed Nov 25 16:19:09 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -1.7 Reply-To: Colin Watson <cjwatson@debian.org>, 1155323@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: debian-dpkg@lists.debian.org X-Debian-Pr-Message: report 1155323 X-Debian-Pr-Package: dpkg-dev X-Debian-Pr-Source: dpkg MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Reportbug-Version: 13.2.0+nmu1 X-Debian-User: cjwatson X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2004990 List-ID: <debian-bugs-dist.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-dist/> Approved: robomod@news.nic.it Lines: 88 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Wed, 25 Nov 2026 16:16:34 +0000 X-Original-Message-ID: <awcJ4gitAnX5U8q6@camorr.rosewood.vpn.ucam.org>