#1032153 pbuilder: noninteractive pbuilder install loops infinitely when system has no sources.list file

Package:
pbuilder
Source:
pbuilder
Submitter:
Henning
Date:
2026-01-13 13:55:01 UTC
Severity:
normal
Tags:
#1032153#5
Date:
2023-02-28 19:36:55 UTC
From:
To:
Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?

	Building a docker image with pbuilder installed with debconf
	frontend non-interactive

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

	When pbuilder is to be installed via apt in the Dockerfile, it's
	configuration process apprently tries to puzl some configuration
	out of /etc/apt/sources.list - but this file does not exist on
	bookworm docker images (and presumeably on other systems,
	neither).

	At least in the bookworm docker image, the apt sources are
	configured via /etc/apt/sources.list.d/debian.sources file, and
	I assume its the same for systems installed "normally" with the
	debian installer.

	But pbuilder apparently relies on the "traditional"
	/etc/apt/sources.list file, and otrherwise keeps looping through
	an interactive question for the user to input a default mirror
	manually.

   * What was the outcome of this action?
	The interactive question, at least in a docker build run, can not
	be answered as the text just keeps looping.
	The process must be exited with ctrl-c.

   * What outcome did you expect instead?
	I expect that pbuilder does not resort to interactive user input
	when  DEBIAN_FRONTEND=noninteractive and some default is used,
	and the pbuilder instal script do not rely on a file that cannot
	be guranteed to exist.


*** End of the template - remove these template lines ***

#1032153#10
Date:
2025-10-04 15:29:15 UTC
From:
To:
severity 1032153 serious
tags 1032153 + trixie forky sid
found 1032153 0.231.1
thanks

With the deprecation (and, up to about a month before the trixie
release, apt’s LOUD SCREAMING about the existence of sources.list)
this is now rather safe to say release-critical, for trixie even.

I just ran into this, thankfully interactively so I could write
“no” into the mirror selection field.

This particular “feature” of pbuilder’s debconf questionnaire has
always bothered me. It has a history of overwriting my own conffile
/etc/pbuilderrc (which is also RC) and only used to be moderately
useful in the most simple of cases, which are now *all* covered by
just defaulting to http://deb.debian.org/debian/ as mirror.

Please rip out that debconf stuff, use said default mirror, and
inform people in NEWS.Debian about this (apt-listchange’ablily)
so they can manage their own pbuilderrc files if needed.

Thanks,
//mirabilos

#1032153#21
Date:
2025-11-03 15:25:02 UTC
From:
To:
This confuses me, because the config script does the following:

    while [ -z "$MIRRORSITE" ] ; do
        db_input high pbuilder/nomirror || true
        db_input high pbuilder/mirrorsite && RETCODE=$? || RETCODE=$?
        db_go

        # if the interface is non-interactive, still set a valid mirror
        if [ $RETCODE = 30 ] ; then
            MIRRORSITE="http://deb.debian.org/debian"
        else
            db_get pbuilder/mirrorsite
            MIRRORSITE="$RET"
        fi
    done

So it’s supposed to be detecting the non-interactive case (and 30 is
the documented value for that), providing a default. Yes, we should do
better in the deb822 cases (note that the script *does* check
sources.list.d, but only for *.list, which are in the same format as
sources.list itself), and maybe there’s a way we can extract that
information out of apt itself (e.g. something like apt-cache policy
dpkg, but not quite), but the above code should still be making that
matter less. I’ll have to go test this myself, see if I can reproduce
it, and figure out why it’s not working.

Jessica

#1032153#26
Date:
2025-12-05 07:52:59 UTC
From:
To:
Hi,

* Jessica Clarke [Mon Nov 03, 2025 at 03:25:02PM +0000]:
[...]

I can't reproduce the problem:

| root@dd10c07bc0f9:/# DEBIAN_FRONTEND='noninteractive' apt install pbuilder --no-install-recommends
| [...]
| Preconfiguring packages ...
| Configuring pbuilder
| --------------------
|
| Default mirror not found
|
| Mirror information detection failed and the user provided no mirror
| information.
|
| Please enter valid mirror information.
|
| Selecting previously unselected package bzip2.
| (Reading database ... 4935 files and directories currently
| installed.)
| [...]
| root@dd10c07bc0f9:/# grep '^MIRROR' /etc/pbuilderrc
| MIRRORSITE=http://deb.debian.org/debian

Same behavior for both bookworm + trixie.

But I agree that we should add support for deb822.
AFAIK there sadly is no nice interface to query apt for its
repositories, but this seems to work for me:

https://salsa.debian.org/pbuilder-team/pbuilder/-/merge_requests/41

regards
-mika-

#1032153#35
Date:
2026-01-12 18:27:08 UTC
From:
To:
Control: tags -1 moreinfo unreproducible
Control: severity -1 normal

I finally tested it myself and with DEBIAN_FRONTEND=noninteractive it
works as expected, falling back on deb.debian.org <http://deb.debian.org/>, just as you say.

Taking a look at this properly now. Sorry for such a long delay, I had
hoped to get to it over the holidays but didn’t manage to.

Jessica

#1032153#44
Date:
2026-01-12 18:44:04 UTC
From:
To:
Hello Jessica,

This means, I have to remove pbuilder from my dependency list.

It isn't usable any more because it is blocked from migrating to testing.

Am 12.01.26 um 19:27 schrieb Jessica Clarke:

t over the holidays but didn’t manage to.

#1032153#49
Date:
2026-01-12 18:46:55 UTC
From:
To:
It’s no longer RC so will be a candidate for migration?

Jessica

#1032153#54
Date:
2026-01-13 13:52:11 UTC
From:
To:



i don’t really understand the communication here but my 3 years/2 stable
releases old bug can probably just be closed due outdatedness ;)