summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog113
-rw-r--r--debian/compat1
-rw-r--r--debian/control25
-rw-r--r--debian/copyright35
-rw-r--r--debian/downtimed.default5
-rw-r--r--debian/downtimed.dirs1
-rw-r--r--debian/downtimed.docs2
-rw-r--r--debian/downtimed.init134
-rw-r--r--debian/downtimed.links2
-rw-r--r--debian/downtimed.lintian-overrides2
-rw-r--r--debian/downtimed.postrm9
-rw-r--r--debian/downtimed.service12
l---------debian/downtimed.upstart1
-rw-r--r--debian/patches/01-usage_strings.diff35
-rw-r--r--debian/patches/02-tell_about_downtime.diff68
-rw-r--r--debian/patches/series2
-rwxr-xr-xdebian/rules12
-rw-r--r--debian/source/format1
-rw-r--r--debian/watch2
19 files changed, 462 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..65f1f23
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,113 @@
+downtimed (0.6-5) UNRELEASED; urgency=medium
+
+ * Delete debian/source/options because xz is now standard.
+ * debian/control:
+ - Bump Standards-Version to 3.9.6 (no changes required).
+ - Change Vcs-Browser to cgit version.
+ * debian/copyright:
+ - Add year 2015 to debian/*.
+
+ -- Jörg Frings-Fürst <debian@jff-webhosting.net> Sun, 14 Jun 2015 15:44:27 +0200
+
+downtimed (0.6-4) unstable; urgency=medium
+
+ * Move downtimed.service from debian/systemd/ to debian/.
+ * Rewrite debian/downtimed.service (Closes: #756282):
+ - Change Unit/Description to describe the service better.
+ - Remove not required Unit/After=network.target.
+ - Remove unnecessary Service/KillMode=process.
+ - Add new Service/Type=forking so that systemd can handle downtimed.
+ - Remove -D from Service/ExecStart to enable database updates.
+ Thanks to Romain Francoise <rfrancoise@debian.org>
+
+ -- Jörg Frings-Fürst <debian@jff-webhosting.net> Mon, 28 Jul 2014 20:14:25 +0200
+
+downtimed (0.6-3) unstable; urgency=medium
+
+ * debian/systemd/downtimed.service:
+ + Delete wrong alias (Closes: #755930).
+ Thanks to Michael Biebl <biebl@debian.org>
+ * debian/rules:
+ + Drop dh_systemd_enable override to make sure systemd
+ enables downtimed.service after it was installed
+ (Closes: #755931).
+ Thanks to Michael Biebl <biebl@debian.org>
+
+ -- Jörg Frings-Fürst <debian@jff-webhosting.net> Fri, 25 Jul 2014 16:05:41 +0200
+
+downtimed (0.6-2) unstable; urgency=low
+
+ * New maintainer (Closes: #745711).
+ * debian/control:
+ + Add dh_systemd to Build-Depends
+ + Update Vcs-* URLs for new location
+ + Reformat Build-Depends and Depends sections
+ * debian/rules:
+ + Call dh with --with=systemd
+ * Add systemd service file debian/downtimed.service.
+ * Add upstart job file debian/downtimed.upstart.
+ * Add debian/source/options:
+ + Set compression to xz
+ + Set compression-level to 9
+
+ -- Jörg Frings-Fürst <debian@jff-webhosting.net> Wed, 09 Jul 2014 12:55:33 +0200
+
+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 <mats.andersson@gisladisker.se> 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 <mats.andersson@gisladisker.se> 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 <mats.andersson@gisladisker.se> 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 <mats.andersson@gisladisker.se> Thu, 28 Apr 2011 01:12:56 +0200
+
+downtimed (0.4-1) unstable; urgency=low
+
+ * Initial release. (Closes: #607684)
+
+ -- Mats Erik Andersson <mats.andersson@gisladisker.se> Wed, 09 Feb 2011 17:53:29 +0100
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..4f06e6a
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,25 @@
+Source: downtimed
+Section: admin
+Priority: extra
+Maintainer: Jörg Frings-Fürst <debian@jff-webhosting.net>
+Build-Depends:
+ debhelper (>= 9),
+ dh-systemd,
+ dpkg-dev (>= 1.15.7)
+Standards-Version: 3.9.6
+Homepage: http://dist.epipe.com/downtimed/
+Vcs-Git: git://anonscm.debian.org/collab-maint/downtimed.git
+Vcs-Browser: http://anonscm.debian.org/cgit/collab-maint/downtimed.git
+
+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.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..8c00e45
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,35 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: downtimed
+Upstream-Contact: Janne Snabb <opensource@epipe.com>
+Source: http://dist.epipe.com/downtimed/
+
+Files: *
+Copyright: 2009-2011, EPIPE Communications
+License: FreeBSD
+
+Files: debian/*
+Copyright: 2009-2014 Mats Erik Andersson <debian@gisladisker.se>
+ 2014-2015 Jörg Frings-Fürst <debian@jff-webhosting.net>
+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.
diff --git a/debian/downtimed.default b/debian/downtimed.default
new file mode 100644
index 0000000..4b990c6
--- /dev/null
+++ b/debian/downtimed.default
@@ -0,0 +1,5 @@
+# This is a shell script fraction
+
+# Options to the daemon downtimed(8).
+#
+DOWNTIMED_OPTS=""
diff --git a/debian/downtimed.dirs b/debian/downtimed.dirs
new file mode 100644
index 0000000..c01e167
--- /dev/null
+++ b/debian/downtimed.dirs
@@ -0,0 +1 @@
+var/lib/downtimed
diff --git a/debian/downtimed.docs b/debian/downtimed.docs
new file mode 100644
index 0000000..724e084
--- /dev/null
+++ b/debian/downtimed.docs
@@ -0,0 +1,2 @@
+README
+TODO
diff --git a/debian/downtimed.init b/debian/downtimed.init
new file mode 100644
index 0000000..146b442
--- /dev/null
+++ b/debian/downtimed.init
@@ -0,0 +1,134 @@
+#!/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
+
+:
diff --git a/debian/downtimed.links b/debian/downtimed.links
new file mode 100644
index 0000000..035da78
--- /dev/null
+++ b/debian/downtimed.links
@@ -0,0 +1,2 @@
+usr/bin/downtimes usr/bin/downtime
+usr/share/man/man1/downtimes.1 usr/share/man/man1/downtime.1
diff --git a/debian/downtimed.lintian-overrides b/debian/downtimed.lintian-overrides
new file mode 100644
index 0000000..3271c13
--- /dev/null
+++ b/debian/downtimed.lintian-overrides
@@ -0,0 +1,2 @@
+# /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
diff --git a/debian/downtimed.postrm b/debian/downtimed.postrm
new file mode 100644
index 0000000..2df367a
--- /dev/null
+++ b/debian/downtimed.postrm
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "purge" ]; then
+ rm -Rf /var/lib/downtimed/*
+fi
+
+#DEBHELPER#
diff --git a/debian/downtimed.service b/debian/downtimed.service
new file mode 100644
index 0000000..2ce4506
--- /dev/null
+++ b/debian/downtimed.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Downtime record keeper
+
+[Service]
+EnvironmentFile=-/etc/default/downtimed
+ExecStart=/usr/sbin/downtimed $DOWNTIMED_OPTS
+ExecReload=/bin/kill -HUP $MAINPID
+Type=forking
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
diff --git a/debian/downtimed.upstart b/debian/downtimed.upstart
new file mode 120000
index 0000000..015ccbe
--- /dev/null
+++ b/debian/downtimed.upstart
@@ -0,0 +1 @@
+../startup-scripts/upstart-startup.conf \ No newline at end of file
diff --git a/debian/patches/01-usage_strings.diff b/debian/patches/01-usage_strings.diff
new file mode 100644
index 0000000..e9c4cda
--- /dev/null
+++ b/debian/patches/01-usage_strings.diff
@@ -0,0 +1,35 @@
+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 <debian@gisladisker.se>
+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);
+ }
+
diff --git a/debian/patches/02-tell_about_downtime.diff b/debian/patches/02-tell_about_downtime.diff
new file mode 100644
index 0000000..b551177
--- /dev/null
+++ b/debian/patches/02-tell_about_downtime.diff
@@ -0,0 +1,68 @@
+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 <debian@gisladisker.se>
+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
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..504eb75
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+01-usage_strings.diff
+02-tell_about_downtime.diff
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..6e33cc3
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,12 @@
+#!/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 $@ --with=systemd
+
+override_dh_installchangelogs:
+ dh_installchangelogs NEWS
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..c105a78
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://dist.epipe.com/downtimed/downtimed-([.0-9]+)\.tar\.gz