Package: release.debian.org
Severity: normal
User: release.debian....@packages.debian.org
Usertags: unblock

We are not in full freeze yet, but according to the announced schedule, it
looks like 2.4.2-4 won't make it into buster even if uploaded yesterday. So,

please unblock package smcroute, because
* it fixes Debian bug #924044, broken init script not working for 'stop'
  command, which is a regression compared to the version in Debian stretch.
* it fixes Debian bug #921577, autopkgtests fail consistently, and some related
  issues with the autopkgtests (referenced as unit tests in the
  debian/changelog).

The proposed upload also contains rather cosmetic changes, i.e.
* Bumping the Debian policy version. This is hopefully acceptable because no
  source changes were needed.
* Removing all explicit maintainer scripts in favour of managing the snippets
  for moving the configuration file via debhelper. I personally checked that
  the resulting binary packages' maintainer scripts are bitwise identical after
  this change. So, hopefully this is acceptable too.

Because of the included cosmetic changes, the package isn't uploadede to
unstable yet. It is currently only available on mentors.d.n as
https://mentors.debian.net/debian/pool/main/s/smcroute/smcroute_2.4.2-4.dsc

unblock smcroute/2.4.2-4

Thank you for considering,
Micha
diff -Nru smcroute-2.4.2/debian/changelog smcroute-2.4.2/debian/changelog
--- smcroute-2.4.2/debian/changelog     2018-09-23 20:40:04.000000000 +0000
+++ smcroute-2.4.2/debian/changelog     2019-03-07 05:40:19.000000000 +0000
@@ -1,3 +1,16 @@
+smcroute (2.4.2-4) unstable; urgency=medium
+
+  * Import upstream fix for malfunctioning 'stop' command to init script
+  * Import upstream fix to allow same outbound interface as inbound when
+    routing.  This is slightly hairy, but previous releases of SMCRoute
+    supported this and the unit tests rely on this to work
+  * Fix unit tests, with upstream and test setup fixes, closes: #921577
+  * Bump Standards-Version to 4.3.0, no changes needed
+  * Use debhelper maintscript to relocate old /etc/startup.sh script
+    to /etc/smcroute.  Fixes an outstanding lintian warning
+
+ -- Joachim Nilsson <troglo...@gmail.com>  Thu, 07 Mar 2019 06:40:19 +0100
+
 smcroute (2.4.2-3) unstable; urgency=medium
 
   * Add missing Build-Depends for systemd, needed for unit file path
diff -Nru smcroute-2.4.2/debian/control smcroute-2.4.2/debian/control
--- smcroute-2.4.2/debian/control       2018-09-21 19:54:23.000000000 +0000
+++ smcroute-2.4.2/debian/control       2019-03-07 05:40:19.000000000 +0000
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Joachim Nilsson <troglo...@gmail.com>
 Build-Depends: debhelper (>= 10), libcap-dev, systemd, pkg-config
-Standards-Version: 4.2.1
+Standards-Version: 4.3.0
 Homepage: http://troglobit.com/smcroute.html
 Vcs-Browser: https://salsa.debian.org/debian/smcroute
 Vcs-Git: https://salsa.debian.org/debian/smcroute.git
diff -Nru smcroute-2.4.2/debian/gitlab-ci.yml 
smcroute-2.4.2/debian/gitlab-ci.yml
--- smcroute-2.4.2/debian/gitlab-ci.yml 1970-01-01 00:00:00.000000000 +0000
+++ smcroute-2.4.2/debian/gitlab-ci.yml 2019-03-07 05:40:19.000000000 +0000
@@ -0,0 +1,9 @@
+image: registry.salsa.debian.org/salsa-ci-team/ci-image-git-buildpackage:latest
+
+build:
+  artifacts:
+    paths:
+    - "*.deb"
+    expire_in: 1 day
+  script:
+    - gitlab-ci-git-buildpackage-all
diff -Nru 
smcroute-2.4.2/debian/patches/0004-Allow-same-outbound-interface-as-inbound.patch
 
smcroute-2.4.2/debian/patches/0004-Allow-same-outbound-interface-as-inbound.patch
--- 
smcroute-2.4.2/debian/patches/0004-Allow-same-outbound-interface-as-inbound.patch
   1970-01-01 00:00:00.000000000 +0000
+++ 
smcroute-2.4.2/debian/patches/0004-Allow-same-outbound-interface-as-inbound.patch
   2019-03-07 05:40:19.000000000 +0000
@@ -0,0 +1,96 @@
+commit 802d82eb5c571afe2a294fd302745bf37cc13a1d
+Author: Joachim Nilsson <troglo...@gmail.com>
+Date:   Sun Feb 10 13:56:17 2019 +0100
+
+    Allow same outbound interface as inbound, only warn user
+    
+    Routing back multicast to the same interface it ingressed on is
+    quite a bit dangerous, but there may be use-cases where this is
+    a requirement so we should not artificially limit the user.
+    
+    Also, allowing this means enabling unit testing on systems with
+    only one interface.
+    
+    Signed-off-by: Joachim Nilsson <troglo...@gmail.com>
+
+diff --git a/src/conf.c b/src/conf.c
+index 974871a..d1fbeed 100644
+--- a/src/conf.c
++++ b/src/conf.c
+@@ -31,6 +31,8 @@
+ #define MAX_LINE_LEN 512
+ #define DEBUG(fmt, args...)                   \
+       smclog(LOG_DEBUG, "%s:%02d: " fmt, conf, lineno, ##args)
++#define INFO(fmt, args...)                    \
++      smclog(LOG_INFO, "%s:%02d: " fmt, conf, lineno, ##args)
+ #define WARN(fmt, args...)                    \
+       smclog(LOG_WARNING, "%s:%02d: " fmt, conf, lineno, ##args)
+ 
+@@ -166,13 +168,9 @@ static int add_mroute(int lineno, char *ifname, char 
*group, char *source, char
+                               iface_match_init(&state_out);
+                               while ((mif = 
iface_match_mif_by_name(outbound[i], &state_out, &iface)) >= 0) {
+                                       if (mif == mroute.inbound) {
+-                                              state_out.match_count--;
+-                                              /* In case of wildcard matches, 
in==out is
+-                                               * quite normal, so don't 
complain
+-                                               */
++                                              /* In case of wildcard match 
in==out is normal, so don't complain */
+                                               if (!ifname_is_wildcard(ifname) 
&& !ifname_is_wildcard(outbound[i]))
+-                                                      WARN("Same outbound 
IPv6 interface (%s) as inbound (%s)?", outbound[i], ifname);
+-                                              continue;
++                                                      INFO("Same outbound 
IPv6 interface (%s) as inbound (%s) may cause routing loops.", outbound[i], 
ifname);
+                                       }
+ 
+                                       /* Use a TTL threshold to indicate the 
list of outbound interfaces. */
+@@ -237,13 +235,9 @@ static int add_mroute(int lineno, char *ifname, char 
*group, char *source, char
+                       iface_match_init(&state_out);
+                       while ((vif = iface_match_vif_by_name(outbound[i], 
&state_out, &iface)) >= 0) {
+                               if (vif == mroute.inbound) {
+-                                      state_out.match_count--;
++                                      /* In case of wildcard match in==out is 
normal, so don't complain */
+                                       if (!ifname_is_wildcard(ifname) && 
!ifname_is_wildcard(outbound[i]))
+-                                              /* In case of wildcard matches, 
in==out is
+-                                               * quite normal, so don't 
complain
+-                                               */
+-                                              WARN("Same outbound IPv4 
interface (%s) as inbound (%s)?", outbound[i], ifname);
+-                                      continue;
++                                              INFO("Same outbound IPv4 
interface (%s) as inbound (%s) may cause routing loops.", outbound[i], ifname);
+                               }
+ 
+                               /* Use a TTL threshold to indicate the list of 
outbound interfaces. */
+diff --git a/src/msg.c b/src/msg.c
+index ea3f03b..1dcb459 100644
+--- a/src/msg.c
++++ b/src/msg.c
+@@ -179,13 +179,9 @@ static int do_mroute4(struct ipc_msg *msg)
+                               iface_match_init(&state_out);
+                               while ((vif = 
iface_match_vif_by_name(ifname_out, &state_out, NULL)) >= 0) {
+                                       if (vif == mroute.inbound) {
+-                                              state_out.match_count--;
+-                                              /* In case of wildcard matches, 
in==out is
+-                                               * quite normal, so don't 
complain
+-                                               */
++                                              /* In case of wildcard match 
in==out is normal, so don't complain */
+                                               if 
(!ifname_is_wildcard(ifname_in) && !ifname_is_wildcard(ifname_out) && !errmsg++)
+-                                                      smclog(LOG_WARNING, 
"Same outbound interface (%s) as inbound (%s)?", ifname_out, ifname_in);
+-                                              continue;
++                                                      smclog(LOG_WARNING, 
"Same outbound interface (%s) as inbound (%s) may cause routing loops.", 
ifname_out, ifname_in);
+                                       }
+                                       mroute.ttl[vif] = 1;    /* Use a TTL 
threshold */
+                                       total++;
+@@ -267,13 +263,9 @@ static int do_mroute6(struct ipc_msg *msg)
+                               iface_match_init(&state_out);
+                               while ((mif = 
iface_match_mif_by_name(ifname_out, &state_out, NULL)) >= 0) {
+                                       if (mif == mroute.inbound) {
+-                                              state_out.match_count--;
+-                                              /* In case of wildcard matches, 
in==out is
+-                                               * quite normal, so don't 
complain
+-                                               */
++                                              /* In case of wildcard match 
in==out is normal, so don't complain */
+                                               if 
(!ifname_is_wildcard(ifname_in) && !ifname_is_wildcard(ifname_out) && !errmsg++)
+-                                                      smclog(LOG_WARNING, 
"Same outbound interface (%s) as inbound (%s)?", ifname_out, ifname_in);
+-                                              continue;
++                                                      smclog(LOG_INFO, "Same 
outbound interface (%s) as inbound (%s) may cause routing loops.", ifname_out, 
ifname_in);
+                                       }
+                                       mroute.ttl[mif] = 1;    /* Use a TTL 
threshold */
+                                       total++;
diff -Nru smcroute-2.4.2/debian/patches/0005-fix-init-script-stop-command.patch 
smcroute-2.4.2/debian/patches/0005-fix-init-script-stop-command.patch
--- smcroute-2.4.2/debian/patches/0005-fix-init-script-stop-command.patch       
1970-01-01 00:00:00.000000000 +0000
+++ smcroute-2.4.2/debian/patches/0005-fix-init-script-stop-command.patch       
2019-03-07 05:40:19.000000000 +0000
@@ -0,0 +1,29 @@
+commit 6f4e2c1ce8e0f6821e5254000ed43a4fd7744782
+Author: hn <h...@users.noreply.github.com>
+Date:   Mon Jan 28 09:56:33 2019 +0100
+
+    fix init script 'stop' command
+
+diff --git a/smcroute.init b/smcroute.init
+old mode 100644
+new mode 100755
+index 00411b8..d0c7752
+--- a/smcroute.init
++++ b/smcroute.init
+@@ -18,6 +18,7 @@
+ 
+ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+ DAEMON=/usr/sbin/smcrouted
++DAEMONCTL=/usr/sbin/smcroutectl
+ DAEMON_OPTS=
+ NAME=smcrouted
+ DESC="static multicast router daemon"
+@@ -50,7 +51,7 @@ stop() {
+       local error
+       local result
+       log_begin_msg "Stopping $DESC: $NAME"
+-      error=$($DAEMON -k 2>&1)
++      error=$($DAEMONCTL kill 2>&1)
+       result=$?
+       log_progress_msg ${error#ERRO: }
+       log_end_msg $result
diff -Nru smcroute-2.4.2/debian/patches/series 
smcroute-2.4.2/debian/patches/series
--- smcroute-2.4.2/debian/patches/series        2018-09-23 18:57:23.000000000 
+0000
+++ smcroute-2.4.2/debian/patches/series        2019-03-07 05:40:19.000000000 
+0000
@@ -1,3 +1,5 @@
 0001-Minor-fix-spelling-found-by-lintian.patch
 0002-Add-missing-status-command-to-SysV-init-script-found.patch
 0003-Fix-too-long-unbreakable-line.patch
+0004-Allow-same-outbound-interface-as-inbound.patch
+0005-fix-init-script-stop-command.patch
diff -Nru smcroute-2.4.2/debian/smcroute.maintscript 
smcroute-2.4.2/debian/smcroute.maintscript
--- smcroute-2.4.2/debian/smcroute.maintscript  1970-01-01 00:00:00.000000000 
+0000
+++ smcroute-2.4.2/debian/smcroute.maintscript  2019-03-07 05:40:19.000000000 
+0000
@@ -0,0 +1 @@
+mv_conffile /etc/startup.sh /etc/smcroute/startup.sh 2.0.0-4
diff -Nru smcroute-2.4.2/debian/smcroute.postinst 
smcroute-2.4.2/debian/smcroute.postinst
--- smcroute-2.4.2/debian/smcroute.postinst     2018-09-12 20:10:12.000000000 
+0000
+++ smcroute-2.4.2/debian/smcroute.postinst     1970-01-01 00:00:00.000000000 
+0000
@@ -1,8 +0,0 @@
-#! /bin/sh
-set -e
-
-if dpkg-maintscript-helper supports mv_conffile 2>/dev/null; then
-    dpkg-maintscript-helper mv_conffile /etc/startup.sh 
/etc/smcroute/startup.sh 2.0.0-4 -- "$@"
-fi
-
-#DEBHELPER#
diff -Nru smcroute-2.4.2/debian/smcroute.postrm 
smcroute-2.4.2/debian/smcroute.postrm
--- smcroute-2.4.2/debian/smcroute.postrm       2018-09-12 20:10:12.000000000 
+0000
+++ smcroute-2.4.2/debian/smcroute.postrm       1970-01-01 00:00:00.000000000 
+0000
@@ -1,8 +0,0 @@
-#! /bin/sh
-set -e
-
-if dpkg-maintscript-helper supports mv_conffile 2>/dev/null; then
-    dpkg-maintscript-helper mv_conffile /etc/startup.sh 
/etc/smcroute/startup.sh 2.0.0-4 -- "$@"
-fi
-
-#DEBHELPER#
diff -Nru smcroute-2.4.2/debian/smcroute.preinst 
smcroute-2.4.2/debian/smcroute.preinst
--- smcroute-2.4.2/debian/smcroute.preinst      2018-09-12 20:10:12.000000000 
+0000
+++ smcroute-2.4.2/debian/smcroute.preinst      1970-01-01 00:00:00.000000000 
+0000
@@ -1,8 +0,0 @@
-#! /bin/sh
-set -e
-
-if dpkg-maintscript-helper supports mv_conffile 2>/dev/null; then
-    dpkg-maintscript-helper mv_conffile /etc/startup.sh 
/etc/smcroute/startup.sh 2.0.0-4 -- "$@"
-fi
-
-#DEBHELPER#
diff -Nru smcroute-2.4.2/debian/tests/daemon-init-scripts 
smcroute-2.4.2/debian/tests/daemon-init-scripts
--- smcroute-2.4.2/debian/tests/daemon-init-scripts     2018-09-12 
20:10:12.000000000 +0000
+++ smcroute-2.4.2/debian/tests/daemon-init-scripts     2019-03-07 
05:40:19.000000000 +0000
@@ -8,7 +8,11 @@
     INIT_SCRIPT => '/etc/init.d/smcroute',
 };
 
-plan tests => 10;
+plan tests => 11;
+
+# Work around test harness, start smcrouted if not already running
+my $startup = capture EXIT_ANY, INIT_SCRIPT, 'start';
+pass($startup);
 
 # Verify that smcroute is running
 my $initial_smcroute_pid = capture EXIT_ANY, 'pgrep', 'smcroute'; chomp 
$initial_smcroute_pid;

Reply via email to