Index: sysutils/graylog/Makefile =================================================================== --- sysutils/graylog/Makefile +++ sysutils/graylog/Makefile @@ -1,9 +1,8 @@ PORTNAME= graylog -DISTVERSION= 4.3.9 +DISTVERSION= 5.0.2 CATEGORIES= sysutils java MASTER_SITES= https://downloads.graylog.org/releases/ -DISTFILES= graylog/${DISTNAME}${EXTRACT_SUFX} \ - graylog-integrations/graylog-integrations-plugins-${DISTVERSION}${EXTRACT_SUFX} +DISTFILES= graylog/${DISTNAME}${EXTRACT_SUFX} MAINTAINER= dch@FreeBSD.org COMMENT= Tool for centralized log collection @@ -18,7 +17,7 @@ USES= cpe tar:tgz USE_JAVA= yes -JAVA_VERSION= 1.8+ +JAVA_VERSION= 17+ JAVA_EXTRACT= yes JAVA_RUN= yes @@ -38,7 +37,8 @@ SUB_LIST= GRAYLOG_DATA_DIR=${GRAYLOG_DATA_DIR} \ GRAYLOG_LOGS_DIR=${GRAYLOG_LOGS_DIR} \ GRAYLOGGROUP=${GRAYLOGGROUP} \ - GRAYLOGUSER=${GRAYLOGUSER} + GRAYLOGUSER=${GRAYLOGUSER} \ + JAVA_HOME=${JAVA_HOME} PLIST_SUB= DISTVERSION=${DISTVERSION} \ GRAYLOG_DATA_DIR=${GRAYLOG_DATA_DIR} \ @@ -53,7 +53,6 @@ -e 's,^data_dir .+,data_dir = /var/db/graylog,' \ -e 's,^message_journal_dir .+,message_journal_dir = ${GRAYLOG_DATA_DIR}/journal,' \ -e 's,^node_id_file .+,node_id_file = ${ETCDIR}/server/node-id,' \ - -e 's,^plugin_dir .+,plugin_dir = ${LOCALBASE}/share/graylog/plugin,' \ ${WRKSRC}/graylog.conf.example do-install: @@ -66,8 +65,6 @@ ${STAGEDIR}${ETCDIR}/graylog.conf.sample ${INSTALL_DATA} ${WRKDIR}/log4j2.xml \ ${STAGEDIR}${ETCDIR}/log4j2.xml.sample - cd ${WRKDIR}/graylog-integrations-plugins-${DISTVERSION}/plugin && \ - ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/plugin/ cd ${WRKSRC}/plugin && \ ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/plugin/ Index: sysutils/graylog/distinfo =================================================================== --- sysutils/graylog/distinfo +++ sysutils/graylog/distinfo @@ -1,5 +1,3 @@ -TIMESTAMP = 1668610419 -SHA256 (graylog/graylog-4.3.9.tgz) = 04cc3a538ecb41014554cdf8ae069d31eb69613b63e91dc4fae53476d4dc1fae -SIZE (graylog/graylog-4.3.9.tgz) = 205517890 -SHA256 (graylog-integrations/graylog-integrations-plugins-4.3.9.tgz) = 21035ef2dfad2c2dc7c7913527b44232727d9d9291cb3f922585b2dae0154610 -SIZE (graylog-integrations/graylog-integrations-plugins-4.3.9.tgz) = 29305007 +TIMESTAMP = 1673040775 +SHA256 (graylog/graylog-5.0.2.tgz) = 183e7f87bb037dec51d4b3d146d1684e4d8095ce7bf0dfb5ef5faf9b06734792 +SIZE (graylog/graylog-5.0.2.tgz) = 252827584 Index: sysutils/graylog/files/graylog.in =================================================================== --- sysutils/graylog/files/graylog.in +++ sysutils/graylog/files/graylog.in @@ -19,7 +19,7 @@ # Name of the graylog group # # graylog_config (string) -# Default value %%ETCDIR%%/server/server.conf +# Default value %%ETCDIR%%/graylog.conf # Path to the graylog configuration file # # graylog_min_mem (string): @@ -45,6 +45,10 @@ # graylog_log_config (string): # Default value: %%ETCDIR%%/server/log4j2.xml # Path to the Graylog Server logfile +# +# graylog_java_home (path): +# Default value: %%JAVA_HOME%% +# Set it to the root of the JDK to use. . /etc/rc.subr @@ -53,38 +57,31 @@ load_rc_config $name : ${graylog_enable:="NO"} -: ${graylog_user:="%%GRAYLOGUSER%%"} -: ${graylog_group:="%%GRAYLOGGROUP%%"} : ${graylog_config:="%%ETCDIR%%/graylog.conf"} -: ${graylog_min_mem:="256m"} -: ${graylog_max_mem:="1g"} -: ${graylog_dir:="%%DATADIR%%"} : ${graylog_data_dir:="%%GRAYLOG_DATA_DIR%%"} -: ${graylog_logs_dir:="%%GRAYLOG_LOGS_DIR%%"} -: ${graylog_run_dir:="/var/run/graylog"} +: ${graylog_dir:="%%DATADIR%%"} +: ${graylog_group:="%%GRAYLOGGROUP%%"} +: ${graylog_java_home:="%%JAVA_HOME%%"} +: ${graylog_java_opts:=""} : ${graylog_log_config:="%%ETCDIR%%/log4j2.xml"} +: ${graylog_logs_dir:="%%GRAYLOG_LOGS_DIR%%"} +: ${graylog_max_mem:="1g"} +: ${graylog_min_mem:="256m"} +: ${graylog_run_dir:="/var/run/graylog"} +: ${graylog_user:="%%GRAYLOGUSER%%"} java_options=" \ - -Djava.awt.headless=true \ -Dapp=${name} \ + -Djava.awt.headless=true \ -Dlog4j.configurationFile=${graylog_log_config} \ - -Xms${graylog_min_mem} \ - -Xmx${graylog_max_mem} \ - -XX:-OmitStackTraceInFastThrow \ - -XX:+AggressiveOpts \ - -XX:+CMSClassUnloadingEnabled \ - -XX:+CMSConcurrentMTEnabled \ - -XX:+CMSParallelRemarkEnabled \ - -XX:+DisableExplicitGC \ -XX:+HeapDumpOnOutOfMemoryError \ -XX:+ResizeTLAB \ - -XX:+UseCMSInitiatingOccupancyOnly \ -XX:+UseCompressedOops \ - -XX:+UseConcMarkSweepGC \ - -XX:+UseFastAccessorMethods \ - -XX:+UseParNewGC \ - -XX:CMSInitiatingOccupancyFraction=75 \ + -XX:-OmitStackTraceInFastThrow \ -XX:NewRatio=1 \ + -Xms${graylog_min_mem} \ + -Xmx${graylog_max_mem} \ + ${graylog_java_opts} \ " app_pidfile="${graylog_run_dir}/${name}.pid" @@ -103,6 +100,8 @@ --no-pid-file \ --configfile ${graylog_config}" +export JAVA_HOME=${graylog_java_home} + required_files="%%LOCALBASE%%/bin/java ${graylog_config}" graylog_precmd() { Index: sysutils/graylog/files/pkg-message.in =================================================================== --- sysutils/graylog/files/pkg-message.in +++ sysutils/graylog/files/pkg-message.in @@ -11,28 +11,29 @@ For a single-node installation, install: -- databases/mongodb40 or higher -- textproc/elasticsearch6 or higher +- databases/mongodb50 or higher +- textproc/opensearch 1.3, 2.0 or higher And ensure that the elasticsearch cluster name matches that used by graylog. +See https://go2docs.graylog.org/5-0/downloading_and_installing_graylog/installing_graylog.html + EOM } { type: upgrade message: <