Gentoo Archives: gentoo-commits

From: "Andreas Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/bastille/, app-admin/bastille/files/
Date: Mon, 02 Jan 2017 08:57:06
Message-Id: 1483347409.8fbfa2c40c13d52a9f0703bc5b9eaaa4bc4d1d8e.dilfridge@gentoo
1 commit: 8fbfa2c40c13d52a9f0703bc5b9eaaa4bc4d1d8e
2 Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 2 08:56:28 2017 +0000
4 Commit: Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 2 08:56:49 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8fbfa2c4
7
8 app-admin/bastille: Untested revbump for bug 536292, no keywords
9
10 Please re-add keywords after testing
11
12 Package-Manager: Portage-2.3.3, Repoman-2.3.1
13
14 app-admin/bastille/bastille-3.0.9-r2.ebuild | 81 ++++++++++++++++++++++
15 .../bastille/files/bastille-3.0.9-openrc.patch | 12 ++++
16 .../files/bastille-3.0.9-renamewidgets.patch | 48 +++++++++++++
17 3 files changed, 141 insertions(+)
18
19 diff --git a/app-admin/bastille/bastille-3.0.9-r2.ebuild b/app-admin/bastille/bastille-3.0.9-r2.ebuild
20 new file mode 100644
21 index 00000000..1c1c806
22 --- /dev/null
23 +++ b/app-admin/bastille/bastille-3.0.9-r2.ebuild
24 @@ -0,0 +1,81 @@
25 +# Copyright 1999-2017 Gentoo Foundation
26 +# Distributed under the terms of the GNU General Public License v2
27 +# $Id$
28 +
29 +EAPI=6
30 +
31 +inherit eutils perl-functions
32 +
33 +PATCHVER=0.2
34 +MY_PN=${PN/b/B}
35 +MY_P=${MY_PN}-${PV}
36 +S=${WORKDIR}/${MY_PN}
37 +DESCRIPTION="Bastille-Linux is a security hardening tool"
38 +HOMEPAGE="http://bastille-linux.org/"
39 +SRC_URI="mirror://sourceforge/${PN}-linux/${MY_P}.tar.bz2
40 + mirror://gentoo/${P}-gentoo-${PATCHVER}.patch.bz2"
41 +
42 +LICENSE="GPL-2"
43 +SLOT="0"
44 +KEYWORDS=""
45 +IUSE="X"
46 +
47 +RDEPEND="
48 + net-firewall/iptables
49 + app-admin/logrotate
50 + dev-lang/perl:=
51 + dev-perl/Curses
52 + net-firewall/psad
53 + X? ( dev-perl/Tk )
54 + virtual/logger
55 +"
56 +
57 +PATCHES=(
58 + "${WORKDIR}"/${P}-gentoo-${PATCHVER}.patch
59 +
60 + # make sure the Perl modules go into vendor dir
61 + "${FILESDIR}/${P}-perl.patch"
62 +
63 + # prevent file collision, bug 536292
64 + "${FILESDIR}/${P}-renamewidgets.patch"
65 +
66 + # openrc runscript rename
67 + "${FILESDIR}/${P}-openrc.patch"
68 +)
69 +
70 +src_prepare() {
71 + perl_set_version
72 +
73 + default
74 +
75 + cd "${S}" || die
76 + chmod a+x Install.sh bastille-ipchains bastille-netfilter || die
77 +}
78 +
79 +src_install() {
80 + perl_set_version
81 + export VENDOR_LIB
82 +
83 + cd "${S}" || die
84 + DESTDIR="${D}" ./Install.sh || die
85 +
86 + # Example configs
87 + cd "${S}" || die
88 + insinto /usr/share/Bastille
89 + doins *.config
90 +
91 + newinitd ${PN}-firewall.gentoo-init ${PN}-firewall
92 +
93 + # Documentation
94 + cd "${S}" || die
95 + dodoc *.txt BUGS Change* README*
96 + cd "${S}"/docs || die
97 + doman *.1m
98 +}
99 +
100 +pkg_postinst() {
101 + elog "Please be aware that when using the Server Lax, Server Moderate, or"
102 + elog "Server Paranoia configurations, you may need to use InteractiveBastille"
103 + elog "to set any advanced network information, such as masquerading and"
104 + elog "internal interfaces, if you plan to use them."
105 +}
106
107 diff --git a/app-admin/bastille/files/bastille-3.0.9-openrc.patch b/app-admin/bastille/files/bastille-3.0.9-openrc.patch
108 new file mode 100644
109 index 00000000..08d0a04
110 --- /dev/null
111 +++ b/app-admin/bastille/files/bastille-3.0.9-openrc.patch
112 @@ -0,0 +1,12 @@
113 +diff -ruN Bastille.orig/bastille-firewall.gentoo-init Bastille/bastille-firewall.gentoo-init
114 +--- Bastille.orig/bastille-firewall.gentoo-init 2017-01-02 09:47:33.144433650 +0100
115 ++++ Bastille/bastille-firewall.gentoo-init 2017-01-02 09:49:05.396431757 +0100
116 +@@ -1,6 +1,6 @@
117 +-#!/sbin/runscript
118 ++#!/sbin/openrc-run
119 + # Copyright 1999-2004 Gentoo Foundation
120 +-# Distributed under the terms of the GNU General Public License v2
121 ++# Distributed under the terms of the GNU General Public License v2
122 + # $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 $
123 +
124 + opts="start stop"
125
126 diff --git a/app-admin/bastille/files/bastille-3.0.9-renamewidgets.patch b/app-admin/bastille/files/bastille-3.0.9-renamewidgets.patch
127 new file mode 100644
128 index 00000000..2cf303a
129 --- /dev/null
130 +++ b/app-admin/bastille/files/bastille-3.0.9-renamewidgets.patch
131 @@ -0,0 +1,48 @@
132 +diff -ruN Bastille.orig/AutomatedBastille Bastille/AutomatedBastille
133 +--- Bastille.orig/AutomatedBastille 2017-01-02 09:39:20.720443755 +0100
134 ++++ Bastille/AutomatedBastille 2017-01-02 09:40:54.293441835 +0100
135 +@@ -77,7 +77,7 @@
136 +
137 + # Use the Curses interface
138 + use Curses;
139 +-use Curses::Widgets;
140 ++use Curses::Widgets_Bastille;
141 +
142 + # Hardcoded List of configurations -- to be replaced by list read from file
143 + @list = ("WorkstationLax","WorkstationModerate","WorkstationParanoia","ServerLax","ServerModerate","ServerParanoia","Quit");
144 +diff -ruN Bastille.orig/Bastille_Curses.pm Bastille/Bastille_Curses.pm
145 +--- Bastille.orig/Bastille_Curses.pm 2005-04-18 14:32:10.000000000 +0200
146 ++++ Bastille/Bastille_Curses.pm 2017-01-02 09:41:24.470441216 +0100
147 +@@ -34,7 +34,7 @@
148 + sub do_Bastille {
149 +
150 + use Curses;
151 +- use Curses::Widgets;
152 ++ use Curses::Widgets_Bastille;
153 +
154 + # Number_Modules is the number of modules loaded in by Load_Questions
155 + $Number_Modules=0;
156 +diff -ruN Bastille.orig/Curses/Widgets.pm Bastille/Curses/Widgets.pm
157 +--- Bastille.orig/Curses/Widgets.pm 2005-04-06 01:18:11.000000000 +0200
158 ++++ Bastille/Curses/Widgets.pm 2017-01-02 09:42:31.145439848 +0100
159 +@@ -11,7 +11,7 @@
160 + #
161 + ########################################################################
162 +
163 +-package Curses::Widgets;
164 ++package Curses::Widgets_Bastille;
165 +
166 + use strict;
167 + use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION);
168 +diff -ruN Bastille.orig/Install.sh Bastille/Install.sh
169 +--- Bastille.orig/Install.sh 2017-01-02 09:39:20.767443754 +0100
170 ++++ Bastille/Install.sh 2017-01-02 09:41:05.537441604 +0100
171 +@@ -15,7 +15,7 @@
172 + cp BastilleBackEnd ${DESTDIR}/usr/sbin
173 + cp Bastille_Curses.pm ${DESTDIR}/${VENDOR_LIB}
174 + cp Bastille_Tk.pm ${DESTDIR}/${VENDOR_LIB}
175 +-cp Curses/Widgets.pm ${DESTDIR}/${VENDOR_LIB}/Curses
176 ++cp Curses/Widgets.pm ${DESTDIR}/${VENDOR_LIB}/Curses/Widgets_Bastille.pm
177 + cp InteractiveBastille ${DESTDIR}/usr/sbin
178 + # Questions.txt has been replaced by Modules.txt and Questions/
179 + #cp Questions.txt ${DESTDIR}/usr/share/Bastille