diff options
author | Pacho Ramos <pacho@gentoo.org> | 2013-09-06 19:54:18 +0000 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2013-09-06 19:54:18 +0000 |
commit | 2958154f5867b14adc9bd3acc21aad1bc74f6f50 (patch) | |
tree | 71aa8e73595c3f253ba03a4c0fc057a650a23add /net-firewall/arno-iptables-firewall | |
parent | version bump, close bug #483870 (diff) | |
download | gentoo-2-2958154f5867b14adc9bd3acc21aad1bc74f6f50.tar.gz gentoo-2-2958154f5867b14adc9bd3acc21aad1bc74f6f50.tar.bz2 gentoo-2-2958154f5867b14adc9bd3acc21aad1bc74f6f50.zip |
Add unit file (#483602 by Ferenc Erki)
(Portage version: 2.2.1/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)
Diffstat (limited to 'net-firewall/arno-iptables-firewall')
3 files changed, 112 insertions, 1 deletions
diff --git a/net-firewall/arno-iptables-firewall/ChangeLog b/net-firewall/arno-iptables-firewall/ChangeLog index 659f3169d74c..1159cfecd6b7 100644 --- a/net-firewall/arno-iptables-firewall/ChangeLog +++ b/net-firewall/arno-iptables-firewall/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-firewall/arno-iptables-firewall # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-firewall/arno-iptables-firewall/ChangeLog,v 1.7 2013/05/18 09:09:18 hwoarang Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-firewall/arno-iptables-firewall/ChangeLog,v 1.8 2013/09/06 19:54:18 pacho Exp $ + +*arno-iptables-firewall-2.0.1d-r2 (06 Sep 2013) + + 06 Sep 2013; Pacho Ramos <pacho@gentoo.org> + +arno-iptables-firewall-2.0.1d-r2.ebuild, + +files/arno-iptables-firewall.service: + Add unit file (#483602 by Ferenc Erki) *arno-iptables-firewall-2.0.1d-r1 (18 May 2013) diff --git a/net-firewall/arno-iptables-firewall/arno-iptables-firewall-2.0.1d-r2.ebuild b/net-firewall/arno-iptables-firewall/arno-iptables-firewall-2.0.1d-r2.ebuild new file mode 100644 index 000000000000..282b98d547cb --- /dev/null +++ b/net-firewall/arno-iptables-firewall/arno-iptables-firewall-2.0.1d-r2.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-firewall/arno-iptables-firewall/arno-iptables-firewall-2.0.1d-r2.ebuild,v 1.1 2013/09/06 19:54:18 pacho Exp $ + +EAPI=5 +inherit readme.gentoo systemd + +DESCRIPTION="Arno's iptables firewall script" +HOMEPAGE="http://rocky.eld.leidenuniv.nl" +SRC_URI="http://rocky.eld.leidenuniv.nl/${PN}/${PN}_${PV}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+plugins" + +# sys-apps/coreutils dependency wrt +# https://bugs.gentoo.org/show_bug.cgi?id=448716 + +DEPEND="" +RDEPEND="net-firewall/iptables + || ( <sys-apps/coreutils-8.20 >sys-apps/coreutils-8.20-r1 ) + sys-apps/iproute2 + plugins? ( net-dns/bind-tools )" + +S="${WORKDIR}/${PN}_${PV}" + +DISABLE_AUTOFORMATTING="yes" +DOC_CONTENTS="You will need to configure /etc/${PN}/firewall.conf +before using this package. To start the script, run: + +/etc/init.d/${PN} start (for openRC) +systemctl start ${PN} (for Systemd) + +If you want to start this script at boot, run: + +rc-update add ${PN} default (for openRC) +systemctl enable ${PN} (for Systemd)" + +src_prepare() { + sed -i -e 's:/usr/local/share/:/usr/libexec/:' \ + etc/"${PN}"/firewall.conf || die "Sed failed!" +} + +src_install() { + + insinto /etc/"${PN}" + doins etc/"${PN}"/firewall.conf + doins etc/"${PN}"/custom-rules + + doinitd "${FILESDIR}/${PN}" + systemd_dounit "${FILESDIR}/${PN}.service" + + dobin bin/arno-fwfilter + dosbin bin/"${PN}" + + insinto /usr/libexec/"${PN}" + doins share/"${PN}"/environment + + dodoc CHANGELOG README + readme.gentoo_create_doc + + if use plugins + then + insinto /etc/"${PN}"/plugins + doins etc/"${PN}"/plugins/* + + insinto /usr/libexec/"${PN}"/plugins + doins share/"${PN}"/plugins/*.plugin + + exeinto /usr/libexec/"${PN}"/plugins + doexe share/"${PN}"/plugins/dyndns-host-open-helper + doexe share/"${PN}"/plugins/traffic-accounting-helper + doexe share/"${PN}"/plugins/traffic-accounting-log-rotate + doexe share/"${PN}"/plugins/traffic-accounting-show + + docinto plugins + dodoc share/"${PN}"/plugins/*.CHANGELOG + fi + + doman share/man/man1/arno-fwfilter.1 \ + share/man/man8/"${PN}".8 +} + +pkg_postinst () { + ewarn "When you stop this script, all firewall rules are flushed!" + ewarn "Make sure to not use multiple firewall scripts simultaneously" + ewarn "unless you know what you are doing!" + readme.gentoo_print_elog +} diff --git a/net-firewall/arno-iptables-firewall/files/arno-iptables-firewall.service b/net-firewall/arno-iptables-firewall/files/arno-iptables-firewall.service new file mode 100644 index 000000000000..e663f08a08eb --- /dev/null +++ b/net-firewall/arno-iptables-firewall/files/arno-iptables-firewall.service @@ -0,0 +1,14 @@ +[Unit] +Description=A secure stateful firewall for both single and multi-homed machine +Before=network.target +Wants=network.target + +[Service] +Type=oneshot +ExecStart=/usr/sbin/arno-iptables-firewall start +ExecStop=/usr/sbin/arno-iptables-firewall stop +ExecReload=/usr/sbin/arno-iptables-firewall force-reload +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target |