"apt-get source" fails for ..asc files

Bug #1694121 reported by Chris West
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
apt-cacher-ng (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Debian sid's apt can no-longer download some source packages, if apt-cacher-ng is enabled.

This has been fixed in Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=823733

The workaround in the issue works for me:

> I found this workaround:
>
> PfilePatternEx: \.asc$
>
> (to be put in /etc/apt-cacher-ng/acng.conf)

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: apt-cacher-ng 0.9.1-1ubuntu1
ProcVersionSignature: Ubuntu 4.4.0-64.85-generic 4.4.44
Uname: Linux 4.4.0-64-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.6
Architecture: amd64
Date: Sun May 28 13:41:31 2017
InstallationDate: Installed on 2012-11-17 (1652 days ago)
InstallationMedia: Ubuntu-Server 12.10 "Quantal Quetzal" - Release amd64 (20121017.2)
SourcePackage: apt-cacher-ng
UpgradeStatus: Upgraded to xenial on 2016-07-30 (301 days ago)
modified.conffile..etc.apt-cacher-ng.acng.conf: [modified]
modified.conffile..etc.apt-cacher-ng.security.conf: [inaccessible: [Errno 13] Permission denied: '/etc/apt-cacher-ng/security.conf']
mtime.conffile..etc.apt-cacher-ng.acng.conf: 2017-05-24T09:09:00.506453

Revision history for this message
Chris West (faux) wrote :
Revision history for this message
Eduard Bloch (edi-gmx) wrote :

It works for me, so no, it's not the same bug.

If you have something and want it to have fixed, please report what you are really observing rather than a guessed reference to some issue.

Revision history for this message
Chris West (faux) wrote :

The linked bug report perfectly describes what I am seeing, but, if you want something more specific:

On the apt-cacher-ng machine, running the attached config without the workaround, I cannot fetch .asc files, such as this one from openssl:

% curl http://localhost:3142/debian/pool/main/o/openssl/openssl_1.1.0f.orig.tar.gz.asc
<!DOCTYPE html>
<html lang="en"><head><title>403 Forbidden file type or location</title>
...

This is hit by "apt source" in sid. You can test this with Docker, if Docker is your thing:

# In an up to date-ish Debian Sid machine...
faux@astoria:~% docker pull debian:sid && docker run -it debian:sid
sid: Pulling from library/debian
Digest: sha256:4a9698e05982d5b3a26c799a480e5c3aae58d1ad6b02605a14ec928fa8cf4b6e
Status: Image is up to date for debian:sid

# Configure the proxy (here "urika" is the name of the machine running apt-cacher-ng),
# then run apt update, then try and apt source openssl:
root@cff2c85d3dea:/# echo 'Acquire::http { Proxy "http://urika:3142"; };' > /etc/apt/apt.conf.d/1694121acng && sed -i 'p;s/^deb/&-src /' /etc/apt/sources.list && apt update && apt source openssl

Get:1 http://deb.debian.org/debian sid InRelease [243 kB]
Get:2 http://deb.debian.org/debian sid/main Sources [9734 kB]
Get:3 http://deb.debian.org/debian sid/main amd64 Packages [10.1 MB]
Fetched 20.1 MB in 1s (17.5 MB/s)
Reading package lists... Done
Building dependency tree... Done
23 packages can be upgraded. Run 'apt list --upgradable' to see them.

Reading package lists... Done
NOTICE: 'openssl' packaging is maintained in the 'Svn' version control system at:
svn://anonscm.debian.org/pkg-openssl/openssl/
Need to get 5335 kB of source archives.
Get:1 http://deb.debian.org/debian sid/main openssl 1.1.0f-1 (dsc) [2583 B]
Get:2 http://deb.debian.org/debian sid/main openssl 1.1.0f-1 (tar) [5278 kB]
Err:3 http://deb.debian.org/debian sid/main openssl 1.1.0f-1 (asc)
  403 Forbidden file type or location: http://deb.debian.org/debian/pool/main/o/openssl/openssl_1.1.0f.orig.tar.gz.asc
Get:4 http://deb.debian.org/debian sid/main openssl 1.1.0f-1 (diff) [53.5 kB]
Fetched 5334 kB in 0s (83.2 MB/s)
W: Download is performed unsandboxed as root as file 'openssl_1.1.0f-1.dsc' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
E: Failed to fetch http://deb.debian.org/debian/pool/main/o/openssl/openssl_1.1.0f.orig.tar.gz.asc 403 Forbidden file type or location: http://deb.debian.org/debian/pool/main/o/openssl/openssl_1.1.0f.orig.tar.gz.asc
E: Failed to fetch some archives.

It fails, because of the above 403 from apt-cacher-ng.

You can see apt-cacher-ng logging the error in /var/log/apt-cacher-ng/apt-cacher.log:
1496161336|E|428|192.168.1.235|403 Forbidden file type or location: http://deb.debian.org/debian/pool/main/o/openssl/openssl_1.1.0f.orig.tar.gz.asc

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in apt-cacher-ng (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.