1 |
patrick 12/01/11 08:17:41 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: snort-2.9.2.ebuild |
5 |
Log: |
6 |
Bump |
7 |
|
8 |
(Portage version: 2.2.0_alpha83/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.188 net-analyzer/snort/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/snort/ChangeLog?rev=1.188&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/snort/ChangeLog?rev=1.188&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/snort/ChangeLog?r1=1.187&r2=1.188 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/net-analyzer/snort/ChangeLog,v |
20 |
retrieving revision 1.187 |
21 |
retrieving revision 1.188 |
22 |
diff -u -r1.187 -r1.188 |
23 |
--- ChangeLog 29 Sep 2011 06:04:55 -0000 1.187 |
24 |
+++ ChangeLog 11 Jan 2012 08:17:41 -0000 1.188 |
25 |
@@ -1,6 +1,11 @@ |
26 |
# ChangeLog for net-analyzer/snort |
27 |
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/snort/ChangeLog,v 1.187 2011/09/29 06:04:55 pva Exp $ |
29 |
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
30 |
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/snort/ChangeLog,v 1.188 2012/01/11 08:17:41 patrick Exp $ |
31 |
+ |
32 |
+*snort-2.9.2 (11 Jan 2012) |
33 |
+ |
34 |
+ 11 Jan 2012; Patrick Lauer <patrick@g.o> +snort-2.9.2.ebuild: |
35 |
+ Bump |
36 |
|
37 |
29 Sep 2011; Peter Volkov <pva@g.o> snort-2.9.1.ebuild: |
38 |
Fix inability to remove .la files, bug 384443 thank Juergen Rose for report |
39 |
|
40 |
|
41 |
|
42 |
1.1 net-analyzer/snort/snort-2.9.2.ebuild |
43 |
|
44 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/snort/snort-2.9.2.ebuild?rev=1.1&view=markup |
45 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/snort/snort-2.9.2.ebuild?rev=1.1&content-type=text/plain |
46 |
|
47 |
Index: snort-2.9.2.ebuild |
48 |
=================================================================== |
49 |
# Copyright 1999-2012 Gentoo Foundation |
50 |
# Distributed under the terms of the GNU General Public License v2 |
51 |
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/snort/snort-2.9.2.ebuild,v 1.1 2012/01/11 08:17:41 patrick Exp $ |
52 |
|
53 |
EAPI="2" |
54 |
inherit eutils autotools multilib |
55 |
|
56 |
DESCRIPTION="The de facto standard for intrusion detection/prevention" |
57 |
HOMEPAGE="http://www.snort.org/" |
58 |
SRC_URI="http://www.snort.org/downloads/1347 -> ${P}.tar.gz" |
59 |
LICENSE="GPL-2" |
60 |
SLOT="0" |
61 |
KEYWORDS="~amd64 ~x86" |
62 |
IUSE="static +dynamicplugin +zlib +gre +mpls +targetbased +decoder-preprocessor-rules |
63 |
+ppm +perfprofiling linux-smp-stats inline-init-failopen +threads debug +active-response |
64 |
+normalizer reload-error-restart +react +flexresp3 +paf large-pcap-64bit |
65 |
aruba mysql odbc postgres selinux" |
66 |
|
67 |
DEPEND=">=net-libs/libpcap-1.0.0 |
68 |
>=net-libs/daq-0.5 |
69 |
>=dev-libs/libpcre-6.0 |
70 |
dev-libs/libdnet |
71 |
postgres? ( dev-db/postgresql-base ) |
72 |
mysql? ( virtual/mysql ) |
73 |
odbc? ( dev-db/unixODBC ) |
74 |
zlib? ( sys-libs/zlib )" |
75 |
|
76 |
RDEPEND="${DEPEND} |
77 |
selinux? ( sec-policy/selinux-snort )" |
78 |
|
79 |
pkg_setup() { |
80 |
|
81 |
if use zlib && ! use dynamicplugin; then |
82 |
eerror "You have enabled the 'zlib' USE flag but not the 'dynamicplugin' USE flag." |
83 |
eerror "'zlib' requires 'dynamicplugin' be enabled." |
84 |
die |
85 |
fi |
86 |
|
87 |
# pre_inst() is a better place to put this |
88 |
# but we need it here for the 'fowners' statements in src_install() |
89 |
enewgroup snort |
90 |
enewuser snort -1 -1 /dev/null snort |
91 |
|
92 |
} |
93 |
|
94 |
src_prepare() { |
95 |
|
96 |
#Multilib fix for the sf_engine |
97 |
einfo "Applying multilib fix." |
98 |
sed -i -e 's|${exec_prefix}/lib|${exec_prefix}/'$(get_libdir)'|g' \ |
99 |
"${WORKDIR}/${P}/src/dynamic-plugins/sf_engine/Makefile.am" \ |
100 |
|| die "sed for sf_engine failed" |
101 |
|
102 |
#Multilib fix for the curent set of dynamic-preprocessors |
103 |
for i in ftptelnet smtp ssh dns ssl dcerpc2 sdf imap pop rzb_saac sip reputation; do |
104 |
sed -i -e 's|${exec_prefix}/lib|${exec_prefix}/'$(get_libdir)'|g' \ |
105 |
"${WORKDIR}/${P}/src/dynamic-preprocessors/$i/Makefile.am" \ |
106 |
|| die "sed for $i failed." |
107 |
done |
108 |
|
109 |
AT_M4DIR=m4 eautoreconf |
110 |
} |
111 |
|
112 |
src_configure() { |
113 |
|
114 |
econf \ |
115 |
$(use_enable !static shared) \ |
116 |
$(use_enable static) \ |
117 |
$(use_enable static so-with-static-lib) \ |
118 |
$(use_enable dynamicplugin) \ |
119 |
$(use_enable zlib) \ |
120 |
$(use_enable gre) \ |
121 |
$(use_enable mpls) \ |
122 |
$(use_enable targetbased) \ |
123 |
$(use_enable decoder-preprocessor-rules) \ |
124 |
$(use_enable ppm) \ |
125 |
$(use_enable perfprofiling) \ |
126 |
$(use_enable linux-smp-stats) \ |
127 |
$(use_enable inline-init-failopen) \ |
128 |
$(use_enable threads pthread) \ |
129 |
$(use_enable debug) \ |
130 |
$(use_enable debug debug-msgs) \ |
131 |
$(use_enable debug corefiles) \ |
132 |
$(use_enable !debug dlclose) \ |
133 |
$(use_enable active-response) \ |
134 |
$(use_enable normalizer) \ |
135 |
$(use_enable reload-error-restart) \ |
136 |
$(use_enable react) \ |
137 |
$(use_enable flexresp3) \ |
138 |
$(use_enable paf) \ |
139 |
$(use_enable large-pcap-64bit large-pcap) \ |
140 |
$(use_enable aruba) \ |
141 |
$(use_with mysql) \ |
142 |
$(use_with odbc) \ |
143 |
$(use_with postgres postgresql) \ |
144 |
--enable-ipv6 \ |
145 |
--enable-reload \ |
146 |
--disable-prelude \ |
147 |
--disable-build-dynamic-examples \ |
148 |
--disable-profile \ |
149 |
--disable-ppm-test \ |
150 |
--disable-intel-soft-cpm \ |
151 |
--disable-static-daq \ |
152 |
--disable-rzb-saac \ |
153 |
--without-oracle |
154 |
} |
155 |
|
156 |
src_install() { |
157 |
|
158 |
emake DESTDIR="${D}" install || die "emake failed" |
159 |
|
160 |
dodir /var/log/snort \ |
161 |
/var/run/snort \ |
162 |
/etc/snort/rules \ |
163 |
/etc/snort/so_rules \ |
164 |
/usr/$(get_libdir)/snort_dynamicrules \ |
165 |
|| die "Failed to create core directories" |
166 |
|
167 |
# config.log and build.log are needed by Sourcefire |
168 |
# to trouble shoot build problems and bug reports so we are |
169 |
# perserving them incase the user needs upstream support. |
170 |
dodoc RELEASE.NOTES ChangeLog \ |
171 |
doc/* \ |
172 |
tools/u2boat/README.u2boat \ |
173 |
schemas/* || die "Failed to install snort docs" |
174 |
|
175 |
insinto /etc/snort |
176 |
doins etc/attribute_table.dtd \ |
177 |
etc/classification.config \ |
178 |
etc/gen-msg.map \ |
179 |
etc/reference.config \ |
180 |
etc/threshold.conf \ |
181 |
etc/unicode.map || die "Failed to install docs in etc" |
182 |
|
183 |
# We use snort.conf.distrib because the config file is complicated |
184 |
# and the one shipped with snort can change drastically between versions. |
185 |
# Users should migrate setting by hand and not with etc-update. |
186 |
newins etc/snort.conf snort.conf.distrib \ |
187 |
|| die "Failed to add snort.conf.distrib" |
188 |
|
189 |
# config.log and build.log are needed by Sourcefire |
190 |
# to troubleshoot build problems and bug reports so we are |
191 |
# perserving them incase the user needs upstream support. |
192 |
# 'die' was intentionally not added here. |
193 |
if [ -f "${WORKDIR}/${PF}/config.log" ]; then |
194 |
dodoc "${WORKDIR}/${PF}/config.log" |
195 |
fi |
196 |
if [ -f "${T}/build.log" ]; then |
197 |
dodoc "${T}/build.log" |
198 |
fi |
199 |
|
200 |
insinto /etc/snort/preproc_rules |
201 |
doins preproc_rules/decoder.rules \ |
202 |
preproc_rules/preprocessor.rules \ |
203 |
preproc_rules/sensitive-data.rules || die "Failed to install preproc rule files" |
204 |
|
205 |
fowners -R snort:snort \ |
206 |
/var/log/snort \ |
207 |
/var/run/snort \ |
208 |
/etc/snort || die |
209 |
|
210 |
newinitd "${FILESDIR}/snort.rc11" snort || die "Failed to install snort init script" |
211 |
newconfd "${FILESDIR}/snort.confd.2" snort || die "Failed to install snort confd file" |
212 |
|
213 |
# Sourcefire uses Makefiles to install docs causing Bug #297190. |
214 |
# This removes the unwanted doc directory and rogue Makefiles. |
215 |
rm -rf "${D}"usr/share/doc/snort || die "Failed to remove SF doc directories" |
216 |
rm "${D}"usr/share/doc/"${PF}"/Makefile* || die "Failed to remove doc make files" |
217 |
|
218 |
#Remove unneeded .la files (Bug #382863) |
219 |
rm "${D}"usr/$(get_libdir)/snort_dynamicengine/libsf_engine.la || die |
220 |
rm "${D}"usr/$(get_libdir)/snort_dynamicpreprocessor/libsf_*_preproc.la || die "Failed to remove libsf_?_preproc.la" |
221 |
|
222 |
# Set the correct lib path for dynamicengine, dynamicpreprocessor, and dynamicdetection |
223 |
sed -i -e 's|/usr/local/lib|/usr/'$(get_libdir)'|g' \ |
224 |
"${D}etc/snort/snort.conf.distrib" || die |
225 |
|
226 |
# Set the correct rule location in the config |
227 |
sed -i -e 's|RULE_PATH ../rules|RULE_PATH /etc/snort/rules|g' \ |
228 |
"${D}etc/snort/snort.conf.distrib" || die |
229 |
|
230 |
# Set the correct preprocessor/decoder rule location in the config |
231 |
sed -i -e 's|PREPROC_RULE_PATH ../preproc_rules|PREPROC_RULE_PATH /etc/snort/preproc_rules|g' \ |
232 |
"${D}etc/snort/snort.conf.distrib" || die |
233 |
|
234 |
# Enable the preprocessor/decoder rules |
235 |
sed -i -e 's|^# include $PREPROC_RULE_PATH|include $PREPROC_RULE_PATH|g' \ |
236 |
"${D}etc/snort/snort.conf.distrib" || die |
237 |
|
238 |
sed -i -e 's|^# dynamicdetection directory|dynamicdetection directory|g' \ |
239 |
"${D}etc/snort/snort.conf.distrib" || die |
240 |
|
241 |
# Just some clean up of trailing /'s in the config |
242 |
sed -i -e 's|snort_dynamicpreprocessor/$|snort_dynamicpreprocessor|g' \ |
243 |
"${D}etc/snort/snort.conf.distrib" || die |
244 |
|
245 |
# Make it clear in the config where these are... |
246 |
sed -i -e 's|^include classification.config|include /etc/snort/classification.config|g' \ |
247 |
"${D}etc/snort/snort.conf.distrib" || die |
248 |
|
249 |
sed -i -e 's|^include reference.config|include /etc/snort/reference.config|g' \ |
250 |
"${D}etc/snort/snort.conf.distrib" || die |
251 |
|
252 |
# Disable all rule files by default. |
253 |
sed -i -e 's|^include $RULE_PATH|# include $RULE_PATH|g' \ |
254 |
"${D}etc/snort/snort.conf.distrib" || die |
255 |
|
256 |
# Disable normalizer preprocessor config if normalizer USE flag not set. |
257 |
if ! use normalizer; then |
258 |
sed -i -e 's|^preprocessor normalize|#preprocessor normalize|g' \ |
259 |
"${D}etc/snort/snort.conf.distrib" || die |
260 |
fi |
261 |
|
262 |
# Set the configured DAQ to afpacket |
263 |
sed -i -e 's|^# config daq: <type>|config daq: afpacket|g' \ |
264 |
"${D}etc/snort/snort.conf.distrib" || die |
265 |
|
266 |
# Set the location of the DAQ modules |
267 |
sed -i -e 's|^# config daq_dir: <dir>|config daq_dir: /usr/'$(get_libdir)'/daq|g' \ |
268 |
"${D}etc/snort/snort.conf.distrib" || die |
269 |
|
270 |
# Set the DAQ mode to passive |
271 |
sed -i -e 's|^# config daq_mode: <mode>|config daq_mode: passive|g' \ |
272 |
"${D}etc/snort/snort.conf.distrib" || die |
273 |
|
274 |
# Set snort to run as snort:snort |
275 |
sed -i -e 's|^# config set_gid:|config set_gid: snort|g' \ |
276 |
"${D}etc/snort/snort.conf.distrib" || die |
277 |
sed -i -e 's|^# config set_uid:|config set_uid: snort|g' \ |
278 |
"${D}etc/snort/snort.conf.distrib" || die |
279 |
|
280 |
# Set the default log dir |
281 |
sed -i -e 's|^# config logdir:|config logdir: /var/log/snort/|g' \ |
282 |
"${D}etc/snort/snort.conf.distrib" || die |
283 |
|
284 |
# Set the correct so_rule location in the config |
285 |
sed -i -e 's|SO_RULE_PATH ../so_rules|SO_RULE_PATH /etc/snort/so_rules|g' \ |
286 |
"${D}etc/snort/snort.conf.distrib" || die |
287 |
} |
288 |
|
289 |
pkg_postinst() { |
290 |
|
291 |
einfo "There have been a number of improvements and new features" |
292 |
einfo "added to ${P}. Please review the RELEASE.NOTES and" |
293 |
einfo "ChangLog located in /usr/share/doc/${PF}." |
294 |
einfo |
295 |
elog "The Sourcefire Vulnerability Research Team (VRT) recommends that" |
296 |
elog "users migrate their snort.conf customizations to the latest config" |
297 |
elog "file released by the VRT. You can find the latest version of the" |
298 |
elog "Snort config file in /etc/snort/snort.conf.distrib." |
299 |
elog |
300 |
elog "!! It is important that you migrate to this new snort.conf file !!" |
301 |
elog |
302 |
elog "This version of the ebuild includes an updated init.d file and" |
303 |
elog "conf.d file that rely on options found in the latest Snort" |
304 |
elog "config file provided by the VRT." |
305 |
|
306 |
if use debug; then |
307 |
elog "You have the 'debug' USE flag enabled. If this has been done to" |
308 |
elog "troubleshoot an issue by producing a core dump or a back trace," |
309 |
elog "then you need to also ensure the FEATURES variable in make.conf" |
310 |
elog "contains the 'nostrip' option." |
311 |
fi |
312 |
} |