Gentoo Archives: gentoo-commits

From: Austin English <wizardedit@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-firewall/sanewall/files/, net-firewall/sanewall/
Date: Thu, 28 Apr 2016 23:44:52
Message-Id: 1461886934.8ca2d3e8a5e1196cc8a6cb0ba027ef5f3bda4838.wizardedit@gentoo
1 commit: 8ca2d3e8a5e1196cc8a6cb0ba027ef5f3bda4838
2 Author: Austin English <wizardedit <AT> gentoo <DOT> org>
3 AuthorDate: Thu Apr 28 23:40:47 2016 +0000
4 Commit: Austin English <wizardedit <AT> gentoo <DOT> org>
5 CommitDate: Thu Apr 28 23:42:14 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8ca2d3e8
7
8 net-firewall/sanewall: use #!/sbin/openrc-run instead of #!/sbin/runscript
9
10 Gentoo-Bug: https://bugs.gentoo.org/573846
11
12 Package-Manager: portage-2.2.26
13
14 net-firewall/sanewall/files/sanewall.initd | 4 +-
15 net-firewall/sanewall/sanewall-1.1.6-r2.ebuild | 57 ++++++++++++++++++++++++++
16 2 files changed, 59 insertions(+), 2 deletions(-)
17
18 diff --git a/net-firewall/sanewall/files/sanewall.initd b/net-firewall/sanewall/files/sanewall.initd
19 index 665d386..3d8c2a4 100644
20 --- a/net-firewall/sanewall/files/sanewall.initd
21 +++ b/net-firewall/sanewall/files/sanewall.initd
22 @@ -1,5 +1,5 @@
23 -#!/sbin/runscript
24 -# Copyright 1999-2014 Gentoo Foundation
25 +#!/sbin/openrc-run
26 +# Copyright 1999-2016 Gentoo Foundation
27 # Distributed under the terms of the GNU General Public License v2
28 # $Id$
29
30
31 diff --git a/net-firewall/sanewall/sanewall-1.1.6-r2.ebuild b/net-firewall/sanewall/sanewall-1.1.6-r2.ebuild
32 new file mode 100644
33 index 0000000..c1f5b5d
34 --- /dev/null
35 +++ b/net-firewall/sanewall/sanewall-1.1.6-r2.ebuild
36 @@ -0,0 +1,57 @@
37 +# Copyright 1999-2016 Gentoo Foundation
38 +# Distributed under the terms of the GNU General Public License v2
39 +# $Id$
40 +
41 +EAPI=6
42 +
43 +inherit linux-info
44 +
45 +DESCRIPTION="iptables firewall generator (fork of firehol)"
46 +HOMEPAGE="http://www.sanewall.org/"
47 +SRC_URI="http://download.sanewall.org/releases/${PV}/${P}.tar.xz"
48 +
49 +LICENSE="GPL-2+"
50 +SLOT="0"
51 +KEYWORDS="~amd64 ~x86"
52 +
53 +DEPEND="app-arch/xz-utils"
54 +RDEPEND="net-firewall/iptables[ipv6]
55 + sys-apps/iproute2[-minimal]
56 + virtual/modutils
57 + || (
58 + net-misc/wget
59 + net-misc/curl
60 + )"
61 +
62 +pkg_setup() {
63 + local KCONFIG_OPTS="~NF_CONNTRACK_IPV4 ~NF_CONNTRACK_MARK ~NF_NAT ~NF_NAT_FTP ~NF_NAT_IRC \
64 + ~IP_NF_IPTABLES ~IP_NF_FILTER ~IP_NF_TARGET_REJECT ~IP_NF_TARGET_LOG ~IP_NF_TARGET_ULOG \
65 + ~IP_NF_TARGET_MASQUERADE ~IP_NF_TARGET_REDIRECT ~IP_NF_MANGLE \
66 + ~NETFILTER_XT_MATCH_LIMIT ~NETFILTER_XT_MATCH_STATE ~NETFILTER_XT_MATCH_OWNER"
67 +
68 + get_version
69 + if [[ ${KV_PATCH} -ge 25 ]] ; then
70 + CONFIG_CHECK="~NF_CONNTRACK ${KCONFIG_OPTS}"
71 + else
72 + CONFIG_CHECK="~NF_CONNTRACK_ENABLED ${KCONFIG_OPTS}"
73 + fi
74 + linux-info_pkg_setup
75 +}
76 +
77 +src_configure() {
78 + econf --docdir="/usr/share/doc/${PF}"
79 +}
80 +
81 +src_install() {
82 + default
83 + newconfd "${FILESDIR}"/${PN}.confd ${PN}
84 + newinitd "${FILESDIR}"/${PN}.initd ${PN}
85 +}
86 +
87 +pkg_postinst() {
88 + # install default configuration if it doesn't exist
89 + if [[ ! -e "${ROOT}"/etc/${PN}/${PN}.conf ]] ; then
90 + einfo "Installing a sample configuration to ${ROOT}/etc/${PN}/${PN}.conf"
91 + cp "${ROOT}"/etc/${PN}/${PN}.conf.example "${ROOT}"/etc/${PN}/${PN}.conf || die
92 + fi
93 +}