[gentoo-commits] repo/gentoo:master commit in: net-firewall/fwknop/files/, net-firewall/fwknop/

2020-04-10 Thread Andreas Sturmlechner
commit: 023eef270a7c2239cb7bca2c0b059aff6a52eda3
Author: Hank Leininger  korelogic  com>
AuthorDate: Tue Feb 25 06:35:19 2020 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Fri Apr 10 14:57:44 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=023eef27

net-firewall/fwknop: fix build with -fno-common or gcc-10

Cherry-picked fix from
https://github.com/Jakuje/fwknop/commit/a87325b0816a79329cf0b4d4f9ebf247ead117db

Signed-off-by: Hank Leininger  korelogic.com>
Closes: https://bugs.gentoo.org/706816
Package-Manager: Portage-2.3.89, Repoman-2.3.20
Closes: https://github.com/gentoo/gentoo/pull/14766
Signed-off-by: Andreas Sturmlechner  gentoo.org>

 .../files/fwknop-2.6.10_fno-common_fix.patch   | 23 ++
 net-firewall/fwknop/fwknop-2.6.10-r1.ebuild|  2 ++
 2 files changed, 25 insertions(+)

diff --git a/net-firewall/fwknop/files/fwknop-2.6.10_fno-common_fix.patch 
b/net-firewall/fwknop/files/fwknop-2.6.10_fno-common_fix.patch
new file mode 100644
index 000..9c144cc1edd
--- /dev/null
+++ b/net-firewall/fwknop/files/fwknop-2.6.10_fno-common_fix.patch
@@ -0,0 +1,23 @@
+From a87325b0816a79329cf0b4d4f9ebf247ead117db Mon Sep 17 00:00:00 2001
+From: Jakub Jelen 
+Date: Mon, 10 Feb 2020 15:21:56 +0100
+Subject: [PATCH] Unbreak build with gcc10 (-fno-common)
+
+Signed-off-by: Jakub Jelen 
+---
+ client/log_msg.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/client/log_msg.h b/client/log_msg.h
+index cc17716b..3dda1614 100644
+--- a/client/log_msg.h
 b/client/log_msg.h
+@@ -38,7 +38,7 @@ enum
+ LOG_VERBOSITY_INFO, /*!< Constant to define a INFO message */
+ LOG_VERBOSITY_DEBUG,/*!< Constant to define a DEBUG message */
+ LOG_LAST_VERBOSITY
+-} log_level_t;
++};
+ 
+ #define LOG_DEFAULT_VERBOSITY   LOG_VERBOSITY_NORMAL/*!< Default 
verbosity to use */
+ 

diff --git a/net-firewall/fwknop/fwknop-2.6.10-r1.ebuild 
b/net-firewall/fwknop/fwknop-2.6.10-r1.ebuild
index 52c57d2312c..786366d6895 100644
--- a/net-firewall/fwknop/fwknop-2.6.10-r1.ebuild
+++ b/net-firewall/fwknop/fwknop-2.6.10-r1.ebuild
@@ -43,6 +43,8 @@ REQUIRED_USE="
udp-server? ( server )
 "
 
+PATCHES=( "${FILESDIR}/${PN}-2.6.10_fno-common_fix.patch" )
+
 DOCS=( AUTHORS ChangeLog README )
 
 DISABLE_AUTOFORMATTING=1



[gentoo-commits] repo/gentoo:master commit in: net-firewall/fwknop/files/

2016-06-11 Thread Göktürk Yüksek
commit: 79579f5f468b2d633cff2236fe2a1a0afdd85ba5
Author: Ilya Tumaykin  gmail  com>
AuthorDate: Tue May 31 03:24:40 2016 +
Commit: Göktürk Yüksek  gentoo  org>
CommitDate: Sun Jun 12 04:27:56 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79579f5f

net-firewall/fwknop: bump initscript copyright years after shebang update

Package-Manager: portage-2.3.0_rc1

 net-firewall/fwknop/files/fwknopd.init | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net-firewall/fwknop/files/fwknopd.init 
b/net-firewall/fwknop/files/fwknopd.init
index a73268a..cbf6e22 100644
--- a/net-firewall/fwknop/files/fwknopd.init
+++ b/net-firewall/fwknop/files/fwknopd.init
@@ -1,5 +1,5 @@
 #!/sbin/openrc-run
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 



[gentoo-commits] repo/gentoo:master commit in: net-firewall/fwknop/files/, net-firewall/fwknop/

2015-11-24 Thread Ian Delaney
commit: abf34ce024c176aa0bc10c0d84b0b33bc51a4c3e
Author: Ilya Tumaykin  gmail  com>
AuthorDate: Mon Nov 23 14:26:19 2015 +
Commit: Ian Delaney  gentoo  org>
CommitDate: Tue Nov 24 23:27:57 2015 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=abf34ce0

net-firewall/fwknop: revbump to fix depend() and update regexps in initscript

FWKNOPD_CONFIG file should be parsed only if it exists, which is not the
case if the user has not configured fwknopd yet. See Gentoo bug #565864.

Regexps that are used to parse FWKNOPD_CONFIG file now allow spaces
before statements in order to handle possible indentation properly.

Gentoo-Bug: 565864

 net-firewall/fwknop/files/fwknopd.init-r1  |  92 
 net-firewall/fwknop/fwknop-2.6.7-r1.ebuild | 135 +
 2 files changed, 227 insertions(+)

diff --git a/net-firewall/fwknop/files/fwknopd.init-r1 
b/net-firewall/fwknop/files/fwknopd.init-r1
new file mode 100644
index 000..9e8ecdc
--- /dev/null
+++ b/net-firewall/fwknop/files/fwknopd.init-r1
@@ -0,0 +1,92 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+extra_commands="checkconfig"
+extra_started_commands="reload"
+
+: ${FWKNOPD_BINARY:=/usr/sbin/fwknopd}
+: ${FWKNOPD_CONFDIR:=/etc/fwknop}
+: ${FWKNOPD_CONFIG:=${FWKNOPD_CONFDIR}/fwknopd.conf}
+: ${FWKNOPD_PIDFILE:=/run/fwknop/${SVCNAME}.pid}
+
+depend() {
+   after iptables ip6tables ebtables firewall
+   use logger
+   if [ "${rc_need+set}" = "set" ]; then
+   : # Do nothing, the user has explicitly set rc_need
+   elif [ -f "${FWKNOPD_CONFIG}" ]; then
+   local x warn_intf
+   for x in $(awk '/^[[:blank:]]*PCAP_INTF/{ sub(";$", ""); print 
$2 }' "${FWKNOPD_CONFIG}" 2>/dev/null); do
+   warn_intf="${warn_intf} ${x}"
+   done
+   if [ -n "${warn_intf}" ]; then
+   need net
+   ewarn "You are binding an interface in PCAP_INTF 
statement in your fwknopd.conf!"
+   ewarn "You must add rc_need=\"net.FOO\" to your 
/etc/conf.d/${SVCNAME},"
+   ewarn "where FOO is the following interface(s):"
+   ewarn "${warn_intf}"
+   else
+   # If PCAP_INTF and PCAP_FILE are not set, then fwknopd 
uses eth0
+   if ! grep -q '^[[:blank:]]*PCAP_FILE' 
"${FWKNOPD_CONFIG}"; then
+   need net
+   ewarn "You are not binding any interface in 
PCAP_INTF statement in your fwknopd.conf,"
+   ewarn "neither you are providing PCAP_FILE 
option. Thus fwknopd will listen on eth0."
+   ewarn "You must add rc_need=\"net.eth0\" to 
your /etc/conf.d/${SVCNAME}."
+   fi
+   fi
+   fi
+}
+
+checkconfig() {
+   if [ ! -e "${FWKNOPD_CONFDIR}"/fwknopd.conf ]; then
+   eerror "You need ${FWKNOPD_CONFDIR}/fwknopd.conf file to run 
fwknopd"
+   eerror "Example is located at /etc/fwknop/fwknopd.conf.example"
+   return 1
+   fi
+
+   if [ ! -e "${FWKNOPD_CONFDIR}"/access.conf ]; then
+   eerror "You need ${FWKNOPD_CONFDIR}/access.conf file to run 
fwknopd"
+   eerror "Example is located at /etc/fwknop/access.conf.example"
+   return 1
+   fi
+
+   [ "${FWKNOPD_PIDFILE}" != "/run/fwknop/${SVCNAME}.pid" ] \
+   && FWKNOPD_OPTS="${FWKNOPD_OPTS} --pid-file=${FWKNOPD_PIDFILE}"
+
+   [ "${FWKNOPD_CONFDIR}" != "/etc/fwknop" ] \
+   && FWKNOPD_OPTS="${FWKNOPD_OPTS} \
+   --config=${FWKNOPD_CONFDIR}/fwknopd.conf \
+   --access-file=${FWKNOPD_CONFDIR}/access.conf"
+
+   return 0
+}
+
+start() {
+   checkconfig || return 1
+
+   ebegin "Starting ${SVCNAME}"
+   start-stop-daemon --start \
+   --exec ${FWKNOPD_BINARY} --pidfile ${FWKNOPD_PIDFILE} \
+   -- ${FWKNOPD_OPTS}
+   eend $?
+}
+
+stop() {
+   if [ "${RC_CMD}" = "restart" ]; then
+   checkconfig || return 1
+   fi
+
+   ebegin "Stopping ${SVCNAME}"
+   start-stop-daemon --stop --pidfile ${FWKNOPD_PIDFILE}
+   eend $?
+}
+
+reload() {
+   checkconfig || return 1
+
+   ebegin "Reloading ${SVCNAME} configuration"
+   start-stop-daemon --signal HUP --pidfile ${FWKNOPD_PIDFILE}
+   eend $?
+}

diff --git a/net-firewall/fwknop/fwknop-2.6.7-r1.ebuild 
b/net-firewall/fwknop/fwknop-2.6.7-r1.ebuild
new file mode 100644
index 000..1a798bd
--- /dev/null
+++ b/net-firewall/fwknop/fwknop-2.6.7-r1.ebuild
@@ -0,0 +1,135 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1