summaryrefslogtreecommitdiffstats
path: root/redhat/kdebase
diff options
context:
space:
mode:
authorFrancois Andriot <francois.andriot@free.fr>2013-01-03 20:17:46 +0100
committerFrancois Andriot <francois.andriot@free.fr>2013-01-03 20:17:46 +0100
commitb566058ccb7fa94c6e34fb1e1349b093d4482d6a (patch)
tree34f3d392092770893605fc03cfce42726c445e0b /redhat/kdebase
parent4398af173f2663445e824a79c6367adab62c83e1 (diff)
downloadtde-packaging-b566058ccb7fa94c6e34fb1e1349b093d4482d6a.tar.gz
tde-packaging-b566058ccb7fa94c6e34fb1e1349b093d4482d6a.zip
RPM packaging: lots of updates
Diffstat (limited to 'redhat/kdebase')
-rw-r--r--redhat/kdebase/kdebase-3.5.13.1-fix_startkde_path.patch107
-rw-r--r--redhat/kdebase/kdebase-3.5.13.1-fix_tdm_pid_file.patch11
-rw-r--r--redhat/kdebase/pamd.kcheckpass-trinity.pclos20125
-rw-r--r--redhat/kdebase/pamd.kdm-trinity-np.pclos20127
-rw-r--r--redhat/kdebase/pamd.kdm-trinity.pclos20128
-rw-r--r--redhat/kdebase/pamd.kscreensaver-trinity.pclos20125
-rw-r--r--redhat/kdebase/suse-displaymanagers-tdm21
-rw-r--r--redhat/kdebase/trinity-kdebase-3.5.13.1.spec24
8 files changed, 187 insertions, 1 deletions
diff --git a/redhat/kdebase/kdebase-3.5.13.1-fix_startkde_path.patch b/redhat/kdebase/kdebase-3.5.13.1-fix_startkde_path.patch
new file mode 100644
index 000000000..971daf16f
--- /dev/null
+++ b/redhat/kdebase/kdebase-3.5.13.1-fix_startkde_path.patch
@@ -0,0 +1,107 @@
+--- bin/startkde.ORI 2012-11-16 20:44:01.763131101 +0100
++++ bin/startkde 2012-11-16 21:24:12.865147976 +0100
+@@ -15,6 +15,26 @@
+ source $HOME/.xprofile
+ fi
+
++# Some functions to parse and check path correctly ...
++is_in_path() {
++ search="$1"; ifs="$IFS"; IFS=":"; set $PATH; IFS="$ifs"
++ for i in $*; do
++ [ "${i}" = "${search}" ] && return 0
++ done
++ return 1
++}
++
++# Usage: place_before_in_path /opt/trinity/games /usr/games
++place_before_in_path() {
++ insert="$1"; before="$2"; ifs="$IFS"; IFS=":"; set $PATH; IFS="$ifs"
++ NPATH=""
++ for i in $*; do
++ [ "${i}" = "${before}" ] && NPATH="${NPATH}:${insert}"
++ NPATH="${NPATH}:${i}"
++ done
++ export PATH=${NPATH}
++}
++
+ echo "[startkde] Starting startkde." 1>&2
+ echo "[startkde] This script is $0" 1>&2
+
+@@ -29,7 +49,7 @@
+ # Do not use kde-config to determine the version. That command creates a
+ # profile directory in the root of the file system. Refer to Bug Report 293.
+ if [ -x $BIN_DIR/konqueror ]; then
+- KDE_VERSION="`$BIN_DIR/konqueror --version | grep KDE | awk '{print $2}'`"
++ KDE_VERSION=$($BIN_DIR/konqueror --version | while IFS=: read a b; do [[ "$a" =~ "KDE" ]] && echo $b; done)
+ echo "[startkde] TDE version is $KDE_VERSION" 1>&2
+ export KDEDIR=${BIN_DIR%/bin}
+ echo "[startkde] TDE base directory is $KDEDIR" 1>&2
+@@ -105,27 +125,12 @@
+ # This script and kstandardirs.h and kstandardirs.cpp must match.
+ # The latter two must be edited/patched before compiling.
+ echo "[startkde] KDEHOME is not set." 1>&2
+- if [ -d $HOME/.trinity ]; then
+- # OK, this one is obvious.
+- export KDEHOME=$HOME/.trinity
+- elif [ -f /usr/bin/kde4-config ]; then
+- # Looks like KDE4 is installed.
+- if [ -d $HOME/.kde ] && [ ! -d $HOME/.trinity ]; then
+- # Presume $HOME/.kde is being used for KDE4 as it already exists.
+- export KDEHOME=$HOME/.trinity
+- else
+- # Presume $HOME/.kde is being used for KDE4 to be on the safe side.
+- export KDEHOME=$HOME/.trinity
+- fi
+- elif [ -f /opt/trinity/bin/kde-config ]; then
+- # Looks like Trinity is installed.
+- export KDEHOME=$HOME/.trinity
+- elif [ -f /usr/bin/kde-config ] && [ -d $HOME/.kde ]; then
++ # Default value: $HOME/.trinity. Most users will use this.
++ export KDEHOME=$HOME/.trinity
++
++ if [ ! -d $HOME/.trinity ] && [ ! -f /usr/bin/kde4-config ] && [ -f /usr/bin/kde-config ] && [ -d $HOME/.kde ]; then
+ # Looks like Trinity is installed and not playing second fiddle to KDE4.
+ export KDEHOME=$HOME/.kde
+- else
+- # Resort to this and hope for the best!
+- export KDEHOME=$HOME/.trinity
+ fi
+ echo "[startkde] Set KDEHOME to $KDEHOME." 1>&2
+ fi
+@@ -149,30 +154,30 @@
+
+ # Modify the following environment variables only as necessary.
+ if [ -d $KDEDIR/games ]; then
+- if [ "`echo $PATH | grep \"$KDEDIR/games\"`" = "" ]; then
++ if ! is_in_path "$KDEDIR/games" ; then
+ # Respect the traditional path order. Don't blindly place $KDEDIR/games
+ # first in the path. Only place $KDEDIR/games before /usr/games. If packagers
+ # are adding $KDEDIR/games elsewhere, then they need to ensure the traditional
+ # search patch is respected.
+ # Is there a way we can check that $KDEDIR/games is always placed only just before
+ # /usr/games in the search path?
+- if [ "`echo $PATH | grep \"^\\(.*:\\)\\?/usr/games\\(:.*\\)\\?$\"`" != "" ]; then
+- export PATH="`echo $PATH | sed \"s|^\\(.*:\\)\\?/usr/games\\(:.*\\)\\?$|\\1$KDEDIR/games:/usr/games\\2|\"`"
++ if is_in_path "/usr/games"; then
++ place_before_in_path "$KDEDIR/games" "/usr/games"
+ else
+ export PATH=$KDEDIR/games:$PATH
+ fi
+ fi
+ fi
+ if [ -d $KDEDIR/bin ]; then
+- if [ "`echo $PATH | grep \"$KDEDIR/bin\"`" = "" ]; then
++ if ! is_in_path "$KDEDIR/bin" ]; then
+ # Respect the traditional path order. Don't blindly place $KDEDIR/bin
+ # first in the path. Only place $KDEDIR/bin before /usr/bin. This order is
+ # consistent with kdelibs/kdesu/stub.cpp. If packagers are adding $KDEDIR/bin
+ # elsewhere, then they need to ensure the traditional search patch is respected.
+ # Is there a way we can check that $KDEDIR/bin is always placed only just before
+ # /usr/bin in the search path?
+- if [ "`echo $PATH | grep \"^\\(.*:\\)\\?/usr/bin\\(:.*\\)\\?$\"`" != "" ]; then
+- export PATH="`echo $PATH | sed \"s|^\\(.*:\\)\\?/usr/bin\\(:.*\\)\\?$|\\1$KDEDIR/bin:/usr/bin\\2|\"`"
++ if is_in_path "/usr/bin"; then
++ place_before_in_path "$KDEDIR/bin" "/usr/bin"
+ else
+ export PATH=$KDEDIR/bin:$PATH
+ fi
diff --git a/redhat/kdebase/kdebase-3.5.13.1-fix_tdm_pid_file.patch b/redhat/kdebase/kdebase-3.5.13.1-fix_tdm_pid_file.patch
new file mode 100644
index 000000000..8ddad87e1
--- /dev/null
+++ b/redhat/kdebase/kdebase-3.5.13.1-fix_tdm_pid_file.patch
@@ -0,0 +1,11 @@
+--- kdebase-3.5.13.1/kdm/config.def.ORI 2012-12-01 12:45:04.820426652 +0100
++++ kdebase-3.5.13.1/kdm/config.def 2012-12-01 12:45:16.291197270 +0100
+@@ -883,7 +883,7 @@
+ Type: string
+ Default: ""
+ User: core
+-Instance: "/var/run/kdm.pid"
++Instance: "/var/run/tdm.pid"
+ Merge: xdm
+ Comment:
+ Where &kdm; should store its PID (do not store if empty).
diff --git a/redhat/kdebase/pamd.kcheckpass-trinity.pclos2012 b/redhat/kdebase/pamd.kcheckpass-trinity.pclos2012
new file mode 100644
index 000000000..0a37e6e13
--- /dev/null
+++ b/redhat/kdebase/pamd.kcheckpass-trinity.pclos2012
@@ -0,0 +1,5 @@
+#%PAM-1.0
+auth include system-auth
+account include system-auth
+password include system-auth
+session include system-auth
diff --git a/redhat/kdebase/pamd.kdm-trinity-np.pclos2012 b/redhat/kdebase/pamd.kdm-trinity-np.pclos2012
new file mode 100644
index 000000000..690b4df08
--- /dev/null
+++ b/redhat/kdebase/pamd.kdm-trinity-np.pclos2012
@@ -0,0 +1,7 @@
+#%PAM-1.0
+auth required pam_env.so
+auth required pam_permit.so
+account include system-auth
+password include system-auth
+session include system-auth
+session optional pam_console.so
diff --git a/redhat/kdebase/pamd.kdm-trinity.pclos2012 b/redhat/kdebase/pamd.kdm-trinity.pclos2012
new file mode 100644
index 000000000..87d080f58
--- /dev/null
+++ b/redhat/kdebase/pamd.kdm-trinity.pclos2012
@@ -0,0 +1,8 @@
+#%PAM-1.0
+auth include system-auth
+auth required pam_nologin.so
+account include system-auth
+password include system-auth
+session include system-auth
+session optional pam_console.so
+session required pam_namespace.so
diff --git a/redhat/kdebase/pamd.kscreensaver-trinity.pclos2012 b/redhat/kdebase/pamd.kscreensaver-trinity.pclos2012
new file mode 100644
index 000000000..0a37e6e13
--- /dev/null
+++ b/redhat/kdebase/pamd.kscreensaver-trinity.pclos2012
@@ -0,0 +1,5 @@
+#%PAM-1.0
+auth include system-auth
+account include system-auth
+password include system-auth
+session include system-auth
diff --git a/redhat/kdebase/suse-displaymanagers-tdm b/redhat/kdebase/suse-displaymanagers-tdm
new file mode 100644
index 000000000..7170ca8f2
--- /dev/null
+++ b/redhat/kdebase/suse-displaymanagers-tdm
@@ -0,0 +1,21 @@
+tdm_start_proc() {
+ splashcopy 0 6
+ # stop plymouth (bug#775548)
+ plymouth_quit
+
+ return 0
+}
+
+tdm_vars() {
+ TDM_BIN=/opt/trinity/bin/kdm
+ case "${DISPLAYMANAGER##*/}" in
+ tdm)
+ export KDEROOTHOME=/root/.kdm
+ DISPLAYMANAGER=$TDM_BIN
+ STARTPROC=tdm_start_proc
+ ;;
+ *) return 1 ;;
+ esac
+ return 0
+}
+
diff --git a/redhat/kdebase/trinity-kdebase-3.5.13.1.spec b/redhat/kdebase/trinity-kdebase-3.5.13.1.spec
index 46de06000..ad481b77e 100644
--- a/redhat/kdebase/trinity-kdebase-3.5.13.1.spec
+++ b/redhat/kdebase/trinity-kdebase-3.5.13.1.spec
@@ -24,7 +24,7 @@
Name: trinity-tdebase
Version: 3.5.13.1
-Release: 1%{?dist}%{?_variant}
+Release: 2%{?dist}%{?_variant}
License: GPL
Summary: Trinity Base Programs
Group: User Interface/Desktops
@@ -60,6 +60,9 @@ Source4: pamd.kcheckpass-trinity%{?dist}
Source5: pamd.kscreensaver-trinity%{?dist}
%endif
+# openSUSE: configuration file for TDM
+Source6: suse-displaymanagers-tdm
+
# TDE 3.5.13 patches
## [kdebase] Fix syntax error in icon
@@ -68,6 +71,7 @@ Patch1: kdebase-3.5.13.1-fix_displayconfig_icon.patch
Patch11: kdebase-3.5.12-desktop-openterminalhere.patch
## [kdebase/kdm/kfrontend] Global Xsession file is '/etc/X11/xinit/Xsession' [RHEL/Fedora]
Patch13: kdebase-3.5.13-genkdmconf_Xsession_location.patch
+Patch14: kdebase-3.5.13-genkdmconf_Xsession_location_xdm.patch
## [kdebase/startkde] Sets default Start Icon in 'kickerrc' [RHEL/Fedora]
Patch15: kdebase-3.5.13.1-startkde_icon.patch
## [kdebase/kioslave/man] Fix kio_man for older distros without 'man-db' [Bug #714]
@@ -76,6 +80,8 @@ Patch21: kdebase-3.5.13-kio_man_utf8.patch
Patch30: kdebase-3.5.12-kdm_hide_menu_button.patch
## [kdebase/startkde] Fix wrong path setting
Patch31: kdebase-3.5.13.1-fix_startkde_path.patch
+## [kdebase/kdm] Fix PID file is 'tdm.pid' instead of 'kdm.pid' (needed for openSUSE)
+Patch32: kdebase-3.5.13.1-fix_tdm_pid_file.patch
### Patches for RHEL4 (should not go upstream)
@@ -1887,6 +1893,9 @@ already. Most users won't need this.
%{_sysconfdir}/pam.d/kdm-trinity
%{_sysconfdir}/pam.d/kdm-trinity-np
%endif
+%if 0%{?suse_version}
+/usr/lib/X11/displaymanagers/tdm
+%endif
# Distribution specific stuff
%if 0%{?rhel} || 0%{?fedora} || 0%{?suse_version}
@@ -3028,12 +3037,16 @@ Konqueror libraries.
%if 0%{?rhel} || 0%{?fedora}
%patch13 -p1 -b .Xsession
%endif
+%if 0%{?suse_version}
+%patch14 -p1 -b .Xsession
+%endif
%patch15 -p1 -b .tdeicon
%if 0%{?rhel} || 0%{?mgaversion} || 0%{?mdkversion}
%patch21 -p1 -b .man
%endif
%patch30 -p1 -b .xtestsupport
%patch31 -p1 -b .startkde
+%patch32 -p1 -b .pid
%if 0%{?rhel} == 4
%patch201 -p1 -b .libdetect
@@ -3232,6 +3245,12 @@ EOF
%__mv -f %{buildroot}%{tde_datadir}/apps/konqueror/servicemenus/media_safelyremove.desktop %{buildroot}%{tde_datadir}/apps/konqueror/servicemenus/media_safelyremove.desktop_tdebase
%__ln_s /etc/alternatives/media_safelyremove.desktop_tdebase %{buildroot}%{tde_datadir}/apps/konqueror/servicemenus/media_safelyremove.desktop
+# SUSE: creates DM config file, used by '/etc/init.d/xdm'
+# You must set 'DISPLAYMANAGER=tdm' in '/etc/sysconfig/displaymanager'
+%if 0%{?suse_version}
+%__install -D -m 644 "%{SOURCE6}" "%{?buildroot}/usr/lib/X11/displaymanagers/tdm"
+%__sed -i "%{?buildroot}/usr/lib/X11/displaymanagers/tdm" -e "s|/opt/trinity/bin|%{tde_bindir}|g"
+%endif
%clean
%__rm -rf %{?buildroot}
@@ -3240,5 +3259,8 @@ EOF
%changelog
+* Thu Nov 29 2012 Francois Andriot <francois.andriot@free.fr> - 3.5.13.1-2
+- openSUSE: fix TDM detection by XDM scripts
+
* Mon Sep 24 2012 Francois Andriot <francois.andriot@free.fr> - 3.5.13.1-1
- Initial build for TDE 3.5.13.1