Hi, Quoting picca (2015-10-06 19:26:56) > Hello, When I try to use sbuild, I get this error message > > E: unstable-i386-sbuild-22146117-8358-467e-a857-9e8d4c79e747: Failed to lock > chroot: /var/lib/sbuild/unstable-i386.tar.gz: File is not owned by user root > Chroot setup failed > > as you can see > > $ ls -l /var/lib/sbuild/ > total 440420 > drwxrws--- 2 sbuild sbuild 4096 juil. 6 16:35 apt-keys > drwxrws--- 2 sbuild sbuild 4096 oct. 5 08:40 build > drwxr-xr-x 21 sbuild sbuild 4096 oct. 3 10:44 unstable-i386 > -rw-r--r-- 1 sbuild sbuild 450976170 oct. 3 10:50 unstable-i386.tar.gz > > > So what is the properway to fix this. > The .tar.gz chroot was created using sbuild-creatchroot
I guess you used the instructions from this wiki page: https://wiki.debian.org/sbuild And called something like: sudo sbuild-createchroot --arch=i386 --make-sbuild-tarball=/var/lib/sbuild/unstable-i386.tar.gz unstable `mktemp -d` http://httpredir.debian.org/debian You can specify any location for the chroot tarball. The wiki page choose /var/lib/sbuild/. The "problem" with this is, that the postinst maintainer script of sbuild calls `chown -R sbuild:sbuild /var/lib/sbuild`. This in turn leads to your chroot tarball being owned by user and group "sbuild" instead of user and group "root" as which it was created. Since the chown call is part of the postinst, an sbuild user will always run into this problem after the upgrade sbuild with a chroot tar.gz location from the sbuild wiki page. The quick fix is to call: sudo chown root:root /var/lib/sbuild/unstable-amd64.tar.gz But ultimately, the chown call in the sbuild postinst is probably a bad idea in the first place... cheers, josch
signature.asc
Description: signature