Gentoo Archives: gentoo-commits

From: Ian Delaney <idella4@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-firewall/fwknop/, net-firewall/fwknop/files/
Date: Tue, 24 Nov 2015 23:28:31
Message-Id: 1448407682.e7fbae855a57b354bc05bf6efa507474c8e8bc1a.idella4@gentoo
1 commit: e7fbae855a57b354bc05bf6efa507474c8e8bc1a
2 Author: Ilya Tumaykin <itumaykin <AT> gmail <DOT> com>
3 AuthorDate: Mon Nov 23 15:08:31 2015 +0000
4 Commit: Ian Delaney <idella4 <AT> gentoo <DOT> org>
5 CommitDate: Tue Nov 24 23:28:02 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e7fbae85
7
8 net-firewall/fwknop: remove old
9
10 net-firewall/fwknop/files/fwknopd.init | 92 ----------------------
11 net-firewall/fwknop/fwknop-2.6.7.ebuild | 135 --------------------------------
12 2 files changed, 227 deletions(-)
13
14 diff --git a/net-firewall/fwknop/files/fwknopd.init b/net-firewall/fwknop/files/fwknopd.init
15 deleted file mode 100644
16 index 232e1fc..0000000
17 --- a/net-firewall/fwknop/files/fwknopd.init
18 +++ /dev/null
19 @@ -1,92 +0,0 @@
20 -#!/sbin/runscript
21 -# Copyright 1999-2015 Gentoo Foundation
22 -# Distributed under the terms of the GNU General Public License v2
23 -# $Id$
24 -
25 -extra_commands="checkconfig"
26 -extra_started_commands="reload"
27 -
28 -: ${FWKNOPD_BINARY:=/usr/sbin/fwknopd}
29 -: ${FWKNOPD_CONFDIR:=/etc/fwknop}
30 -: ${FWKNOPD_CONFIG:=${FWKNOPD_CONFDIR}/fwknopd.conf}
31 -: ${FWKNOPD_PIDFILE:=/run/fwknop/${SVCNAME}.pid}
32 -
33 -depend() {
34 - after iptables ip6tables ebtables firewall
35 - use logger
36 - if [ "${rc_need+set}" = "set" ]; then
37 - : # Do nothing, the user has explicitly set rc_need
38 - else
39 - local x warn_intf
40 - for x in $(awk '/^PCAP_INTF/{ sub(";$", ""); print $2 }' "${FWKNOPD_CONFIG}" 2>/dev/null); do
41 - warn_intf="${warn_intf} ${x}"
42 - done
43 - if [ -n "${warn_intf}" ]; then
44 - need net
45 - ewarn "You are binding an interface in PCAP_INTF statement in your fwknopd.conf!"
46 - ewarn "You must add rc_need=\"net.FOO\" to your /etc/conf.d/${SVCNAME},"
47 - ewarn "where FOO is the following interface(s):"
48 - ewarn "${warn_intf}"
49 - else
50 - # if PCAP_INTF and PCAP_FILE are not set, then fwknopd uses eth0
51 - if ! grep -q '^PCAP_FILE' "${FWKNOPD_CONFIG}"; then
52 - need net
53 - ewarn "You are not binding any interface in PCAP_INTF statement in your fwknopd.conf,"
54 - ewarn "neither you are providing PCAP_FILE option. Thus fwknopd will listen on eth0."
55 - ewarn "You must add rc_need=\"net.eth0\" to your /etc/conf.d/${SVCNAME}."
56 - fi
57 - fi
58 - fi
59 -}
60 -
61 -checkconfig() {
62 - if [ ! -e "${FWKNOPD_CONFDIR}"/fwknopd.conf ]; then
63 - eerror "You need ${FWKNOPD_CONFDIR}/fwknopd.conf file to run fwknopd"
64 - eerror "Example is located at /etc/fwknop/fwknopd.conf.example"
65 - return 1
66 - fi
67 -
68 - if [ ! -e "${FWKNOPD_CONFDIR}"/access.conf ]; then
69 - eerror "You need ${FWKNOPD_CONFDIR}/access.conf file to run fwknopd"
70 - eerror "Example is located at /etc/fwknop/access.conf.example"
71 - return 1
72 - fi
73 -
74 - [ "${FWKNOPD_PIDFILE}" != "/run/fwknop/${SVCNAME}.pid" ] \
75 - && FWKNOPD_OPTS="${FWKNOPD_OPTS} --pid-file=${FWKNOPD_PIDFILE}"
76 -
77 - [ "${FWKNOPD_CONFDIR}" != "/etc/fwknop" ] \
78 - && FWKNOPD_OPTS="${FWKNOPD_OPTS} \
79 - --config=${FWKNOPD_CONFDIR}/fwknopd.conf \
80 - --access-file=${FWKNOPD_CONFDIR}/access.conf"
81 -
82 - return 0
83 -}
84 -
85 -start() {
86 - checkconfig || return 1
87 -
88 - ebegin "Starting ${SVCNAME}"
89 - start-stop-daemon --start \
90 - --exec ${FWKNOPD_BINARY} --pidfile ${FWKNOPD_PIDFILE} \
91 - -- ${FWKNOPD_OPTS}
92 - eend $?
93 -}
94 -
95 -stop() {
96 - if [ "${RC_CMD}" = "restart" ]; then
97 - checkconfig || return 1
98 - fi
99 -
100 - ebegin "Stopping ${SVCNAME}"
101 - start-stop-daemon --stop --pidfile ${FWKNOPD_PIDFILE}
102 - eend $?
103 -}
104 -
105 -reload() {
106 - checkconfig || return 1
107 -
108 - ebegin "Reloading ${SVCNAME} configuration"
109 - start-stop-daemon --signal HUP --pidfile ${FWKNOPD_PIDFILE}
110 - eend $?
111 -}
112
113 diff --git a/net-firewall/fwknop/fwknop-2.6.7.ebuild b/net-firewall/fwknop/fwknop-2.6.7.ebuild
114 deleted file mode 100644
115 index bbad392..0000000
116 --- a/net-firewall/fwknop/fwknop-2.6.7.ebuild
117 +++ /dev/null
118 @@ -1,135 +0,0 @@
119 -# Copyright 1999-2015 Gentoo Foundation
120 -# Distributed under the terms of the GNU General Public License v2
121 -# $Id$
122 -
123 -EAPI=5
124 -
125 -AUTOTOOLS_AUTORECONF=1
126 -DISABLE_AUTOFORMATTING=1
127 -
128 -DISTUTILS_OPTIONAL=1
129 -# Python extension supports only Python2
130 -# See https://github.com/mrash/fwknop/issues/167
131 -PYTHON_COMPAT=( python2_7 )
132 -
133 -inherit autotools-utils distutils-r1 linux-info readme.gentoo systemd
134 -
135 -DESCRIPTION="Single Packet Authorization and Port Knocking application"
136 -HOMEPAGE="http://www.cipherdyne.org/fwknop/"
137 -SRC_URI="https://github.com/mrash/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
138 -
139 -LICENSE="GPL-2"
140 -SLOT="0"
141 -KEYWORDS="~amd64 ~x86"
142 -IUSE="client extras firewalld gdbm gpg iptables python server udp-server"
143 -
144 -RDEPEND="
145 - client? ( net-misc/wget[ssl] )
146 - gpg? (
147 - dev-libs/libassuan
148 - dev-libs/libgpg-error
149 - )
150 - python? ( ${PYTHON_DEPS} )
151 -"
152 -DEPEND="${RDEPEND}
153 - gdbm? ( sys-libs/gdbm )
154 - gpg? ( app-crypt/gpgme )
155 - firewalld? ( net-firewall/firewalld[${PYTHON_USEDEP}] )
156 - iptables? ( net-firewall/iptables )
157 - server? ( !udp-server? ( net-libs/libpcap ) )
158 -"
159 -
160 -REQUIRED_USE="
161 - python? ( ${PYTHON_REQUIRED_USE} )
162 - firewalld? ( server )
163 - iptables? ( server )
164 - server? ( ^^ ( firewalld iptables ) )
165 - udp-server? ( server )
166 -"
167 -
168 -DOCS=( ChangeLog README.md )
169 -DOC_CONTENTS="
170 -Example configuration files were installed in /etc/fwknopd directory.
171 -Please edit them to fit your needs and then remove the .example suffix.
172 -
173 -fwknopd supports several backends: firewalld, iptables, ipfw, pf, ipf.
174 -You can set the desired backend via FIREWALL_EXE option in fwknopd.conf
175 -instead of the default one chosen at compile time.
176 -"
177 -
178 -pkg_pretend() {
179 - if use server; then
180 - if ! linux_config_exists || ! linux_chkconfig_present NETFILTER_XT_MATCH_COMMENT; then
181 - ewarn "fwknopd uses the iptables 'comment' match to expire SPA rules,"
182 - ewarn "which is a major security feature and is enabled by default."
183 - ewarn "Please either enable NETFILTER_XT_MATCH_COMMENT support in your"
184 - ewarn "kernel, or set the appropriate ENABLE_{FIREWD,IPT}_COMMENT_CHECK"
185 - ewarn "to 'N' in your fwknopd.conf file."
186 - fi
187 - fi
188 -}
189 -
190 -src_prepare() {
191 - # Install example configs with .example suffix
192 - if use server; then
193 - sed -i -e 's/conf;/conf.example;/g' "${S}"/Makefile.am || die
194 - fi
195 -
196 - autotools-utils_src_prepare
197 -
198 - if use python; then
199 - cd "${S}"/python || die
200 - distutils-r1_src_prepare
201 - fi
202 -}
203 -
204 -src_configure() {
205 - local myeconfargs=(
206 - --localstatedir=/run
207 - --enable-digest-cache
208 - $(use_enable client)
209 - $(use_enable !gdbm file-cache)
210 - $(use_enable server)
211 - $(use_enable udp-server)
212 - $(use_with gpg gpgme)
213 - )
214 - use firewalld && myeconfargs+=(--with-firewalld=/usr/sbin/firewalld)
215 - use iptables && myeconfargs+=(--with-iptables=/sbin/iptables)
216 -
217 - autotools-utils_src_configure
218 -}
219 -
220 -src_compile() {
221 - autotools-utils_src_compile
222 -
223 - if use python; then
224 - cd "${S}"/python || die
225 - distutils-r1_src_compile
226 - fi
227 -}
228 -
229 -src_install() {
230 - autotools-utils_src_install
231 - prune_libtool_files --modules
232 -
233 - if use server; then
234 - newinitd "${FILESDIR}/fwknopd.init" fwknopd
235 - newconfd "${FILESDIR}/fwknopd.confd" fwknopd
236 - systemd_dounit extras/systemd/fwknopd.service
237 - systemd_newtmpfilesd extras/systemd/fwknopd.tmpfiles.conf fwknopd.conf
238 - readme.gentoo_create_doc
239 - fi
240 -
241 - use extras && dodoc "${S}/extras/apparmor/usr.sbin.fwknopd"
242 -
243 - if use python; then
244 - # Unset DOCS since distutils-r1.eclass interferes
245 - local DOCS=()
246 - cd "${S}"/python || die
247 - distutils-r1_src_install
248 - fi
249 -}
250 -
251 -pkg_postinst() {
252 - use server && readme.gentoo_print_elog
253 -}