diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 0000000..00373f2 --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,10 @@ +ulatencyd for Debian +-------------------- + +All rules are installed in + /etc/ulatencyd/rules + +The configuration of the scheduler as well as the scheduler itself are located +in the rules directory as well. + + -- poelzi Mon, 17 Jan 2011 21:11:33 +0100 diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..65bddbf --- /dev/null +++ b/debian/changelog @@ -0,0 +1,18 @@ +ulatencyd (0.3.5-1) unstable; urgency=low + + * new upstream version + + -- Daniel Poelzleithner Thu, 20 Jan 2011 11:47:19 +0100 + +ulatencyd (0.3.1-2) unstable; urgency=low + + * remove cmake file from docs + * add missing docs files + + -- Daniel Poelzleithner Tue, 18 Jan 2011 09:45:09 +0100 + +ulatencyd (0.3.1-1) unstable; urgency=low + + * Initial release + + -- Daniel Poelzleithner Mon, 17 Jan 2011 21:11:33 +0100 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..7f8f011 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +7 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..857b7a0 --- /dev/null +++ b/debian/control @@ -0,0 +1,28 @@ +Source: ulatencyd +Section: admin +Priority: extra +Maintainer: Daniel Poelzleithner +Build-Depends: debhelper (>= 7.0.50~), cmake, + libdbus-1-dev, liblua5.1-0-dev, libdbus-glib-1-dev, + libxcb1-dev, libxau-dev +Standards-Version: 3.8.4 +Homepage: https://github.com/poelzi/ulatencyd/ +#Vcs-Git: git://git.debian.org/collab-maint/ulatencyd.git +#Vcs-Browser: http://git.debian.org/?p=collab-maint/ulatencyd.git;a=summary + +Package: ulatencyd +Section: admin +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, liblua5.1-0, libglib2.0-0, + lua5.1, libdbus-glib-1-2, libxcb1, libxau6, liblua5.1-posix1 +Description: dynamic system optimizer for linux + ulatencyd optimizes the linux scheduler with modern techniques like cgroups + to result in a better user experience. Lower latency and protection against + common cases of memory shortage, also known as swap of death are one of the + primary focuses. + The rules and scheduler is written in lua for easly adjustment but can also + be enhanced with binary modules. + . + Modules include: + - xwatch : observes the local X-Server and markes the window in focus in focus + as active. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..d78ec72 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,50 @@ +This work was packaged for Debian by: + + poelzi on Mon, 17 Jan 2011 21:11:33 +0100 + +It was downloaded from: + + + +Upstream Author(s): + + + + +Copyright: + + + + +License: + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +On Debian systems, the complete text of the GNU General +Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". + +The Debian packaging is: + + Copyright (C) 2011 poelzi + +# Please chose a license for your packaging work. If the program you package +# uses a mainstream license, using the same license is the safest choice. +# Please avoid to pick license terms that are more restrictive than the +# packaged work, as it may make Debian's contributions unacceptable upstream. +# If you just want it to be GPL version 3, leave the following line in. + +and is licensed under the GPL version 3, see above. + +# Please also look if there are files or directories which have a +# different copyright/license attached and list them here. diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..86b5fae --- /dev/null +++ b/debian/docs @@ -0,0 +1,5 @@ +README +TODO +docs/RULES_HOWTO.txt +docs/architecture.dia +docs/architecture.svg diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..25741e2 --- /dev/null +++ b/debian/rules @@ -0,0 +1,18 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +%: + dh $@ --without dh_auto_test --parallel + +override_dh_auto_test: + echo "ship test" + + diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) diff --git a/debian/ulatencyd.default b/debian/ulatencyd.default new file mode 100644 index 0000000..6dac248 --- /dev/null +++ b/debian/ulatencyd.default @@ -0,0 +1,12 @@ +# Defaults for ulatencyd initscript +# sourced by /etc/init.d/ulatencyd +# installed at /etc/default/ulatencyd by the maintainer scripts + +# +# This is a POSIX shell fragment +# + +ENABLE_ULATENCYD="yes" + +# Additional options that are passed to the Daemon. +DAEMON_OPTS="" diff --git a/debian/ulatencyd.doc-base.EX b/debian/ulatencyd.doc-base.EX new file mode 100644 index 0000000..36549be --- /dev/null +++ b/debian/ulatencyd.doc-base.EX @@ -0,0 +1,20 @@ +Document: ulatencyd +Title: Debian ulatencyd Manual +Author: +Abstract: This manual describes what ulatencyd is + and how it can be used to + manage online manuals on Debian systems. +Section: unknown + +Format: debiandoc-sgml +Files: /usr/share/doc/ulatencyd/ulatencyd.sgml.gz + +Format: postscript +Files: /usr/share/doc/ulatencyd/ulatencyd.ps.gz + +Format: text +Files: /usr/share/doc/ulatencyd/ulatencyd.text.gz + +Format: HTML +Index: /usr/share/doc/ulatencyd/html/index.html +Files: /usr/share/doc/ulatencyd/html/*.html diff --git a/debian/ulatencyd.init b/debian/ulatencyd.init new file mode 100644 index 0000000..5ee2a0c --- /dev/null +++ b/debian/ulatencyd.init @@ -0,0 +1,159 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: skeleton +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Example initscript +# Description: This file should be used to construct scripts to be +# placed in /etc/init.d. +### END INIT INFO + +# Author: Foo Bar +# +# Please remove the "Author" lines above and replace them +# with your own name if you copy and modify this script. + +# Do NOT "set -e" + +# PATH should only include /usr/* if it runs after the mountnfs.sh script +PATH=/sbin:/usr/sbin:/bin:/usr/bin +DESC="ulatencyd" +NAME=ulatencyd +DAEMON=/usr/sbin/$NAME +DAEMON_ARGS="" +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/$NAME + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +# Read configuration variable file if it is present +[ -r /etc/default/$NAME ] && . /etc/default/$NAME + +# Load the VERBOSE setting and other rcS variables +. /lib/init/vars.sh + +# Define LSB log_* functions. +# Depend on lsb-base (>= 3.2-14) to ensure that this file is present +# and status_of_proc is working. +. /lib/lsb/init-functions + +# +# Function that starts the daemon/service +# +do_start() +{ + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ + || return 1 + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ + $DAEMON_ARGS \ + || return 2 + # Add code here, if necessary, that waits for the process to be ready + # to handle requests from services started subsequently which depend + # on this one. As a last resort, sleep for some time. +} + +# +# Function that stops the daemon/service +# +do_stop() +{ + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # 2 if daemon could not be stopped + # other if a failure occurred + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + # Wait for children to finish too if this is a daemon that forks + # and if the daemon is only ever run from this initscript. + # If the above conditions are not satisfied then add some other code + # that waits for the process to drop all resources that could be + # needed by services started subsequently. A last resort is to + # sleep for some time. + start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON + [ "$?" = 2 ] && return 2 + # Many daemons don't delete their pidfiles when they exit. + rm -f $PIDFILE + return "$RETVAL" +} + +# +# Function that sends a SIGHUP to the daemon/service +# +do_reload() { + # + # If the daemon can reload its configuration without + # restarting (for example, when it is sent a SIGHUP), + # then implement that here. + # + start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME + return 0 +} + +case "$1" in + start) + [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + stop) + [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + status) + status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? + ;; + #reload|force-reload) + # + # If do_reload() is not implemented then leave this commented out + # and leave 'force-reload' as an alias for 'restart'. + # + #log_daemon_msg "Reloading $DESC" "$NAME" + #do_reload + #log_end_msg $? + #;; + restart|force-reload) + # + # If the "reload" option is implemented then remove the + # 'force-reload' alias + # + log_daemon_msg "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_end_msg 1 ;; # Old process is still running + *) log_end_msg 1 ;; # Failed to start + esac + ;; + *) + # Failed to stop + log_end_msg 1 + ;; + esac + ;; + *) + #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 + exit 3 + ;; +esac + +: diff --git a/debian/ulatencyd.upstart b/debian/ulatencyd.upstart new file mode 100644 index 0000000..ff51253 --- /dev/null +++ b/debian/ulatencyd.upstart @@ -0,0 +1,30 @@ +# ulatencyd - latency reducing daemon for linux +# +# ulatencyd constantly optimizes the linux kernel for +# best user experience + +description "ulatencyd" + +start on filesystem +stop on runlevel [!2345] + +respawn +respawn limit 10 5 +umask 022 + +pre-start script + DEFAULTFILE=/etc/default/ulatencyd + if [ -f "$DEFAULTFILE" ]; then + . "$DEFAULTFILE" + fi + + if [ "x$ENABLE_ULATENCYD" != xyes ]; then + stop + exit 0 + fi + + test -x /usr/sbin/ulatencyd || { stop; exit 0; } + test -x /proc || { stop; exit 0; } +end script + +exec /usr/sbin/ulatencyd $DAEMON_OPTS \ No newline at end of file