summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-firewall/pglinux/files')
-rw-r--r--net-firewall/pglinux/files/0-pglinux-2.2.2-gentoo-init.patch61
-rw-r--r--net-firewall/pglinux/files/0-pglinux-2.2.2-systemd.patch42
-rw-r--r--net-firewall/pglinux/files/1-pglinux-2.2.2-gentoo-init.patch20
-rw-r--r--net-firewall/pglinux/files/1-pglinux-2.2.2-systemd.patch144
-rw-r--r--net-firewall/pglinux/files/2-pglinux-2.2.2-systemd.patch34
-rw-r--r--net-firewall/pglinux/files/3-pglinux-2.2.2-systemd.patch21
-rw-r--r--net-firewall/pglinux/files/4-pglinux-2.2.2-systemd.patch24
-rw-r--r--net-firewall/pglinux/files/5-pglinux-2.2.2-systemd.patch18
-rw-r--r--net-firewall/pglinux/files/6-pglinux-2.2.2-systemd.patch87
-rw-r--r--net-firewall/pglinux/files/pgl.gentoo.in55
-rw-r--r--net-firewall/pglinux/files/pglinux-2.2.2-path-variables.patch131
11 files changed, 637 insertions, 0 deletions
diff --git a/net-firewall/pglinux/files/0-pglinux-2.2.2-gentoo-init.patch b/net-firewall/pglinux/files/0-pglinux-2.2.2-gentoo-init.patch
new file mode 100644
index 000000000000..f3ae3cf85d17
--- /dev/null
+++ b/net-firewall/pglinux/files/0-pglinux-2.2.2-gentoo-init.patch
@@ -0,0 +1,61 @@
+diff --git a/pgl/pglcmd/init/pgl.gentoo.in b/pgl/pglcmd/init/pgl.gentoo.in
+new file mode 100644
+index 0000000..c94d978
+--- /dev/null
++++ b/pgl/pglcmd/init/pgl.gentoo.in
+@@ -0,0 +1,55 @@
++#!/sbin/runscript
++# Copyright 1999-2012 Gentoo Foundation
++# Distributed under the terms of the GNU General Public License v2
++
++description="Daemon script for pglinux"
++extra_commands="reload forcereload update"
++
++depend() {
++ need net
++}
++
++PIDFILE=@PID_DIR@/pgld.pid
++PGLCMD=@PGLCMDPATH@
++
++start() {
++ ebegin "Starting pglinux daemon"
++
++ if [ "${RC_CMD}" = "restart" ]; then
++ sleep 3
++ fi
++
++ $PGLCMD start
++ eend $?
++}
++
++stop() {
++ ebegin "Stopping pglinux daemon"
++ $PGLCMD stop_quick
++ eend $?
++}
++
++status() {
++ ebegin "Checking status of pglinux daemon"
++ $PGLCMD status
++ eend $?
++}
++
++reload() {
++ ebegin "reload config"
++ $PGLCMD reload
++ eend $?
++}
++
++forcereload() {
++ ebegin "force config reload"
++ $PGLCMD force-reload
++ eend $?
++}
++
++update() {
++ ebegin "Force update of lists"
++ $PGLCMD update
++ eend $?
++}
++
diff --git a/net-firewall/pglinux/files/0-pglinux-2.2.2-systemd.patch b/net-firewall/pglinux/files/0-pglinux-2.2.2-systemd.patch
new file mode 100644
index 000000000000..0c8d50b10dd0
--- /dev/null
+++ b/net-firewall/pglinux/files/0-pglinux-2.2.2-systemd.patch
@@ -0,0 +1,42 @@
+commit 5099e4f985db621465f6d5c91ddad877926322c8
+Author: jre <jre-phoenix@users.sourceforge.net>
+Date: Thu Feb 14 00:12:00 2013 +0100
+
+ added systemd file by Pierre Buard, Arch Linux
+
+diff --git a/pgl/INSTALL b/pgl/INSTALL
+index e0225a2..25f668e 100644
+--- a/pgl/INSTALL
++++ b/pgl/INSTALL
+@@ -278,9 +278,8 @@ http://forums.phoenixlabs.org/thread-15882-post-120482.html#pid120482
+
+ ARCH / AUR (Arch User Repo):
+ ----------------------------
+-PKGBUILD by Gilrain:
++PKGBUILD by Pierre Buard (Gilrain), Arch Linux maintainer
+ https://aur.archlinux.org/packages.php?ID=51839
+-(Last Updated: Thu, 14 Jun 2012 08:52:59 +0000 for 2.2.0)
+
+
+ Gentoo:
+diff --git a/pgl/pglcmd/init/service b/pgl/pglcmd/init/service
+new file mode 100644
+index 0000000..3f2f747
+--- /dev/null
++++ b/pgl/pglcmd/init/service
+@@ -0,0 +1,15 @@
++[Unit]
++Description=PeerGuardian Linux - an IP Blocker
++Documentation=man:pgld(1) file:///usr/share/doc/pgl/README.blocklists
++After=network.target
++ConditionPathExists=|/etc/pgl/blocklists.list
++ConditionDirectoryNotEmpty=|/usr/lib/pgl
++
++[Service]
++BusName=org.netfilter.pgl
++ExecStart=/usr/bin/pglcmd start
++ExecStop=/usr/bin/pglcmd stop
++PIDFile=/run/pgld.pid
++
++[Install]
++WantedBy=multi-user.target
diff --git a/net-firewall/pglinux/files/1-pglinux-2.2.2-gentoo-init.patch b/net-firewall/pglinux/files/1-pglinux-2.2.2-gentoo-init.patch
new file mode 100644
index 000000000000..63aecf506be2
--- /dev/null
+++ b/net-firewall/pglinux/files/1-pglinux-2.2.2-gentoo-init.patch
@@ -0,0 +1,20 @@
+commit a63052957b350adcf92e7c23aaad7b71450d8023
+Author: hasufell <julian.ospald@googlemail.com>
+Date: Sun Nov 25 13:44:34 2012 +0100
+
+ fix make dist
+
+ forgot to add pgl.gentoo.in :/
+
+diff --git a/pgl/pglcmd/Makefile.am b/pgl/pglcmd/Makefile.am
+index 147a66e..896b6bc 100644
+--- a/pgl/pglcmd/Makefile.am
++++ b/pgl/pglcmd/Makefile.am
+@@ -118,6 +118,7 @@ EXTRA_DIST = \
+ pglcmd.wd.in \
+ cron.daily/pglcmd.in \
+ init/pgl.in \
++ init/pgl.gentoo.in \
+ networkmanager/20pglcmd.in \
+ pglcmd.lib
+
diff --git a/net-firewall/pglinux/files/1-pglinux-2.2.2-systemd.patch b/net-firewall/pglinux/files/1-pglinux-2.2.2-systemd.patch
new file mode 100644
index 000000000000..ebcf3c44717c
--- /dev/null
+++ b/net-firewall/pglinux/files/1-pglinux-2.2.2-systemd.patch
@@ -0,0 +1,144 @@
+commit dad29189eabd8aaee79fefd95bd9f8ff216d3bec
+Author: jre <jre-phoenix@users.sourceforge.net>
+Date: Sat May 18 10:13:49 2013 +0200
+
+ integrated the systemd service file
+
+ thanks again ARCH Linux guys, especially Pierre Buard
+
+ 2.) Uninstall
+diff --git a/pgl/Makefile.am b/pgl/Makefile.am
+index b738fdd..a81c3ee 100644
+--- a/pgl/Makefile.am
++++ b/pgl/Makefile.am
+@@ -4,6 +4,10 @@ MASTER_BLOCKLIST_DIR = @MASTER_BLOCKLIST_DIR@
+
+ ACLOCAL_AMFLAGS = -I m4
+
++# Ensure that make distcheck continues to work
++DISTCHECK_CONFIGURE_FLAGS = \
++ --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
++
+ SUBDIRS = \
+ docs \
+ pglcmd \
+diff --git a/pgl/configure.ac b/pgl/configure.ac
+index 213baa5..04e43cb 100644
+--- a/pgl/configure.ac
++++ b/pgl/configure.ac
+@@ -132,6 +132,17 @@ AC_ARG_WITH([gentoo-init],
+
+ AM_CONDITIONAL(GENTOOINIT, [test "x$gentoo_init" = "xyes"])
+
++# use systemd service file (yes, if user specifies a path)
++# http://www.freedesktop.org/software/systemd/man/daemon.html
++PKG_PROG_PKG_CONFIG
++AC_ARG_WITH([systemdsystemunitdir],
++ AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
++ [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
++if test "x$with_systemdsystemunitdir" != xno; then
++ AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
++fi
++AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ])
++
+ # let user specify iconsdir
+ AC_ARG_WITH([iconsdir],
+ [AS_HELP_STRING([--with-iconsdir=DIR],
+@@ -311,6 +322,11 @@ else
+ echo QT-gui....................................... : no
+ fi
+
++if test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno; then
++echo systemdsystemunitdir......................... : $systemdsystemunitdir
++else
++echo systemd...................................... : no
++fi
+ echo
+ echo .............................................
+ echo "Developer debug:"
+diff --git a/pgl/pglcmd/Makefile.am b/pgl/pglcmd/Makefile.am
+index 896b6bc..132a475 100644
+--- a/pgl/pglcmd/Makefile.am
++++ b/pgl/pglcmd/Makefile.am
+@@ -48,6 +48,9 @@ pgllib_DATA = \
+ pglcmd.lib \
+ pglcmd.main
+
++systemdsystemunit_DATA = \
++ init/pgl.service
++
+ # Don't update PATH here anymore, because on user's make it doesn't contain
+ # [/usr]/sbin
+ pglcmd.defaults:
+@@ -103,6 +106,15 @@ init/pgl:
+ chmod +x init/pgl
+ endif
+
++init/pgl.service:
++ sed \
++ -e 's|@data_root_dir@|$(datarootdir)|g' \
++ -e 's|@CONF_DIR@|$(sysconfdir)|g' \
++ -e 's|@LIB_DIR@|$(libdir)|g' \
++ -e 's|@BIN_DIR@|$(bindir)|g' \
++ -e 's|@PID_DIR@|$(PIDDIR)|g' \
++ < init/pgl.service.in > init/pgl.service
++
+ networkmanager/20pglcmd:
+ $(do_subst) < networkmanager/20pglcmd.in > networkmanager/20pglcmd
+ chmod +x networkmanager/20pglcmd
+@@ -119,6 +131,7 @@ EXTRA_DIST = \
+ cron.daily/pglcmd.in \
+ init/pgl.in \
+ init/pgl.gentoo.in \
++ init/pgl.service.in \
+ networkmanager/20pglcmd.in \
+ pglcmd.lib
+
+@@ -131,4 +144,5 @@ CLEANFILES = \
+ pglcmd.wd \
+ cron.daily/pglcmd \
+ init/pgl \
++ init/pgl.service \
+ networkmanager/20pglcmd
+diff --git a/pgl/pglcmd/init/pgl.service.in b/pgl/pglcmd/init/pgl.service.in
+new file mode 100644
+index 0000000..55779bd
+--- /dev/null
++++ b/pgl/pglcmd/init/pgl.service.in
+@@ -0,0 +1,15 @@
++[Unit]
++Description=PeerGuardian Linux - an IP Blocker
++Documentation=man:pgld(1) file://@data_root_dir@/doc/pgl/README.blocklists
++After=network.target
++ConditionPathExists=|@CONF_DIR@/pgl/blocklists.list
++ConditionDirectoryNotEmpty=|@LIB_DIR@/pgl
++
++[Service]
++BusName=org.netfilter.pgl
++ExecStart=@BIN_DIR@/pglcmd start
++ExecStop=@BIN_DIR@/pglcmd stop
++PIDFile=@PID_DIR@/pgld.pid
++
++[Install]
++WantedBy=multi-user.target
+diff --git a/pgl/pglcmd/init/service b/pgl/pglcmd/init/service
+deleted file mode 100644
+index 3f2f747..0000000
+--- a/pgl/pglcmd/init/service
++++ /dev/null
+@@ -1,15 +0,0 @@
+-[Unit]
+-Description=PeerGuardian Linux - an IP Blocker
+-Documentation=man:pgld(1) file:///usr/share/doc/pgl/README.blocklists
+-After=network.target
+-ConditionPathExists=|/etc/pgl/blocklists.list
+-ConditionDirectoryNotEmpty=|/usr/lib/pgl
+-
+-[Service]
+-BusName=org.netfilter.pgl
+-ExecStart=/usr/bin/pglcmd start
+-ExecStop=/usr/bin/pglcmd stop
+-PIDFile=/run/pgld.pid
+-
+-[Install]
+-WantedBy=multi-user.target
diff --git a/net-firewall/pglinux/files/2-pglinux-2.2.2-systemd.patch b/net-firewall/pglinux/files/2-pglinux-2.2.2-systemd.patch
new file mode 100644
index 000000000000..49bde436d947
--- /dev/null
+++ b/net-firewall/pglinux/files/2-pglinux-2.2.2-systemd.patch
@@ -0,0 +1,34 @@
+commit b1bbab1348f924635daba2739ab0882f7f976957
+Author: jre <jre-phoenix@users.sourceforge.net>
+Date: Mon May 20 14:39:29 2013 +0200
+
+ systemd fixes: don't wait for pgl dbus, but fork instead
+
+ necessary to prevent timeout, because on start pglcmd first downloads
+ all missing blocklists (may take quite long) and then starts pgld,
+ which just then registers with dbus
+
+ editorial change
+
+ Thanks again Pierre Buard
+
+diff --git a/pgl/pglcmd/init/pgl.service.in b/pgl/pglcmd/init/pgl.service.in
+index 55779bd..5279404 100644
+--- a/pgl/pglcmd/init/pgl.service.in
++++ b/pgl/pglcmd/init/pgl.service.in
+@@ -1,12 +1,13 @@
+ [Unit]
+ Description=PeerGuardian Linux - an IP Blocker
+-Documentation=man:pgld(1) file://@data_root_dir@/doc/pgl/README.blocklists
++Documentation=man:pgld(1)
++Documentation=file://@data_root_dir@/doc/pgl/README.blocklists
+ After=network.target
+ ConditionPathExists=|@CONF_DIR@/pgl/blocklists.list
+ ConditionDirectoryNotEmpty=|@LIB_DIR@/pgl
+
+ [Service]
+-BusName=org.netfilter.pgl
++Type=forking
+ ExecStart=@BIN_DIR@/pglcmd start
+ ExecStop=@BIN_DIR@/pglcmd stop
+ PIDFile=@PID_DIR@/pgld.pid
diff --git a/net-firewall/pglinux/files/3-pglinux-2.2.2-systemd.patch b/net-firewall/pglinux/files/3-pglinux-2.2.2-systemd.patch
new file mode 100644
index 000000000000..347c9c836de4
--- /dev/null
+++ b/net-firewall/pglinux/files/3-pglinux-2.2.2-systemd.patch
@@ -0,0 +1,21 @@
+commit 459f460cfd4a166d5108c3e88c2cad294b32fb74
+Author: jre <jre-phoenix@users.sourceforge.net>
+Date: Mon May 20 19:26:25 2013 +0200
+
+ fix: install systemd file only if configured
+
+diff --git a/pgl/pglcmd/Makefile.am b/pgl/pglcmd/Makefile.am
+index 132a475..c7f34a5 100644
+--- a/pgl/pglcmd/Makefile.am
++++ b/pgl/pglcmd/Makefile.am
+@@ -48,8 +48,10 @@ pgllib_DATA = \
+ pglcmd.lib \
+ pglcmd.main
+
++if HAVE_SYSTEMD
+ systemdsystemunit_DATA = \
+ init/pgl.service
++endif
+
+ # Don't update PATH here anymore, because on user's make it doesn't contain
+ # [/usr]/sbin
diff --git a/net-firewall/pglinux/files/4-pglinux-2.2.2-systemd.patch b/net-firewall/pglinux/files/4-pglinux-2.2.2-systemd.patch
new file mode 100644
index 000000000000..cc124ebe1ac8
--- /dev/null
+++ b/net-firewall/pglinux/files/4-pglinux-2.2.2-systemd.patch
@@ -0,0 +1,24 @@
+commit 53ac32c45e0a28bfaf42f32cd9b887ed1414ecae
+Author: jre <jre-phoenix@users.sourceforge.net>
+Date: Tue May 21 20:21:47 2013 +0200
+
+ revised systemd targets
+
+ thanks again Pierre Buard
+
+diff --git a/pgl/pglcmd/init/pgl.service.in b/pgl/pglcmd/init/pgl.service.in
+index 5279404..c8809d0 100644
+--- a/pgl/pglcmd/init/pgl.service.in
++++ b/pgl/pglcmd/init/pgl.service.in
+@@ -2,9 +2,8 @@
+ Description=PeerGuardian Linux - an IP Blocker
+ Documentation=man:pgld(1)
+ Documentation=file://@data_root_dir@/doc/pgl/README.blocklists
+-After=network.target
+-ConditionPathExists=|@CONF_DIR@/pgl/blocklists.list
+-ConditionDirectoryNotEmpty=|@LIB_DIR@/pgl
++After=network.target syslog.target
++After=firehol.service firestarter.service firewalld.service ufw.service
+
+ [Service]
+ Type=forking
diff --git a/net-firewall/pglinux/files/5-pglinux-2.2.2-systemd.patch b/net-firewall/pglinux/files/5-pglinux-2.2.2-systemd.patch
new file mode 100644
index 000000000000..49fa35a64ed9
--- /dev/null
+++ b/net-firewall/pglinux/files/5-pglinux-2.2.2-systemd.patch
@@ -0,0 +1,18 @@
+commit fe6a60d6be7c611d0568042e5bdbdd9398f9a7e8
+Author: jre <jre-phoenix@users.sourceforge.net>
+Date: Tue Jun 11 22:42:21 2013 +0200
+
+ add RemainAfterExit to prevent timeout during long blocklist downloads
+
+diff --git a/pgl/pglcmd/init/pgl.service.in b/pgl/pglcmd/init/pgl.service.in
+index c8809d0..64ee040 100644
+--- a/pgl/pglcmd/init/pgl.service.in
++++ b/pgl/pglcmd/init/pgl.service.in
+@@ -10,6 +10,7 @@ Type=forking
+ ExecStart=@BIN_DIR@/pglcmd start
+ ExecStop=@BIN_DIR@/pglcmd stop
+ PIDFile=@PID_DIR@/pgld.pid
++RemainAfterExit=yes
+
+ [Install]
+ WantedBy=multi-user.target
diff --git a/net-firewall/pglinux/files/6-pglinux-2.2.2-systemd.patch b/net-firewall/pglinux/files/6-pglinux-2.2.2-systemd.patch
new file mode 100644
index 000000000000..b1000cb5d4e8
--- /dev/null
+++ b/net-firewall/pglinux/files/6-pglinux-2.2.2-systemd.patch
@@ -0,0 +1,87 @@
+commit 6ed523649e296a16494c6b559ef22de04833cddc
+Author: hasufell <hasufell@posteo.de>
+Date: Mon Sep 23 23:57:48 2013 +0200
+
+ BUILD: small cleanup to systemd bits
+
+ * don't double check for pkg-config
+ * use AS_IF
+ * consistent variable naming
+ * do not install systemd file when "--with-systemd" is omitted
+
+diff --git a/pgl/Makefile.am b/pgl/Makefile.am
+index a81c3ee..c5dd377 100644
+--- a/pgl/Makefile.am
++++ b/pgl/Makefile.am
+@@ -6,7 +6,7 @@ ACLOCAL_AMFLAGS = -I m4
+
+ # Ensure that make distcheck continues to work
+ DISTCHECK_CONFIGURE_FLAGS = \
+- --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
++ --with-systemd=$$dc_install_base/$(SYSTEMDUNITDIR)
+
+ SUBDIRS = \
+ docs \
+diff --git a/pgl/configure.ac b/pgl/configure.ac
+index 63b443c..dd2086e 100644
+--- a/pgl/configure.ac
++++ b/pgl/configure.ac
+@@ -14,9 +14,7 @@
+ AC_PROG_CC
+ AC_PROG_INSTALL
+ AC_PROG_LIBTOOL
+-AC_PATH_PROG([PKGCONFIG], [pkg-config])
+-AS_IF([test "x$PKGCONFIG" = "x"],
+- [AC_MSG_ERROR([pkg-config not found!])])
++PKG_PROG_PKG_CONFIG
+
+ # Checks for header files.
+ AC_CHECK_HEADERS([arpa/inet.h inttypes.h limits.h netinet/in.h stdlib.h string.h sys/time.h syslog.h unistd.h])
+@@ -134,14 +132,14 @@
+
+ # use systemd service file (yes, if user specifies a path)
+ # http://www.freedesktop.org/software/systemd/man/daemon.html
+-PKG_PROG_PKG_CONFIG
+-AC_ARG_WITH([systemdsystemunitdir],
+- AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
+- [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
+-if test "x$with_systemdsystemunitdir" != xno; then
+- AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
+-fi
+-AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ])
++AC_ARG_WITH([systemd],
++ [AS_HELP_STRING([--with-systemd=UNITDIR], [install systemd unit file (into UNITDIR if given)])],
++ [with_systemd="$withval"],
++ [with_systemd="no"])
++AS_IF([test "x$with_systemd" != xno],
++ [AS_IF([test "$with_systemd" = yes], [with_systemd="`$PKG_CONFIG --variable=systemdsystemunitdir systemd`"])]
++ [AC_SUBST([SYSTEMDUNITDIR], [$with_systemd])])
++AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemd" -a "x$with_systemd" != xno ])
+
+ # let user specify iconsdir
+ AC_ARG_WITH([iconsdir],
+@@ -321,9 +319,9 @@
+ else
+ echo QT-gui....................................... : no
+ fi
+-
+-if test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno; then
+-echo systemdsystemunitdir......................... : $systemdsystemunitdir
++if test -n "$with_systemd" -a "x$with_systemd" != xno; then
++echo systemd ..................................... : yes
++echo systemd unit dir ............................ : $with_systemd
+ else
+ echo systemd...................................... : no
+ fi
+diff --git a/pgl/pglcmd/Makefile.am b/pgl/pglcmd/Makefile.am
+index c7f34a5..d06871e 100644
+--- a/pgl/pglcmd/Makefile.am
++++ b/pgl/pglcmd/Makefile.am
+@@ -51,6 +51,7 @@ pgllib_DATA = \
+ if HAVE_SYSTEMD
+ systemdsystemunit_DATA = \
+ init/pgl.service
++systemdsystemunitdir = @SYSTEMDUNITDIR@
+ endif
+
+ # Don't update PATH here anymore, because on user's make it doesn't contain
diff --git a/net-firewall/pglinux/files/pgl.gentoo.in b/net-firewall/pglinux/files/pgl.gentoo.in
new file mode 100644
index 000000000000..c94d9784096e
--- /dev/null
+++ b/net-firewall/pglinux/files/pgl.gentoo.in
@@ -0,0 +1,55 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="Daemon script for pglinux"
+extra_commands="reload forcereload update"
+
+depend() {
+ need net
+}
+
+PIDFILE=@PID_DIR@/pgld.pid
+PGLCMD=@PGLCMDPATH@
+
+start() {
+ ebegin "Starting pglinux daemon"
+
+ if [ "${RC_CMD}" = "restart" ]; then
+ sleep 3
+ fi
+
+ $PGLCMD start
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping pglinux daemon"
+ $PGLCMD stop_quick
+ eend $?
+}
+
+status() {
+ ebegin "Checking status of pglinux daemon"
+ $PGLCMD status
+ eend $?
+}
+
+reload() {
+ ebegin "reload config"
+ $PGLCMD reload
+ eend $?
+}
+
+forcereload() {
+ ebegin "force config reload"
+ $PGLCMD force-reload
+ eend $?
+}
+
+update() {
+ ebegin "Force update of lists"
+ $PGLCMD update
+ eend $?
+}
+
diff --git a/net-firewall/pglinux/files/pglinux-2.2.2-path-variables.patch b/net-firewall/pglinux/files/pglinux-2.2.2-path-variables.patch
new file mode 100644
index 000000000000..2d3693a98536
--- /dev/null
+++ b/net-firewall/pglinux/files/pglinux-2.2.2-path-variables.patch
@@ -0,0 +1,131 @@
+commit 07b4b464e18c763bf095214a73d0bcfa32c4f933
+Author: hasufell <hasufell@posteo.de>
+Date: Sat Sep 7 00:33:42 2013 +0200
+
+ BUILD: do not expand path variables in configure.ac
+
+ it is bad form and could cause unexpected behavior
+
+diff --git a/pgl/configure.ac b/pgl/configure.ac
+index 213baa5..6160956 100644
+--- a/pgl/configure.ac
++++ b/pgl/configure.ac
+@@ -45,21 +45,21 @@ AC_ARG_WITH([initddir],
+ [AS_HELP_STRING([--with-initddir=DIR],
+ [path to init script directory (default: sysconfdir/init.d)])],
+ [INITDDIR="$withval"],
+- [INITDDIR="$sysconfdir/init.d"])
++ [INITDDIR='$(sysconfdir)/init.d'])
+
+ # let user specify LOGDIR
+ AC_ARG_WITH([logdir],
+ [AS_HELP_STRING([--with-logdir=DIR],
+ [path to log directory (default: localstatedir/log/pgl)])],
+ [LOGDIR="$withval"],
+- [LOGDIR="$localstatedir/log/$PACKAGE"])
++ [LOGDIR='$(localstatedir)/log/'$PACKAGE])
+
+ # let user specify PIDDIR
+ AC_ARG_WITH([piddir],
+ [AS_HELP_STRING([--with-piddir=DIR],
+ [path to PID directory (default: localstatedir/run)])],
+ [PIDDIR="$withval"],
+- [PIDDIR="$localstatedir/run"])
++ [PIDDIR='$(localstatedir)/run'])
+
+ # let user specify TMPDIR
+ AC_ARG_WITH([tmpdir],
+@@ -73,21 +73,21 @@ AC_ARG_WITH([blocklists],
+ [AS_HELP_STRING([--with-blocklists=DIR],
+ [path to blocklists directory (default: localstatedir/spool/pgl)])],
+ [BLOCKLISTS_DIR="$withval"],
+- [BLOCKLISTS_DIR="$localstatedir/spool/$PACKAGE"])
++ [BLOCKLISTS_DIR='$(localstatedir)/spool/'$PACKAGE])
+
+ # let user specify LOCAL_BLOCKLIST_DIR
+ AC_ARG_WITH([localblocklist],
+ [AS_HELP_STRING([--with-localblocklist=DIR],
+ [path to local blocklist directory (default: sysconfdir/pgl/blocklists.local)])],
+ [LOCAL_BLOCKLIST_DIR="$withval"],
+- [LOCAL_BLOCKLIST_DIR="$sysconfdir/$PACKAGE/blocklists.local"])
++ [LOCAL_BLOCKLIST_DIR='$(sysconfdir)'/$PACKAGE/blocklists.local])
+
+ # let user specify MASTER_BLOCKLIST_DIR
+ AC_ARG_WITH([masterblocklist],
+ [AS_HELP_STRING([--with-masterblocklist=DIR],
+ [path to master blocklist directory (default: localstatedir/lib/pgl)])],
+ [MASTER_BLOCKLIST_DIR="$withval"],
+- [MASTER_BLOCKLIST_DIR="$localstatedir/lib/$PACKAGE"])
++ [MASTER_BLOCKLIST_DIR='$(localstatedir)/lib/'$PACKAGE])
+
+ # let user specify LSB
+ AC_ARG_WITH([lsb],
+@@ -137,7 +137,7 @@ AC_ARG_WITH([iconsdir],
+ [AS_HELP_STRING([--with-iconsdir=DIR],
+ [path where icons get installed (default: datadir/pixmaps)])],
+ [ICONSDIR="$withval"],
+- [ICONSDIR="$datadir/pixmaps"])
++ [ICONSDIR='$(datadir)/pixmaps'])
+
+
+
+@@ -147,7 +147,7 @@ AC_ARG_WITH([iconsdir],
+ # pkg-config module check, generates $1_LIBS and $1_CFLAGS vars
+ PKG_CHECK_MODULES([libnetfilterqueue],[libnetfilter_queue])
+ PGLD_CFLAGS=""
+-PGLD_CPPFLAGS="$libnetfilterqueue_CFLAGS -DVERSION=\\\"$VERSION\\\" -DPACKAGE_NAME=\\\"$PACKAGE\\\" -DPIDFILE=\\\"${localstatedir}/run/${PACKAGE}d.pid\\\""
++PGLD_CPPFLAGS="$libnetfilterqueue_CFLAGS -DVERSION=\\\"$VERSION\\\" -DPACKAGE_NAME=\\\"$PACKAGE\\\""
+ PGLD_LDFLAGS=""
+ PGLD_LIBS="$libnetfilterqueue_LIBS"
+
+@@ -180,7 +180,7 @@ AS_IF([test "x$enable_dbus" = "xyes"],
+ [PKG_CHECK_MODULES([DBUS],
+ [dbus-1])]
+ [PGLD_CFLAGS="$PGLD_CFLAGS -fPIC"]
+- [PGLD_CPPFLAGS="$PGLD_CPPFLAGS $DBUS_CFLAGS -DHAVE_DBUS -DPLUGINDIR=\\\"${libdir}/$PACKAGE\\\""]
++ [PGLD_CPPFLAGS="$PGLD_CPPFLAGS $DBUS_CFLAGS -DHAVE_DBUS"]
+ [PGLD_LDFLAGS="-Wl,-export-dynamic"]
+ [PGLD_LIBS="$PGLD_LIBS $DBUS_LIBS -ldl"])
+
+@@ -203,7 +203,7 @@ AS_IF([test "x$enable_lowmem" = "xyes"],
+ ##
+ # initial QT_flags
+ QT_CXXFLAGS=""
+-QT_CPPFLAGS="-DVERSION=\\\"$VERSION\\\" -DPGLCMDDEFAULTSPATH=\\\"${libdir}/${PACKAGE}/${PACKAGE}cmd.defaults\\\" -D_REENTRANT -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED"
++QT_CPPFLAGS="-DVERSION=\\\"$VERSION\\\" -D_REENTRANT -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED"
+ QT_LDFLAGS=""
+ QT_LIBS=""
+
+diff --git a/pgl/pgld/Makefile.am b/pgl/pgld/Makefile.am
+index ca7d509..91fc7db 100644
+--- a/pgl/pgld/Makefile.am
++++ b/pgl/pgld/Makefile.am
+@@ -1,6 +1,7 @@
+ # flags
+ AM_CFLAGS = @PGLD_CFLAGS@
+-AM_CPPFLAGS = @PGLD_CPPFLAGS@
++AM_CPPFLAGS = @PGLD_CPPFLAGS@ \
++ -DPIDFILE=\"$(localstatedir)/run/${PACKAGE}d.pid\"
+ AM_LDFLAGS = @PGLD_LDFLAGS@
+
+ # sources for pgld binary
+@@ -14,6 +15,7 @@ sbin_PROGRAMS = pgld
+
+ # build dbus library for --enable-dbus
+ if DBUSMAKE
++AM_CPPFLAGS += -DPLUGINDIR=\"$(libdir)/$(PACKAGE)\"
+ libdbusdir = $(libdir)/$(PACKAGE_NAME)
+ libdbus_LTLIBRARIES = libdbus.la
+ libdbus_la_SOURCES = src/dbus.c src/dbus.h
+diff --git a/pgl/pglgui/Makefile.am b/pgl/pglgui/Makefile.am
+index 3a1757e..05c2a54 100644
+--- a/pgl/pglgui/Makefile.am
++++ b/pgl/pglgui/Makefile.am
+@@ -11,6 +11,7 @@ MOC = @MOC@
+ AM_CXXFLAGS = @QT_CXXFLAGS@
+ AM_CPPFLAGS = \
+ @QT_CPPFLAGS@ \
++ -DPGLCMDDEFAULTSPATH=\"$(libdir)/$(PACKAGE)/$(PACKAGE)cmd.defaults\" \
+ -I./ui
+ AM_LDFLAGS = @QT_LDFLAGS@
+