summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorDmitry Bogatov <KAction@debian.org>2019-05-28 21:10:02 +0000
committerDmitry Bogatov <KAction@debian.org>2019-05-28 21:30:40 +0000
commite4b8e832194949b228db4fd00eab558dfc8b7d27 (patch)
treea3a3dccdf1ba568686411f769857758372c33165 /debian
parent8eddb040f95b7e6a2ebb4700c4518e76b7c5b294 (diff)
Refactor creation of logscript
Instead of using interpolation and here-strings, write function that renders mustache template. This approach makes code cleaner and more scalable. * data/logscript: add mustach template of 'log/run' script, that is installed when "logscript" option in effect. * Makefile: set DH_RUNIT_DATADIR variable in "check" target. This way, templates from ./data/ directory are used, not from system location. * debian/control: add dependency on Text::Hogan library -- implementation of "mustache" templating standard. * dh_runit(template_from_data_directory): new function * dh_runit: install 'log/run' with "template_from_data_directory" function. * t/928935.t: check that "logscript" option correctly creates 'log/run' script, with correct permissions.
Diffstat (limited to 'debian')
-rw-r--r--debian/control2
-rw-r--r--debian/dh-runit.install1
2 files changed, 3 insertions, 0 deletions
diff --git a/debian/control b/debian/control
index 946f548..9b889e1 100644
--- a/debian/control
+++ b/debian/control
@@ -7,6 +7,7 @@ Build-Depends:
7 perl, 7 perl,
8 perl-doc, 8 perl-doc,
9 libfile-copy-recursive-perl, 9 libfile-copy-recursive-perl,
10 libtext-hogan-perl,
10Standards-Version: 4.3.0 11Standards-Version: 4.3.0
11Vcs-Browser: https://salsa.debian.org/runit-team/dh-runit 12Vcs-Browser: https://salsa.debian.org/runit-team/dh-runit
12Vcs-Git: https://salsa.debian.org/runit-team/dh-runit.git 13Vcs-Git: https://salsa.debian.org/runit-team/dh-runit.git
@@ -15,6 +16,7 @@ Homepage: https://salsa.debian.org/runit-team/dh-runit
15Package: dh-runit 16Package: dh-runit
16Architecture: all 17Architecture: all
17Depends: debhelper (>= 9), 18Depends: debhelper (>= 9),
19 libtext-hogan-perl,
18 ${misc:Depends}, 20 ${misc:Depends},
19 ${shlibs:Depends} 21 ${shlibs:Depends}
20Description: debhelper add-on to handle runit runscripts 22Description: debhelper add-on to handle runit runscripts
diff --git a/debian/dh-runit.install b/debian/dh-runit.install
index e3f2d9d..a08eda2 100644
--- a/debian/dh-runit.install
+++ b/debian/dh-runit.install
@@ -2,3 +2,4 @@ dh_runit /usr/bin
2postrm-runit /usr/share/debhelper/autoscripts 2postrm-runit /usr/share/debhelper/autoscripts
3postinst-runit /usr/share/debhelper/autoscripts 3postinst-runit /usr/share/debhelper/autoscripts
4runit.pm /usr/share/perl5/Debian/Debhelper/Sequence 4runit.pm /usr/share/perl5/Debian/Debhelper/Sequence
5data/* /usr/share/dh-runit/data/