Package: sbuild
Version: 0.91.9
Severity: normal
X-Debbugs-Cc: [email protected]

Dear Maintainer,

Please add '--components=main,universe' to mmdebstrap extra args for
Ubuntu suites. Otherwise building packages for Ubuntu with the unshare
backend will fail in most cases (because universe is expected to be
available even for builds in main).

Ubuntu currently carries this ugly patch for it:

```
my $ubuntu_mmdebstrap_extra_args = {};
use Debian::DistroInfo;
for my $series (UbuntuDistroInfo->new()->supported()) {
        $ubuntu_mmdebstrap_extra_args->{$series} = 
['--components=main,universe'];
# We use snapshot.ubuntu.com here so it works both for ports and non-ports 
architectures
# without having to do complicated architecture detection logic
        $ubuntu_mmdebstrap_extra_args->{"$series-proposed"} = [
                '--components=main,universe',
                '--include=ca-certificates',
'--setup-hook=echo "deb 
[signed-by=/usr/share/keyrings/ubuntu-archive-keyring.gpg] 
https://snapshot.ubuntu.com/ubuntu '
                  . $series
                  . '-proposed main universe" > 
"$1"/etc/apt/sources.list.d/proposed.list',
                "--aptopt=APT::Default-Release \"$series\";" # this pins all 
pockets to 990 so we actually get proposed binaries
        ];
        $ubuntu_mmdebstrap_extra_args->{"$series-backports"} = [
                '--components=main,universe',
                '--include=ca-certificates',
'--setup-hook=echo "deb 
[signed-by=/usr/share/keyrings/ubuntu-archive-keyring.gpg] 
https://snapshot.ubuntu.com/ubuntu '
                  . $series
                  . '-backports main universe" > 
"$1"/etc/apt/sources.list.d/backports.list'
        ];
        # security we need to delete the -updates pocket
        $ubuntu_mmdebstrap_extra_args->{"$series-security"} = [
                '--components=main,universe',
                '--setup-hook=sed -i /-updates/d "$1"/etc/apt/sources.list',
        ];
}
```

It would be nice if there would be an easy way in the sbuild
configuration to add extra mmdebstrap options for all Ubuntu or all
Debian suites without needing to hard-code the list like:

```
push @{$unshare_mmdebstrap_extra_args}, 
qr/^(trusty|xenial|bionic|focal|jammy|noble|questing|resolute|stonking)/, 
['--components=main,universe'];
```

-- 
Benjamin Drung
Debian & Ubuntu Developer

Reply via email to