Bug#1025131: apt-cacher-cleanup does not work
Control: tags -1 pending Robert, Many thanks for correcting my typo and testing. Uploading later today. Mark
Bug#1025131: apt-cacher-cleanup does not work
Mark Hindley pisze: Hi, Control: tags -1 patch Robert, Many thanks for pointing this out. Does the attached patch help? No, due to perl's syntax error related to unmatched parenthesis. I'm attaching a patch that actually works. Regards, Robert From cc36b2f690d694ad0cfe1b1c0ca5df7ead3e57ca Mon Sep 17 00:00:00 2001 From: Mark Hindley Date: Wed, 30 Nov 2022 11:30:21 + Subject: [PATCH] Add encoded underscores to *_files_regexp. Test fix for #1025131. --- lib/apt-cacher.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/apt-cacher.pl b/lib/apt-cacher.pl index 712d0bc..dad985a 100755 --- a/lib/apt-cacher.pl +++ b/lib/apt-cacher.pl @@ -132,7 +132,7 @@ sub read_config { qw(vmlinuz linux initrd\.gz - (?:%VALID_PACKAGE_NAME%_%VALID_VERSION%[_\.])?changelog + (?:%VALID_PACKAGE_NAME%(?:_|%5f)%VALID_VERSION%[_\.])?changelog NEWS\.Debian %VALID_UBUNTU_RELEASE_NAMES%\.tar\.gz(?:\.gpg)? (?:by-hash/(?i:MD5SUM/[0-9a-f]{32}|SHA1/[0-9a-f]{40}|SHA256/[0-9a-f]{64})) @@ -141,7 +141,7 @@ sub read_config { ) ) . ')$', package_files_regexp => '(?:' . join('|', - qw((?:^|/)%VALID_PACKAGE_NAME%_%VALID_VERSION%(?:_%VALID_ARCHS%\.(?:u|d)?deb|\.dsc|\.tar\.(?:gz|bz2|xz|lzma)(?:\.asc)?|\.diff\.gz) + qw((?:^|/)%VALID_PACKAGE_NAME%(?:_|%5f)%VALID_VERSION%(?:(?:_|%5f)%VALID_ARCHS%\.(?:u|d)?deb|\.dsc|\.tar\.(?:gz|bz2|xz|lzma)(?:\.asc)?|\.diff\.gz) \.rpm index\.db-.+\.gz \.jigdo -- 2.35.1
Bug#1025131: apt-cacher-cleanup does not work
Control: tags -1 patch Robert, Many thanks for pointing this out. Does the attached patch help? Thanks for testing. Mark >From cc36b2f690d694ad0cfe1b1c0ca5df7ead3e57ca Mon Sep 17 00:00:00 2001 From: Mark Hindley Date: Wed, 30 Nov 2022 11:30:21 + Subject: [PATCH] Add encoded underscores to *_files_regexp. Test fix for #1025131. --- lib/apt-cacher.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/apt-cacher.pl b/lib/apt-cacher.pl index 712d0bc..dad985a 100755 --- a/lib/apt-cacher.pl +++ b/lib/apt-cacher.pl @@ -132,7 +132,7 @@ sub read_config { qw(vmlinuz linux initrd\.gz - (?:%VALID_PACKAGE_NAME%_%VALID_VERSION%[_\.])?changelog + (?:%VALID_PACKAGE_NAME%(?:_|%5f)%VALID_VERSION%[_\.])?changelog NEWS\.Debian %VALID_UBUNTU_RELEASE_NAMES%\.tar\.gz(?:\.gpg)? (?:by-hash/(?i:MD5SUM/[0-9a-f]{32}|SHA1/[0-9a-f]{40}|SHA256/[0-9a-f]{64})) @@ -141,7 +141,7 @@ sub read_config { ) ) . ')$', package_files_regexp => '(?:' . join('|', - qw((?:^|/)%VALID_PACKAGE_NAME%_%VALID_VERSION%(?:_%VALID_ARCHS%\.(?:u|d)?deb|\.dsc|\.tar\.(?:gz|bz2|xz|lzma)(?:\.asc)?|\.diff\.gz) + qw((?:^|/)%VALID_PACKAGE_NAME%(?:_|%5f)%VALID_VERSION%(?:_|%5f)%VALID_ARCHS%\.(?:u|d)?deb|\.dsc|\.tar\.(?:gz|bz2|xz|lzma)(?:\.asc)?|\.diff\.gz) \.rpm index\.db-.+\.gz \.jigdo -- 2.35.1
Bug#1025131: apt-cacher-cleanup does not work
Package: apt-cacher Version: 1.7.27 Severity: important The "Encode embedded underscores in URLs when building filenames" change introduced in 1.7.27 broke apt-cacher-cleanup.pl: it does not clean *.deb files at all, as stored file names such as adduser%5f3.127%5fall.deb adduser%5f3.128%5fall.deb adduser%5f3.129%5fall.deb do no longer match to the $package_files_regexp. Regards robert -- System Information: Debian Release: bookworm/sid APT prefers unstable-debug APT policy: (990, 'unstable-debug'), (990, 'unstable'), (990, 'testing'), (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable') merged-usr: no Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 6.0.0-2-amd64 (SMP w/4 CPU threads; PREEMPT) Locale: LANG=pl_PL.UTF-8, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages apt-cacher depends on: ii debconf [debconf-2.0] 1.5.79 ii distro-info-data 0.56 ii ed 1.18-1 ii init-system-helpers1.64 ii libdpkg-perl 1.21.9 ii libfilesys-df-perl 0.92-7+b1 ii libio-interactive-perl 1.023-2 ii libio-interface-perl 1.09-2+b2 ii libipc-sharelite-perl 0.17-4+b7 ii libnetaddr-ip-perl 4.079+dfsg-2+b1 ii libsys-syscall-perl0.25-7 ii libwww-curl-perl 4.17-8+b1 ii libwww-perl6.67-1 ii lsb-base 11.5 ii perl 5.36.0-4 ii sysvinit-utils [lsb-base] 3.05-6 ii update-inetd 4.51 Versions of packages apt-cacher recommends: ii libberkeleydb-perl0.64-2+b1 ii libio-compress-lzma-perl 2.201-1 Versions of packages apt-cacher suggests: pn libfreezethaw-perl ii libio-socket-inet6-perl 2.73-1 -- Configuration Files: /etc/apt-cacher/apache.conf changed [not included] /etc/apt-cacher/apt-cacher.conf changed [not included] /etc/cron.d/apt-cacher changed [not included] -- debconf information excluded -- debsums errors found: debsums: changed file /usr/share/apt-cacher/apt-cacher-cleanup.pl (from apt-cacher package) debsums: changed file /usr/share/apt-cacher/lib/apt-cacher.pl (from apt-cacher package)