Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package rsyslog for openSUSE:Factory checked in at 2022-12-15 19:24:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rsyslog (Old) and /work/SRC/openSUSE:Factory/.rsyslog.new.1835 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rsyslog" Thu Dec 15 19:24:06 2022 rev:171 rq:1042880 version:8.2212.0 Changes: -------- --- /work/SRC/openSUSE:Factory/rsyslog/rsyslog.changes 2022-11-16 15:42:41.275684800 +0100 +++ /work/SRC/openSUSE:Factory/.rsyslog.new.1835/rsyslog.changes 2022-12-15 19:24:08.275691968 +0100 @@ -1,0 +2,15 @@ +Tue Dec 6 21:03:48 UTC 2022 - Michael Ströder <mich...@stroeder.com> + +- Upgrade to rsyslog 8.2212.0 + * 2022-12-05: testbench: make python http server based tests more reliable + * 2022-12-05: omprog bugfix: invalid status handling at called program startup + * 2022-11-29: testbench bugfix: wrong message injection object of instance 1 + * 2022-11-21: rsyslog.conf man page bugfix: description of selectors + * 2022-11-18: imtcp bugfix: legacy config directives did no longer work + * 2022-11-16: ksi bugfix: sending of too many signing requests fixed. + * 2022-11-14: bugfix: prevent potential segfault when switchung to queue emergency mode + * 2022-11-02: imjournal: add second fallback to _COMM + * 2022-10-25: core bugfix: local hostname invalid if no global() config object given + * 2022-10-25: testbench bugfix: fixed timing issue that sometimes lead to test failure + +------------------------------------------------------------------- Old: ---- rsyslog-8.2210.0.tar.gz rsyslog-doc-8.2210.0.tar.gz New: ---- rsyslog-8.2212.0.tar.gz rsyslog-doc-8.2212.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rsyslog.spec ++++++ --- /var/tmp/diff_new_pack.Y083uF/_old 2022-12-15 19:24:09.135696861 +0100 +++ /var/tmp/diff_new_pack.Y083uF/_new 2022-12-15 19:24:09.139696883 +0100 @@ -22,7 +22,7 @@ %endif # drop this with next release when doc tarball version lines up -%define rsyslog_major 8.2210 +%define rsyslog_major 8.2212 %define rsyslog_patch 0 Name: rsyslog Summary: The enhanced syslogd for Linux and Unix ++++++ rsyslog-8.2210.0.tar.gz -> rsyslog-8.2212.0.tar.gz ++++++ ++++ 1662 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/.tarball-version new/rsyslog-8.2212.0/.tarball-version --- old/rsyslog-8.2210.0/.tarball-version 2022-10-16 17:49:09.000000000 +0200 +++ new/rsyslog-8.2212.0/.tarball-version 2022-12-05 16:01:25.000000000 +0100 @@ -1 +1 @@ -8.2210.0 +8.2212.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/ChangeLog new/rsyslog-8.2212.0/ChangeLog --- old/rsyslog-8.2210.0/ChangeLog 2022-10-16 17:46:52.000000000 +0200 +++ new/rsyslog-8.2212.0/ChangeLog 2022-12-05 15:59:03.000000000 +0100 @@ -1,4 +1,65 @@ ---------------------------------------------------------------------------------------- +Scheduled Release 8.2212.0 (aka 2022.12) 2022-12-06 +- 2022-12-05: testbench: make python http server based tests more reliable + Harden them against races during server port assignment. Prevents + testbench flakes. +- 2022-12-05: omprog bugfix: invalid status handling at called program startup + There is a bug when external program *startup* does not return "OK". This + can also lead to a misadressing with potentially a segfault (very unlikely). + Note that no problem exists once the initializiation phase of the external + program is finished and regular message transfer runs. + The problem basically is that for a startup failure, the control data for + that external program instance is freed on error. Unfortunately, that state + data is needed later on to detect a suspended instance. We now keep the control + data even on init failure (as we then need to do normal control options). + closes https://github.com/rsyslog/rsyslog/issues/4967 +- 2022-11-29: testbench bugfix: wrong message injection object of instance 1 + In some client-server test cases, messages are supposed to be injected into + the instance 2(client), but they are actually injected into instance 1(server), + which may lead to false negative results. This patch fixed it by replacing + 'injectmsg' with 'injectmsg2', and dealt with some minor issues. + Thanks to Guodong Zhu for the patch. +- 2022-11-21: rsyslog.conf man page bugfix: description of selectors + Document historic difference to BSD syslog selectors. +- 2022-11-18: imtcp bugfix: legacy config directives did no longer work + Many "$InputTCPServer..." config directives did no longer work + and were completely ignored (e.g. "$InputTCPServerStreamDriverMode"). + This was a regression from a08591be5d9 (May, 5th 2021). + closes https://github.com/rsyslog/rsyslog/issues/5021 +- 2022-11-16: ksi bugfix: sending of too many signing requests fixed. + As there is a bug in libksi where too many signing requests may have bene sent + out the amount of signing requests will be limited by KSI module until the fix + is implemented. + Thanks to Taavi Valjaots for the patch. +- 2022-11-14: bugfix: prevent potential segfault when switchung to queue emergency mode + When switching to Disk queue emergency mode, we destructed the in-memory + queue object. Practice has shown that this MAY cause races during + destruction which themselfs can lead to segfault. For that reason, we + now keep the disk queueu object. This will keep some ressources, + including disk space, allocated. But we prefer that over a segfault. + After all, it only happens after a serious queue error when we are + already at the edge of hard problems. + see also: https://github.com/rsyslog/rsyslog/issues/4963 +- 2022-11-08: ksi bugfix: Segmentation fault in async mode fixed + Thanks to Taavi Valjaots for the patch. +- 2022-11-02: imjournal: add second fallback to _COMM + If SYSLOG_IDENTIFIER is not present in the journal message, + then lookup the _COMM field, which stands for the name + of the process the journal entry originates from. This is + needed in order to be in compliance with the journalctl + output. + Thanks to Attila Lakatos for the patch. +- 2022-10-25: core bugfix: local hostname invalid if no global() config object given + The local hostname is invalidly set to "[localhost]" on rsyslog startup + if no global() config object is present in rsyslog.conf. Sending a HUP + corrects the hostname. + This is a regression from ba00a9f25293f + closes https://github.com/rsyslog/rsyslog/issues/4975 + closes https://github.com/rsyslog/rsyslog/issues/4825 +- 2022-10-25: testbench bugfix: fixed timing issue that sometimes lead to test failure + Timing caused a race in test tool sync and could lead to premature termination of + tools, which in turn caused test failure +---------------------------------------------------------------------------------------- Scheduled Release 8.2210.0 (aka 2022.10) 2022-10-18 - 2022-10-13: fix NetBSD build issue On NetBSD, time_t has for a long time now been __int64_t. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/configure.ac new/rsyslog-8.2212.0/configure.ac --- old/rsyslog-8.2210.0/configure.ac 2022-10-16 17:47:00.000000000 +0200 +++ new/rsyslog-8.2212.0/configure.ac 2022-12-05 15:59:20.000000000 +0100 @@ -2,9 +2,9 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) -AC_INIT([rsyslog],[8.2210.0],[rsys...@lists.adiscon.com]) # UPDATE on release +AC_INIT([rsyslog],[8.2212.0],[rsys...@lists.adiscon.com]) # UPDATE on release AC_DEFINE(VERSION_YEAR, 22, [year part of real rsyslog version]) # UPDATE on release -AC_DEFINE(VERSION_MONTH, 10, [month part of real rsyslog version]) # UPDATE on release +AC_DEFINE(VERSION_MONTH, 12, [month part of real rsyslog version]) # UPDATE on release AM_INIT_AUTOMAKE([subdir-objects]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/plugins/imjournal/imjournal.c new/rsyslog-8.2212.0/plugins/imjournal/imjournal.c --- old/rsyslog-8.2210.0/plugins/imjournal/imjournal.c 2022-08-16 11:41:39.000000000 +0200 +++ new/rsyslog-8.2212.0/plugins/imjournal/imjournal.c 2022-12-05 12:54:18.000000000 +0100 @@ -452,6 +452,8 @@ /* Get message identifier, client pid and add ':' */ if (journalGetData("SYSLOG_IDENTIFIER", &get, &length) >= 0) { CHKiRet(sanitizeValue(((const char *)get) + 18, length - 18, &sys_iden)); + } else if (journalGetData("_COMM", &get, &length) >= 0) { + CHKiRet(sanitizeValue(((const char *)get) + 6, length - 6, &sys_iden)); } else { CHKmalloc(sys_iden = strdup("journal")); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/plugins/imkafka/Makefile.am new/rsyslog-8.2212.0/plugins/imkafka/Makefile.am --- old/rsyslog-8.2210.0/plugins/imkafka/Makefile.am 2022-02-07 09:24:35.000000000 +0100 +++ new/rsyslog-8.2212.0/plugins/imkafka/Makefile.am 2022-12-05 12:54:18.000000000 +0100 @@ -6,12 +6,14 @@ imkafka_la_CPPFLAGS = -I$(top_srcdir) $(RSRT_CFLAGS) $(PTHREADS_CFLAGS) -D MODNAME=imkafka else imkafka_la_SOURCES = imkafka.c -imkafka_la_LDFLAGS = -module -avoid-version $(LIBRDKAFKA_LIBS) -imkafka_la_CPPFLAGS = -I$(top_srcdir) $(RSRT_CFLAGS) $(PTHREADS_CFLAGS) -endif if ENABLE_KAFKA_STATIC -imkafka_la_LDFLAGS = -module -avoid-version -Wl,--whole-archive -l:librdkafka.a -Wl,--no-whole-archive -lssl -lpthread -lcrypto -lsasl2 -lz -llz4 -lrt # Static Linking now $(LIBRDKAFKA_LIBS) +imkafka_la_LDFLAGS = -module -avoid-version -Wl,--whole-archive -l:librdkafka-static.a -Wl,--no-whole-archive -ldl -lresolv -lcurl -lssl -lpthread -lcrypto -lsasl2 -lz -llz4 -lrt -lm +else +imkafka_la_LDFLAGS = -module -avoid-version $(LIBRDKAFKA_LIBS) -lm endif +imkafka_la_CPPFLAGS = -I$(top_srcdir) $(RSRT_CFLAGS) $(PTHREADS_CFLAGS) +endif + imkafka_la_LIBADD = +EXTRA_DIST = -EXTRA_DIST = diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/plugins/imtcp/imtcp.c new/rsyslog-8.2212.0/plugins/imtcp/imtcp.c --- old/rsyslog-8.2210.0/plugins/imtcp/imtcp.c 2022-10-16 17:46:21.000000000 +0200 +++ new/rsyslog-8.2212.0/plugins/imtcp/imtcp.c 2022-12-05 12:54:18.000000000 +0100 @@ -449,6 +449,20 @@ CHKmalloc(inst->pszInputName = ustrdup(cs.pszInputName)); } inst->cnf_params->bSuppOctetFram = cs.bSuppOctetFram; + inst->iStrmDrvrMode = cs.iStrmDrvrMode; + inst->bKeepAlive = cs.bKeepAlive ; + inst->bUseFlowControl = cs.bUseFlowControl; + inst->bDisableLFDelim = cs.bDisableLFDelim; + inst->bEmitMsgOnClose = cs.bEmitMsgOnClose; + inst->bPreserveCase = cs.bPreserveCase; + inst->iKeepAliveProbes = cs.iKeepAliveProbes; + inst->iKeepAliveIntvl = cs.iKeepAliveIntvl; + inst->iKeepAliveTime = cs.iKeepAliveTime; + inst->iKeepAliveTime = cs.iKeepAliveTime; + inst->iAddtlFrameDelim = cs.iAddtlFrameDelim; + inst->iTCPLstnMax = cs.iTCPLstnMax; + inst->iTCPSessMax = cs.iTCPSessMax; + inst->iStrmDrvrMode = cs.iStrmDrvrMode; finalize_it: free(pNewVal); @@ -954,7 +968,6 @@ { tcpsrv_etry_t *const etry = (tcpsrv_etry_t*) myself; rsRetVal iRet; - dbgprintf("RGER: running ety %p\n", etry); iRet = tcpsrv.Run(etry->tcpsrv); if(iRet != RS_RET_OK) { LogError(0, iRet, "imtcp: error while terminating server; rsyslog may hang on shutdown"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/plugins/omkafka/Makefile.am new/rsyslog-8.2212.0/plugins/omkafka/Makefile.am --- old/rsyslog-8.2210.0/plugins/omkafka/Makefile.am 2022-02-07 09:24:35.000000000 +0100 +++ new/rsyslog-8.2212.0/plugins/omkafka/Makefile.am 2022-12-05 12:54:18.000000000 +0100 @@ -3,16 +3,16 @@ if OMKAFKA_USE_DUMMY omkafka_la_SOURCES = dummy.c omkafka_la_LDFLAGS = -module -avoid-version -omkafka_la_CPPFLAGS = $(RSRT_CFLAGS) $(PTHREADS_CFLAGS) -D MODNAME=omkafka +omkafka_la_CPPFLAGS = -I$(top_srcdir) $(RSRT_CFLAGS) $(PTHREADS_CFLAGS) -D MODNAME=omkafka else omkafka_la_SOURCES = omkafka.c +if ENABLE_KAFKA_STATIC +omkafka_la_LDFLAGS = -module -avoid-version -Wl,--whole-archive -l:librdkafka-static.a -Wl,--no-whole-archive -ldl -lresolv -lcurl -lssl -lpthread -lcrypto -lsasl2 -lz -llz4 -lrt -lm +else omkafka_la_LDFLAGS = -module -avoid-version $(LIBRDKAFKA_LIBS) -lm -omkafka_la_CPPFLAGS = $(RSRT_CFLAGS) $(PTHREADS_CFLAGS) endif - -if ENABLE_KAFKA_STATIC -omkafka_la_LDFLAGS = -module -avoid-version -Wl,--whole-archive -l:librdkafka.a -Wl,--no-whole-archive -lssl -lpthread -lcrypto -lsasl2 -lz -llz4 -lrt -lm +omkafka_la_CPPFLAGS = -I$(top_srcdir) $(RSRT_CFLAGS) $(PTHREADS_CFLAGS) endif -omkafka_la_LIBADD = +omkafka_la_LIBADD = EXTRA_DIST = diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/plugins/omprog/omprog.c new/rsyslog-8.2212.0/plugins/omprog/omprog.c --- old/rsyslog-8.2210.0/plugins/omprog/omprog.c 2022-07-19 12:43:32.000000000 +0200 +++ new/rsyslog-8.2212.0/plugins/omprog/omprog.c 2022-12-05 12:54:18.000000000 +0100 @@ -380,6 +380,7 @@ static void terminateChild(instanceData *pData, childProcessCtx_t *pChildCtx) { + DBGPRINTF("terminateChild called\n"); assert(pChildCtx->bIsRunning); if (pData->bSignalOnClose) { @@ -928,9 +929,6 @@ } finalize_it: - if(iRet != RS_RET_OK && !pWrkrData->pData->bForceSingleInst) { - free(pWrkrData->pChildCtx); - } ENDcreateWrkrInstance diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/runtime/glbl.c new/rsyslog-8.2212.0/runtime/glbl.c --- old/rsyslog-8.2210.0/runtime/glbl.c 2022-10-16 17:46:21.000000000 +0200 +++ new/rsyslog-8.2212.0/runtime/glbl.c 2022-12-05 12:54:18.000000000 +0100 @@ -1396,6 +1396,7 @@ stddbg = -1; } +finalize_it: /* we have now read the config. We need to query the local host name now * as it was set by the config. * @@ -1404,8 +1405,7 @@ * are taken from that queue, the hostname will be adapted. */ queryLocalHostname(); - -finalize_it: RETiRet; + RETiRet; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/runtime/lib_ksils12.c new/rsyslog-8.2212.0/runtime/lib_ksils12.c --- old/rsyslog-8.2210.0/runtime/lib_ksils12.c 2022-08-16 11:41:39.000000000 +0200 +++ new/rsyslog-8.2212.0/runtime/lib_ksils12.c 2022-12-05 12:54:18.000000000 +0100 @@ -904,6 +904,10 @@ ctx->dirGID = -1; ctx->fCreateMode = 0644; ctx->fDirCreateMode = 0700; +#if KSI_SDK_VER_MAJOR == 3 && KSI_SDK_VER_MINOR < 22 + ctx->roundCount = 0; + ctx->bRoundLock = 0; +#endif ctx->syncMode = LOGSIG_SYNCHRONOUS; ctx->signer_state = SIGNER_IDLE; ctx->disabled = false; @@ -1754,6 +1758,21 @@ return ret; } +static KSI_DataHash* clone_hash(KSI_CTX *ksi_ctx, const KSI_DataHash* hash) { + int res = KSI_UNKNOWN_ERROR; + const unsigned char *imprint = NULL; + size_t imprint_len = 0; + KSI_DataHash* tmp = NULL; + + if (hash == NULL) return NULL; + res = KSI_DataHash_getImprint(hash, &imprint, &imprint_len); + if (res != KSI_OK) return NULL; + res = KSI_DataHash_fromImprint(ksi_ctx, imprint, imprint_len, &tmp); + if (res != KSI_OK) return NULL; + + return tmp; +} + static bool process_requests_async(rsksictx ctx, KSI_CTX *ksi_ctx, KSI_AsyncService *as) { bool ret = false; @@ -1761,6 +1780,7 @@ int res = KSI_OK, tmpRes; KSI_AsyncHandle *reqHandle = NULL; KSI_AsyncHandle *respHandle = NULL; + KSI_DataHash *clonedHash = NULL; KSI_AggregationReq *req = NULL; KSI_Config *config = NULL; KSI_Integer *level; @@ -1784,6 +1804,14 @@ break; } +#if KSI_SDK_VER_MAJOR == 3 && KSI_SDK_VER_MINOR < 22 + if (p != 0 && ctx->roundCount > 0) { + ctx->roundCount--; + } else { + ctx->bRoundLock = 0; + ctx->roundCount = 0; + } +#endif state = KSI_ASYNC_STATE_UNDEFINED; CHECK_KSI_API(KSI_AsyncHandle_getState(respHandle, &state), ctx, "KSI_AsyncHandle_getState"); @@ -1837,10 +1865,28 @@ if(item->status != QITEM_WAITING) continue; + /* Due to a bug in libksi it is possible that async signer may send out + * more signing requests than permitted by the gateway. Workaround is to + * keep track of signing requests here. + */ +#if KSI_SDK_VER_MAJOR == 3 && KSI_SDK_VER_MINOR < 22 + if (ctx->roundCount >= ctx->max_requests) ctx->bRoundLock = 1; + if (ctx->bRoundLock) break; +#endif + + + /* The data hash is produced in another thread by another KSI_CTX and + * libksi internal uses KSI_DataHash cache to reduce the amount of + * memory allocations by recycling old objects. Lets clone the hash + * value with current KSI_CTX as we can not be sure that this thread is + * not affecting the data hash cache operated by another thread. + */ + clonedHash = clone_hash(ksi_ctx, item->root); CHECK_KSI_API(KSI_AggregationReq_new(ksi_ctx, &req), ctx, "KSI_AggregationReq_new"); CHECK_KSI_API(KSI_AggregationReq_setRequestHash((KSI_AggregationReq*)req, - KSI_DataHash_ref(item->root)), ctx, + clonedHash), ctx, "KSI_AggregationReq_setRequestHash"); + clonedHash = NULL; CHECK_KSI_API(KSI_Integer_new(ksi_ctx, item->intarg2, &level), ctx, "KSI_Integer_new"); CHECK_KSI_API(KSI_AggregationReq_setRequestLevel(req, level), ctx, @@ -1853,11 +1899,9 @@ if (res == KSI_OK) { item->status = QITEM_SENT; - - tmpRes=KSI_AsyncService_run(as, NULL, NULL); - if(tmpRes!=KSI_OK) - reportKSIAPIErr(ctx, NULL, "KSI_AsyncService_run", tmpRes); - +#if KSI_SDK_VER_MAJOR == 3 && KSI_SDK_VER_MINOR < 22 + ctx->roundCount++; +#endif } else { reportKSIAPIErr(ctx, NULL, "KSI_AsyncService_addRequest", res); KSI_AsyncHandle_free(reqHandle); @@ -1865,8 +1909,14 @@ item->ksi_status = res; break; } - } + if (i != 0 && i % ctx->max_requests == 0) { + CHECK_KSI_API(KSI_AsyncService_run(as, NULL, NULL), ctx, + "KSI_AsyncService_run"); + } + } + CHECK_KSI_API(KSI_AsyncService_run(as, NULL, NULL), ctx, + "KSI_AsyncService_run"); /* Save all consequent fulfilled responses in the front of the queue to the signature file */ while(ProtectedQueue_count(ctx->signer_queue)) { @@ -1902,6 +1952,7 @@ ret = true; cleanup: + KSI_DataHash_free(clonedHash); KSI_AsyncService_getPendingCount(as, &p); return ret; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/runtime/lib_ksils12.h new/rsyslog-8.2212.0/runtime/lib_ksils12.h --- old/rsyslog-8.2210.0/runtime/lib_ksils12.h 2022-08-16 11:41:39.000000000 +0200 +++ new/rsyslog-8.2212.0/runtime/lib_ksils12.h 2022-12-05 12:54:18.000000000 +0100 @@ -113,6 +113,10 @@ pthread_mutex_t module_lock; pthread_t signer_thread; ProtectedQueue *signer_queue; +#if KSI_SDK_VER_MAJOR == 3 && KSI_SDK_VER_MINOR < 22 + size_t roundCount; /* Count of signing requests in round. */ + uint8_t bRoundLock; /* A lock for async. signer. */ +#endif int signer_state; uint8_t disabled; /* permits to disable the plugin --> set to 1 */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/runtime/nsd_gtls.c new/rsyslog-8.2212.0/runtime/nsd_gtls.c --- old/rsyslog-8.2210.0/runtime/nsd_gtls.c 2022-08-16 11:41:39.000000000 +0200 +++ new/rsyslog-8.2212.0/runtime/nsd_gtls.c 2022-12-05 12:54:18.000000000 +0100 @@ -1416,12 +1416,13 @@ * rgerhards, 2008-04-28 */ static rsRetVal -SetMode(nsd_t *pNsd, int mode) +SetMode(nsd_t *const pNsd, const int mode) { DEFiRet; nsd_gtls_t *pThis = (nsd_gtls_t*) pNsd; ISOBJ_TYPE_assert((pThis), nsd_gtls); + dbgprintf("(tls) mode: %d\n", mode); if(mode != 0 && mode != 1) { LogError(0, RS_RET_INVALID_DRVR_MODE, "error: driver mode %d not supported by " "gtls netstream driver", mode); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/runtime/queue.c new/rsyslog-8.2212.0/runtime/queue.c --- old/rsyslog-8.2210.0/runtime/queue.c 2022-07-19 12:43:32.000000000 +0200 +++ new/rsyslog-8.2212.0/runtime/queue.c 2022-12-05 12:54:18.000000000 +0100 @@ -770,8 +770,12 @@ /* The following function is used to "save" ourself from being killed by * a fatally failed disk queue. A fatal failure is, for example, if no * data can be read or written. In that case, the disk support is disabled, - * with all on-disk structures kept as-is as much as possible. Instead, the - * queue is switched to direct mode, so that at least + * with all on-disk structures kept as-is as much as possible. However, + * we do not really stop or destruct the in-memory disk queue object. + * Practice has shown that this may cause races during destruction which + * themselfs can lead to segfault. So we prefer to was some ressources by + * keeping the queue active. + * Instead, the queue is switched to direct mode, so that at least * some processing can happen. Of course, this may still have lots of * undesired side-effects, but is probably better than aborting the * syslogd. Note that this function *must* succeed in one way or another, as @@ -784,7 +788,6 @@ { pThis->iQueueSize = 0; pThis->nLogDeq = 0; - qDestructDisk(pThis); /* free disk structures */ pThis->qType = QUEUETYPE_DIRECT; pThis->qConstruct = qConstructDirect; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/diag.sh new/rsyslog-8.2212.0/tests/diag.sh --- old/rsyslog-8.2210.0/tests/diag.sh 2022-10-16 17:46:21.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/diag.sh 2022-12-05 15:58:38.000000000 +0100 @@ -486,7 +486,7 @@ echo "$(tb_timestamp) rsyslogd$1 startup msg seen, pid " $(cat $RSYSLOG_PIDBASE$1.pid) wait_file_exists $RSYSLOG_DYNNAME.imdiag$1.port eval export IMDIAG_PORT$1=$(cat $RSYSLOG_DYNNAME.imdiag$1.port) - eval PORT=$IMDIAG_PORT$1 + eval PORT='$IMDIAG_PORT'$1 echo "imdiag$1 port: $PORT" if [ "$PORT" == "" ]; then echo "TESTBENCH ERROR: imdiag port not found!" @@ -649,8 +649,8 @@ # inject messages in INSTANCE 2 via our inject interface (imdiag) injectmsg2() { msgs=${2:-$NUMMESSAGES} - echo injecting $2 messages into instance 2 - echo injectmsg "$1:-0" "$msgs" $3 $4 | $TESTTOOL_DIR/diagtalker -p$IMDIAG_PORT2 || error_exit $? + echo injecting $msgs messages into instance 2 + echo injectmsg "${1:-0}" "$msgs" $3 $4 | $TESTTOOL_DIR/diagtalker -p$IMDIAG_PORT2 || error_exit $? # TODO: some return state checking? (does it really make sense here?) } @@ -2311,7 +2311,7 @@ omhttp_server_logfile="${omhttp_work_dir}/omhttp_server.log" mkdir -p ${omhttp_work_dir} - server_args="-p $omhttp_server_port ${*:2}" + server_args="-p $omhttp_server_port ${*:2} --port-file $RSYSLOG_DYNNAME.omhttp_server_lstnport.file" timeout 30m $PYTHON ${omhttp_server_py} ${server_args} >> ${omhttp_server_logfile} 2>&1 & if [ ! $? -eq 0 ]; then @@ -2319,10 +2319,12 @@ rm -rf $omhttp_work_dir error_exit 1 fi - omhttp_server_pid=$! + + wait_file_exists "$RSYSLOG_DYNNAME.omhttp_server_lstnport.file" + omhttp_server_lstnport="$(cat $RSYSLOG_DYNNAME.omhttp_server_lstnport.file)" echo ${omhttp_server_pid} > ${omhttp_server_pidfile} - echo "Started omhttp test server with args ${server_args} with pid ${omhttp_server_pid}" + echo "Started omhttp test server with args ${server_args} with pid ${omhttp_server_pid}, port {$omhttp_server_lstnport}" } omhttp_stop_server() { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/imfile-logrotate-async.sh new/rsyslog-8.2212.0/tests/imfile-logrotate-async.sh --- old/rsyslog-8.2210.0/tests/imfile-logrotate-async.sh 2022-08-16 11:41:39.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/imfile-logrotate-async.sh 2022-12-05 12:54:18.000000000 +0100 @@ -6,6 +6,10 @@ export NUMMESSAGES=10000 export RETRIES=50 +# Uncomment fdor debuglogs +#export RSYSLOG_DEBUG="debug nostdout noprintmutexaction" +#export RSYSLOG_DEBUGLOG="$RSYSLOG_DYNNAME.debuglog" + # Write logrotate config file echo '"./'$RSYSLOG_DYNNAME'.input*.log" { @@ -41,27 +45,30 @@ ' startup -./inputfilegen -m $NUMMESSAGES -S 5 -B 500 -f $RSYSLOG_DYNNAME.input.log & +./inputfilegen -m $NUMMESSAGES -S 5 -B 100 -I 1000 -f $RSYSLOG_DYNNAME.input.log & INPUTFILEGEN_PID=$! echo "$INPUTFILEGEN_PID" > $RSYSLOG_DYNNAME.inputfilegen_pid - - ./msleep 1 logrotate --state $RSYSLOG_DYNNAME.logrotate.state -f $RSYSLOG_DYNNAME.logrotate ./msleep 20 -echo INPUT FILES: +echo ======================: +echo ROTATE 1 INPUT FILES: ls -li $RSYSLOG_DYNNAME.input* logrotate --state $RSYSLOG_DYNNAME.logrotate.state -f $RSYSLOG_DYNNAME.logrotate ./msleep 20 -echo INPUT FILES: +echo ======================: +echo ROTATE 2 INPUT FILES: ls -li $RSYSLOG_DYNNAME.input* logrotate --state $RSYSLOG_DYNNAME.logrotate.state -f $RSYSLOG_DYNNAME.logrotate -echo INPUT FILES: +echo ======================: +echo ROTATE 3 INPUT FILES: ls -li $RSYSLOG_DYNNAME.input* +echo ======================: echo ls ${RSYSLOG_DYNNAME}.spool: ls -li ${RSYSLOG_DYNNAME}.spool -echo INPUT FILES: +echo ======================: +echo FINAL INPUT FILES: ls -li $RSYSLOG_DYNNAME.input* # generate more input after logrotate into new logfile @@ -70,6 +77,25 @@ #msgcount=$((2* TESTMESSAGES)) #wait_file_lines $RSYSLOG_OUT_LOG $msgcount $RETRIES +# Output extra information +./msleep 1000 +echo ======================: +echo LINES: $(wc -l $RSYSLOG_DYNNAME.input.log) +echo TAIL $RSYSLOG_DYNNAME.input.log: +tail $RSYSLOG_DYNNAME.input.log +echo "" +echo LINES: $(wc -l $RSYSLOG_DYNNAME.input.log.1) +echo TAIL $RSYSLOG_DYNNAME.input.log.1: +tail $RSYSLOG_DYNNAME.input.log.1 +echo "" +echo LINES: $(wc -l $RSYSLOG_DYNNAME.input.log.2) +echo TAIL $RSYSLOG_DYNNAME.input.log.2: +tail $RSYSLOG_DYNNAME.input.log.2 +echo "" +echo LINES: $(wc -l $RSYSLOG_DYNNAME.inpt.log.3) +echo TAIL $RSYSLOG_DYNNAME.input.log.3: +tail $RSYSLOG_DYNNAME.input.log.3 +echo "" wait_file_lines touch $RSYSLOG_DYNNAME.input.log diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/imtcp-tls-gtls-x509name-legacy.sh new/rsyslog-8.2212.0/tests/imtcp-tls-gtls-x509name-legacy.sh --- old/rsyslog-8.2210.0/tests/imtcp-tls-gtls-x509name-legacy.sh 2022-07-19 12:43:32.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/imtcp-tls-gtls-x509name-legacy.sh 2022-12-05 12:54:18.000000000 +0100 @@ -12,12 +12,14 @@ # NOTE: we intentionally use legacy statements here! This *IS* what we want to test! $ModLoad ../plugins/imtcp/.libs/imtcp +$DefaultNetstreamDriver gtls $inputTcpserverStreamdriverPermittedPeer rsyslog-client -input(type="imtcp" port="0" listenPortFileName="'$RSYSLOG_DYNNAME'.tcpflood_port" - StreamDriver.Name="gtls" - StreamDriver.Mode="1" - StreamDriver.AuthMode="x509/name") +$InputTCPServerStreamDriverAuthMode x509/name +$InputTCPServerStreamDriverPermittedPeer Log_Streaming_Client +$InputTCPServerStreamDriverMode 1 +$InputTCPServerListenPortFile '$RSYSLOG_DYNNAME'.tcpflood_port +$InputTCPServerRun 0 template(name="outfmt" type="string" string="%msg:F,58:2%\n") :msg, contains, "msgnum:" action( type="omfile" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/inputfilegen.c new/rsyslog-8.2212.0/tests/inputfilegen.c --- old/rsyslog-8.2210.0/tests/inputfilegen.c 2022-08-16 11:41:39.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/inputfilegen.c 2022-12-05 12:54:18.000000000 +0100 @@ -52,7 +52,7 @@ static void hdlr_sighup(int sig) { - fprintf(stderr, "had hup, sig %d\n", sig); + fprintf(stderr, "inputfilegen: had hup, sig %d\n", sig); bHadHUP = 1; } static void @@ -95,6 +95,7 @@ int c, i; long long nmsgs = DEFMSGS; long long nmsgstart = 0; + int nfinishedidle = 0; int nchars = NOEXTRADATA; int errflg = 0; long long filesize = -1; @@ -102,11 +103,12 @@ const char *msgcntfile = NULL; const char *outputfile = "-"; FILE *fh_output; - int sleep_ms = 0; - int sleep_msgs = 0; /* messages to xmit between sleeps (if configured) */ + int sleep_ms = 0; /* How long to sleep between message writes */ + int sleep_msgs = 0; /* messages to xmit between sleeps (if configured) */ + int sleep_hubreopen_ms = 5; /* Wait until new file is being reopened, logrotate may need some time */ int ctr = 0; - while((c=getopt(argc, argv, "m:M:i:d:s:f:S:B:")) != -1) { + while((c=getopt(argc, argv, "m:M:i:I:h:d:s:f:S:B:")) != -1) { switch(c) { case 'm': nmsgs = atoi(optarg); @@ -117,6 +119,9 @@ case 'i': nmsgstart = atoi(optarg); break; + case 'I': + nfinishedidle = atoi(optarg); + break; case 'd': nchars = atoi(optarg); break; @@ -129,6 +134,9 @@ case 'B': sleep_msgs = atoi(optarg); break; + case 'h': + sleep_hubreopen_ms = atoi(optarg); + break; case 'f': outputfile = optarg; sighup_enable(); @@ -138,7 +146,7 @@ errflg++; break; case '?': - fprintf(stderr, "Unrecognized option: -%c\n", optopt); + fprintf(stderr, "inputfilegen: Unrecognized option: -%c\n", optopt); errflg++; break; } @@ -151,11 +159,11 @@ if(filesize != -1) { const int linesize = (17 + nchars); /* 17 is std line size! */ nmsgs = filesize / linesize; - fprintf(stderr, "file size requested %lld, actual %lld with " + fprintf(stderr, "inputfilegen: file size requested %lld, actual %lld with " "%lld lines, %lld bytes less\n", filesize, nmsgs * linesize, nmsgs, filesize - nmsgs * linesize); if(nmsgs > 100000000) { - fprintf(stderr, "number of lines exhaust 8-digit line numbers " + fprintf(stderr, "inputfilegen: number of lines exhaust 8-digit line numbers " "which are standard inside the testbench.\n" "Use -d switch to add extra data (e.g. -d111 for " "128 byte lines or -d47 for 64 byte lines)\n"); @@ -185,14 +193,20 @@ extradata[nchars] = '\0'; } for(i = nmsgstart; i < (nmsgs+nmsgstart); ++i) { - if(sleep_ms > 0 && ctr++ >= sleep_msgs) { + if( sleep_ms > 0 && + ctr++ >= sleep_msgs) { msleep(sleep_ms); ctr = 0; } if(bHadHUP) { fclose(fh_output); + if(sleep_hubreopen_ms > 0) { + /* Extra Sleep so logrotate or whatever can take place */ + msleep(sleep_hubreopen_ms); + } fh_output = open_output(outputfile); - fprintf(stderr, "%s reopened\n", outputfile); + fprintf(stderr, "inputfilegen: %s reopened\n", outputfile); + fprintf(stderr, "inputfilegen: current message number %d\n", i); bHadHUP = 0; } fprintf(fh_output, "msgnum:%8.8d:", i); @@ -201,6 +215,20 @@ } fprintf(fh_output, "\n"); } + if (nfinishedidle > 0) { + /* Keep process open for nfinishedidle ms */ + for(int x = 0; x < nfinishedidle; ++x) { + if(bHadHUP) { + /* Create empty file */ + fh_output = open_output(outputfile); + fclose(fh_output); + fprintf(stderr, "inputfilegen: last message number was %d\n", i); + bHadHUP = 0; + } + msleep(1); + } + } + free(extradata); return 0; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/omhttp-auth.sh new/rsyslog-8.2212.0/tests/omhttp-auth.sh --- old/rsyslog-8.2210.0/tests/omhttp-auth.sh 2022-07-11 13:06:09.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/omhttp-auth.sh 2022-12-05 15:58:38.000000000 +0100 @@ -6,8 +6,7 @@ export NUMMESSAGES=100 -port="$(get_free_port)" -omhttp_start_server $port --userpwd="bob:bobbackwards" +omhttp_start_server 0 --userpwd="bob:bobbackwards" generate_conf add_conf ' @@ -25,7 +24,7 @@ template="tpl" server="localhost" - serverport="'$port'" + serverport="'$omhttp_server_lstnport'" restpath="my/endpoint" batch="off" @@ -39,7 +38,7 @@ injectmsg shutdown_when_empty wait_shutdown -omhttp_get_data $port my/endpoint +omhttp_get_data $omhttp_server_lstnport my/endpoint omhttp_stop_server seq_check exit_test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/omhttp-basic.sh new/rsyslog-8.2212.0/tests/omhttp-basic.sh --- old/rsyslog-8.2210.0/tests/omhttp-basic.sh 2022-07-11 13:06:09.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/omhttp-basic.sh 2022-12-05 15:58:38.000000000 +0100 @@ -6,8 +6,7 @@ export NUMMESSAGES=10000 -port="$(get_free_port)" -omhttp_start_server $port +omhttp_start_server 0 generate_conf add_conf ' @@ -25,7 +24,7 @@ template="tpl" server="localhost" - serverport="'$port'" + serverport="'$omhttp_server_lstnport'" restpath="my/endpoint" batch="off" @@ -37,7 +36,7 @@ injectmsg shutdown_when_empty wait_shutdown -omhttp_get_data $port my/endpoint +omhttp_get_data $omhttp_server_lstnport my/endpoint omhttp_stop_server seq_check exit_test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/omhttp-batch-dynrestpath.sh new/rsyslog-8.2212.0/tests/omhttp-batch-dynrestpath.sh --- old/rsyslog-8.2210.0/tests/omhttp-batch-dynrestpath.sh 2022-07-11 13:06:09.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/omhttp-batch-dynrestpath.sh 2022-12-05 15:58:38.000000000 +0100 @@ -8,8 +8,7 @@ export RSYSLOG_DEBUG="debug nologfuncflow noprintmutexaction nostdout" export RSYSLOG_DEBUGLOG="$RSYSLOG_DYNNAME.receiver.debuglog" -port="$(get_free_port)" -omhttp_start_server $port +omhttp_start_server 0 generate_conf add_conf ' @@ -28,7 +27,7 @@ template="tpl" server="localhost" - serverport="'$port'" + serverport="'$omhttp_server_lstnport'" dynrestpath = "on" restpath="dynrestpath" @@ -44,7 +43,7 @@ injectmsg shutdown_when_empty wait_shutdown -omhttp_get_data $port my/endpoint jsonarray +omhttp_get_data $omhttp_server_lstnport my/endpoint jsonarray omhttp_stop_server seq_check exit_test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/omhttp-batch-fail-with-400.sh new/rsyslog-8.2212.0/tests/omhttp-batch-fail-with-400.sh --- old/rsyslog-8.2210.0/tests/omhttp-batch-fail-with-400.sh 2022-07-11 13:06:09.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/omhttp-batch-fail-with-400.sh 2022-12-05 15:58:38.000000000 +0100 @@ -4,8 +4,7 @@ # Starting actual testbench . ${srcdir:=.}/diag.sh init -port="$(get_free_port)" -omhttp_start_server $port --fail-with-400-after 1000 +omhttp_start_server 0 --fail-with-400-after 1000 generate_conf add_conf ' @@ -28,7 +27,7 @@ template="tpl" server="localhost" - serverport="'$port'" + serverport="'$omhttp_server_lstnport'" restpath="my/endpoint" batch="off" @@ -46,7 +45,7 @@ injectmsg 0 10000 shutdown_when_empty wait_shutdown -omhttp_get_data $port my/endpoint +omhttp_get_data $omhttp_server_lstnport my/endpoint omhttp_stop_server seq_check 0 999 exit_test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/omhttp-batch-jsonarray-compress.sh new/rsyslog-8.2212.0/tests/omhttp-batch-jsonarray-compress.sh --- old/rsyslog-8.2210.0/tests/omhttp-batch-jsonarray-compress.sh 2022-07-11 13:06:09.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/omhttp-batch-jsonarray-compress.sh 2022-12-05 15:58:38.000000000 +0100 @@ -6,8 +6,7 @@ export NUMMESSAGES=50000 -port="$(get_free_port)" -omhttp_start_server $port --decompress +omhttp_start_server 0 --decompress generate_conf add_conf ' @@ -27,7 +26,7 @@ template="tpl" server="localhost" - serverport="'$port'" + serverport="'$omhttp_server_lstnport'" restpath="my/endpoint" batch="on" batch.format="jsonarray" @@ -42,7 +41,7 @@ injectmsg shutdown_when_empty wait_shutdown -omhttp_get_data $port my/endpoint jsonarray +omhttp_get_data $omhttp_server_lstnport my/endpoint jsonarray omhttp_stop_server seq_check exit_test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/omhttp-batch-jsonarray-retry.sh new/rsyslog-8.2212.0/tests/omhttp-batch-jsonarray-retry.sh --- old/rsyslog-8.2210.0/tests/omhttp-batch-jsonarray-retry.sh 2022-07-11 13:06:09.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/omhttp-batch-jsonarray-retry.sh 2022-12-05 15:58:38.000000000 +0100 @@ -6,8 +6,7 @@ export NUMMESSAGES=50000 -port="$(get_free_port)" -omhttp_start_server $port --fail-every 100 +omhttp_start_server 0 --fail-every 100 generate_conf add_conf ' @@ -29,7 +28,7 @@ template="tpl_echo" server="localhost" - serverport="'$port'" + serverport="'$omhttp_server_lstnport'" restpath="my/endpoint" batch="on" batch.maxsize="100" @@ -51,7 +50,7 @@ template="tpl" server="localhost" - serverport="'$port'" + serverport="'$omhttp_server_lstnport'" restpath="my/endpoint" batch="on" batch.maxsize="100" @@ -72,7 +71,7 @@ injectmsg shutdown_when_empty wait_shutdown -omhttp_get_data $port my/endpoint jsonarray +omhttp_get_data $omhttp_server_lstnport my/endpoint jsonarray omhttp_stop_server seq_check exit_test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/omhttp-batch-jsonarray.sh new/rsyslog-8.2212.0/tests/omhttp-batch-jsonarray.sh --- old/rsyslog-8.2210.0/tests/omhttp-batch-jsonarray.sh 2022-07-11 13:06:09.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/omhttp-batch-jsonarray.sh 2022-12-05 15:58:38.000000000 +0100 @@ -5,8 +5,7 @@ . ${srcdir:=.}/diag.sh init export NUMMESSAGES=50000 -port="$(get_free_port)" -omhttp_start_server $port +omhttp_start_server 0 generate_conf add_conf ' @@ -26,7 +25,7 @@ template="tpl" server="localhost" - serverport="'$port'" + serverport="'$omhttp_server_lstnport'" restpath="my/endpoint" batch="on" batch.format="jsonarray" @@ -40,7 +39,7 @@ injectmsg shutdown_when_empty wait_shutdown -omhttp_get_data $port my/endpoint jsonarray +omhttp_get_data $omhttp_server_lstnport my/endpoint jsonarray omhttp_stop_server seq_check exit_test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/omhttp-batch-kafkarest-retry.sh new/rsyslog-8.2212.0/tests/omhttp-batch-kafkarest-retry.sh --- old/rsyslog-8.2210.0/tests/omhttp-batch-kafkarest-retry.sh 2022-07-11 13:06:09.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/omhttp-batch-kafkarest-retry.sh 2022-12-05 15:58:38.000000000 +0100 @@ -6,8 +6,7 @@ export NUMMESSAGES=50000 -port="$(get_free_port)" -omhttp_start_server $port --fail-every 100 +omhttp_start_server 0 --fail-every 100 generate_conf add_conf ' @@ -29,7 +28,7 @@ template="tpl_echo" server="localhost" - serverport="'$port'" + serverport="'$omhttp_server_lstnport'" restpath="my/endpoint" batch="on" batch.maxsize="100" @@ -51,7 +50,7 @@ template="tpl" server="localhost" - serverport="'$port'" + serverport="'$omhttp_server_lstnport'" restpath="my/endpoint" batch="on" batch.maxsize="100" @@ -72,7 +71,7 @@ injectmsg shutdown_when_empty wait_shutdown -omhttp_get_data $port my/endpoint kafkarest +omhttp_get_data $omhttp_server_lstnport my/endpoint kafkarest omhttp_stop_server seq_check exit_test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/omhttp-batch-kafkarest.sh new/rsyslog-8.2212.0/tests/omhttp-batch-kafkarest.sh --- old/rsyslog-8.2210.0/tests/omhttp-batch-kafkarest.sh 2022-07-11 13:06:09.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/omhttp-batch-kafkarest.sh 2022-12-05 15:58:38.000000000 +0100 @@ -6,8 +6,7 @@ export NUMMESSAGES=50000 -port="$(get_free_port)" -omhttp_start_server $port +omhttp_start_server 0 generate_conf add_conf ' @@ -27,7 +26,7 @@ template="tpl" server="localhost" - serverport="'$port'" + serverport="'$omhttp_server_lstnport'" restpath="my/endpoint" batch="on" batch.format="kafkarest" @@ -41,7 +40,7 @@ injectmsg shutdown_when_empty wait_shutdown -omhttp_get_data $port my/endpoint kafkarest +omhttp_get_data $omhttp_server_lstnport my/endpoint kafkarest omhttp_stop_server seq_check exit_test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/omhttp-batch-lokirest-retry.sh new/rsyslog-8.2212.0/tests/omhttp-batch-lokirest-retry.sh --- old/rsyslog-8.2210.0/tests/omhttp-batch-lokirest-retry.sh 2022-07-11 13:06:09.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/omhttp-batch-lokirest-retry.sh 2022-12-05 15:58:38.000000000 +0100 @@ -6,8 +6,7 @@ export NUMMESSAGES=50000 -port="$(get_free_port)" -omhttp_start_server $port --fail-every 100 +omhttp_start_server 0 --fail-every 100 generate_conf add_conf ' @@ -29,7 +28,7 @@ template="tpl_echo" server="localhost" - serverport="'$port'" + serverport="'$omhttp_server_lstnport'" restpath="my/endpoint" batch="on" batch.maxsize="100" @@ -51,7 +50,7 @@ template="tpl" server="localhost" - serverport="'$port'" + serverport="'$omhttp_server_lstnport'" restpath="my/endpoint" batch="on" batch.maxsize="100" @@ -72,7 +71,7 @@ injectmsg shutdown_when_empty wait_shutdown -omhttp_get_data $port my/endpoint lokirest +omhttp_get_data $omhttp_server_lstnport my/endpoint lokirest omhttp_stop_server seq_check exit_test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/omhttp-batch-lokirest.sh new/rsyslog-8.2212.0/tests/omhttp-batch-lokirest.sh --- old/rsyslog-8.2210.0/tests/omhttp-batch-lokirest.sh 2022-07-11 13:06:09.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/omhttp-batch-lokirest.sh 2022-12-05 15:58:38.000000000 +0100 @@ -6,8 +6,7 @@ export NUMMESSAGES=50000 -port="$(get_free_port)" -omhttp_start_server $port +omhttp_start_server 0 generate_conf add_conf ' @@ -27,7 +26,7 @@ template="tpl" server="localhost" - serverport="'$port'" + serverport="'$omhttp_server_lstnport'" restpath="my/endpoint" batch="on" batch.format="lokirest" @@ -41,7 +40,7 @@ injectmsg shutdown_when_empty wait_shutdown -omhttp_get_data $port my/endpoint lokirest +omhttp_get_data $omhttp_server_lstnport my/endpoint lokirest omhttp_stop_server seq_check exit_test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/omhttp-batch-newline.sh new/rsyslog-8.2212.0/tests/omhttp-batch-newline.sh --- old/rsyslog-8.2210.0/tests/omhttp-batch-newline.sh 2022-07-11 13:06:09.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/omhttp-batch-newline.sh 2022-12-05 15:58:38.000000000 +0100 @@ -6,8 +6,7 @@ export NUMMESSAGES=50000 -port="$(get_free_port)" -omhttp_start_server $port +omhttp_start_server 0 generate_conf add_conf ' @@ -27,7 +26,7 @@ template="tpl" server="localhost" - serverport="'$port'" + serverport="'$omhttp_server_lstnport'" restpath="my/endpoint" batch="on" batch.format="newline" @@ -41,7 +40,7 @@ injectmsg shutdown_when_empty wait_shutdown -omhttp_get_data $port my/endpoint newline +omhttp_get_data $omhttp_server_lstnport my/endpoint newline omhttp_stop_server seq_check exit_test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/omhttp-dynrestpath.sh new/rsyslog-8.2212.0/tests/omhttp-dynrestpath.sh --- old/rsyslog-8.2210.0/tests/omhttp-dynrestpath.sh 2022-07-11 13:06:09.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/omhttp-dynrestpath.sh 2022-12-05 15:58:38.000000000 +0100 @@ -8,8 +8,7 @@ export RSYSLOG_DEBUG="debug nologfuncflow noprintmutexaction nostdout" export RSYSLOG_DEBUGLOG="$RSYSLOG_DYNNAME.receiver.debuglog" -port="$(get_free_port)" -omhttp_start_server $port +omhttp_start_server 0 generate_conf add_conf ' @@ -28,7 +27,7 @@ template="tpl" server="localhost" - serverport="'$port'" + serverport="'$omhttp_server_lstnport'" dynrestpath = "on" restpath="dynrestpath" batch="off" @@ -41,7 +40,7 @@ injectmsg shutdown_when_empty wait_shutdown -omhttp_get_data $port my/endpoint +omhttp_get_data $omhttp_server_lstnport my/endpoint omhttp_stop_server seq_check exit_test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/omhttp-httpheaderkey.sh new/rsyslog-8.2212.0/tests/omhttp-httpheaderkey.sh --- old/rsyslog-8.2210.0/tests/omhttp-httpheaderkey.sh 2022-07-11 13:06:09.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/omhttp-httpheaderkey.sh 2022-12-05 15:58:38.000000000 +0100 @@ -6,8 +6,7 @@ export NUMMESSAGES=1000 -port="$(get_free_port)" -omhttp_start_server $port +omhttp_start_server 0 generate_conf add_conf ' @@ -26,7 +25,7 @@ httpheaderkey="X-Insert-Key" httpheadervalue="dummy-value" server="localhost" - serverport="'$port'" + serverport="'$omhttp_server_lstnport'" restpath="my/endpoint" batch="off" @@ -38,7 +37,7 @@ injectmsg shutdown_when_empty wait_shutdown -omhttp_get_data $port my/endpoint +omhttp_get_data $omhttp_server_lstnport my/endpoint omhttp_stop_server seq_check exit_test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/omhttp-multiplehttpheaders.sh new/rsyslog-8.2212.0/tests/omhttp-multiplehttpheaders.sh --- old/rsyslog-8.2210.0/tests/omhttp-multiplehttpheaders.sh 2022-07-11 13:06:09.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/omhttp-multiplehttpheaders.sh 2022-12-05 15:58:38.000000000 +0100 @@ -6,8 +6,7 @@ export NUMMESSAGES=1000 -port="$(get_free_port)" -omhttp_start_server $port +omhttp_start_server 0 generate_conf add_conf ' @@ -28,7 +27,7 @@ "X-Event-Source: logs" ] server="localhost" - serverport="'$port'" + serverport="'$omhttp_server_lstnport'" restpath="my/endpoint" batch="off" @@ -40,7 +39,7 @@ injectmsg shutdown_when_empty wait_shutdown -omhttp_get_data $port my/endpoint +omhttp_get_data $omhttp_server_lstnport my/endpoint omhttp_stop_server seq_check exit_test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/omhttp-retry.sh new/rsyslog-8.2212.0/tests/omhttp-retry.sh --- old/rsyslog-8.2210.0/tests/omhttp-retry.sh 2022-07-11 13:06:09.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/omhttp-retry.sh 2022-12-05 15:58:38.000000000 +0100 @@ -6,8 +6,7 @@ export NUMMESSAGES=10000 -port="$(get_free_port)" -omhttp_start_server $port --fail-every 1000 +omhttp_start_server 0 --fail-every 1000 generate_conf add_conf ' @@ -28,7 +27,7 @@ template="tpl" server="localhost" - serverport="'$port'" + serverport="'$omhttp_server_lstnport'" restpath="my/endpoint" checkpath="ping" batch="off" @@ -41,7 +40,7 @@ injectmsg shutdown_when_empty wait_shutdown -omhttp_get_data $port my/endpoint +omhttp_get_data $omhttp_server_lstnport my/endpoint omhttp_stop_server seq_check exit_test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/omhttp_server.py new/rsyslog-8.2212.0/tests/omhttp_server.py --- old/rsyslog-8.2210.0/tests/omhttp_server.py 2022-07-11 13:06:09.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/omhttp_server.py 2022-12-05 15:58:38.000000000 +0100 @@ -110,6 +110,7 @@ if __name__ == '__main__': parser = argparse.ArgumentParser(description='Archive and delete core app log files') parser.add_argument('-p', '--port', action='store', type=int, default=8080, help='port') + parser.add_argument('--port-file', action='store', type=str, default='', help='file to store listen port number') parser.add_argument('-i', '--interface', action='store', type=str, default='localhost', help='port') parser.add_argument('--fail-after', action='store', type=int, default=0, help='start failing after n posts') parser.add_argument('--fail-every', action='store', type=int, default=-1, help='fail every n posts') @@ -123,7 +124,12 @@ metadata['decompress'] = args.decompress metadata['userpwd'] = args.userpwd server = HTTPServer((args.interface, args.port), MyHandler) + lstn_port = server.server_address[1] pid = os.getpid() print('starting omhttp test server at {interface}:{port} with pid {pid}' - .format(interface=args.interface, port=args.port, pid=pid)) + .format(interface=args.interface, port=lstn_port, pid=pid)) + if args.port_file != '': + f = open(args.port_file, "w") + f.write(str(lstn_port)) + f.close() server.serve_forever() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/sndrcv.sh new/rsyslog-8.2212.0/tests/sndrcv.sh --- old/rsyslog-8.2210.0/tests/sndrcv.sh 2022-07-11 13:06:09.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/sndrcv.sh 2022-12-05 12:54:18.000000000 +0100 @@ -36,7 +36,7 @@ # now inject the messages into instance 2. It will connect to instance 1, # and that instance will record the data. -injectmsg +injectmsg2 # shut down sender when everything is sent, receiver continues to run concurrently shutdown_when_empty 2 # now it is time to stop the receiver as well diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/sndrcv_failover.sh new/rsyslog-8.2212.0/tests/sndrcv_failover.sh --- old/rsyslog-8.2210.0/tests/sndrcv_failover.sh 2022-07-11 13:06:09.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/sndrcv_failover.sh 2022-12-05 12:54:18.000000000 +0100 @@ -44,7 +44,7 @@ # now inject the messages into instance 2. It will connect to instance 1, # and that instance will record the data. -injectmsg +injectmsg2 # shut down sender when everything is sent, receiver continues to run concurrently shutdown_when_empty 2 wait_shutdown 2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/sndrcv_gzip.sh new/rsyslog-8.2212.0/tests/sndrcv_gzip.sh --- old/rsyslog-8.2210.0/tests/sndrcv_gzip.sh 2022-07-11 13:06:09.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/sndrcv_gzip.sh 2022-12-05 12:54:18.000000000 +0100 @@ -32,7 +32,7 @@ # now inject the messages into instance 2. It will connect to instance 1, # and that instance will record the data. -injectmsg +injectmsg2 # shut down sender when everything is sent, receiver continues to run concurrently shutdown_when_empty 2 wait_shutdown 2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/sndrcv_relp_dflt_pt.sh new/rsyslog-8.2212.0/tests/sndrcv_relp_dflt_pt.sh --- old/rsyslog-8.2210.0/tests/sndrcv_relp_dflt_pt.sh 2022-07-11 13:06:09.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/sndrcv_relp_dflt_pt.sh 2022-12-05 12:54:18.000000000 +0100 @@ -41,7 +41,7 @@ # now inject the messages into instance 2. It will connect to instance 1, # and that instance will record the data. -injectmsg 1 50000 +injectmsg2 1 50000 # shut down sender shutdown_when_empty 2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/sndrcv_relp_rebind.sh new/rsyslog-8.2212.0/tests/sndrcv_relp_rebind.sh --- old/rsyslog-8.2210.0/tests/sndrcv_relp_rebind.sh 2022-07-11 13:06:09.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/sndrcv_relp_rebind.sh 2022-12-05 12:54:18.000000000 +0100 @@ -35,7 +35,7 @@ # now inject the messages into instance 2. It will connect to instance 1, # and that instance will record the data. -injectmsg 1 1000 +injectmsg2 1 1000 # shut down sender shutdown_when_empty 2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/sndrcv_relp_tls.sh new/rsyslog-8.2212.0/tests/sndrcv_relp_tls.sh --- old/rsyslog-8.2210.0/tests/sndrcv_relp_tls.sh 2022-07-11 13:06:09.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/sndrcv_relp_tls.sh 2022-12-05 12:54:18.000000000 +0100 @@ -30,7 +30,7 @@ # now inject the messages into instance 2. It will connect to instance 1, # and that instance will record the data. -injectmsg 1 50000 +injectmsg2 1 50000 # shut down sender shutdown_when_empty 2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/sndrcv_relp_tls_certvalid.sh new/rsyslog-8.2212.0/tests/sndrcv_relp_tls_certvalid.sh --- old/rsyslog-8.2210.0/tests/sndrcv_relp_tls_certvalid.sh 2022-07-11 13:06:09.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/sndrcv_relp_tls_certvalid.sh 2022-12-05 12:54:18.000000000 +0100 @@ -52,7 +52,7 @@ # now inject the messages into instance 2. It will connect to instance 1, # and that instance will record the data. -injectmsg 1 50000 +injectmsg2 1 50000 # shut down sender shutdown_when_empty 2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/sndrcv_relp_tls_prio.sh new/rsyslog-8.2212.0/tests/sndrcv_relp_tls_prio.sh --- old/rsyslog-8.2210.0/tests/sndrcv_relp_tls_prio.sh 2022-07-11 13:06:09.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/sndrcv_relp_tls_prio.sh 2022-12-05 12:54:18.000000000 +0100 @@ -31,7 +31,7 @@ # now inject the messages into instance 2. It will connect to instance 1, # and that instance will record the data. -injectmsg 1 50000 +injectmsg2 1 50000 # shut down sender shutdown_when_empty 2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/sndrcv_tls_anon_hostname.sh new/rsyslog-8.2212.0/tests/sndrcv_tls_anon_hostname.sh --- old/rsyslog-8.2210.0/tests/sndrcv_tls_anon_hostname.sh 2022-07-11 13:06:09.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/sndrcv_tls_anon_hostname.sh 2022-12-05 12:54:18.000000000 +0100 @@ -50,7 +50,7 @@ # now inject the messages into instance 2. It will connect to instance 1, # and that instance will record the data. -injectmsg +injectmsg2 # shut down sender when everything is sent, receiver continues to run concurrently shutdown_when_empty 2 wait_shutdown 2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/sndrcv_tls_anon_ipv4.sh new/rsyslog-8.2212.0/tests/sndrcv_tls_anon_ipv4.sh --- old/rsyslog-8.2210.0/tests/sndrcv_tls_anon_ipv4.sh 2022-07-11 13:06:09.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/sndrcv_tls_anon_ipv4.sh 2022-12-05 12:54:18.000000000 +0100 @@ -53,7 +53,7 @@ # now inject the messages into instance 2. It will connect to instance 1, # and that instance will record the data. -injectmsg +injectmsg2 # shut down sender when everything is sent, receiver continues to run concurrently shutdown_when_empty 2 wait_shutdown 2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/sndrcv_tls_anon_ipv6.sh new/rsyslog-8.2212.0/tests/sndrcv_tls_anon_ipv6.sh --- old/rsyslog-8.2210.0/tests/sndrcv_tls_anon_ipv6.sh 2022-07-11 13:06:09.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/sndrcv_tls_anon_ipv6.sh 2022-12-05 12:54:18.000000000 +0100 @@ -54,7 +54,7 @@ # now inject the messages into instance 2. It will connect to instance 1, # and that instance will record the data. -injectmsg +injectmsg2 # shut down sender when everything is sent, receiver continues to run concurrently shutdown_when_empty 2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/sndrcv_tls_certvalid.sh new/rsyslog-8.2212.0/tests/sndrcv_tls_certvalid.sh --- old/rsyslog-8.2210.0/tests/sndrcv_tls_certvalid.sh 2022-07-11 13:06:09.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/sndrcv_tls_certvalid.sh 2022-12-05 12:54:18.000000000 +0100 @@ -48,7 +48,7 @@ # now inject the messages into instance 2. It will connect to instance 1, # and that instance will record the data. -injectmsg +injectmsg2 # shut down sender when everything is sent, receiver continues to run concurrently shutdown_when_empty 2 wait_shutdown 2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/sndrcv_tls_certvalid_expired.sh new/rsyslog-8.2212.0/tests/sndrcv_tls_certvalid_expired.sh --- old/rsyslog-8.2210.0/tests/sndrcv_tls_certvalid_expired.sh 2022-07-11 13:06:09.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/sndrcv_tls_certvalid_expired.sh 2022-12-05 12:54:18.000000000 +0100 @@ -49,7 +49,7 @@ # now inject the messages into instance 2. It will connect to instance 1, # and that instance will record the data. -injectmsg +injectmsg2 # shut down sender when everything is sent, receiver continues to run concurrently shutdown_when_empty 2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/sndrcv_tls_certvalid_expired_defaultmode.sh new/rsyslog-8.2212.0/tests/sndrcv_tls_certvalid_expired_defaultmode.sh --- old/rsyslog-8.2210.0/tests/sndrcv_tls_certvalid_expired_defaultmode.sh 2022-07-11 13:06:09.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/sndrcv_tls_certvalid_expired_defaultmode.sh 2022-12-05 12:54:18.000000000 +0100 @@ -47,7 +47,7 @@ # now inject the messages into instance 2. It will connect to instance 1, # and that instance will record the data. -injectmsg +injectmsg2 # shut down sender when everything is sent, receiver continues to run concurrently shutdown_when_empty 2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/sndrcv_tls_gtls_serveranon_gtls_clientanon.sh new/rsyslog-8.2212.0/tests/sndrcv_tls_gtls_serveranon_gtls_clientanon.sh --- old/rsyslog-8.2210.0/tests/sndrcv_tls_gtls_serveranon_gtls_clientanon.sh 2022-07-11 13:06:09.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/sndrcv_tls_gtls_serveranon_gtls_clientanon.sh 2022-12-05 12:54:18.000000000 +0100 @@ -36,7 +36,7 @@ # now inject the messages into instance 2. It will connect to instance 1, # and that instance will record the data. -injectmsg +injectmsg2 # shut down sender when everything is sent, receiver continues to run concurrently shutdown_when_empty 2 wait_shutdown 2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/sndrcv_tls_gtls_servercert_gtls_clientanon.sh new/rsyslog-8.2212.0/tests/sndrcv_tls_gtls_servercert_gtls_clientanon.sh --- old/rsyslog-8.2210.0/tests/sndrcv_tls_gtls_servercert_gtls_clientanon.sh 2022-07-11 13:06:09.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/sndrcv_tls_gtls_servercert_gtls_clientanon.sh 2022-12-05 12:54:18.000000000 +0100 @@ -43,7 +43,7 @@ # now inject the messages into instance 2. It will connect to instance 1, # and that instance will record the data. -injectmsg +injectmsg2 wait_file_lines # shut down sender when everything is sent, receiver continues to run concurrently shutdown_when_empty 2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/sndrcv_tls_ossl_anon_ipv4.sh new/rsyslog-8.2212.0/tests/sndrcv_tls_ossl_anon_ipv4.sh --- old/rsyslog-8.2210.0/tests/sndrcv_tls_ossl_anon_ipv4.sh 2022-07-11 13:06:09.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/sndrcv_tls_ossl_anon_ipv4.sh 2022-12-05 12:54:18.000000000 +0100 @@ -54,7 +54,7 @@ # now inject the messages into instance 2. It will connect to instance 1, # and that instance will record the data. -injectmsg +injectmsg2 # shut down sender when everything is sent, receiver continues to run concurrently shutdown_when_empty 2 wait_shutdown 2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/sndrcv_tls_ossl_anon_rebind.sh new/rsyslog-8.2212.0/tests/sndrcv_tls_ossl_anon_rebind.sh --- old/rsyslog-8.2210.0/tests/sndrcv_tls_ossl_anon_rebind.sh 2022-07-11 13:06:09.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/sndrcv_tls_ossl_anon_rebind.sh 2022-12-05 12:54:18.000000000 +0100 @@ -71,7 +71,7 @@ # now inject the messages into instance 2. It will connect to instance 1, # and that instance will record the data. -injectmsg +injectmsg2 shutdown_when_empty 2 wait_shutdown 2 # now it is time to stop the receiver as well diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/sndrcv_tls_ossl_certvalid_expired.sh new/rsyslog-8.2212.0/tests/sndrcv_tls_ossl_certvalid_expired.sh --- old/rsyslog-8.2210.0/tests/sndrcv_tls_ossl_certvalid_expired.sh 2022-07-11 13:06:09.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/sndrcv_tls_ossl_certvalid_expired.sh 2022-12-05 12:54:18.000000000 +0100 @@ -48,7 +48,7 @@ # now inject the messages into instance 2. It will connect to instance 1, # and that instance will record the data. -injectmsg +injectmsg2 # shut down sender when everything is sent, receiver continues to run concurrently shutdown_when_empty 2 wait_shutdown 2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/sndrcv_tls_ossl_certvalid_tlscommand.sh new/rsyslog-8.2212.0/tests/sndrcv_tls_ossl_certvalid_tlscommand.sh --- old/rsyslog-8.2210.0/tests/sndrcv_tls_ossl_certvalid_tlscommand.sh 2022-07-19 12:43:32.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/sndrcv_tls_ossl_certvalid_tlscommand.sh 2022-12-05 12:54:18.000000000 +0100 @@ -49,7 +49,7 @@ # now inject the messages into instance 2. It will connect to instance 1, # and that instance will record the data. -injectmsg 0 1 +injectmsg2 0 1 shutdown_when_empty 2 wait_shutdown 2 # now it is time to stop the receiver as well diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tests/sndrcv_udp_nonstdpt.sh new/rsyslog-8.2212.0/tests/sndrcv_udp_nonstdpt.sh --- old/rsyslog-8.2210.0/tests/sndrcv_udp_nonstdpt.sh 2022-07-11 13:06:09.000000000 +0200 +++ new/rsyslog-8.2212.0/tests/sndrcv_udp_nonstdpt.sh 2022-12-05 12:54:18.000000000 +0100 @@ -8,7 +8,7 @@ # This file is part of the rsyslog project, released under ASL 2.0 . ${srcdir:=.}/diag.sh init export TCPFLOOD_EXTRA_OPTS="-b1 -W1" -export NUMMESSAGES=500 +export NUMMESSAGES=50 export QUEUE_EMPTY_CHECK_FUNC=wait_file_lines export RSYSLOG_DEBUGLOG="log" @@ -24,17 +24,18 @@ ' startup export RSYSLOG_DEBUGLOG="log2" +export PORT_RCVR="$TCPFLOOD_PORT" #valgrind="valgrind" generate_conf 2 add_conf ' -*.* @127.0.0.1:'$TCPFLOOD_PORT' +*.* @127.0.0.1:'$PORT_RCVR' ' 2 startup 2 # now inject the messages into instance 2. It will connect to instance 1, # and that instance will record the data. -injectmsg +injectmsg2 # shut down sender when everything is sent, receiver continues to run concurrently shutdown_when_empty 2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rsyslog-8.2210.0/tools/rsyslog.conf.5 new/rsyslog-8.2212.0/tools/rsyslog.conf.5 --- old/rsyslog-8.2210.0/tools/rsyslog.conf.5 2022-07-19 12:43:32.000000000 +0200 +++ new/rsyslog-8.2212.0/tools/rsyslog.conf.5 2022-12-05 12:54:18.000000000 +0100 @@ -207,6 +207,29 @@ you use both extensions then the exclamation mark must occur before the equals sign, just use it intuitively. +However, please note that there are some restrictions over the traditional +BSD syslog behaviour. These restrictions stem back to sysklogd, exist +probably since at least the 1990's and as such have always been in +rsyslog. + +Namely, in BSD syslogd you can craft a selector like this: + +*.debug;local6.err + +The intent is to log all facilities at debug or higher, except for local6, +which should only log at err or higher. + +Unfortunately, local6.err will permit error severity and higher, but will +not exclude lower sevrity messages from facility local6. + +As an alternative, you can explicitely exclude all severities that you do +not want to match. For the above case, this selector is equivalent to the +BSD syslog selector: + +*.debug;local6.!=info;local6.!=notice;local6.!=warn + +An easier approach is probably to do if ... then based matching in script. + .SH ACTIONS The action field of a rule describes what to do with the message. In general, message content is written to a kind of "logfile". But also other actions might be done, like writing to a ++++++ rsyslog-doc-8.2210.0.tar.gz -> rsyslog-doc-8.2212.0.tar.gz ++++++ /work/SRC/openSUSE:Factory/rsyslog/rsyslog-doc-8.2210.0.tar.gz /work/SRC/openSUSE:Factory/.rsyslog.new.1835/rsyslog-doc-8.2212.0.tar.gz differ: char 14, line 1