#1038689 pbuilder: creates /etc/pbuilderrc with invalid (debug repo) MIRRORSITE -- does not parse *.sources files

#1038689#5
Date:
2023-06-20 06:35:51 UTC
From:
To:
I am trying to create a pbuilder on today's amd64 cloud image.

`pbuilder --create --debug` eventually fails with

| + debootstrap --include=apt --cache-dir=/var/cache/pbuilder/aptcache/ --variant=buildd --force-check-gpg bookworm /var/cache/pbuilder/build/26079 http://debug.mirrors.debian.org/debian-debug/
| E: Failed getting release file http://debug.mirrors.debian.org/debian-debug/dists/bookworm/Release

This is a wrong URL -- the suite is called "bookworm-debug", i.e. it should be
http://debug.mirrors.debian.org/debian-debug/dists/bookworm-debug/Release
(which does exist).

My only customization is

| # cat ~/.pbuilderrc
| DISTRIBUTION=bookworm
| PBUILDERSATISFYDEPENDSCMD=true

/etc/pbuilderrc has

which is wrong -- this ought to be a mirror for the main repo, not
for the debug one. /usr/share/pbuilder/pbuilderrc certainly has
"MIRRORSITE=http://deb.debian.org/debian" as default. So, something on "apt
install pbuilder" causes /etc/pbuilderrc to be created like the above.

So the auto-detection goes wrong. /etc/apt/sources.list is empty, the only
sources that I have is the default one:

| # cat /etc/apt/sources.list.d/debian.sources
| Types: deb deb-src
| URIs: mirror+file:///etc/apt/mirrors/debian.list
| Suites: bookworm bookworm-updates bookworm-backports
| Components: main
|
| Types: deb deb-src
| URIs: mirror+file:///etc/apt/mirrors/debian-security.list
| Suites: bookworm-security
| Components: main

and my custom one:

# cat /etc/apt/sources.list.d/dbgsym.list
deb http://debug.mirrors.debian.org/debian-debug/ bookworm-debug main

I tried to rename dbgsym.list to debug.list (so that it sorts after
"debian.sources"), and purging/reinstalling pbuilder still creates a wrong
MIRRORSITE. When I remove dbgsym.list entirely, installing pbuilder brings up a
debconf prompt about "Default mirror not found".

So it smells like pbuilder's auto-detection cannot parse the (not-so-)new style
*.sources files?

Thanks,

Martin

#1038689#10
Date:
2023-06-20 19:39:01 UTC
From:
To:
Martin Pitt dixit:
[…]

I’d argue to turn this into a request to remove this autodetection
altogether. I’ve had nothing but trouble with it, in some cases
even overwriting/appending the /etc/pbuilderrc after I had replaced
it with my own¹.

Use deb.debian.org (or, for derivatives, the relevant default mirror
of theirs) if no pbuilderrc is configured. Ideally, let debootstrap
use its default if no pbuilderrc.

① http://cvs.mirbsd.de/contrib/hosted/tg/deb/pbuilderrc?rev=HEAD

bye,
//mirabilos

#1038689#15
Date:
2023-06-21 03:49:44 UTC
From:
To:
Hello all,

Thorsten Glaser [2023-06-20 19:39 +0000]:

Yes, agreed.

Thanks,

Martin