From b72fec2988241c610ce918e6beba154510d1fb32 Mon Sep 17 00:00:00 2001 From: Patrick Schleizer Date: Sat, 8 Aug 2015 02:40:49 +0200 Subject: [PATCH] =?UTF-8?q?fixed=20"in=20place=20upgrade=20issue=20-=20bas?= =?UTF-8?q?e-passwd=20debconf=20interative=20questi=E2=80=A6on=20asks=20'R?= =?UTF-8?q?emove=20group=20"qubes"'"=20for=20existing=20users?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (reported by @adrelanos) (thanks to @marmarek for help with the patch) https://github.com/QubesOS/qubes-issues/issues/1105 --- debian/qubes-core-agent.preinst | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/debian/qubes-core-agent.preinst b/debian/qubes-core-agent.preinst index edcea6f..cd72ba1 100755 --- a/debian/qubes-core-agent.preinst +++ b/debian/qubes-core-agent.preinst @@ -59,7 +59,15 @@ if [ "$1" = "install" ] ; then fi if [ "$1" = "upgrade" ] ; then - true + ## Fix static gid issue for in place template upgrades. + ## https://github.com/QubesOS/qubes-issues/issues/1105 + if grep -q ^qubes:x:98: /etc/group ; then + if ! grep -q :980: /etc/group ; then + if groupmod -g 980 qubes ; then + find / -gid 98 ! -type l -exec chgrp --verbose qubes {} \; 2>/dev/null || true + fi + fi + fi fi # dh_installdeb will replace this with shell code automatically