please add cnf support to debmirror
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
debmirror (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned | ||
Groovy |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
* Starting with Ubuntu Focal (20.04), the APT client expects APT sources to provide command-not-found (cnf) metadata files.
* This package provides package mirrors, however does not support mirroring this cnf metadata up until upstream version 1:2.32, which is later than the version in Focal (20.04) and Groovy (20.10).
* This upload cherry-picks upstream commits 292e9e9c, 39055366 and 9606535d, in order to add the cnf metadata support.
[Test Case]
* Create a mirror of e.g. `bionic main` and `focal main`: debmirror -d bionic,focal -s main --passive --keyring=
* Serve the root directory of /opt/debmirror as webroot.
* Point APT `sources.list` at this webroot: deb http://
* Attempt to run `apt update` on Focal (20.04) client to see that it fails to obtain the cnf metadata.
* Optionally run `apt update` on Bionic (18.04) client to see that it works fine without the cnf metadata.
[Where problems could occur]
* New cnf files are expected to be created and maintained by the debmirror package. The regression risk for incorrectly downloading these files does not serve more harm than not downloading the files whatsoever (current state of 20.04 release), as the APT client does not use the mirror in either case.
* The change as uploaded was released in upstream as part of 1:2.32, tagged 23 Mar 2019, and is part of Debian stable. This serves as evidence of it having had testing carried out over time.
[Other Info]
Disco's apt started downloading cnf (command-not-found) files but debmirror does not download these files, so when pointing a disco machine at a mirrored archive, apt-get update errors. Eg, we need to mirror the Commands-*.xz files: http://
The fix is straightforward since the files are quite similar to dep11, and debmirror already handles dep11. Here is a patch that simply copy/pastes the various dep11 code. It is lightly tested and appears to do the job.
tags: | added: patch |
Changed in debmirror (Ubuntu): | |
importance: | Undecided → Medium |
Changed in debmirror (Ubuntu): | |
status: | Fix Committed → Fix Released |
Changed in debmirror (Ubuntu): | |
status: | Fix Released → Fix Committed |
tags: | added: rls-ff-incoming |
Changed in debmirror (Ubuntu): | |
status: | Fix Committed → Triaged |
tags: | added: rls-gg-incoming |
tags: | added: seg |
tags: | added: sts-sponsor-volunteer |
tags: | removed: sts-sponsor-volunteer |
no longer affects: | apt-mirror (Ubuntu) |
Thanks for this Jamie. I just had the same problem with my local mirror here at home.
I had to make some small changes to your patch for it to work here. I guess you were using an un-split (archive vs. ports) mirror to test? The Release files advertise Commands-* for all architectures even though they aren't actually available to download, so we need to limit to the arches requested.
This change uses perl smartmatching, which is apparently still(!) experimental. Colin might not like that. :-)