← Back to team overview

touch-packages team mailing list archive

[Bug 1374648] [NEW] libuuid1 postinst fails on upgrade - calls usermod, without stopping the daemon first

 

Public bug reported:

$ 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/dpkg/info/libuuid1\:amd64.postinst 
#!/bin/sh
set -e

##########################################################################
# This is a partial copy of uuid-runtime.postinst just to make sure      #
# 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-fail-on-non-empty /var/lib/libuuid
fi

# Automatically added by dh_makeshlibs
if [ "$1" = "configure" ]; then
	ldconfig
fi
# End automatically added section

$ sudo bash -x /var/lib/dpkg/info/libuuid1\:amd64.postinst 
+ 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
ProcVersionSignature: Ubuntu 3.16.0-6.11-generic 3.16.0-rc7
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)

** Affects: util-linux (Ubuntu)
     Importance: High
         Status: New


** Tags: amd64 apport-bug utopic

** Summary changed:

- postinst fails on upgrade - calls usermod, without stopping the daemon first
+ libuuid1 postinst fails on upgrade - calls usermod, without stopping the daemon first

** Changed in: util-linux (Ubuntu)
   Importance: Undecided => High

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to util-linux in Ubuntu.
https://bugs.launchpad.net/bugs/1374648

Title:
  libuuid1 postinst fails on upgrade - calls usermod, without stopping
  the daemon first

Status in “util-linux” package in Ubuntu:
  New

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/dpkg/info/libuuid1\:amd64.postinst 
  #!/bin/sh
  set -e

  ##########################################################################
  # This is a partial copy of uuid-runtime.postinst just to make sure      #
  # 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-fail-on-non-empty /var/lib/libuuid
  fi

  # Automatically added by dh_makeshlibs
  if [ "$1" = "configure" ]; then
  	ldconfig
  fi
  # End automatically added section

  $ sudo bash -x /var/lib/dpkg/info/libuuid1\:amd64.postinst 
  + 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
  ProcVersionSignature: Ubuntu 3.16.0-6.11-generic 3.16.0-rc7
  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)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/1374648/+subscriptions


Follow ups

References