libuuid1 postinst fails on upgrade - calls usermod, without stopping the daemon first
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
util-linux (Ubuntu) |
Fix Released
|
High
|
Martin Pitt | ||
Utopic |
Fix Released
|
High
|
Martin Pitt |
Bug Description
$ sudo dpkg --configure libuuid1
Setting up libuuid1:amd64 (2.25.1-1ubuntu1) ...
usermod: user libuuid is currently used by process 2043
dpkg: error processing package libuuid1:amd64 (--configure):
subprocess installed post-installation script returned error exit status 8
Errors were encountered while processing:
libuuid1:amd64
$ cat /var/lib/
#!/bin/sh
set -e
#######
# This is a partial copy of uuid-runtime.
# everyone gets their user renamed (even if they don't have uuid-runtime #
# installed). This package used to create the user in the first place, #
# but no longer uses it and all handling has been moved to uuid-runtime. #
# This (entire file?) should be dropped after this code has shipped in a #
# Debian Stable release (so we know everyone has been migrated). #
#######
# upgrade existing libuuid user/group.
if getent group libuuid >/dev/null && ! getent group uuidd >/dev/null ; then
groupmod --new-name uuidd libuuid
fi
if getent passwd libuuid >/dev/null && ! getent passwd uuidd >/dev/null ; then
# switch existing libuuid user to not have a login shell.
if [ "$(getent passwd libuuid | cut -d: -f7)" = "/bin/sh" ]; then
chsh -s /bin/false libuuid
fi
# rename user and set new homedir.
usermod --login uuidd --home /run/uuidd libuuid
# attemp cleanup of old home directory.
[ -d /var/lib/libuuid ] && \
rmdir --ignore-
fi
# Automatically added by dh_makeshlibs
if [ "$1" = "configure" ]; then
ldconfig
fi
# End automatically added section
$ sudo bash -x /var/lib/
+ set -e
+ getent group libuuid
+ getent passwd libuuid
+ getent passwd uuidd
++ getent passwd libuuid
++ cut -d: -f7
+ '[' /bin/false = /bin/sh ']'
+ usermod --login uuidd --home /run/uuidd libuuid
usermod: user libuuid is currently used by process 2043
$ ps | grep 2043
xnox 16649 0.0 0.0 16392 2184 pts/10 S+ 00:18 0:00 | \_ grep --color=auto 2043
libuuid 2043 0.0 0.0 10676 124 ? Ss Sep26 0:00 /usr/sbin/uuidd
$ sudo service uuidd stop
* Stopping uuidd generator uuidd [ OK ]
$ sudo dpkg --configure libuuid1
Setting up libuuid1:amd64 (2.25.1-1ubuntu1) ...
Processing triggers for libc-bin (2.19-10ubuntu1) ...
ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: libuuid1 2.25.1-1ubuntu1
ProcVersionSign
Uname: Linux 3.16.0-6-generic x86_64
ApportVersion: 2.14.5-0ubuntu3
Architecture: amd64
CurrentDesktop: Unity
Date: Sat Sep 27 00:19:24 2014
InstallationDate: Installed on 2013-08-29 (393 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Alpha amd64 (20130829)
SourcePackage: util-linux
SystemImageInfo: Error: [Errno 2] No such file or directory: 'system-image-cli'
UpgradeStatus: No upgrade log present (probably fresh install)
Fixed in Debian (thanks Andreas), will merge tomorrow.