Package: at
Version: 3.1.20-3
Severity: wishlist
Tags: patch

Dear Maintainer,

Please consider following patch, which introduce at-run binary
package, providing 'runit' equivalent of sysvinit's init script.  For
your convenience, I formatted patch in way, suitable for direct
application (`git am').


>From ffcc84c7ee823a8fc3d55abd79e122100e3c4779 Mon Sep 17 00:00:00 2001
From: Dmitry Bogatov <kact...@gnu.org>
Date: Tue, 21 Feb 2017 15:49:43 +0300
Subject: [PATCH] New binary package `at-run', providing integration with runit
 initialization system.

---
 debian/at-run.runit    |  1 +
 debian/at.runit-script |  2 ++
 debian/changelog       | 15 +++++++++++----
 debian/control         | 17 +++++++++++++++++
 debian/rules           | 10 ++++++----
 5 files changed, 37 insertions(+), 8 deletions(-)
 create mode 100644 debian/at-run.runit
 create mode 100755 debian/at.runit-script

diff --git a/debian/at-run.runit b/debian/at-run.runit
new file mode 100644
index 0000000..e5f7770
--- /dev/null
+++ b/debian/at-run.runit
@@ -0,0 +1 @@
+debian/at.runit-script logscript,name=at
diff --git a/debian/at.runit-script b/debian/at.runit-script
new file mode 100755
index 0000000..5dc4918
--- /dev/null
+++ b/debian/at.runit-script
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec atd -f -d
diff --git a/debian/changelog b/debian/changelog
index 0196a0d..f262c1f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+at (3.1.20-4) UNRELEASED; urgency=medium
+
+  * New binary package `at-run', providing integration with runit
+    initialization system.
+
+ -- Jose M Calhariz <j...@calhariz.com>  Tue, 21 Feb 2017 15:41:52 +0300
+
 at (3.1.20-3) unstable; urgency=medium

   * New version, because the previous one was tagged in error and remote
@@ -348,7 +355,7 @@ at (3.1.8-10) frozen unstable; urgency=high
   * Changed AC_FUNC_GETLOADAVG to AC_REPLACE_FUNCS(getloadavg) in
     configure.in since it introduces a spurious depencency on libelfg0
     whenever that package is installed on the build machine.
-    (closes: Bug#61295).
+    (closes: Bug#61295).
   * configure.in: rewrote directory tests such that configure fails due to
     a missing SPOOLDIR only when --with-jobdir or --with-atspool doesn't
     specify an explicit path.
@@ -483,7 +490,7 @@ at (3.1.8-1) stable; urgency=low
   * Fix date parsing bug with February
   * Misc. manpage changes
  -- Thomas Koenig <i...@rz.uni-karlsruhe.de>  Sun, 28 Sep 1997 21:33:44 +0200
-
+
 at (3.1.7-6) unstable; urgency=high
   * ../at_3.1.7-4_i386.deb
   *
@@ -508,7 +515,7 @@ at (3.1.7-4) unstable; urgency=high

 at (3.1.7-3) stable; urgency=low
   * ../at_3.1.7-3_i386.deb
-  *
+  *
   * libc5 version
   * removed spurious dependendy on libelf0
  -- Thomas Koenig <i...@rz.uni-karlsruhe.de>  Tue, 17 Jun 1997 18:01:33 +0200
@@ -531,7 +538,7 @@ at (3.1.6-1) unstable frozen; urgency=medium

 at (3.1.5-2) unstable frozen; urgency=high

-  *
+  *
   * ../at_3.1.5-2_i386.deb
   * Also check for /etc/suid.conf when calling suidregister
  -- Thomas Koenig <i...@rz.uni-karlsruhe.de>  Wed, 7 May 1997 11:14:49 +0200
diff --git a/debian/control b/debian/control
index 2fc814a..3f0c8f6 100644
--- a/debian/control
+++ b/debian/control
@@ -7,6 +7,8 @@ Standards-Version: 3.9.8
 Build-Depends: autotools-dev,
                bison,
                debhelper (>= 9.20160114),
+               dh-runit,
+               dh-sysuser,
                dh-systemd,
                flex,
                libfl-dev,
@@ -34,3 +36,18 @@ Description: Delayed job execution and batch processing
  Use
   at    to run the job at a specified time
   batch to run the job when system load levels permit
+
+Package: at-run
+Architecture: all
+Depends: runit,
+         at,
+        ${misc:Depends},
+        ${shlibs:Depends}
+Recommends: runit-init
+Description: Delayed job execution and batch processing (integration with 
runit)
+ At and batch read shell commands from standard input
+ storing them as a job to be scheduled for execution in the
+ future.
+ .
+ This package provides runscript required to run at daemon under runit
+ supervision suite.
diff --git a/debian/rules b/debian/rules
index 7b12a88..5520e57 100755
--- a/debian/rules
+++ b/debian/rules
@@ -37,7 +37,8 @@ binary-arch: build-stamp
        dh_prep
        # Install docs:
        dh_installchangelogs ChangeLog
-       dh_installdocs README
+       dh_installdocs
+       dh_installdocs -p at README
        # Install everything:
        $(MAKE) IROOT=$(CURDIR)/debian/at mandir=/usr/share/man 
docdir=/usr/share/doc install
        # Remove (duplicate) changelog and copyright:
@@ -50,19 +51,20 @@ binary-arch: build-stamp
        rm debian/at/usr/sbin/atrun
        rm debian/at/usr/share/man/man8/atrun.8
        # Install/rename pam config file:
-       dh_install pam.conf etc/pam.d
+       dh_install -p at pam.conf etc/pam.d
        mv debian/at/etc/pam.d/pam.conf \
                debian/at/etc/pam.d/atd
        # Install/rename init script:
-       dh_install rc etc/init.d
+       dh_install -p at rc etc/init.d
        mv debian/at/etc/init.d/rc \
                debian/at/etc/init.d/atd
        chmod 755 debian/at/etc/init.d/atd
        chmod 644 debian/at/etc/pam.d/atd
        dh_systemd_enable
-       dh_installinit --name=atd --onlyscripts -- defaults 89 11
+       dh_installinit -p at --name=atd --onlyscripts -- defaults 89 11
        dh_lintian
        dh_systemd_start
+       dh_runit
        # Needed to keep in line with the previous upload:
        chown root:daemon debian/at/etc/at.deny
        dh_compress

Reply via email to