summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Stakenvicius <axs@gentoo.org>2013-10-24 18:55:57 +0000
committerIan Stakenvicius <axs@gentoo.org>2013-10-24 18:55:57 +0000
commitc1a3505184a5f2b0a2deced668917d72b446d0be (patch)
treeaf9826be20f2a3e7deeb074e132b2e5f9a74d876 /x11-misc
parentupdate of subunit to 0.0.15 and added support for normal python-r1 (diff)
downloadgentoo-2-c1a3505184a5f2b0a2deced668917d72b446d0be.tar.gz
gentoo-2-c1a3505184a5f2b0a2deced668917d72b446d0be.tar.bz2
gentoo-2-c1a3505184a5f2b0a2deced668917d72b446d0be.zip
fixed regression for session-chooser (bug 489078), changed default session list to be from xsession .desktop files, changed operation of -nodaemon and slim.service to fix systemd session issue after multiple logins (bugs.freedesktop.org/show_bug.cgi?id=62866)
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 2B6559ED)
Diffstat (limited to 'x11-misc')
-rw-r--r--x11-misc/slim/ChangeLog13
-rw-r--r--x11-misc/slim/files/slim-1.3.6-config.diff77
-rw-r--r--x11-misc/slim/files/slim-1.3.6-session-chooser.patch115
-rw-r--r--x11-misc/slim/files/slim-1.3.6-systemd-session.patch29
-rw-r--r--x11-misc/slim/slim-1.3.6-r3.ebuild (renamed from x11-misc/slim/slim-1.3.6-r2.ebuild)6
5 files changed, 237 insertions, 3 deletions
diff --git a/x11-misc/slim/ChangeLog b/x11-misc/slim/ChangeLog
index a8e3103b1849..7ba8ba23f57a 100644
--- a/x11-misc/slim/ChangeLog
+++ b/x11-misc/slim/ChangeLog
@@ -1,6 +1,17 @@
# ChangeLog for x11-misc/slim
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-misc/slim/ChangeLog,v 1.122 2013/10/23 18:05:57 axs Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-misc/slim/ChangeLog,v 1.123 2013/10/24 18:55:57 axs Exp $
+
+*slim-1.3.6-r3 (24 Oct 2013)
+
+ 24 Oct 2013; Ian Stakenvicius <axs@gentoo.org> +files/slim-1.3.6-config.diff,
+ +files/slim-1.3.6-session-chooser.patch,
+ +files/slim-1.3.6-systemd-session.patch, +slim-1.3.6-r3.ebuild,
+ -slim-1.3.6-r2.ebuild:
+ fixed regression for session-chooser (bug 489078), changed default session
+ list to be from xsession .desktop files, changed operation of -nodaemon and
+ slim.service to fix systemd session issue after multiple logins
+ (bugs.freedesktop.org/show_bug.cgi?id=62866)
*slim-1.3.6-r2 (23 Oct 2013)
diff --git a/x11-misc/slim/files/slim-1.3.6-config.diff b/x11-misc/slim/files/slim-1.3.6-config.diff
new file mode 100644
index 000000000000..9da6795cccfa
--- /dev/null
+++ b/x11-misc/slim/files/slim-1.3.6-config.diff
@@ -0,0 +1,77 @@
+--- slim.conf.orig 2010-08-25 11:52:23.000000000 -0400
++++ slim.conf 2010-08-25 11:58:58.000000000 -0400
+@@ -2,7 +2,7 @@
+ # Note: -xauth $authfile is automatically appended
+ default_path /bin:/usr/bin:/usr/local/bin
+ default_xserver /usr/bin/X
+-#xserver_arguments -dpi 75
++xserver_arguments -nolisten tcp -br -deferglyphs 16 vt07
+
+ # Commands for halt, login, etc.
+ halt_cmd /sbin/shutdown -h now
+@@ -18,7 +18,7 @@
+
+
+ # Activate numlock when slim starts. Valid values: on|off
+-# numlock on
++numlock on
+
+ # Hide the mouse cursor (note: does not work with some WMs).
+ # Valid values: true|false
+@@ -33,7 +33,8 @@
+ # to adjust the command according to your preferred shell,
+ # i.e. for freebsd use:
+ # login_cmd exec /bin/sh - ~/.xinitrc %session
+-login_cmd exec /bin/bash -login ~/.xinitrc %session
++# login_cmd exec /bin/bash -login ~/.xinitrc %session
++login_cmd exec /bin/bash -login /usr/share/slim/Xsession %session
+
+ # Commands executed when starting and exiting a session.
+ # They can be used for registering a X11 session with
+@@ -41,20 +42,30 @@
+ #
+ # sessionstart_cmd some command
+ # sessionstop_cmd some command
++sessionstart_cmd /usr/bin/sessreg -a -l :0.0 %user
++sessionstop_cmd /usr/bin/sessreg -d -l :0.0 %user
+
+ # Start in daemon mode. Valid values: yes | no
+ # Note that this can be overriden by the command line
+ # options "-d" and "-nodaemon"
+-# daemon yes
++daemon yes
+
+-# Available sessions (first one is the default).
+-# The current chosen session name is replaced in the login_cmd
++# Available sessions:
++# The current chosen session name replaces %session in the login_cmd
+ # above, so your login command can handle different sessions.
++# If no session is chosen (via F1), %session will be an empty string.
+ # see the xinitrc.sample file shipped with slim sources
+-sessions xfce4,icewm-session,wmaker,blackbox
++#sessions xfce4,icewm-session,wmaker,blackbox
++# Alternatively, read available sessions from a directory of scripts:
++#sessiondir /etc/X11/Sessions
++# Or, read available sessions from the xsessions desktop files --
++# note that this may provide a full path to the session executable!
++sessiondir /usr/share/xsessions
+
+-# Executed when pressing F11 (requires imagemagick)
++# Executed when pressing F11 (requires media-gfx/imagemagick for import)
++# Alternative is media-gfx/scrot. See Gentoo bug 252241 for more info.
+ screenshot_cmd import -window root /slim.png
++#screenshot_cmd scrot /root/slim.png
+
+ # welcome message. Available variables: %host, %domain
+ welcome_msg Welcome to %host
+@@ -83,8 +91,8 @@
+ # randomly choose from
+ current_theme default
+
+-# Lock file
+-lockfile /var/run/slim.lock
++# Lock file, /etc/init.d/xdm expects slim.pid
++lockfile /run/slim.pid
+
+ # Log file
+ logfile /var/log/slim.log
diff --git a/x11-misc/slim/files/slim-1.3.6-session-chooser.patch b/x11-misc/slim/files/slim-1.3.6-session-chooser.patch
new file mode 100644
index 000000000000..b43c9a307605
--- /dev/null
+++ b/x11-misc/slim/files/slim-1.3.6-session-chooser.patch
@@ -0,0 +1,115 @@
+--- a/cfg.cpp 2013-10-01 18:38:05.000000000 -0400
++++ b/cfg.cpp 2013-10-24 12:12:20.584103253 -0400
+@@ -274,14 +274,14 @@
+ while (true) {
+ string::const_iterator begin = s;
+ while (*s != c && s != str.end()) { ++s; }
+- tmp = string(begin, s);
+- if (useEmpty || tmp.size() > 0)
++ tmp = string(begin, s);
++ if (useEmpty || tmp.size() > 0)
+ v.push_back(tmp);
+ if (s == str.end()) {
+ break;
+ }
+ if (++s == str.end()) {
+- if (useEmpty)
++ if (useEmpty)
+ v.push_back("");
+ break;
+ }
+@@ -289,6 +289,7 @@
+ }
+
+ void Cfg::fillSessionList(){
++ string strSessionList = getOption("sessions");
+ string strSessionDir = getOption("sessiondir");
+
+ sessions.clear();
+@@ -307,29 +308,29 @@
+ struct stat oFileStat;
+
+ if (stat(strFile.c_str(), &oFileStat) == 0) {
+- if (S_ISREG(oFileStat.st_mode) &&
+- access(strFile.c_str(), R_OK) == 0){
+- ifstream desktop_file( strFile.c_str() );
+- if (desktop_file){
+- string line, session_name = "", session_exec = "";
+- while (getline( desktop_file, line )) {
+- if (line.substr(0, 5) == "Name=") {
+- session_name = line.substr(5);
+- if (!session_exec.empty())
+- break;
+- } else
+- if (line.substr(0, 5) == "Exec=") {
+- session_exec = line.substr(5);
+- if (!session_name.empty())
+- break;
+- }
+- }
+- desktop_file.close();
+- pair<string,string> session(session_name,session_exec);
+- sessions.push_back(session);
+- cout << session_exec << " - " << session_name << endl;
+- }
+-
++ if (S_ISREG(oFileStat.st_mode) &&
++ access(strFile.c_str(), R_OK) == 0){
++ ifstream desktop_file( strFile.c_str() );
++ if (desktop_file){
++ string line, session_name = "", session_exec = "";
++ while (getline( desktop_file, line )) {
++ if (line.substr(0, 5) == "Name=") {
++ session_name = line.substr(5);
++ if (!session_exec.empty()) break;
++ } else if (line.substr(0, 5) == "Exec=") {
++ session_exec = line.substr(5);
++ if (!session_name.empty()) break;
++ }
++ }
++ desktop_file.close();
++ if (!session_name.empty() && !session_exec.empty()) {
++ pair<string,string> session(session_name,session_exec);
++ sessions.push_back(session);
++ } else if (access(strFile.c_str(), X_OK) == 0) {
++ pair<string,string> session(string(pDirent->d_name),strFile);
++ sessions.push_back(session);
++ }
++ }
+ }
+ }
+ }
+@@ -338,8 +339,18 @@
+ }
+
+ if (sessions.empty()){
+- pair<string,string> session("","");
+- sessions.push_back(session);
++ if (strSessionList.empty()) {
++ pair<string,string> session("","");
++ sessions.push_back(session);
++ } else {
++ // iterate through the split of the session list
++ vector<string> sessit;
++ split(sessit,strSessionList,',',false);
++ for (vector<string>::iterator it = sessit.begin(); it != sessit.end(); ++it) {
++ pair<string,string> session(*it,*it);
++ sessions.push_back(session);
++ }
++ }
+ }
+ }
+
+--- a/app.cpp 2013-10-24 12:16:59.870111072 -0400
++++ b/app.cpp 2013-10-24 12:29:59.899132910 -0400
+@@ -377,10 +377,6 @@
+ LoginPanel->SetName(cfg->getOption("default_user") );
+ }
+
+- if (firstloop) {
+- LoginPanel->SwitchSession();
+- }
+-
+ if (!AuthenticateUser(focuspass && firstloop)){
+ panelclosed = 0;
+ firstloop = false;
diff --git a/x11-misc/slim/files/slim-1.3.6-systemd-session.patch b/x11-misc/slim/files/slim-1.3.6-systemd-session.patch
new file mode 100644
index 000000000000..0639aeb5f185
--- /dev/null
+++ b/x11-misc/slim/files/slim-1.3.6-systemd-session.patch
@@ -0,0 +1,29 @@
+--- a/app.cpp 2013-10-23 16:19:57.074100282 -0400
++++ b/app.cpp 2013-10-23 16:33:13.302122574 -0400
+@@ -829,8 +829,13 @@
+
+ StopServer();
+ RemoveLock();
+- while (waitpid(-1, NULL, WNOHANG) > 0); /* Collects all dead childrens */
+- Run();
++ if (force_nodaemon) {
++ delete LoginPanel;
++ exit(ERR_EXIT); /* use ERR_EXIT so that systemd's RESTART=on-failure works */
++ } else {
++ while (waitpid(-1, NULL, WNOHANG) > 0); /* Collects all dead childrens */
++ Run();
++ }
+ }
+
+ void App::KillAllClients(Bool top) {
+--- a/slim.service 2013-10-23 16:19:57.074100282 -0400
++++ b/slim.service 2013-10-23 16:45:14.901142776 -0400
+@@ -4,6 +4,7 @@
+
+ [Service]
+ ExecStart=/usr/bin/slim -nodaemon -s
++Restart=on-failure
+
+ [Install]
+ Alias=display-manager.service
+Common subdirectories: slim-1.3.6/themes and slim-1.3.6.new/themes
diff --git a/x11-misc/slim/slim-1.3.6-r2.ebuild b/x11-misc/slim/slim-1.3.6-r3.ebuild
index 4a0415343b1f..d8b2343968e4 100644
--- a/x11-misc/slim/slim-1.3.6-r2.ebuild
+++ b/x11-misc/slim/slim-1.3.6-r3.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-misc/slim/slim-1.3.6-r2.ebuild,v 1.1 2013/10/23 18:05:57 axs Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-misc/slim/slim-1.3.6-r3.ebuild,v 1.1 2013/10/24 18:55:57 axs Exp $
EAPI=5
@@ -35,12 +35,14 @@ PDEPEND="branding? ( >=x11-themes/slim-themes-1.2.3a-r3 )"
src_prepare() {
# Our Gentoo-specific config changes
- epatch "${FILESDIR}"/${PN}-1.3.4-config.diff
+ epatch "${FILESDIR}"/${P}-config.diff
epatch "${FILESDIR}"/${PN}-1.3.5-arm.patch
epatch "${FILESDIR}"/${P}-honour-cflags.patch
epatch "${FILESDIR}"/${P}-libslim-cmake-fixes.patch
epatch "${FILESDIR}"/${PN}-1.3.5-disable-ck-for-systemd.patch
epatch "${FILESDIR}"/${P}-strip-systemd-unit-install.patch
+ epatch "${FILESDIR}"/${P}-systemd-session.patch
+ epatch "${FILESDIR}"/${P}-session-chooser.patch
if use elibc_FreeBSD; then
sed -i -e 's/"-DHAVE_SHADOW"/"-DNEEDS_BASENAME"/' CMakeLists.txt \