summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-admin/sagan/files
downloadgentoo-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 'app-admin/sagan/files')
-rw-r--r--app-admin/sagan/files/json_header_location.patch26
-rw-r--r--app-admin/sagan/files/mysql_check.patch26
-rw-r--r--app-admin/sagan/files/sagan.confd9
-rw-r--r--app-admin/sagan/files/sagan.init18
-rw-r--r--app-admin/sagan/files/sagan.init-r118
5 files changed, 97 insertions, 0 deletions
diff --git a/app-admin/sagan/files/json_header_location.patch b/app-admin/sagan/files/json_header_location.patch
new file mode 100644
index 000000000000..78a34886a73d
--- /dev/null
+++ b/app-admin/sagan/files/json_header_location.patch
@@ -0,0 +1,26 @@
+diff --git a/configure.ac b/configure.ac
+--- a/configure.ac
++++ b/configure.ac
+@@ -194,7 +194,7 @@
+ if test "$LOGNORM" = "yes"; then
+ AC_MSG_RESULT([------- liblognorm support is enabled -------])
+ AC_CHECK_HEADER([liblognorm.h])
+- AC_CHECK_HEADERS([json/json.h json.h], [break], [AC_MSG_ERROR([json-c headers not found or not usable.
++ AC_CHECK_HEADERS([json-c/json.h json.h], [break], [AC_MSG_ERROR([json-c headers not found or not usable.
+ This library is important for the correlation aspects of Sagan! Please see
+ https://wiki.quadrantsec.com/bin/view/Main/LibLogNorm. To disable this feature
+ use the --disable-lognorm flag.])])
+diff --git a/src/sagan-liblognorm.c b/src/sagan-liblognorm.c
+--- a/src/sagan-liblognorm.c
++++ b/src/sagan-liblognorm.c
+@@ -40,9 +40,7 @@
+ #include <lognorm.h>
+
+ #if defined(HAVE_JSON_JSON_H)
+-# include <json/json.h>
+-#else
+-# include <json.h>
++# include <json-c/json.h>
+ #endif
+
+ #include "sagan.h"
diff --git a/app-admin/sagan/files/mysql_check.patch b/app-admin/sagan/files/mysql_check.patch
new file mode 100644
index 000000000000..d2247aab571e
--- /dev/null
+++ b/app-admin/sagan/files/mysql_check.patch
@@ -0,0 +1,26 @@
+diff --git a/configure.in b/configure.ac
+rename from configure.in
+rename to configure.ac
+--- a/configure.in
++++ b/configure.ac
+@@ -215,13 +215,17 @@
+ AC_CHECK_LIB(pthread, main,,AC_MSG_ERROR(Sagan needs pthreads!))
+ AC_CHECK_LIB(m, main,,AC_MSG_ERROR(Sagan needs libm!))
+
++save_LIBS=$LIBS
+ if test "$MYSQL" = "yes"; then
+ AC_MSG_RESULT([------- MySQL support is enabled -------])
++ AC_CHECK_PROGS(MYSQL_CONFIG, mysql_config)
+ AC_CHECK_HEADER([mysql/mysql.h])
+ AC_CHECK_HEADER([mysql/errmsg.h])
+- AC_CHECK_LIB(mysqlclient_r, main,,AC_MSG_ERROR(The MySQL library libmysqlclient_r is missing!
+-If you're not interested in MySQL support use the --disable-mysql flag.))
+- fi
++ LIBS=$(mysql_config --libs_r)
++ AC_CHECK_LIB(mysqlclient_r, main,,AC_MSG_ERROR(The MySQL library libmysqlclient_r is missing!))
++fi
++LIBS="$save_LIBS $LIBS"
++
+
+ if test "$POSTGRES" = "yes"; then
+ AC_MSG_RESULT([------- PostgreSQL support is enabled -------])
diff --git a/app-admin/sagan/files/sagan.confd b/app-admin/sagan/files/sagan.confd
new file mode 100644
index 000000000000..cab6db55ccf0
--- /dev/null
+++ b/app-admin/sagan/files/sagan.confd
@@ -0,0 +1,9 @@
+# Copyright 1999-2011 Gentoo Foundation
+# # Distributed under the terms of the GNU General Public License v2
+
+# Sagan daemon configuration file
+# Make debug mode
+# SAGAN_OPTS = " --debug "
+#
+# Run as user, default sagan
+SAGAN_USER="sagan"
diff --git a/app-admin/sagan/files/sagan.init b/app-admin/sagan/files/sagan.init
new file mode 100644
index 000000000000..dfce6cadf336
--- /dev/null
+++ b/app-admin/sagan/files/sagan.init
@@ -0,0 +1,18 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+pidfile="/var/run/sagan/sagan.pid"
+command="/usr/bin/sagan"
+command_args="-D \"${SAGAN_OPTS}\" -u \"${SAGAN_USER}\""
+
+depend() {
+ use logger mysql postgresql
+ need localmount
+}
+
+start_pre() {
+ checkpath -d -o sagan /var/run/sagan
+ checkpath -p -o sagan -m 0644 /var/run/sagan/sagan.fifo
+}
diff --git a/app-admin/sagan/files/sagan.init-r1 b/app-admin/sagan/files/sagan.init-r1
new file mode 100644
index 000000000000..5844fdf4e1de
--- /dev/null
+++ b/app-admin/sagan/files/sagan.init-r1
@@ -0,0 +1,18 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+pidfile="/var/run/sagan/sagan.pid"
+command="/usr/bin/sagan"
+command_args="-D \"${SAGAN_OPTS}\" -u \"${SAGAN_USER}\""
+
+depend() {
+ use logger mysql postgresql
+ need localmount
+}
+
+start_pre() {
+ checkpath -d -o sagan /run/sagan
+ checkpath -p -o sagan -m 0644 /run/sagan/sagan.fifo
+}