Open perlun opened 1 year ago
Ping @gracecllee - any updates on this?
Hi @perlun , thanks for raising this to our awareness. We haven't had a chance to investigate further. I noticed you are running an older version of the Sonatype Nexus Repository Manager. Have you tried the latest version?
We updated to 3.61.0 some weeks ago, but the problem persists. We have not yet had the time to upgrade to 3.62.0 but no mentions of anything related to this in the release notes at least.
Hi,
We are using Nexus OSS to host an internal repository for a
.deb
package we maintain. However, we also want this to be exposed in a publicly availablehttps
mirror. To this avail, we use https://packages.ubuntu.com/debmirror (maintained here: https://salsa.debian.org/debian/debmirror)This works fine, with one problem: we occasionally get
404 Not Found
errors trying to runapt-get update
:We have debugged this and concluded that this is because of the way Nexus constructs the
InRelease
file:Note how this
InRelease
file contains three files:Packages
(uncompressed form)Packages.gz
Packages.bz2
The problem is that
Packages.bz2
files are no longer supported by debmirror since 2015: https://salsa.debian.org/debian/debmirror/-/commit/417f28d5396839a5dbe6ea9c3dd00a14dcf12ef7. Because of this, what happens when we rundebmmirror
seems to be this:Packages
file gets downloadedPackages.gz
Packages.bz2
is ignored.deb
file(s) themselves are also downloaded...which in turns causes the
404 Not Found
error whenapt-get
is subsequently run towards the mirror.Suggested resolution
It is honestly quite hard to say whether the problem is with Nexus or debmirror. I believe the problem is that
apt-get
(by default) prefers bzip2 over gzip => tries to download the bz2 file first, which gives the404 Not Found
error.I believe it then also tries to download the
Packages.gz
(orPackages
) file, since the package update eventually succeeds. :thinking: (the next time you runapt-get update
, I believe)Either way, since
Packages.bz2
seems largely obsolete, I would suggest the following as the quick fix:Packages.bz2
support in Nexus (or provide a way to disable it). TheInRelease
file would then no longer contain a reference to it.The longer-term fix would then be:
Packages.xz
supportMore details about our setup