control: tags -1 +confirmed +pending

[2019-08-07 20:10] Lorenzo Puliti <lorenzo.r...@gmail.com>
> Package: dh-runit
> Version: 2.8.13.2
> Severity: normal
>
> Hi, 
>
> 'run' file and 'finish' file in the service directory
> are automatically made executable by dh-runit, but not 
> the 'check' file.
>
> Also, I've not tested but I guess that files under the 'control'
> directory may have the same problem.
> Althought they are rarely used they should be executable too
>
> for the record, those files are
> /etc/sv/*/control/c
> /etc/sv/*/control/d
> /etc/sv/*/control/t
> /etc/sv/*/control/u
> /etc/sv/*/control/x

Thank you for report. I prepared patch and regression test and pushed it
into master.

Unfortunately, I can't upload dh-runit into unstable right now, since
its build-dependency `libghc-shake-dev` undergoes transition right now.

From 981e64243e8d12939ae623e344e7fbb37a5367e1 Mon Sep 17 00:00:00 2001
From: Dmitry Bogatov <kact...@debian.org>
Date: Thu, 8 Aug 2019 21:51:26 +0000
Subject: [PATCH] Ensure that all supported scripts in svdir are executable

Closes: #934173
---
 dh_runit                                     | 15 ++++++++++++++-
 t/checks/934173/check                        | 11 +++++++++++
 t/checks/934173/debian/dh-runit-test.runit   |  1 +
 t/checks/934173/debian/test.rundir/check     |  0
 t/checks/934173/debian/test.rundir/control/u |  0
 t/checks/934173/debian/test.rundir/finish    |  0
 t/checks/934173/debian/test.rundir/run       |  0
 7 files changed, 26 insertions(+), 1 deletion(-)
 create mode 100644 t/checks/934173/check
 create mode 100644 t/checks/934173/debian/dh-runit-test.runit
 create mode 100644 t/checks/934173/debian/test.rundir/check
 create mode 100644 t/checks/934173/debian/test.rundir/control/u
 create mode 100644 t/checks/934173/debian/test.rundir/finish
 create mode 100644 t/checks/934173/debian/test.rundir/run

diff --git a/dh_runit b/dh_runit
index 9273333..9825a4d 100755
--- a/dh_runit
+++ b/dh_runit
@@ -59,7 +59,20 @@ sub parse_options($opts) {
 }
 
 sub ensure_executable($directory) {
-    for my $f ('run', 'finish', 'log/run', 'log/finish') {
+    my @scripts = (
+        'run',
+        'finish',
+        'check',
+        'log/run',
+        'log/finish',
+        'control/c',
+        'control/d',
+        'control/t',
+        'control/u',
+        'control/x',
+    );
+
+    for my $f (@scripts) {
         my $file = "$directory/$f";
         doit('chmod', '+x', $file) if (-e $file);
     }
diff --git a/t/checks/934173/check b/t/checks/934173/check
new file mode 100644
index 0000000..38a3bf8
--- /dev/null
+++ b/t/checks/934173/check
@@ -0,0 +1,11 @@
+#!/usr/bin/perl
+use strict;
+use warnings;
+use Test::More tests => 3;
+use File::stat;
+
+my $svdir = 'debian/dh-runit-test/etc/sv/test';
+ok(-x "${svdir}/run", "{svdir}/run correctly set executable");
+ok(-x "${svdir}/check", "{svdir}/check correctly set executable");
+ok(-x "${svdir}/control/u", "{svdir}/control/u correctly set executable");
+
diff --git a/t/checks/934173/debian/dh-runit-test.runit 
b/t/checks/934173/debian/dh-runit-test.runit
new file mode 100644
index 0000000..16e0dcc
--- /dev/null
+++ b/t/checks/934173/debian/dh-runit-test.runit
@@ -0,0 +1 @@
+debian/test.rundir name=test,noreplace,logscript
\ No newline at end of file
diff --git a/t/checks/934173/debian/test.rundir/check 
b/t/checks/934173/debian/test.rundir/check
new file mode 100644
index 0000000..e69de29
diff --git a/t/checks/934173/debian/test.rundir/control/u 
b/t/checks/934173/debian/test.rundir/control/u
new file mode 100644
index 0000000..e69de29
diff --git a/t/checks/934173/debian/test.rundir/finish 
b/t/checks/934173/debian/test.rundir/finish
new file mode 100644
index 0000000..e69de29
diff --git a/t/checks/934173/debian/test.rundir/run 
b/t/checks/934173/debian/test.rundir/run
new file mode 100644
index 0000000..e69de29
-- 
Note, that I send and fetch email in batch, once in a few days.
Please, mention in body of your reply when you add or remove recepients.

Reply via email to