#989039 cdebootstrap: fails to bootstrap Devuan (bug in HTTP implementation)

Package:
cdebootstrap
Source:
cdebootstrap
Description:
Bootstrap a Debian system
Submitter:
Simon Richter
Date:
2021-05-24 13:06:04 UTC
Severity:
normal
#989039#5
Date:
2021-05-24 13:02:44 UTC
From:
To:
Hi,

I've tried to bootstrap a Devuan system, with

    cdebootstrap \
        --verbose \
	--keyring /tmp/devuan-archive-keyring.gpg \
	beowulf /target http://deb.devuan.org/merged

This successfully downloads one package, then fails to get the next.
Repeated invocations get one more package each.

This seems to be related to the redirect processing in the Devuan archive:
unchanged packages come from Debian. cdebootstrap follows the redirect, but
then requests the next file from the same host again, but uses the path
from the Packages file without any prefix.

E.g.

    [Devuan server]
    -> GET /merged/pool/DEBIAN/main/z/zlib/zlib1g_1.2.11.dfsg-1_amd64.deb
    <- 302 Found

    [Debian server]
    -> GET /debian/pool/main/z/zlib/zlib1g_1.2.11.dfsg-1_amd64.deb
    <- 200 Okay
    -> GET /pool/DEBIAN/main/d/dpkg/dpkg_1.19.7_amd64.deb
    <- 404 Not Found

   Simon