summaryrefslogtreecommitdiff
path: root/app-admin/graylog
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-12-15 18:09:03 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-12-15 18:09:03 +0000
commit7bc9c63c9da678a7e6fceb095d56c634afd22c56 (patch)
tree4a67d50a439e9af63947e5f8b6ba3719af98b6c9 /app-admin/graylog
parentb284a3168fa91a038925d2ecf5e4791011ea5e7d (diff)
gentoo resync : 15.12.2019
Diffstat (limited to 'app-admin/graylog')
-rw-r--r--app-admin/graylog/Manifest9
-rw-r--r--app-admin/graylog/files/confd-r212
-rw-r--r--app-admin/graylog/files/graylog.confd12
-rw-r--r--app-admin/graylog/files/graylog.initd30
-rw-r--r--app-admin/graylog/files/initd-r231
-rw-r--r--app-admin/graylog/graylog-2.5.1.ebuild87
-rw-r--r--app-admin/graylog/graylog-3.1.3.ebuild83
-rw-r--r--app-admin/graylog/metadata.xml19
8 files changed, 283 insertions, 0 deletions
diff --git a/app-admin/graylog/Manifest b/app-admin/graylog/Manifest
new file mode 100644
index 000000000000..c89797fca928
--- /dev/null
+++ b/app-admin/graylog/Manifest
@@ -0,0 +1,9 @@
+AUX confd-r2 542 BLAKE2B 83a8b2a3bf1fc60a2a9475d823efe39febb961d0aaee12b7b18f1d2752427e401fe2f68c83f777fba1d2f585540f4d9b422befcc959aa082a26eeef2be093b2b SHA512 fde38b6813f40633db5d5cbcb3d93fd17e8705d6f2c5805fdc900858fe2b0cf0c0c219345dc741cc2573b1f80b42fdf5714e71fa31938329355556503492bbb8
+AUX graylog.confd 521 BLAKE2B b776c8c834358a426aab6e67b894ab3fc8e07b5d6d24f506312f41e76ea36bd39398d1eb424cf9f3fff633a26acb8af54dccd4a19642b55bf18d91fe92aff31c SHA512 3d8c3b6128f839809f14c7a1f2683ed5ac273efbabb1e0f50a2e9e90ef6c7cdc481bd84ef3372bf10f288b08f2b850a80d917838e057545851d3113c8f877512
+AUX graylog.initd 825 BLAKE2B bfcd79f71d996ca1761a79119f8ca29e531dbd9a40411c0c13b0628ebb8caea6c69e72adb3102369ffe41721acfef5ba2656689fd10ee0cae591291e9d20cd1e SHA512 e55477329fe5045b85451abd695d13cb6d67cf0b75f0f786503c6fba850d0cae9e853fb976dae35e65f570fda625bc8984714a0cdd6c23801c917184dc5a32f2
+AUX initd-r2 872 BLAKE2B 500a428a0f479dc79b1d8b7d6a1acfafe9a205a65adfacd10aa6f5e89c105c30e095e69799acd8739d9ed2b7dee0ed6d053497a74495a986b6d9b24122c29a75 SHA512 43632bd345bb3772018ce1fe32a97c85a1ad812dca2ae229dccb65302e686597dad4b62ecbc0cc5358c34761f354d51de2c9fe81bd3db71af5fdc0a6cbc0e95e
+DIST graylog-2.5.1.tgz 123878927 BLAKE2B d168579be4d20e3a8081d608247e7101fc5d99ddd2b5f063f94d7e91d4095c6bd016a4bc1be0f0e08b5043b771070312286404ece5eacc51e4a8730dfc13dab1 SHA512 44e2ca00e47a34708cea94b74fdc0f56f3a381f161d25633bdf7685fbcd989937163508f8b47b0869c7daacec6c8bd2c874f9381e196ffb3194eb6e3f96b3ce9
+DIST graylog-3.1.3.tgz 120983897 BLAKE2B 68e1dd7b8de7ab9fb12fd2035bcf6f0901d8d9f5083ff8efef09736819ccd70ae4dd6f466cf2fa1eaebb24b4098a26d72524f9b9a47e8dd62d0224bad189bb62 SHA512 8eec2339db474b89fc717e693ec23ca32d9a018f9bb924aab895d1a1f4e90afa9fe9547e432d13b9d0bf5831f8772763f19de41ac66f3e09ebf7e96ebd6cbccf
+EBUILD graylog-2.5.1.ebuild 2292 BLAKE2B 6445d3b665015da099c6eb2bae405159fbb6e176307115553d84bbecf52ab56a466fc16a53ea95d10d3588b2eaddb6f8f5dd7ffe8f60276a9fa14a2de2042f38 SHA512 040ff5ccccd24be6cb2d9c13caaa8d72fbbbd4582d079cf04d9e174b6bbbb2f770076ebaeb0bf20b72c3d8c9645eba878752892dd5cdb2614be2bee1b09c6114
+EBUILD graylog-3.1.3.ebuild 2253 BLAKE2B 4e460d732415ce33f104cfdd2371f0a3975659183482a84a1b1f846552a7d13b330b4c6c188f0f3d6678ed7fbc1d03797e6b0bb070206aef6432e86ddf80d589 SHA512 f3398f5debe254150a0e1dfab2a1a3316a4aa8eb16591bebd4526bba4c057425cacebbaa7cbc34c6bb36471cd8464a3063fbae28b17dc295b8020191232f4c74
+MISC metadata.xml 584 BLAKE2B d19e09582932c7986c85059766f2a845c0e85d214b9af6c61d9c26005e31c208a8ab59e6d82e5870162314c2cb4a9d3e852f12c02551d399c1eb3063449501bb SHA512 c32525442e20550c7e3b0ac8b74d896f35b2de1e87d57befb152047840bf4811c8df135f828b1c95505b4a348f25478cd7b2b186c36f93c6055086437f257505
diff --git a/app-admin/graylog/files/confd-r2 b/app-admin/graylog/files/confd-r2
new file mode 100644
index 000000000000..97eac6ac77fa
--- /dev/null
+++ b/app-admin/graylog/files/confd-r2
@@ -0,0 +1,12 @@
+GRAYLOG_CONFIG_FILE="/etc/graylog2/graylog.conf"
+GRAYLOG_DATA_DIR="/var/lib/graylog2"
+GRAYLOG_GROUP="graylog"
+GRAYLOG_INSTALL_DIR="/usr/share/graylog2"
+GRAYLOG_LOG_DIR="/var/log/graylog2"
+GRAYLOG_OPTIONS=""
+GRAYLOG_USER="graylog"
+
+JAVA_OPTS="-Djava.library.path=$GRAYLOG_INSTALL_DIR/lib/sigar -Xms1g -Xmx1g -XX:NewRatio=1 -server -XX:+ResizeTLAB -XX:+UseConcMarkSweepGC -XX:+CMSConcurrentMTEnabled -XX:+CMSClassUnloadingEnabled -XX:+UseParNewGC -XX:-OmitStackTraceInFastThrow"
+
+# Please adjust according to your bind address
+rc_need="net.lo"
diff --git a/app-admin/graylog/files/graylog.confd b/app-admin/graylog/files/graylog.confd
new file mode 100644
index 000000000000..f9c2230c0a00
--- /dev/null
+++ b/app-admin/graylog/files/graylog.confd
@@ -0,0 +1,12 @@
+GRAYLOG_CONFIG_FILE="/etc/graylog/graylog.conf"
+GRAYLOG_DATA_DIR="/var/lib/graylog"
+GRAYLOG_GROUP="graylog"
+GRAYLOG_INSTALL_DIR="/usr/share/graylog"
+GRAYLOG_LOG_DIR="/var/log/graylog"
+GRAYLOG_OPTIONS=""
+GRAYLOG_USER="graylog"
+
+JAVA_OPTS="-Djava.library.path=$GRAYLOG_INSTALL_DIR/lib/sigar -Xms1g -Xmx1g -XX:NewRatio=1 -server -XX:+ResizeTLAB -XX:+UseConcMarkSweepGC -XX:+CMSConcurrentMTEnabled -XX:+CMSClassUnloadingEnabled -XX:-OmitStackTraceInFastThrow"
+
+# Please adjust according to your bind address
+rc_need="net.lo"
diff --git a/app-admin/graylog/files/graylog.initd b/app-admin/graylog/files/graylog.initd
new file mode 100644
index 000000000000..d17267e9df22
--- /dev/null
+++ b/app-admin/graylog/files/graylog.initd
@@ -0,0 +1,30 @@
+#!/sbin/openrc-run
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+command="/usr/bin/java"
+command_args="${JAVA_OPTS} -jar ${GRAYLOG_INSTALL_DIR}/graylog.jar server -f ${GRAYLOG_CONFIG_FILE} --no-pid-file ${GRAYLOG_OPTIONS}"
+command_background="true"
+command_user="${GRAYLOG_USER}:${GRAYLOG_GROUP}"
+pidfile="/run/${RC_SVCNAME}.pid"
+
+output_log="${GRAYLOG_LOG_DIR}/graylog.stdout.log"
+error_log="${GRAYLOG_LOG_DIR}/graylog.stderr.log"
+directory="${GRAYLOG_INSTALL_DIR}"
+required_files="${GRAYLOG_CONFIG_FILE}"
+
+depend() {
+ use dns
+}
+
+start_pre() {
+ local d
+ for d in \
+ "${GRAYLOG_DATA_DIR}" \
+ "${GRAYLOG_DATA_DIR}/data" \
+ "${GRAYLOG_DATA_DIR}/data/journal" \
+ "${GRAYLOG_LOG_DIR}"; do
+
+ checkpath -d -o "${GRAYLOG_USER}":"${GRAYLOG_GROUP}" -m750 "${d}"
+ done
+}
diff --git a/app-admin/graylog/files/initd-r2 b/app-admin/graylog/files/initd-r2
new file mode 100644
index 000000000000..c6177eef41d0
--- /dev/null
+++ b/app-admin/graylog/files/initd-r2
@@ -0,0 +1,31 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+command="/usr/bin/java"
+command_args="${JAVA_OPTS} -jar ${GRAYLOG_INSTALL_DIR}/graylog.jar server -f ${GRAYLOG_CONFIG_FILE} --no-pid-file ${GRAYLOG_OPTIONS}"
+command_background="true"
+command_user="${GRAYLOG_USER}:${GRAYLOG_GROUP}"
+pidfile="/run/${RC_SVCNAME}.pid"
+
+output_log="${GRAYLOG_LOG_DIR}/graylog.stdout.log"
+error_log="${GRAYLOG_LOG_DIR}/graylog.stderr.log"
+directory="${GRAYLOG_INSTALL_DIR}"
+required_files="${GRAYLOG_CONFIG_FILE}"
+
+depend() {
+ use dns
+}
+
+start_pre() {
+ local d
+ for d in \
+ "${GRAYLOG_DATA_DIR}" \
+ "${GRAYLOG_DATA_DIR}/data" \
+ "${GRAYLOG_DATA_DIR}/data/contentpacks" \
+ "${GRAYLOG_DATA_DIR}/data/journal" \
+ "${GRAYLOG_LOG_DIR}"; do
+
+ checkpath -d -o "${GRAYLOG_USER}":"${GRAYLOG_GROUP}" -m750 "${d}"
+ done
+}
diff --git a/app-admin/graylog/graylog-2.5.1.ebuild b/app-admin/graylog/graylog-2.5.1.ebuild
new file mode 100644
index 000000000000..b045b60179ec
--- /dev/null
+++ b/app-admin/graylog/graylog-2.5.1.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit user
+
+DESCRIPTION="Free and open source log management"
+HOMEPAGE="https://www.graylog.org"
+SRC_URI="https://packages.graylog2.org/releases/graylog/graylog-${PV}.tgz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~x86"
+RESTRICT="strip"
+
+RDEPEND="virtual/jdk:1.8"
+
+DOCS=(
+ COPYING README.markdown UPGRADING.rst
+)
+
+GRAYLOG_DATA_DIR="/var/lib/graylog2"
+GRAYLOG_INSTALL_DIR="/usr/share/graylog2"
+QA_PREBUILT="${GRAYLOG_INSTALL_DIR}/lib/sigar/libsigar*"
+
+S="${WORKDIR}/graylog-${PV}"
+
+pkg_setup() {
+ enewgroup graylog
+ enewuser graylog -1 -1 -1 graylog
+}
+
+src_prepare() {
+ default
+
+ # Stick to architecture of build host
+ if ! use amd64; then
+ rm -r lib/sigar/libsigar-amd64-*.so || die "Failed in removing AMD64 support libraries"
+ fi
+ if ! use ppc64; then
+ rm -r lib/sigar/libsigar-ppc64-*.so || die "Failed in removing PPC64 support libraries"
+ fi
+ if ! use x86; then
+ rm -r lib/sigar/libsigar-x86-*.so || die "Failed in removing X86 support libraries"
+ fi
+ # Currently unsupported platforms
+ # QA warning galore but testing/patches welcome
+ rm lib/sigar/libsigar-*freebsd*so \
+ lib/sigar/libsigar-*solaris*so \
+ lib/sigar/libsigar-*hpux*.sl \
+ lib/sigar/libsigar-*macosx*.dylib \
+ lib/sigar/libsigar-ia64-*.so \
+ lib/sigar/libsigar-ppc-*.so \
+ lib/sigar/libsigar-s390x*.so \
+ lib/sigar/*winnt* || die "Failed in removing unsupported platform libraries"
+
+ # gentoo specific paths
+ sed -i "s@\(node_id_file = \).*@\1${GRAYLOG_DATA_DIR}/node-id@g; \
+ s@\(message_journal_dir = \).*@\1${GRAYLOG_DATA_DIR}/data/journal@g; \
+ s@#\(content_packs_dir = \).*@\1${GRAYLOG_DATA_DIR}/data/contentpacks@g" \
+ graylog.conf.example || die
+}
+
+src_install() {
+ default
+
+ insinto /etc/graylog2
+ doins graylog.conf.example
+
+ insinto "${GRAYLOG_DATA_DIR}/data/contentpacks"
+ doins data/contentpacks/grok-patterns.json
+
+ insinto "${GRAYLOG_INSTALL_DIR}"
+ doins graylog.jar
+ doins -r lib plugin
+
+ newconfd "${FILESDIR}/confd-r2" graylog2
+ newinitd "${FILESDIR}/initd-r2" graylog2
+}
+
+pkg_postinst() {
+ ewarn "Graylog does not depend on need.net any more (#439092)."
+ ewarn
+ ewarn "Please configure rc_need according to your binding address in:"
+ ewarn "/etc/conf.d/graylog2"
+}
diff --git a/app-admin/graylog/graylog-3.1.3.ebuild b/app-admin/graylog/graylog-3.1.3.ebuild
new file mode 100644
index 000000000000..632bb8a67fbe
--- /dev/null
+++ b/app-admin/graylog/graylog-3.1.3.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="Free and open source log management"
+HOMEPAGE="https://www.graylog.org"
+SRC_URI="https://downloads.graylog.org/releases/graylog/${P}.tgz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~x86"
+RESTRICT="strip"
+
+RDEPEND="!app-admin/graylog2
+ acct-group/graylog
+ acct-user/graylog
+ >=virtual/jdk-1.8"
+
+DOCS=(
+ COPYING README.markdown UPGRADING.rst
+)
+
+GRAYLOG_DATA_DIR="/var/lib/graylog"
+GRAYLOG_INSTALL_DIR="/usr/share/graylog"
+QA_PREBUILT="${GRAYLOG_INSTALL_DIR}/lib/sigar/libsigar*"
+
+src_prepare() {
+ default
+
+ # Stick to architecture of build host
+ if ! use amd64; then
+ rm -r lib/sigar/libsigar-amd64-*.so || die "Failed in removing AMD64 support libraries"
+ fi
+ if ! use ppc64; then
+ rm -r lib/sigar/libsigar-ppc64-*.so || die "Failed in removing PPC64 support libraries"
+ fi
+ if ! use x86; then
+ rm -r lib/sigar/libsigar-x86-*.so || die "Failed in removing X86 support libraries"
+ fi
+ # Currently unsupported platforms
+ # QA warning galore but testing/patches welcome
+ rm lib/sigar/libsigar-*freebsd*so \
+ lib/sigar/libsigar-*solaris*so \
+ lib/sigar/libsigar-*hpux*.sl \
+ lib/sigar/libsigar-*macosx*.dylib \
+ lib/sigar/libsigar-ia64-*.so \
+ lib/sigar/libsigar-ppc-*.so \
+ lib/sigar/libsigar-s390x*.so \
+ lib/sigar/*winnt* || die "Failed in removing unsupported platform libraries"
+
+ # gentoo specific paths
+ sed -i "s@\(node_id_file = \).*@\1${GRAYLOG_DATA_DIR}/node-id@g; \
+ s@\(message_journal_dir = \).*@\1${GRAYLOG_DATA_DIR}/data/journal@g;" \
+ graylog.conf.example || die
+}
+
+src_install() {
+ default
+
+ insinto /etc/graylog
+ doins graylog.conf.example
+
+ insinto "${GRAYLOG_INSTALL_DIR}"
+ doins graylog.jar
+ doins -r lib plugin
+
+ keepdir "${GRAYLOG_DATA_DIR}"
+
+ newconfd "${FILESDIR}/graylog.confd" graylog
+ newinitd "${FILESDIR}/graylog.initd" graylog
+}
+
+pkg_postinst() {
+ ewarn "Graylog does not depend on need.net any more (#439092)."
+ ewarn
+ ewarn "Please configure rc_need according to your binding address in:"
+ ewarn "/etc/conf.d/graylog"
+ ewarn
+ ewarn "Graylog requires Java >= 8"
+ ewarn "Elasticsearch 5.x or 6.x (does NOT work with 7.x)"
+ ewarn "and MongoDB 3.6 or 4.0 (does NOT work with 4.2)"
+}
diff --git a/app-admin/graylog/metadata.xml b/app-admin/graylog/metadata.xml
new file mode 100644
index 000000000000..84ba1f113f4d
--- /dev/null
+++ b/app-admin/graylog/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>chainsaw@gentoo.org</email>
+ <name>Tony Vroon</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>hydrapolic@gmail.com</email>
+ <name>Tomáš Mózes</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">graylog2/graylog2-server</remote-id>
+ </upstream>
+</pkgmetadata>