Package: mini-buildd
Version: 1.0.27
Severity: normal

Dear Maintainer,

on my Banana Pi buildd, mini-buildd doesn't run fine. I think I have
found a workaround, but am not sure whether this is the correct way to
fix.

My Banana Pi has its root fs on an SD card, which is _very_ slow. I
have therefore moved the mini-buildd home directory
/var/lib/mini-buildd to a "real" hard disk by means of mounting the
hard disk to /mnt and linking /var/lib/mini-buildd:

[23/664]mh@banana:~ $ df -h
Filesystem                           Size  Used Avail Use% Mounted on
udev                                 498M     0  498M   0% /dev
tmpfs                                101M   11M   90M  11% /run
/dev/mapper/banana-root              6,0G  1,8G  4,3G  29% /
tmpfs                                503M   24K  503M   1% /dev/shm
tmpfs                                5,0M     0  5,0M   0% /run/lock
tmpfs                                503M     0  503M   0% /sys/fs/cgroup
tmpfs                                503M  8,0K  503M   1% /tmp
/dev/mmcblk0p1                       236M   43M  181M  20% /boot
/dev/mapper/banana-root              6,0G  1,8G  4,3G  29% 
/mnt/snapshots/banana-root
/dev/mapper/banana_data-banana_data   30G  938M   27G   4% /mnt/banana-data
tmpfs                                2,0G     0  2,0G   0% 
/var/lib/schroot/union/overlay
tmpfs                                101M     0  101M   0% /run/user/1001
[24/665]mh@banana:~ $ getent passwd mini-buildd
mini-buildd:x:112:118:Custom Debian buildd:/var/lib/mini-buildd:/bin/bash
[25/666]mh@banana:~ $ getent group mini-buildd
mini-buildd:x:118:
[26/667]mh@banana:~ $ ls -ald /var/lib/mini-buildd
lrwxrwxrwx 1 root root 28 Sep 30  2015 /var/lib/mini-buildd -> 
/mnt/banana-data/mini-buildd/
[29/670]mh@banana:~ $ sudo pvs
  PV             VG          Fmt  Attr PSize  PFree
  /dev/mmcblk0p2 banana      lvm2 a--   7,16g 164,00m
  /dev/sda1      banana_data lvm2 a--  37,26g   3,26g
[30/670]mh@banana:~ $ sudo vgs
  VG          #PV #LV #SN Attr   VSize  VFree
  banana        1   2   0 wz--n-  7,16g 164,00m
  banana_data   1   3   0 wz--n- 37,26g   3,26g
[31/671]mh@banana:~ $ sudo lvs
  LV          VG          Attr       LSize  Pool Origin Data%  Meta%  Move Log 
Cpy%Sync Convert
  root        banana      -wi-ao----  6,00g
  swap0       banana      -wi-a-----  1,00g
  banana_data banana_data -wi-ao---- 30,00g
  swap0       banana_data -wi-ao----  2,00g
  swap1       banana_data -wi-a-----  2,00g
[32/672]mh@banana:~ $

In this setup, checking a dir chroot fails:

Dec 28 12:52:18 banana mini_buildd.call             (0071): INFO    : Called 
with retval 1: /usr/bin/schroot --chroot source:mini-buildd-stretch-armhf 
--user root -- /bin/sh -c "echo 'deb http://debian.debian.zugschlus.de/debian/ 
stretch main' >/etc/apt/sources.list"
Dec 28 12:52:18 banana mini_buildd.call             (0114): WARNING : ? 
/usr/bin/schroot.. (stderr): I: 15mini-buildd-workarounds: I: Not acting on 
source chroots, skipping...
Dec 28 12:52:18 banana mini_buildd.call             (0114): WARNING : ? 
/usr/bin/schroot.. (stderr): E: Failed to change to directory 
‘/mnt/banana-data/mini-buildd’: No such file or directory
Dec 28 12:52:18 banana mini_buildd.call             (0114): WARNING : ? 
/usr/bin/schroot.. (stderr): I: The directory does not exist inside the chroot. 
 Use the --directory option to run the command in a different directory.
Dec 28 12:52:19 banana mini_buildd.models.base      (0078): ERROR   : check 
failed: Debian 'stretch:armhf' (overlayfs): Call failed with retval 1: 
'/usr/bin/schroot --chroot source:mini-buildd-stretch-armhf --user root -- 
/bin/sh -c "echo 'deb http://debian.debian.zugschlus.de/debian/ stretch main' 
>/etc/apt/sources.list" ' [base:365]

I do appreciate mini-buildd's logging as this error message is right
on the dot: /mnt/banana-data/mini-buildd does not exist in the chroot.

Indeed, calling 
/usr/bin/schroot --chroot source:mini-buildd-stretch-armhf --user root -- 
/bin/sh -c true
terminates with the same error message and an retval of 1.

/usr/bin/schroot --chroot source:mini-buildd-stretch-armhf --user root 
--directory /root -- /bin/sh -c true
works fine with a retval of 0.

In fact, I have later seen that many schroot calls done by mini-buildd
are done with --directory /.

While I have fixed the issue by modifying
/etc/schroot/mini-buildd/fstab to include
/mnt/banana-data/mini-buildd /mnt/banana-data/mini-buildd none rw,bind 0  0
I am wondering whether the failing call to mini-buildd (and probably
others) should just gtrow a --directory / option instead.

My current fix is not a real fix since /etc/schroot/mini-buildd/fstab
is likely to be overwritten with the next mini-buildd update.

How would a local admin make mini-buildd work in this environment? What
can mini-buildd do to stop this from happening in the future?

Greetings
Marc



-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: armhf (armv7l)

Kernel: Linux 4.9.0-zgbpi-armmp-lpae (SMP w/2 CPU cores)
Locale: LANG=en_DK.utf8, LC_CTYPE=en_DK.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages mini-buildd depends on:
ii  adduser                3.115
ii  debconf [debconf-2.0]  1.5.59
ii  debootstrap            1.0.87
ii  devscripts             2.16.13
ii  dirmngr                2.1.17-2
ii  dpkg-dev               1.18.18
ii  gnupg                  2.1.17-2
ii  init-system-helpers    1.46
ii  libjs-jquery           3.1.1-2
ii  libjs-sphinxdoc        1.4.9-2
ii  lintian                2.5.50
ii  lsb-base               9.20161125
ii  mini-buildd-common     1.0.27
ii  python-cherrypy3       3.5.0-2
ii  python-daemon          2.1.1-1
ii  python-mini-buildd     1.0.27
ii  python-pyftpdlib       1.5.1-3
pn  python:any             <none>
ii  reprepro               5.1.0-1
ii  sbuild                 0.73.0-1
ii  schroot                1.6.10-2+b2
ii  sudo                   1.8.19-1

Versions of packages mini-buildd recommends:
ii  python-apt  1.1.0~beta5

Versions of packages mini-buildd suggests:
pn  binfmt-support    <none>
ii  btrfs-progs       4.7.3-1
ii  haveged           1.9.1-5
ii  lvm2              2.02.168-1
pn  qemu-user-static  <none>

-- Configuration Files:
/etc/default/mini-buildd changed:
MINI_BUILDD_OPTIONS="--verbose --verbose --verbose -W :::8066"

/etc/sudoers.d/mini-buildd-sudoers [Errno 13] Permission denied: 
'/etc/sudoers.d/mini-buildd-sudoers'

-- debconf information:
* mini-buildd/options: --verbose --verbose --verbose -W :::8066
  mini-buildd/purge_warning:
* mini-buildd/home: /var/lib/mini-buildd
* mini-buildd/note:

Reply via email to