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@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@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
--- initscripts/postinst~	2011-11-26 15:28:52.000000000 -0500
+++ initscripts/postinst	2011-11-26 15:55:07.000000000 -0500
@@ -226,7 +226,7 @@
 # sysadmin should, if they care, move the old locations to the new
 # locations and create compatibilty symlinks at their convenience
 # following the upgrade.
-if ischroot; then
+if ischroot --default-true; then
 	# Symlink /var/run from /run
         # Note var/run is relative
 	if compat_link /var/run /run; then
_______________________________________________
Pkg-sysvinit-devel mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-sysvinit-devel

Reply via email to