Le 2015-02-18 00:35, Mehdi Dogguy a écrit :
Le 2014-12-10 16:19, Adam D. Barratt a écrit :
Control: tags -1 + moreinfo
On 2014-12-10 14:34, Pali Rohár wrote:
Please unblock package netplug
New version of netplug package (1.2.9.2-2) which is on
http://mentors.debian.org/package/netplug fix more bugs reported to
Debian.
Ner version is not from upstream, but contains only new patches
which
fixing bugs reported in Debian.
Please attach a debdiff, as requested by
https://release.debian.org/jessie/freeze_policy.html (and I believe
by
reportbug).
The debdiff is attached. There are no bug fixes for issues that can be
considered as RC. Based on that, I am closing this bugreport. The
submitter can still re-open the bug-report if he has more information
to share.
Forgot to attach the debdiff. :) Now done.
Regards,
diff -Nru netplug-1.2.9.2/debian/changelog netplug-1.2.9.2/debian/changelog
--- netplug-1.2.9.2/debian/changelog 2010-08-07 17:07:58.000000000 +0200
+++ netplug-1.2.9.2/debian/changelog 2014-12-26 14:56:56.000000000 +0100
@@ -1,3 +1,19 @@
+netplug (1.2.9.2-2) unstable; urgency=low
+
+ * debian/control:
+ - New maintainer (Closes: #730573)
+ - Depend on iproute2 instead of transitional iproute (Closes: #753747)
+ - Add info about difference between netplugd and ifplugd packages
+ to package long description (Closes: #690129)
+ - Fix Standards-Version
+ * debian/rules:
+ - Fix missing recommended target
+ - Fix dpkg-buildflags missing
+ * Handle ST_DOWNANDOUT state (Closes: #652418)
+ * Allow to specify custom script file via new param '-s' (Closes: #702495)
+
+ -- Pali Rohár <pali.ro...@gmail.com> Sat, 29 Nov 2014 00:34:05 +0100
+
netplug (1.2.9.2-1) unstable; urgency=low
* New upstream version:
diff -Nru netplug-1.2.9.2/debian/control netplug-1.2.9.2/debian/control
--- netplug-1.2.9.2/debian/control 2010-08-07 16:33:11.000000000 +0200
+++ netplug-1.2.9.2/debian/control 2014-12-26 14:56:56.000000000 +0100
@@ -1,20 +1,21 @@
Source: netplug
Section: net
Priority: optional
-Maintainer: Philipp Matthias Hahn <pmh...@debian.org>
+Maintainer: Pali Rohár <pali.ro...@gmail.com>
Build-Depends: debhelper (>> 7)
-Standards-Version: 3.9.1
+Standards-Version: 3.9.6
Homepage: http://www.red-bean.com/~bos/
Package: netplug
Architecture: any
Depends: ${shlibs:Depends},
${misc:Depends},
- iproute
+ iproute2 | iproute
Description: network link monitor daemon
This daemon monitors the link status of network cards and configures
the network on plug- and un-plug-events.
.
It's similar to ifplugd, but uses NETLINK instead of regularly polling
the link status. This improves power-consumption with laptops, but does
- not work with all network card.
+ not work with all network card. And it can't be configured to ignore short
+ unplugged or plugged periods like ifplugd.
diff -Nru netplug-1.2.9.2/debian/patches/50downoutstate.patch
netplug-1.2.9.2/debian/patches/50downoutstate.patch
--- netplug-1.2.9.2/debian/patches/50downoutstate.patch 1970-01-01
01:00:00.000000000 +0100
+++ netplug-1.2.9.2/debian/patches/50downoutstate.patch 2014-11-29
12:52:37.000000000 +0100
@@ -0,0 +1,11 @@
+Handle ST_DOWNANDOUT state (Bug #652418)
+--- a/if_info.c
++++ b/if_info.c
+@@ -186,6 +186,7 @@
+ if (newflags & IFF_UP) {
+ switch(info->state) {
+ case ST_DOWN:
++ case ST_DOWNANDOUT:
+ info->state = ST_INACTIVE;
+ break;
+
diff -Nru netplug-1.2.9.2/debian/patches/60custom-script.patch
netplug-1.2.9.2/debian/patches/60custom-script.patch
--- netplug-1.2.9.2/debian/patches/60custom-script.patch 1970-01-01
01:00:00.000000000 +0100
+++ netplug-1.2.9.2/debian/patches/60custom-script.patch 2014-11-29
12:52:37.000000000 +0100
@@ -0,0 +1,113 @@
+Allow to specify custom script file via new param '-s' (Bug #702495)
+diff --git a/lib.c b/lib.c
+index 5507daf..46de348 100644
+--- a/lib.c
++++ b/lib.c
+@@ -29,6 +29,7 @@
+
+ #include "netplug.h"
+
++const char *script_file = NP_SCRIPT_DIR "/netplug";
+
+ void
+ do_log(int pri, const char *fmt, ...)
+@@ -109,11 +110,11 @@ run_netplug_bg(char *ifname, char *action)
+ setpgrp(); /* become group leader */
+
+ do_log(LOG_INFO, "%s %s %s -> pid %d",
+- NP_SCRIPT, ifname, action, getpid());
++ script_file, ifname, action, getpid());
+
+- execl(NP_SCRIPT, NP_SCRIPT, ifname, action, NULL);
++ execl(script_file, script_file, ifname, action, NULL);
+
+- do_log(LOG_ERR, NP_SCRIPT ": %m");
++ do_log(LOG_ERR, "%s: %m", script_file);
+ exit(1);
+ }
+
+diff --git a/main.c b/main.c
+index fe949a9..a3cdf63 100644
+--- a/main.c
++++ b/main.c
+@@ -91,7 +91,7 @@ handle_interface(struct nlmsghdr *hdr, void *arg)
+ static void
+ usage(char *progname, int exitcode)
+ {
+- fprintf(stderr, "Usage: %s [-DFP] [-c config-file] [-i interface] [-p
pid-file]\n",
++ fprintf(stderr, "Usage: %s [-DFP] [-c config-file] [-s script-file] [-i
interface] [-p pid-file]\n",
+ progname);
+
+ fprintf(stderr, "\t-D\t\t"
+@@ -102,6 +102,8 @@ usage(char *progname, int exitcode)
+ "do not autoprobe for interfaces (use with care)\n");
+ fprintf(stderr, "\t-c config_file\t"
+ "read interface patterns from this config file\n");
++ fprintf(stderr, "\t-s script_file\t"
++ "script file for probing interfaces, bringing them up or down\n");
+ fprintf(stderr, "\t-i interface\t"
+ "only handle interfaces matching this pattern\n");
+ fprintf(stderr, "\t-p pid_file\t"
+@@ -219,7 +221,7 @@ main(int argc, char *argv[])
+ int probe = 1;
+ int c;
+
+- while ((c = getopt(argc, argv, "DFPc:hi:p:")) != EOF) {
++ while ((c = getopt(argc, argv, "DFPc:s:hi:p:")) != EOF) {
+ switch (c) {
+ case 'D':
+ debug = 1;
+@@ -234,6 +236,9 @@ main(int argc, char *argv[])
+ read_config(optarg);
+ cfg_read = 1;
+ break;
++ case 's':
++ script_file = optarg;
++ break;
+ case 'h':
+ fprintf(stderr, "netplugd version %s\n", NP_VERSION);
+ usage(argv[0], 0);
+diff --git a/man/man8/netplugd.8 b/man/man8/netplugd.8
+index 1b5ee93..fde1d2a 100644
+--- a/man/man8/netplugd.8
++++ b/man/man8/netplugd.8
+@@ -19,6 +19,7 @@
+ .Nm netplugd
+ .Op Fl FP
+ .Op Fl c Ar config_file
++.Op Fl s Ar script_file
+ .Op Fl i Ar interface_pattern
+ .Op Fl p Ar pid_file
+ .\"
+@@ -117,6 +118,9 @@ to try to read from any real config files, you can specify
+ .Pa /dev/null
+ as a config file.
+ .\"
++.It Fl s Ar script_file
++Specify an alternative script file path, override /etc/netplug.d/netplug
++.\"
+ .It Fl i Ar interface_pattern
+ Specify a pattern that will be used to match interface names that
+ .Nm
+diff --git a/netplug.h b/netplug.h
+index 5e5fb65..1f041ca 100644
+--- a/netplug.h
++++ b/netplug.h
+@@ -26,8 +26,6 @@
+ #include <linux/netlink.h>
+ #include <linux/rtnetlink.h>
+
+-#define NP_SCRIPT NP_SCRIPT_DIR "/netplug"
+-
+ /* configuration */
+
+ void read_config(char *filename);
+@@ -37,6 +35,8 @@ int try_probe(char *iface);
+ void probe_interfaces(void);
+ void close_on_exec(int fd);
+
++extern const char *script_file;
++
+ extern int debug;
+
+ /* netlink interfacing */
diff -Nru netplug-1.2.9.2/debian/patches/series
netplug-1.2.9.2/debian/patches/series
--- netplug-1.2.9.2/debian/patches/series 2010-08-07 16:36:29.000000000
+0200
+++ netplug-1.2.9.2/debian/patches/series 2014-11-29 12:52:37.000000000
+0100
@@ -2,3 +2,5 @@
20quoting.patch
30path.patch
40callback.patch
+50downoutstate.patch
+60custom-script.patch
diff -Nru netplug-1.2.9.2/debian/rules netplug-1.2.9.2/debian/rules
--- netplug-1.2.9.2/debian/rules 2010-08-07 17:01:02.000000000 +0200
+++ netplug-1.2.9.2/debian/rules 2014-12-26 14:56:56.000000000 +0100
@@ -5,18 +5,17 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
-CFLAGS = -Wall -g
+CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
+CFLAGS := $(shell dpkg-buildflags --get CFLAGS)
+LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
- CFLAGS += -O0
-else
- CFLAGS += -O2
-endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
-build: build-stamp
+build: build-arch build-indep
+build-arch: build-stamp
+build-indep: build-stamp
build-stamp:
dh_testdir
$(MAKE) initdir='$$(prefix)/etc/init.d'
scriptdir='$$(prefix)/etc/netplug'