forked from pool/xfce4-session
Accepting request 123958 from X11:xfce
- renamed xfce4-session-adapt-session-script.patch to xfce4-session-adapt-session-script.patch - remove bashisms from xinitrc - do not modify XDG_CONFIG_DIRS and XDG_DATA_DIRS unless necessary in startxfce4 - deliver %{_datadir}/xfce and add it to XDG_DATA_DIRS before %{_datadir} to allow for Xfce-specific defaults OBS-URL: https://build.opensuse.org/request/show/123958 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/xfce4-session?expand=0&rev=55
This commit is contained in:
parent
f5f25e4a8a
commit
3fb063ff6d
@ -1,46 +0,0 @@
|
||||
Index: xfce4-session-4.9.0/scripts/xinitrc.in
|
||||
===================================================================
|
||||
--- xfce4-session-4.9.0.orig/scripts/xinitrc.in
|
||||
+++ xfce4-session-4.9.0/scripts/xinitrc.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/sh
|
||||
+#!/bin/bash
|
||||
|
||||
# fix broken $UID on some system...
|
||||
if test "x$UID" = "x"; then
|
||||
@@ -38,12 +38,6 @@ if test "x$XDG_CACHE_HOME" = "x" ; then
|
||||
fi
|
||||
[ -d "$XDG_CACHE_HOME" ] || mkdir "$XDG_CACHE_HOME"
|
||||
|
||||
-# set up XDG user directores. see
|
||||
-# http://freedesktop.org/wiki/Software/xdg-user-dirs
|
||||
-if which xdg-user-dirs-update >/dev/null 2>&1; then
|
||||
- xdg-user-dirs-update
|
||||
-fi
|
||||
-
|
||||
# Modify libglade and glade environment variables so that
|
||||
# it will find the files installed by Xfce
|
||||
GLADE_CATALOG_PATH="$GLADE_CATALOG_PATH:/usr/share/glade3/catalogs"
|
||||
Index: xfce4-session-4.9.0/scripts/xinitrc.in.in
|
||||
===================================================================
|
||||
--- xfce4-session-4.9.0.orig/scripts/xinitrc.in.in
|
||||
+++ xfce4-session-4.9.0/scripts/xinitrc.in.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/sh
|
||||
+#!/bin/bash
|
||||
|
||||
# fix broken $UID on some system...
|
||||
if test "x$UID" = "x"; then
|
||||
@@ -38,12 +38,6 @@ if test "x$XDG_CACHE_HOME" = "x" ; then
|
||||
fi
|
||||
[ -d "$XDG_CACHE_HOME" ] || mkdir "$XDG_CACHE_HOME"
|
||||
|
||||
-# set up XDG user directores. see
|
||||
-# http://freedesktop.org/wiki/Software/xdg-user-dirs
|
||||
-if which xdg-user-dirs-update >/dev/null 2>&1; then
|
||||
- xdg-user-dirs-update
|
||||
-fi
|
||||
-
|
||||
# Modify libglade and glade environment variables so that
|
||||
# it will find the files installed by Xfce
|
||||
GLADE_CATALOG_PATH="$GLADE_CATALOG_PATH:@XFCE_GLADE_CATALOG_PATH@"
|
327
xfce4-session-adapt-session-scripts.patch
Normal file
327
xfce4-session-adapt-session-scripts.patch
Normal file
@ -0,0 +1,327 @@
|
||||
Index: xfce4-session-4.10.0/scripts/xinitrc.in
|
||||
===================================================================
|
||||
--- xfce4-session-4.10.0.orig/scripts/xinitrc.in
|
||||
+++ xfce4-session-4.10.0/scripts/xinitrc.in
|
||||
@@ -38,12 +38,6 @@ if test "x$XDG_CACHE_HOME" = "x" ; then
|
||||
fi
|
||||
[ -d "$XDG_CACHE_HOME" ] || mkdir "$XDG_CACHE_HOME"
|
||||
|
||||
-# set up XDG user directores. see
|
||||
-# http://freedesktop.org/wiki/Software/xdg-user-dirs
|
||||
-if which xdg-user-dirs-update >/dev/null 2>&1; then
|
||||
- xdg-user-dirs-update
|
||||
-fi
|
||||
-
|
||||
# Modify libglade and glade environment variables so that
|
||||
# it will find the files installed by Xfce
|
||||
GLADE_CATALOG_PATH="$GLADE_CATALOG_PATH:/usr/share/glade3/catalogs"
|
||||
@@ -81,112 +75,17 @@ cat /dev/null $XRESOURCES | xrdb -nocpp
|
||||
# load local modmap
|
||||
test -r $HOME/.Xmodmap && xmodmap $HOME/.Xmodmap
|
||||
|
||||
-# run xfce4-session if installed
|
||||
-if which xfce4-session >/dev/null 2>&1; then
|
||||
-
|
||||
- # check if we start xfce4-session with ck-launch-session. this is only
|
||||
- # required for starting from a console, not a login manager
|
||||
- if test "x$XFCE4_SESSION_WITH_CK" = "x1"; then
|
||||
- if which ck-launch-session >/dev/null 2>&1; then
|
||||
- ck-launch-session xfce4-session
|
||||
- else
|
||||
- echo
|
||||
- echo "You have tried to start Xfce with consolekit support, but"
|
||||
- echo "ck-launch-session is not installed."
|
||||
- echo "Aborted startup..."
|
||||
- echo
|
||||
-
|
||||
- exit 1
|
||||
- fi
|
||||
- else
|
||||
- # start xfce4-session normally
|
||||
- xfce4-session
|
||||
+# check if we start xfce4-session with ck-launch-session. this is only
|
||||
+# required for starting from a console, not a login manager
|
||||
+if test "x$XFCE4_SESSION_WITH_CK" = "x1"; then
|
||||
+ if ! ck-launch-session xfce4-session; then
|
||||
+ cat >&2 <<'EOF'
|
||||
+Failed to start Xfce with consolekit support.
|
||||
+Aborted startup...
|
||||
+EOF
|
||||
+ exit 1
|
||||
fi
|
||||
-
|
||||
- exit 0
|
||||
+else
|
||||
+ # start xfce4-session normally
|
||||
+ xfce4-session
|
||||
fi
|
||||
-
|
||||
-##################
|
||||
-# IMPORTANT NOTE #
|
||||
-##################
|
||||
-
|
||||
-# Everything below here ONLY gets executed if you are NOT using xfce4-session
|
||||
-# (Xfce's session manager). If you are using the session manager, everything
|
||||
-# below is handled by it, and the code below is not executed at all. If you're
|
||||
-# not sure if you're using the session manager, type 'ps -e|grep xfce4-session'
|
||||
-# in a terminal while Xfce is running.
|
||||
-
|
||||
-##################
|
||||
-
|
||||
-# Use dbus-launch if installed.
|
||||
-if test x"$DBUS_SESSION_BUS_ADDRESS" = x""; then
|
||||
- if which dbus-launch >/dev/null 2>&1; then
|
||||
- eval `dbus-launch --sh-syntax --exit-with-session`
|
||||
- # some older versions of dbus don't export the var properly
|
||||
- export DBUS_SESSION_BUS_ADDRESS
|
||||
- else
|
||||
- echo "Could not find dbus-launch; Xfce will not work properly" >&2
|
||||
- fi
|
||||
-fi
|
||||
-
|
||||
-# this is only necessary when running w/o xfce4-session
|
||||
-xsetroot -solid black -cursor_name watch
|
||||
-
|
||||
-# or use old-fashioned startup script otherwise
|
||||
-
|
||||
-xfsettingsd &
|
||||
-xfwm4 --daemon
|
||||
-
|
||||
-# start up stuff in $XDG_CONFIG_HOME/autostart/
|
||||
-if test -d "$XDG_CONFIG_HOME/autostart"; then
|
||||
- for i in ${XDG_CONFIG_HOME}/autostart/*.desktop; do
|
||||
- grep -q -E "^Hidden=true" "$i" && continue
|
||||
- if grep -q -E "^OnlyShowIn=" "$i"; then
|
||||
- # need to test twice, as lack of the line entirely means we still run it
|
||||
- grep -E "^OnlyShowIn=" "$i" | grep -q 'XFCE;' || continue
|
||||
- fi
|
||||
- grep -E "^NotShowIn=" "$i" | grep -q 'XFCE;' && continue
|
||||
-
|
||||
- # check for TryExec
|
||||
- trycmd=`grep -E "^TryExec=" "$i" | cut -d'=' -f2`
|
||||
- if test "$trycmd"; then
|
||||
- which "$trycmd" >/dev/null 2>&1 || continue
|
||||
- fi
|
||||
-
|
||||
- cmd=`grep -E "^Exec=" "$i" | cut -d'=' -f2`
|
||||
- if test "$cmd" && which "$cmd" >/dev/null 2>&1; then
|
||||
- $cmd &
|
||||
- fi
|
||||
- done
|
||||
-fi
|
||||
-
|
||||
-xfdesktop&
|
||||
-orage &
|
||||
-
|
||||
-panel=`which xfce4-panel`
|
||||
-case "x$panel" in
|
||||
- x|xno*)
|
||||
- ;;
|
||||
- *)
|
||||
- $panel
|
||||
- ret=$?
|
||||
- while test $ret -ne 0; do
|
||||
- xmessage -center -file - -timeout 20 -title Error <<EOF
|
||||
-A crash occured in the panel
|
||||
-Please report this to the xfce4-dev@xfce.org list
|
||||
-or on http://bugs.xfce.org
|
||||
-Meanwhile the panel will be restarted
|
||||
-EOF
|
||||
- cat >&2 <<EOF
|
||||
-A crash occured in the panel
|
||||
-Please report this to the xfce4-dev@xfce.org list
|
||||
-or on http://bugs.xfce.org
|
||||
-Meanwhile the panel will be restarted
|
||||
-EOF
|
||||
- $panel
|
||||
- ret=$?
|
||||
- done
|
||||
- ;;
|
||||
-esac
|
||||
-
|
||||
-xsetroot -bg white -fg red -solid black -cursor_name watch
|
||||
Index: xfce4-session-4.10.0/scripts/xinitrc.in.in
|
||||
===================================================================
|
||||
--- xfce4-session-4.10.0.orig/scripts/xinitrc.in.in
|
||||
+++ xfce4-session-4.10.0/scripts/xinitrc.in.in
|
||||
@@ -38,12 +38,6 @@ if test "x$XDG_CACHE_HOME" = "x" ; then
|
||||
fi
|
||||
[ -d "$XDG_CACHE_HOME" ] || mkdir "$XDG_CACHE_HOME"
|
||||
|
||||
-# set up XDG user directores. see
|
||||
-# http://freedesktop.org/wiki/Software/xdg-user-dirs
|
||||
-if which xdg-user-dirs-update >/dev/null 2>&1; then
|
||||
- xdg-user-dirs-update
|
||||
-fi
|
||||
-
|
||||
# Modify libglade and glade environment variables so that
|
||||
# it will find the files installed by Xfce
|
||||
GLADE_CATALOG_PATH="$GLADE_CATALOG_PATH:@XFCE_GLADE_CATALOG_PATH@"
|
||||
@@ -81,112 +75,17 @@ cat /dev/null $XRESOURCES | xrdb -nocpp
|
||||
# load local modmap
|
||||
test -r $HOME/.Xmodmap && xmodmap $HOME/.Xmodmap
|
||||
|
||||
-# run xfce4-session if installed
|
||||
-if which xfce4-session >/dev/null 2>&1; then
|
||||
-
|
||||
- # check if we start xfce4-session with ck-launch-session. this is only
|
||||
- # required for starting from a console, not a login manager
|
||||
- if test "x$XFCE4_SESSION_WITH_CK" = "x1"; then
|
||||
- if which ck-launch-session >/dev/null 2>&1; then
|
||||
- ck-launch-session xfce4-session
|
||||
- else
|
||||
- echo
|
||||
- echo "You have tried to start Xfce with consolekit support, but"
|
||||
- echo "ck-launch-session is not installed."
|
||||
- echo "Aborted startup..."
|
||||
- echo
|
||||
-
|
||||
- exit 1
|
||||
- fi
|
||||
- else
|
||||
- # start xfce4-session normally
|
||||
- xfce4-session
|
||||
+# check if we start xfce4-session with ck-launch-session. this is only
|
||||
+# required for starting from a console, not a login manager
|
||||
+if test "x$XFCE4_SESSION_WITH_CK" = "x1"; then
|
||||
+ if ! ck-launch-session xfce4-session; then
|
||||
+ cat >&2 <<'EOF'
|
||||
+Failed to start Xfce with consolekit support.
|
||||
+Aborted startup...
|
||||
+EOF
|
||||
+ exit 1
|
||||
fi
|
||||
-
|
||||
- exit 0
|
||||
+else
|
||||
+ # start xfce4-session normally
|
||||
+ xfce4-session
|
||||
fi
|
||||
-
|
||||
-##################
|
||||
-# IMPORTANT NOTE #
|
||||
-##################
|
||||
-
|
||||
-# Everything below here ONLY gets executed if you are NOT using xfce4-session
|
||||
-# (Xfce's session manager). If you are using the session manager, everything
|
||||
-# below is handled by it, and the code below is not executed at all. If you're
|
||||
-# not sure if you're using the session manager, type 'ps -e|grep xfce4-session'
|
||||
-# in a terminal while Xfce is running.
|
||||
-
|
||||
-##################
|
||||
-
|
||||
-# Use dbus-launch if installed.
|
||||
-if test x"$DBUS_SESSION_BUS_ADDRESS" = x""; then
|
||||
- if which dbus-launch >/dev/null 2>&1; then
|
||||
- eval `dbus-launch --sh-syntax --exit-with-session`
|
||||
- # some older versions of dbus don't export the var properly
|
||||
- export DBUS_SESSION_BUS_ADDRESS
|
||||
- else
|
||||
- echo "Could not find dbus-launch; Xfce will not work properly" >&2
|
||||
- fi
|
||||
-fi
|
||||
-
|
||||
-# this is only necessary when running w/o xfce4-session
|
||||
-xsetroot -solid black -cursor_name watch
|
||||
-
|
||||
-# or use old-fashioned startup script otherwise
|
||||
-
|
||||
-xfsettingsd &
|
||||
-xfwm4 --daemon
|
||||
-
|
||||
-# start up stuff in $XDG_CONFIG_HOME/autostart/
|
||||
-if test -d "$XDG_CONFIG_HOME/autostart"; then
|
||||
- for i in ${XDG_CONFIG_HOME}/autostart/*.desktop; do
|
||||
- grep -q -E "^Hidden=true" "$i" && continue
|
||||
- if grep -q -E "^OnlyShowIn=" "$i"; then
|
||||
- # need to test twice, as lack of the line entirely means we still run it
|
||||
- grep -E "^OnlyShowIn=" "$i" | grep -q 'XFCE;' || continue
|
||||
- fi
|
||||
- grep -E "^NotShowIn=" "$i" | grep -q 'XFCE;' && continue
|
||||
-
|
||||
- # check for TryExec
|
||||
- trycmd=`grep -E "^TryExec=" "$i" | cut -d'=' -f2`
|
||||
- if test "$trycmd"; then
|
||||
- which "$trycmd" >/dev/null 2>&1 || continue
|
||||
- fi
|
||||
-
|
||||
- cmd=`grep -E "^Exec=" "$i" | cut -d'=' -f2`
|
||||
- if test "$cmd" && which "$cmd" >/dev/null 2>&1; then
|
||||
- $cmd &
|
||||
- fi
|
||||
- done
|
||||
-fi
|
||||
-
|
||||
-xfdesktop&
|
||||
-orage &
|
||||
-
|
||||
-panel=`which xfce4-panel`
|
||||
-case "x$panel" in
|
||||
- x|xno*)
|
||||
- ;;
|
||||
- *)
|
||||
- $panel
|
||||
- ret=$?
|
||||
- while test $ret -ne 0; do
|
||||
- xmessage -center -file - -timeout 20 -title Error <<EOF
|
||||
-A crash occured in the panel
|
||||
-Please report this to the xfce4-dev@xfce.org list
|
||||
-or on http://bugs.xfce.org
|
||||
-Meanwhile the panel will be restarted
|
||||
-EOF
|
||||
- cat >&2 <<EOF
|
||||
-A crash occured in the panel
|
||||
-Please report this to the xfce4-dev@xfce.org list
|
||||
-or on http://bugs.xfce.org
|
||||
-Meanwhile the panel will be restarted
|
||||
-EOF
|
||||
- $panel
|
||||
- ret=$?
|
||||
- done
|
||||
- ;;
|
||||
-esac
|
||||
-
|
||||
-xsetroot -bg white -fg red -solid black -cursor_name watch
|
||||
Index: xfce4-session-4.10.0/scripts/startxfce4.in
|
||||
===================================================================
|
||||
--- xfce4-session-4.10.0.orig/scripts/startxfce4.in
|
||||
+++ xfce4-session-4.10.0/scripts/startxfce4.in
|
||||
@@ -66,13 +66,22 @@ fi
|
||||
|
||||
if test "x$XDG_DATA_DIRS" = "x"
|
||||
then
|
||||
- if test "x@_datadir_@" = "x/usr/local/share" -o "x@_datadir_@" = "x/usr/share"; then
|
||||
+ if test "x@_datadir_@" = "x/usr/local/share" -o test "x@_datadir_@" = "x/usr/share"; then
|
||||
XDG_DATA_DIRS="/usr/local/share:/usr/share"
|
||||
else
|
||||
XDG_DATA_DIRS="@_datadir_@:/usr/local/share:/usr/share"
|
||||
fi
|
||||
else
|
||||
- XDG_DATA_DIRS="$XDG_DATA_DIRS:@_datadir_@"
|
||||
+ case $XDG_DATA_DIRS in
|
||||
+ *:@_datadir_@:*)
|
||||
+ ;;
|
||||
+ *)
|
||||
+ XDG_DATA_DIRS="$XDG_DATA_DIRS:@_datadir_@"
|
||||
+ esac
|
||||
+fi
|
||||
+if test -d "@_datadir_@/xfce"
|
||||
+then
|
||||
+ XDG_DATA_DIRS="@_datadir_@/xfce:$XDG_DATA_DIRS"
|
||||
fi
|
||||
export XDG_DATA_DIRS
|
||||
|
||||
@@ -84,7 +93,12 @@ then
|
||||
XDG_CONFIG_DIRS="/etc/xdg:@_sysconfdir_@/xdg"
|
||||
fi
|
||||
else
|
||||
- XDG_CONFIG_DIRS="$XDG_CONFIG_DIRS:@_sysconfdir_@/xdg"
|
||||
+ case $XDG_CONFIG_DIRS in
|
||||
+ *:@_sysconfdir_@/xdg:*)
|
||||
+ ;;
|
||||
+ *)
|
||||
+ XDG_CONFIG_DIRS="$XDG_CONFIG_DIRS:@_sysconfdir_@/xdg"
|
||||
+ esac
|
||||
fi
|
||||
export XDG_CONFIG_DIRS
|
||||
|
@ -1,3 +1,14 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed May 16 10:07:49 UTC 2012 - gber@opensuse.org
|
||||
|
||||
- renamed xfce4-session-adapt-session-script.patch to
|
||||
xfce4-session-adapt-session-script.patch
|
||||
- remove bashisms from xinitrc
|
||||
- do not modify XDG_CONFIG_DIRS and XDG_DATA_DIRS unless
|
||||
necessary in startxfce4
|
||||
- deliver %{_datadir}/xfce and add it to XDG_DATA_DIRS before
|
||||
%{_datadir} to allow for Xfce-specific defaults
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Apr 29 08:53:51 UTC 2012 - gber@opensuse.org
|
||||
|
||||
|
@ -28,8 +28,8 @@ Url: http://docs.xfce.org/xfce/xfce4-session/start
|
||||
Source0: http://archive.xfce.org/src/xfce/xfce4-session/4.10/%{name}-%{version}.tar.bz2
|
||||
# PATCH-FEATURE-OPENSUSE xfce4-session-simple-splash-remove-shadows.patch gber@opensuse.org -- Improves readability of the simple splash engine text by removing the text shadows
|
||||
Patch0: xfce4-session-simple-splash-remove-shadows.patch
|
||||
# PATCH-FIX-OPENSUSE xfce4-session-adapt-session-script.patch gber@opensuse.org -- Adapt upstream sessions script to openSUSE
|
||||
Patch1: xfce4-session-adapt-session-script.patch
|
||||
# PATCH-FIX-OPENSUSE xfce4-session-adapt-session-scripts.patch gber@opensuse.org -- Adapt upstream sessions script to openSUSE
|
||||
Patch1: xfce4-session-adapt-session-scripts.patch
|
||||
BuildRequires: intltool
|
||||
BuildRequires: update-desktop-files
|
||||
BuildRequires: xorg-x11
|
||||
@ -118,6 +118,8 @@ make %{?_smp_mflags} V=1
|
||||
|
||||
chmod 755 %{buildroot}%{_sysconfdir}/xdg/xfce4/xinitrc
|
||||
|
||||
install -d -m 755 %{buildroot}%{_datadir}/xfce/applications
|
||||
|
||||
# add back X-XFCE for now; this is a personal and not a system setting
|
||||
%suse_update_desktop_file -r xfce-session-settings XFCE X-XFCE GTK Settings DesktopSettings X-XFCE-SettingsDialog X-XFCE-PersonalSettings
|
||||
%suse_update_desktop_file xfce4-session-logout
|
||||
@ -156,6 +158,7 @@ rm -rf %{buildroot}
|
||||
%{_bindir}/xflock4
|
||||
%{_bindir}/startxfce4
|
||||
%{_libdir}/xfce4
|
||||
%{_datadir}/xfce
|
||||
%{_datadir}/xsessions/xfce.desktop
|
||||
%{_datadir}/themes/*
|
||||
%{_datadir}/applications/*.desktop
|
||||
|
Loading…
Reference in New Issue
Block a user