[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#767695: marked as done (unblock: smcroute/2.0.0-4)



Your message dated Sun, 02 Nov 2014 12:05:32 +0100
with message-id <54560FFC.4080701@thykier.net>
and subject line Re: Bug#767695: unblock: smcroute/2.0.0-4
has caused the Debian Bug report #767695,
regarding unblock: smcroute/2.0.0-4
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
767695: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=767695
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package smcroute

The package in smcroute is RC buggy (#766915: smcroute does not start).
adsb already added an "age-days 2 smcroute/2.0.0-3" hint on 2014-10-30, but I
just uploaded a fix for the autopkgtests, so at least the version number in the
hint needs to be updated. This is why I am contacting you.

The debdiff since the already hinted version is:

----------- 8>< -----------------------------
diff -Nru smcroute-2.0.0/debian/changelog smcroute-2.0.0/debian/changelog
--- smcroute-2.0.0/debian/changelog	2014-10-30 16:11:16.000000000 +0100
+++ smcroute-2.0.0/debian/changelog	2014-11-01 21:00:11.000000000 +0100
@@ -1,3 +1,11 @@
+smcroute (2.0.0-4) unstable; urgency=medium
+
+  * Fix autopkgtest: Add missing smcroute test dependency, missing comma, and
+    missing allow-stderr (Closes: #767592). Thanks to Martin Pitt
+    <martin.pitt@ubuntu.com> for providing the patch.
+
+ -- Micha Lenk <micha@debian.org>  Sat, 01 Nov 2014 20:55:08 +0100
+
 smcroute (2.0.0-3) unstable; urgency=medium
 
   * Add Testsuite: autopkgtest to debian/control, on behalf of a traveling
diff -Nru smcroute-2.0.0/debian/tests/control smcroute-2.0.0/debian/tests/control
--- smcroute-2.0.0/debian/tests/control	2014-10-30 00:30:58.000000000 +0100
+++ smcroute-2.0.0/debian/tests/control	2014-11-01 21:00:11.000000000 +0100
@@ -1,3 +1,3 @@
 Tests: daemon-init-scripts mr-cache-ipv4 mr-cache-ipv6
-Restrictions: needs-root isolation-machine
-Depends: libipc-system-simple-perl procps
+Restrictions: needs-root isolation-machine allow-stderr
+Depends: @, libipc-system-simple-perl, procps
----------- 8>< -----------------------------

The debdiff since the version 2.0.0-1 that is available in testing is attached.

If you agree, please pick from the following what ever hint you find most
appropriate (I would take the age-days hint):

unblock smcroute/2.0.0-4
age-days 2 smcroute/2.0.0-4

Thanks in advance,
Micha
diff -Nru smcroute-2.0.0/debian/changelog smcroute-2.0.0/debian/changelog
--- smcroute-2.0.0/debian/changelog	2014-10-03 10:56:12.000000000 +0200
+++ smcroute-2.0.0/debian/changelog	2014-11-01 21:00:11.000000000 +0100
@@ -1,3 +1,30 @@
+smcroute (2.0.0-4) unstable; urgency=medium
+
+  * Fix autopkgtest: Add missing smcroute test dependency, missing comma, and
+    missing allow-stderr (Closes: #767592). Thanks to Martin Pitt
+    <martin.pitt@ubuntu.com> for providing the patch.
+
+ -- Micha Lenk <micha@debian.org>  Sat, 01 Nov 2014 20:55:08 +0100
+
+smcroute (2.0.0-3) unstable; urgency=medium
+
+  * Add Testsuite: autopkgtest to debian/control, on behalf of a traveling
+    Micha
+
+ -- Joachim Breitner <nomeata@debian.org>  Thu, 30 Oct 2014 16:11:03 +0100
+
+smcroute (2.0.0-2) unstable; urgency=medium
+
+  * Delete debian/smcroute.dirs because package builds also without it.
+  * Install binaries to /usr/sbin to make init script working again
+    (Closes: #766915).
+  * Add patch 0001-Fix-issue-10-Loop-forever-on-command-if-daemon-not-r.patch
+    to fix hanging init script on stop in case the daemon isn't running.
+  * Add some Autopkgtests covering daemon start stop via System V init scripts,
+    addition and removal of static multicast routes.
+
+ -- Micha Lenk <micha@debian.org>  Thu, 30 Oct 2014 00:27:59 +0100
+
 smcroute (2.0.0-1) unstable; urgency=low
 
   * New upstream version, does build again on FreeBSD (closes: #763381).
diff -Nru smcroute-2.0.0/debian/control smcroute-2.0.0/debian/control
--- smcroute-2.0.0/debian/control	2014-10-01 22:44:34.000000000 +0200
+++ smcroute-2.0.0/debian/control	2014-11-01 21:00:11.000000000 +0100
@@ -7,6 +7,7 @@
 Homepage: http://troglobit.com/smcroute.html
 Vcs-Browser: http://source.lenk.info/git/pkg-smcroute.git
 Vcs-Git: git://source.lenk.info/git/pkg-smcroute.git
+Testsuite: autopkgtest
 
 Package: smcroute
 Architecture: any
diff -Nru smcroute-2.0.0/debian/patches/0001-Fix-issue-10-Loop-forever-on-command-if-daemon-not-r.patch smcroute-2.0.0/debian/patches/0001-Fix-issue-10-Loop-forever-on-command-if-daemon-not-r.patch
--- smcroute-2.0.0/debian/patches/0001-Fix-issue-10-Loop-forever-on-command-if-daemon-not-r.patch	1970-01-01 01:00:00.000000000 +0100
+++ smcroute-2.0.0/debian/patches/0001-Fix-issue-10-Loop-forever-on-command-if-daemon-not-r.patch	2014-11-01 21:00:11.000000000 +0100
@@ -0,0 +1,31 @@
+From: Joachim Nilsson <troglobit@gmail.com>
+Date: Mon, 27 Oct 2014 01:32:54 +0100
+Subject: [PATCH] Fix issue #10: Loop forever on command if daemon not running.
+Origin: https://github.com/troglobit/smcroute/commit/d6280e64b27d5a4bd7f37dac36b455f4ae5f9ab3
+Bug: https://github.com/troglobit/smcroute/issues/10
+
+Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
+---
+ smcroute.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/smcroute.c b/smcroute.c
+index 1aeb133..7bd3c72 100644
+--- a/smcroute.c
++++ b/smcroute.c
+@@ -573,10 +573,11 @@ int main(int argc, const char *argv[])
+ 		openlog(argv[0], LOG_PID, LOG_USER);
+ 
+ 		/* connect to daemon */
+-		while (ipc_client_init()) {
++		while (ipc_client_init() && !result) {
+ 			switch (errno) {
+ 			case EACCES:
+ 				smclog(LOG_ERR, EACCES, "Need root privileges to connect to daemon");
++				result = 1;
+ 				break;
+ 
+ 			case ENOENT:
+-- 
+1.9.1
+
diff -Nru smcroute-2.0.0/debian/patches/series smcroute-2.0.0/debian/patches/series
--- smcroute-2.0.0/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ smcroute-2.0.0/debian/patches/series	2014-11-01 21:00:11.000000000 +0100
@@ -0,0 +1 @@
+0001-Fix-issue-10-Loop-forever-on-command-if-daemon-not-r.patch
diff -Nru smcroute-2.0.0/debian/rules smcroute-2.0.0/debian/rules
--- smcroute-2.0.0/debian/rules	2014-10-03 11:01:44.000000000 +0200
+++ smcroute-2.0.0/debian/rules	2014-11-01 21:00:11.000000000 +0100
@@ -8,6 +8,9 @@
 %:
 	dh $@ --with autoreconf
 
+override_dh_auto_configure:
+	dh_auto_configure -- --bindir=/usr/sbin
+
 override_dh_auto_install:
 	dh_auto_install
 	# delete smcroute.conf from /usr/share/doc/smcroute/ as this is also
diff -Nru smcroute-2.0.0/debian/tests/control smcroute-2.0.0/debian/tests/control
--- smcroute-2.0.0/debian/tests/control	1970-01-01 01:00:00.000000000 +0100
+++ smcroute-2.0.0/debian/tests/control	2014-11-01 21:00:11.000000000 +0100
@@ -0,0 +1,3 @@
+Tests: daemon-init-scripts mr-cache-ipv4 mr-cache-ipv6
+Restrictions: needs-root isolation-machine allow-stderr
+Depends: @, libipc-system-simple-perl, procps
diff -Nru smcroute-2.0.0/debian/tests/daemon-init-scripts smcroute-2.0.0/debian/tests/daemon-init-scripts
--- smcroute-2.0.0/debian/tests/daemon-init-scripts	1970-01-01 01:00:00.000000000 +0100
+++ smcroute-2.0.0/debian/tests/daemon-init-scripts	2014-11-01 21:00:11.000000000 +0100
@@ -0,0 +1,38 @@
+#! /usr/bin/env perl
+use strict;
+use warnings;
+use Test::More;
+use IPC::System::Simple qw( capture $EXITVAL EXIT_ANY );
+
+use constant {
+    INIT_SCRIPT => '/etc/init.d/smcroute',
+};
+
+plan tests => 10;
+
+# Verify that smcroute is running
+my $initial_smcroute_pid = capture EXIT_ANY, 'pgrep', 'smcroute'; chomp $initial_smcroute_pid;
+is $EXITVAL, 0, "smcroute is running".( $EXITVAL ? '' : " (pid $initial_smcroute_pid)" );
+
+# Try to stop the daemon
+my $stop_output = capture EXIT_ANY, INIT_SCRIPT, 'stop';
+is $EXITVAL, 0, "stopping smcroute";
+my $smcroute_pid = capture EXIT_ANY, 'pgrep', 'smcroute'; chomp $smcroute_pid;
+is $EXITVAL, 1, "smcroute is really stopped".( $EXITVAL ? '' : " (pid $smcroute_pid)" );
+
+my $double_stop_output = capture EXIT_ANY, INIT_SCRIPT, 'stop';
+is $EXITVAL, 0, "stopping smcroute twice in a row";
+$smcroute_pid = capture EXIT_ANY, 'pgrep', 'smcroute'; chomp $smcroute_pid;
+is $EXITVAL, 1, "smcroute is really stopped".( $EXITVAL ? '' : " (pid $smcroute_pid)" );
+
+# Try to start the daemon again
+my $start_output = capture EXIT_ANY, INIT_SCRIPT, 'start';
+is $EXITVAL, 0, "starting smcroute";
+my $new_smcroute_pid = capture EXIT_ANY, 'pgrep', 'smcroute'; chomp $new_smcroute_pid;
+is $EXITVAL, 0, "smcroute is really running".( $EXITVAL ? '' : " (pid $new_smcroute_pid)" );
+isnt $new_smcroute_pid, $initial_smcroute_pid, "smcroute pid changed ($new_smcroute_pid != $initial_smcroute_pid)";
+
+my $double_start_output = capture EXIT_ANY, INIT_SCRIPT, 'start';
+is $EXITVAL, 0, "starting smcroute twice in a row";
+$smcroute_pid = capture EXIT_ANY, 'pgrep', 'smcroute'; chomp $smcroute_pid;
+is $EXITVAL, 0, "smcroute is really running".( $EXITVAL ? '' : " (pid $smcroute_pid)" );
diff -Nru smcroute-2.0.0/debian/tests/mr-cache-ipv4 smcroute-2.0.0/debian/tests/mr-cache-ipv4
--- smcroute-2.0.0/debian/tests/mr-cache-ipv4	1970-01-01 01:00:00.000000000 +0100
+++ smcroute-2.0.0/debian/tests/mr-cache-ipv4	2014-11-01 21:00:11.000000000 +0100
@@ -0,0 +1,87 @@
+#! /usr/bin/env perl
+use strict;
+use warnings;
+use Carp;
+use Test::More;
+use IPC::System::Simple qw( capture $EXITVAL EXIT_ANY );
+
+use constant {
+    VIF_TABLE => '/proc/net/ip_mr_vif',
+    MR_CACHE  => '/proc/net/ip_mr_cache',
+    MC_SENDER => '10.0.0.1',	# arbitrary IP address from private range
+    MC_GROUP  => '224.0.1.20',  # "any private experiment" (IANA)
+};
+
+# Check preconditions
+if (-e VIF_TABLE) {
+    plan tests => 9;
+} else {
+    plan skip_all => "Test irrelevant on systems without IPv4 multicast (file /proc/net/ip_mr_vif doesn't exist)";
+}
+
+# Verify that smcroute is running
+my $smcroute_pid = capture( EXIT_ANY, 'pgrep', 'smcroute' );
+chomp $smcroute_pid;
+is $EXITVAL, 0, "smcroute is running".( $EXITVAL ? '' : " (pid $smcroute_pid)" );
+
+# Get a valid multicast interface
+my @interfaces = get_multicast_interfaces();
+my $first_itf = $interfaces[0];
+ok @interfaces >= 1, "At least one multicast capable interface found: $first_itf"
+    or diag read_file(VIF_TABLE);
+
+# Verify that there are no multicast routes when we start
+my @routes = get_multicast_routes();
+is @routes, 0, "Multicast routing cache is empty"
+    or diag read_file(MR_CACHE);
+
+# Add a multicast route
+my $route_txt = MC_SENDER."->$first_itf->$first_itf->".MC_GROUP;
+my $output = capture( EXIT_ANY, 'smcroute', '-a', $first_itf, MC_SENDER, MC_GROUP, $first_itf);
+is $EXITVAL, 0, "adding multicast route $route_txt doesn't fail (return code: $EXITVAL)";
+is $output, '', "adding multicast route $route_txt doesn't generate any console output"
+    or diag "Unexpected output\n$output";
+@routes = get_multicast_routes();
+is @routes, 1, "Multicast routing cache now contains one entry";
+diag read_file(MR_CACHE);
+
+# Remove the multicast route again
+$output = capture( EXIT_ANY, 'smcroute', '-r', $first_itf, MC_SENDER, MC_GROUP);
+is $EXITVAL, 0, "removing multicast route $route_txt doesn't fail (return code: $EXITVAL)";
+is $output, '', "removing multicast route $route_txt doesn't generate any console output"
+    or diag "Unexpected output\n$output";
+@routes = get_multicast_routes();
+is @routes, 0, "Multicast routing cache is empty again"
+    or diag read_file(MR_CACHE);
+
+####################################################################################
+# sub routines
+
+sub get_multicast_interfaces {
+    my @vif = read_file(VIF_TABLE);
+    my @itf;
+    shift @vif;	# skip table header
+    foreach (@vif) {
+        chomp;
+        s/^\s+//;
+        my @columns = split(/\s+/);
+        push @itf, $columns[1];
+    }
+    return @itf;
+}
+
+sub get_multicast_routes {
+    my @routes = read_file(MR_CACHE);
+    shift @routes;	# skip table header
+    return @routes;
+}
+
+sub read_file {
+    my $filename = shift;
+    croak "no filename specified" unless $filename;
+    open my $fh, "<$filename"
+        or croak "failed to read file $filename: $!";
+    my @contents = <$fh>;
+    close $fh;
+    return wantarray ? @contents : "@contents";
+}
diff -Nru smcroute-2.0.0/debian/tests/mr-cache-ipv6 smcroute-2.0.0/debian/tests/mr-cache-ipv6
--- smcroute-2.0.0/debian/tests/mr-cache-ipv6	1970-01-01 01:00:00.000000000 +0100
+++ smcroute-2.0.0/debian/tests/mr-cache-ipv6	2014-11-01 21:00:11.000000000 +0100
@@ -0,0 +1,87 @@
+#! /usr/bin/env perl
+use strict;
+use warnings;
+use Carp;
+use Test::More;
+use IPC::System::Simple qw( capture $EXITVAL EXIT_ANY );
+
+use constant {
+    VIF_TABLE => '/proc/net/ip6_mr_vif',
+    MR_CACHE  => '/proc/net/ip6_mr_cache',
+    MC_SENDER => 'fc00::1',	# arbitrary IP address from private range
+    MC_GROUP  => 'ff01:0:0:0:0:0:0:114',  # "any private experiment" (IANA) with node-local scope
+};
+
+# Check preconditions
+if (-e VIF_TABLE) {
+    plan tests => 9;
+} else {
+    plan skip_all => "Test irrelevant on systems without IPv4 multicast (file /proc/net/ip_mr_vif doesn't exist)";
+}
+
+# Verify that smcroute is running
+my $smcroute_pid = capture( EXIT_ANY, 'pgrep', 'smcroute' );
+chomp $smcroute_pid;
+is $EXITVAL, 0, "smcroute is running".( $EXITVAL ? '' : " (pid $smcroute_pid)" );
+
+# Get a valid multicast interface
+my @interfaces = get_multicast_interfaces();
+my $first_itf = $interfaces[0];
+ok @interfaces >= 1, "At least one multicast capable interface found: $first_itf"
+    or diag read_file(VIF_TABLE);
+
+# Verify that there are no multicast routes when we start
+my @routes = get_multicast_routes();
+is @routes, 0, "Multicast routing cache is empty"
+    or diag read_file(MR_CACHE);
+
+# Add a multicast route
+my $route_txt = MC_SENDER."->$first_itf->$first_itf->".MC_GROUP;
+my $output = capture( EXIT_ANY, 'smcroute', '-a', $first_itf, MC_SENDER, MC_GROUP, $first_itf);
+is $EXITVAL, 0, "adding multicast route $route_txt doesn't fail (return code: $EXITVAL)";
+is $output, '', "adding multicast route $route_txt doesn't generate any console output"
+    or diag "Unexpected output\n$output";
+@routes = get_multicast_routes();
+is @routes, 1, "Multicast routing cache now contains one entry";
+diag read_file(MR_CACHE);
+
+# Remove the multicast route again
+$output = capture( EXIT_ANY, 'smcroute', '-r', $first_itf, MC_SENDER, MC_GROUP);
+is $EXITVAL, 0, "removing multicast route $route_txt doesn't fail (return code: $EXITVAL)";
+is $output, '', "removing multicast route $route_txt doesn't generate any console output"
+    or diag "Unexpected output\n$output";
+@routes = get_multicast_routes();
+is @routes, 0, "Multicast routing cache is empty again"
+    or diag read_file(MR_CACHE);
+
+####################################################################################
+# sub routines
+
+sub get_multicast_interfaces {
+    my @vif = read_file(VIF_TABLE);
+    my @itf;
+    shift @vif;	# skip table header
+    foreach (@vif) {
+        chomp;
+        s/^\s+//;
+        my @columns = split(/\s+/);
+        push @itf, $columns[1];
+    }
+    return @itf;
+}
+
+sub get_multicast_routes {
+    my @routes = read_file(MR_CACHE);
+    shift @routes;	# skip table header
+    return @routes;
+}
+
+sub read_file {
+    my $filename = shift;
+    croak "no filename specified" unless $filename;
+    open my $fh, "<$filename"
+        or croak "failed to read file $filename: $!";
+    my @contents = <$fh>;
+    close $fh;
+    return wantarray ? @contents : "@contents";
+}

--- End Message ---
--- Begin Message ---
On 2014-11-01 23:05, Micha Lenk wrote:
> Package: release.debian.org
> Severity: normal
> User: release.debian.org@packages.debian.org
> Usertags: unblock
> 
> Please unblock package smcroute
> 
> The package in smcroute is RC buggy (#766915: smcroute does not start).
> adsb already added an "age-days 2 smcroute/2.0.0-3" hint on 2014-10-30, but I
> just uploaded a fix for the autopkgtests, so at least the version number in the
> hint needs to be updated. This is why I am contacting you.
> 
> [...]
>
> Thanks in advance,
> Micha
> 

Hi,

Fortunately, it turns out that smcroute made it into testing prior to
your upload yesterday.

In regards to the changes made in 2.0.0-4, I have decided to unblock
those as well (but without any ageing).

~Niels

--- End Message ---

Reply to: