summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas K. Hüttel <dilfridge@gentoo.org>2017-01-02 09:56:28 +0100
committerAndreas K. Hüttel <dilfridge@gentoo.org>2017-01-02 09:56:49 +0100
commit8fbfa2c40c13d52a9f0703bc5b9eaaa4bc4d1d8e (patch)
treed9ceb1efab21dcfb53ea4f32878c3c918ccc94d7 /app-admin
parentnet-dns/nsd: Forgot to make one variable local. (diff)
downloadgentoo-8fbfa2c40c13d52a9f0703bc5b9eaaa4bc4d1d8e.tar.gz
gentoo-8fbfa2c40c13d52a9f0703bc5b9eaaa4bc4d1d8e.tar.bz2
gentoo-8fbfa2c40c13d52a9f0703bc5b9eaaa4bc4d1d8e.zip
app-admin/bastille: Untested revbump for bug 536292, no keywords
Please re-add keywords after testing Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'app-admin')
-rw-r--r--app-admin/bastille/bastille-3.0.9-r2.ebuild81
-rw-r--r--app-admin/bastille/files/bastille-3.0.9-openrc.patch12
-rw-r--r--app-admin/bastille/files/bastille-3.0.9-renamewidgets.patch48
3 files changed, 141 insertions, 0 deletions
diff --git a/app-admin/bastille/bastille-3.0.9-r2.ebuild b/app-admin/bastille/bastille-3.0.9-r2.ebuild
new file mode 100644
index 000000000000..1c1c80682ee2
--- /dev/null
+++ b/app-admin/bastille/bastille-3.0.9-r2.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit eutils perl-functions
+
+PATCHVER=0.2
+MY_PN=${PN/b/B}
+MY_P=${MY_PN}-${PV}
+S=${WORKDIR}/${MY_PN}
+DESCRIPTION="Bastille-Linux is a security hardening tool"
+HOMEPAGE="http://bastille-linux.org/"
+SRC_URI="mirror://sourceforge/${PN}-linux/${MY_P}.tar.bz2
+ mirror://gentoo/${P}-gentoo-${PATCHVER}.patch.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE="X"
+
+RDEPEND="
+ net-firewall/iptables
+ app-admin/logrotate
+ dev-lang/perl:=
+ dev-perl/Curses
+ net-firewall/psad
+ X? ( dev-perl/Tk )
+ virtual/logger
+"
+
+PATCHES=(
+ "${WORKDIR}"/${P}-gentoo-${PATCHVER}.patch
+
+ # make sure the Perl modules go into vendor dir
+ "${FILESDIR}/${P}-perl.patch"
+
+ # prevent file collision, bug 536292
+ "${FILESDIR}/${P}-renamewidgets.patch"
+
+ # openrc runscript rename
+ "${FILESDIR}/${P}-openrc.patch"
+)
+
+src_prepare() {
+ perl_set_version
+
+ default
+
+ cd "${S}" || die
+ chmod a+x Install.sh bastille-ipchains bastille-netfilter || die
+}
+
+src_install() {
+ perl_set_version
+ export VENDOR_LIB
+
+ cd "${S}" || die
+ DESTDIR="${D}" ./Install.sh || die
+
+ # Example configs
+ cd "${S}" || die
+ insinto /usr/share/Bastille
+ doins *.config
+
+ newinitd ${PN}-firewall.gentoo-init ${PN}-firewall
+
+ # Documentation
+ cd "${S}" || die
+ dodoc *.txt BUGS Change* README*
+ cd "${S}"/docs || die
+ doman *.1m
+}
+
+pkg_postinst() {
+ elog "Please be aware that when using the Server Lax, Server Moderate, or"
+ elog "Server Paranoia configurations, you may need to use InteractiveBastille"
+ elog "to set any advanced network information, such as masquerading and"
+ elog "internal interfaces, if you plan to use them."
+}
diff --git a/app-admin/bastille/files/bastille-3.0.9-openrc.patch b/app-admin/bastille/files/bastille-3.0.9-openrc.patch
new file mode 100644
index 000000000000..08d0a04fa480
--- /dev/null
+++ b/app-admin/bastille/files/bastille-3.0.9-openrc.patch
@@ -0,0 +1,12 @@
+diff -ruN Bastille.orig/bastille-firewall.gentoo-init Bastille/bastille-firewall.gentoo-init
+--- Bastille.orig/bastille-firewall.gentoo-init 2017-01-02 09:47:33.144433650 +0100
++++ Bastille/bastille-firewall.gentoo-init 2017-01-02 09:49:05.396431757 +0100
+@@ -1,6 +1,6 @@
+-#!/sbin/runscript
++#!/sbin/openrc-run
+ # Copyright 1999-2004 Gentoo Foundation
+-# Distributed under the terms of the GNU General Public License v2
++# Distributed under the terms of the GNU General Public License v2
+ # $Header: /var/cvsroot/gentoo-x86/app-admin/bastille/files/bastille-3.0.2-firewall.init,v 1.1 2005/07/31 05:21:10 battousai Exp $
+
+ opts="start stop"
diff --git a/app-admin/bastille/files/bastille-3.0.9-renamewidgets.patch b/app-admin/bastille/files/bastille-3.0.9-renamewidgets.patch
new file mode 100644
index 000000000000..2cf303a548dc
--- /dev/null
+++ b/app-admin/bastille/files/bastille-3.0.9-renamewidgets.patch
@@ -0,0 +1,48 @@
+diff -ruN Bastille.orig/AutomatedBastille Bastille/AutomatedBastille
+--- Bastille.orig/AutomatedBastille 2017-01-02 09:39:20.720443755 +0100
++++ Bastille/AutomatedBastille 2017-01-02 09:40:54.293441835 +0100
+@@ -77,7 +77,7 @@
+
+ # Use the Curses interface
+ use Curses;
+-use Curses::Widgets;
++use Curses::Widgets_Bastille;
+
+ # Hardcoded List of configurations -- to be replaced by list read from file
+ @list = ("WorkstationLax","WorkstationModerate","WorkstationParanoia","ServerLax","ServerModerate","ServerParanoia","Quit");
+diff -ruN Bastille.orig/Bastille_Curses.pm Bastille/Bastille_Curses.pm
+--- Bastille.orig/Bastille_Curses.pm 2005-04-18 14:32:10.000000000 +0200
++++ Bastille/Bastille_Curses.pm 2017-01-02 09:41:24.470441216 +0100
+@@ -34,7 +34,7 @@
+ sub do_Bastille {
+
+ use Curses;
+- use Curses::Widgets;
++ use Curses::Widgets_Bastille;
+
+ # Number_Modules is the number of modules loaded in by Load_Questions
+ $Number_Modules=0;
+diff -ruN Bastille.orig/Curses/Widgets.pm Bastille/Curses/Widgets.pm
+--- Bastille.orig/Curses/Widgets.pm 2005-04-06 01:18:11.000000000 +0200
++++ Bastille/Curses/Widgets.pm 2017-01-02 09:42:31.145439848 +0100
+@@ -11,7 +11,7 @@
+ #
+ ########################################################################
+
+-package Curses::Widgets;
++package Curses::Widgets_Bastille;
+
+ use strict;
+ use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION);
+diff -ruN Bastille.orig/Install.sh Bastille/Install.sh
+--- Bastille.orig/Install.sh 2017-01-02 09:39:20.767443754 +0100
++++ Bastille/Install.sh 2017-01-02 09:41:05.537441604 +0100
+@@ -15,7 +15,7 @@
+ cp BastilleBackEnd ${DESTDIR}/usr/sbin
+ cp Bastille_Curses.pm ${DESTDIR}/${VENDOR_LIB}
+ cp Bastille_Tk.pm ${DESTDIR}/${VENDOR_LIB}
+-cp Curses/Widgets.pm ${DESTDIR}/${VENDOR_LIB}/Curses
++cp Curses/Widgets.pm ${DESTDIR}/${VENDOR_LIB}/Curses/Widgets_Bastille.pm
+ cp InteractiveBastille ${DESTDIR}/usr/sbin
+ # Questions.txt has been replaced by Modules.txt and Questions/
+ #cp Questions.txt ${DESTDIR}/usr/share/Bastille