debian/0000755000000000000000000000000012247420111007160 5ustar debian/source/0000755000000000000000000000000012246100274010464 5ustar debian/source/format0000644000000000000000000000001411546426237011706 0ustar 3.0 (quilt) debian/control0000644000000000000000000000152412247417263010603 0ustar Source: downtimed Section: admin Priority: extra Maintainer: Mats Erik Andersson Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.15.7) Standards-Version: 3.9.5 Homepage: http://dist.epipe.com/downtimed/ Vcs-Svn: svn://anonscm.debian.org/collab-maint/deb-maint/downtimed/trunk/ Vcs-Browser: http://anonscm.debian.org/viewvc/collab-maint/deb-maint/downtimed/trunk/ Package: downtimed Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base (>= 3.2-14) Description: monitor of downtime, shutdown, and crashes Downtimed is a daemon intended to monitor and record the times an operating system is non-functional. It does this by keeping a simple databas file and by regularly recording time stamps. A client executable reads the database to account for the lengths of periods when the system was down. debian/downtimed.docs0000644000000000000000000000001411546426237012037 0ustar README TODO debian/downtimed.dirs0000644000000000000000000000002211546426237012047 0ustar var/lib/downtimed debian/compat0000644000000000000000000000000212247417275010377 0ustar 9 debian/downtimed.lintian-overrides0000644000000000000000000000021612006243310014526 0ustar # /usr/sbin is accessed only at start to access the binary. init.d-script-missing-dependency-on-remote_fs etc/init.d/downtimed: required-stop debian/rules0000755000000000000000000000041512006243310010235 0ustar #!/usr/bin/make -f CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS) CFLAGS = $(shell dpkg-buildflags --get CFLAGS) LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS) export CPPFLAGS CFLAGS LDFLAGS %: dh $@ override_dh_installchangelogs: dh_installchangelogs NEWS debian/patches/0000755000000000000000000000000012246100274010613 5ustar debian/patches/series0000644000000000000000000000006212246046670012037 0ustar 01-usage_strings.diff 02-tell_about_downtime.diff debian/patches/02-tell_about_downtime.diff0000644000000000000000000000301112245742214015724 0ustar Description: Make the call downtime(1) visible. The upstream manpage downtimes(1) contains information on the alternate call downtime(1), but this text is escaped in the original source. Activate this text. . Two minor syntactical changes are made in passing. Author: Mats Erik Andersson Forwarded: yes Last-Update: 2013-11-28 --- downtimed-0.6/downtimes.1.orig 2013-07-27 16:53:13.000000000 +0200 +++ downtimed-0.6/downtimes.1 2013-11-28 23:30:57.000000000 +0100 @@ -21,22 +21,22 @@ .IR sleep \|] .RB [\| \-u \|] .br -.\".B downtime -.\".RB [\| \-d -.\".IR downtimedbfile \|] -.\".RB [\| \-f -.\".IR timefmt \|] -.\".RB [\| \-n -.\".IR num \|] -.\".RB [\| \-s -.\".IR sleep \|] -.\".RB [\| \-u \|] -.\".br .B downtimes .B \-v -.\".br -.\".B downtime -.\".B \-v +.br +.B downtime +.RB [\| \-d +.IR downtimedbfile \|] +.RB [\| \-f +.IR timefmt \|] +.RB [\| \-n +.IR num \|] +.RB [\| \-s +.IR sleep \|] +.RB [\| \-u \|] +.br +.B downtime +.B \-v .SH DESCRIPTION The .B downtimes @@ -44,12 +44,12 @@ format. The downtime database is maintained by .BR downtimed (8). .PP -.\"The singular form -.\".B downtime -.\"displays only details about the last time the system was down where -.\"as the plural form -.\".B downtimes -.\"displays all the records in the database. +The singular form +.B downtime +displays details only about the last time the system was down, +whereas the plural form +.B downtimes +displays all records in the database. The .B \-n option can be used to specify the number of downtime debian/patches/01-usage_strings.diff0000644000000000000000000000222412246046553014551 0ustar Description: Forgotten update of usage strings. The executables downtimed(8) and downtimes(1) have gained the ability to change format string in a command line option. The executables' usage texts did not reflect this ability. Author: Mats Erik Andersson Forwarded: yes Last-Update: 2013-11-29 --- downtimed-0.6/downtimed.c.orig 2013-07-27 16:46:06.000000000 +0200 +++ downtimed-0.6/downtimed.c 2013-11-29 09:08:13.000000000 +0100 @@ -695,8 +695,8 @@ static void usage() { - fputs("usage: " PROGNAME " [-DvS] [-d datadir] [-l log] [-p pidfile] " - "[-s sleep]\n", stderr); + fputs("usage: " PROGNAME " [-DvS] [-d datadir] [-f timefmt] " + "[-l log] [-p pidfile] [-s sleep]\n", stderr); exit(EX_USAGE); } --- downtimed-0.6/downtimes.c.orig 2013-07-27 16:46:21.000000000 +0200 +++ downtimed-0.6/downtimes.c 2013-11-29 09:08:08.000000000 +0100 @@ -194,8 +194,8 @@ static void usage() { - fputs("usage: " PROGNAME " [-v] [-d downtimedbfile] [-n num] " - "[-s sleep] [-u]\n", stderr); + fputs("usage: " PROGNAME " [-v] [-d downtimedbfile] [-f timefmt] " + "[-n num] [-s sleep] [-u]\n", stderr); exit(EX_USAGE); } debian/downtimed.links0000644000000000000000000000014011546426237012227 0ustar usr/bin/downtimes usr/bin/downtime usr/share/man/man1/downtimes.1 usr/share/man/man1/downtime.1 debian/watch0000644000000000000000000000010712247420105010212 0ustar version=3 http://dist.epipe.com/downtimed/downtimed-([.0-9]+)\.tar\.gz debian/downtimed.default0000644000000000000000000000013511546426237012537 0ustar # This is a shell script fraction # Options to the daemon downtimed(8). # DOWNTIMED_OPTS="" debian/copyright0000644000000000000000000000312011736425203011120 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: downtimed Upstream-Contact: Janne Snabb Source: http://dist.epipe.com/downtimed/ Files: * Copyright: 2009-2011, EPIPE Communications License: FreeBSD Files: debian/* Copyright: Mats Erik Andersson License: FreeBSD License: FreeBSD Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. . THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. debian/changelog0000644000000000000000000000441112246100025011030 0ustar downtimed (0.6-1) unstable; urgency=low * New upstream release. * Standard 3.9.5; no change needed. * Local patches: + 01-usage_strings.diff: New file. + 02-tell_about_downtime.diff: Refreshed. + 04_support_gnu_hurd.diff: No longer needed. -- Mats Erik Andersson Fri, 29 Nov 2013 12:52:28 +0100 downtimed (0.5-3) unstable; urgency=low * debian/control: + Standard 3.9.4. No change needed. + Build depends on dpkg-dev (>= 1.15.7) for hardening. + Give correct Vcs-Svn. * debian/rules: Correct spelling of variable CPPFLAGS. Thanks to Simon Ruderich. (Closes: #672461) * Corrections needed to cope with single user mode: + debian/downtimed.init: Set Default-Start to "2 3 4 5" and add "1" to Default-Stop. (Closes: #672473) [lintian] Do not source "/lib/init/vars.sh". + debian/rules: Remove override_dh_installinit. + debian/downtimed.lintian-overrides: Do not keep overriding "init.d-script-possible-missing-stop". -- Mats Erik Andersson Mon, 15 Jul 2013 22:41:43 +0200 downtimed (0.5-2) unstable; urgency=low * Update standards version: + debian/control: Standard 3.9.3; new base URL for Vcs-Browser. + debian/copyright: New URL for Format. * debian/rules: Set and export build flags to enable hardening. * Improve runtime support for GNU/Hurd: + debian/patches/04_support_gnu_hurd.diff: New file. + debian/downtimed.init: Use only "--exec" with start-stop-daemon. -- Mats Erik Andersson Fri, 06 Apr 2012 21:09:03 +0200 downtimed (0.5-1) unstable; urgency=low * New upstream release. * Patches no longer needed: applied by upstream. + 01-glibc_uses_gnu_source.diff: Removed. + 03-manpage_up_to_date.diff: Removed. * debian/control: Added stanzas Vcs-Svn and Vcs-Browser. * debian/copyright: Spelling of DEP-5 section. + Extend time period to 2011; correct for version 0.5. * debian/downtimed.lintian-overrides: Adjust paths. -- Mats Erik Andersson Thu, 28 Apr 2011 01:12:56 +0200 downtimed (0.4-1) unstable; urgency=low * Initial release. (Closes: #607684) -- Mats Erik Andersson Wed, 09 Feb 2011 17:53:29 +0100 debian/downtimed.init0000644000000000000000000000570512171055033012051 0ustar #!/bin/sh ### BEGIN INIT INFO # Provides: downtimed # Required-Start: $remote_fs $syslog # Required-Stop: $local_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: downtime record keeper # Description: Downtimed is a daemon which keeps records of # the periods when the operating system has been # out of service. ### END INIT INFO # # Written 2011 by Mats Erik Andersson. # Licensed using two-clause FreeBSD statement. # ### DESC="downtime bookkeeper" NAME="downtimed" DAEMON="/usr/sbin/$NAME" PIDFILE=/var/run/$NAME.pid PATH=/sbin:/usr/sbin:/bin:/usr/bin SCRIPT=/etc/init.d/$NAME DOWNTIMED_OPTS="" # Are we making sense? [ -x "$DAEMON" ] || exit 0 # Read configuration variable file if it is present [ -r /etc/default/$NAME ] && . /etc/default/$NAME # Define all LSB log_* functions. . /lib/lsb/init-functions # Start downtimed. do_start() { start-stop-daemon --start --quiet --pidfile $PIDFILE \ --exec $DAEMON --test > /dev/null \ || return 1 start-stop-daemon --start --quiet --pidfile $PIDFILE \ --exec $DAEMON -- $DOWNTIMED_OPTS \ || return 2 # Return status: # 0 daemon has been started # 1 daemon was already running # 2 daemon could not be started } # Halt downtimed. do_stop() { start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 \ --pidfile $PIDFILE --exec $DAEMON RETVAL="$?" [ "$RETVAL" = 2 ] && return 2 rm -f $PIDFILE return "$RETVAL" # Return status: # 0 daemon has been stopped # 1 daemon was already stopped # 2 daemon could not be stopped # other daemon reported some other failure } # Reloading is a no-do in the standard case, when logging is # done via the syslog service. Only if $DOWNTIMED_OPTS states # a separate logging file, then a SIGHUP will result in the # daemon releasing the file for rotation, or a similar action. do_reload() { start-stop-daemon --stop --signal 1 --quiet \ --pidfile $PIDFILE --exec $DAEMON 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) log_daemon_msg "Reloading $DESC" "$NAME" do_reload log_end_msg $? ;; restart) 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 ;; # Still running. *) log_end_msg 1 ;; # Failure in starting. esac ;; *) # Failure in ending service. log_end_msg 1 ;; esac ;; *) echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload|status}" >&2 exit 3 ;; esac : debian/downtimed.postrm0000644000000000000000000000013411546426237012436 0ustar #!/bin/sh set -e if [ "$1" = "purge" ]; then rm -Rf /var/lib/downtimed/* fi #DEBHELPER#