Thread View: linux.debian.bugs.dist
1 messages
1 total messages
Started by Adam
Mon, 30 Nov 2026 18:00
Bug#435574: debmirror: Please support mirrors without a root directory
Author: Adam
Date: Mon, 30 Nov 2026 18:00
Date: Mon, 30 Nov 2026 18:00
81 lines
4505 bytes
4505 bytes
Package: debmirror
Version: 1:2.47+deb13u1
Followup-For: Bug #435574
Dear Maintainer,
I found that the Hashicorp apt repo puts its repo in the root directory
and that debmirror can't handle that. Specifying --root=/ results in a
double slash in the URL, which fails to fetch the Release file. Perl
does not normalize the path, nor does their web server.
It took me a while to figure this out because browsers, curl, wget, and
Python (requests library) all do seem to normalize the URL path before
sending the request, so it looks like having a double slash isn't a
problem when testing.
Steps to reproduce this error:
# Get the key
curl https://apt.releases.hashicorp.com/gpg > ../hashicorp.asc
gpg --dearmor -o ../hashicorp.gpg ../hashicorp.asc
# Try to mirror
/usr/bin/debmirror --method=https --host=apt.releases.hashicorp.com \
--root=/ --dist=trixie --section=main --arch=amd64 --nosource \
--keyring=../hashicorp.gpg --progress --rsync-extra=none .
I'm also including a patch to fix this issue, which I've tested using
the above commands and regression tested using the Smallstep apt repo.
--- debmirror 2026-11-30 09:36:51.040536217 -0600
+++ debmirror 2026-11-30 09:38:10.004952090 -0600
@@ -1813,7 +1813,7 @@
sub http_get {
local $| = 1;
my $file=shift;
- my $url="$download_method://${host}/${remoteroot}/${file}";
+ my $url = "$download_method://${host}/" . ($remoteroot=="/" ? "" :
"$remoteroot/") . $file;
my $ret=1;
print "$url => " if $debug;
Finally, I checked the source code for 2.49 and verified this issue is
still present in that version.
-- System Information:
Debian Release: 13.8
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500,
'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 6.12.48+deb13-amd64 (SMP w/1 CPU thread; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE
not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages debmirror depends on:
ii bzip2 1.0.8-6
pn libdigest-md5-perl <none>
pn libdigest-sha-perl <none>
ii liblockfile-simple-perl 0.208-1.1
ii libwww-perl 6.78-1+deb13u1
ii perl [libnet-perl] 5.40.1-6+deb13u1
ii rsync 3.5.0+ds1-0+deb13u2
ii xz-utils 5.8.1-1+deb13u2
Versions of packages debmirror recommends:
ii ed 1.21.1-1
ii gpgv 2.4.7-21+deb13u1+b5
ii patch 2.8-2+deb13u1
Versions of packages debmirror suggests:
ii gnupg 2.4.7-21+deb13u1
-- no debconf information
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads