diff --git a/.gitignore b/.gitignore index 7903c69..c8548c8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ SOURCES/qpid-proton-0.39.0.tar.gz -SOURCES/rsyslog-8.2310.0.tar.gz -SOURCES/rsyslog-doc-8.2310.0.tar.gz +SOURCES/rsyslog-8.2412.0.tar.gz +SOURCES/rsyslog-doc-8.2412.0.tar.gz diff --git a/.rsyslog.metadata b/.rsyslog.metadata index 5aa1760..41fee07 100644 --- a/.rsyslog.metadata +++ b/.rsyslog.metadata @@ -1,3 +1,3 @@ -e2fe5aada26415aeb1902435a8acf5ee388cb2cf SOURCES/qpid-proton-0.39.0.tar.gz -702012a5ed36fe2a07bed78f80de1915787aac75 SOURCES/rsyslog-8.2310.0.tar.gz -9016da3bc06acdbde78ad83d129582c22fe444a1 SOURCES/rsyslog-doc-8.2310.0.tar.gz +de593ff72792d70b9027dd67aaa2b830dc148574 SOURCES/qpid-proton-0.39.0.tar.gz +d2b48451c525a76a554acc3232605b67ee270aa9 SOURCES/rsyslog-8.2412.0.tar.gz +9b9e0379f368781b4bee17b2b117bf8234c4e9e6 SOURCES/rsyslog-doc-8.2412.0.tar.gz diff --git a/SOURCES/imfile-deleteStateOnFileMove.patch b/SOURCES/imfile-deleteStateOnFileMove.patch new file mode 100644 index 0000000..1c24241 --- /dev/null +++ b/SOURCES/imfile-deleteStateOnFileMove.patch @@ -0,0 +1,28 @@ +diff -up rsyslog-8.2412.0/plugins/imfile/imfile.c.orig rsyslog-8.2412.0/plugins/imfile/imfile.c +--- rsyslog-8.2412.0/plugins/imfile/imfile.c.orig 2024-12-06 13:42:53.855126447 +0100 ++++ rsyslog-8.2412.0/plugins/imfile/imfile.c 2024-12-06 13:44:43.990211090 +0100 +@@ -264,6 +264,7 @@ struct modConfData_s { + Must be manually reset to 0 if desired. Helper for + polling mode. + */ ++ sbool deleteStateOnFileMove; + }; + static modConfData_t *loadModConf = NULL;/* modConf ptr to use for the current load process */ + static modConfData_t *runModConf = NULL;/* modConf ptr to use for run process */ +@@ -2094,6 +2095,7 @@ CODESTARTbeginCnfLoad + loadModConf->timeoutGranularity = 1000; /* default: 1 second */ + loadModConf->haveReadTimeouts = 0; /* default: no timeout */ + loadModConf->normalizePath = 1; ++ loadModConf->deleteStateOnFileMove = 0; + loadModConf->sortFiles = GLOB_NOSORT; + loadModConf->stateFileDirectory = NULL; + loadModConf->conf_tree = calloc(1, sizeof(fs_node_t)); +@@ -2153,6 +2155,8 @@ CODESTARTsetModCnf + loadModConf->stateFileDirectory = (uchar*)es_str2cstr(pvals[i].val.d.estr, NULL); + } else if(!strcmp(modpblk.descr[i].name, "normalizepath")) { + loadModConf->normalizePath = (sbool) pvals[i].val.d.n; ++ } else if(!strcmp(modpblk.descr[i].name, "deletestateonfilemove")) { ++ loadModConf->deleteStateOnFileMove = (sbool) pvals[i].val.d.n; + } else if(!strcmp(modpblk.descr[i].name, "mode")) { + if(!es_strconstcmp(pvals[i].val.d.estr, "polling")) + loadModConf->opMode = OPMODE_POLLING; diff --git a/SOURCES/rsyslog-8.1911.0-rhbz1659898-imjournal-default-tag-v2.patch b/SOURCES/rsyslog-8.1911.0-rhbz1659898-imjournal-default-tag-v2.patch deleted file mode 100644 index 2d0d51d..0000000 --- a/SOURCES/rsyslog-8.1911.0-rhbz1659898-imjournal-default-tag-v2.patch +++ /dev/null @@ -1,83 +0,0 @@ -diff -up rsyslog-8.2310.0/plugins/imjournal/imjournal.c.orig rsyslog-8.2310.0/plugins/imjournal/imjournal.c ---- rsyslog-8.2310.0/plugins/imjournal/imjournal.c.orig 2023-10-10 16:42:39.771369418 +0200 -+++ rsyslog-8.2310.0/plugins/imjournal/imjournal.c 2023-10-10 16:51:39.839133580 +0200 -@@ -87,6 +87,7 @@ static struct configSettings_s { - int bWorkAroundJournalBug; /* deprecated, left for backwards compatibility only */ - int bFsync; - int bRemote; -+ char *dfltTag; - } cs; - - static rsRetVal facilityHdlr(uchar **pp, void *pVal); -@@ -106,7 +107,8 @@ static struct cnfparamdescr modpdescr[] - { "usepid", eCmdHdlrString, 0 }, - { "workaroundjournalbug", eCmdHdlrBinary, 0 }, - { "fsync", eCmdHdlrBinary, 0 }, -- { "remote", eCmdHdlrBinary, 0 } -+ { "remote", eCmdHdlrBinary, 0 }, -+ { "defaulttag", eCmdHdlrGetWord, 0 } - }; - static struct cnfparamblk modpblk = - { CNFPARAMBLK_VERSION, -@@ -117,6 +119,7 @@ static struct cnfparamblk modpblk = - #define DFLT_persiststateinterval 10 - #define DFLT_SEVERITY pri2sev(LOG_NOTICE) - #define DFLT_FACILITY pri2fac(LOG_USER) -+#define DFLT_TAG "journal" - - static int bLegacyCnfModGlobalsPermitted = 1;/* are legacy module-global config parameters permitted? */ - -@@ -458,7 +461,7 @@ readjournal(void) - } else if (journalGetData("_COMM", &get, &length) >= 0) { - CHKiRet(sanitizeValue(((const char *)get) + 6, length - 6, &sys_iden)); - } else { -- CHKmalloc(sys_iden = strdup("journal")); -+ CHKmalloc(sys_iden = strdup(cs.dfltTag)); - } - - /* trying to get PID, default is "SYSLOG_PID" property */ -@@ -826,6 +829,10 @@ CODESTARTrunInput - "\"usepidfromsystem\" is deprecated, use \"usepid\" instead"); - } - -+ if (cs.dfltTag == NULL) { -+ cs.dfltTag = strdup(DFLT_TAG); -+ } -+ - if (cs.usePid && (strcmp(cs.usePid, "system") == 0)) { - pidFieldName = "_PID"; - bPidFallBack = 0; -@@ -914,6 +921,7 @@ CODESTARTbeginCnfLoad - cs.bWorkAroundJournalBug = 1; - cs.bFsync = 0; - cs.bRemote = 0; -+ cs.dfltTag = NULL; - ENDbeginCnfLoad - - -@@ -983,6 +991,7 @@ BEGINfreeCnf - CODESTARTfreeCnf - free(cs.stateFile); - free(cs.usePid); -+ free(cs.dfltTag); - free(journalContext.cursor); - statsobj.Destruct(&(statsCounter.stats)); - ENDfreeCnf -@@ -1077,6 +1086,8 @@ CODESTARTsetModCnf - cs.bFsync = (int) pvals[i].val.d.n; - } else if (!strcmp(modpblk.descr[i].name, "remote")) { - cs.bRemote = (int) pvals[i].val.d.n; -+ } else if (!strcmp(modpblk.descr[i].name, "defaulttag")) { -+ cs.dfltTag = (char *)es_str2cstr(pvals[i].val.d.estr, NULL); - } else { - dbgprintf("imjournal: program error, non-handled " - "param '%s' in beginCnfLoad\n", modpblk.descr[i].name); -@@ -1144,6 +1155,8 @@ CODEmodInit_QueryRegCFSLineHdlr - facilityHdlr, &cs.iDfltFacility, STD_LOADABLE_MODULE_ID)); - CHKiRet(omsdRegCFSLineHdlr((uchar *)"imjournalusepidfromsystem", 0, eCmdHdlrBinary, - NULL, &cs.bUseJnlPID, STD_LOADABLE_MODULE_ID)); -+ CHKiRet(omsdRegCFSLineHdlr((uchar *)"imjournaldefaulttag", 0, eCmdHdlrGetWord, -+ NULL, &cs.dfltTag, STD_LOADABLE_MODULE_ID)); - ENDmodInit - /* vim:set ai: - */ diff --git a/SOURCES/rsyslog-8.2102.0-rhbz1886400-reduce-default-timeout.patch b/SOURCES/rsyslog-8.2102.0-rhbz1886400-reduce-default-timeout.patch deleted file mode 100644 index a847084..0000000 --- a/SOURCES/rsyslog-8.2102.0-rhbz1886400-reduce-default-timeout.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -up rsyslog-8.2102.0/plugins/omrelp/omrelp.c.orig rsyslog-8.2102.0/plugins/omrelp/omrelp.c ---- rsyslog-8.2102.0/plugins/omrelp/omrelp.c.orig 2021-06-15 12:46:14.758589030 +0200 -+++ rsyslog-8.2102.0/plugins/omrelp/omrelp.c 2021-06-15 12:47:08.130516632 +0200 -@@ -303,7 +303,7 @@ ENDfreeCnf - BEGINcreateInstance - CODESTARTcreateInstance - pData->sizeWindow = 0; -- pData->timeout = 90; -+ pData->timeout = 5; - pData->connTimeout = 10; - pData->rebindInterval = 0; - pData->bEnableTLS = DFLT_ENABLE_TLS; -@@ -365,7 +365,7 @@ setInstParamDefaults(instanceData *pData - pData->target = NULL; - pData->port = NULL; - pData->tplName = NULL; -- pData->timeout = 90; -+ pData->timeout = 5; - pData->connTimeout = 10; - pData->sizeWindow = 0; - pData->rebindInterval = 0; diff --git a/SOURCES/rsyslog-8.2310.0-do-not-preserve-statefile-on-file-move-doc.patch b/SOURCES/rsyslog-8.2310.0-do-not-preserve-statefile-on-file-move-doc.patch deleted file mode 100644 index 16c8e5c..0000000 --- a/SOURCES/rsyslog-8.2310.0-do-not-preserve-statefile-on-file-move-doc.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff -up rsyslog-8.2310.0/doc/configuration/modules/imfile.html.orig rsyslog-8.2310.0/doc/configuration/modules/imfile.html ---- rsyslog-8.2310.0/doc/configuration/modules/imfile.html.orig 2023-11-06 09:34:00.022802039 +0100 -+++ rsyslog-8.2310.0/doc/configuration/modules/imfile.html 2023-11-06 09:37:02.086613055 +0100 -@@ -293,6 +293,30 @@ rsyslog needs write permissions to work - also might require SELinux definitions (or similar for other enhanced security - systems).

- -+ -+
-+

deleteStateOnFileMove

-+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+
typedefaultmandatoryobsolete legacy directive
binaryoffnonone
-+

This parameter controls if state files are deleted if their associated main file is rotated via move. Usually, this is a good idea, because otherwise state files are not deleted when log rotation occurs.

-+ -+

However, there is one situation where not deleting associated state file after log rotation makes sense: this is the case if a monitored file is later moved back to the same location as it was before.

-+
-+ - -
-

Input Parameters

-@@ -1237,6 +1261,7 @@ and Others.

-
  • sortFiles
  • -
  • PollingInterval
  • -
  • statefile.directory
  • -+
  • deleteStateOnFileMove
  • - - -
  • Input Parameters
  • -
    -

    confirmMessages

    -@@ -587,12 +590,12 @@ multiple processes.

    -
    -

    Example: command line arguments

    -

    In the following example, logs will be sent to a program log.sh located --in /path/to. The program will receive the command line arguments -+in /usr/libexec/rsyslog. The program will receive the command line arguments - p1, p2 and --param3="value 3".

    -
    module(load="omprog")
    - 
    - action(type="omprog"
    --       binary="/path/to/log.sh p1 p2 --param3=\"value 3\""
    -+       binary="/usr/libexec/rsyslog/log.sh p1 p2 --param3=\"value 3\""
    -        template="RSYSLOG_TraditionalFileFormat")
    - 
    -
    -@@ -618,7 +621,7 @@ rsyslog will kill and restart it.

    - - action(type="omprog" - name="db_forward" -- binary="/usr/share/logging/db_forward.py" -+ binary="/usr/libexec/rsyslog/db_forward.py" - confirmMessages="on" - confirmTimeout="30000" - queue.type="LinkedList" diff --git a/SOURCES/rsyslog-8.2310.0-remove-state-on-file-delete.patch b/SOURCES/rsyslog-8.2310.0-remove-state-on-file-delete.patch deleted file mode 100644 index 3a26f4b..0000000 --- a/SOURCES/rsyslog-8.2310.0-remove-state-on-file-delete.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up rsyslog-8.2310.0/plugins/imfile/imfile.c.orig rsyslog-8.2310.0/plugins/imfile/imfile.c ---- rsyslog-8.2310.0/plugins/imfile/imfile.c.orig 2023-11-03 12:19:39.179103408 +0100 -+++ rsyslog-8.2310.0/plugins/imfile/imfile.c 2023-11-03 12:19:54.228237199 +0100 -@@ -1162,6 +1162,7 @@ fs_node_destroy(fs_node_t *const node) - DBGPRINTF("node destroy: %p edges:\n", node); - - for(edge = node->edges ; edge != NULL ; ) { -+ detect_updates(edge); - fs_node_destroy(edge->node); - fs_edge_t *const toDel = edge; - edge = edge->next; diff --git a/SPECS/rsyslog.spec b/SPECS/rsyslog.spec index d09e5d4..dc660e9 100644 --- a/SPECS/rsyslog.spec +++ b/SPECS/rsyslog.spec @@ -4,8 +4,8 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog -Version: 8.2310.0 -Release: 4%{?dist} +Version: 8.2412.0 +Release: 1%{?dist} License: (GPLv3+ and ASL 2.0) URL: http://www.rsyslog.com/ Source0: http://www.rsyslog.com/files/download/rsyslog/%{name}-%{version}.tar.gz @@ -18,12 +18,7 @@ Source5: rsyslog.service # separatae sub-package with it statically linked(see rhbz#1713427) Source6: qpid-proton-0.39.0.tar.gz -Patch1: rsyslog-8.1911.0-rhbz1659898-imjournal-default-tag-v2.patch -Patch2: rsyslog-8.2102.0-rhbz1886400-reduce-default-timeout.patch -Patch3: rsyslog-8.2310.0-do-not-preserve-statefile-on-file-move.patch -Patch4: rsyslog-8.2310.0-do-not-preserve-statefile-on-file-move-doc.patch -Patch5: rsyslog-8.2310.0-remove-state-on-file-delete.patch -Patch6: rsyslog-8.2310.0-omprog-binary-path.patch +Patch0: imfile-deleteStateOnFileMove.patch BuildRequires: make BuildRequires: gcc @@ -257,16 +252,11 @@ rm -r LICENSE README.md source build/objects.inv mv build doc # set up rsyslog sources %setup -q -D +%patch -P 0 -p1 + # Unpack qpid-proton for rhel %setup -q -D -T -b 6 -%patch -P 1 -p1 -%patch -P 2 -p1 -%patch -P 3 -p1 -%patch -P 4 -p1 -%patch -P 5 -p1 -%patch -P 6 -p1 - %build # Add additional flags as per https://one.redhat.com/rhel-developer-guide/#_what_are_the_required_flags %ifarch aarch64 @@ -529,6 +519,19 @@ done %changelog +* Fri Dec 06 2024 Attila Lakatos - 8.2412.0-1 +- Rebase to 8.2412.0 + Resolves: RHEL-65177 +- Fix segfault when $ControlCharacterEscapePrefix is set + Resolves: RHEL-38222 + Resolves: RHEL-70099 +- Fix segfault due to processing malform queue message + Resolves: RHEL-70100 +- Fix $ActionQueueDiscardMark default value to 80% queue size + Resolves: RHEL-70109 +- Fix crash on startup when an invalid function is specified + Resolves: RHEL-70111 + * Tue Dec 12 2023 Attila Lakatos - 8.2310.0-4 - new directory for arbitrary external programs needed by omprog module Resolves: RHEL-8676