From e38db33002250d605e23a9a64609eaa25a4259dd Mon Sep 17 00:00:00 2001 From: eabdullin Date: Tue, 11 Nov 2025 21:50:15 +0000 Subject: [PATCH] import UBI rsyslog-8.2506.0-2.el10 --- .gitignore | 4 +- disable-openssl-engine.patch | 60 --------------- imfile-delete-state-on-file-move.patch | 101 +++++++++++++++++++++++++ openssl-disable-engines.patch | 62 +++++++++++++++ rsyslog-tmpfiles.conf | 1 + rsyslog.spec | 36 +++++++-- sources | 4 +- 7 files changed, 196 insertions(+), 72 deletions(-) delete mode 100644 disable-openssl-engine.patch create mode 100644 imfile-delete-state-on-file-move.patch create mode 100644 openssl-disable-engines.patch create mode 100644 rsyslog-tmpfiles.conf diff --git a/.gitignore b/.gitignore index dab93ed..46133ec 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ qpid-proton-0.39.0.tar.gz -rsyslog-8.2412.0.tar.gz -rsyslog-doc-8.2412.0.tar.gz +rsyslog-8.2506.0.tar.gz +rsyslog-doc-8.2506.0.tar.gz diff --git a/disable-openssl-engine.patch b/disable-openssl-engine.patch deleted file mode 100644 index 20ba01e..0000000 --- a/disable-openssl-engine.patch +++ /dev/null @@ -1,60 +0,0 @@ -diff -up rsyslog-8.2412.0/runtime/net_ossl.c.orig rsyslog-8.2412.0/runtime/net_ossl.c ---- rsyslog-8.2412.0/runtime/net_ossl.c.orig 2024-11-27 13:05:51.327988286 +0100 -+++ rsyslog-8.2412.0/runtime/net_ossl.c 2024-11-27 13:06:26.806335104 +0100 -@@ -220,6 +220,7 @@ osslGlblInit(void) - ERR_load_crypto_strings(); - #endif - -+#ifdef ENABLE_OPENSSL_ENGINES_DOWNSTREAM - PRAGMA_DIAGNOSTIC_PUSH - PRAGMA_IGNORE_Wdeprecated_declarations - -@@ -244,6 +245,8 @@ PRAGMA_IGNORE_Wdeprecated_declarations - // Free the engine reference when done - ENGINE_free(osslEngine); - PRAGMA_DIAGNOSTIC_POP -+#endif -+ - } - - /* globally de-initialize OpenSSL */ -@@ -251,7 +254,9 @@ void - osslGlblExit(void) - { - DBGPRINTF("openssl: entering osslGlblExit\n"); -+ #ifdef ENABLE_OPENSSL_ENGINES_DOWNSTREAM - ENGINE_cleanup(); -+ #endif - ERR_free_strings(); - EVP_cleanup(); - CRYPTO_cleanup_all_ex_data(); -@@ -1149,6 +1154,7 @@ net_ossl_init_engine(__attribute__((unus - const char *engine_id = NULL; - const char *engine_name = NULL; - -+#ifdef ENABLE_OPENSSL_ENGINES_DOWNSTREAM - PRAGMA_DIAGNOSTIC_PUSH - PRAGMA_IGNORE_Wdeprecated_declarations - // Get the default RSA engine -@@ -1189,7 +1195,7 @@ PRAGMA_IGNORE_Wdeprecated_declarations - DBGPRINTF("net_ossl_init_engine: use openssl default Engine"); - } - PRAGMA_DIAGNOSTIC_POP -- -+#endif // ENABLE_OPENSSL_ENGINES_DOWNSTREAM - RETiRet; - } - -diff -up rsyslog-8.2412.0/runtime/net_ossl.h.orig rsyslog-8.2412.0/runtime/net_ossl.h ---- rsyslog-8.2412.0/runtime/net_ossl.h.orig 2024-11-27 13:06:01.138084180 +0100 -+++ rsyslog-8.2412.0/runtime/net_ossl.h 2024-11-27 13:06:30.536372456 +0100 -@@ -31,7 +31,9 @@ - #if OPENSSL_VERSION_NUMBER >= 0x30000000L && !defined(LIBRESSL_VERSION_NUMBER) - # include - #endif -+#ifdef ENABLE_OPENSSL_ENGINES_DOWNSTREAM - #include -+#endif - #include - #include - diff --git a/imfile-delete-state-on-file-move.patch b/imfile-delete-state-on-file-move.patch new file mode 100644 index 0000000..ce8c2de --- /dev/null +++ b/imfile-delete-state-on-file-move.patch @@ -0,0 +1,101 @@ +diff -up a/plugins/imfile/imfile.c.orig b/plugins/imfile/imfile.c +--- a/plugins/imfile/imfile.c.orig 2025-07-29 15:54:35.659288215 +0200 ++++ b/plugins/imfile/imfile.c 2025-07-29 15:54:40.119329980 +0200 +@@ -157,6 +157,7 @@ struct instanceConf_s { + int readTimeout; + unsigned delay_perMsg; + sbool bRMStateOnDel; ++ sbool bRMStateOnMove; + uint8_t readMode; + uchar *startRegex; + uchar *endRegex; +@@ -253,6 +254,7 @@ struct modConfData_s { + instanceConf_t *root, *tail; + fs_node_t *conf_tree; + uint8_t opMode; ++ sbool bRMStateOnMove; + sbool configSetViaV2Method; + uchar *stateFileDirectory; + sbool sortFiles; +@@ -310,7 +312,8 @@ static struct cnfparamdescr modpdescr[] + { "sortfiles", eCmdHdlrBinary, 0 }, + { "statefile.directory", eCmdHdlrString, 0 }, + { "normalizepath", eCmdHdlrBinary, 0 }, +- { "mode", eCmdHdlrGetWord, 0 } ++ { "mode", eCmdHdlrGetWord, 0 }, ++ { "deletestateonfilemove", eCmdHdlrBinary, 0 }, + }; + static struct cnfparamblk modpblk = + { CNFPARAMBLK_VERSION, +@@ -350,7 +353,8 @@ static struct cnfparamdescr inppdescr[] + { "needparse", eCmdHdlrBinary, 0}, + { "ignoreolderthan", eCmdHdlrInt, 0}, + { "maxbytesperminute", eCmdHdlrInt, 0}, +- { "maxlinesperminute", eCmdHdlrInt, 0} ++ { "maxlinesperminute", eCmdHdlrInt, 0}, ++ { "deletestateonfilemove", eCmdHdlrBinary, 0} + }; + static struct cnfparamblk inppblk = + { CNFPARAMBLK_VERSION, +@@ -856,7 +860,7 @@ detect_updates(fs_edge_t *const edge) + */ + sbool is_file = act->edge->is_file; + if (!is_file || act->time_to_delete + FILE_DELETE_DELAY < ttNow) { +- DBGPRINTF("detect_updates obj gone away, unlinking: " ++ DBGPRINTF("detect_updates obj gone away, unlinking: " + "'%s', ttDelete: %"PRId64"s, ttNow:%"PRId64" isFile: %d\n", + act->name, (int64_t) ttNow - (act->time_to_delete + FILE_DELETE_DELAY), + (int64_t) ttNow, is_file); +@@ -1061,8 +1065,17 @@ act_obj_destroy(act_obj_t *const act, co + } + persistStrmState(act); + strm.Destruct(&act->pStrm); +- /* we delete state file after destruct in case strm obj initiated a write */ +- if(is_deleted && !act->in_move && inst->bRMStateOnDel) { ++ ++ /* ++ * We delete the state file after the destruct operation to ensure that any pending ++ * writes initiated by the stream object are completed before removal. The state file ++ * is deleted in the following scenarios: ++ * - If the file has not been moved and we are configured to delete the state file ++ * when the original file is removed. ++ * - If the configuration specifies not to preserve the state file after the file ++ * has been renamed. This prevents orphaned state files. ++ */ ++ if(is_deleted && ((!act->in_move && inst->bRMStateOnDel) || inst->bRMStateOnMove)) { + DBGPRINTF("act_obj_destroy: deleting state file %s\n", statefn); + unlink((char*)statefn); + } +@@ -1773,6 +1786,7 @@ createInstance(instanceConf_t **const pi + inst->discardTruncatedMsg = 0; + inst->msgDiscardingError = 1; + inst->bRMStateOnDel = 1; ++ inst->bRMStateOnMove = loadModConf->bRMStateOnMove; + inst->escapeLF = 1; + inst->escapeLFString = NULL; + inst->reopenOnTruncate = 0; +@@ -1932,6 +1946,7 @@ addInstance(void __attribute__((unused)) + inst->addMetadata = 0; + inst->addCeeTag = 0; + inst->bRMStateOnDel = 0; ++ inst->bRMStateOnMove = loadModConf->bRMStateOnMove; + inst->readTimeout = loadModConf->readTimeout; + inst->msgFlag = 0; + +@@ -2089,6 +2104,7 @@ CODESTARTbeginCnfLoad + /* init our settings */ + loadModConf->opMode = OPMODE_POLLING; + loadModConf->iPollInterval = DFLT_PollInterval; ++ loadModConf->bRMStateOnMove = 0; + loadModConf->configSetViaV2Method = 0; + loadModConf->readTimeout = 0; /* default: no timeout */ + loadModConf->timeoutGranularity = 1000; /* default: 1 second */ +@@ -2142,6 +2158,8 @@ CODESTARTsetModCnf + continue; + if(!strcmp(modpblk.descr[i].name, "pollinginterval")) { + loadModConf->iPollInterval = (int) pvals[i].val.d.n; ++ } else if(!strcmp(modpblk.descr[i].name, "deletestateonfilemove")) { ++ loadModConf->bRMStateOnMove = (sbool) pvals[i].val.d.n; + } else if(!strcmp(modpblk.descr[i].name, "readtimeout")) { + loadModConf->readTimeout = (int) pvals[i].val.d.n; + } else if(!strcmp(modpblk.descr[i].name, "timeoutgranularity")) { diff --git a/openssl-disable-engines.patch b/openssl-disable-engines.patch new file mode 100644 index 0000000..877f0a4 --- /dev/null +++ b/openssl-disable-engines.patch @@ -0,0 +1,62 @@ +diff --git a/plugins/imdtls/imdtls.c b/plugins/imdtls/imdtls.c +index f90e8ad61c..bfb63452c7 100644 +--- a/plugins/imdtls/imdtls.c ++++ b/plugins/imdtls/imdtls.c +@@ -41,7 +41,9 @@ + #if OPENSSL_VERSION_NUMBER >= 0x30000000L && !defined(LIBRESSL_VERSION_NUMBER) + # include + #endif +-#include ++#ifndef OPENSSL_NO_ENGINE ++# include ++#endif + // --- + + #include "rsyslog.h" +diff --git a/plugins/omdtls/omdtls.c b/plugins/omdtls/omdtls.c +index 2b28908030..693ff99c77 100644 +--- a/plugins/omdtls/omdtls.c ++++ b/plugins/omdtls/omdtls.c +@@ -52,7 +52,9 @@ + #if OPENSSL_VERSION_NUMBER >= 0x30000000L && !defined(LIBRESSL_VERSION_NUMBER) + # include + #endif +-#include ++#ifndef OPENSSL_NO_ENGINE ++# include ++#endif + // --- + + // Include rsyslog headers +diff --git a/runtime/net_ossl.h b/runtime/net_ossl.h +index af36ffe488..d66a422d4d 100644 +--- a/runtime/net_ossl.h ++++ b/runtime/net_ossl.h +@@ -31,7 +31,9 @@ + #if OPENSSL_VERSION_NUMBER >= 0x30000000L && !defined(LIBRESSL_VERSION_NUMBER) + # include + #endif +-#include ++#ifndef OPENSSL_NO_ENGINE ++# include ++#endif + #include + #include + +diff --git a/tests/tcpflood.c b/tests/tcpflood.c +index 4b2d98b2c8..7322aeb135 100644 +--- a/tests/tcpflood.c ++++ b/tests/tcpflood.c +@@ -129,8 +129,10 @@ + #ifdef ENABLE_OPENSSL + #include + #include +- #include +- #include ++ #include ++# ifndef OPENSSL_NO_ENGINE ++# include ++# endif + + /* OpenSSL API differences */ + #if OPENSSL_VERSION_NUMBER >= 0x10100000L diff --git a/rsyslog-tmpfiles.conf b/rsyslog-tmpfiles.conf new file mode 100644 index 0000000..1c82fd6 --- /dev/null +++ b/rsyslog-tmpfiles.conf @@ -0,0 +1 @@ +d /var/lib/rsyslog 0700 root root - - diff --git a/rsyslog.spec b/rsyslog.spec index 3e11c10..557ba8b 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -36,8 +36,8 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog -Version: 8.2412.0 -Release: 1%{?dist} +Version: 8.2506.0 +Release: 2%{?dist} License: GPL-3.0-or-later AND Apache-2.0 URL: http://www.rsyslog.com/ Source0: http://www.rsyslog.com/files/download/rsyslog/%{name}-%{version}.tar.gz @@ -49,6 +49,7 @@ Source5: rsyslog.service # Add qpid-proton as another source, enable omamqp1 module in a # separatae sub-package with it statically linked(see rhbz#1713427) Source6: https://archive.apache.org/dist/qpid/proton/%{qpid_proton_v}/qpid-proton-%{qpid_proton_v}.tar.gz +Source7: rsyslog-tmpfiles.conf BuildRequires: make BuildRequires: gcc @@ -69,7 +70,8 @@ BuildRequires: systemd-rpm-macros BuildRequires: zlib-devel BuildRequires: libcap-ng-devel -Patch0: disable-openssl-engine.patch +Patch0: openssl-disable-engines.patch +Patch1: imfile-delete-state-on-file-move.patch Recommends: logrotate Obsoletes: rsyslog-logrotate < 8.2310.0-2 @@ -385,6 +387,7 @@ mv build doc %setup -q -D %patch -P 0 -p1 +%patch -P 1 -p1 %if %{with omamqp1} # Unpack qpid-proton @@ -407,14 +410,13 @@ export CFLAGS="$RPM_OPT_FLAGS -fpic" cd bld # Need ENABLE_FUZZ_TESTING=NO to avoid a link failure - # Find python include dir and python library from - # https://stackoverflow.com/questions/24174394/cmake-is-not-able-to-find-python-libraries + # Modern approach for Python discovery in CMake cmake .. \ -DBUILD_BINDINGS="" \ -DBUILD_STATIC_LIBS=YES \ -DENABLE_FUZZ_TESTING=NO \ - -DPYTHON_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") \ - -DPYTHON_LIBRARY=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))") \ + -DPython_FIND_STRATEGY=LOCATION \ + -DPython_ROOT_DIR=/usr \ -DCMAKE_AR="/usr/bin/gcc-ar" -DCMAKE_NM="/usr/bin/gcc-nm" -DCMAKE_RANLIB="/usr/bin/gcc-ranlib" make -j8 ) @@ -464,7 +466,7 @@ autoreconf -if --enable-omrabbitmq \ %endif %if %{with omamqp1} - --enable-omamqp1 PROTON_LIBS="%{_builddir}/qpid-proton-%{qpid_proton_v}/bld/c/libqpid-proton-core-static.a %{_builddir}/qpid-proton-%{qpid_proton_v}/bld/c/libqpid-proton-proactor-static.a %{_builddir}/qpid-proton-%{qpid_proton_v}/bld/c/libqpid-proton-static.a -lssl -lsasl2 -lcrypto" PROTON_CFLAGS="-I%{_builddir}/qpid-proton-%{qpid_proton_v}/bld/c/include" \ + --enable-omamqp1 PROTON_PROACTOR_LIBS="%{_builddir}/qpid-proton-%{qpid_proton_v}/bld/c/libqpid-proton-core-static.a %{_builddir}/qpid-proton-%{qpid_proton_v}/bld/c/libqpid-proton-proactor-static.a %{_builddir}/qpid-proton-%{qpid_proton_v}/bld/c/libqpid-proton-static.a -lssl -lsasl2 -lcrypto" PROTON_PROACTOR_CFLAGS="-I%{_builddir}/qpid-proton-%{qpid_proton_v}/c/include -I%{_builddir}/qpid-proton-%{qpid_proton_v}/bld/c/include" PROTON_LIBS="%{_builddir}/qpid-proton-%{qpid_proton_v}/bld/c/libqpid-proton-core-static.a %{_builddir}/qpid-proton-%{qpid_proton_v}/bld/c/libqpid-proton-proactor-static.a %{_builddir}/qpid-proton-%{qpid_proton_v}/bld/c/libqpid-proton-static.a -lssl -lsasl2 -lcrypto" PROTON_CFLAGS="-I%{_builddir}/qpid-proton-%{qpid_proton_v}/c/include -I%{_builddir}/qpid-proton-%{qpid_proton_v}/bld/c/include" \ %endif --enable-elasticsearch \ --enable-generate-man-pages \ @@ -544,11 +546,13 @@ install -d -m 755 %{buildroot}%{_sysconfdir}/rsyslog.d install -d -m 700 %{buildroot}%{rsyslog_statedir} install -d -m 700 %{buildroot}%{rsyslog_pkidir} install -d -m 755 %{buildroot}%{rsyslog_docdir}/html +install -d -m 755 %{buildroot}%{_tmpfilesdir} install -p -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/rsyslog.conf install -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/rsyslog install -p -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/logrotate.d/rsyslog install -p -m 644 %{SOURCE5} %{buildroot}%{_unitdir}/rsyslog.service +install -p -m 644 %{SOURCE7} %{buildroot}%{_tmpfilesdir}/rsyslog.conf %if %{with mysql} install -p -m 644 plugins/ommysql/createDB.sql %{buildroot}%{rsyslog_docdir}/mysql-createDB.sql @@ -603,6 +607,7 @@ done %{_mandir}/man5/rsyslog.conf.5.gz %{_mandir}/man8/rsyslogd.8.gz %{_unitdir}/rsyslog.service +%{_tmpfilesdir}/rsyslog.conf %config(noreplace) %{_sysconfdir}/rsyslog.conf %config(noreplace) %{_sysconfdir}/sysconfig/rsyslog %config(noreplace) %{_sysconfdir}/logrotate.d/rsyslog @@ -767,6 +772,21 @@ done %changelog +* Tue Jul 29 2025 Attila Lakatos 8.2506.0-2 +- imfile: reintroduce deleteStateOnFileMove parameter + Resolves: RHEL-92757 + +* Thu Jun 12 2025 Attila Lakatos - 8.2506.0-1 +- Rebase to 8.2506.0 +- imuxsock: track dropped messages by ratelimiting + Resolves: RHEL-96589 +- man page version update + Resolves: RHEL-96592 + +* Tue May 06 2025 Attila Lakatos - 8.2412.0-2 +- Add tmpfiles.d configuration + Resolves: RHEL-89795 + * Thu Dec 05 2024 Attila Lakatos - 8.2412.0-1 - Rebase to 8.2412.0 Resolves: RHEL-70110 diff --git a/sources b/sources index 380a910..7e05396 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ SHA512 (qpid-proton-0.39.0.tar.gz) = df5c5469ee82ba02de62dce15b73b81aab2aae07c7db668182df690cea4ff7584111bd12143fe5e3569469a9ddf4950ac68d60b53d1a7815da4748052948cd1b -SHA512 (rsyslog-8.2412.0.tar.gz) = fdd8bb096c9578fe2c4ed8cdb13179d7b3333d0f9be1b2c921b5b040f1e1414c3f9f8106e44444aaefba22f235a44d17c0c5b80cd114fe540a2aebb30e3eba72 -SHA512 (rsyslog-doc-8.2412.0.tar.gz) = 9b5d453b5774b027a6a4ba232133953d8a8058df4bfff31f835504656d7b01008cec5c0d28667bed0052799cf7389c0bafea7c76c3190bdcdf3d8a2eedf19b4e +SHA512 (rsyslog-8.2506.0.tar.gz) = 82fd3a3e76217081c7903b0bdb8bdb46c23657593d84d5ff7f836efca4c76d7d2870706150a6473c0667f0c8571a3c8e5d237619a3ad3940701925efaec32941 +SHA512 (rsyslog-doc-8.2506.0.tar.gz) = 49db24f5905e4c48ab198358a646d105d0b10c23c7b9ea27d26baa533506e21420829a62acf52f4d34b56250d30988c1f8ab2d6798b3a416b0692c1fcf3c538d