Package: firewalld Version: 0.3.12-1 Severity: normal Tags: patch Dear Maintainer,
Just because Debian-based systems do not have /etc/sysconfig as in Fedora-based systems, it should not mean that FirewallD cannot be configured with start-up options. The fix I propose is to have these options located in /etc/default/firewalld, as is normally done in Debian for sysv init scripts. To avoid duplication, this same file is used if the service is started by systemd, however I do not know if there are any reasons why systemd should not use /etc/default files. I have attached my patch. Regards, Carlos -- System Information: Debian Release: 8.0 APT prefers unstable APT policy: (990, 'unstable'), (500, 'testing') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.16.0-4-amd64 (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages firewalld depends on: ii dbus 1.8.16-1 ii gir1.2-glib-2.0 1.42.0-2.2 ii init-system-helpers 1.22 ii iptables 1.4.21-2+b1 ii policykit-1 0.105-8 ii python 2.7.8-3 ii python-dbus 1.2.0-2+b3 ii python-gi 3.14.0-1 ii python-slip-dbus 0.6.0-2 Versions of packages firewalld recommends: ii ebtables 2.0.10.4-3 firewalld suggests no packages. -- no debconf information
diff --git a/debian/changelog b/debian/changelog index 5406a42..758e0ab 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +firewalld (0.3.12-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Allow start-up options to firewalld for Debian-based systems. + + -- Carlos Maddela <madd...@labyrinth.net.au> Thu, 19 Feb 2015 06:34:46 +1100 + firewalld (0.3.12-1) unstable; urgency=medium * New upstream release. diff --git a/debian/clean b/debian/clean new file mode 100644 index 0000000..70fc751 --- /dev/null +++ b/debian/clean @@ -0,0 +1 @@ +debian/firewalld.default diff --git a/debian/firewalld.init b/debian/firewalld.init index a8b4083..a9ee93a 100755 --- a/debian/firewalld.init +++ b/debian/firewalld.init @@ -30,6 +30,9 @@ SCRIPTNAME=/etc/init.d/$NAME # Exit if the package is not installed [ -x "$DAEMON" ] || exit 0 +# Read configuration variable file if it is present +[ -r /etc/default/$NAME ] && . /etc/default/$NAME + # Define LSB log_* functions. . /lib/lsb/init-functions @@ -39,7 +42,7 @@ do_start() # 0 if daemon has been started # 1 if daemon was already running # other if daemon could not be started or a failure occured - start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $FIREWALLD_ARGS } do_stop() diff --git a/debian/patches/01-no-sysconfig.patch b/debian/patches/01-no-sysconfig.patch index ff03fbe..2875456 100644 --- a/debian/patches/01-no-sysconfig.patch +++ b/debian/patches/01-no-sysconfig.patch @@ -1,14 +1,28 @@ -Index: firewalld/config/firewalld.service.in -=================================================================== ---- firewalld.orig/config/firewalld.service.in 2013-03-28 22:22:08.995826857 +0100 -+++ firewalld/config/firewalld.service.in 2013-03-28 22:22:22.056028858 +0100 -@@ -6,8 +6,7 @@ +From: Utopia Maintenance Team <pkg-utopia-maintain...@lists.alioth.debian.org> +Date: Thu, 19 Feb 2015 04:59:57 +1100 +Subject: Allow start-up options to firewalld for Debian-based systems + +Description: Allow start-up options to firewalld for Debian-based systems +Author: Carlos Maddela <madd...@labyrinth.net.au> +Origin: vendor +Forwarded: not-needed +Last-Update: 2015-02-19 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- + config/firewalld.service.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/config/firewalld.service.in b/config/firewalld.service.in +index c08cb36..c8e6b55 100644 +--- a/config/firewalld.service.in ++++ b/config/firewalld.service.in +@@ -6,7 +6,7 @@ Before=NetworkManager.service Conflicts=iptables.service ip6tables.service ebtables.service [Service] -EnvironmentFile=-/etc/sysconfig/firewalld --ExecStart=@sbindir@/firewalld --nofork --nopid $FIREWALLD_ARGS -+ExecStart=@sbindir@/firewalld --nofork --nopid ++EnvironmentFile=-/etc/default/firewalld + ExecStart=@sbindir@/firewalld --nofork --nopid $FIREWALLD_ARGS ExecReload=/bin/kill -HUP $MAINPID # supress to log debug and error output also to /var/log/messages - StandardOutput=null diff --git a/debian/rules b/debian/rules index 6218485..d3df16d 100755 --- a/debian/rules +++ b/debian/rules @@ -8,4 +8,5 @@ override_dh_auto_configure: --with-systemd-unitdir=/lib/systemd/system override_dh_install: + cp -f config/firewalld.sysconfig debian/firewalld.default dh_install --list-missing