4

I use apt-cacher on a Debian server, and doing an apt-get update with a 16.04 client I'm finding that it's blocking a bunch of repo files including icons-64x64[.tar[.gz]], some xz extensions, Metadata and Components-*.yml.

I've managed to update the following variables on my /etc/apt-cacher/apt-cacher.conf to allow some of the file types through, but I'm still stuck on the Metadata and Components-*.yml files.

My /etc/apt/sources.list has been cut down to a single line for testing:

deb http://aptmirror:3142/au.archive.ubuntu.com/ubuntu/ xenial main restricted

apt-cacher excerpts:

index_files_regexp = ^(?:Index(?:\.bz2)?|Packages(?:\.gz|\.bz2|\.xz)?|Release(?:\.gpg)?|InRelease|Sources(?:\.gz|\.bz2)?|Contents-(?:[a-z]+-)?[a-zA-Z0-9]+\.gz|(?:srclist|pkglist)\.[a-z-]+\.bz2|release(?:\.gz|\.bz2)?|Translation-[a-z]{2,3}(?:_[A-Z]{2})?(?:\.gz|\.bz2|\.xz)?)$
installer_files_regexp = ^(?:vmlinuz|linux|initrd\.gz|changelog|NEWS.Debian|UBUNTU_RELEASE_NAMES\.tar\.gz(?:\.gpg)?|icons-64x64\.tar\.gz(?:\.tar)?|(?:Devel|EOL)?ReleaseAnnouncement(?:\.html)?|meta-release(?:-lts)?(?:-(?:development|proposed))?)$

The error:

# apt-get update
Get:1 http://aptmirror:3142/au.archive.ubuntu.com/ubuntu xenial InRelease [116 kB]
Get:2 http://aptmirror:3142/au.archive.ubuntu.com/ubuntu xenial/main amd64 Packages [1,436 kB]
Get:3 http://aptmirror:3142/au.archive.ubuntu.com/ubuntu xenial/main i386 Packages [1,431 kB]
Get:4 http://aptmirror:3142/au.archive.ubuntu.com/ubuntu xenial/main Translation-en [732 kB]
Ign:5 http://aptmirror:3142/au.archive.ubuntu.com/ubuntu xenial/main amd64 DEP-11 Metadata
Get:6 http://aptmirror:3142/au.archive.ubuntu.com/ubuntu xenial/main DEP-11 64x64 Icons [414 kB]
Get:7 http://aptmirror:3142/au.archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages [10.5 kB]
Get:8 http://aptmirror:3142/au.archive.ubuntu.com/ubuntu xenial/restricted i386 Packages [10.8 kB]
Get:9 http://aptmirror:3142/au.archive.ubuntu.com/ubuntu xenial/restricted Translation-en [3,420 B]
Ign:10 http://aptmirror:3142/au.archive.ubuntu.com/ubuntu xenial/restricted amd64 DEP-11 Metadata
Err:5 http://aptmirror:3142/au.archive.ubuntu.com/ubuntu xenial/main amd64 DEP-11 Metadata
  403  Forbidden
Err:10 http://aptmirror:3142/au.archive.ubuntu.com/ubuntu xenial/restricted amd64 DEP-11 Metadata
  403  Forbidden
Reading package lists... Done
W: Failed to fetch http://aptmirror:3142/au.archive.ubuntu.com/ubuntu/dists/xenial/main/dep11/Components-amd64.yml  403  Forbidden
W: Failed to fetch http://aptmirror:3142/au.archive.ubuntu.com/ubuntu/dists/xenial/restricted/dep11/Components-amd64.yml  403  Forbidden
E: Some index files failed to download. They have been ignored, or old ones used instead.

I've tried inserting the expression Components-(?:[a-z]+-)?[a-zA-Z0-9]+\.yml and Metadata in a few different places in the above variables, without any luck.

Can anyone help me get it working?

cleary
  • 684

4 Answers4

2

I've got an apt-cacher on vivid. Had to change in /etc/apt-cacher/apt-cacher.conf:

ubuntu_release_names = dapper, edgy, feisty, gutsy, hardy, intrepid, jaunty, karmic, lucid, maverick, natty, oneiric, precise, quantal, raring, saucy, trusty, utopic, vivid, wily, xenial

index_files_regexp = ^(?:Index(?:\.bz2)?|(?:Sources|Packages|release)(?:\.gz|\.bz2|\.xz)?|Release(?:\.gpg)?|InRelease|Contents-(?:[a-z]+-)?[a-zA-Z0-9]+\.gz|(?:srclist|pkglist)\.[a-z-]+\.bz2|Translation-[a-z]{2,3}(?:_[A-Z]{2}(?:\.[a-zA-Z0-9-]+)?)?(?:\.gz|\.bz2|\.xz|\.lzma)?|Components-[a-z0-9]+\.yml(?:\.gz|\.bz2)?|icons-[0-9]+x[0-9]+\.tar(?:\.gz)?)$
Velkan
  • 3,681
1

I had the same problem with apt-cacher-ng from ubuntu 12.04 when trying to use my mirror with ubuntu 16.04 clients.

Canonical pushed an updated package that fix the problem without any additional configuration.

Francis
  • 253
0

Perhaps add (?:\.gz|\.bz2|\.xz)? on to the end of the expression you inserted. On my nearest mirror, the only *.yml files are actually *.yml.gz.

My install of apt-cacher-ng was having the same problem, modifying it's regexp in the way you mentioned (with addition, the syntax was also slightly different) solved it for me.

0

I'm using debmirror on a Netgear ReadyNAS to mirror 16.04 and came across this problem. My current "fix" (jury is still out on that) was to copy /usr/bin/debmirror from a 16.04 machine onto the NAS as it's only a Perl script and more recent versions of debmirror have a fix for this issue if I've correctly researched the problem.