[buildd-tools-devel] Bug#728021: schroot: Replace use of lockdev with flock

Roger Leigh rleigh at debian.org
Sun Oct 27 16:58:18 UTC 2013


Package: schroot
Version: 1.6.5
Severity: normal

Dear maintainer,

I'm writing to you as the maintainer of lockdev (liblockdev1).  I've
opened this bug because your package either has a build-depends on
liblockdev1-dev or is building binary packages with a dependency on
liblockdev1.

lockdev implements a library interface around the SYSV-style UUCP
device locks for TTY devices.  However, this type of locking is
deprecated and unnecessary, at least on Linux; I'm not sure of the
status on kFreeBSD.  The recommended alternative is direct use of
flock(2) on the corresponding device node.  This will ensure that
locking will work properly with other programs also locking the device
node, and since the locks are implemented in the kernel, there's no
need for racy creation and deletion of lockfiles with the owner PID,
and no possibility of PID clashes or failure to reclaim lost locks if
the PID is reused.  That is to say, the flock(2) interface is
guaranteed to be robust, while lockdev is not.  For users not using
the C API (for example scripts), flock(1) from util-linux provides a
wrapper.

I'd like to remove lockdev entirely for jessie, providing that it's
possible to do so without breakage.  Likewise I'd also like to convert
packages using UUCP-style locks which don't use lockdev.  We currently
have at least three methods of device locking (UUCP-with-lockdev,
UUCP-without-lockdev and direct-flock), all of which have overlapping
or completely orthogonal semantics, which will result in not
respecting the other lock types if used in combination.  Hence the
need to reduce this to a single robust locking strategy: just locking
the device directly.

It would be greatly appreciated if you could disable/remove lockdev
support from your package and remove it from the source build-depends
and/or package depends as appropriate, replacing this with flock(2)
calls instead of dev_lock and dev_unlock.


Many thanks,
Roger Leigh


-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (550, 'unstable'), (400, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.11-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages schroot depends on:
ii  libboost-filesystem1.54.0       1.54.0-3
ii  libboost-iostreams1.54.0        1.54.0-3
ii  libboost-program-options1.54.0  1.54.0-3
ii  libboost-regex1.54.0            1.54.0-3
ii  libboost-system1.54.0           1.54.0-3
ii  libc6                           2.17-93
ii  libgcc1                         1:4.8.2-1
ii  libpam0g                        1.1.3-10
ii  libsbuild1.7.1                  1.7.1-1
ii  libstdc++6                      4.8.2-1
ii  schroot-common                  1.7.1-1

schroot recommends no packages.

Versions of packages schroot suggests:
pn  aufs-modules | unionfs-modules  <none>
ii  btrfs-tools                     0.19+20130705-3
ii  debootstrap                     1.0.55
ii  lvm2                            2.02.98-6+b1
ii  qemu-user-static                1.6.0+dfsg-2

-- Configuration Files:
/etc/schroot/desktop/fstab changed [not included]

-- no debconf information



More information about the Buildd-tools-devel mailing list