[Buildd-tools-devel] Bug#434396: sbuild: LVM snapshot -source chroot not correctly managed

Vincent Danjean vdanjean at debian.org
Mon Jul 23 15:42:34 UTC 2007


Package: sbuild
Version: 0.56
Severity: normal

  Hi,

  I use a LVM snapshop to build my package. To update (and after
upgrade) chroot, I would like to be able to type:
/usr/share/sbuild/updatechroot sid-source

I've the following config :
* /etc/schroot/schroot.conf
[sid]
type=lvm-snapshot
location=/sid
groups=sbuild,root
root-groups=sbuild
source-root-groups=sbuild
device=/dev/atsina/sbuilder
lvm-snapshot-options=--size 2G
[...]

* /proc/mounts
[...]
/dev/mapper/atsina-sbuilder /srv/sbuilder ext3 rw,data=ordered 0 0

* ls -l /src/sbuilder
total 24
drwxr-xr-x 22 root root  4096 2007-05-09 16:04 etch
drwx------  2 root root 16384 2007-07-10 09:29 lost+found
drwxr-xr-x 22 root root  4096 2007-07-17 13:02 sid

  You can note that the 'location' parameter in schroot.conf refer (as
stated by the documentation) to the RELATIVE path inside the LVM
filesystem.
"schroot -c sid bash" gives me a bash shell in a snapshot
"schroot -c sid-source bash" gives me a bash shell in the original
filesystem.


  In /usr/share/perl5/Sbuild/Chroot.pm, in function "_setup_options",
you have the test:
        if (defined($chroots{$distribution}) &&
	            -d $chroots{"$distribution"}->{'Location'}) {
Of course, "/sid" does not exists on my system. So the command
"/usr/share/sbuild/updatechroot sid-source" fails with the error message
"sid-source chroot does not exist" and leave me with bind-mounted
directores that I've to manually unmount :
$ mount
/dev/mapper/atsina-sbuilder on /var/lib/schroot/mount/sid-source type ext3 (rw,sync,user_xattr)
proc on /var/lib/schroot/mount/sid-source/sid/proc type proc (rw)
/dev/pts on /var/lib/schroot/mount/sid-source/sid/dev/pts type none (rw,bind)
tmpfs on /var/lib/schroot/mount/sid-source/sid/dev/shm type tmpfs (rw)
/home on /var/lib/schroot/mount/sid-source/sid/home type none (rw,bind)
/tmp on /var/lib/schroot/mount/sid-source/sid/tmp type none (rw,bind)


  To work-around this problem, I tried to add this symlink:
"/sid -> /srv/sbuilder/sid" on my root filesystem.
It works.

  I also tried to modify the test in Chroot.pm.
In this case, it fails later with:
Error in tempfile() using /sid//var/lib/sbuild/apt.conf.XXXXXX: Parent
directory (/sid//var/lib/sbuild/) is not a directory at
/usr/share/perl5/Sbuild/Chroot.pm line 145
  So $chroots{"$distribution"}->{'Location'} seems to be used at several
places.

  Best regards,
    Vincent

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.22-1-686 (SMP w/1 CPU core)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages sbuild depends on:
ii  adduser                       3.104      add and remove users and groups
ii  apt                           0.7.3      Advanced front-end for dpkg
ii  dctrl-tools                   2.9.3      Command-line tools to process Debi
ii  dpkg-dev                      1.14.5     package building tools for Debian
ii  perl                          5.8.8-7    Larry Wall's Practical Extraction 
ii  perl-modules                  5.8.8-7    Core Perl modules
ii  postfix [mail-transport-agent 2.4.3-1    High-performance mail transport ag
ii  schroot                       1.1.5-1    Execute commands in a chroot envir

Versions of packages sbuild recommends:
ii  debootstrap                   1.0.1      Bootstrap a basic Debian system
ii  fakeroot                      1.7.1      Gives a fake root environment

-- no debconf information




More information about the Buildd-tools-devel mailing list