[pkg-fso-maint] nodm is running in installation

Luca Capello luca at pca.it
Mon May 11 22:34:02 UTC 2009


Hi there!

On Sat, 09 May 2009 19:04:13 +0200, Joachim Breitner wrote:
> Am Freitag, den 08.05.2009, 20:46 +0200 schrieb Mitja Kleider:
>> the unmount stage of the current installation fails because nodm is running.
>> I guess this is a problem of the nodm package, it could also be worked around 
>> in the install.sh script.
>
> it is actually a bug in install.sh: It should set up the chroot similar
> to how pbuilder does it, so that postinst scripts that start daemons via
> invoke-rc.d do not actually start anything.
>
> Any volunteers to look into that?

The key point is /usr/sbin/policy-rc.d, which regulates how invoke-rc.d
works.  cdebootstrap provides an everything-denied policy-rc.d in

  /usr/share/cdebootstrap/cdebootstrap-helper-rc.d.deb

From `man cdebootstrap`:

  FLAVOURS
	Flavours available with default configuration:
  [...]
	minimal
		Installs essential and apt.  All rc.d operations are
		disabled by a policy-rc.d script
		(cdebootstrap-helper-rc.d package).

If you install that package on your machine:
=====
gismo:/home/luca# cat /usr/sbin/policy-rc.d
#!/bin/sh
echo "************************************" >&2
echo "All rc.d operations denied by policy" >&2
echo "************************************" >&2
exit 101

gismo:/home/luca# invoke-rc.d dbus restart
************************************
All rc.d operations denied by policy
************************************

gismo:/home/luca#
=====

Actually, install.sh removes this package as the last step of the apt
stage:
=====
	echo " * Removing additional packages"
	chroot "$INST_DIR" /bin/sh -e <<__END_CHROOT__
apt-get update
apt-get --yes --purge remove cdebootstrap-helper-rc.d
apt-get clean
__END_CHROOT__
=====

Since we cannot find a way to support different stages *and* be sure the
user removes that package manually, we have two options:

- leaving it installed until the last usual step (i.e. unmount), which
  is the same as saying we care about most of the users

- manually creating a fake /usr/sbin/policy-rc.d everytime we install a
  package into the chroot or at least for nodm installation

My vote goes for the first option, since the second one is prone to
error, less elegant and IMHO less in the "spirit" of Debian (or, if you
prefer, the "correct" way).

Thx, bye,
Gismo / Luca
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 314 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-fso-maint/attachments/20090512/84e52468/attachment.pgp>


More information about the pkg-fso-maint mailing list