diff options
Diffstat (limited to 'source/kde/kde/post-install')
12 files changed, 39 insertions, 168 deletions
diff --git a/source/kde/kde/post-install/kde-cli-tools.post-install b/source/kde/kde/post-install/kde-cli-tools.post-install new file mode 100644 index 000000000..5a5646d82 --- /dev/null +++ b/source/kde/kde/post-install/kde-cli-tools.post-install @@ -0,0 +1,6 @@ +# Create a symlink in /usr/bin to the kdesu binary: +KDESUBIN="$(cd $PKG ; find usr -type f -name kdesu)" +if [ -r $PKG/$KDESUBIN ]; then + mkdir -p $PKG/usr/bin + ( cd $PKG/usr/bin ; ln -s /$KDESUBIN kdesu ) +fi diff --git a/source/kde/kde/post-install/kdesu.post-install b/source/kde/kde/post-install/kdesu.post-install deleted file mode 100644 index 52402f52c..000000000 --- a/source/kde/kde/post-install/kdesu.post-install +++ /dev/null @@ -1,4 +0,0 @@ -# Create a symlink in /usr/bin to the KF5 kdesu binary -mkdir -p $PKG/usr/bin -( cd $PKG/usr/bin ; ln -s /usr/lib${LIBDIRSUFFIX}/kf5/kdesu kdesu ) - diff --git a/source/kde/kde/post-install/kscreenlocker.post-install b/source/kde/kde/post-install/kscreenlocker.post-install deleted file mode 100644 index 203cff041..000000000 --- a/source/kde/kde/post-install/kscreenlocker.post-install +++ /dev/null @@ -1,4 +0,0 @@ -if [ "$SLACKPAM" == "no" ]; then - # For shadow, this file needs to be setuid root: - chmod +s $PKG/usr/lib$LIBDIRSUFFIX/kcheckpass -fi diff --git a/source/kde/kde/post-install/kservice.post-install b/source/kde/kde/post-install/kservice.post-install index a014f3ba3..8da6bcb67 100644 --- a/source/kde/kde/post-install/kservice.post-install +++ b/source/kde/kde/post-install/kservice.post-install @@ -1,4 +1,4 @@ -# Add profile scripts +# Add profile scripts: mkdir -p $PKG/etc/profile.d cat $CWD/post-install/kservice/profile.d/kde.sh \ | sed -e "s#/lib/#/lib${LIBDIRSUFFIX}/#g" \ @@ -7,3 +7,10 @@ cat $CWD/post-install/kservice/profile.d/kde.csh \ | sed -e "s#/lib/#/lib${LIBDIRSUFFIX}/#g" \ > $PKG/etc/profile.d/kde.csh chmod 0755 $PKG/etc/profile.d/* + +# We still have a couple of things looking in the old location, +# so we'll kludge it with a link (hopefully not forever): +mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/libexec/kf5 +if [ ! -e $PKG/usr/lib${LIBDIRSUFFIX}/kf5 ]; then + ( cd $PKG/usr/lib${LIBDIRSUFFIX} ; ln -sf libexec/kf5 . ) +fi diff --git a/source/kde/kde/post-install/kservice/profile.d/kde.csh b/source/kde/kde/post-install/kservice/profile.d/kde.csh index 59de8963e..6884c0f12 100644 --- a/source/kde/kde/post-install/kservice/profile.d/kde.csh +++ b/source/kde/kde/post-install/kservice/profile.d/kde.csh @@ -5,18 +5,21 @@ if ( ! $?KDEDIRS ) then endif # Add KDE paths if they exist: -if ( -d /usr/lib/kf5 ) then - setenv PATH ${PATH}:/usr/lib/kf5 +if ( -d /usr/lib/libexec/kf5 ) then + setenv PATH ${PATH}:/usr/lib/libexec/kf5 endif if ( -d /usr/lib/kde4/libexec ) then setenv PATH ${PATH}:/usr/lib/kde4/libexec endif -# Add /etc/kde/xdg to $XDG_CONFIG_DIRS: -if ( $?XDG_CONFIG_DIRS ) then +# If there's no $XDG_CONFIG_DIRS variable, set it to /etc/xdg: +if ( ! $?XDG_CONFIG_DIRS ) then + setenv XDG_CONFIG_DIRS /etc/xdg +endif + +# Add /etc/kde/xdg to $XDG_CONFIG_DIRS (if it exists): +if ( -d /etc/kde/xdg ) then setenv XDG_CONFIG_DIRS ${XDG_CONFIG_DIRS}:/etc/kde/xdg -else - setenv XDG_CONFIG_DIRS /etc/xdg:/etc/kde/xdg endif # Commented out, since PAM should take care of this: diff --git a/source/kde/kde/post-install/kservice/profile.d/kde.sh b/source/kde/kde/post-install/kservice/profile.d/kde.sh index 48bf44090..8b7c3e37b 100644 --- a/source/kde/kde/post-install/kservice/profile.d/kde.sh +++ b/source/kde/kde/post-install/kservice/profile.d/kde.sh @@ -4,20 +4,24 @@ KDEDIRS=/usr export KDEDIRS # Add KDE paths if they exist: -if [ -d /usr/lib/kf5 ]; then - PATH="$PATH:/usr/lib/kf5" +if [ -d /usr/lib/libexec/kf5 ]; then + PATH="$PATH:/usr/lib/libexec/kf5" fi if [ -d /usr/lib/kde4/libexec ]; then PATH="$PATH:/usr/lib/kde4/libexec" fi export PATH -# Add /etc/kde/xdg to $XDG_CONFIG_DIRS: -if [ ! "$XDG_CONFIG_DIRS" = "" ]; then +# If there's no $XDG_CONFIG_DIRS variable, set it to /etc/xdg: +if [ -z "$XDG_CONFIG_DIRS" ]; then + XDG_CONFIG_DIRS=/etc/xdg +fi + +# Add /etc/kde/xdg to $XDG_CONFIG_DIRS (if it exists): +if [ -d /etc/kde/xdg ]; then XDG_CONFIG_DIRS=$XDG_CONFIG_DIRS:/etc/kde/xdg -else - XDG_CONFIG_DIRS=/etc/xdg:/etc/kde/xdg fi + export XDG_CONFIG_DIRS # Commented out, since PAM should take care of this: diff --git a/source/kde/kde/post-install/plasma-workspace.post-install b/source/kde/kde/post-install/plasma-workspace.post-install index 4ba279a20..633d16274 100644 --- a/source/kde/kde/post-install/plasma-workspace.post-install +++ b/source/kde/kde/post-install/plasma-workspace.post-install @@ -35,23 +35,9 @@ rmdir $PKG/usr/lib$LIBDIRSUFFIX/qt5/plugins/plugins mkdir -p $PKG/etc mv $PKG/etc/kde/dbus-1 $PKG/etc/ -if [ "$SLACKPAM" == "no" ]; then - # For shadow, this file needs to be setuid root just like the KDE4 version: - if [ -f $PKG/usr/lib$LIBDIRSUFFIX/kcheckpass ]; then - chmod +s $PKG/usr/lib$LIBDIRSUFFIX/kcheckpass - fi - - # ck-launch-session is needed for a Wayland session, since we do not have PAM: - sed -e 's/^Exec=dbus-launch/Exec=ck-launch-session dbus-launch --sh-syntax/' \ - -i $PKG/usr/share/wayland-sessions/plasmawayland.desktop -else - # Install a PAM file for Plasma5 workspace: - install -Dm644 $CWD/post-install/plasma-workspace/pam.d/kde $PKG/etc/pam.d/kde -fi - -if [ "$SLKELOGIND" == "yes" ]; then - # Since elogind does not set DBUS_SESSION_BUS_ADDRESS we need to start - # Plasma X11 session through dbus-run-session like Wayland is launched: - sed -i $PKG/usr/share/xsessions/plasma.desktop \ - -e "s,^Exec=/,Exec=dbus-run-session /," -fi +# Install a PAM file for Plasma5 workspace: +install -Dm644 $CWD/post-install/plasma-workspace/pam.d/kde $PKG/etc/pam.d/kde.new + +# Since elogind does not set DBUS_SESSION_BUS_ADDRESS we need to start +# Plasma X11 session through dbus-run-session like Wayland is launched: +sed -i $PKG/usr/share/xsessions/plasma.desktop -e "s,^Exec=/,Exec=dbus-run-session /," diff --git a/source/kde/kde/post-install/sddm.post-install b/source/kde/kde/post-install/sddm.post-install deleted file mode 100644 index b69fdcd78..000000000 --- a/source/kde/kde/post-install/sddm.post-install +++ /dev/null @@ -1,55 +0,0 @@ -# Replace systemd-centric files with ours: -rm -f $PKG/etc/pam.d/sddm* -for FILE in sddm sddm-autologin sddm-greeter ; do - install -Dm644 $CWD/post-install/sddm/pam.d/$FILE $PKG/etc/pam.d/$FILE -done - -# Create the SDDM home directory: -mkdir -p $PKG/var/lib/sddm -chmod 755 $PKG/var/lib/sddm -chown sddm:sddm $PKG/var/lib/sddm - -# D-Bus configs should be under /usr, not /etc: -mkdir -p $PKG/usr/share/dbus-1/system.d -mv $PKG/etc/dbus-1/system.d/* $PKG/usr/share/dbus-1/system.d -rmdir --parents $PKG/etc/dbus-1/system.d - -# Remove the sddm.conf file because we will generate our own in doinst.sh: -rm -f $PKG/etc/sddm.conf - -# Generate the default sddm.conf: -$PKG/usr/bin/sddm --example-config > $PKG/etc/sddm.conf - -# Set the KDE5 theme 'breeze' as default (integrates better with Plasma 5): -sed -i -e "/\[Theme\]/,/^\[/s/^Current.*/Current=breeze/" $PKG/etc/sddm.conf - -# Move the default config file to .new: -mv $PKG/etc/sddm.conf $PKG/etc/sddm.conf.new - -# Make sure that Plasma and SDDM work on older GPUs, -# by forcing Qt5 to use software GL rendering: -cat << "EOF" >> $PKG/usr/share/sddm/scripts/Xsetup -# Make sure that Plasma and SDDM work on older GPUs by forcing Qt5 to use -# software GL rendering if the OpenGL version is not new enough: -OPENGL_VERSION=$(LANG=C glxinfo |grep '^OpenGL version string: ' |head -n 1 |sed -e 's/^OpenGL version string: \([0-9]\).*$/\1/g') -if [ "$OPENGL_VERSION" -lt 2 ]; then - QT_XCB_FORCE_SOFTWARE_OPENGL=1 - export QT_XCB_FORCE_SOFTWARE_OPENGL -fi -EOF - -# Add a wrapper for the sddm binary, to enable a custom environment: -mv $PKG/usr/bin/sddm $PKG/usr/bin/sddm.bin -cat <<"EOT" > $PKG/usr/bin/sddm -#!/bin/sh -# Customized environment (LANG definition): -if [ -f /etc/default/sddm ]; then - . /etc/default/sddm -fi -/usr/bin/sddm.bin "$*" -EOT -chmod 0755 $PKG/usr/bin/sddm - -# Let's also add an example customization (localization of the UI): -mkdir -p $PKG/etc/default -echo ". /etc/profile.d/lang.sh" > $PKG/etc/default/sddm.new diff --git a/source/kde/kde/post-install/sddm/pam.d/sddm b/source/kde/kde/post-install/sddm/pam.d/sddm deleted file mode 100644 index df016a7ec..000000000 --- a/source/kde/kde/post-install/sddm/pam.d/sddm +++ /dev/null @@ -1,26 +0,0 @@ -#%PAM-1.0 - -auth substack system-auth - -# Uncomment this line to restrict login to users with a UID greater -# than 999 (in other words, don't allow login for root): -#auth required pam_succeed_if.so uid >= 1000 quiet - --auth optional pam_gnome_keyring.so --auth optional pam_kwallet5.so -auth include postlogin - -account include system-auth - -password substack system-auth --password optional pam_gnome_keyring.so use_authtok --password optional pam_kwallet5.so use_authtok - -session optional pam_keyinit.so force revoke -session substack system-auth -session required pam_loginuid.so --session optional pam_ck_connector.so nox11 --session optional pam_elogind.so --session optional pam_gnome_keyring.so auto_start --session optional pam_kwallet5.so auto_start -session include postlogin diff --git a/source/kde/kde/post-install/sddm/pam.d/sddm-autologin b/source/kde/kde/post-install/sddm/pam.d/sddm-autologin deleted file mode 100644 index 360239544..000000000 --- a/source/kde/kde/post-install/sddm/pam.d/sddm-autologin +++ /dev/null @@ -1,25 +0,0 @@ -#%PAM-1.0 -auth requisite pam_nologin.so -auth required pam_env.so -auth required pam_shells.so - -# Uncomment this line to restrict autologin to users with a UID greater -# than 999 (in other words, don't allow autologin for root): -#auth required pam_succeed_if.so uid >= 1000 quiet - -auth required pam_permit.so --auth optional pam_gnome_keyring.so --auth optional pam_kwallet5.so - -account include system-auth - -password include system-auth - -session substack system-auth -session required pam_loginuid.so --session optional pam_ck_connector.so nox11 --session optional pam_elogind.so --session optional pam_gnome_keyring.so auto_start --session optional pam_kwallet5.so auto_start -session include postlogin - diff --git a/source/kde/kde/post-install/sddm/pam.d/sddm-greeter b/source/kde/kde/post-install/sddm/pam.d/sddm-greeter deleted file mode 100644 index fe30e60c2..000000000 --- a/source/kde/kde/post-install/sddm/pam.d/sddm-greeter +++ /dev/null @@ -1,19 +0,0 @@ -#%PAM-1.0 - -# Load environment from /etc/environment and ~/.pam_environment -auth required pam_env.so - -# Always let the greeter start without authentication -auth required pam_permit.so - -# No action required for account management -account required pam_permit.so - -# Can't change password -password required pam_deny.so - -# Setup session -session required pam_unix.so --session optional pam_systemd.so --session optional pam_ck_connector.so nox11 --session optional pam_elogind.so diff --git a/source/kde/kde/post-install/wicd-kde.post-install b/source/kde/kde/post-install/wicd-kde.post-install deleted file mode 100644 index 881011489..000000000 --- a/source/kde/kde/post-install/wicd-kde.post-install +++ /dev/null @@ -1,2 +0,0 @@ -# Move the dbus configuration files to the proper place: -mv $PKG/etc/kde/dbus-1 $PKG/etc/ |