diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-analyzer/sguil-server | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-analyzer/sguil-server')
-rw-r--r-- | net-analyzer/sguil-server/Manifest | 2 | ||||
-rw-r--r-- | net-analyzer/sguil-server/files/sguild.confd | 25 | ||||
-rwxr-xr-x | net-analyzer/sguil-server/files/sguild.initd | 45 | ||||
-rw-r--r-- | net-analyzer/sguil-server/metadata.xml | 8 | ||||
-rw-r--r-- | net-analyzer/sguil-server/sguil-server-0.8.0.ebuild | 100 | ||||
-rw-r--r-- | net-analyzer/sguil-server/sguil-server-0.9.0.ebuild | 100 |
6 files changed, 280 insertions, 0 deletions
diff --git a/net-analyzer/sguil-server/Manifest b/net-analyzer/sguil-server/Manifest new file mode 100644 index 000000000000..d0a439bf1dd8 --- /dev/null +++ b/net-analyzer/sguil-server/Manifest @@ -0,0 +1,2 @@ +DIST sguil-0.9.0.tar.gz 464204 SHA256 412be894d67a6487312dd16a98a580dda8c38cff2e24f7a6c25405857769782b SHA512 3f300901d0f0260fbc950b4c7604e3dc3eeb2d088ff45171db84e2d58e281242bf3582eac51162968f1f3766961aec4d0a7af54e85773102ee643a52e879cfa6 WHIRLPOOL eaaef918819ed781505abc727c65e08a9e6d6d0e53f842b5aa6ec4cd1278dc902375a45794b3989488c3507bc34e288593cd892c8a94293d8a7723bbdb6cef4e +DIST sguil-server-0.8.0.tar.gz 102236 SHA256 faa7152ddbdc0ba797c79d6419bf3ae50bfd6dbba4b2cd28ccb04a55ef788360 SHA512 84161365579e3b4227314d9f61afad6ad220261525d7fc8016210a13ee607815eb33178bab026f8a217c43a42f2e623c41d579c5898f58207a18e31685426710 WHIRLPOOL e6f2709f1dd079bb1fa5fcd1c8010ac4a5c692410fec61aac1c6ede3dc7264077370667397b6b9b4a347df3b877e7fc61932340f02a087d828163457c6a9724a diff --git a/net-analyzer/sguil-server/files/sguild.confd b/net-analyzer/sguil-server/files/sguild.confd new file mode 100644 index 000000000000..216f6e60ad87 --- /dev/null +++ b/net-analyzer/sguil-server/files/sguild.confd @@ -0,0 +1,25 @@ +# Config file for /etc/init.d/sguild +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +#PATH to the sguild config (sguild.conf) file. +CONF=/etc/sguil/sguild.conf + +#PATH to the sguild config (autocat.conf) file. +AUTOCAT=/etc/sguil/autocat.conf + +#PATH to the sguild global queries (sguild.queries) file. +QUERIES=/etc/sguil/sguild.queries + +#PATH to the sguild users (sguild.users) file. +USERS=/etc/sguil/sguild.users + +#PATH to the sguild access file +ACCESS=/etc/sguil/sguild.access + +#Directory that contains sguild.pem and sguild.key +#Uncomment to enable openssl connectivity +#OPENSSLPATH="/etc/sguil/" + +#For any other options you wish to add +#EXTRA_SGUILD_OPTS= diff --git a/net-analyzer/sguil-server/files/sguild.initd b/net-analyzer/sguil-server/files/sguild.initd new file mode 100755 index 000000000000..11a1a94f7c91 --- /dev/null +++ b/net-analyzer/sguil-server/files/sguild.initd @@ -0,0 +1,45 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +[ -z "${CONF}" ] && CONF="/etc/sguil/sguild.conf" +[ -z "${AUTOCAT}" ] && AUTOCAT="/etc/sguil/autocat.conf" +[ -z "${QUERIES}" ] && QUERIES="/etc/sguil/sguild.queries" +[ -z "${USERS}" ] && USERS="/etc/sguil/sguild.users" +[ -z "${ACCESS}" ] && AUTOCAT="/etc/sguil/sguild.access" + +SGUILD_OPTS="-D -c ${CONF} -u ${USERS} -A ${ACCESS}" + +[ -n "${OPENSSLPATH}" ] && SGUILD_OPTS="${SGUILD_OPTS} -o -C ${OPENSSLPATH}" + +depend() { + need net + use mysql +} + +checkconfig() { + [ -f "${CONF}" ] || return 1 + [ -f "${AUTOCAT}" ] || return 1 + [ -f "${QUERIES}" ] || return 1 + [ -f "${USERS}" ] || return 1 + [ -f "${ACCESS}" ] || return 1 + if [ -n "${OPENSSLPATH}" ]; then + [ -f "${OPENSSLPATH}/sguild.key" ] || return 1 + [ -f "${OPENSSLPATH}/sguild.pem" ] || return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting sguild" + start-stop-daemon --start --quiet -c sguil --exec /usr/bin/sguild \ + -- ${SGUILD_OPTS} ${EXTRA_SGUILD_OPTS} -D -P /run/sguild.pid + eend $? +} + +stop() { + ebegin "Stopping sguild" + start-stop-daemon --stop --quiet --pidfile /run/sguild.pid + eend $? +} diff --git a/net-analyzer/sguil-server/metadata.xml b/net-analyzer/sguil-server/metadata.xml new file mode 100644 index 000000000000..f5369ffcdbd8 --- /dev/null +++ b/net-analyzer/sguil-server/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>netmon</herd> + <upstream> + <remote-id type="github">bammv/sguil</remote-id> + </upstream> +</pkgmetadata> diff --git a/net-analyzer/sguil-server/sguil-server-0.8.0.ebuild b/net-analyzer/sguil-server/sguil-server-0.8.0.ebuild new file mode 100644 index 000000000000..eb91bfcda80a --- /dev/null +++ b/net-analyzer/sguil-server/sguil-server-0.8.0.ebuild @@ -0,0 +1,100 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit multilib ssl-cert user + +MY_PV="${PV/_p/p}" +DESCRIPTION="Daemon for Sguil Network Security Monitoring" +HOMEPAGE="http://sguil.sourceforge.net" +SRC_URI="mirror://sourceforge/sguil/sguil-server-${MY_PV}.tar.gz" + +LICENSE="GPL-2 QPL" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="ssl" + +DEPEND=" + >=dev-lang/tcl-8.3:0=[-threads] + >=dev-tcltk/tclx-8.3 + dev-tcltk/tcllib + dev-tcltk/mysqltcl + ssl? ( >=dev-tcltk/tls-1.4.1 )" +RDEPEND="${DEPEND} + net-analyzer/p0f + net-analyzer/tcpflow + net-misc/openssh" + +S="${WORKDIR}/sguil-${MY_PV}" + +pkg_setup() { + enewgroup sguil + enewuser sguil -1 -1 /var/lib/sguil sguil +} + +src_prepare(){ + sed -i \ + -e 's:DEBUG 2:DEBUG 1:' -e 's:DAEMON 0:DAEMON 1:' \ + -e 's:SGUILD_LIB_PATH ./lib:SGUILD_LIB_PATH /usr/lib/sguild:g' \ + -e 's:/sguild_data/rules:/var/lib/sguil/rules:g' \ + -e 's:/sguild_data/archive:/var/lib/sguil/archive:g' \ + -e 's:/usr/lib/sguild:/usr/'$(get_libdir)'/sguild:g' \ + server/sguild.conf || die +} + +src_install(){ + dodoc server/sql_scripts/* + dodoc doc/CHANGES doc/OPENSSL.README doc/USAGE doc/INSTALL \ + doc/TODO doc/sguildb.dia + + insopts -m640 + insinto /etc/sguil + doins server/{sguild.email,sguild.users,sguild.conf,sguild.queries,sguild.access,autocat.conf} + + insinto /usr/$(get_libdir)/sguild + doins server/lib/* + dobin server/sguild + newinitd "${FILESDIR}/sguild.initd" sguild + newconfd "${FILESDIR}/sguild.confd" sguild + + if use ssl; then + sed -i -e "s/#OPENSSL/OPENSSL/" "${D}/etc/conf.d/sguild" + fi + + diropts -g sguil -o sguil + keepdir \ + /var/lib/sguil \ + /var/lib/sguil/archive \ + /var/lib/sguil/rules + +} + +pkg_postinst(){ + if use ssl && ! [ -f "${ROOT}"/etc/sguil/sguild.key ]; then + install_cert /etc/sguil/sguild + fi + + chown -R sguil:sguil "${ROOT}"/etc/sguil/sguild.* + chown -R sguil:sguil "${ROOT}"/usr/lib/sguild + + if [ -d "${ROOT}"/etc/snort/rules ] ; then + ln -s /etc/snort/rules "${ROOT}"/var/lib/sguil/rules/${HOSTNAME} + fi + + elog + elog "Please customize the sguild configuration files in /etc/sguild before" + elog "trying to run the daemon. Additionally you will need to setup the" + elog "mysql database. See /usr/share/doc/${PF}/INSTALL.gz for information." + elog "Please note that it is STRONGLY recommended to mount a separate" + elog "filesystem at /var/lib/sguil for both space and performance reasons" + elog "as a large amount of data will be kept in the directory structure" + elog "underneath that top directory." + elog + elog "You should create the sguild db as per the install instructions in" + elog "/usr/share/doc/${PF}/ and use the appropriate" + elog "database setup script located in the same directory." + + elog +} diff --git a/net-analyzer/sguil-server/sguil-server-0.9.0.ebuild b/net-analyzer/sguil-server/sguil-server-0.9.0.ebuild new file mode 100644 index 000000000000..a3e0105503cc --- /dev/null +++ b/net-analyzer/sguil-server/sguil-server-0.9.0.ebuild @@ -0,0 +1,100 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit multilib ssl-cert user + +MY_PV="${PV/_p/p}" +DESCRIPTION="Daemon for Sguil Network Security Monitoring" +HOMEPAGE="http://sguil.sourceforge.net" +SRC_URI="https://github.com/bammv/${PN/-server}/archive/v${PV}.tar.gz -> ${P/-server}.tar.gz" + +LICENSE="GPL-2 QPL" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="ssl" + +DEPEND=" + >=dev-lang/tcl-8.3:0=[-threads] + >=dev-tcltk/tclx-8.3 + dev-tcltk/tcllib + dev-tcltk/mysqltcl + ssl? ( >=dev-tcltk/tls-1.4.1 )" +RDEPEND="${DEPEND} + net-analyzer/p0f + net-analyzer/tcpflow + net-misc/openssh" + +S="${WORKDIR}/sguil-${MY_PV}" + +pkg_setup() { + enewgroup sguil + enewuser sguil -1 -1 /var/lib/sguil sguil +} + +src_prepare(){ + sed -i \ + -e 's:DEBUG 2:DEBUG 1:' -e 's:DAEMON 0:DAEMON 1:' \ + -e 's:SGUILD_LIB_PATH ./lib:SGUILD_LIB_PATH /usr/lib/sguild:g' \ + -e 's:/sguild_data/rules:/var/lib/sguil/rules:g' \ + -e 's:/sguild_data/archive:/var/lib/sguil/archive:g' \ + -e 's:/usr/lib/sguild:/usr/'$(get_libdir)'/sguild:g' \ + server/sguild.conf || die +} + +src_install(){ + dodoc server/sql_scripts/* + dodoc doc/CHANGES doc/OPENSSL.README doc/USAGE doc/INSTALL \ + doc/TODO doc/sguildb.dia + + insopts -m640 + insinto /etc/sguil + doins server/{sguild.email,sguild.users,sguild.conf,sguild.queries,sguild.access,autocat.conf} + + insinto /usr/$(get_libdir)/sguild + doins server/lib/* + dobin server/sguild + newinitd "${FILESDIR}/sguild.initd" sguild + newconfd "${FILESDIR}/sguild.confd" sguild + + if use ssl; then + sed -i -e "s/#OPENSSL/OPENSSL/" "${D}/etc/conf.d/sguild" + fi + + diropts -g sguil -o sguil + keepdir \ + /var/lib/sguil \ + /var/lib/sguil/archive \ + /var/lib/sguil/rules + +} + +pkg_postinst(){ + if use ssl && ! [ -f "${ROOT}"/etc/sguil/sguild.key ]; then + install_cert /etc/sguil/sguild + fi + + chown -R sguil:sguil "${ROOT}"/etc/sguil/sguild.* + chown -R sguil:sguil "${ROOT}"/usr/lib/sguild + + if [ -d "${ROOT}"/etc/snort/rules ] ; then + ln -s /etc/snort/rules "${ROOT}"/var/lib/sguil/rules/${HOSTNAME} + fi + + elog + elog "Please customize the sguild configuration files in /etc/sguild before" + elog "trying to run the daemon. Additionally you will need to setup the" + elog "mysql database. See /usr/share/doc/${PF}/INSTALL.gz for information." + elog "Please note that it is STRONGLY recommended to mount a separate" + elog "filesystem at /var/lib/sguil for both space and performance reasons" + elog "as a large amount of data will be kept in the directory structure" + elog "underneath that top directory." + elog + elog "You should create the sguild db as per the install instructions in" + elog "/usr/share/doc/${PF}/ and use the appropriate" + elog "database setup script located in the same directory." + + elog +} |