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 /app-admin/rsyslog/files | |
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 'app-admin/rsyslog/files')
11 files changed, 463 insertions, 0 deletions
diff --git a/app-admin/rsyslog/files/8-stable/10-respect_CFLAGS-r1.patch b/app-admin/rsyslog/files/8-stable/10-respect_CFLAGS-r1.patch new file mode 100644 index 000000000000..de89e6708c1f --- /dev/null +++ b/app-admin/rsyslog/files/8-stable/10-respect_CFLAGS-r1.patch @@ -0,0 +1,15 @@ +diff --git a/configure.ac b/configure.ac +index bebb399..5003f10 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -792,8 +792,8 @@ if test "x$enable_rsyslogrt" = "xyes"; then + fi + AM_CONDITIONAL(ENABLE_RSYSLOGRT, test x$enable_rsyslogrt = xyes) + RSRT_CFLAGS="\$(RSRT_CFLAGS1) \$(LIBESTR_CFLAGS) \$(JSON_C_CFLAGS)" +-if test "$GCC" = "yes" +-then RSRT_CFLAGS="$RSRT_CFLAGS -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -Werror=implicit-function-declaration -g" ++if test "$GCC" = "yes"; then ++ RSRT_CFLAGS="$RSRT_CFLAGS -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -Werror=implicit-function-declaration" + fi + RSRT_LIBS="\$(RSRT_LIBS1) \$(LIBESTR_LIBS) \$(JSON_C_LIBS)" + AC_SUBST(RSRT_CFLAGS1) diff --git a/app-admin/rsyslog/files/8-stable/10-respect_CFLAGS.patch b/app-admin/rsyslog/files/8-stable/10-respect_CFLAGS.patch new file mode 100644 index 000000000000..c74279bfdedc --- /dev/null +++ b/app-admin/rsyslog/files/8-stable/10-respect_CFLAGS.patch @@ -0,0 +1,11 @@ +--- configure.old 2014-10-02 15:41:45.692471540 +0200 ++++ configure.ac 2014-10-02 15:42:11.122743182 +0200 +@@ -835,7 +835,7 @@ + AM_CONDITIONAL(ENABLE_RSYSLOGRT, test x$enable_rsyslogrt = xyes) + RSRT_CFLAGS="\$(RSRT_CFLAGS1) \$(LIBESTR_CFLAGS) \$(JSON_C_CFLAGS)" + if test "$GCC" = "yes" +-then RSRT_CFLAGS="$RSRT_CFLAGS -W -std=c99 -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -g" ++then RSRT_CFLAGS="$RSRT_CFLAGS -W -std=c99 -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute" + fi + RSRT_LIBS="\$(RSRT_LIBS1) \$(LIBESTR_LIBS) \$(JSON_C_LIBS)" + AC_SUBST(RSRT_CFLAGS1) diff --git a/app-admin/rsyslog/files/8-stable/50-default.conf b/app-admin/rsyslog/files/8-stable/50-default.conf new file mode 100644 index 000000000000..9ae8578215bb --- /dev/null +++ b/app-admin/rsyslog/files/8-stable/50-default.conf @@ -0,0 +1,95 @@ +####################### +### DEFAULT ACTIONS ### +####################### + +auth,authpriv.* action( + type="omfile" + File="/var/log/auth.log" + FileCreateMode="0600" + FileOwner="root" + FileGroup="adm" + Sync="off" +) + +cron.* action( + type="omfile" + File="/var/log/cron.log" + FileOwner="root" + FileGroup="adm" +) + +daemon.* action( + type="omfile" + File="/var/log/daemon.log" + FileOwner="root" + FileGroup="adm" +) + +kern.* action( + type="omfile" + File="/var/log/kern.log" + FileOwner="root" + FileGroup="adm" +) + +lpr.* action( + type="omfile" + File="/var/log/lpr.log" + FileOwner="root" + FileGroup="adm" +) + +mail.* action( + type="omfile" + File="/var/log/mail.log" + FileOwner="root" + FileGroup="adm" +) + +news.* action( + type="omfile" + File="/var/log/news.log" + FileOwner="root" + FileGroup="adm" +) + +user.* action( + type="omfile" + File="/var/log/user.log" + FileOwner="root" + FileGroup="adm" +) + +*.=debug;auth,authpriv,news,mail.none action( + type="omfile" + File="/var/log/debug.log" + FileOwner="root" + FileGroup="adm" +) + +*.info;auth,authpriv,cron,daemon,lpr,mail,news.none action( + type="omfile" + File="/var/log/messages" + FileOwner="root" + FileGroup="adm" +) + +# Uncomment the following directive to re-enable the +# deprecated "/var/log/syslog" log file (don't forget to re-enable log +# rotation in "/etc/logrotate.d/rsyslog" if you do that!) +#*.*;auth,authpriv.none action( +# type="omfile" +# File="/var/log/syslog" +# FileOwner="root" +# FileGroup="adm" +#) + +*.emerg action( + type="omusrmsg" + Users="*" + action.execOnlyOnceEveryInterval="10" +) + +# Create an additional socket for the default chroot location +# (used by net-misc/openssh[hpn], see https://bugs.gentoo.org/490744) +input(type="imuxsock" Socket="/var/empty/dev/log") diff --git a/app-admin/rsyslog/files/8-stable/50-rsyslog-add-option-to-disable-valgrind-usage-in-testbench.patch b/app-admin/rsyslog/files/8-stable/50-rsyslog-add-option-to-disable-valgrind-usage-in-testbench.patch new file mode 100644 index 000000000000..77d7919c6188 --- /dev/null +++ b/app-admin/rsyslog/files/8-stable/50-rsyslog-add-option-to-disable-valgrind-usage-in-testbench.patch @@ -0,0 +1,56 @@ +From 2945539d12bbb79c44fd4402e87150b4ec58af25 Mon Sep 17 00:00:00 2001 +From: Thomas D. +Date: Tue, 24 Mar 2015 02:03:13 +0100 +Subject: [PATCH] Add option to disable valgrind usage in testbench + +Temporary workaround for https://github.com/rsyslog/rsyslog/issues/263 + +--- + configure.ac | 27 +++++++++++++++++++++++---- + 1 file changed, 23 insertions(+), 4 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 0c72f80..cdfdd25 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -13,10 +13,6 @@ AC_CONFIG_HEADERS([config.h]) + + AC_USE_SYSTEM_EXTENSIONS + +-# check if valgrind is present +-AC_CHECK_PROG(have_valgrind, [valgrind], [yes]) +-AM_CONDITIONAL(HAVE_VALGRIND, test x$have_valgrind = xyes) +- + # Checks for programs. + AC_PROG_LEX + AC_PROG_YACC +@@ -1125,6 +1121,29 @@ if test "x$enable_testbench" = "xyes"; then + fi + + ++# valgrind-testbench ++AC_ARG_WITH([valgrind_testbench], ++ [AS_HELP_STRING([--without-valgrind-testbench], [Don't use valgrind in testbench])] ++) ++ ++if test "x$with_valgrind_testbench" != "xno"; then ++ AC_CHECK_PROG(VALGRIND, [valgrind], [valgrind], [no]) ++ ++ if test "x$enable_testbench" = "xyes" && test "x$VALGRIND" = "xno"; then ++ if test "x$with_valgrind_testbench" = "xyes"; then ++ AC_MSG_ERROR([valgrind is missing but forced with --with-valgrind-testbench. Either install valgrind or remove the option!]) ++ else ++ AC_MSG_WARN([valgrind is missing -- testbench won't use valgrind!]) ++ fi ++ else ++ AC_MSG_NOTICE([testbench will use valgrind]) ++ fi ++else ++ AC_MSG_NOTICE([testbench won't use valgrind due to set --without-valgrind-testbench option]) ++fi ++AM_CONDITIONAL([HAVE_VALGRIND], [test "x$with_valgrind_testbench" != "xno" && test "x$VALGRIND" != "xno"]) ++ ++ + # settings for the file input module + AC_ARG_ENABLE(imfile, + [AS_HELP_STRING([--enable-imfile],[file input module enabled @<:@default=no@:>@])], diff --git a/app-admin/rsyslog/files/8-stable/50-rsyslog-fix-size-based-legacy-config-statements.patch b/app-admin/rsyslog/files/8-stable/50-rsyslog-fix-size-based-legacy-config-statements.patch new file mode 100644 index 000000000000..67a2f0616f32 --- /dev/null +++ b/app-admin/rsyslog/files/8-stable/50-rsyslog-fix-size-based-legacy-config-statements.patch @@ -0,0 +1,31 @@ +From 3b7bd0b7a7f0f5f1bf7609bdf34e7d9a32608ea6 Mon Sep 17 00:00:00 2001 +From: Rainer Gerhards <rgerhards@adiscon.com> +Date: Tue, 17 Mar 2015 11:50:06 +0100 +Subject: [PATCH] bugfix: size-based legacy config statements did not work + properly + +on some platforms they misadressed memory, which could also lead +to a segfault on startup. The problem is NOT experience on amd686 +in 64bit builds -- that's probably the reason this bug was uncovered +very late. We assume, it's present in all v8 versions. + +Thanks to Michael Biebl for alerting us of it. + +closes https://github.com/rsyslog/rsyslog/issues/270 +--- + runtime/cfsysline.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/runtime/cfsysline.c b/runtime/cfsysline.c +index 36d4679..b441a48 100644 +--- a/runtime/cfsysline.c ++++ b/runtime/cfsysline.c +@@ -161,7 +161,7 @@ static rsRetVal parseIntVal(uchar **pp, int64 *pVal) + * param value must be int64! + * rgerhards, 2008-01-09 + */ +-static rsRetVal doGetSize(uchar **pp, rsRetVal (*pSetHdlr)(void*, uid_t), void *pVal) ++static rsRetVal doGetSize(uchar **pp, rsRetVal (*pSetHdlr)(void*, int64), void *pVal) + { + DEFiRet; + int64 i; diff --git a/app-admin/rsyslog/files/8-stable/50-rsyslog-run-queue-persist-test-only-once.patch b/app-admin/rsyslog/files/8-stable/50-rsyslog-run-queue-persist-test-only-once.patch new file mode 100644 index 000000000000..d2ded2228983 --- /dev/null +++ b/app-admin/rsyslog/files/8-stable/50-rsyslog-run-queue-persist-test-only-once.patch @@ -0,0 +1,22 @@ +From 31a5edc9be63de42f68825ff8e4d683534664a68 Mon Sep 17 00:00:00 2001 +From: Thomas D. +Date: Sun, 8 Mar 2015 21:05:03 +0100 +Subject: [PATCH] tests: Run queue-persist.sh only once + +queue-persist.sh was called twice in Makefile. +--- + tests/Makefile.am | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/tests/Makefile.am b/tests/Makefile.am +index 7575b84..9824e7e 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -83,7 +83,6 @@ TESTS += \ + imuxsock_logger_root.sh \ + imuxsock_traillf_root.sh \ + imuxsock_ccmiddle_root.sh \ +- queue-persist.sh \ + discard-rptdmsg.sh \ + discard-allmark.sh \ + discard.sh \ diff --git a/app-admin/rsyslog/files/8-stable/README.gentoo b/app-admin/rsyslog/files/8-stable/README.gentoo new file mode 100644 index 000000000000..9f0666c86b0a --- /dev/null +++ b/app-admin/rsyslog/files/8-stable/README.gentoo @@ -0,0 +1,36 @@ +Introduction +============ + +Since rsyslog version 7.6 we are shipping a new default Gentoo +configuration. See bug #501982 to learn more about what we were trying to +achieve by rewriting the entire configuration. + + +Important changes +================= + +1. "/var/log/syslog" log file is now deprecated + + Beginning with rsyslog-7.6, the "/var/log/syslog" log file will no + longer being written per default. We are considering this file as + deprecated/obsolet for the typical user/system. + The content from this log file is still availble through other + (dedicated) log files, see + + - /var/log/cron.log + - /var/log/daemon.log + - /var/log/mail.log + - /var/log/messages + + If you really need the old "/var/log/syslog" log file, all you have to + do is uncommenting the corresponding configuration directive in + "/etc/rsyslog.d/50-default.conf". + + If you do so, don't forget to re-enable log rotation in + "/etc/logrotate.d/rsyslog", too. + + +2. An additional input socket in "/var/empty/dev/log" (default chroot + location) will be created per default + + See bug #490744 for further details. diff --git a/app-admin/rsyslog/files/8-stable/rsyslog.conf b/app-admin/rsyslog/files/8-stable/rsyslog.conf new file mode 100644 index 000000000000..da484598a652 --- /dev/null +++ b/app-admin/rsyslog/files/8-stable/rsyslog.conf @@ -0,0 +1,61 @@ +# /etc/rsyslog.conf +# +# This configuration is based on RainerScript, the new recommended syntax +# for RSYSLOG. See http://www.rsyslog.com/doc/rainerscript.html for further +# details. +# +# But if you don't want to learn something new at moment, don't worry: The +# legacy syntax is still supported. +# +# You may want to use the new RSYSLOG configuration builder to create your +# own more advanced configuration: http://www.rsyslog.com/rsyslog-configuration-builder/ + +# Check config syntax on startup and abort if unclean (default: off) +#$AbortOnUncleanConfig on + + +############### +### MODULES ### +############### + +# Read syslog messages from default Unix socket /dev/log (e.g. via logger command) +module(load="imuxsock") + +# Read messages from the kernel log and submits them to the syslog engine +module(load="imklog") + +# Inject "--MARK--" messages every $Interval (seconds) +#module(load="immark" Interval="600") + +# Read syslog messages from UDP +#module(load="imudp") +#input(type="imudp" port="514") + +# Read syslog messages from TCP +#module(load="imtcp") +#input(type="imtcp" port="514") + + +######################### +### GLOBAL DIRECTIVES ### +######################### + +# Where to place spool and state files +$WorkDirectory /var/spool/rsyslog + +# Reduce repeating messages (default: off) +#$RepeatedMsgReduction on + +# Set defaults for every output file +$Umask 0022 + +module( + load="builtin:omfile" + Template="RSYSLOG_TraditionalFileFormat" + FileCreateMode="0644" + DirCreateMode="0755" +) + + +# Include all conf files in /etc/rsyslog.d/ +$IncludeConfig /etc/rsyslog.d/*.conf diff --git a/app-admin/rsyslog/files/8-stable/rsyslog.confd b/app-admin/rsyslog/files/8-stable/rsyslog.confd new file mode 100644 index 000000000000..d8cbe875960a --- /dev/null +++ b/app-admin/rsyslog/files/8-stable/rsyslog.confd @@ -0,0 +1,30 @@ +# /etc/conf.d/rsyslog + +# Configuration file +RSYSLOG_CONFIGFILE="/etc/rsyslog.conf" + +# PID file +# If you should ever change this, remember to update +# "/etc/logrotate.d/rsyslog", too. +RSYSLOG_PIDFILE="/run/rsyslogd.pid" + +# You can use this configuration option to pass additional options to the +# start-stop-daemon, see start-stop-daemon(8) for more details. +# Per default we wait 1000ms after we have started the service to ensure +# that the daemon is really up and running. +RSYSLOG_SSDARGS="--wait 1000" + +# The termination timeout (start-stop-daemon parameter "retry") ensures +# that the service will be terminated within a given time (60 + 5 seconds +# per default) when you are stopping the service. +# You need to increase the value when you are working with a large queue. +# See http://www.rsyslog.com/doc/queues.html for further information. +RSYSLOG_TERMTIMEOUT="TERM/60/KILL/5" + + +# Options to rsyslogd +# See rsyslogd(8) for more details +# Notes: +# * Do not specify another PIDFILE but use the variable above to change the location +# * Do not specify another CONFIGFILE but use the variable above to change the location +RSYSLOG_OPTS="" diff --git a/app-admin/rsyslog/files/8-stable/rsyslog.initd b/app-admin/rsyslog/files/8-stable/rsyslog.initd new file mode 100644 index 000000000000..a74f218e6a32 --- /dev/null +++ b/app-admin/rsyslog/files/8-stable/rsyslog.initd @@ -0,0 +1,69 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +RSYSLOG_CONFIGFILE=${RSYSLOG_CONFIGFILE:-"/etc/rsyslog.conf"} +RSYSLOG_PIDFILE=${RSYSLOG_PIDFILE:-"/run/rsyslogd.pid"} + +command="/usr/sbin/rsyslogd" +command_args="${RSYSLOG_OPTS} -f ${RSYSLOG_CONFIGFILE} -i ${RSYSLOG_PIDFILE}" +start_stop_daemon_args="${RSYSLOG_SSDARGS}" +pidfile="${RSYSLOG_PIDFILE}" +retry="${RSYSLOG_TERMTIMEOUT}" + +required_files="${RSYSLOG_CONFIGFILE}" + +description="RSYSLOG is the rocket-fast system for log processing (syslog replacement)." + +extra_commands="configtest" +extra_started_commands="rotate" + +description_configtest="Run rsyslogd's internal config check." + +description_rotate="Sends rsyslogd a signal to re-open its log files." + +depend() { + need clock hostname localmount + provide logger +} + +start_pre() { + if [ "${RC_CMD}" != "restart" ]; then + configtest || return 1 + fi +} + +stop_pre() { + if [ "${RC_CMD}" = "restart" ]; then + configtest || return 1 + fi +} + +stop_post() { + rm -f ${RSYSLOG_PIDFILE} +} + +configtest() { + # This will currently only detect fatal errors + # See https://github.com/rsyslog/rsyslog/issues/79 + + local _test_command="${command} -N 999 -f ${RSYSLOG_CONFIGFILE}" + local _retval=0 + + ebegin "Checking rsyslogd's configuration" + ${_test_command} >/dev/null 2>&1 + _retval=$? + + if [ ${_retval} -ne 0 ]; then + ${_test_command} + fi + + eend ${_retval} "failed, please correct errors above" +} + +rotate() { + ebegin "Re-opening rsyslogd logs" + start-stop-daemon --signal SIGHUP --pidfile "${RSYSLOG_PIDFILE}" + eend $? +} diff --git a/app-admin/rsyslog/files/8-stable/rsyslog.logrotate b/app-admin/rsyslog/files/8-stable/rsyslog.logrotate new file mode 100644 index 000000000000..1eae30e0d741 --- /dev/null +++ b/app-admin/rsyslog/files/8-stable/rsyslog.logrotate @@ -0,0 +1,37 @@ +# Uncomment the following directive if you have re-enabled +# "/var/log/syslog" in "/etc/rsyslog.d/50-default.conf" +#/var/log/syslog +#{ +# rotate 7 +# daily +# missingok +# notifempty +# delaycompress +# compress +# postrotate +# test -r /run/rsyslogd.pid && kill -HUP $(cat /run/rsyslogd.pid) &>/dev/null +# endscript +#} + +/var/log/auth.log +/var/log/cron.log +/var/log/daemon.log +/var/log/kern.log +/var/log/lpr.log +/var/log/mail.log +/var/log/news.log +/var/log/user.log +/var/log/debug.log +/var/log/messages +{ + rotate 4 + weekly + missingok + notifempty + compress + delaycompress + sharedscripts + postrotate + test -r /run/rsyslogd.pid && kill -HUP $(cat /run/rsyslogd.pid) &>/dev/null + endscript +} |