From 4dc683b26177bf97e23390c6439eecf04c8686cb Mon Sep 17 00:00:00 2001 From: Mike Fleetwood Date: Sat, 5 Aug 2023 09:24:34 +0100 Subject: [PATCH] Stop masking the root file system mount unit (!116) Masking the root file system (-.mount) unit lead to a Debian package upgrade failing as reported here [1]. This was fixed in systemd 245 [2][3] by not allowing perpetual units to be masked. As the root file system can't be mounted or unmounted while GParted is running, it doesn't need to be prevented by masking the unit. Therefore stop masking the root file system mount unit. [1] Debian bug #948710 - handle masked .mount unit more gracefully https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=948710 [2] systemd issue #14550 - Handle masked .mount units more gracefully https://github.com/systemd/systemd/issues/14550 [3] core: never allow perpetual units to be masked https://github.com/systemd/systemd/commit/88414eed6f45f738ae765d9f72d67c6dc5a51950 Closes !116 - Systemd mount masking and udev rule location updates --- gparted.in | 1 + 1 file changed, 1 insertion(+) diff --git a/gparted.in b/gparted.in index d8ea385d..5bcbd671 100755 --- a/gparted.in +++ b/gparted.in @@ -158,6 +158,7 @@ if test "x$HAVE_SYSTEMCTL" = "xyes"; then if (substr(what,1,5) == "/dev/" && loadstate != "masked" && what != "/dev/fuse" && + where != "/" && ! (substr(what,1,9) == "/dev/loop" && substr(where,1,6) == "/snap/")) { print id