← Back to team overview

touch-packages team mailing list archive

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

 

This bug was fixed in the package util-linux - 2.25.1-3ubuntu1

---------------
util-linux (2.25.1-3ubuntu1) utopic; urgency=medium

  * Merge with Debian unstable to get some packaging bug fixes.
    Remaining Ubuntu changes:
    - Regularly trim SSDs automatically (core-1311-ssd-trimming):
      + Add debian/fstrim-all.cron: Call fstrim --all. Installed as
        /etc/cron.weekly/fstrim.
    - Upstart support:
      + Add hwclock{-save}.upstart, and install them in debian/rules.
      + Drop debian/hwclock.rules and hwclock.default.
    - Add mountall-options.patch, see patch header.
    - Add debian/libblkid1.maintscript to clean up /etc/blkid.conf on upgrade.
      This needs to be kept until after Ubuntu 16.04 LTS.
  * Revert move to unified libsystemd-dev, we still have an older systemd in
    Ubuntu. This will be done in Ubuntu 15.04.

util-linux (2.25.1-3) unstable; urgency=medium

  [ Ben Hutchings ]
  * hwclock-set: Don't use 'touch' to create stamp file, as it may not be
    included in an initramfs (Really closes: #763823)

  [ Andreas Henriksson ]
  * Put uuid-runtime in Section utils.
    Thanks to Ben Finney for the suggestion (Closes: #764039)
  * Cherry-pick upstream commit 8026fa9bc752
    "build-sys: use -lutil for BSD only"
    debian/patches/build-sys-use-lutil-for-BSD-only.patch
  * Upload to unstable.

util-linux (2.25.1-2) experimental; urgency=medium

  [ Andreas Henriksson ]
  * Make libmount-dev depend on libblkid-dev (LP: #1096581)
  * Drop uuid-dev dependency in libmount-dev package
  * Drop explicit disabling of pivot_root on non-linux
  * Attempt to stop uuidd before usermod in postinst (LP: #1374648)
  * Change build-dep to new unified libsystemd-dev (Closes: #763808)

  [ Ben Hutchings ]
  * hwclock-set: Use stamp file in /run/udev to ensure we set the clock
    only once if installed in the initramfs (Closes: #763823)
 -- Martin Pitt <martin.pitt@xxxxxxxxxx>   Mon, 06 Oct 2014 08:22:05 +0200

** Changed in: util-linux (Ubuntu Utopic)
       Status: Fix Committed => Fix Released

-- 
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:
  Fix Released
Status in “util-linux” source package in Utopic:
  Fix Released

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


References