From 36b37980fbcbec98825654738c4c827324251fe0 Mon Sep 17 00:00:00 2001 From: Jeremy Olexa Date: Tue, 24 Aug 2010 15:30:18 +0000 Subject: Revision bump which should improve shutdown behavior by patching a SIGTERM issue and changing the pid file to slim.pid instead of slim.lock. Thanks to Grygoriy I. Fuchedzhy and others in bug 261359 (Portage version: 2.1.8.3/cvs/Linux x86_64) --- x11-misc/slim/ChangeLog | 11 ++- .../slim/files/261359-fix-SIGTERM-freeze.patch | 48 +++++++++++ x11-misc/slim/files/slim-1.3.2-r1-config.diff | 68 +++++++++++++++ x11-misc/slim/slim-1.3.2-r1.ebuild | 99 ++++++++++++++++++++++ 4 files changed, 225 insertions(+), 1 deletion(-) create mode 100644 x11-misc/slim/files/261359-fix-SIGTERM-freeze.patch create mode 100644 x11-misc/slim/files/slim-1.3.2-r1-config.diff create mode 100644 x11-misc/slim/slim-1.3.2-r1.ebuild (limited to 'x11-misc/slim') diff --git a/x11-misc/slim/ChangeLog b/x11-misc/slim/ChangeLog index e2fd87c15d4f..f31586a26b79 100644 --- a/x11-misc/slim/ChangeLog +++ b/x11-misc/slim/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for x11-misc/slim # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-misc/slim/ChangeLog,v 1.51 2010/07/31 02:58:39 darkside Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-misc/slim/ChangeLog,v 1.52 2010/08/24 15:30:18 darkside Exp $ + +*slim-1.3.2-r1 (24 Aug 2010) + + 24 Aug 2010; Jeremy Olexa + +files/261359-fix-SIGTERM-freeze.patch, +slim-1.3.2-r1.ebuild, + +files/slim-1.3.2-r1-config.diff: + Revision bump which should improve shutdown behavior by patching a SIGTERM + issue and changing the pid file to slim.pid instead of slim.lock. Thanks + to Grygoriy I. Fuchedzhy and others in bug 261359 *slim-1.3.2 (31 Jul 2010) diff --git a/x11-misc/slim/files/261359-fix-SIGTERM-freeze.patch b/x11-misc/slim/files/261359-fix-SIGTERM-freeze.patch new file mode 100644 index 000000000000..b3d1ab10b2d8 --- /dev/null +++ b/x11-misc/slim/files/261359-fix-SIGTERM-freeze.patch @@ -0,0 +1,48 @@ +https://bugs.gentoo.org/show_bug.cgi?id=261359 +http://developer.berlios.de/bugs/?func=detailbug&bug_id=15326&group_id=2663 + +diff --git a/panel.cpp b/panel.cpp +index 032574d..075c008 100644 +--- a/panel.cpp ++++ b/panel.cpp +@@ -10,6 +10,7 @@ + */ + + #include ++#include + #include "panel.h" + + using namespace std; +@@ -288,16 +289,24 @@ void Panel::EventHandler(const Panel::FieldType& curfield) { + field=curfield; + bool loop = true; + OnExpose(); ++ ++ struct pollfd x11_pfd = {0}; ++ x11_pfd.fd = ConnectionNumber(Dpy); ++ x11_pfd.events = POLLIN; + while(loop) { +- XNextEvent(Dpy, &event); +- switch(event.type) { +- case Expose: +- OnExpose(); +- break; ++ if(XPending(Dpy) || poll(&x11_pfd, 1, -1) > 0) { ++ while(XPending(Dpy)) { ++ XNextEvent(Dpy, &event); ++ switch(event.type) { ++ case Expose: ++ OnExpose(); ++ break; + +- case KeyPress: +- loop=OnKeyPress(event); +- break; ++ case KeyPress: ++ loop=OnKeyPress(event); ++ break; ++ } ++ } + } + } + diff --git a/x11-misc/slim/files/slim-1.3.2-r1-config.diff b/x11-misc/slim/files/slim-1.3.2-r1-config.diff new file mode 100644 index 000000000000..dd5a21cbc2a3 --- /dev/null +++ b/x11-misc/slim/files/slim-1.3.2-r1-config.diff @@ -0,0 +1,68 @@ +--- slim.conf.orig 2010-08-24 10:18:52.344180981 -0500 ++++ slim.conf 2010-08-24 10:22:20.311234197 -0500 +@@ -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 + + # 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 /etc/X11/xinit/xinitrc + + # Commands executed when starting and exiting a session. + # They can be used for registering a X11 session with +@@ -41,11 +42,13 @@ + # + # 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 +@@ -53,8 +56,10 @@ + # see the xinitrc.sample file shipped with slim sources + sessions xfce4,icewm,wmaker,blackbox + +-# 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 +88,8 @@ + # randomly choose from + current_theme default + +-# Lock file +-lockfile /var/run/slim.lock ++# Lock file, /etc/init.d/xdm expects slim.pid ++lockfile /var/run/slim.pid + + # Log file + logfile /var/log/slim.log diff --git a/x11-misc/slim/slim-1.3.2-r1.ebuild b/x11-misc/slim/slim-1.3.2-r1.ebuild new file mode 100644 index 000000000000..5a4b8a8da879 --- /dev/null +++ b/x11-misc/slim/slim-1.3.2-r1.ebuild @@ -0,0 +1,99 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-misc/slim/slim-1.3.2-r1.ebuild,v 1.1 2010/08/24 15:30:18 darkside Exp $ + +EAPI=2 + +inherit toolchain-funcs pam eutils + +DESCRIPTION="Simple Login Manager" +HOMEPAGE="http://slim.berlios.de" +SRC_URI="mirror://berlios/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="branding screenshot pam" + +RDEPEND="x11-libs/libXmu + x11-libs/libX11 + x11-libs/libXpm + x11-libs/libXft + media-libs/libpng + media-libs/jpeg + x11-apps/sessreg + pam? ( virtual/pam )" +DEPEND="${RDEPEND} + dev-util/pkgconfig + x11-proto/xproto" +PDEPEND="branding? ( >=x11-themes/slim-themes-1.2.3a-r3 )" + +src_prepare() { + # respect C[XX]FLAGS, fix crosscompile, + # fix linking order for --as-needed" + sed -i -e "s:^CXX=.*:CXX=$(tc-getCXX) ${CXXFLAGS}:" \ + -e "s:^CC=.*:CC=$(tc-getCC) ${CFLAGS}:" \ + -e "s:^MANDIR=.*:MANDIR=/usr/share/man:" \ + -e "s:^\t\(.*\)\ \$(LDFLAGS)\ \(.*\):\t\1\ \2\ \$(LDFLAGS):g" \ + -e "s:-I/usr/include/libpng12:$(pkg-config --cflags-only-I libpng):" \ + -e "s:-lpng12:$(pkg-config --libs-only-l libpng):" \ + -r -e "s:^LDFLAGS=(.*):LDFLAGS=\1 ${LDFLAGS}:" \ + Makefile || die "sed failed in Makefile" + # Our Gentoo-specific config changes + epatch "${FILESDIR}/${PN}-1.3.2-r1-config.diff" + + if use branding; then + sed -i -e 's/ default/ slim-gentoo-simple/' slim.conf || die + fi + + # Gentoo bug 297655 + epatch "${FILESDIR}/14509-fix-keyboard-in-tty-from-which-${PN}-is-lauched.patch" + # Upstream bug #15287 + epatch "${FILESDIR}/15287-fix-pam-authentication-with-pam_unix2.patch" + # Gentoo Bug 261713 + epatch "${FILESDIR}/261713-restart-xserver-if-killed.patch" + # Gentoo bug 261359, upstream 15326 + epatch "${FILESDIR}/261359-fix-SIGTERM-freeze.patch" +} + +src_compile() { + if use pam ; then + emake USE_PAM=1 || die "emake failed." + else + emake || die "emake failed." + fi +} + +src_install() { + if use pam ; then + emake USE_PAM=1 DESTDIR="${D}" install || die "emake install failed." + pamd_mimic_system slim auth account password session + else + emake DESTDIR="${D}" install || die "emake install failed." + fi + + insinto /etc/logrotate.d + newins "${FILESDIR}/slim.logrotate" slim || die "newins failed" + + dodoc xinitrc.sample ChangeLog README TODO THEMES +} + +pkg_postinst() { + elog + elog "The configuration file is located at /etc/slim.conf." + elog + elog "If you wish ${PN} to start automatically, set DISPLAYMANAGER=\"${PN}\" " + elog "in /etc/conf.d/xdm and run \"rc-update add xdm default\"." + elog "By default, ${PN} will use default XSESSION value set in /etc/rc.conf." + elog + elog "If you want to use .xinitrc in the user's home directory for session" + elog "management instead, see README and xinitrc.sample in" + elog "/usr/share/doc/${PF} and change your login_cmd in /etc/slim.conf" + elog "accordingly." + elog + if ! use pam; then + elog "You have merged ${PN} without USE=pam, this will cause ${PN} to fall back to" + elog "the console when restarting your window manager. If this is not" + elog "desired, then please remerge ${PN} with USE=pam" + fi +} -- cgit v1.2.3-65-gdbad