1 |
commit: 64794ff56c4f0b40ed28d773805a1d0918199b12 |
2 |
Author: Hank Leininger <hlein <AT> korelogic <DOT> com> |
3 |
AuthorDate: Mon Jun 8 09:32:35 2020 +0000 |
4 |
Commit: Aaron Bauman <bman <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jul 1 23:55:05 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64794ff5 |
7 |
|
8 |
net-firewall/fwknop: Drop python2-only module, cleanup .a |
9 |
|
10 |
The fko python module is python2-only. Most(?) uses of fwknop do not |
11 |
need the optional python module at all. Removed it and if that causes |
12 |
problems, will deal with it. |
13 |
|
14 |
Also added a USE=static-libs flag, and clean up .a if it is not set. |
15 |
|
16 |
Signed-off-by: Hank Leininger <hlein <AT> korelogic.com> |
17 |
Closes: https://bugs.gentoo.org/724896 |
18 |
Closes: https://bugs.gentoo.org/708414 |
19 |
Closes: https://github.com/gentoo/gentoo/pull/16115 |
20 |
Signed-off-by: Aaron Bauman <bman <AT> gentoo.org> |
21 |
|
22 |
net-firewall/fwknop/fwknop-2.6.10-r2.ebuild | 126 ++++++++++++++++++++++++++++ |
23 |
1 file changed, 126 insertions(+) |
24 |
|
25 |
diff --git a/net-firewall/fwknop/fwknop-2.6.10-r2.ebuild b/net-firewall/fwknop/fwknop-2.6.10-r2.ebuild |
26 |
new file mode 100644 |
27 |
index 00000000000..64a0407290b |
28 |
--- /dev/null |
29 |
+++ b/net-firewall/fwknop/fwknop-2.6.10-r2.ebuild |
30 |
@@ -0,0 +1,126 @@ |
31 |
+# Copyright 1999-2020 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=7 |
35 |
+ |
36 |
+inherit autotools eutils linux-info readme.gentoo-r1 systemd |
37 |
+ |
38 |
+DESCRIPTION="Single Packet Authorization and Port Knocking application" |
39 |
+HOMEPAGE="https://www.cipherdyne.org/fwknop/" |
40 |
+SRC_URI="https://www.cipherdyne.org/fwknop/download/${P}.tar.gz" |
41 |
+ |
42 |
+LICENSE="GPL-2+" |
43 |
+SLOT="0" |
44 |
+KEYWORDS="~amd64 ~x86" |
45 |
+IUSE="+client extras firewalld gdbm gpg +iptables nfqueue +server static-libs udp-server" |
46 |
+ |
47 |
+DEPEND=" |
48 |
+ client? ( net-misc/wget[ssl] ) |
49 |
+ firewalld? ( net-firewall/firewalld ) |
50 |
+ gdbm? ( sys-libs/gdbm ) |
51 |
+ gpg? ( |
52 |
+ app-crypt/gpgme |
53 |
+ dev-libs/libassuan |
54 |
+ dev-libs/libgpg-error |
55 |
+ ) |
56 |
+ iptables? ( net-firewall/iptables ) |
57 |
+ nfqueue? ( net-libs/libnetfilter_queue ) |
58 |
+ server? ( !nfqueue? ( !udp-server? ( net-libs/libpcap ) ) ) |
59 |
+" |
60 |
+RDEPEND="${DEPEND}" |
61 |
+ |
62 |
+REQUIRED_USE=" |
63 |
+ nfqueue? ( server ) |
64 |
+ server? ( ^^ ( firewalld iptables ) ) |
65 |
+ udp-server? ( server ) |
66 |
+" |
67 |
+ |
68 |
+PATCHES=( "${FILESDIR}/${PN}-2.6.10_fno-common_fix.patch" ) |
69 |
+ |
70 |
+DOCS=( AUTHORS ChangeLog README ) |
71 |
+ |
72 |
+DISABLE_AUTOFORMATTING=1 |
73 |
+DOC_CONTENTS=" |
74 |
+Example configuration files were installed to '${EPREFIX}/etc/fwknopd/'. |
75 |
+Please edit them to suit your needs and then remove the .example suffix. |
76 |
+ |
77 |
+fwknopd supports several backends: firewalld, iptables, ipfw, pf, ipf. |
78 |
+You can set the desired backend via FIREWALL_EXE option in fwknopd.conf |
79 |
+instead of the default one chosen at compile time. |
80 |
+" |
81 |
+ |
82 |
+pkg_setup() { |
83 |
+ linux-info_pkg_setup |
84 |
+} |
85 |
+ |
86 |
+src_prepare() { |
87 |
+ default_src_prepare |
88 |
+ |
89 |
+ # Install example configs with .example suffix. |
90 |
+ if use server; then |
91 |
+ sed -i -e 's|conf;|conf.example;|g' Makefile.am || die |
92 |
+ fi |
93 |
+ |
94 |
+ eautoreconf |
95 |
+} |
96 |
+ |
97 |
+src_configure() { |
98 |
+ local myeconfargs=( |
99 |
+ --localstatedir="${EPREFIX}/run" |
100 |
+ $(use_enable client) |
101 |
+ $(use_enable !gdbm file-cache) |
102 |
+ $(use_enable nfqueue nfq-capture) |
103 |
+ $(use_enable server) |
104 |
+ $(use_enable udp-server) |
105 |
+ $(use_with gpg gpgme) |
106 |
+ ) |
107 |
+ use firewalld && myeconfargs+=(--with-firewalld="${EPREFIX}/usr/sbin/firewalld") |
108 |
+ use iptables && myeconfargs+=(--with-iptables="${EPREFIX}/sbin/iptables") |
109 |
+ |
110 |
+ econf "${myeconfargs[@]}" |
111 |
+} |
112 |
+ |
113 |
+src_install() { |
114 |
+ default_src_install |
115 |
+ |
116 |
+ if use extras; then |
117 |
+ dodoc extras/apparmor/usr.sbin.fwknopd |
118 |
+ dodoc extras/console-qr/console-qr.sh |
119 |
+ dodoc extras/fwknop-launcher/* |
120 |
+ fi |
121 |
+ |
122 |
+ if use server; then |
123 |
+ newinitd "${FILESDIR}/fwknopd.init" fwknopd |
124 |
+ newconfd "${FILESDIR}/fwknopd.confd" fwknopd |
125 |
+ systemd_dounit "${FILESDIR}/fwknopd.service" |
126 |
+ systemd_newtmpfilesd "${FILESDIR}/fwknopd.tmpfiles.conf" fwknopd.conf |
127 |
+ readme.gentoo_create_doc |
128 |
+ fi |
129 |
+ |
130 |
+ find "${ED}" -type f -name "*.la" -delete || die |
131 |
+ |
132 |
+ if ! use static-libs ; then |
133 |
+ find "${ED}" -type f -name libfko.a -delete || die |
134 |
+ fi |
135 |
+} |
136 |
+ |
137 |
+pkg_postinst() { |
138 |
+ if use server; then |
139 |
+ readme.gentoo_print_elog |
140 |
+ |
141 |
+ if ! linux_config_exists || ! linux_chkconfig_present NETFILTER_XT_MATCH_COMMENT; then |
142 |
+ echo |
143 |
+ ewarn "fwknopd daemon relies on the 'comment' match in order to expire" |
144 |
+ ewarn "created firewall rules, which is an important security feature." |
145 |
+ ewarn "Please enable NETFILTER_XT_MATCH_COMMENT support in your kernel." |
146 |
+ echo |
147 |
+ fi |
148 |
+ if use nfqueue && \ |
149 |
+ ! linux_config_exists || ! linux_chkconfig_present NETFILTER_XT_TARGET_NFQUEUE; then |
150 |
+ echo |
151 |
+ ewarn "fwknopd daemon relies on the 'NFQUEUE' target for NFQUEUE mode." |
152 |
+ ewarn "Please enable NETFILTER_XT_TARGET_NFQUEUE support in your kernel." |
153 |
+ echo |
154 |
+ fi |
155 |
+ fi |
156 |
+} |