public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in net-firewall/pglinux/files: 1-pglinux-2.2.2-systemd.patch pglinux-2.2.2-path-variables.patch 1-pglinux-2.2.2-gentoo-init.patch 0-pglinux-2.2.2-gentoo-init.patch 4-pglinux-2.2.2-systemd.patch 6-pglinux-2.2.2-systemd.patch 5-pglinux-2.2.2-systemd.patch 3-pglinux-2.2.2-systemd.patch 0-pglinux-2.2.2-systemd.patch 2-pglinux-2.2.2-systemd.patch
@ 2013-09-23 23:55 Julian Ospald (hasufell)
  0 siblings, 0 replies; only message in thread
From: Julian Ospald (hasufell) @ 2013-09-23 23:55 UTC (permalink / raw
  To: gentoo-commits

hasufell    13/09/23 23:55:18

  Added:                1-pglinux-2.2.2-systemd.patch
                        pglinux-2.2.2-path-variables.patch
                        1-pglinux-2.2.2-gentoo-init.patch
                        0-pglinux-2.2.2-gentoo-init.patch
                        4-pglinux-2.2.2-systemd.patch
                        6-pglinux-2.2.2-systemd.patch
                        5-pglinux-2.2.2-systemd.patch
                        3-pglinux-2.2.2-systemd.patch
                        0-pglinux-2.2.2-systemd.patch
                        2-pglinux-2.2.2-systemd.patch
  Log:
  add systemd support wrt #485674
  
  (Portage version: 2.2.6/cvs/Linux x86_64, signed Manifest commit with key E73C35B3)

Revision  Changes    Path
1.1                  net-firewall/pglinux/files/1-pglinux-2.2.2-systemd.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/pglinux/files/1-pglinux-2.2.2-systemd.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/pglinux/files/1-pglinux-2.2.2-systemd.patch?rev=1.1&content-type=text/plain

Index: 1-pglinux-2.2.2-systemd.patch
===================================================================
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



1.1                  net-firewall/pglinux/files/pglinux-2.2.2-path-variables.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/pglinux/files/pglinux-2.2.2-path-variables.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/pglinux/files/pglinux-2.2.2-path-variables.patch?rev=1.1&content-type=text/plain

Index: pglinux-2.2.2-path-variables.patch
===================================================================
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@
 



1.1                  net-firewall/pglinux/files/1-pglinux-2.2.2-gentoo-init.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/pglinux/files/1-pglinux-2.2.2-gentoo-init.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/pglinux/files/1-pglinux-2.2.2-gentoo-init.patch?rev=1.1&content-type=text/plain

Index: 1-pglinux-2.2.2-gentoo-init.patch
===================================================================
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
 



1.1                  net-firewall/pglinux/files/0-pglinux-2.2.2-gentoo-init.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/pglinux/files/0-pglinux-2.2.2-gentoo-init.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/pglinux/files/0-pglinux-2.2.2-gentoo-init.patch?rev=1.1&content-type=text/plain

Index: 0-pglinux-2.2.2-gentoo-init.patch
===================================================================
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 $?
+}
+



1.1                  net-firewall/pglinux/files/4-pglinux-2.2.2-systemd.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/pglinux/files/4-pglinux-2.2.2-systemd.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/pglinux/files/4-pglinux-2.2.2-systemd.patch?rev=1.1&content-type=text/plain

Index: 4-pglinux-2.2.2-systemd.patch
===================================================================
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



1.1                  net-firewall/pglinux/files/6-pglinux-2.2.2-systemd.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/pglinux/files/6-pglinux-2.2.2-systemd.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/pglinux/files/6-pglinux-2.2.2-systemd.patch?rev=1.1&content-type=text/plain

Index: 6-pglinux-2.2.2-systemd.patch
===================================================================
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



1.1                  net-firewall/pglinux/files/5-pglinux-2.2.2-systemd.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/pglinux/files/5-pglinux-2.2.2-systemd.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/pglinux/files/5-pglinux-2.2.2-systemd.patch?rev=1.1&content-type=text/plain

Index: 5-pglinux-2.2.2-systemd.patch
===================================================================
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



1.1                  net-firewall/pglinux/files/3-pglinux-2.2.2-systemd.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/pglinux/files/3-pglinux-2.2.2-systemd.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/pglinux/files/3-pglinux-2.2.2-systemd.patch?rev=1.1&content-type=text/plain

Index: 3-pglinux-2.2.2-systemd.patch
===================================================================
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



1.1                  net-firewall/pglinux/files/0-pglinux-2.2.2-systemd.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/pglinux/files/0-pglinux-2.2.2-systemd.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/pglinux/files/0-pglinux-2.2.2-systemd.patch?rev=1.1&content-type=text/plain

Index: 0-pglinux-2.2.2-systemd.patch
===================================================================
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



1.1                  net-firewall/pglinux/files/2-pglinux-2.2.2-systemd.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/pglinux/files/2-pglinux-2.2.2-systemd.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/pglinux/files/2-pglinux-2.2.2-systemd.patch?rev=1.1&content-type=text/plain

Index: 2-pglinux-2.2.2-systemd.patch
===================================================================
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





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-09-23 23:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-23 23:55 [gentoo-commits] gentoo-x86 commit in net-firewall/pglinux/files: 1-pglinux-2.2.2-systemd.patch pglinux-2.2.2-path-variables.patch 1-pglinux-2.2.2-gentoo-init.patch 0-pglinux-2.2.2-gentoo-init.patch 4-pglinux-2.2.2-systemd.patch 6-pglinux-2.2.2-systemd.patch 5-pglinux-2.2.2-systemd.patch 3-pglinux-2.2.2-systemd.patch 0-pglinux-2.2.2-systemd.patch 2-pglinux-2.2.2-systemd.patch Julian Ospald (hasufell)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox