# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=6 inherit autotools multilib user DESCRIPTION="The de facto standard for intrusion detection/prevention" HOMEPAGE="http://www.snort.org/" SRC_URI="https://www.snort.org/downloads/${PN}/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86" IUSE="static +gre +ppm +perfprofiling +non-ether-decoders control-socket file-inspect high-availability shared-rep side-channel sourcefire linux-smp-stats inline-init-failopen +threads debug +active-response reload-error-restart +react +flexresp3 large-pcap-64bit selinux +libtirpc" DEPEND=">=net-libs/libpcap-1.3.0 >=net-libs/daq-2.0.2 >=dev-libs/libpcre-8.33 dev-libs/libdnet sys-libs/zlib !libtirpc? ( sys-libs/glibc[rpc(-)] ) libtirpc? ( net-libs/libtirpc ) || ( net-libs/libnsl |config daq: afpacket|g' \ "${D}etc/snort/snort.conf.distrib" || die # Set the location of the DAQ modules sed -i -e 's|^# config daq_dir: |config daq_dir: /usr/'$(get_libdir)'/daq|g' \ "${D}etc/snort/snort.conf.distrib" || die # Set the DAQ mode to passive sed -i -e 's|^# config daq_mode: |config daq_mode: passive|g' \ "${D}etc/snort/snort.conf.distrib" || die # Set snort to run as snort:snort sed -i -e 's|^# config set_gid:|config set_gid: snort|g' \ "${D}etc/snort/snort.conf.distrib" || die sed -i -e 's|^# config set_uid:|config set_uid: snort|g' \ "${D}etc/snort/snort.conf.distrib" || die # Set the default log dir sed -i -e 's|^# config logdir:|config logdir: /var/log/snort/|g' \ "${D}etc/snort/snort.conf.distrib" || die # Set the correct so_rule location in the config sed -i -e 's|SO_RULE_PATH ../so_rules|SO_RULE_PATH /etc/snort/so_rules|g' \ "${D}etc/snort/snort.conf.distrib" || die } pkg_postinst() { einfo "There have been a number of improvements and new features" einfo "added to ${P}. Please review the RELEASE.NOTES and" einfo "ChangLog located in /usr/share/doc/${PF}." einfo elog "The Sourcefire Vulnerability Research Team (VRT) recommends that" elog "users migrate their snort.conf customizations to the latest config" elog "file released by the VRT. You can find the latest version of the" elog "Snort config file in /etc/snort/snort.conf.distrib." elog elog "!! It is important that you migrate to this new snort.conf file !!" elog elog "This version of the ebuild includes an updated init.d file and" elog "conf.d file that rely on options found in the latest Snort" elog "config file provided by the VRT." if use debug; then elog "You have the 'debug' USE flag enabled. If this has been done to" elog "troubleshoot an issue by producing a core dump or a back trace," elog "then you need to also ensure the FEATURES variable in make.conf" elog "contains the 'nostrip' option." fi }