summaryrefslogtreecommitdiffstats
path: root/test/slim
diff options
context:
space:
mode:
authortnut <thierryn1 at hispeed dot ch>2010-06-30 09:11:31 +0200
committertnut <thierryn1 at hispeed dot ch>2010-06-30 09:11:31 +0200
commit6b34c7c0613393049edcb782407b5293491796cf (patch)
tree831d3a6d1f5921fe3b9bbde7be12d12ac269c488 /test/slim
parentb863c93fc8329443e1cff089f22e9755e7df90d6 (diff)
downloadnutyx-pakxe-6b34c7c0613393049edcb782407b5293491796cf.tar.gz
nutyx-pakxe-6b34c7c0613393049edcb782407b5293491796cf.tar.bz2
nutyx-pakxe-6b34c7c0613393049edcb782407b5293491796cf.tar.xz
nutyx-pakxe-6b34c7c0613393049edcb782407b5293491796cf.zip
slim dans test
Diffstat (limited to 'test/slim')
-rw-r--r--test/slim/.footprint41
-rw-r--r--test/slim/.md5sum9
-rw-r--r--test/slim/Pkgfile45
-rw-r--r--test/slim/gcc44.patch12
-rwxr-xr-xtest/slim/post-install2
-rwxr-xr-xtest/slim/slim37
-rw-r--r--test/slim/slim-restart.patch141
-rw-r--r--test/slim/slim-tty-slowness.patch29
-rw-r--r--test/slim/slim.conf79
-rw-r--r--test/slim/stdlib.patch11
-rw-r--r--test/slim/xinitrc108
11 files changed, 514 insertions, 0 deletions
diff --git a/test/slim/.footprint b/test/slim/.footprint
new file mode 100644
index 000000000..a4ad32a45
--- /dev/null
+++ b/test/slim/.footprint
@@ -0,0 +1,41 @@
+drwxr-xr-x root/root etc/
+drwxr-xr-x root/root etc/rc.d/
+drwxr-xr-x root/root etc/rc.d/init.d/
+-rwxr-xr-x root/root etc/rc.d/init.d/slim
+drwxr-xr-x root/root etc/rc.d/rc0.d/
+lrwxrwxrwx root/root etc/rc.d/rc0.d/K10slim -> ../init.d/slim
+drwxr-xr-x root/root etc/rc.d/rc1.d/
+lrwxrwxrwx root/root etc/rc.d/rc1.d/K10slim -> ../init.d/slim
+drwxr-xr-x root/root etc/rc.d/rc2.d/
+lrwxrwxrwx root/root etc/rc.d/rc2.d/K10slim -> ../init.d/slim
+drwxr-xr-x root/root etc/rc.d/rc3.d/
+lrwxrwxrwx root/root etc/rc.d/rc3.d/S40slim -> ../init.d/slim
+drwxr-xr-x root/root etc/rc.d/rc4.d/
+lrwxrwxrwx root/root etc/rc.d/rc4.d/K10slim -> ../init.d/slim
+drwxr-xr-x root/root etc/rc.d/rc5.d/
+lrwxrwxrwx root/root etc/rc.d/rc5.d/K10slim -> ../init.d/slim
+drwxr-xr-x root/root etc/rc.d/rc6.d/
+lrwxrwxrwx root/root etc/rc.d/rc6.d/K10slim -> ../init.d/slim
+drwxr-xr-x root/root etc/skel/
+-rw-r--r-- root/root etc/slim.conf
+-rw-r--r-- root/root etc/slim.xinitrc
+drwxr-xr-x root/root usr/
+drwxr-xr-x root/root usr/bin/
+-rwxr-xr-x root/root usr/bin/slim
+drwxr-xr-x root/root usr/share/
+drwxr-xr-x root/root usr/share/man/
+drwxr-xr-x root/root usr/share/man/man1/
+-rw-r--r-- root/root usr/share/man/man1/slim.1.gz
+drwxr-xr-x root/root usr/share/slim/
+drwxr-xr-x root/root usr/share/slim/themes/
+drwxr-xr-x root/root usr/share/slim/themes/default/
+-rw-r--r-- root/root usr/share/slim/themes/default/background.jpg
+-rw-r--r-- root/root usr/share/slim/themes/default/panel.png
+-rw-r--r-- root/root usr/share/slim/themes/default/slim.theme
+drwxr-xr-x root/root usr/share/slim/themes/slim-nutyx/
+-rw-r--r-- root/root usr/share/slim/themes/slim-nutyx/COPYING
+-rw-r--r-- root/root usr/share/slim/themes/slim-nutyx/COPYRIGHT.background
+-rw-r--r-- root/root usr/share/slim/themes/slim-nutyx/COPYRIGHT.panel
+-rw-r--r-- root/root usr/share/slim/themes/slim-nutyx/background.png
+-rw-r--r-- root/root usr/share/slim/themes/slim-nutyx/panel.png
+-rw-r--r-- root/root usr/share/slim/themes/slim-nutyx/slim.theme
diff --git a/test/slim/.md5sum b/test/slim/.md5sum
new file mode 100644
index 000000000..7f511d8cf
--- /dev/null
+++ b/test/slim/.md5sum
@@ -0,0 +1,9 @@
+87a3a022fa1d6dfe460c2989de1da5db gcc44.patch
+f7e9ef62e3d4c8e3e85865c0a169fc5f slim
+727d0acb24c0fbf0751134c37a9c895f slim-1.3.1.tar.gz
+648d871fe7d2a97b7d7b928019e2feee slim-restart.patch
+be48f19a2e2f154bed750171e8d0fc7f slim-tty-slowness.patch
+d0c5fd4f91c385cc23c35f981ac2c695 slim.conf
+fdfe21bf4e734d7bdcdcd827b7e13585 slimnutyx-2009.2.tar.gz
+9143a67ce78ca11a7e811138859ad54f stdlib.patch
+ab0b73ade8884ddc24006cfcf03955bf xinitrc
diff --git a/test/slim/Pkgfile b/test/slim/Pkgfile
new file mode 100644
index 000000000..a7d97d0f4
--- /dev/null
+++ b/test/slim/Pkgfile
@@ -0,0 +1,45 @@
+# Description: Gestionnaire de sessions tres configurable
+# URL: http://slim.berlios.de
+# Maintainer: NuTyX core team
+# Packager: thierryn1 at hispeed dot ch
+# Depends on: xorg, expat, libjpeg, libpng
+
+name=slim
+version=1.3.1
+release=4
+source=(http://download.berlios.de/$name/$name-$version.tar.gz\
+ http://kiao.no-ip.info/NuTyX/files/slimnutyx-2009.2.tar.gz
+ stdlib.patch xinitrc gcc44.patch slim-restart.patch\
+ slim slim.conf slim-tty-slowness.patch)
+
+build() {
+ cd $name-$version
+ patch -Np1 -i ../slim-tty-slowness.patch
+ patch -Np1 -i ../gcc44.patch
+ patch -Np1 -i ../slim-restart.patch
+ sed -i -e 's/png12/png14/g' Makefile
+ make
+ sed -i "s|/usr/X11R6/include|/usr/include/xorg|g" slim.conf
+ sed -i "s|/usr/X11R6/|/usr/|g" slim.conf
+ make DESTDIR=$PKG install
+ mv $SRC/slim-nutyx \
+ $PKG/usr/share/slim/themes/
+ mkdir -p $PKG/etc/skel
+ install -m644 ../slim.conf $PKG/etc/slim.conf
+ install -m644 ../xinitrc $PKG/etc/slim.xinitrc
+ mkdir -p $PKG/etc/rc.d/init.d
+ mkdir -p $PKG/etc/rc.d/rc{0,1,2,3,4,5,6}.d
+ install -D -m755 -o root -g root ../slim $PKG/etc/rc.d/init.d
+ for i in rc3.d;
+ do
+ ln -s ../init.d/slim $PKG/etc/rc.d/$i/S40slim
+ done
+ for i in rc{0,1,2,4,5,6}.d;
+ do
+ ln -s ../init.d/slim $PKG/etc/rc.d/$i/K10slim
+ done
+ mv $PKG/usr/man \
+ $PKG/usr/share
+ sed -i 's@/var/run/slim.lock@/var/lock/slim.lock@' $PKG/etc/slim.conf
+ chown -R root:root $PKG/usr/share/slim/themes
+}
diff --git a/test/slim/gcc44.patch b/test/slim/gcc44.patch
new file mode 100644
index 000000000..83d9f99ec
--- /dev/null
+++ b/test/slim/gcc44.patch
@@ -0,0 +1,12 @@
+diff -ru slim-1.3.1/switchuser.h slim-patched/switchuser.h
+--- slim-1.3.1/switchuser.h 2008-11-11 19:40:18.000000000 +0000
++++ slim-patched/switchuser.h 2008-11-11 19:40:28.000000000 +0000
+@@ -18,6 +18,7 @@
+ #include <pwd.h>
+ #include <grp.h>
+ #include <paths.h>
++#include <cstdio>
+ #include <iostream>
+ #include "const.h"
+ #include "cfg.h"
+
diff --git a/test/slim/post-install b/test/slim/post-install
new file mode 100755
index 000000000..eae03d54b
--- /dev/null
+++ b/test/slim/post-install
@@ -0,0 +1,2 @@
+#!/bin/bash
+sed -i "s/^id:[3-5]/id:3/" /etc/inittab
diff --git a/test/slim/slim b/test/slim/slim
new file mode 100755
index 000000000..428d1982b
--- /dev/null
+++ b/test/slim/slim
@@ -0,0 +1,37 @@
+#!/bin/sh
+# Begin $rc_base/init.d/slim
+
+# $Id: $
+
+. /etc/sysconfig/rc
+. $rc_functions
+lockfile=$(grep lockfile /etc/slim.conf |tr -s " " | cut -d" " -f2)
+pid=$(pidof -o %PPID /usr/X11R6/bin/X)
+
+
+case "$1" in
+ start)
+ boot_mesg "Starting Simple Login Manager"
+ loadproc /usr/bin/slim -d
+ ;;
+ stop)
+ boot_mesg "Stopping Simple Login Manager"
+ if [ -f $lockfile ]; then
+ rm $lockfile
+ fi
+ [ ! -z "$pid" ] && kill $pid >/dev/null 2>&1
+ if [ $? -gt 0 ]; then
+ killproc /usr/bin/slim
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 3
+ $0 start
+ ;;
+ *)
+ echo "Usage: $0 start|stop|restart"
+ ;;
+esac
+
+# End of file
diff --git a/test/slim/slim-restart.patch b/test/slim/slim-restart.patch
new file mode 100644
index 000000000..1f9c02dff
--- /dev/null
+++ b/test/slim/slim-restart.patch
@@ -0,0 +1,141 @@
+diff -ur slim-1.3.1.orig/app.cpp slim-1.3.1/app.cpp
+--- slim-1.3.1.orig/app.cpp 2008-09-26 02:54:15.000000000 +0200
++++ slim-1.3.1/app.cpp 2008-11-21 20:38:48.000000000 +0100
+@@ -102,6 +102,11 @@
+
+ extern App* LoginApp;
+
++int xioerror(Display *disp) {
++ LoginApp->RestartServer();
++ return 0;
++}
++
+ void CatchSignal(int sig) {
+ cerr << APPNAME << ": unexpected signal " << sig << endl;
+ LoginApp->StopServer();
+@@ -109,19 +114,6 @@
+ exit(ERR_EXIT);
+ }
+
+-
+-void AlarmSignal(int sig) {
+- int pid = LoginApp->GetServerPID();
+- if(waitpid(pid, NULL, WNOHANG) == pid) {
+- LoginApp->StopServer();
+- LoginApp->RemoveLock();
+- exit(OK_EXIT);
+- }
+- signal(sig, AlarmSignal);
+- alarm(2);
+-}
+-
+-
+ void User1Signal(int sig) {
+ signal(sig, User1Signal);
+ }
+@@ -267,7 +259,6 @@
+ signal(SIGHUP, CatchSignal);
+ signal(SIGPIPE, CatchSignal);
+ signal(SIGUSR1, User1Signal);
+- signal(SIGALRM, AlarmSignal);
+
+ #ifndef XNEST_DEBUG
+ OpenLog();
+@@ -287,7 +278,6 @@
+
+ CreateServerAuth();
+ StartServer();
+- alarm(2);
+ #endif
+
+ }
+@@ -603,6 +593,8 @@
+ int status;
+ while (wpid != pid) {
+ wpid = wait(&status);
++ if (wpid == ServerPID)
++ xioerror(Dpy); // Server died, simulate IO error
+ }
+ if (WIFEXITED(status) && WEXITSTATUS(status)) {
+ LoginPanel->Message("Failed to execute login command");
+@@ -648,9 +640,6 @@
+
+
+ void App::Reboot() {
+- // Stop alarm clock
+- alarm(0);
+-
+ #ifdef USE_PAM
+ try{
+ pam.end();
+@@ -673,9 +662,6 @@
+
+
+ void App::Halt() {
+- // Stop alarm clock
+- alarm(0);
+-
+ #ifdef USE_PAM
+ try{
+ pam.end();
+@@ -761,6 +747,7 @@
+
+ StopServer();
+ RemoveLock();
++ while (waitpid(-1, NULL, WNOHANG) > 0); // Collects all dead childrens
+ Run();
+ }
+
+@@ -831,6 +818,7 @@
+
+ for(cycles = 0; cycles < ncycles; cycles++) {
+ if((Dpy = XOpenDisplay(DisplayName))) {
++ XSetIOErrorHandler(xioerror);
+ return 1;
+ } else {
+ if(!ServerTimeout(1, (char *) "X server to begin accepting connections"))
+@@ -913,9 +901,6 @@
+ ServerPID = -1;
+ break;
+ }
+- alarm(15);
+- pause();
+- alarm(0);
+
+ // Wait for server to start up
+ if(WaitForServer() == 0) {
+@@ -948,15 +933,12 @@
+
+
+ void App::StopServer() {
+- // Stop alars clock and ignore signals
+- alarm(0);
+ signal(SIGQUIT, SIG_IGN);
+ signal(SIGINT, SIG_IGN);
+ signal(SIGHUP, SIG_IGN);
+ signal(SIGPIPE, SIG_IGN);
+ signal(SIGTERM, SIG_DFL);
+ signal(SIGKILL, SIG_DFL);
+- signal(SIGALRM, SIG_DFL);
+
+ // Catch X error
+ XSetIOErrorHandler(IgnoreXIO);
+diff -ur slim-1.3.1.orig/app.h slim-1.3.1/app.h
+--- slim-1.3.1.orig/app.h 2008-09-26 02:54:15.000000000 +0200
++++ slim-1.3.1/app.h 2008-11-21 20:38:48.000000000 +0100
+@@ -34,6 +34,7 @@
+ ~App();
+ void Run();
+ int GetServerPID();
++ void RestartServer();
+ void StopServer();
+
+ // Lock functions
+@@ -48,7 +49,6 @@
+ void Console();
+ void Exit();
+ void KillAllClients(Bool top);
+- void RestartServer();
+ void ReadConfig();
+ void OpenLog();
+ void CloseLog();
diff --git a/test/slim/slim-tty-slowness.patch b/test/slim/slim-tty-slowness.patch
new file mode 100644
index 000000000..1f1f2e166
--- /dev/null
+++ b/test/slim/slim-tty-slowness.patch
@@ -0,0 +1,29 @@
+--- slim-1.3.1.orig/app.cpp 2009-01-13 11:30:36.000000000 +0900
++++ slim-1.3.1/app.cpp 2009-01-13 11:32:27.000000000 +0900
+@@ -270,21 +270,22 @@
+ signal(SIGALRM, AlarmSignal);
+
+ #ifndef XNEST_DEBUG
+- OpenLog();
+-
+ if (!force_nodaemon && cfg->getOption("daemon") == "yes") {
+ daemonmode = true;
+ }
+
+ // Daemonize
+ if (daemonmode) {
+- if (daemon(0, 1) == -1) {
++ if (daemon(0, 0) == -1) {
+ cerr << APPNAME << ": " << strerror(errno) << endl;
+ exit(ERR_EXIT);
+ }
+- UpdatePid();
+ }
+
++ OpenLog();
++
++ if (daemonmode) UpdatePid();
++
+ CreateServerAuth();
+ StartServer();
+ alarm(2);
diff --git a/test/slim/slim.conf b/test/slim/slim.conf
new file mode 100644
index 000000000..8cf5cc460
--- /dev/null
+++ b/test/slim/slim.conf
@@ -0,0 +1,79 @@
+# Path, X server and arguments (if needed)
+# Note: -xauth $authfile is automatically appended
+default_path ./:/bin:/usr/bin:/usr/local/bin:/usr/bin
+default_xserver /usr/bin/X
+#xserver_arguments -dpi 75
+
+# Commands for halt, login, etc.
+halt_cmd /sbin/shutdown -h now
+reboot_cmd /sbin/shutdown -r now
+console_cmd /usr/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue; exec /bin/login"
+#suspend_cmd /usr/sbin/suspend
+
+# Full path to the xauth binary
+xauth_path /usr/bin/xauth
+
+# Xauth file for server
+authfile /var/run/slim.auth
+
+
+# Activate numlock when slim starts. Valid values: on|off
+# numlock on
+
+# Hide the mouse cursor (note: does not work with some WMs).
+# Valid values: true|false
+# hidecursor false
+
+# This command is executed after a succesful login.
+# you can place the %session and %theme variables
+# to handle launching of specific commands in .xinitrc
+# depending of chosen session and slim theme
+#
+# NOTE: if your system does not have bash you need
+# 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
+
+# Commands executed when starting and exiting a session.
+# They can be used for registering a X11 session with
+# sessreg. You can use the %user variable
+#
+# sessionstart_cmd some command
+# sessionstop_cmd some command
+
+# Start in daemon mode. Valid values: yes | no
+# Note that this can overridden by the command line
+# option "-d"
+# daemon yes
+
+# Available sessions (first one is the default).
+# The current chosen session name is replaced in the login_cmd
+# above, so your login command can handle different sessions.
+# see the xinitrc.sample file shipped with slim sources
+sessions twm,fvwm,jwm,lxde,blackbox,openbox,fluxbox,xfce4,gnome,icewm,wmaker,twindy,e16,ede,mwm
+
+# Executed when pressing F11 (requires imagemagick)
+screenshot_cmd import -window root /slim.png
+
+# welcome message. Available variables: %host, %domain
+welcome_msg Welcome to %host
+
+# shutdown / reboot messages
+shutdown_msg The system is halting...
+reboot_msg The system is rebooting...
+
+# default user, leave blank or remove this line
+# for avoid pre-loading the username.
+#default_user simone
+
+# current theme, use comma separated list to specify a set to
+# randomly choose from
+current_theme slim-nutyx
+
+# Lock file
+lockfile /var/lock/slim.lock
+
+# Log file
+logfile /var/log/slim.log
+
diff --git a/test/slim/stdlib.patch b/test/slim/stdlib.patch
new file mode 100644
index 000000000..855b110dd
--- /dev/null
+++ b/test/slim/stdlib.patch
@@ -0,0 +1,11 @@
+--- cfg.cpp.orig 2008-04-21 00:36:08.000000000 -0700
++++ cfg.cpp 2008-04-21 00:37:01.000000000 -0700
+@@ -11,6 +11,7 @@
+ #include <fstream>
+ #include <string>
+ #include <iostream>
++#include <cstdlib>
+ #include <unistd.h>
+
+ #include <sys/types.h>
+
diff --git a/test/slim/xinitrc b/test/slim/xinitrc
new file mode 100644
index 000000000..62f4d752d
--- /dev/null
+++ b/test/slim/xinitrc
@@ -0,0 +1,108 @@
+# $Id: xinitrc,v 1.4 2008/05/13 17:33:40 install Exp install $
+# the following variable defines the session which is started if the user
+# doesn't explicitely select a session
+DEFAULT_SESSION=startede
+
+case $1 in
+xfce4)
+ exec startxfce4
+ ;;
+ede)
+ if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
+ eval `dbus-launch --sh-syntax --exit-with-session`
+ export DBUS_SESSION_BUS_ADDRESS
+ fi
+ exec startede
+ ;;
+
+openbox)
+ if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
+ eval `dbus-launch --sh-syntax --exit-with-session`
+ export DBUS_SESSION_BUS_ADDRESS
+ fi
+ exec openbox-session
+ ;;
+lxde)
+ if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
+ eval `dbus-launch --sh-syntax --exit-with-session`
+ export DBUS_SESSION_BUS_ADDRESS
+ fi
+ exec startlxde
+ ;;
+e16)
+ if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
+ eval `dbus-launch --sh-syntax --exit-with-session`
+ export DBUS_SESSION_BUS_ADDRESS
+ fi
+ exec starte16
+ ;;
+fluxbox)
+ if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
+ eval `dbus-launch --sh-syntax --exit-with-session`
+ export DBUS_SESSION_BUS_ADDRESS
+ fi
+ exec startfluxbox
+ ;;
+twindy)
+ if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
+ eval `dbus-launch --sh-syntax --exit-with-session`
+ export DBUS_SESSION_BUS_ADDRESS
+ fi
+ exec twindy
+ ;;
+fvwm)
+ if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
+ eval `dbus-launch --sh-syntax --exit-with-session`
+ export DBUS_SESSION_BUS_ADDRESS
+ fi
+ exec fvwm
+ ;;
+jwm)
+ if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
+ eval `dbus-launch --sh-syntax --exit-with-session`
+ export DBUS_SESSION_BUS_ADDRESS
+ fi
+ exec jwm
+ ;;
+twm)
+ if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
+ eval `dbus-launch --sh-syntax --exit-with-session`
+ export DBUS_SESSION_BUS_ADDRESS
+ fi
+ exec twm
+ ;;
+icewm)
+ if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
+ eval `dbus-launch --sh-syntax --exit-with-session`
+ export DBUS_SESSION_BUS_ADDRESS
+ fi
+ icewmbg &
+ icewmtray &
+ exec icewm
+ ;;
+wmaker)
+ if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
+ eval `dbus-launch --sh-syntax --exit-with-session`
+ export DBUS_SESSION_BUS_ADDRESS
+ fi
+ exec wmaker
+ ;;
+blackbox)
+ if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
+ eval `dbus-launch --sh-syntax --exit-with-session`
+ export DBUS_SESSION_BUS_ADDRESS
+ fi
+ exec blackbox
+ ;;
+gnome)
+ exec gnome-session
+ exec dbus-launch --exit-with-session gnome-session
+ ;;
+mwm)
+ exec mwm
+ ;;
+*)
+ exec $DEFAULT_SESSION
+ ;;
+esac
+