From 2de8eff0a333511e851cc3cc3e846bd54ca3c010 Mon Sep 17 00:00:00 2001
From: Pavel Goltsev
Date: Thu, 25 Oct 2018 19:38:42 +0300
Subject: [PATCH 1/3] Fix ArchLinux installation with Xfce4
During install of dbus in ArchLinux there are missing 'network'
group and some service-related users which are needed for correct
start up of dbus. These users have been added manually via
deployment script.
Also command to run Xfce4 is different. For this distribution
it has been changed to 'dbus-launch xfce4-session' instead of
'dbus-run-session xfce4-session'.
---
include/desktop/dbus/deploy.sh | 12 ++++++++++++
include/desktop/xfce/deploy.sh | 8 +++++++-
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/include/desktop/dbus/deploy.sh b/include/desktop/dbus/deploy.sh
index 0a12d4c..bdc7f2b 100644
--- a/include/desktop/dbus/deploy.sh
+++ b/include/desktop/dbus/deploy.sh
@@ -36,6 +36,18 @@ do_configure()
make_dirs /run/dbus /var/run/dbus
chmod 644 "${CHROOT_DIR}/etc/machine-id"
chroot_exec -u root dbus-uuidgen > "${CHROOT_DIR}/etc/machine-id"
+ case "${DISTRIB}:${ARCH}:${SUITE}" in
+ archlinux:*)
+ chroot_exec -u root groupadd -f network
+
+ local user_names="systemd-timesync systemd-network colord systemd-resolve polkitd avahi dbus"
+ for username in ${user_names}
+ do
+ chroot_exec -u root groupadd -f ${username}
+ chroot_exec -u root useradd -g ${username} -s /bin/false ${username}
+ done
+ ;;
+ esac
return 0
}
diff --git a/include/desktop/xfce/deploy.sh b/include/desktop/xfce/deploy.sh
index 4358305..9aeec8d 100644
--- a/include/desktop/xfce/deploy.sh
+++ b/include/desktop/xfce/deploy.sh
@@ -30,6 +30,12 @@ do_configure()
{
msg ":: Configuring ${COMPONENT} ... "
local xsession="${CHROOT_DIR}$(user_home ${USER_NAME})/.xsession"
- echo 'exec dbus-run-session xfce4-session' > "${xsession}"
+ local command='exec dbus-run-session xfce4-session'
+ case "${DISTRIB}:${ARCH}:${SUITE}" in
+ archlinux:*)
+ command='exec dbus-launch xfce4-session'
+ ;;
+ esac
+ echo ${command} > "${xsession}"
return 0
}
From 3d1784963396440a7df3f5cad879b52fb335b10d Mon Sep 17 00:00:00 2001
From: Pavel Goltsev
Date: Thu, 25 Oct 2018 20:00:11 +0300
Subject: [PATCH 2/3] Put creation of 'network' group after users creation
---
include/desktop/dbus/deploy.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/desktop/dbus/deploy.sh b/include/desktop/dbus/deploy.sh
index bdc7f2b..58f606e 100644
--- a/include/desktop/dbus/deploy.sh
+++ b/include/desktop/dbus/deploy.sh
@@ -38,14 +38,14 @@ do_configure()
chroot_exec -u root dbus-uuidgen > "${CHROOT_DIR}/etc/machine-id"
case "${DISTRIB}:${ARCH}:${SUITE}" in
archlinux:*)
- chroot_exec -u root groupadd -f network
-
local user_names="systemd-timesync systemd-network colord systemd-resolve polkitd avahi dbus"
for username in ${user_names}
do
chroot_exec -u root groupadd -f ${username}
chroot_exec -u root useradd -g ${username} -s /bin/false ${username}
done
+
+ chroot_exec -u root groupadd -f network
;;
esac
return 0
From 7ce1fca9fcfc2cad3993bc7d5deaa65b46f941d1 Mon Sep 17 00:00:00 2001
From: Pavel Goltsev
Date: Thu, 25 Oct 2018 20:02:35 +0300
Subject: [PATCH 3/3] Add home directory as root during user creation
Since servive-related users are unable to login it
is better to set their home directory to root of
a filesystem instead of a folder in /home.
---
include/desktop/dbus/deploy.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/desktop/dbus/deploy.sh b/include/desktop/dbus/deploy.sh
index 58f606e..83587ba 100644
--- a/include/desktop/dbus/deploy.sh
+++ b/include/desktop/dbus/deploy.sh
@@ -42,7 +42,7 @@ do_configure()
for username in ${user_names}
do
chroot_exec -u root groupadd -f ${username}
- chroot_exec -u root useradd -g ${username} -s /bin/false ${username}
+ chroot_exec -u root useradd -g ${username} -s /bin/false -d / ${username}
done
chroot_exec -u root groupadd -f network