[Pkg-sysvinit-devel] Bug#650141: initscripts postinst fails with deboostrap --variant=fakechroot
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Sat Nov 26 22:00:27 UTC 2011
Package: initscripts
Version: 2.88dsf-13.13
Severity: normal
Tags: patch
if i try to install debian using debootstrap --variant=fakechroot as a
non-privileged user (using the fakeroot and fakechroot LD_PRELOAD
hacks), the install fails with:
I: Configuring initscripts...
I: Configuring sysvinit...
I: Configuring e2fsprogs...
W: Failure while configuring required packages.
1 consoleuser at stylus:~$ tail -n 20 a/debootstrap/debootstrap.log
Warning: Fake ldconfig called, doing nothing
Setting up mount (2.19.1-5) ...
Setting up initscripts (2.88dsf-13.13) ...
mount: permission denied
dpkg: error processing initscripts (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: util-linux: dependency problems, but configuring anyway as you requested:
util-linux depends on initscripts; however:
Package initscripts is not configured yet.
Setting up util-linux (2.19.1-5) ...
update-alternatives: using /bin/more to provide /usr/bin/pager (pager) in auto mode.
dpkg: sysvinit: dependency problems, but configuring anyway as you requested:
sysvinit depends on initscripts; however:
Package initscripts is not configured yet.
Setting up sysvinit (2.88dsf-13.13) ...
init: /dev/initctl: Permission denied
Setting up e2fsprogs (1.42~WIP-2011-11-20-1) ...
Errors were encountered while processing:
initscripts
0 consoleuser at stylus:~$
it appears that this is because initscripts.postinst uses ischroot to
determine whether to try to bind-mount /dev/shm to /run/shm. But
ischroot returns 2 when run under fakechroot by a non-privileged user,
so initscripts thinks it is not running under a chroot.
The attached patch assumes that if we can't tell if we're running
under a chroot, we probably are. This permits a basic fakechroot'ed
debootstrap invocation to complete correctly.
Alternately, if you think ischroot should behave differently under
fakechroot, feel free to reassign this to debianutils.
--dkg
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 3.1.0-1-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages initscripts depends on:
ii coreutils 8.13-3
ii debianutils 4.0.4
ii libc6 2.13-21
ii lsb-base 3.2-28
ii mount 2.19.1-5
ii sysv-rc 2.88dsf-13.13
ii sysvinit-utils 2.88dsf-13.13
Versions of packages initscripts recommends:
ii e2fsprogs 1.42~WIP-2011-11-20-1
ii psmisc 22.14-1
initscripts suggests no packages.
-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: initscripts-postinst.diff
Type: text/x-diff
Size: 461 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-sysvinit-devel/attachments/20111126/29381eff/attachment.diff>
More information about the Pkg-sysvinit-devel
mailing list