From 9efbbbd56ca43fd9fceacb157dc009c995d1707c Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 27 Sep 2012 16:21:55 +0200 Subject: [PATCH] gdm: set up proper perms at post-install time. --- srcpkgs/gdm/INSTALL | 43 ++++++++++++++++++++++++++++++++++++++++++- srcpkgs/gdm/REMOVE | 1 + srcpkgs/gdm/template | 14 +++----------- 3 files changed, 46 insertions(+), 12 deletions(-) diff --git a/srcpkgs/gdm/INSTALL b/srcpkgs/gdm/INSTALL index a58b21800f2..017a3fd28e4 100644 --- a/srcpkgs/gdm/INSTALL +++ b/srcpkgs/gdm/INSTALL @@ -3,7 +3,48 @@ # case "${ACTION}" in post) - chown gdm:gdm var/lib/gdm > /dev/null + if [ ! -d var/gdm ]; then + mkdir -p var/gdm + fi + chmod 1770 var/gdm + chown root:gdm var/gdm + + if [ ! -d var/lib/gdm/greeter ]; then + mkdir -p var/lib/gdm/greeter + fi + chmod 0755 var/lib/gdm/greeter + chown gdm:gdm var/lib/gdm/greeter + + if [ ! -d var/lib/gdm/.config ]; then + mkdir -p var/lib/gdm/.config + fi + chmod 1755 var/lib/gdm/.config + chown gdm:gdm var/lib/gdm/.config + + if [ ! -d var/lib/gdm/.config/dconf ]; then + mkdir -p var/lib/gdm/.config/dconf + fi + chmod 0755 var/lib/gdm/.config/dconf + chown gdm:gdm var/lib/gdm/.config/dconf + + if [ ! -d var/lib/gdm/.local/share/applications ]; then + mkdir -p var/lib/gdm/.local/share/applications + fi + chmod 0755 var/lib/gdm/.local/share/applications + chown gdm:gdm var/lib/gdm/.local/share/applications + + if [ ! -d var/cache/gdm ]; then + mkdir -p var/cache/gdm + fi + chmod 1755 var/cache/gdm + chown root:gdm var/cache/gdm + + if [ ! -d var/log/gdm ]; then + mkdir -p var/log/gdm + fi + chmod 1770 var/log/gdm + chown gdm:gdm var/log/gdm + dconf update ;; esac diff --git a/srcpkgs/gdm/REMOVE b/srcpkgs/gdm/REMOVE index c1033b98953..7eb0ae4533b 100644 --- a/srcpkgs/gdm/REMOVE +++ b/srcpkgs/gdm/REMOVE @@ -6,5 +6,6 @@ purge) [ -d var/cache/gdm ] && rm -rf var/cache/gdm [ -d var/lib/gdm ] && rm -rf var/lib/gdm [ -d var/log/gdm ] && rm -rf var/log/gdm + [ -d var/gdm ] && rm -rf var/gdm ;; esac diff --git a/srcpkgs/gdm/template b/srcpkgs/gdm/template index d699713e3c1..ccbd087946f 100644 --- a/srcpkgs/gdm/template +++ b/srcpkgs/gdm/template @@ -1,7 +1,7 @@ # Template file for 'gdm' pkgname=gdm version=3.6.0 -revision=2 +revision=4 build_style=gnu-configure configure_args="--disable-schemas-compile --disable-static --with-at-spi-registryd-directory=/usr/libexec --without-tcp-wrappers @@ -11,8 +11,8 @@ configure_args="--disable-schemas-compile --disable-static makedepends="pkg-config intltool which gnome-doc-utils gobject-introspection pam-devel nss-devel accountsservice-devel gtk+3-devel>=3.6.0_2 upower-devel libcanberra-devel libXrandr-devel systemd-devel at-spi2-core-devel itstool" -fulldepends="xrdb dconf>=0.13.90 hicolor-icon-theme polkit-gnome xorg-server metacity -gnome-session>=3.6.0 gnome-settings-daemon>=3.6.0 dbus-x11" +fulldepends="xrdb dconf>=0.13.90 hicolor-icon-theme polkit-gnome xorg-server +metacity gnome-session>=3.6.0 gnome-settings-daemon>=3.6.0 dbus-x11" short_desc="GNOME Display Manager" maintainer="Juan RP " homepage="http://www.gnome.org" @@ -45,14 +45,6 @@ conf_files=" /etc/pam.d/gdm-smartcard /etc/pam.d/gdm-welcome" -# Required runtime directories. -make_dirs=" -/var/cache/gdm 1755 root gdm -/var/log/gdm 1755 root gdm -/var/lib/gdm/.config/dconf 0755 gdm gdm -/var/lib/gdm/.local/share/applications 0755 gdm gdm -" - # Create the 'gdm' system user/group. system_accounts="gdm" gdm_homedir="/var/lib/gdm"