[Ubuntu] cowbuilder fails for Ubuntu 20.04 Focal

Sebastiaan Couwenberg sebastic at xs4all.nl
Fri May 1 21:20:37 PDT 2020


On 5/1/20 10:16 PM, Martin Landa wrote:
> I am trying to create chroot environment by
> 
> export DIST=focal
> sudo -E cowbuilder --create --distribution=$DIST
> --basepath=/var/cache/pbuilder/base-${DIST}-ubuntugis-unstable.cow
> --save-after-login

This mostly works on Debian unstable:

 sudo cowbuilder \
      --create \
      --distribution=focal \
      --basepath=/var/cache/pbuilder/base-focal-ubuntugis-unstable.cow \
      --hookdir=/var/cache/pbuilder/hook.d/ \
      --mirror=http://nl.archive.ubuntu.com/ubuntu/ \
      --othermirror="deb [ trusted=yes ]
http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu focal main" \
      --components="main universe"

That's how the Debian GIS Team policy documents the setup:

 https://debian-gis-team.pages.debian.net/policy/packaging.html#git-build-backport-chroot

But it fails to setup the other mirror because there are no focal
packages in the PPA yet:

 Err:5 http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu
focal/main amd64 Packages
  404  Not Found [IP: 2001:67c:1560:8008::15 80]

It fails on buster with:

 E: No such script: /usr/share/debootstrap/scripts/focal

> in order to build GRASS 7.8.3RC2 also for Ubuntu 20.04. But the
> command is failing with
>
> E: /var/cache/pbuilder/focal/aptcache/: No such directory
> E: debootstrap failed
>
> Any idea how to fix this? Thanks, Martin

Check your ~/.pbuilderrc and /etc/pbuilderrc, by default it uses
/var/cache/pbuilder/aptcache/ which is shared by all chroots.

You can use --aptcache=/var/cache/pbuilder/aptcache/ to override the
pbuilderrc as documented in the pbuilder(8) manpage, but you shouldn't
have a per chroot apt cache configured in the pbuilderrc.

Kind Regards,

Bas

-- 
 GPG Key ID: 4096R/6750F10AE88D4AF1
Fingerprint: 8182 DE41 7056 408D 6146  50D1 6750 F10A E88D 4AF1


More information about the Ubuntu mailing list