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