Package: apt-cacher-ng
Version: 3.3.1-2~bpo10+1
Severity: normal
Tags: upstream patch
Pacman 6.0 forces the download of external signature packages
(PACKAGE_FILENAME.sig). As these files are not present in the default file
patterns, apt-cacher-ng returns HTTP error 403 to pacman and the
transaction fails. A workaround (and possible stable update) is changing
the configuration file as shown below (add the pattern to
PfilePatternEx). A patch based on the tip of the upstream repo
upstream/experimental is also provided. (Note that the patch allows
versions of every accepted file for Arch, and every .tar.(COMPRESS) ending
with .sig; from what I've seen the only signed files are the package lists
-- .db.sig -- and the packages themselves).
I've encountered this bug in 3.2.1-1 (buster) and 3.3.1-2~bpo10+1
(buster-backports), but the bug seems present in all upstream
versions.
-- Package-specific info:
-- System Information:
Debian Release: 10.9
APT prefers stable
APT policy: (990, 'stable'), (500, 'stable-updates')
Architecture: amd64 (x86_64)
Kernel: Linux 4.19.0-16-amd64 (SMP w/4 CPU cores)
Locale: LANG=es_AR.UTF-8, LC_CTYPE=es_AR.UTF-8 (charmap=UTF-8),
LANGUAGE=es_AR:es (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages apt-cacher-ng depends on:
ii adduser 3.118
ii debconf [debconf-2.0] 1.5.71
ii dpkg 1.19.7
ii libatomic1 8.3.0-6
ii libbz2-1.0 1.0.6-9.2~deb10u1
ii libc6 2.28-10
ii libevent-2.1-6 2.1.8-stable-4
ii libevent-pthreads-2.1-6 2.1.8-stable-4
ii libgcc1 1:8.3.0-6
ii liblzma5 5.2.4-1
ii libssl1.1 1.1.1d-0+deb10u6
ii libstdc++6 8.3.0-6
ii libsystemd0 241-7~deb10u7
ii libwrap0 7.6.q-28
ii lsb-base 10.2019051400
ii zlib1g 1:1.2.11.dfsg-1
Versions of packages apt-cacher-ng recommends:
ii ca-certificates 20200601~deb10u2
Versions of packages apt-cacher-ng suggests:
ii avahi-daemon 0.7-4+deb10u1
ii doc-base 0.10.8
ii libfuse2 2.9.9-1+deb10u1
-- Configuration Files:
/etc/apt-cacher-ng/acng.conf changed:
CacheDir: /var/cache/apt-cacher-ng
LogDir: /var/log/apt-cacher-ng
SupportDir: /usr/lib/apt-cacher-ng
Remap-debrep: file:deb_mirror*.gz /debian ; file:backends_debian # Debian
Archives
Remap-uburep: file:ubuntu_mirrors /ubuntu ; file:backends_ubuntu # Ubuntu
Archives
Remap-cygwin: file:cygwin_mirrors /cygwin # ; file:backends_cygwin #
incomplete, please create this file or specify preferred mirrors here
Remap-sfnet: file:sfnet_mirrors # ; file:backends_sfnet # incomplete, please
create this file or specify preferred mirrors here
Remap-alxrep: file:archlx_mirrors /archlinux ; file:backend_archlx # Arch Linux
Remap-fedora: file:fedora_mirrors # Fedora Linux
Remap-epel: file:epel_mirrors # Fedora EPEL
Remap-slrep: file:sl_mirrors # Scientific Linux
Remap-gentoo: file:gentoo_mirrors.gz /gentoo ; file:backends_gentoo # Gentoo
Archives
Remap-secdeb: security.debian.org ; security.debian.org
deb.debian.org/debian-security
ReportPage: acng-report.html
ExThreshold: 4
PfilePatternEx: .*\.tar(\.gz|\.bz2|\.lzma|\.xz|\.zst)\.sig$
LocalDirs: acng-doc /usr/share/doc/apt-cacher-ng
-- debconf information excluded
diff --git a/source/acfg_defaults.cc b/source/acfg_defaults.cc
index c4b2627..c0c3b33 100644
--- a/source/acfg_defaults.cc
+++ b/source/acfg_defaults.cc
@@ -22,14 +22,14 @@ capath("/etc/ssl/certs"), cafile, badredmime("text/html");
#define INFOLDER "(^|.*/)"
#define COMPRLIST "(\\.gz|\\.bz2|\\.lzma|\\.xz|\\.zst)"
-#define ALXPATTERN ".*\\.(db|files|abs)(\\.tar" COMPRLIST ")?"
+#define ALXPATTERN ".*\\.(db|files|abs)(\\.tar" COMPRLIST "(\\.sig)?)?"
#define COMPOPT COMPRLIST"?"
//#define COMPONENT_OPTIONAL "(-[a-z0-9-])"
//#define PARANOIASOURCE "(\\.orig|\\.debian)"
string spfilepat;
-string pfilepat(".*(\\.(u|d)?deb|\\.rpm|\\.drpm|\\.dsc|\\.tar" COMPRLIST
+string pfilepat(".*(\\.(u|d)?deb|\\.rpm|\\.drpm|\\.dsc|\\.tar" COMPRLIST
"(\\.sig)?"
"|\\.diff" COMPRLIST "|\\.jigdo|\\.template|changelog|copyright"
"|\\.debdelta|\\.diff/.*\\.gz"
"|[a-f0-9]+-(susedata|updateinfo|primary|deltainfo).xml.gz"
//opensuse, index data, hash in filename
diff --git a/src/acfg_defaults.cc b/src/acfg_defaults.cc
index 02a7ee0..bcc81ad 100644
--- a/src/acfg_defaults.cc
+++ b/src/acfg_defaults.cc
@@ -22,11 +22,11 @@ capath("/etc/ssl/certs"), cafile, badredmime("text/html");
#define INFOLDER "(^|.*/)"
#define COMPRLIST "(\\.gz|\\.bz2|\\.lzma|\\.xz|\\.zst)"
-#define ALXPATTERN ".*\\.(db|files|abs)(\\.tar" COMPRLIST ")?"
+#define ALXPATTERN ".*\\.(db|files|abs)(\\.tar" COMPRLIST "(\\.sig)?)?"
#define COMPOPT COMPRLIST"?"
#define HEX(len) "[a-f0-9]{" STRINGIFY(len) "}"
#define HEXSEQ "[a-f0-9]+"
-#define PKGS "(\\.[ud]?deb|\\.rpm|\\.drpm|\\.dsc|\\.tar" COMPRLIST ")"
+#define PKGS "(\\.[ud]?deb|\\.rpm|\\.drpm|\\.dsc|\\.tar" COMPRLIST "(\\.sig)?)"
#define CSUM "(SHA|MD)[0-9]+"
#define CSUMS "(SHA|MD)[0-9]+SUM"