Package: release.debian.org
User: release.debian@packages.debian.org
Usertags: unblock
Severity: normal
unblock macchanger/1.7.0-4
The new behavior of this package to automatically enable itself surprised some
users, and broke one's custom wifi setup. So this update adds a debconf
question to prompt the user whether to run it automatically or not.
$ debdiff /tmp/macchanger_1.7.0-3.2.dsc macchanger_1.7.0-4.dsc
diff -Nru macchanger-1.7.0/debian/changelog macchanger-1.7.0/debian/changelog
--- macchanger-1.7.0/debian/changelog 2014-11-29 13:50:42.0 +0100
+++ macchanger-1.7.0/debian/changelog 2014-12-15 14:11:01.0 +0100
@@ -1,3 +1,9 @@
+macchanger (1.7.0-4) unstable; urgency=low
+
+ * add debconf option to prompt whether to automatically run (Closes: #768189)
+
+ -- Hans-Christoph Steiner h...@eds.org Mon, 15 Dec 2014 12:07:44 +0100
+
macchanger (1.7.0-3.2) unstable; urgency=medium
* Non-maintainer upload.
diff -Nru macchanger-1.7.0/debian/config macchanger-1.7.0/debian/config
--- macchanger-1.7.0/debian/config 1970-01-01 01:00:00.0 +0100
+++ macchanger-1.7.0/debian/config 2014-12-15 14:07:56.0 +0100
@@ -0,0 +1,23 @@
+#!/bin/sh -e
+
+# Source debconf library.
+. /usr/share/debconf/confmodule
+
+
+if [ -f /etc/default/macchanger ]; then
+ENABLE_ON_POST_UP_DOWN=false
+. /etc/default/macchanger
+
+if [ $ENABLE_ON_POST_UP_DOWN = true ]; then
+db_set macchanger/automatically_run true
+else
+db_set macchanger/automatically_run false
+fi
+fi
+
+db_input high macchanger/automatically_run || true
+db_go
+
+#DEBHELPER#
+
+exit 0
diff -Nru macchanger-1.7.0/debian/default macchanger-1.7.0/debian/default
--- macchanger-1.7.0/debian/default 1970-01-01 01:00:00.0 +0100
+++ macchanger-1.7.0/debian/default 2014-12-15 14:11:01.0 +0100
@@ -0,0 +1,11 @@
+# before bringing up any network interface, run macchanger. Careful, this is
+# not guaranteed to prevent leaking your real MAC address before the new one
+# gets assigned!
+#
+ENABLE_ON_POST_UP_DOWN=false
+
+
+# by default, macchanger runs on all network interfaces but loopback (lo). If
+# you only want it to run on specific network interfaces, set them here:
+#
+#ENABLE_INTERFACES=wlan0
diff -Nru macchanger-1.7.0/debian/if-pre-up.d/macchanger
macchanger-1.7.0/debian/if-pre-up.d/macchanger
--- macchanger-1.7.0/debian/if-pre-up.d/macchanger 2014-11-29
13:50:42.0 +0100
+++ macchanger-1.7.0/debian/if-pre-up.d/macchanger 1970-01-01
01:00:00.0 +0100
@@ -1,32 +0,0 @@
-#!/bin/sh
-#
-# randomize MAC address before connecting to wifi or ethernet
-#
-# This script should always be run in if-pre-up.d, but unfortunately
-# NetworkManager does not run if-pre-up.d scripts before it sets up a network
-# connection (https://bugzilla.gnome.org/show_bug.cgi?id=387832).
-# if-post-down.d scripts are run, so there is a symlink to this script
-# there. That means when running network config from the terminal, macchanger
-# will be run twice, but it'll only be run in if-post-down.d when using
-# NetworkManager.
-
-package=macchanger
-
-. /etc/default/${package}
-
-LOGFILE=/var/log/${package}.log
-
-if [ $ENABLE_ON_POST_DOWN != yes ]; then
-echo disabled in /etc/default/${package} $LOGFILE
-exit
-fi
-
-echo IFACE = $IFACE $LOGFILE
-
-# quit if we're called for the loopback
-if [ $IFACE = lo ]; then
-echo ignoring loopback $LOGFILE
- exit 0
-fi
-
-/usr/bin/${package} -e $IFACE $LOGFILE 21
diff -Nru macchanger-1.7.0/debian/ifupdown.sh
macchanger-1.7.0/debian/ifupdown.sh
--- macchanger-1.7.0/debian/ifupdown.sh 1970-01-01 01:00:00.0 +0100
+++ macchanger-1.7.0/debian/ifupdown.sh 2014-12-15 14:07:56.0 +0100
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+# randomize MAC address before connecting to wifi or ethernet
+#
+# This script should always be run in if-pre-up.d, but unfortunately
+# NetworkManager does not run if-pre-up.d scripts before it sets up a network
+# connection (https://bugzilla.gnome.org/show_bug.cgi?id=387832).
+# if-post-down.d scripts are run, so there is a symlink to this script
+# there. That means when running network config from the terminal, macchanger
+# will be run twice, but it'll only be run in if-post-down.d when using
+# NetworkManager.
+
+package=macchanger
+
+. /etc/default/${package}
+
+LOGFILE=/var/log/${package}.log
+
+if [ $ENABLE_ON_POST_UP_DOWN != true ]; then
+echo disabled in /etc/default/${package} $LOGFILE
+exit
+fi
+
+echo IFACE = $IFACE $LOGFILE
+
+# quit if we're called for the loopback
+if [ $IFACE = lo ]; then
+echo ignoring loopback $LOGFILE
+exit 0
+fi
+
+/usr/bin/${package} -e $IFACE $LOGFILE 21
diff -Nru macchanger-1.7.0/debian/install macchanger-1.7.0/debian/install
--- macchanger-1.7.0/debian/install 2014-11-29 13:50:42.0 +0100
+++ macchanger-1.7.0/debian/install 2014-12-15 11:44:29.0 +0100
@@ -1,2 +1,2 @@
-debian/if-pre-up.d/macchanger