Gentoo Archives: gentoo-commits

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