From 3b664f17f812b1235bdf8d4475e1fa9356dd78d9 Mon Sep 17 00:00:00 2001 From: Radovan Sroka Date: Mon, 23 Oct 2017 16:34:01 +0200 Subject: [PATCH 01/99] Rebase to 8.30.0 - added patch that resolves imgssapi compilation errors --- .gitignore | 2 + rsyslog-8.30.0-imgssapi-compile-error.patch | 128 ++++++++++++++++++++ rsyslog.spec | 10 +- sources | 4 +- 4 files changed, 140 insertions(+), 4 deletions(-) create mode 100644 rsyslog-8.30.0-imgssapi-compile-error.patch diff --git a/.gitignore b/.gitignore index 6fd5140..3b6963e 100644 --- a/.gitignore +++ b/.gitignore @@ -43,3 +43,5 @@ rsyslog-4.6.3.tar.gz /rsyslog-8.27.0.tar.gz /rsyslog-8.29.0.tar.gz /rsyslog-doc-8.29.0.tar.gz +/rsyslog-8.30.0.tar.gz +/rsyslog-doc-8.30.0.tar.gz diff --git a/rsyslog-8.30.0-imgssapi-compile-error.patch b/rsyslog-8.30.0-imgssapi-compile-error.patch new file mode 100644 index 0000000..8427aea --- /dev/null +++ b/rsyslog-8.30.0-imgssapi-compile-error.patch @@ -0,0 +1,128 @@ +From 8d793eafdde0b74d0b4424f0d194b5dc6801a5d1 Mon Sep 17 00:00:00 2001 +From: Rainer Gerhards +Date: Tue, 17 Oct 2017 17:34:49 +0200 +Subject: [PATCH] imgssapi: fix compiler warnings + +--- + plugins/imgssapi/imgssapi.c | 25 ++++++++++++------------- + 1 file changed, 12 insertions(+), 13 deletions(-) + +diff --git a/plugins/imgssapi/imgssapi.c b/plugins/imgssapi/imgssapi.c +index aafce7d2..836931c7 100644 +--- a/plugins/imgssapi/imgssapi.c ++++ b/plugins/imgssapi/imgssapi.c +@@ -9,7 +9,7 @@ + * NOTE: read comments in module-template.h to understand how this file + * works! + * +- * Copyright 2007, 2014 Rainer Gerhards and Adiscon GmbH. ++ * Copyright 2007, 2017 Rainer Gerhards and Adiscon GmbH. + * + * This file is part of rsyslog. + * +@@ -63,7 +63,6 @@ + + MODULE_TYPE_INPUT + MODULE_TYPE_NOKEEP +-MODULE_CNFNAME("imgssapi") + + /* defines */ + #define ALLOWEDMETHOD_GSS 2 +@@ -162,7 +161,7 @@ OnSessDestruct(void *ppUsr) + OM_uint32 maj_stat, min_stat; + maj_stat = gss_delete_sec_context(&min_stat, &(*ppGSess)->gss_context, GSS_C_NO_BUFFER); + if (maj_stat != GSS_S_COMPLETE) +- gssutil.display_status("deleting context", maj_stat, min_stat); ++ gssutil.display_status((char*)"deleting context", maj_stat, min_stat); + } + + free(*ppGSess); +@@ -291,7 +290,7 @@ finalize_it: + + + static rsRetVal +-doRcvData(tcps_sess_t *pSess, char *buf, size_t lenBuf, ssize_t *piLenRcvd) ++doRcvData(tcps_sess_t *pSess, char *buf, size_t lenBuf, ssize_t *piLenRcvd, int *const oserr) + { + DEFiRet; + int allowedMethods; +@@ -307,7 +306,7 @@ doRcvData(tcps_sess_t *pSess, char *buf, size_t lenBuf, ssize_t *piLenRcvd) + CHKiRet(TCPSessGSSRecv(pSess, buf, lenBuf, piLenRcvd)); + } else { + *piLenRcvd = lenBuf; +- CHKiRet(netstrm.Rcv(pSess->pStrm, (uchar*) buf, piLenRcvd) != RS_RET_OK); ++ CHKiRet(netstrm.Rcv(pSess->pStrm, (uchar*) buf, piLenRcvd, oserr)); + } + + finalize_it: +@@ -380,11 +379,11 @@ static int TCPSessGSSInit(void) + if (gss_server_creds != GSS_C_NO_CREDENTIAL) + return 0; + +- name_buf.value = (gss_listen_service_name == NULL) ? "host" : gss_listen_service_name; ++ name_buf.value = (gss_listen_service_name == NULL) ? (char*)"host" : gss_listen_service_name; + name_buf.length = strlen(name_buf.value) + 1; + maj_stat = gss_import_name(&min_stat, &name_buf, GSS_C_NT_HOSTBASED_SERVICE, &server_name); + if (maj_stat != GSS_S_COMPLETE) { +- gssutil.display_status("importing name", maj_stat, min_stat); ++ gssutil.display_status((char*)"importing name", maj_stat, min_stat); + return -1; + } + +@@ -392,7 +391,7 @@ static int TCPSessGSSInit(void) + GSS_C_NULL_OID_SET, GSS_C_ACCEPT, + &gss_server_creds, NULL, NULL); + if (maj_stat != GSS_S_COMPLETE) { +- gssutil.display_status("acquiring credentials", maj_stat, min_stat); ++ gssutil.display_status((char*)"acquiring credentials", maj_stat, min_stat); + return -1; + } + +@@ -549,7 +548,7 @@ OnSessAcceptGSS(tcpsrv_t *pThis, tcps_sess_t *pSess) + pGSess->allowedMethods = ALLOWEDMETHOD_TCP; + ABORT_FINALIZE(RS_RET_OK); // TODO: define good error codes + } +- gssutil.display_status("accepting context", maj_stat, acc_sec_min_stat); ++ gssutil.display_status((char*)"accepting context", maj_stat, acc_sec_min_stat); + ABORT_FINALIZE(RS_RET_ERR); // TODO: define good error codes + } + if (send_tok.length != 0) { +@@ -566,7 +565,7 @@ OnSessAcceptGSS(tcpsrv_t *pThis, tcps_sess_t *pSess) + + maj_stat = gss_display_name(&min_stat, client, &recv_tok, NULL); + if (maj_stat != GSS_S_COMPLETE) { +- gssutil.display_status("displaying name", maj_stat, min_stat); ++ gssutil.display_status((char*)"displaying name", maj_stat, min_stat); + } else { + dbgprintf("GSS-API Accepted connection from peer %s: %s\n", (char *)pszPeer, (char*) recv_tok.value); + } +@@ -608,7 +607,7 @@ int TCPSessGSSRecv(tcps_sess_t *pSess, void *buf, size_t buf_len, ssize_t *piLen + maj_stat = gss_unwrap(&min_stat, *context, &xmit_buf, &msg_buf, + &conf_state, (gss_qop_t *) NULL); + if(maj_stat != GSS_S_COMPLETE) { +- gssutil.display_status("unsealing message", maj_stat, min_stat); ++ gssutil.display_status((char*)"unsealing message", maj_stat, min_stat); + if(xmit_buf.value) { + free(xmit_buf.value); + xmit_buf.value = 0; +@@ -644,7 +643,7 @@ void TCPSessGSSClose(tcps_sess_t* pSess) + context = &pGSess->gss_context; + maj_stat = gss_delete_sec_context(&min_stat, context, GSS_C_NO_BUFFER); + if (maj_stat != GSS_S_COMPLETE) +- gssutil.display_status("deleting context", maj_stat, min_stat); ++ gssutil.display_status((char*)"deleting context", maj_stat, min_stat); + *context = GSS_C_NO_CONTEXT; + pGSess->gss_flags = 0; + pGSess->allowedMethods = 0; +@@ -665,7 +664,7 @@ TCPSessGSSDeinit(void) + if (gss_server_creds != GSS_C_NO_CREDENTIAL) { + maj_stat = gss_release_cred(&min_stat, &gss_server_creds); + if (maj_stat != GSS_S_COMPLETE) +- gssutil.display_status("releasing credentials", maj_stat, min_stat); ++ gssutil.display_status((char*)"releasing credentials", maj_stat, min_stat); + } + RETiRet; + } +-- +2.13.6 + diff --git a/rsyslog.spec b/rsyslog.spec index b6dc55f..68b3098 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -15,8 +15,8 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog -Version: 8.29.0 -Release: 2%{?dist} +Version: 8.30.0 +Release: 1%{?dist} License: (GPLv3+ and ASL 2.0) Group: System Environment/Daemons URL: http://www.rsyslog.com/ @@ -56,6 +56,7 @@ Obsoletes: sysklogd < 1.5-11 # tweak the upstream service file to honour configuration from /etc/sysconfig/rsyslog Patch0: rsyslog-8.8.0-sd-service.patch Patch1: rsyslog-8.23.0-msg_c_nonoverwrite_merge.patch +Patch2: rsyslog-8.30.0-imgssapi-compile-error.patch %package crypto Summary: Encryption support @@ -276,6 +277,7 @@ mv build doc %setup -q -D %patch0 -p1 %patch1 -p1 +%patch2 -p1 autoreconf -iv @@ -533,6 +535,10 @@ done %{_libdir}/rsyslog/omkafka.so %changelog +* Mon Oct 23 2017 Radovan Sroka - 8.30.0-1 +- rebase to 8.30.0 +- added patch that resolves imgssapi compilation errors + * Tue Aug 15 2017 Radovan Sroka - 8.29.0-2 - rebuild, bumped release number diff --git a/sources b/sources index 9913b63..22fdd70 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (rsyslog-8.29.0.tar.gz) = 6e0a69f2ac36fcfd0714b2b7053bd263ca8875d2aba7ad6452223eb8677edfa1cf4978989661614dd65dd1822f0123599d565679c8faa3960f136c8d9472e952 -SHA512 (rsyslog-doc-8.29.0.tar.gz) = 791633b93693c1eacde965e07ced863b96d1bfa488fc5c4770424825ab702cae7babd5286e552da5e17d1d7779f228c61a1527b9726dffea31bbb3b4e80525dc +SHA512 (rsyslog-8.30.0.tar.gz) = 90e172d08ba7548252fc9744f71259dadf5a40afef405516e7b1601620913ca4b2ffc4859b16f369b9c1974ea10f4e41bc2d987e3d6bf9aabeb979f7de6aefe0 +SHA512 (rsyslog-doc-8.30.0.tar.gz) = 8068bb9bb8408447bff49730e9aac105eab1bd610592dd524e7639b668b2d05a4836d3a9862622445a0bb8d8b140db67c861dad6ec207d11049ac368e363684d From c7bd68399bc1d08ea9d8f94a861bdc91d12b59f1 Mon Sep 17 00:00:00 2001 From: Radovan Sroka Date: Wed, 25 Oct 2017 13:29:25 +0200 Subject: [PATCH 02/99] Fixed imjournal module - imjournal didn't work at all - added imjournal patch for rhbz#1505853 --- rsyslog-8.30.0-imjournal-fix.patch | 77 ++++++++++++++++++++++++++++++ rsyslog.spec | 8 +++- 2 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 rsyslog-8.30.0-imjournal-fix.patch diff --git a/rsyslog-8.30.0-imjournal-fix.patch b/rsyslog-8.30.0-imjournal-fix.patch new file mode 100644 index 0000000..a786b8c --- /dev/null +++ b/rsyslog-8.30.0-imjournal-fix.patch @@ -0,0 +1,77 @@ +From 4736e53d471ac45024333588fcdf5bce5f8c61b8 Mon Sep 17 00:00:00 2001 +From: Rainer Gerhards +Date: Wed, 25 Oct 2017 11:09:40 +0200 +Subject: [PATCH] imjournal bugfix: module did not work at all + +The open function was broken by commit 92ac801 (v8.30.0), +resulting in no data being ever read from the journal. + +patch bases on the idea of Radovan Sroka given here: +https://github.com/rsyslog/rsyslog/issues/1895#issuecomment-339017357 +but follows the current imjournal-paradigm of having the journal +handle inside a global variable. + +see also https://github.com/rsyslog/rsyslog/issues/1895 +closes https://github.com/rsyslog/rsyslog/issues/1897 +--- + plugins/imjournal/imjournal.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/plugins/imjournal/imjournal.c b/plugins/imjournal/imjournal.c +index 8f043d5e1..2f1569837 100644 +--- a/plugins/imjournal/imjournal.c ++++ b/plugins/imjournal/imjournal.c +@@ -118,20 +118,20 @@ static sd_journal *j; + static rsRetVal persistJournalState(void); + static rsRetVal loadJournalState(void); + +-static rsRetVal openJournal(sd_journal* jj) { ++static rsRetVal openJournal(void) { + DEFiRet; + +- if (sd_journal_open(&jj, SD_JOURNAL_LOCAL_ONLY) < 0) ++ if (sd_journal_open(&j, SD_JOURNAL_LOCAL_ONLY) < 0) + iRet = RS_RET_IO_ERROR; + RETiRet; + } + +-static void closeJournal(sd_journal* jj) { ++static void closeJournal(void) { + + if (cs.stateFile) { /* can't persist without a state file */ + persistJournalState(); + } +- sd_journal_close(jj); ++ sd_journal_close(j); + } + + +@@ -513,10 +513,10 @@ pollJournal(void) + /* do not persist stateFile sd_journal_get_cursor will fail! */ + char* tmp = cs.stateFile; + cs.stateFile = NULL; +- closeJournal(j); ++ closeJournal(); + cs.stateFile = tmp; + +- iRet = openJournal(j); ++ iRet = openJournal(); + if (iRet != RS_RET_OK) { + char errStr[256]; + rs_strerror_r(errno, errStr, sizeof(errStr)); +@@ -773,13 +773,13 @@ ENDfreeCnf + /* open journal */ + BEGINwillRun + CODESTARTwillRun +- iRet = openJournal(j); ++ iRet = openJournal(); + ENDwillRun + + /* close journal */ + BEGINafterRun + CODESTARTafterRun +- closeJournal(j); ++ closeJournal(); + ratelimitDestruct(ratelimiter); + ENDafterRun + diff --git a/rsyslog.spec b/rsyslog.spec index 68b3098..f629339 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -16,7 +16,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.30.0 -Release: 1%{?dist} +Release: 2%{?dist} License: (GPLv3+ and ASL 2.0) Group: System Environment/Daemons URL: http://www.rsyslog.com/ @@ -57,6 +57,7 @@ Obsoletes: sysklogd < 1.5-11 Patch0: rsyslog-8.8.0-sd-service.patch Patch1: rsyslog-8.23.0-msg_c_nonoverwrite_merge.patch Patch2: rsyslog-8.30.0-imgssapi-compile-error.patch +Patch3: rsyslog-8.30.0-imjournal-fix.patch %package crypto Summary: Encryption support @@ -278,6 +279,7 @@ mv build doc %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 autoreconf -iv @@ -535,6 +537,10 @@ done %{_libdir}/rsyslog/omkafka.so %changelog +* Wed Oct 25 2017 Radovan Sroka - 8.30.0-2 +- imjournal didn't work at all +- added imjournal patch for rhbz#1505853 + * Mon Oct 23 2017 Radovan Sroka - 8.30.0-1 - rebase to 8.30.0 - added patch that resolves imgssapi compilation errors From 08a4e12c2ee13611e5cdd1fcffe1a62abea8e388 Mon Sep 17 00:00:00 2001 From: Radovan Sroka Date: Wed, 25 Oct 2017 13:46:39 +0200 Subject: [PATCH 03/99] Rebuild --- rsyslog.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rsyslog.spec b/rsyslog.spec index f629339..0486151 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -16,7 +16,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.30.0 -Release: 2%{?dist} +Release: 3%{?dist} License: (GPLv3+ and ASL 2.0) Group: System Environment/Daemons URL: http://www.rsyslog.com/ @@ -537,6 +537,9 @@ done %{_libdir}/rsyslog/omkafka.so %changelog +* Wed Oct 25 2017 Radovan Sroka - 8.30.0-3 +- rebuild + * Wed Oct 25 2017 Radovan Sroka - 8.30.0-2 - imjournal didn't work at all - added imjournal patch for rhbz#1505853 From 507efa3de7d7e91841ed67117f6a719e554485d1 Mon Sep 17 00:00:00 2001 From: Jiri Vymazal Date: Tue, 28 Nov 2017 13:47:44 +0100 Subject: [PATCH 04/99] changed rsyslog-doc to noarch --- rsyslog.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rsyslog.spec b/rsyslog.spec index 0486151..e58b2ce 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -67,6 +67,7 @@ Requires: %name = %version-%release %package doc Summary: HTML documentation for rsyslog Group: Documentation +BuildArch: noarch %package elasticsearch Summary: ElasticSearch output module for rsyslog @@ -537,6 +538,9 @@ done %{_libdir}/rsyslog/omkafka.so %changelog +* Tue Nov 28 2017 Jiri Vymazal - 8.30.0-3 +- changed rsyslog-doc to noarch + * Wed Oct 25 2017 Radovan Sroka - 8.30.0-3 - rebuild From c75de835514cf3d4cb428418372d50da5f560135 Mon Sep 17 00:00:00 2001 From: Radovan Sroka Date: Thu, 14 Dec 2017 13:32:02 +0100 Subject: [PATCH 05/99] Update to 8.31.0 - removed upstreamed patches - added dependecies mongo-c-driver-devel snappy-devel - removed depricated dependecies libmongo-client - mongodb plugin now uses new driver with TLS,... --- .gitignore | 2 ++ rsyslog.spec | 24 ++++++++++++++---------- sources | 4 ++-- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 3b6963e..1e7c37b 100644 --- a/.gitignore +++ b/.gitignore @@ -45,3 +45,5 @@ rsyslog-4.6.3.tar.gz /rsyslog-doc-8.29.0.tar.gz /rsyslog-8.30.0.tar.gz /rsyslog-doc-8.30.0.tar.gz +/rsyslog-8.31.0.tar.gz +/rsyslog-doc-8.31.0.tar.gz diff --git a/rsyslog.spec b/rsyslog.spec index e58b2ce..f84a029 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -15,8 +15,8 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog -Version: 8.30.0 -Release: 3%{?dist} +Version: 8.31.0 +Release: 1%{?dist} License: (GPLv3+ and ASL 2.0) Group: System Environment/Daemons URL: http://www.rsyslog.com/ @@ -55,9 +55,6 @@ Obsoletes: sysklogd < 1.5-11 # tweak the upstream service file to honour configuration from /etc/sysconfig/rsyslog Patch0: rsyslog-8.8.0-sd-service.patch -Patch1: rsyslog-8.23.0-msg_c_nonoverwrite_merge.patch -Patch2: rsyslog-8.30.0-imgssapi-compile-error.patch -Patch3: rsyslog-8.30.0-imjournal-fix.patch %package crypto Summary: Encryption support @@ -121,7 +118,7 @@ BuildRequires: mysql-devel >= 4.0 Summary: MongoDB support for rsyslog Group: System Environment/Daemons Requires: %name = %version-%release -BuildRequires: libmongo-client-devel +BuildRequires: mongo-c-driver-devel snappy-devel %endif %package pgsql @@ -278,9 +275,9 @@ mv build doc # set up rsyslog sources %setup -q -D %patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 +#%patch1 -p1 +#%patch2 -p1 +#%patch3 -p1 autoreconf -iv @@ -538,7 +535,14 @@ done %{_libdir}/rsyslog/omkafka.so %changelog -* Tue Nov 28 2017 Jiri Vymazal - 8.30.0-3 +* Thu Dec 14 2017 Radovan Sroka - 8.31.0-1 +- update to 8.31.0 +- removed upstreamed patches +- added dependecies mongo-c-driver-devel snappy-devel +- removed depricated dependecies libmongo-client +- mongodb plugin now uses new driver with TLS,... + +* Tue Nov 28 2017 Jiri Vymazal - 8.30.0-4 - changed rsyslog-doc to noarch * Wed Oct 25 2017 Radovan Sroka - 8.30.0-3 diff --git a/sources b/sources index 22fdd70..b996447 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (rsyslog-8.30.0.tar.gz) = 90e172d08ba7548252fc9744f71259dadf5a40afef405516e7b1601620913ca4b2ffc4859b16f369b9c1974ea10f4e41bc2d987e3d6bf9aabeb979f7de6aefe0 -SHA512 (rsyslog-doc-8.30.0.tar.gz) = 8068bb9bb8408447bff49730e9aac105eab1bd610592dd524e7639b668b2d05a4836d3a9862622445a0bb8d8b140db67c861dad6ec207d11049ac368e363684d +SHA512 (rsyslog-8.31.0.tar.gz) = aab888dda8df3ad7ff404767a58539cdc0bb92d0e537b703cf5833555688dd6d8223889b8d70bf8c594339a51831b57df7a65b397d8b40cded608dfb007befe7 +SHA512 (rsyslog-doc-8.31.0.tar.gz) = 51a63fa520d8176e183afa44ccf889374810dddfd5fdb363ed06b134bfbe0d1a94085e4836cf3bb2a07cb83564bbb87cef3763ac9429a5efc50aff276542defa From 69e718297d7f39bca6e1472ea2c8967ba0f12edc Mon Sep 17 00:00:00 2001 From: Radovan Sroka Date: Thu, 14 Dec 2017 14:03:50 +0100 Subject: [PATCH 06/99] Added also cyrus-sasl-devel dependency --- rsyslog.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rsyslog.spec b/rsyslog.spec index f84a029..01fb798 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -16,7 +16,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.31.0 -Release: 1%{?dist} +Release: 2%{?dist} License: (GPLv3+ and ASL 2.0) Group: System Environment/Daemons URL: http://www.rsyslog.com/ @@ -118,7 +118,7 @@ BuildRequires: mysql-devel >= 4.0 Summary: MongoDB support for rsyslog Group: System Environment/Daemons Requires: %name = %version-%release -BuildRequires: mongo-c-driver-devel snappy-devel +BuildRequires: mongo-c-driver-devel snappy-devel cyrus-sasl-devel %endif %package pgsql @@ -535,6 +535,9 @@ done %{_libdir}/rsyslog/omkafka.so %changelog +* Thu Dec 14 2017 Radovan Sroka - 8.31.0-2 +- added also cyrus-sasl-devel dependency + * Thu Dec 14 2017 Radovan Sroka - 8.31.0-1 - update to 8.31.0 - removed upstreamed patches From 6b04df01e02e12fd2e31956cbeffdf8365efd798 Mon Sep 17 00:00:00 2001 From: Radovan Sroka Date: Thu, 17 May 2018 10:57:39 +0200 Subject: [PATCH 07/99] rebase to 8.35.0 --- .gitignore | 2 ++ rsyslog.spec | 9 ++++++--- sources | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 06e8815..ae91f6e 100644 --- a/.gitignore +++ b/.gitignore @@ -51,3 +51,5 @@ rsyslog-4.6.3.tar.gz /rsyslog-8.32.0.tar.gz /rsyslog-doc-8.34.0.tar.gz /rsyslog-8.34.0.tar.gz +/rsyslog-8.35.0.tar.gz +/rsyslog-doc-8.35.0.tar.gz diff --git a/rsyslog.spec b/rsyslog.spec index 7179be9..b892075 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -15,7 +15,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog -Version: 8.34.0 +Version: 8.35.0 Release: 1%{?dist} License: (GPLv3+ and ASL 2.0) Group: System Environment/Daemons @@ -323,6 +323,7 @@ export HIREDIS_LIBS="-L%{_libdir} -lhiredis" --enable-mmanon \ --enable-mmaudit \ --enable-mmcount \ + --enable-mmkubernetes \ --enable-mmjsonparse \ --enable-mmnormalize \ --enable-mmsnmptrapd \ @@ -349,8 +350,7 @@ export HIREDIS_LIBS="-L%{_libdir} -lhiredis" --enable-snmp \ --enable-unlimited-select \ --enable-usertools \ - --enable-omkafka \ - --enable-mmkubernetes \ + --enable-omkafka make V=1 @@ -526,6 +526,9 @@ done %{_libdir}/rsyslog/mmkubernetes.so %changelog +* Thu May 17 2018 Radovan Sroka - 8.35.0 +- rebase to 8.35.0 + * Thu Apr 05 2018 Jiri Vymazal - 8.34.0-1 - rebase to 8.34.0 - added mmkubernetes module diff --git a/sources b/sources index 2599b7d..a3ec2f7 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (rsyslog-doc-8.34.0.tar.gz) = edf9aa63c777624c3dc27dfd64b38893b9b4c9b56941df1d7a8c6bc3cb4cbbfb83e8c356cbefeab7c688ecb6017b66ed99931cb71b69b7c927b4743548dd40d4 -SHA512 (rsyslog-8.34.0.tar.gz) = 69eaececa2f8b98799deac8e6cb2cf635a5117da7a21cbb0b880b7df1d83c6ccf16133dab099a6e5fb865f34c2dad164a1bf1952d16ca116af3b1dd35d15065e +SHA512 (rsyslog-8.35.0.tar.gz) = 3b8845fc057147c2dd740b3bb432e7fb101ad60be5c6bc86a2c2796bcd3f3526c617d45b9e8301388d51047a125ca18ba4ac54f8be2a13eabbbe8fb9361beecc +SHA512 (rsyslog-doc-8.35.0.tar.gz) = f78d0451eef789d60f7c5ae1eed46c4a9f7a6ade73b829f65aa2373aa786b00e84e8957089532b1b652838bd9f62b41d92530276a0d27e21b8e94d5f0e4728a6 From 224bceb301992ebf302cc3f6cb90fa0893260fe5 Mon Sep 17 00:00:00 2001 From: Radovan Sroka Date: Thu, 17 May 2018 11:06:52 +0200 Subject: [PATCH 08/99] Added fmhash.so file --- rsyslog.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/rsyslog.spec b/rsyslog.spec index b892075..c904957 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -449,6 +449,7 @@ done %{_libdir}/rsyslog/pmlastmsg.so %{_libdir}/rsyslog/pmsnare.so %{_libdir}/rsyslog/fmhttp.so +%{_libdir}/rsyslog/fmhash.so %files crypto %{_bindir}/rscryutil From 8a36b667d41b38fea9bde0c14d9258b7131df645 Mon Sep 17 00:00:00 2001 From: Radovan Sroka Date: Thu, 17 May 2018 11:10:49 +0200 Subject: [PATCH 09/99] Bumped release number --- rsyslog.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rsyslog.spec b/rsyslog.spec index c904957..0e9cf7e 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -16,7 +16,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.35.0 -Release: 1%{?dist} +Release: 2%{?dist} License: (GPLv3+ and ASL 2.0) Group: System Environment/Daemons URL: http://www.rsyslog.com/ @@ -527,7 +527,7 @@ done %{_libdir}/rsyslog/mmkubernetes.so %changelog -* Thu May 17 2018 Radovan Sroka - 8.35.0 +* Thu May 17 2018 Radovan Sroka - 8.35.0-2 - rebase to 8.35.0 * Thu Apr 05 2018 Jiri Vymazal - 8.34.0-1 From 92853018cbb55333e20149b47c92689a9e201c2c Mon Sep 17 00:00:00 2001 From: Radovan Sroka Date: Thu, 17 May 2018 10:57:39 +0200 Subject: [PATCH 10/99] rebase to 8.35.0 --- .gitignore | 2 ++ rsyslog.spec | 9 ++++++--- sources | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 06e8815..ae91f6e 100644 --- a/.gitignore +++ b/.gitignore @@ -51,3 +51,5 @@ rsyslog-4.6.3.tar.gz /rsyslog-8.32.0.tar.gz /rsyslog-doc-8.34.0.tar.gz /rsyslog-8.34.0.tar.gz +/rsyslog-8.35.0.tar.gz +/rsyslog-doc-8.35.0.tar.gz diff --git a/rsyslog.spec b/rsyslog.spec index 7179be9..b892075 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -15,7 +15,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog -Version: 8.34.0 +Version: 8.35.0 Release: 1%{?dist} License: (GPLv3+ and ASL 2.0) Group: System Environment/Daemons @@ -323,6 +323,7 @@ export HIREDIS_LIBS="-L%{_libdir} -lhiredis" --enable-mmanon \ --enable-mmaudit \ --enable-mmcount \ + --enable-mmkubernetes \ --enable-mmjsonparse \ --enable-mmnormalize \ --enable-mmsnmptrapd \ @@ -349,8 +350,7 @@ export HIREDIS_LIBS="-L%{_libdir} -lhiredis" --enable-snmp \ --enable-unlimited-select \ --enable-usertools \ - --enable-omkafka \ - --enable-mmkubernetes \ + --enable-omkafka make V=1 @@ -526,6 +526,9 @@ done %{_libdir}/rsyslog/mmkubernetes.so %changelog +* Thu May 17 2018 Radovan Sroka - 8.35.0 +- rebase to 8.35.0 + * Thu Apr 05 2018 Jiri Vymazal - 8.34.0-1 - rebase to 8.34.0 - added mmkubernetes module diff --git a/sources b/sources index 2599b7d..a3ec2f7 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (rsyslog-doc-8.34.0.tar.gz) = edf9aa63c777624c3dc27dfd64b38893b9b4c9b56941df1d7a8c6bc3cb4cbbfb83e8c356cbefeab7c688ecb6017b66ed99931cb71b69b7c927b4743548dd40d4 -SHA512 (rsyslog-8.34.0.tar.gz) = 69eaececa2f8b98799deac8e6cb2cf635a5117da7a21cbb0b880b7df1d83c6ccf16133dab099a6e5fb865f34c2dad164a1bf1952d16ca116af3b1dd35d15065e +SHA512 (rsyslog-8.35.0.tar.gz) = 3b8845fc057147c2dd740b3bb432e7fb101ad60be5c6bc86a2c2796bcd3f3526c617d45b9e8301388d51047a125ca18ba4ac54f8be2a13eabbbe8fb9361beecc +SHA512 (rsyslog-doc-8.35.0.tar.gz) = f78d0451eef789d60f7c5ae1eed46c4a9f7a6ade73b829f65aa2373aa786b00e84e8957089532b1b652838bd9f62b41d92530276a0d27e21b8e94d5f0e4728a6 From 6c3f95e8306edc1c80f3933ef9048c88ea6aabf6 Mon Sep 17 00:00:00 2001 From: Radovan Sroka Date: Thu, 17 May 2018 11:06:52 +0200 Subject: [PATCH 11/99] Added fmhash.so file --- rsyslog.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/rsyslog.spec b/rsyslog.spec index b892075..c904957 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -449,6 +449,7 @@ done %{_libdir}/rsyslog/pmlastmsg.so %{_libdir}/rsyslog/pmsnare.so %{_libdir}/rsyslog/fmhttp.so +%{_libdir}/rsyslog/fmhash.so %files crypto %{_bindir}/rscryutil From 695d95b0f2ebb593100e050d3bac280985c3d69a Mon Sep 17 00:00:00 2001 From: Radovan Sroka Date: Thu, 17 May 2018 11:10:49 +0200 Subject: [PATCH 12/99] Bumped release number --- rsyslog.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rsyslog.spec b/rsyslog.spec index c904957..0e9cf7e 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -16,7 +16,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.35.0 -Release: 1%{?dist} +Release: 2%{?dist} License: (GPLv3+ and ASL 2.0) Group: System Environment/Daemons URL: http://www.rsyslog.com/ @@ -527,7 +527,7 @@ done %{_libdir}/rsyslog/mmkubernetes.so %changelog -* Thu May 17 2018 Radovan Sroka - 8.35.0 +* Thu May 17 2018 Radovan Sroka - 8.35.0-2 - rebase to 8.35.0 * Thu Apr 05 2018 Jiri Vymazal - 8.34.0-1 From f788eda2f2fdd8f8f789b3fab02944b97137bdec Mon Sep 17 00:00:00 2001 From: Jiri Vymazal Date: Mon, 2 Jul 2018 16:58:09 +0200 Subject: [PATCH 13/99] removed old unused patch files --- rsyslog-8.30.0-imgssapi-compile-error.patch | 128 -------------------- rsyslog-8.30.0-imjournal-fix.patch | 77 ------------ 2 files changed, 205 deletions(-) delete mode 100644 rsyslog-8.30.0-imgssapi-compile-error.patch delete mode 100644 rsyslog-8.30.0-imjournal-fix.patch diff --git a/rsyslog-8.30.0-imgssapi-compile-error.patch b/rsyslog-8.30.0-imgssapi-compile-error.patch deleted file mode 100644 index 8427aea..0000000 --- a/rsyslog-8.30.0-imgssapi-compile-error.patch +++ /dev/null @@ -1,128 +0,0 @@ -From 8d793eafdde0b74d0b4424f0d194b5dc6801a5d1 Mon Sep 17 00:00:00 2001 -From: Rainer Gerhards -Date: Tue, 17 Oct 2017 17:34:49 +0200 -Subject: [PATCH] imgssapi: fix compiler warnings - ---- - plugins/imgssapi/imgssapi.c | 25 ++++++++++++------------- - 1 file changed, 12 insertions(+), 13 deletions(-) - -diff --git a/plugins/imgssapi/imgssapi.c b/plugins/imgssapi/imgssapi.c -index aafce7d2..836931c7 100644 ---- a/plugins/imgssapi/imgssapi.c -+++ b/plugins/imgssapi/imgssapi.c -@@ -9,7 +9,7 @@ - * NOTE: read comments in module-template.h to understand how this file - * works! - * -- * Copyright 2007, 2014 Rainer Gerhards and Adiscon GmbH. -+ * Copyright 2007, 2017 Rainer Gerhards and Adiscon GmbH. - * - * This file is part of rsyslog. - * -@@ -63,7 +63,6 @@ - - MODULE_TYPE_INPUT - MODULE_TYPE_NOKEEP --MODULE_CNFNAME("imgssapi") - - /* defines */ - #define ALLOWEDMETHOD_GSS 2 -@@ -162,7 +161,7 @@ OnSessDestruct(void *ppUsr) - OM_uint32 maj_stat, min_stat; - maj_stat = gss_delete_sec_context(&min_stat, &(*ppGSess)->gss_context, GSS_C_NO_BUFFER); - if (maj_stat != GSS_S_COMPLETE) -- gssutil.display_status("deleting context", maj_stat, min_stat); -+ gssutil.display_status((char*)"deleting context", maj_stat, min_stat); - } - - free(*ppGSess); -@@ -291,7 +290,7 @@ finalize_it: - - - static rsRetVal --doRcvData(tcps_sess_t *pSess, char *buf, size_t lenBuf, ssize_t *piLenRcvd) -+doRcvData(tcps_sess_t *pSess, char *buf, size_t lenBuf, ssize_t *piLenRcvd, int *const oserr) - { - DEFiRet; - int allowedMethods; -@@ -307,7 +306,7 @@ doRcvData(tcps_sess_t *pSess, char *buf, size_t lenBuf, ssize_t *piLenRcvd) - CHKiRet(TCPSessGSSRecv(pSess, buf, lenBuf, piLenRcvd)); - } else { - *piLenRcvd = lenBuf; -- CHKiRet(netstrm.Rcv(pSess->pStrm, (uchar*) buf, piLenRcvd) != RS_RET_OK); -+ CHKiRet(netstrm.Rcv(pSess->pStrm, (uchar*) buf, piLenRcvd, oserr)); - } - - finalize_it: -@@ -380,11 +379,11 @@ static int TCPSessGSSInit(void) - if (gss_server_creds != GSS_C_NO_CREDENTIAL) - return 0; - -- name_buf.value = (gss_listen_service_name == NULL) ? "host" : gss_listen_service_name; -+ name_buf.value = (gss_listen_service_name == NULL) ? (char*)"host" : gss_listen_service_name; - name_buf.length = strlen(name_buf.value) + 1; - maj_stat = gss_import_name(&min_stat, &name_buf, GSS_C_NT_HOSTBASED_SERVICE, &server_name); - if (maj_stat != GSS_S_COMPLETE) { -- gssutil.display_status("importing name", maj_stat, min_stat); -+ gssutil.display_status((char*)"importing name", maj_stat, min_stat); - return -1; - } - -@@ -392,7 +391,7 @@ static int TCPSessGSSInit(void) - GSS_C_NULL_OID_SET, GSS_C_ACCEPT, - &gss_server_creds, NULL, NULL); - if (maj_stat != GSS_S_COMPLETE) { -- gssutil.display_status("acquiring credentials", maj_stat, min_stat); -+ gssutil.display_status((char*)"acquiring credentials", maj_stat, min_stat); - return -1; - } - -@@ -549,7 +548,7 @@ OnSessAcceptGSS(tcpsrv_t *pThis, tcps_sess_t *pSess) - pGSess->allowedMethods = ALLOWEDMETHOD_TCP; - ABORT_FINALIZE(RS_RET_OK); // TODO: define good error codes - } -- gssutil.display_status("accepting context", maj_stat, acc_sec_min_stat); -+ gssutil.display_status((char*)"accepting context", maj_stat, acc_sec_min_stat); - ABORT_FINALIZE(RS_RET_ERR); // TODO: define good error codes - } - if (send_tok.length != 0) { -@@ -566,7 +565,7 @@ OnSessAcceptGSS(tcpsrv_t *pThis, tcps_sess_t *pSess) - - maj_stat = gss_display_name(&min_stat, client, &recv_tok, NULL); - if (maj_stat != GSS_S_COMPLETE) { -- gssutil.display_status("displaying name", maj_stat, min_stat); -+ gssutil.display_status((char*)"displaying name", maj_stat, min_stat); - } else { - dbgprintf("GSS-API Accepted connection from peer %s: %s\n", (char *)pszPeer, (char*) recv_tok.value); - } -@@ -608,7 +607,7 @@ int TCPSessGSSRecv(tcps_sess_t *pSess, void *buf, size_t buf_len, ssize_t *piLen - maj_stat = gss_unwrap(&min_stat, *context, &xmit_buf, &msg_buf, - &conf_state, (gss_qop_t *) NULL); - if(maj_stat != GSS_S_COMPLETE) { -- gssutil.display_status("unsealing message", maj_stat, min_stat); -+ gssutil.display_status((char*)"unsealing message", maj_stat, min_stat); - if(xmit_buf.value) { - free(xmit_buf.value); - xmit_buf.value = 0; -@@ -644,7 +643,7 @@ void TCPSessGSSClose(tcps_sess_t* pSess) - context = &pGSess->gss_context; - maj_stat = gss_delete_sec_context(&min_stat, context, GSS_C_NO_BUFFER); - if (maj_stat != GSS_S_COMPLETE) -- gssutil.display_status("deleting context", maj_stat, min_stat); -+ gssutil.display_status((char*)"deleting context", maj_stat, min_stat); - *context = GSS_C_NO_CONTEXT; - pGSess->gss_flags = 0; - pGSess->allowedMethods = 0; -@@ -665,7 +664,7 @@ TCPSessGSSDeinit(void) - if (gss_server_creds != GSS_C_NO_CREDENTIAL) { - maj_stat = gss_release_cred(&min_stat, &gss_server_creds); - if (maj_stat != GSS_S_COMPLETE) -- gssutil.display_status("releasing credentials", maj_stat, min_stat); -+ gssutil.display_status((char*)"releasing credentials", maj_stat, min_stat); - } - RETiRet; - } --- -2.13.6 - diff --git a/rsyslog-8.30.0-imjournal-fix.patch b/rsyslog-8.30.0-imjournal-fix.patch deleted file mode 100644 index a786b8c..0000000 --- a/rsyslog-8.30.0-imjournal-fix.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 4736e53d471ac45024333588fcdf5bce5f8c61b8 Mon Sep 17 00:00:00 2001 -From: Rainer Gerhards -Date: Wed, 25 Oct 2017 11:09:40 +0200 -Subject: [PATCH] imjournal bugfix: module did not work at all - -The open function was broken by commit 92ac801 (v8.30.0), -resulting in no data being ever read from the journal. - -patch bases on the idea of Radovan Sroka given here: -https://github.com/rsyslog/rsyslog/issues/1895#issuecomment-339017357 -but follows the current imjournal-paradigm of having the journal -handle inside a global variable. - -see also https://github.com/rsyslog/rsyslog/issues/1895 -closes https://github.com/rsyslog/rsyslog/issues/1897 ---- - plugins/imjournal/imjournal.c | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) - -diff --git a/plugins/imjournal/imjournal.c b/plugins/imjournal/imjournal.c -index 8f043d5e1..2f1569837 100644 ---- a/plugins/imjournal/imjournal.c -+++ b/plugins/imjournal/imjournal.c -@@ -118,20 +118,20 @@ static sd_journal *j; - static rsRetVal persistJournalState(void); - static rsRetVal loadJournalState(void); - --static rsRetVal openJournal(sd_journal* jj) { -+static rsRetVal openJournal(void) { - DEFiRet; - -- if (sd_journal_open(&jj, SD_JOURNAL_LOCAL_ONLY) < 0) -+ if (sd_journal_open(&j, SD_JOURNAL_LOCAL_ONLY) < 0) - iRet = RS_RET_IO_ERROR; - RETiRet; - } - --static void closeJournal(sd_journal* jj) { -+static void closeJournal(void) { - - if (cs.stateFile) { /* can't persist without a state file */ - persistJournalState(); - } -- sd_journal_close(jj); -+ sd_journal_close(j); - } - - -@@ -513,10 +513,10 @@ pollJournal(void) - /* do not persist stateFile sd_journal_get_cursor will fail! */ - char* tmp = cs.stateFile; - cs.stateFile = NULL; -- closeJournal(j); -+ closeJournal(); - cs.stateFile = tmp; - -- iRet = openJournal(j); -+ iRet = openJournal(); - if (iRet != RS_RET_OK) { - char errStr[256]; - rs_strerror_r(errno, errStr, sizeof(errStr)); -@@ -773,13 +773,13 @@ ENDfreeCnf - /* open journal */ - BEGINwillRun - CODESTARTwillRun -- iRet = openJournal(j); -+ iRet = openJournal(); - ENDwillRun - - /* close journal */ - BEGINafterRun - CODESTARTafterRun -- closeJournal(j); -+ closeJournal(); - ratelimitDestruct(ratelimiter); - ENDafterRun - From 4d31f1884b4b8f2bb848a81226ba91026b2036f4 Mon Sep 17 00:00:00 2001 From: Jiri Vymazal Date: Wed, 8 Aug 2018 12:36:39 +0200 Subject: [PATCH 14/99] reverted python-docutils version --- rsyslog.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rsyslog.spec b/rsyslog.spec index 2385fcf..e7b6c5b 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -31,7 +31,7 @@ BuildRequires: libestr-devel >= 0.1.9 BuildRequires: libtool BuildRequires: libuuid-devel BuildRequires: pkgconfig -BuildRequires: python3-docutils +BuildRequires: python-docutils # make sure systemd is in a version that isn't affected by rhbz#974132 BuildRequires: systemd-devel >= 204-8 BuildRequires: zlib-devel From 6161c0c9fc34c115c49d19aefc1ab6a1b02b3cea Mon Sep 17 00:00:00 2001 From: Jiri Vymazal Date: Mon, 2 Jul 2018 16:55:09 +0200 Subject: [PATCH 15/99] removed unusued patch file --- rsyslog-8.23.0-msg_c_nonoverwrite_merge.patch | 65 ------------------- 1 file changed, 65 deletions(-) delete mode 100644 rsyslog-8.23.0-msg_c_nonoverwrite_merge.patch diff --git a/rsyslog-8.23.0-msg_c_nonoverwrite_merge.patch b/rsyslog-8.23.0-msg_c_nonoverwrite_merge.patch deleted file mode 100644 index 1ca26ff..0000000 --- a/rsyslog-8.23.0-msg_c_nonoverwrite_merge.patch +++ /dev/null @@ -1,65 +0,0 @@ -From fa7d98b0cb0512d84355e3aafdc5a3e366842f2a Mon Sep 17 00:00:00 2001 -From: Radovan Sroka -Date: Mon, 21 Nov 2016 13:38:18 +0100 -Subject: [PATCH 2/4] Rebased from: Patch2: - rsyslog-7.2.1-msg_c_nonoverwrite_merge.patch - -Resolves: - no adressed bugzila ---- - runtime/msg.c | 25 +++++++++++++++++++++++-- - 1 file changed, 23 insertions(+), 2 deletions(-) - -diff --git a/runtime/msg.c b/runtime/msg.c -index f6e017b..5430331 100644 ---- a/runtime/msg.c -+++ b/runtime/msg.c -@@ -4632,6 +4632,27 @@ finalize_it: - RETiRet; - } - -+static rsRetVal jsonMerge(struct json_object *existing, struct json_object *json); -+ -+static rsRetVal -+jsonMergeNonOverwrite(struct json_object *existing, struct json_object *json) -+{ -+ DEFiRet; -+ -+ struct json_object_iterator it = json_object_iter_begin(existing); -+ struct json_object_iterator itEnd = json_object_iter_end(existing); -+ while (!json_object_iter_equal(&it, &itEnd)) { -+ json_object_object_add(json, json_object_iter_peek_name(&it), -+ json_object_get(json_object_iter_peek_value(&it))); -+ json_object_iter_next(&it); -+ } -+ -+ CHKiRet(jsonMerge(existing, json)); -+finalize_it: -+ RETiRet; -+} -+ -+ - static rsRetVal - jsonMerge(struct json_object *existing, struct json_object *json) - { -@@ -4714,7 +4735,7 @@ msgAddJSON(msg_t * const pM, uchar *name, struct json_object *json, int force_re - if(*pjroot == NULL) - *pjroot = json; - else -- CHKiRet(jsonMerge(*pjroot, json)); -+ CHKiRet(jsonMergeNonOverwrite(*pjroot, json)); - } else { - if(*pjroot == NULL) { - /* now we need a root obj */ -@@ -4742,7 +4763,7 @@ msgAddJSON(msg_t * const pM, uchar *name, struct json_object *json, int force_re - json_object_object_add(parent, (char*)leaf, json); - } else { - if(json_object_get_type(json) == json_type_object) { -- CHKiRet(jsonMerge(*pjroot, json)); -+ CHKiRet(jsonMergeNonOverwrite(*pjroot, json)); - } else { - /* TODO: improve the code below, however, the current - * state is not really bad */ --- -2.7.4 - From a72c9c407d4adf094b06a510841a24959553235e Mon Sep 17 00:00:00 2001 From: Jiri Vymazal Date: Mon, 2 Jul 2018 16:58:09 +0200 Subject: [PATCH 16/99] removed old unused patch files --- rsyslog-8.30.0-imgssapi-compile-error.patch | 128 -------------------- rsyslog-8.30.0-imjournal-fix.patch | 77 ------------ 2 files changed, 205 deletions(-) delete mode 100644 rsyslog-8.30.0-imgssapi-compile-error.patch delete mode 100644 rsyslog-8.30.0-imjournal-fix.patch diff --git a/rsyslog-8.30.0-imgssapi-compile-error.patch b/rsyslog-8.30.0-imgssapi-compile-error.patch deleted file mode 100644 index 8427aea..0000000 --- a/rsyslog-8.30.0-imgssapi-compile-error.patch +++ /dev/null @@ -1,128 +0,0 @@ -From 8d793eafdde0b74d0b4424f0d194b5dc6801a5d1 Mon Sep 17 00:00:00 2001 -From: Rainer Gerhards -Date: Tue, 17 Oct 2017 17:34:49 +0200 -Subject: [PATCH] imgssapi: fix compiler warnings - ---- - plugins/imgssapi/imgssapi.c | 25 ++++++++++++------------- - 1 file changed, 12 insertions(+), 13 deletions(-) - -diff --git a/plugins/imgssapi/imgssapi.c b/plugins/imgssapi/imgssapi.c -index aafce7d2..836931c7 100644 ---- a/plugins/imgssapi/imgssapi.c -+++ b/plugins/imgssapi/imgssapi.c -@@ -9,7 +9,7 @@ - * NOTE: read comments in module-template.h to understand how this file - * works! - * -- * Copyright 2007, 2014 Rainer Gerhards and Adiscon GmbH. -+ * Copyright 2007, 2017 Rainer Gerhards and Adiscon GmbH. - * - * This file is part of rsyslog. - * -@@ -63,7 +63,6 @@ - - MODULE_TYPE_INPUT - MODULE_TYPE_NOKEEP --MODULE_CNFNAME("imgssapi") - - /* defines */ - #define ALLOWEDMETHOD_GSS 2 -@@ -162,7 +161,7 @@ OnSessDestruct(void *ppUsr) - OM_uint32 maj_stat, min_stat; - maj_stat = gss_delete_sec_context(&min_stat, &(*ppGSess)->gss_context, GSS_C_NO_BUFFER); - if (maj_stat != GSS_S_COMPLETE) -- gssutil.display_status("deleting context", maj_stat, min_stat); -+ gssutil.display_status((char*)"deleting context", maj_stat, min_stat); - } - - free(*ppGSess); -@@ -291,7 +290,7 @@ finalize_it: - - - static rsRetVal --doRcvData(tcps_sess_t *pSess, char *buf, size_t lenBuf, ssize_t *piLenRcvd) -+doRcvData(tcps_sess_t *pSess, char *buf, size_t lenBuf, ssize_t *piLenRcvd, int *const oserr) - { - DEFiRet; - int allowedMethods; -@@ -307,7 +306,7 @@ doRcvData(tcps_sess_t *pSess, char *buf, size_t lenBuf, ssize_t *piLenRcvd) - CHKiRet(TCPSessGSSRecv(pSess, buf, lenBuf, piLenRcvd)); - } else { - *piLenRcvd = lenBuf; -- CHKiRet(netstrm.Rcv(pSess->pStrm, (uchar*) buf, piLenRcvd) != RS_RET_OK); -+ CHKiRet(netstrm.Rcv(pSess->pStrm, (uchar*) buf, piLenRcvd, oserr)); - } - - finalize_it: -@@ -380,11 +379,11 @@ static int TCPSessGSSInit(void) - if (gss_server_creds != GSS_C_NO_CREDENTIAL) - return 0; - -- name_buf.value = (gss_listen_service_name == NULL) ? "host" : gss_listen_service_name; -+ name_buf.value = (gss_listen_service_name == NULL) ? (char*)"host" : gss_listen_service_name; - name_buf.length = strlen(name_buf.value) + 1; - maj_stat = gss_import_name(&min_stat, &name_buf, GSS_C_NT_HOSTBASED_SERVICE, &server_name); - if (maj_stat != GSS_S_COMPLETE) { -- gssutil.display_status("importing name", maj_stat, min_stat); -+ gssutil.display_status((char*)"importing name", maj_stat, min_stat); - return -1; - } - -@@ -392,7 +391,7 @@ static int TCPSessGSSInit(void) - GSS_C_NULL_OID_SET, GSS_C_ACCEPT, - &gss_server_creds, NULL, NULL); - if (maj_stat != GSS_S_COMPLETE) { -- gssutil.display_status("acquiring credentials", maj_stat, min_stat); -+ gssutil.display_status((char*)"acquiring credentials", maj_stat, min_stat); - return -1; - } - -@@ -549,7 +548,7 @@ OnSessAcceptGSS(tcpsrv_t *pThis, tcps_sess_t *pSess) - pGSess->allowedMethods = ALLOWEDMETHOD_TCP; - ABORT_FINALIZE(RS_RET_OK); // TODO: define good error codes - } -- gssutil.display_status("accepting context", maj_stat, acc_sec_min_stat); -+ gssutil.display_status((char*)"accepting context", maj_stat, acc_sec_min_stat); - ABORT_FINALIZE(RS_RET_ERR); // TODO: define good error codes - } - if (send_tok.length != 0) { -@@ -566,7 +565,7 @@ OnSessAcceptGSS(tcpsrv_t *pThis, tcps_sess_t *pSess) - - maj_stat = gss_display_name(&min_stat, client, &recv_tok, NULL); - if (maj_stat != GSS_S_COMPLETE) { -- gssutil.display_status("displaying name", maj_stat, min_stat); -+ gssutil.display_status((char*)"displaying name", maj_stat, min_stat); - } else { - dbgprintf("GSS-API Accepted connection from peer %s: %s\n", (char *)pszPeer, (char*) recv_tok.value); - } -@@ -608,7 +607,7 @@ int TCPSessGSSRecv(tcps_sess_t *pSess, void *buf, size_t buf_len, ssize_t *piLen - maj_stat = gss_unwrap(&min_stat, *context, &xmit_buf, &msg_buf, - &conf_state, (gss_qop_t *) NULL); - if(maj_stat != GSS_S_COMPLETE) { -- gssutil.display_status("unsealing message", maj_stat, min_stat); -+ gssutil.display_status((char*)"unsealing message", maj_stat, min_stat); - if(xmit_buf.value) { - free(xmit_buf.value); - xmit_buf.value = 0; -@@ -644,7 +643,7 @@ void TCPSessGSSClose(tcps_sess_t* pSess) - context = &pGSess->gss_context; - maj_stat = gss_delete_sec_context(&min_stat, context, GSS_C_NO_BUFFER); - if (maj_stat != GSS_S_COMPLETE) -- gssutil.display_status("deleting context", maj_stat, min_stat); -+ gssutil.display_status((char*)"deleting context", maj_stat, min_stat); - *context = GSS_C_NO_CONTEXT; - pGSess->gss_flags = 0; - pGSess->allowedMethods = 0; -@@ -665,7 +664,7 @@ TCPSessGSSDeinit(void) - if (gss_server_creds != GSS_C_NO_CREDENTIAL) { - maj_stat = gss_release_cred(&min_stat, &gss_server_creds); - if (maj_stat != GSS_S_COMPLETE) -- gssutil.display_status("releasing credentials", maj_stat, min_stat); -+ gssutil.display_status((char*)"releasing credentials", maj_stat, min_stat); - } - RETiRet; - } --- -2.13.6 - diff --git a/rsyslog-8.30.0-imjournal-fix.patch b/rsyslog-8.30.0-imjournal-fix.patch deleted file mode 100644 index a786b8c..0000000 --- a/rsyslog-8.30.0-imjournal-fix.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 4736e53d471ac45024333588fcdf5bce5f8c61b8 Mon Sep 17 00:00:00 2001 -From: Rainer Gerhards -Date: Wed, 25 Oct 2017 11:09:40 +0200 -Subject: [PATCH] imjournal bugfix: module did not work at all - -The open function was broken by commit 92ac801 (v8.30.0), -resulting in no data being ever read from the journal. - -patch bases on the idea of Radovan Sroka given here: -https://github.com/rsyslog/rsyslog/issues/1895#issuecomment-339017357 -but follows the current imjournal-paradigm of having the journal -handle inside a global variable. - -see also https://github.com/rsyslog/rsyslog/issues/1895 -closes https://github.com/rsyslog/rsyslog/issues/1897 ---- - plugins/imjournal/imjournal.c | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) - -diff --git a/plugins/imjournal/imjournal.c b/plugins/imjournal/imjournal.c -index 8f043d5e1..2f1569837 100644 ---- a/plugins/imjournal/imjournal.c -+++ b/plugins/imjournal/imjournal.c -@@ -118,20 +118,20 @@ static sd_journal *j; - static rsRetVal persistJournalState(void); - static rsRetVal loadJournalState(void); - --static rsRetVal openJournal(sd_journal* jj) { -+static rsRetVal openJournal(void) { - DEFiRet; - -- if (sd_journal_open(&jj, SD_JOURNAL_LOCAL_ONLY) < 0) -+ if (sd_journal_open(&j, SD_JOURNAL_LOCAL_ONLY) < 0) - iRet = RS_RET_IO_ERROR; - RETiRet; - } - --static void closeJournal(sd_journal* jj) { -+static void closeJournal(void) { - - if (cs.stateFile) { /* can't persist without a state file */ - persistJournalState(); - } -- sd_journal_close(jj); -+ sd_journal_close(j); - } - - -@@ -513,10 +513,10 @@ pollJournal(void) - /* do not persist stateFile sd_journal_get_cursor will fail! */ - char* tmp = cs.stateFile; - cs.stateFile = NULL; -- closeJournal(j); -+ closeJournal(); - cs.stateFile = tmp; - -- iRet = openJournal(j); -+ iRet = openJournal(); - if (iRet != RS_RET_OK) { - char errStr[256]; - rs_strerror_r(errno, errStr, sizeof(errStr)); -@@ -773,13 +773,13 @@ ENDfreeCnf - /* open journal */ - BEGINwillRun - CODESTARTwillRun -- iRet = openJournal(j); -+ iRet = openJournal(); - ENDwillRun - - /* close journal */ - BEGINafterRun - CODESTARTafterRun -- closeJournal(j); -+ closeJournal(); - ratelimitDestruct(ratelimiter); - ENDafterRun - From 8f97df78c1f0372803e4b7b356f2037b0a479ef8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 14 Jul 2018 03:46:38 +0000 Subject: [PATCH 17/99] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rsyslog.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rsyslog.spec b/rsyslog.spec index 9e394f6..a72e0b9 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -9,7 +9,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.36.0 -Release: 1%{?dist} +Release: 2%{?dist} License: (GPLv3+ and ASL 2.0) Group: System Environment/Daemons URL: http://www.rsyslog.com/ @@ -500,6 +500,9 @@ done %{_libdir}/rsyslog/mmkubernetes.so %changelog +* Sat Jul 14 2018 Fedora Release Engineering - 8.36.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Mon Jul 02 2018 Jiri Vymazal - 8.36.0-1 - rebase to 8.36.0 - removed stdlog dependency as upstream is going to drop it From 1e8cce579b04eacc1a5b2191ce6dcc136e5b5e42 Mon Sep 17 00:00:00 2001 From: Jiri Vymazal Date: Mon, 23 Jul 2018 13:22:09 +0200 Subject: [PATCH 18/99] added gcc to buildrequires following f29 system-wide change --- rsyslog.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rsyslog.spec b/rsyslog.spec index a72e0b9..0d4c6cf 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -19,6 +19,7 @@ Source2: rsyslog.conf Source3: rsyslog.sysconfig Source4: rsyslog.log +BuildRequires: gcc BuildRequires: autoconf BuildRequires: automake BuildRequires: bison @@ -500,6 +501,9 @@ done %{_libdir}/rsyslog/mmkubernetes.so %changelog +* Mon Jul 23 2018 Jiri Vymazal - 8.36.0-2 +- added gcc to buildrequires following f29 system-wide change + * Sat Jul 14 2018 Fedora Release Engineering - 8.36.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild From 78dc3b2a83aff2161c22ccb31333e0c2d8ed317c Mon Sep 17 00:00:00 2001 From: Jiri Vymazal Date: Wed, 25 Jul 2018 10:54:56 +0200 Subject: [PATCH 19/99] fixed a typo in commented-out part of default conf + reordered it resolves: rhbz#1579592 --- rsyslog.conf | 40 ++++++++++++++++++++-------------------- rsyslog.spec | 14 ++++++++++++++ 2 files changed, 34 insertions(+), 20 deletions(-) diff --git a/rsyslog.conf b/rsyslog.conf index 547acda..b51e844 100644 --- a/rsyslog.conf +++ b/rsyslog.conf @@ -4,26 +4,6 @@ # or latest version online at http://www.rsyslog.com/doc/rsyslog_conf.html # If you experience problems, see http://www.rsyslog.com/doc/troubleshoot.html -#### MODULES #### - -module(load="imuxsock" # provides support for local system logging (e.g. via logger command) - SysSock.Use="off") # Turn off message reception via local log socket; - # local messages are retrieved through imjournal now. -module(load="imjournal" # provides access to the systemd journal - StateFile="imjournal.state") # File to store the position in the journal -#module(load="imklog") # reads kernel messages (the same are read from journald) -#module(load"immark") # provides --MARK-- message capability - -# Provides UDP syslog reception -# for parameters see http://www.rsyslog.com/doc/imudp.html -#module(load="imudp") # needs to be done just once -#input(type="imudp" port="514") - -# Provides TCP syslog reception -# for parameters see http://www.rsyslog.com/doc/imtcp.html -#module(load="imtcp") # needs to be done just once -#input(type="imtcp" port="514") - #### GLOBAL DIRECTIVES #### # Where to place auxiliary files @@ -35,6 +15,26 @@ module(load="builtin:omfile" Template="RSYSLOG_TraditionalFileFormat") # Include all config files in /etc/rsyslog.d/ include(file="/etc/rsyslog.d/*.conf" mode="optional") +#### MODULES #### + +module(load="imuxsock" # provides support for local system logging (e.g. via logger command) + SysSock.Use="off") # Turn off message reception via local log socket; + # local messages are retrieved through imjournal now. +module(load="imjournal" # provides access to the systemd journal + StateFile="imjournal.state") # File to store the position in the journal +#module(load="imklog") # reads kernel messages (the same are read from journald) +#module(load="immark") # provides --MARK-- message capability + +# Provides UDP syslog reception +# for parameters see http://www.rsyslog.com/doc/imudp.html +#module(load="imudp") # needs to be done just once +#input(type="imudp" port="514") + +# Provides TCP syslog reception +# for parameters see http://www.rsyslog.com/doc/imtcp.html +#module(load="imtcp") # needs to be done just once +#input(type="imtcp" port="514") + #### RULES #### # Log all kernel messages to the console. diff --git a/rsyslog.spec b/rsyslog.spec index 0d4c6cf..7f90b30 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -501,6 +501,20 @@ done %{_libdir}/rsyslog/mmkubernetes.so %changelog +* Wed Aug 08 2018 Jiri Vymazal - 8.37.0-1 +- rebase to upstream version 8.37.0 + resolves: rhbz#1612079 + resolves: rhbz#1598217 + resolves: rhbz#1544139 + - dropped needless libee dependency +* Wed Jul 25 2018 Jiri Vymazal - 8.36.0-3 +- fixed a typo in commented-out part of default conf + reordered it + resolves: rhbz#1579592 + +* Tue Jul 24 2018 Jason L Tibbitts III - 8.36.0-3 +- Rebuild for unannounced net-snmp soversion bump. +- Use python3-docutils because rst2man has moved there. + * Mon Jul 23 2018 Jiri Vymazal - 8.36.0-2 - added gcc to buildrequires following f29 system-wide change From 3b6595b5ae8dedb86e6282513869f476fcb84f04 Mon Sep 17 00:00:00 2001 From: Jiri Vymazal Date: Wed, 8 Aug 2018 12:10:49 +0200 Subject: [PATCH 20/99] rebase to upstream version 8.37.0 resolves: rhbz#1612079 resolves: rhbz#1598217 resolves: rhbz#1544139 dropped needless libee dependency --- .gitignore | 2 ++ rsyslog.spec | 7 ++++--- sources | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 2098b59..943e9a1 100644 --- a/.gitignore +++ b/.gitignore @@ -55,3 +55,5 @@ rsyslog-4.6.3.tar.gz /rsyslog-doc-8.35.0.tar.gz /rsyslog-8.36.0.tar.gz /rsyslog-doc-8.36.0.tar.gz +/rsyslog-8.37.0.tar.gz +/rsyslog-doc-8.37.0.tar.gz diff --git a/rsyslog.spec b/rsyslog.spec index 7f90b30..b086a60 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -8,8 +8,8 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog -Version: 8.36.0 -Release: 2%{?dist} +Version: 8.37.0 +Release: 1%{?dist} License: (GPLv3+ and ASL 2.0) Group: System Environment/Daemons URL: http://www.rsyslog.com/ @@ -80,7 +80,7 @@ Requires: %name = %version-%release Summary: Log normalization support for rsyslog Group: System Environment/Daemons Requires: %name = %version-%release -BuildRequires: libestr-devel libee-devel liblognorm-devel >= 1.0.2 +BuildRequires: libestr-devel liblognorm-devel >= 1.0.2 %package mmaudit Summary: Message modification module supporting Linux audit format @@ -507,6 +507,7 @@ done resolves: rhbz#1598217 resolves: rhbz#1544139 - dropped needless libee dependency + * Wed Jul 25 2018 Jiri Vymazal - 8.36.0-3 - fixed a typo in commented-out part of default conf + reordered it resolves: rhbz#1579592 diff --git a/sources b/sources index eb9483f..35fd967 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (rsyslog-8.36.0.tar.gz) = b0c8689374b5b0fb5ad9675ad8983ce67bd04d34ad07d39cf8f91498fd2fd21a173f1077e5fa1b66a89a9d93ab011fc6345ac1a3be9961f4794fc9e152c32a50 -SHA512 (rsyslog-doc-8.36.0.tar.gz) = a93f56c9c9464a9ca87f61169c6fcfaa94608f31210eaac77e882e64bf5f514c887765db6bb57e4defafeb2a6e552506f0274c1ed275306efc1656f5520b5efa +SHA512 (rsyslog-8.37.0.tar.gz) = 2989eb7ed3333151e979a720fa0e95e330bda9b40f65009f7969069bcbbeee8f493c6a3189f67bbbc2529d3a2ac14a022d7e8c4f2d0dae42b67d7508d7611fa0 +SHA512 (rsyslog-doc-8.37.0.tar.gz) = 827ac6762ad9257d9499201d5dc3d110c65f11891ab58d36dce568ffa5f8b57fe10505bc2c7b0743dcca319f294ba6418a880b7ca787eb19dcc1f262ba0f3b59 From ef1208f149bb737f735d1d1f7458ca8bfda2ed68 Mon Sep 17 00:00:00 2001 From: Jiri Vymazal Date: Wed, 8 Aug 2018 13:42:09 +0200 Subject: [PATCH 21/99] librelp dependency bump --- rsyslog.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rsyslog.spec b/rsyslog.spec index b086a60..0870e3d 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -132,7 +132,7 @@ BuildRequires: krb5-devel Summary: RELP protocol support for rsyslog Group: System Environment/Daemons Requires: %name = %version-%release -BuildRequires: librelp-devel >= 1.0.3 +BuildRequires: librelp-devel >= 1.2.16 %package gnutls Summary: TLS protocol support for rsyslog @@ -506,7 +506,8 @@ done resolves: rhbz#1612079 resolves: rhbz#1598217 resolves: rhbz#1544139 - - dropped needless libee dependency +- dropped needless libee dependency +- bumped librelp dependency to actually needed version * Wed Jul 25 2018 Jiri Vymazal - 8.36.0-3 - fixed a typo in commented-out part of default conf + reordered it From 899c7759e6ca4a08b529c60346e42b6273080b80 Mon Sep 17 00:00:00 2001 From: Jiri Vymazal Date: Wed, 5 Dec 2018 14:34:00 +0100 Subject: [PATCH 22/99] rebase to upstream version 8.39.0 resolves: rhbz#1649081 resolves: rhbz#1615014 --- .gitignore | 2 ++ rsyslog.spec | 8 ++++++-- sources | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 07ca170..f273991 100644 --- a/.gitignore +++ b/.gitignore @@ -59,3 +59,5 @@ rsyslog-4.6.3.tar.gz /rsyslog-doc-8.37.0.tar.gz /rsyslog-8.38.0.tar.gz /rsyslog-doc-8.38.0.tar.gz +/rsyslog-8.39.0.tar.gz +/rsyslog-doc-8.39.0.tar.gz diff --git a/rsyslog.spec b/rsyslog.spec index 43fc182..1288c8a 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -8,7 +8,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog -Version: 8.38.0 +Version: 8.39.0 Release: 1%{?dist} License: (GPLv3+ and ASL 2.0) Group: System Environment/Daemons @@ -410,7 +410,6 @@ done %{_libdir}/rsyslog/lmnetstrms.so %{_libdir}/rsyslog/lmnsd_ptcp.so %{_libdir}/rsyslog/lmregexp.so -%{_libdir}/rsyslog/lmstrmsrv.so %{_libdir}/rsyslog/lmtcpclt.so %{_libdir}/rsyslog/lmtcpsrv.so %{_libdir}/rsyslog/lmzlibw.so @@ -504,6 +503,11 @@ done %doc %{rsyslog_docdir}/k8s_container_name.rulebase %changelog +* Wed Dec 05 2018 Jiri Vymazal - 8.39.0-1 +- rebase to upstream version 8.39.0 + resolves: rhbz#1649081 + resolves: rhbz#1615014 + * Wed Oct 10 2018 Jiri Vymazal - 8.38.0-1 - rebase to upstream version 8.38.0 resolves: rhbz#1632432 diff --git a/sources b/sources index 79d779b..9677cf9 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (rsyslog-8.38.0.tar.gz) = 9dc3bdc4ef01c2af433478e182704694cb50849d811d476a03e4ce03b3c5aecfb506e7f1c1e51fadcd63da60b067d8011b92b8c9354a688fe66f7b6ffd8f9254 -SHA512 (rsyslog-doc-8.38.0.tar.gz) = e28a09ae2fcddc711d2cfd31207c9862192598e49964a47b41fc8fa3ae5b1e08b7e2589fb5af859d58d4bf028574eb56cac6514401aa56cb482fa1166863e6a5 +SHA512 (rsyslog-8.39.0.tar.gz) = f46ead433f703df4af6ddc4bbb178ea145d7d2a35ee7749c32b9889f299ba20c83ed76c246530608198e84fef1f2bf10097344c31d5df38b9e0ae47cf4bee479 +SHA512 (rsyslog-doc-8.39.0.tar.gz) = a6d09d384616a264fdf6e09fa0f61bd82a42340bac426d93119e11158f293dd58f894623aca30f2137e51bf701531f07938d014c9b8ec97d0a796447de3089de From e181ced3f7f8d5de5db4fc3dc110546a204bac4a Mon Sep 17 00:00:00 2001 From: Bogdan Dobrelya Date: Wed, 23 Jan 2019 11:56:24 +0100 Subject: [PATCH 23/99] Optimize systemd dependency for containers According to https://fedoraproject.org/wiki/Packaging:Scriptlets: If a package is suitable for installation without systemd (in a container image, for example) and does not require any of the systemd mechanisms such as tmpfiles.d, then the systemd_ordering macro MAY be used instead of the systemd_requires macro. That is exactly the case we want to address for container images when installing packages in it. Resolves: rhbz#1668688 Related-Bug: #1804822 Signed-off-by: Bogdan Dobrelya --- rsyslog.spec | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/rsyslog.spec b/rsyslog.spec index 1288c8a..f1ebad1 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -9,7 +9,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.39.0 -Release: 1%{?dist} +Release: 2%{?dist} License: (GPLv3+ and ASL 2.0) Group: System Environment/Daemons URL: http://www.rsyslog.com/ @@ -39,9 +39,7 @@ BuildRequires: qpid-proton-c-devel Requires: logrotate >= 3.5.2 Requires: bash >= 2.0 -Requires(post): systemd -Requires(preun): systemd -Requires(postun): systemd +%{?systemd_ordering} Provides: syslog Obsoletes: sysklogd < 1.5-11 @@ -503,6 +501,9 @@ done %doc %{rsyslog_docdir}/k8s_container_name.rulebase %changelog +* Wed Jan 23 2019 Bogdan Dobrelya - 8.39.0-2 +- Use systemd_ordering macro + * Wed Dec 05 2018 Jiri Vymazal - 8.39.0-1 - rebase to upstream version 8.39.0 resolves: rhbz#1649081 From 1b8033b79bdcbcae11868a3c59478dc578738c42 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 28 Jan 2019 20:18:22 +0100 Subject: [PATCH 24/99] Remove obsolete Group tag References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag --- rsyslog.spec | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/rsyslog.spec b/rsyslog.spec index 1288c8a..b377a26 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -11,7 +11,6 @@ Name: rsyslog Version: 8.39.0 Release: 1%{?dist} License: (GPLv3+ and ASL 2.0) -Group: System Environment/Daemons URL: http://www.rsyslog.com/ Source0: http://www.rsyslog.com/files/download/rsyslog/%{name}-%{version}.tar.gz Source1: http://www.rsyslog.com/files/download/rsyslog/%{name}-doc-%{version}.tar.gz @@ -51,122 +50,101 @@ Patch0: rsyslog-8.34.0-sd-service.patch %package crypto Summary: Encryption support -Group: System Environment/Daemons Requires: %name = %version-%release %package doc Summary: HTML documentation for rsyslog -Group: Documentation BuildArch: noarch %package elasticsearch Summary: ElasticSearch output module for rsyslog -Group: System Environment/Daemons Requires: %name = %version-%release BuildRequires: libcurl-devel %package hiredis Summary: Redis support for rsyslog -Group: System Environment/Daemons Requires: %name = %version-%release BuildRequires: hiredis-devel %package mmjsonparse Summary: JSON enhanced logging support -Group: System Environment/Daemons Requires: %name = %version-%release %package mmnormalize Summary: Log normalization support for rsyslog -Group: System Environment/Daemons Requires: %name = %version-%release BuildRequires: libestr-devel liblognorm-devel >= 1.0.2 %package mmaudit Summary: Message modification module supporting Linux audit format -Group: System Environment/Daemons Requires: %name = %version-%release %package mmsnmptrapd Summary: Message modification module for snmptrapd generated messages -Group: System Environment/Daemons Requires: %name = %version-%release %package libdbi Summary: Libdbi database support for rsyslog -Group: System Environment/Daemons Requires: %name = %version-%release BuildRequires: libdbi-devel %package mysql Summary: MySQL support for rsyslog -Group: System Environment/Daemons Requires: %name = %version-%release BuildRequires: mariadb-connector-c-devel %package mongodb Summary: MongoDB support for rsyslog -Group: System Environment/Daemons Requires: %name = %version-%release BuildRequires: mongo-c-driver-devel snappy-devel cyrus-sasl-devel %package pgsql Summary: PostgresSQL support for rsyslog -Group: System Environment/Daemons Requires: %name = %version-%release BuildRequires: libpq-devel %package rabbitmq Summary: RabbitMQ support for rsyslog -Group: System Environment/Daemons Requires: %name = %version-%release BuildRequires: librabbitmq-devel >= 0.2 %package gssapi Summary: GSSAPI authentication and encryption support for rsyslog -Group: System Environment/Daemons Requires: %name = %version-%release BuildRequires: krb5-devel %package relp Summary: RELP protocol support for rsyslog -Group: System Environment/Daemons Requires: %name = %version-%release BuildRequires: librelp-devel >= 1.2.16 %package gnutls Summary: TLS protocol support for rsyslog -Group: System Environment/Daemons Requires: %name = %version-%release BuildRequires: gnutls-devel %package snmp Summary: SNMP protocol support for rsyslog -Group: System Environment/Daemons Requires: %name = %version-%release BuildRequires: net-snmp-devel %package udpspoof Summary: Provides the omudpspoof module -Group: System Environment/Daemons Requires: %name = %version-%release BuildRequires: libnet-devel %package omamqp1 Summary: Provides the omamqp1 module -Group: System Environment/Daemons Requires: %name = %version-%release BuildRequires: qpid-proton-c-devel %package kafka Summary: Provides the omkafka module -Group: System Environment/Daemons Requires: %name = %version-%release BuildRequires: librdkafka-devel %package mmkubernetes Summary: Provides the mmkubernetes module -Group: System Environment/Daemons Requires: %name = %version-%release BuildRequires: libcurl-devel From 93891a13b67a9ce00f05a06aff4d4302ee07a868 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 2 Feb 2019 11:39:31 +0000 Subject: [PATCH 25/99] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rsyslog.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rsyslog.spec b/rsyslog.spec index c719009..a24774e 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -9,7 +9,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.39.0 -Release: 2%{?dist} +Release: 3%{?dist} License: (GPLv3+ and ASL 2.0) URL: http://www.rsyslog.com/ Source0: http://www.rsyslog.com/files/download/rsyslog/%{name}-%{version}.tar.gz @@ -479,6 +479,9 @@ done %doc %{rsyslog_docdir}/k8s_container_name.rulebase %changelog +* Sat Feb 02 2019 Fedora Release Engineering - 8.39.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Wed Jan 23 2019 Bogdan Dobrelya - 8.39.0-2 - Use systemd_ordering macro From 1e0113c19cd00b5d9fdf50293a44ca47da32a21a Mon Sep 17 00:00:00 2001 From: Jiri Vymazal Date: Mon, 13 May 2019 10:15:42 +0200 Subject: [PATCH 26/99] rebase to upstream version 8.1904.0 resolves: rhbz#1668473 --- .gitignore | 2 ++ rsyslog.spec | 8 ++++++-- sources | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index f273991..bcffa83 100644 --- a/.gitignore +++ b/.gitignore @@ -61,3 +61,5 @@ rsyslog-4.6.3.tar.gz /rsyslog-doc-8.38.0.tar.gz /rsyslog-8.39.0.tar.gz /rsyslog-doc-8.39.0.tar.gz +/rsyslog-8.1904.0.tar.gz +/rsyslog-doc-8.1904.0.tar.gz diff --git a/rsyslog.spec b/rsyslog.spec index a24774e..a2b06c9 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -8,8 +8,8 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog -Version: 8.39.0 -Release: 3%{?dist} +Version: 8.1904.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 @@ -479,6 +479,10 @@ done %doc %{rsyslog_docdir}/k8s_container_name.rulebase %changelog +* Mon May 13 2019 Jiri Vymazal - 8.1904.0-1 +- rebase to upstream version 8.1904.0 + resolves: rhbz#1668473 + * Sat Feb 02 2019 Fedora Release Engineering - 8.39.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/sources b/sources index 9677cf9..d5489c2 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (rsyslog-8.39.0.tar.gz) = f46ead433f703df4af6ddc4bbb178ea145d7d2a35ee7749c32b9889f299ba20c83ed76c246530608198e84fef1f2bf10097344c31d5df38b9e0ae47cf4bee479 -SHA512 (rsyslog-doc-8.39.0.tar.gz) = a6d09d384616a264fdf6e09fa0f61bd82a42340bac426d93119e11158f293dd58f894623aca30f2137e51bf701531f07938d014c9b8ec97d0a796447de3089de +SHA512 (rsyslog-8.1904.0.tar.gz) = cccb48f06508d7e7c2dd788903f4d7ddb3020cdf6079aea1d52387c56b920f10b08957a79b5d420ccdb54cae50d1da6e5eb80cde9498bceaeda4f6ce37f694fd +SHA512 (rsyslog-doc-8.1904.0.tar.gz) = da0ff00fbe71756b3c27fd8b94e88611452c3ba611e583862556393faaaa596ca8f32f694ad40a3e1df67385d9f9ca80db6a58f5d2e336fe95639dd7cd0de828 From 171f93954f177e5986bad52f36e29a2d599f5794 Mon Sep 17 00:00:00 2001 From: Jiri Vymazal Date: Wed, 10 Jul 2019 15:49:55 +0200 Subject: [PATCH 27/99] rebase to upstream version 8.1905.0 resolves: rhbz#1716391 --- .gitignore | 2 ++ rsyslog.spec | 6 +++++- sources | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index bcffa83..7d18520 100644 --- a/.gitignore +++ b/.gitignore @@ -63,3 +63,5 @@ rsyslog-4.6.3.tar.gz /rsyslog-doc-8.39.0.tar.gz /rsyslog-8.1904.0.tar.gz /rsyslog-doc-8.1904.0.tar.gz +/rsyslog-8.1907.0.tar.gz +/rsyslog-doc-8.1907.0.tar.gz diff --git a/rsyslog.spec b/rsyslog.spec index a2b06c9..f0846c7 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -8,7 +8,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog -Version: 8.1904.0 +Version: 8.1907.0 Release: 1%{?dist} License: (GPLv3+ and ASL 2.0) URL: http://www.rsyslog.com/ @@ -479,6 +479,10 @@ done %doc %{rsyslog_docdir}/k8s_container_name.rulebase %changelog +* Wed Jul 10 2019 Jiri Vymazal - 8.1907.0-1 +- rebase to upstream version 8.1905.0 + resolves: rhbz#1716391 + * Mon May 13 2019 Jiri Vymazal - 8.1904.0-1 - rebase to upstream version 8.1904.0 resolves: rhbz#1668473 diff --git a/sources b/sources index d5489c2..5925417 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (rsyslog-8.1904.0.tar.gz) = cccb48f06508d7e7c2dd788903f4d7ddb3020cdf6079aea1d52387c56b920f10b08957a79b5d420ccdb54cae50d1da6e5eb80cde9498bceaeda4f6ce37f694fd -SHA512 (rsyslog-doc-8.1904.0.tar.gz) = da0ff00fbe71756b3c27fd8b94e88611452c3ba611e583862556393faaaa596ca8f32f694ad40a3e1df67385d9f9ca80db6a58f5d2e336fe95639dd7cd0de828 +SHA512 (rsyslog-8.1907.0.tar.gz) = 2aa3f6106e48fa63c6d4389f83e7a3212817c626d04881682236055792cf5c9d8a941638c9a508c470b6a24c934ef5cb0eda65ea25179d98831afbe2a27c1519 +SHA512 (rsyslog-doc-8.1907.0.tar.gz) = 72dcddef6e36a92d2bdcf54072fff7516b6c731f43a53ef8f5d4ebdbe46bc7aeb63bbc3e739a6e5897602ea7705c4bdd8f57aa10796955ed772a6c7cf552c5e5 From 3df0efa102d9fec8385fa11177443ef3a0aea4d9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 26 Jul 2019 18:50:26 +0000 Subject: [PATCH 28/99] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rsyslog.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rsyslog.spec b/rsyslog.spec index f0846c7..7bdb504 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -9,7 +9,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.1907.0 -Release: 1%{?dist} +Release: 2%{?dist} License: (GPLv3+ and ASL 2.0) URL: http://www.rsyslog.com/ Source0: http://www.rsyslog.com/files/download/rsyslog/%{name}-%{version}.tar.gz @@ -479,6 +479,9 @@ done %doc %{rsyslog_docdir}/k8s_container_name.rulebase %changelog +* Fri Jul 26 2019 Fedora Release Engineering - 8.1907.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Wed Jul 10 2019 Jiri Vymazal - 8.1907.0-1 - rebase to upstream version 8.1905.0 resolves: rhbz#1716391 From f4d39b1b7f5dd17dc894ae7ed717e8aefe19f2a2 Mon Sep 17 00:00:00 2001 From: Jiri Vymazal Date: Thu, 17 Oct 2019 12:38:46 +0200 Subject: [PATCH 29/99] rebase to upstream version 8.1910.0 resolves: rhbz#1743537 --- .gitignore | 2 + imjournal-rewrite.patch | 752 ++++++++++++++++++++++++++++++++++++++++ rsyslog.spec | 10 +- sources | 4 +- 4 files changed, 764 insertions(+), 4 deletions(-) create mode 100644 imjournal-rewrite.patch diff --git a/.gitignore b/.gitignore index 7d18520..5a7dcc5 100644 --- a/.gitignore +++ b/.gitignore @@ -65,3 +65,5 @@ rsyslog-4.6.3.tar.gz /rsyslog-doc-8.1904.0.tar.gz /rsyslog-8.1907.0.tar.gz /rsyslog-doc-8.1907.0.tar.gz +/rsyslog-8.1910.0.tar.gz +/rsyslog-doc-8.1910.0.tar.gz diff --git a/imjournal-rewrite.patch b/imjournal-rewrite.patch new file mode 100644 index 0000000..d8124ee --- /dev/null +++ b/imjournal-rewrite.patch @@ -0,0 +1,752 @@ +From 78976a9bc0592317be2e41b7f3703803f7971e1e Mon Sep 17 00:00:00 2001 +From: Jiri Vymazal +Date: Wed, 25 Sep 2019 15:18:57 +0200 +Subject: [PATCH] plugin code restructuring, added remote option + +Decomposed ReadJournal() a bit, also now coupling journald +variables in one struct, added few warning messages and debug +prints to help with bug hunts in future, also got rid of two +needless journald calls. WorkAroundJournalBug now deprecated. +Added option to pull journald records from outside local machine. +--- + plugins/imjournal/imjournal.c | 368 ++++++++++++++++++++-------------- + 1 file changed, 214 insertions(+), 154 deletions(-) + +diff --git a/plugins/imjournal/imjournal.c b/plugins/imjournal/imjournal.c +index 2e27922b51..8008f159c4 100644 +--- a/plugins/imjournal/imjournal.c ++++ b/plugins/imjournal/imjournal.c +@@ -81,8 +81,9 @@ static struct configSettings_s { + int iDfltFacility; + int bUseJnlPID; + char *usePid; +- int bWorkAroundJournalBug; ++ int bWorkAroundJournalBug; /* deprecated, left for backwards compatibility only */ + int bFsync; ++ int bRemote; + } cs; + + static rsRetVal facilityHdlr(uchar **pp, void *pVal); +@@ -100,7 +101,8 @@ static struct cnfparamdescr modpdescr[] = { + { "usepidfromsystem", eCmdHdlrBinary, 0 }, + { "usepid", eCmdHdlrString, 0 }, + { "workaroundjournalbug", eCmdHdlrBinary, 0 }, +- { "fsync", eCmdHdlrBinary, 0 } ++ { "fsync", eCmdHdlrBinary, 0 }, ++ { "remote", eCmdHdlrBinary, 0 } + }; + static struct cnfparamblk modpblk = + { CNFPARAMBLK_VERSION, +@@ -120,8 +122,6 @@ static prop_t *pLocalHostIP = NULL; /* a pseudo-constant propterty for 127.0.0.1 + static const char *pidFieldName; /* read-only after startup */ + static int bPidFallBack; + static ratelimit_t *ratelimiter = NULL; +-static sd_journal *j; +-static sbool reloaded = 0; + static struct { + statsobj_t *stats; + STATSCOUNTER_DEF(ctrSubmitted, mutCtrSubmitted) +@@ -134,34 +134,58 @@ static struct { + uint64 ratelimitDiscardedInInterval; + uint64 diskUsageBytes; + } statsCounter; +-static char *last_cursor = NULL; ++struct journalContext_s { /* structure encapsulating all the journald_API-related stuff */ ++ sd_journal *j; /* main object encapsulating journal for us, has to be used in every sd_journal*() call */ ++ sbool reloaded; /* we have reloaded journal after detecting rotation */ ++ sbool atHead; /* true if we are at start of journal (no seek was done) */ ++ char *cursor; /* should point to last valid journald entry we processed */ ++}; ++static struct journalContext_s journalContext = {NULL, 0, 1, NULL}; + + #define J_PROCESS_PERIOD 1024 /* Call sd_journal_process() every 1,024 records */ + +-static rsRetVal persistJournalState(int trySave); ++static rsRetVal persistJournalState(void); + static rsRetVal loadJournalState(void); + + static rsRetVal openJournal(void) { + int r; + DEFiRet; + +- if ((r = sd_journal_open(&j, SD_JOURNAL_LOCAL_ONLY)) < 0) { +- LogError(-r, RS_RET_IO_ERROR, "imjournal: sd_journal_open() failed"); +- iRet = RS_RET_IO_ERROR; ++ if (journalContext.j) { ++ LogMsg(0, RS_RET_OK_WARN, LOG_WARNING, "imjournal: opening journal when already opened.\n"); + } +- if ((r = sd_journal_get_fd(j)) < 0) { +- LogError(-r, RS_RET_IO_ERROR, "imjournal: sd_journal_get_fd() failed"); ++ if ((r = sd_journal_open(&journalContext.j, cs.bRemote? 0 : SD_JOURNAL_LOCAL_ONLY)) < 0) { ++ LogError(-r, RS_RET_IO_ERROR, "imjournal: sd_journal_open() failed"); + iRet = RS_RET_IO_ERROR; + } ++ journalContext.atHead = 1; + RETiRet; + } + + /* trySave shoulod only be true if there is no journald error preceeding this call */ +-static void closeJournal(int trySave) { +- if (cs.stateFile) { /* can't persist without a state file */ +- persistJournalState(trySave); ++static void closeJournal(void) { ++ if (!journalContext.j) { ++ LogMsg(0, RS_RET_OK_WARN, LOG_WARNING, "imjournal: closing NULL journal.\n"); + } +- sd_journal_close(j); ++ sd_journal_close(journalContext.j); ++ journalContext.j = NULL; /* setting to NULL here as journald API will not do that for us... */ ++} ++ ++static int journalGetData(const char *field, const void **data, size_t *length) ++{ ++ int ret; ++ ++ ret = sd_journal_get_data(journalContext.j, field, data, length); ++ if (ret == -EADDRNOTAVAIL) { ++ LogError(-ret, RS_RET_ERR, "imjournal: Tried to get data without a 'next' call.\n"); ++ if ((ret = sd_journal_next(journalContext.j)) < 0) { ++ LogError(-ret, RS_RET_ERR, "imjournal: sd_journal_next() failed\n"); ++ } else { ++ ret = sd_journal_get_data(journalContext.j, field, data, length); ++ } ++ } ++ ++ return ret; + } + + +@@ -223,12 +247,84 @@ sanitizeValue(const char *in, size_t len, char **out) + } + + ++/* Read JSON part of single journald message and return it as JSON object ++ */ ++static rsRetVal ++readJSONfromJournalMsg(struct fjson_object **json) ++{ ++ DEFiRet; ++ const void *get; ++ const void *equal_sign; ++ struct fjson_object *jval; ++ size_t l; ++ long prefixlen = 0; ++ ++ CHKmalloc(*json = fjson_object_new_object()); ++ ++ SD_JOURNAL_FOREACH_DATA(journalContext.j, get, l) { ++ char *data; ++ char *name; ++ ++ /* locate equal sign, this is always present */ ++ equal_sign = memchr(get, '=', l); ++ ++ /* ... but we know better than to trust the specs */ ++ if (equal_sign == NULL) { ++ LogError(0, RS_RET_ERR, "SD_JOURNAL_FOREACH_DATA()" ++ "returned a malformed field (has no '='): '%s'", (char*)get); ++ continue; /* skip the entry */ ++ } ++ ++ /* get length of journal data prefix */ ++ prefixlen = ((char *)equal_sign - (char *)get); ++ ++ CHKmalloc(name = strndup(get, prefixlen)); ++ ++ prefixlen++; /* remove '=' */ ++ ++ CHKiRet_Hdlr(sanitizeValue(((const char *)get) + prefixlen, l - prefixlen, &data)) { ++ free (name); ++ FINALIZE; ++ } ++ ++ /* and save them to json object */ ++ jval = fjson_object_new_string((char *)data); ++ fjson_object_object_add(*json, name, jval); ++ free (data); ++ free (name); ++ } ++finalize_it: ++ RETiRet; ++} ++ ++ ++/* Try to obtain current journald cursor and save it to journalContext struct. ++ */ ++static rsRetVal ++updateJournalCursor(void) ++{ ++ DEFiRet; ++ char *c = NULL; ++ int r; ++ ++ if ((r = sd_journal_get_cursor(journalContext.j, &c)) < 0) { ++ LogError(-r, RS_RET_ERR, "imjournal: Could not get journald cursor!\n"); ++ ABORT_FINALIZE(RS_RET_ERR); ++ } ++ /* save journal cursor (at this point we can be sure it is valid) */ ++ free(journalContext.cursor); ++ journalContext.cursor = c; ++finalize_it: ++ RETiRet; ++} ++ ++ + /* enqueue the the journal message into the message queue. + * The provided msg string is not freed - thus must be done + * by the caller. + */ + static rsRetVal +-enqMsg(uchar *msg, uchar *pszTag, int iFacility, int iSeverity, struct timeval *tp, struct json_object *json, ++enqMsg(uchar *msg, uchar *pszTag, int iFacility, int iSeverity, struct timeval *tp, struct fjson_object *json, + int sharedJsonProperties) + { + struct syslogTime st; +@@ -267,15 +363,17 @@ int sharedJsonProperties) + STATSCOUNTER_INC(statsCounter.ctrSubmitted, statsCounter.mutCtrSubmitted); + + finalize_it: +- if (iRet == RS_RET_DISCARDMSG) ++ if (iRet == RS_RET_DISCARDMSG) { + STATSCOUNTER_INC(statsCounter.ctrDiscarded, statsCounter.mutCtrDiscarded); ++ } else if (iRet != RS_RET_OK) { ++ LogError(0, RS_RET_ERR, "imjournal: error during enqMsg().\n"); ++ } + + RETiRet; + } + + +-/* Read journal log while data are available, each read() reads one +- * record of printk buffer. ++/* Read journal log while data are available, each read() reads one journald record. + */ + static rsRetVal + readjournal(void) +@@ -285,39 +383,32 @@ readjournal(void) + struct timeval tv; + uint64_t timestamp; + +- struct json_object *json = NULL; ++ struct fjson_object *json = NULL; + int r; + + /* Information from messages */ + char *message = NULL; + char *sys_iden; + char *sys_iden_help = NULL; +- char *c = NULL; + + const void *get; + const void *pidget; + size_t length; + size_t pidlength; + +- const void *equal_sign; +- struct json_object *jval; +- size_t l; +- +- long prefixlen = 0; +- + int severity = cs.iDfltSeverity; + int facility = cs.iDfltFacility; + + /* Get message text */ +- if (sd_journal_get_data(j, "MESSAGE", &get, &length) < 0) { +- message = strdup(""); ++ if (journalGetData("MESSAGE", &get, &length) < 0) { ++ CHKmalloc(message = strdup("")); + } else { + CHKiRet(sanitizeValue(((const char *)get) + 8, length - 8, &message)); + } + STATSCOUNTER_INC(statsCounter.ctrRead, statsCounter.mutCtrRead); + + /* Get message severity ("priority" in journald's terminology) */ +- if (sd_journal_get_data(j, "PRIORITY", &get, &length) >= 0) { ++ if (journalGetData("PRIORITY", &get, &length) >= 0) { + if (length == 10) { + severity = ((char *)get)[9] - '0'; + if (severity < 0 || 7 < severity) { +@@ -332,7 +423,7 @@ readjournal(void) + } + + /* Get syslog facility */ +- if (sd_journal_get_data(j, "SYSLOG_FACILITY", &get, &length) >= 0) { ++ if (journalGetData("SYSLOG_FACILITY", &get, &length) >= 0) { + // Note: the journal frequently contains invalid facilities! + if (length == 17 || length == 18) { + facility = ((char *)get)[16] - '0'; +@@ -352,14 +443,14 @@ readjournal(void) + } + + /* Get message identifier, client pid and add ':' */ +- if (sd_journal_get_data(j, "SYSLOG_IDENTIFIER", &get, &length) >= 0) { ++ if (journalGetData("SYSLOG_IDENTIFIER", &get, &length) >= 0) { + CHKiRet(sanitizeValue(((const char *)get) + 18, length - 18, &sys_iden)); + } else { + CHKmalloc(sys_iden = strdup("journal")); + } + + /* trying to get PID, default is "SYSLOG_PID" property */ +- if (sd_journal_get_data(j, pidFieldName, &pidget, &pidlength) >= 0) { ++ if (journalGetData(pidFieldName, &pidget, &pidlength) >= 0) { + char *sys_pid; + int val_ofs; + +@@ -372,7 +463,7 @@ readjournal(void) + free (sys_pid); + } else { + /* this is fallback, "SYSLOG_PID" doesn't exist so trying to get "_PID" property */ +- if (bPidFallBack && sd_journal_get_data(j, "_PID", &pidget, &pidlength) >= 0) { ++ if (bPidFallBack && journalGetData("_PID", &pidget, &pidlength) >= 0) { + char *sys_pid; + int val_ofs; + +@@ -396,55 +487,15 @@ readjournal(void) + ABORT_FINALIZE(RS_RET_OUT_OF_MEMORY); + } + +- json = json_object_new_object(); +- +- SD_JOURNAL_FOREACH_DATA(j, get, l) { +- char *data; +- char *name; +- +- /* locate equal sign, this is always present */ +- equal_sign = memchr(get, '=', l); +- +- /* ... but we know better than to trust the specs */ +- if (equal_sign == NULL) { +- LogError(0, RS_RET_ERR, "SD_JOURNAL_FOREACH_DATA()" +- "returned a malformed field (has no '='): '%s'", (char*)get); +- continue; /* skip the entry */ +- } +- +- /* get length of journal data prefix */ +- prefixlen = ((char *)equal_sign - (char *)get); +- +- name = strndup(get, prefixlen); +- CHKmalloc(name); +- +- prefixlen++; /* remove '=' */ +- +- CHKiRet_Hdlr(sanitizeValue(((const char *)get) + prefixlen, l - prefixlen, &data)) { +- free (name); +- FINALIZE; +- } +- +- /* and save them to json object */ +- jval = json_object_new_string((char *)data); +- json_object_object_add(json, name, jval); +- free (data); +- free (name); +- } ++ CHKiRet(readJSONfromJournalMsg(&json)); + + /* calculate timestamp */ +- if (sd_journal_get_realtime_usec(j, ×tamp) >= 0) { ++ if (sd_journal_get_realtime_usec(journalContext.j, ×tamp) >= 0) { + tv.tv_sec = timestamp / 1000000; + tv.tv_usec = timestamp % 1000000; + } + +- if (cs.bWorkAroundJournalBug) { +- /* save journal cursor (at this point we can be sure it is valid) */ +- if (!sd_journal_get_cursor(j, &c)) { +- free(last_cursor); +- last_cursor = c; +- } +- } ++ iRet = updateJournalCursor(); + + /* submit message */ + enqMsg((uchar *)message, (uchar *) sys_iden_help, facility, severity, &tv, json, 0); +@@ -456,32 +507,22 @@ readjournal(void) + } + + +-/* This function gets journal cursor and saves it into state file. +- * If WorkAroundJournalBug option is turned on it does use cursor saved previously. +- * If it is false and if "trySave" is false it skips altogether. ++/* This function saves journal cursor into state file. ++ * It must be checked that stateFile is configured prior to calling this. + */ + static rsRetVal +-persistJournalState(int trySave) ++persistJournalState(void) + { + DEFiRet; + FILE *sf = NULL; /* state file */ + char tmp_sf[MAXFNAME]; + size_t n; + +- if (cs.bWorkAroundJournalBug) { +- /* first check that we have valid cursor */ +- if (!last_cursor) { +- ABORT_FINALIZE(RS_RET_OK); +- } +- } else if (trySave) { +- int ret; +- free(last_cursor); +- if ((ret = sd_journal_get_cursor(j, &last_cursor))) { +- LogError(-ret, RS_RET_ERR, "imjournal: sd_journal_get_cursor() failed"); +- last_cursor = NULL; +- ABORT_FINALIZE(RS_RET_ERR); +- } +- } else { /* not trying to get cursor out of invalid journal state */ ++ DBGPRINTF("Persisting journal position, cursor: %s, at head? %d\n", ++ journalContext.cursor, journalContext.atHead); ++ ++ /* first check that we have valid cursor */ ++ if (!journalContext.cursor) { + ABORT_FINALIZE(RS_RET_OK); + } + +@@ -500,7 +541,7 @@ persistJournalState(int trySave) + ABORT_FINALIZE(RS_RET_FOPEN_FAILURE); + } + +- if(fputs(last_cursor, sf) == EOF) { ++ if(fputs(journalContext.cursor, sf) == EOF) { + LogError(errno, RS_RET_IO_ERROR, "imjournal: failed to save cursor to: '%s'", tmp_sf); + ABORT_FINALIZE(RS_RET_IO_ERROR); + } +@@ -541,43 +582,59 @@ persistJournalState(int trySave) + + static rsRetVal skipOldMessages(void); + +-#define POLL_TIMEOUT 900000 /* timeout for poll is 900ms */ +- + static rsRetVal +-pollJournal(void) ++handleRotation(void) + { + DEFiRet; +- int err; ++ int r; + +- err = sd_journal_wait(j, POLL_TIMEOUT); +- if (err == SD_JOURNAL_INVALIDATE && !reloaded) { +- STATSCOUNTER_INC(statsCounter.ctrRotations, statsCounter.mutCtrRotations); +- closeJournal(0); ++ LogMsg(0, RS_RET_OK, LOG_NOTICE, "imjournal: journal files changed, reloading...\n"); ++ STATSCOUNTER_INC(statsCounter.ctrRotations, statsCounter.mutCtrRotations); ++ closeJournal(); + +- iRet = openJournal(); +- if (iRet != RS_RET_OK) { +- ABORT_FINALIZE(RS_RET_ERR); +- } ++ iRet = openJournal(); ++ if (iRet != RS_RET_OK) { ++ ABORT_FINALIZE(RS_RET_ERR); ++ } + +- /* If we have locally saved cursor there is no need to read it from state file */ +- if (cs.bWorkAroundJournalBug && last_cursor) +- { +- if (sd_journal_seek_cursor(j, last_cursor) != 0) { +- LogError(0, RS_RET_ERR, "imjournal: " +- "couldn't seek to cursor `%s'\n", last_cursor); +- iRet = RS_RET_ERR; +- } +- /* Need to advance because cursor points at last processed message */ +- sd_journal_next(j); ++ /* If we have locally saved cursor there is no need to read it from state file */ ++ if (journalContext.cursor) ++ { ++ if (sd_journal_seek_cursor(journalContext.j, journalContext.cursor) != 0) { ++ LogError(0, RS_RET_ERR, "imjournal: " ++ "couldn't seek to cursor `%s'\n", journalContext.cursor); ++ iRet = RS_RET_ERR; + } +- else if (cs.stateFile) { +- iRet = loadJournalState(); ++ journalContext.atHead = 0; ++ /* Need to advance because cursor points at last processed message */ ++ if ((r = sd_journal_next(journalContext.j)) < 0) { ++ LogError(-r, RS_RET_ERR, "imjournal: sd_journal_next() failed"); ++ iRet = RS_RET_ERR; + } +- LogMsg(0, RS_RET_OK, LOG_NOTICE, "imjournal: journal reloaded..."); +- reloaded = 1; ++ } ++ else if (cs.stateFile) { ++ iRet = loadJournalState(); ++ } ++ journalContext.reloaded = 1; ++ ++finalize_it: ++ RETiRet; ++} ++ ++#define POLL_TIMEOUT 900000 /* timeout for poll is 900ms */ ++ ++static rsRetVal ++pollJournal(void) ++{ ++ DEFiRet; ++ int err; ++ ++ err = sd_journal_wait(journalContext.j, POLL_TIMEOUT); ++ if (err == SD_JOURNAL_INVALIDATE && !journalContext.reloaded) { ++ CHKiRet(handleRotation()); + } + else { +- reloaded = 0; ++ journalContext.reloaded = 0; + } + + finalize_it: +@@ -591,12 +648,13 @@ skipOldMessages(void) + int r; + DEFiRet; + +- if ((r = sd_journal_seek_tail(j)) < 0) { ++ if ((r = sd_journal_seek_tail(journalContext.j)) < 0) { + LogError(-r, RS_RET_ERR, + "imjournal: sd_journal_seek_tail() failed"); + ABORT_FINALIZE(RS_RET_ERR); + } +- if ((r = sd_journal_previous(j)) < 0) { ++ journalContext.atHead = 0; ++ if ((r = sd_journal_previous(journalContext.j)) < 0) { + LogError(-r, RS_RET_ERR, + "imjournal: sd_journal_previous() failed"); + ABORT_FINALIZE(RS_RET_ERR); +@@ -615,6 +673,9 @@ loadJournalState(void) + int r; + FILE *r_sf; + ++ DBGPRINTF("Loading journal position, at head? %d, reloaded? %d\n", ++ journalContext.atHead, journalContext.reloaded); ++ + if (cs.stateFile[0] != '/') { + char *new_stateFile; + if (-1 == asprintf(&new_stateFile, "%s/%s", (char *)glbl.GetWorkDir(), cs.stateFile)) { +@@ -639,13 +700,14 @@ loadJournalState(void) + if ((r_sf = fopen(cs.stateFile, "rb")) != NULL) { + char readCursor[128 + 1]; + if (fscanf(r_sf, "%128s\n", readCursor) != EOF) { +- if (sd_journal_seek_cursor(j, readCursor) != 0) { ++ if (sd_journal_seek_cursor(journalContext.j, readCursor) != 0) { + LogError(0, RS_RET_ERR, "imjournal: " + "couldn't seek to cursor `%s'\n", readCursor); + iRet = RS_RET_ERR; + } else { ++ journalContext.atHead = 0; + char * tmp_cursor = NULL; +- sd_journal_next(j); ++ sd_journal_next(journalContext.j); + /* + * This is resolving the situation when system is after reboot and boot_id + * doesn't match so cursor pointing into "future". +@@ -658,14 +720,15 @@ loadJournalState(void) + * but if cursor has been intentionally compromised it could stop logging even + * with persistent journal. + * */ +- if ((r = sd_journal_get_cursor(j, &tmp_cursor)) < 0) { ++ if ((r = sd_journal_get_cursor(journalContext.j, &tmp_cursor)) < 0) { + LogError(-r, RS_RET_IO_ERROR, "imjournal: " + "loaded invalid cursor, seeking to the head of journal\n"); +- if ((r = sd_journal_seek_head(j)) < 0) { ++ if ((r = sd_journal_seek_head(journalContext.j)) < 0) { + LogError(-r, RS_RET_ERR, "imjournal: " + "sd_journal_seek_head() failed, when cursor is invalid\n"); + iRet = RS_RET_ERR; + } ++ journalContext.atHead = 1; + } + free(tmp_cursor); + } +@@ -680,18 +743,15 @@ loadJournalState(void) + if (iRet != RS_RET_OK && cs.bIgnoreNonValidStatefile) { + /* ignore state file errors */ + iRet = RS_RET_OK; +- LogError(0, NO_ERRCODE, "imjournal: ignoring invalid state file %s", +- cs.stateFile); ++ LogError(0, NO_ERRCODE, "imjournal: ignoring invalid state file %s", cs.stateFile); + if (cs.bIgnorePrevious) { + skipOldMessages(); + } + } + } else { +- LogError(0, RS_RET_FOPEN_FAILURE, "imjournal: " +- "open on state file `%s' failed\n", cs.stateFile); ++ LogError(0, RS_RET_FOPEN_FAILURE, "imjournal: open on state file `%s' failed\n", cs.stateFile); + if (cs.bIgnorePrevious) { +- /* Seek to the very end of the journal and ignore all +- * older messages. */ ++ /* Seek to the very end of the journal and ignore all older messages. */ + skipOldMessages(); + } + } +@@ -704,7 +764,7 @@ static void + tryRecover(void) { + LogMsg(0, RS_RET_OK, LOG_INFO, "imjournal: trying to recover from journal error"); + STATSCOUNTER_INC(statsCounter.ctrRecoveryAttempts, statsCounter.mutCtrRecoveryAttempts); +- closeJournal(0); ++ closeJournal(); + srSleep(10, 0); // do not hammer machine with too-frequent retries + openJournal(); + } +@@ -723,8 +783,7 @@ CODESTARTrunInput + /* Load our position in the journal from the state file. */ + CHKiRet(loadJournalState()); + } else if (cs.bIgnorePrevious) { +- /* Seek to the very end of the journal and ignore all +- * older messages. */ ++ /* Seek to the very end of the journal and ignore all older messages. */ + skipOldMessages(); + } + +@@ -758,7 +817,7 @@ CODESTARTrunInput + while (glbl.GetGlobalInputTermState() == 0) { + int r; + +- r = sd_journal_next(j); ++ r = sd_journal_next(journalContext.j); + if (r < 0) { + LogError(-r, RS_RET_ERR, "imjournal: sd_journal_next() failed"); + tryRecover(); +@@ -766,8 +825,12 @@ CODESTARTrunInput + } + + if (r == 0) { ++ if (journalContext.atHead) { ++ LogMsg(0, RS_RET_OK, LOG_WARNING, "imjournal: " ++ "Journal indicates no msgs when positioned at head.\n"); ++ } + /* No new messages, wait for activity. */ +- if (pollJournal() != RS_RET_OK && !reloaded) { ++ if (pollJournal() != RS_RET_OK && !journalContext.reloaded) { + tryRecover(); + } + continue; +@@ -776,7 +839,7 @@ CODESTARTrunInput + /* + * update journal disk usage before reading the new message. + */ +- const int e = sd_journal_get_usage(j, (uint64_t *)&statsCounter.diskUsageBytes); ++ const int e = sd_journal_get_usage(journalContext.j, (uint64_t *)&statsCounter.diskUsageBytes); + if (e < 0) { + LogError(-e, RS_RET_ERR, "imjournal: sd_get_usage() failed"); + } +@@ -787,21 +850,12 @@ CODESTARTrunInput + } + + count++; +- +- if ((count % J_PROCESS_PERIOD) == 0) { +- /* Give the journal a periodic chance to detect rotated journal files to be cleaned up. */ +- r = sd_journal_process(j); +- if (r < 0) { +- LogError(-r, RS_RET_ERR, "imjournal: sd_journal_process() failed"); +- tryRecover(); +- continue; +- } +- } ++ journalContext.atHead = 0; + + if (cs.stateFile) { /* can't persist without a state file */ + /* TODO: This could use some finer metric. */ + if ((count % cs.iPersistStateInterval) == 0) { +- persistJournalState(1); ++ persistJournalState(); + } + } + } +@@ -825,6 +879,7 @@ CODESTARTbeginCnfLoad + cs.usePid = NULL; + cs.bWorkAroundJournalBug = 1; + cs.bFsync = 0; ++ cs.bRemote = 0; + ENDbeginCnfLoad + + +@@ -881,7 +936,7 @@ BEGINfreeCnf + CODESTARTfreeCnf + free(cs.stateFile); + free(cs.usePid); +- free(last_cursor); ++ free(journalContext.cursor); + statsobj.Destruct(&(statsCounter.stats)); + ENDfreeCnf + +@@ -894,7 +949,10 @@ ENDwillRun + /* close journal */ + BEGINafterRun + CODESTARTafterRun +- closeJournal(1); ++ if (cs.stateFile) { /* can't persist without a state file */ ++ persistJournalState(); ++ } ++ closeJournal(); + ratelimitDestruct(ratelimiter); + ENDafterRun + +@@ -966,6 +1024,8 @@ CODESTARTsetModCnf + cs.bWorkAroundJournalBug = (int) pvals[i].val.d.n; + } else if (!strcmp(modpblk.descr[i].name, "fsync")) { + 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 { + dbgprintf("imjournal: program error, non-handled " + "param '%s' in beginCnfLoad\n", modpblk.descr[i].name); +diff --git a/plugins/imjournal/imjournal.c b/plugins/imjournal/imjournal.c +index 8008f159c4..18e4d25ebb 100644 +--- a/plugins/imjournal/imjournal.c ++++ b/plugins/imjournal/imjournal.c +@@ -3,7 +3,7 @@ + * To test under Linux: + * emmit log message into systemd journal + * +- * Copyright (C) 2008-2017 Adiscon GmbH ++ * Copyright (C) 2008-2019 Adiscon GmbH + * + * This file is part of rsyslog. + * +@@ -676,16 +676,6 @@ loadJournalState(void) + DBGPRINTF("Loading journal position, at head? %d, reloaded? %d\n", + journalContext.atHead, journalContext.reloaded); + +- if (cs.stateFile[0] != '/') { +- char *new_stateFile; +- if (-1 == asprintf(&new_stateFile, "%s/%s", (char *)glbl.GetWorkDir(), cs.stateFile)) { +- LogError(0, RS_RET_OUT_OF_MEMORY, "imjournal: asprintf failed\n"); +- ABORT_FINALIZE(RS_RET_OUT_OF_MEMORY); +- } +- free (cs.stateFile); +- cs.stateFile = new_stateFile; +- } +- + /* if state file not exists (on very first run), skip */ + if (access(cs.stateFile, F_OK|R_OK) == -1 && errno == ENOENT) { + if (cs.bIgnorePrevious) { +@@ -885,6 +875,17 @@ ENDbeginCnfLoad + + BEGINendCnfLoad + CODESTARTendCnfLoad ++ /* bad trick to handle old and new style config all in old-style var */ ++ if(cs.stateFile != NULL && cs.stateFile[0] != '/') { ++ char *new_stateFile; ++ if (-1 == asprintf(&new_stateFile, "%s/%s", (char *)glbl.GetWorkDir(), cs.stateFile)) { ++ LogError(0, RS_RET_OUT_OF_MEMORY, "imjournal: asprintf failed\n"); ++ ABORT_FINALIZE(RS_RET_OUT_OF_MEMORY); ++ } ++ free (cs.stateFile); ++ cs.stateFile = new_stateFile; ++ } ++finalize_it: + ENDendCnfLoad + + +@@ -1032,7 +1033,6 @@ CODESTARTsetModCnf + } + } + +- + finalize_it: + if (pvals != NULL) + cnfparamvalsDestruct(pvals, &modpblk); diff --git a/rsyslog.spec b/rsyslog.spec index 7bdb504..e1009bd 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -8,8 +8,8 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog -Version: 8.1907.0 -Release: 2%{?dist} +Version: 8.1910.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 @@ -45,6 +45,7 @@ Obsoletes: sysklogd < 1.5-11 # tweak the upstream service file to honour configuration from /etc/sysconfig/rsyslog Patch0: rsyslog-8.34.0-sd-service.patch +Patch1: imjournal-rewrite.patch %package crypto Summary: Encryption support @@ -246,6 +247,7 @@ mv build doc # set up rsyslog sources %setup -q -D %patch0 -p1 +%patch1 -p1 autoreconf -iv @@ -479,6 +481,10 @@ done %doc %{rsyslog_docdir}/k8s_container_name.rulebase %changelog +* Thu Oct 17 2019 Jiri Vymazal - 8.1910.0-1 +- rebase to upstream version 8.1910.0 + resolves: rhbz#1743537 + * Fri Jul 26 2019 Fedora Release Engineering - 8.1907.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild diff --git a/sources b/sources index 5925417..7ab4589 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (rsyslog-8.1907.0.tar.gz) = 2aa3f6106e48fa63c6d4389f83e7a3212817c626d04881682236055792cf5c9d8a941638c9a508c470b6a24c934ef5cb0eda65ea25179d98831afbe2a27c1519 -SHA512 (rsyslog-doc-8.1907.0.tar.gz) = 72dcddef6e36a92d2bdcf54072fff7516b6c731f43a53ef8f5d4ebdbe46bc7aeb63bbc3e739a6e5897602ea7705c4bdd8f57aa10796955ed772a6c7cf552c5e5 +SHA512 (rsyslog-8.1910.0.tar.gz) = 85f5df91a6357ecb38708b4d569d26804a50ca28c928a636ac7749595f1a7105c3450fbd521835a436ebdfdcac33a33986e09a09026745ea4d1a2897406770d5 +SHA512 (rsyslog-doc-8.1910.0.tar.gz) = e46f14e40ae690efbe3114a859c1c94c8f9573ca5ebdb533ad4b5ed76c3a930c887cc205e7279fcc546fda3ce624eae507ce08d5d10ee1eb167a957edd742bf2 From 7c1121d2ca92045227f1ff8e2f85dfae7ddef1d6 Mon Sep 17 00:00:00 2001 From: Jiri Vymazal Date: Thu, 14 Nov 2019 15:07:31 +0100 Subject: [PATCH 30/99] rebase to upstream version 8.1911.0 resolves: rhbz#1771468 --- .gitignore | 2 ++ rsyslog.spec | 16 +++++++++++++--- sources | 4 ++-- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 5a7dcc5..f6e94b1 100644 --- a/.gitignore +++ b/.gitignore @@ -67,3 +67,5 @@ rsyslog-4.6.3.tar.gz /rsyslog-doc-8.1907.0.tar.gz /rsyslog-8.1910.0.tar.gz /rsyslog-doc-8.1910.0.tar.gz +/rsyslog-8.1911.0.tar.gz +/rsyslog-doc-8.1911.0.tar.gz diff --git a/rsyslog.spec b/rsyslog.spec index e1009bd..c18954c 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -8,7 +8,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog -Version: 8.1910.0 +Version: 8.1911.0 Release: 1%{?dist} License: (GPLv3+ and ASL 2.0) URL: http://www.rsyslog.com/ @@ -45,7 +45,6 @@ Obsoletes: sysklogd < 1.5-11 # tweak the upstream service file to honour configuration from /etc/sysconfig/rsyslog Patch0: rsyslog-8.34.0-sd-service.patch -Patch1: imjournal-rewrite.patch %package crypto Summary: Encryption support @@ -247,7 +246,6 @@ mv build doc # set up rsyslog sources %setup -q -D %patch0 -p1 -%patch1 -p1 autoreconf -iv @@ -270,12 +268,15 @@ export HIREDIS_LIBS="-L%{_libdir} -lhiredis" --enable-testbench \ %endif --enable-elasticsearch \ + --enable-clickhouse \ --enable-generate-man-pages \ --enable-gnutls \ --enable-gssapi-krb5 \ --enable-imdiag \ + --enable-imdocker \ --enable-imfile \ --enable-imjournal \ + --enable-improg \ --enable-impstats \ --enable-imptcp \ --enable-libdbi \ @@ -290,6 +291,7 @@ export HIREDIS_LIBS="-L%{_libdir} -lhiredis" --enable-mysql \ --enable-omamqp1 \ --enable-omhiredis \ + --enable-omhttp \ --enable-omjournal \ --enable-ommongodb \ --enable-omprog \ @@ -375,10 +377,12 @@ done %config(noreplace) %{_sysconfdir}/sysconfig/rsyslog %config(noreplace) %{_sysconfdir}/logrotate.d/rsyslog # plugins +%{_libdir}/rsyslog/imdocker.so %{_libdir}/rsyslog/imfile.so %{_libdir}/rsyslog/imjournal.so %{_libdir}/rsyslog/imklog.so %{_libdir}/rsyslog/immark.so +%{_libdir}/rsyslog/improg.so %{_libdir}/rsyslog/impstats.so %{_libdir}/rsyslog/imptcp.so %{_libdir}/rsyslog/imtcp.so @@ -394,6 +398,8 @@ done %{_libdir}/rsyslog/mmanon.so %{_libdir}/rsyslog/mmcount.so %{_libdir}/rsyslog/mmexternal.so +%{_libdir}/rsyslog/omclickhouse.so +%{_libdir}/rsyslog/omhttp.so %{_libdir}/rsyslog/omjournal.so %{_libdir}/rsyslog/ommail.so %{_libdir}/rsyslog/omprog.so @@ -481,6 +487,10 @@ done %doc %{rsyslog_docdir}/k8s_container_name.rulebase %changelog +* Thu Nov 14 2019 Jiri Vymazal - 8.1911.0-1 +- rebase to upstream version 8.1911.0 + resolves: rhbz#1771468 + * Thu Oct 17 2019 Jiri Vymazal - 8.1910.0-1 - rebase to upstream version 8.1910.0 resolves: rhbz#1743537 diff --git a/sources b/sources index 7ab4589..3d6aef6 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (rsyslog-8.1910.0.tar.gz) = 85f5df91a6357ecb38708b4d569d26804a50ca28c928a636ac7749595f1a7105c3450fbd521835a436ebdfdcac33a33986e09a09026745ea4d1a2897406770d5 -SHA512 (rsyslog-doc-8.1910.0.tar.gz) = e46f14e40ae690efbe3114a859c1c94c8f9573ca5ebdb533ad4b5ed76c3a930c887cc205e7279fcc546fda3ce624eae507ce08d5d10ee1eb167a957edd742bf2 +SHA512 (rsyslog-8.1911.0.tar.gz) = 8414901a5072cb2cc28d35802c9e22d0f9c88f2ae15985a087a86b0e4053471b02d43bcc95d0c466719105e0a5ee683927af3842b9487f27ddddc1ca00ed713a +SHA512 (rsyslog-doc-8.1911.0.tar.gz) = 2326550a0db108db407b701ff0b7b8545f94d06c1979bfbea3496a9a652de2a22bf49e9b95d4b2e6256bbf1f9db6a1c9822557c6ebd6a56bc00f096a642b19df From 503cb6d5f44e72d0cb6527649f369f1a9bcfb81f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 30 Jan 2020 17:57:22 +0000 Subject: [PATCH 31/99] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rsyslog.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rsyslog.spec b/rsyslog.spec index c18954c..aabd8f8 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -9,7 +9,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.1911.0 -Release: 1%{?dist} +Release: 2%{?dist} License: (GPLv3+ and ASL 2.0) URL: http://www.rsyslog.com/ Source0: http://www.rsyslog.com/files/download/rsyslog/%{name}-%{version}.tar.gz @@ -487,6 +487,9 @@ done %doc %{rsyslog_docdir}/k8s_container_name.rulebase %changelog +* Thu Jan 30 2020 Fedora Release Engineering - 8.1911.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Thu Nov 14 2019 Jiri Vymazal - 8.1911.0-1 - rebase to upstream version 8.1911.0 resolves: rhbz#1771468 From de231b0757fbeca425b05b86b233bb94e6a7857c Mon Sep 17 00:00:00 2001 From: Jiri Vymazal Date: Mon, 3 Feb 2020 10:14:49 +0100 Subject: [PATCH 32/99] rebase to upstream version 8.2001.0 resolves: rhbz#1790731 --- .gitignore | 2 ++ rsyslog.spec | 8 ++++++-- sources | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index f6e94b1..bf0bdae 100644 --- a/.gitignore +++ b/.gitignore @@ -69,3 +69,5 @@ rsyslog-4.6.3.tar.gz /rsyslog-doc-8.1910.0.tar.gz /rsyslog-8.1911.0.tar.gz /rsyslog-doc-8.1911.0.tar.gz +/rsyslog-8.2001.0.tar.gz +/rsyslog-doc-8.2001.0.tar.gz diff --git a/rsyslog.spec b/rsyslog.spec index aabd8f8..9c9a715 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -8,8 +8,8 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog -Version: 8.1911.0 -Release: 2%{?dist} +Version: 8.2001.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 @@ -487,6 +487,10 @@ done %doc %{rsyslog_docdir}/k8s_container_name.rulebase %changelog +* Mon Feb 03 2020 Jiri Vymazal - 8.2001.0-1 +- rebase to upstream version 8.2001.0 + resolves: rhbz#1790731 + * Thu Jan 30 2020 Fedora Release Engineering - 8.1911.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild diff --git a/sources b/sources index 3d6aef6..e195ca5 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (rsyslog-8.1911.0.tar.gz) = 8414901a5072cb2cc28d35802c9e22d0f9c88f2ae15985a087a86b0e4053471b02d43bcc95d0c466719105e0a5ee683927af3842b9487f27ddddc1ca00ed713a -SHA512 (rsyslog-doc-8.1911.0.tar.gz) = 2326550a0db108db407b701ff0b7b8545f94d06c1979bfbea3496a9a652de2a22bf49e9b95d4b2e6256bbf1f9db6a1c9822557c6ebd6a56bc00f096a642b19df +SHA512 (rsyslog-8.2001.0.tar.gz) = a68053630c43bea813cc3191ebff04473031df49899a6be2d5c331ac18882f373fc54fd7fb45c397fcbbcb269f246eeba5e9126911edd1bfe1c52f60921740d2 +SHA512 (rsyslog-doc-8.2001.0.tar.gz) = 6d58a67914f65d75eb77411e760b9e49be3723fb6e4ab8951ce28bf83372e3ec7805fac5aef49158fa47c6c4a9109e887bcc46ed3ca0cdc53de4e9b66472be14 From 3182f1fac594643eea255efca6fdc84bb21b538a Mon Sep 17 00:00:00 2001 From: Jiri Vymazal Date: Fri, 27 Mar 2020 08:30:44 +0100 Subject: [PATCH 33/99] rebase to upstream version 8.2002.0 resolves: rhbz#1807097 --- .gitignore | 2 ++ rsyslog.spec | 6 +++++- sources | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index bf0bdae..d17d7e0 100644 --- a/.gitignore +++ b/.gitignore @@ -71,3 +71,5 @@ rsyslog-4.6.3.tar.gz /rsyslog-doc-8.1911.0.tar.gz /rsyslog-8.2001.0.tar.gz /rsyslog-doc-8.2001.0.tar.gz +/rsyslog-8.2002.0.tar.gz +/rsyslog-doc-8.2002.0.tar.gz diff --git a/rsyslog.spec b/rsyslog.spec index 9c9a715..9c3b6a8 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -8,7 +8,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog -Version: 8.2001.0 +Version: 8.2002.0 Release: 1%{?dist} License: (GPLv3+ and ASL 2.0) URL: http://www.rsyslog.com/ @@ -487,6 +487,10 @@ done %doc %{rsyslog_docdir}/k8s_container_name.rulebase %changelog +* Fri Mar 27 2020 Jiri Vymazal - 8.2002.0-1 +- rebase to upstream version 8.2002.0 + resolves: rhbz#1807097 + * Mon Feb 03 2020 Jiri Vymazal - 8.2001.0-1 - rebase to upstream version 8.2001.0 resolves: rhbz#1790731 diff --git a/sources b/sources index e195ca5..920af80 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (rsyslog-8.2001.0.tar.gz) = a68053630c43bea813cc3191ebff04473031df49899a6be2d5c331ac18882f373fc54fd7fb45c397fcbbcb269f246eeba5e9126911edd1bfe1c52f60921740d2 -SHA512 (rsyslog-doc-8.2001.0.tar.gz) = 6d58a67914f65d75eb77411e760b9e49be3723fb6e4ab8951ce28bf83372e3ec7805fac5aef49158fa47c6c4a9109e887bcc46ed3ca0cdc53de4e9b66472be14 +SHA512 (rsyslog-8.2002.0.tar.gz) = a01bb2f67d21ab6d96dd1302bc351b509892834ef44956983db912a63ba23201653ca1e6b176a574c47568665b4d92579bb8bb0fe6911646bc841a3754c2754f +SHA512 (rsyslog-doc-8.2002.0.tar.gz) = 5d6bd8fe09b49644f000416c87c8600cd3df3facb07845afd85012279df203a44b234e94a7be90ad83709d5f2ad1a2bf8cb51571c5c0cd76383f76f81455945e From 8018b8f96b47de9badabfad95249e98f05dfc0a8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jul 2020 05:59:45 +0000 Subject: [PATCH 34/99] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rsyslog.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rsyslog.spec b/rsyslog.spec index 9c3b6a8..194107d 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -9,7 +9,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.2002.0 -Release: 1%{?dist} +Release: 2%{?dist} License: (GPLv3+ and ASL 2.0) URL: http://www.rsyslog.com/ Source0: http://www.rsyslog.com/files/download/rsyslog/%{name}-%{version}.tar.gz @@ -487,6 +487,9 @@ done %doc %{rsyslog_docdir}/k8s_container_name.rulebase %changelog +* Wed Jul 29 2020 Fedora Release Engineering - 8.2002.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Fri Mar 27 2020 Jiri Vymazal - 8.2002.0-1 - rebase to upstream version 8.2002.0 resolves: rhbz#1807097 From 4c239ab2d7d867e10200a841ff9c7d551e0791bc Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 1 Aug 2020 08:04:32 +0000 Subject: [PATCH 35/99] - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rsyslog.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rsyslog.spec b/rsyslog.spec index 194107d..d0ed185 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -9,7 +9,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.2002.0 -Release: 2%{?dist} +Release: 3%{?dist} License: (GPLv3+ and ASL 2.0) URL: http://www.rsyslog.com/ Source0: http://www.rsyslog.com/files/download/rsyslog/%{name}-%{version}.tar.gz @@ -487,6 +487,10 @@ done %doc %{rsyslog_docdir}/k8s_container_name.rulebase %changelog +* Sat Aug 01 2020 Fedora Release Engineering - 8.2002.0-3 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Wed Jul 29 2020 Fedora Release Engineering - 8.2002.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From cec45294af2ad3eb8fc6d152400324fc147d5aaf Mon Sep 17 00:00:00 2001 From: alakatos Date: Thu, 20 Aug 2020 14:43:16 +0200 Subject: [PATCH 36/99] Enable configuration reload in the service, so that one can "systemctl reload rsyslog" --- imjournal-rewrite.patch | 752 -------------------------------------- rsyslog.spec | 24 +- service-exec-reload.patch | 11 + 3 files changed, 26 insertions(+), 761 deletions(-) delete mode 100644 imjournal-rewrite.patch create mode 100644 service-exec-reload.patch diff --git a/imjournal-rewrite.patch b/imjournal-rewrite.patch deleted file mode 100644 index d8124ee..0000000 --- a/imjournal-rewrite.patch +++ /dev/null @@ -1,752 +0,0 @@ -From 78976a9bc0592317be2e41b7f3703803f7971e1e Mon Sep 17 00:00:00 2001 -From: Jiri Vymazal -Date: Wed, 25 Sep 2019 15:18:57 +0200 -Subject: [PATCH] plugin code restructuring, added remote option - -Decomposed ReadJournal() a bit, also now coupling journald -variables in one struct, added few warning messages and debug -prints to help with bug hunts in future, also got rid of two -needless journald calls. WorkAroundJournalBug now deprecated. -Added option to pull journald records from outside local machine. ---- - plugins/imjournal/imjournal.c | 368 ++++++++++++++++++++-------------- - 1 file changed, 214 insertions(+), 154 deletions(-) - -diff --git a/plugins/imjournal/imjournal.c b/plugins/imjournal/imjournal.c -index 2e27922b51..8008f159c4 100644 ---- a/plugins/imjournal/imjournal.c -+++ b/plugins/imjournal/imjournal.c -@@ -81,8 +81,9 @@ static struct configSettings_s { - int iDfltFacility; - int bUseJnlPID; - char *usePid; -- int bWorkAroundJournalBug; -+ int bWorkAroundJournalBug; /* deprecated, left for backwards compatibility only */ - int bFsync; -+ int bRemote; - } cs; - - static rsRetVal facilityHdlr(uchar **pp, void *pVal); -@@ -100,7 +101,8 @@ static struct cnfparamdescr modpdescr[] = { - { "usepidfromsystem", eCmdHdlrBinary, 0 }, - { "usepid", eCmdHdlrString, 0 }, - { "workaroundjournalbug", eCmdHdlrBinary, 0 }, -- { "fsync", eCmdHdlrBinary, 0 } -+ { "fsync", eCmdHdlrBinary, 0 }, -+ { "remote", eCmdHdlrBinary, 0 } - }; - static struct cnfparamblk modpblk = - { CNFPARAMBLK_VERSION, -@@ -120,8 +122,6 @@ static prop_t *pLocalHostIP = NULL; /* a pseudo-constant propterty for 127.0.0.1 - static const char *pidFieldName; /* read-only after startup */ - static int bPidFallBack; - static ratelimit_t *ratelimiter = NULL; --static sd_journal *j; --static sbool reloaded = 0; - static struct { - statsobj_t *stats; - STATSCOUNTER_DEF(ctrSubmitted, mutCtrSubmitted) -@@ -134,34 +134,58 @@ static struct { - uint64 ratelimitDiscardedInInterval; - uint64 diskUsageBytes; - } statsCounter; --static char *last_cursor = NULL; -+struct journalContext_s { /* structure encapsulating all the journald_API-related stuff */ -+ sd_journal *j; /* main object encapsulating journal for us, has to be used in every sd_journal*() call */ -+ sbool reloaded; /* we have reloaded journal after detecting rotation */ -+ sbool atHead; /* true if we are at start of journal (no seek was done) */ -+ char *cursor; /* should point to last valid journald entry we processed */ -+}; -+static struct journalContext_s journalContext = {NULL, 0, 1, NULL}; - - #define J_PROCESS_PERIOD 1024 /* Call sd_journal_process() every 1,024 records */ - --static rsRetVal persistJournalState(int trySave); -+static rsRetVal persistJournalState(void); - static rsRetVal loadJournalState(void); - - static rsRetVal openJournal(void) { - int r; - DEFiRet; - -- if ((r = sd_journal_open(&j, SD_JOURNAL_LOCAL_ONLY)) < 0) { -- LogError(-r, RS_RET_IO_ERROR, "imjournal: sd_journal_open() failed"); -- iRet = RS_RET_IO_ERROR; -+ if (journalContext.j) { -+ LogMsg(0, RS_RET_OK_WARN, LOG_WARNING, "imjournal: opening journal when already opened.\n"); - } -- if ((r = sd_journal_get_fd(j)) < 0) { -- LogError(-r, RS_RET_IO_ERROR, "imjournal: sd_journal_get_fd() failed"); -+ if ((r = sd_journal_open(&journalContext.j, cs.bRemote? 0 : SD_JOURNAL_LOCAL_ONLY)) < 0) { -+ LogError(-r, RS_RET_IO_ERROR, "imjournal: sd_journal_open() failed"); - iRet = RS_RET_IO_ERROR; - } -+ journalContext.atHead = 1; - RETiRet; - } - - /* trySave shoulod only be true if there is no journald error preceeding this call */ --static void closeJournal(int trySave) { -- if (cs.stateFile) { /* can't persist without a state file */ -- persistJournalState(trySave); -+static void closeJournal(void) { -+ if (!journalContext.j) { -+ LogMsg(0, RS_RET_OK_WARN, LOG_WARNING, "imjournal: closing NULL journal.\n"); - } -- sd_journal_close(j); -+ sd_journal_close(journalContext.j); -+ journalContext.j = NULL; /* setting to NULL here as journald API will not do that for us... */ -+} -+ -+static int journalGetData(const char *field, const void **data, size_t *length) -+{ -+ int ret; -+ -+ ret = sd_journal_get_data(journalContext.j, field, data, length); -+ if (ret == -EADDRNOTAVAIL) { -+ LogError(-ret, RS_RET_ERR, "imjournal: Tried to get data without a 'next' call.\n"); -+ if ((ret = sd_journal_next(journalContext.j)) < 0) { -+ LogError(-ret, RS_RET_ERR, "imjournal: sd_journal_next() failed\n"); -+ } else { -+ ret = sd_journal_get_data(journalContext.j, field, data, length); -+ } -+ } -+ -+ return ret; - } - - -@@ -223,12 +247,84 @@ sanitizeValue(const char *in, size_t len, char **out) - } - - -+/* Read JSON part of single journald message and return it as JSON object -+ */ -+static rsRetVal -+readJSONfromJournalMsg(struct fjson_object **json) -+{ -+ DEFiRet; -+ const void *get; -+ const void *equal_sign; -+ struct fjson_object *jval; -+ size_t l; -+ long prefixlen = 0; -+ -+ CHKmalloc(*json = fjson_object_new_object()); -+ -+ SD_JOURNAL_FOREACH_DATA(journalContext.j, get, l) { -+ char *data; -+ char *name; -+ -+ /* locate equal sign, this is always present */ -+ equal_sign = memchr(get, '=', l); -+ -+ /* ... but we know better than to trust the specs */ -+ if (equal_sign == NULL) { -+ LogError(0, RS_RET_ERR, "SD_JOURNAL_FOREACH_DATA()" -+ "returned a malformed field (has no '='): '%s'", (char*)get); -+ continue; /* skip the entry */ -+ } -+ -+ /* get length of journal data prefix */ -+ prefixlen = ((char *)equal_sign - (char *)get); -+ -+ CHKmalloc(name = strndup(get, prefixlen)); -+ -+ prefixlen++; /* remove '=' */ -+ -+ CHKiRet_Hdlr(sanitizeValue(((const char *)get) + prefixlen, l - prefixlen, &data)) { -+ free (name); -+ FINALIZE; -+ } -+ -+ /* and save them to json object */ -+ jval = fjson_object_new_string((char *)data); -+ fjson_object_object_add(*json, name, jval); -+ free (data); -+ free (name); -+ } -+finalize_it: -+ RETiRet; -+} -+ -+ -+/* Try to obtain current journald cursor and save it to journalContext struct. -+ */ -+static rsRetVal -+updateJournalCursor(void) -+{ -+ DEFiRet; -+ char *c = NULL; -+ int r; -+ -+ if ((r = sd_journal_get_cursor(journalContext.j, &c)) < 0) { -+ LogError(-r, RS_RET_ERR, "imjournal: Could not get journald cursor!\n"); -+ ABORT_FINALIZE(RS_RET_ERR); -+ } -+ /* save journal cursor (at this point we can be sure it is valid) */ -+ free(journalContext.cursor); -+ journalContext.cursor = c; -+finalize_it: -+ RETiRet; -+} -+ -+ - /* enqueue the the journal message into the message queue. - * The provided msg string is not freed - thus must be done - * by the caller. - */ - static rsRetVal --enqMsg(uchar *msg, uchar *pszTag, int iFacility, int iSeverity, struct timeval *tp, struct json_object *json, -+enqMsg(uchar *msg, uchar *pszTag, int iFacility, int iSeverity, struct timeval *tp, struct fjson_object *json, - int sharedJsonProperties) - { - struct syslogTime st; -@@ -267,15 +363,17 @@ int sharedJsonProperties) - STATSCOUNTER_INC(statsCounter.ctrSubmitted, statsCounter.mutCtrSubmitted); - - finalize_it: -- if (iRet == RS_RET_DISCARDMSG) -+ if (iRet == RS_RET_DISCARDMSG) { - STATSCOUNTER_INC(statsCounter.ctrDiscarded, statsCounter.mutCtrDiscarded); -+ } else if (iRet != RS_RET_OK) { -+ LogError(0, RS_RET_ERR, "imjournal: error during enqMsg().\n"); -+ } - - RETiRet; - } - - --/* Read journal log while data are available, each read() reads one -- * record of printk buffer. -+/* Read journal log while data are available, each read() reads one journald record. - */ - static rsRetVal - readjournal(void) -@@ -285,39 +383,32 @@ readjournal(void) - struct timeval tv; - uint64_t timestamp; - -- struct json_object *json = NULL; -+ struct fjson_object *json = NULL; - int r; - - /* Information from messages */ - char *message = NULL; - char *sys_iden; - char *sys_iden_help = NULL; -- char *c = NULL; - - const void *get; - const void *pidget; - size_t length; - size_t pidlength; - -- const void *equal_sign; -- struct json_object *jval; -- size_t l; -- -- long prefixlen = 0; -- - int severity = cs.iDfltSeverity; - int facility = cs.iDfltFacility; - - /* Get message text */ -- if (sd_journal_get_data(j, "MESSAGE", &get, &length) < 0) { -- message = strdup(""); -+ if (journalGetData("MESSAGE", &get, &length) < 0) { -+ CHKmalloc(message = strdup("")); - } else { - CHKiRet(sanitizeValue(((const char *)get) + 8, length - 8, &message)); - } - STATSCOUNTER_INC(statsCounter.ctrRead, statsCounter.mutCtrRead); - - /* Get message severity ("priority" in journald's terminology) */ -- if (sd_journal_get_data(j, "PRIORITY", &get, &length) >= 0) { -+ if (journalGetData("PRIORITY", &get, &length) >= 0) { - if (length == 10) { - severity = ((char *)get)[9] - '0'; - if (severity < 0 || 7 < severity) { -@@ -332,7 +423,7 @@ readjournal(void) - } - - /* Get syslog facility */ -- if (sd_journal_get_data(j, "SYSLOG_FACILITY", &get, &length) >= 0) { -+ if (journalGetData("SYSLOG_FACILITY", &get, &length) >= 0) { - // Note: the journal frequently contains invalid facilities! - if (length == 17 || length == 18) { - facility = ((char *)get)[16] - '0'; -@@ -352,14 +443,14 @@ readjournal(void) - } - - /* Get message identifier, client pid and add ':' */ -- if (sd_journal_get_data(j, "SYSLOG_IDENTIFIER", &get, &length) >= 0) { -+ if (journalGetData("SYSLOG_IDENTIFIER", &get, &length) >= 0) { - CHKiRet(sanitizeValue(((const char *)get) + 18, length - 18, &sys_iden)); - } else { - CHKmalloc(sys_iden = strdup("journal")); - } - - /* trying to get PID, default is "SYSLOG_PID" property */ -- if (sd_journal_get_data(j, pidFieldName, &pidget, &pidlength) >= 0) { -+ if (journalGetData(pidFieldName, &pidget, &pidlength) >= 0) { - char *sys_pid; - int val_ofs; - -@@ -372,7 +463,7 @@ readjournal(void) - free (sys_pid); - } else { - /* this is fallback, "SYSLOG_PID" doesn't exist so trying to get "_PID" property */ -- if (bPidFallBack && sd_journal_get_data(j, "_PID", &pidget, &pidlength) >= 0) { -+ if (bPidFallBack && journalGetData("_PID", &pidget, &pidlength) >= 0) { - char *sys_pid; - int val_ofs; - -@@ -396,55 +487,15 @@ readjournal(void) - ABORT_FINALIZE(RS_RET_OUT_OF_MEMORY); - } - -- json = json_object_new_object(); -- -- SD_JOURNAL_FOREACH_DATA(j, get, l) { -- char *data; -- char *name; -- -- /* locate equal sign, this is always present */ -- equal_sign = memchr(get, '=', l); -- -- /* ... but we know better than to trust the specs */ -- if (equal_sign == NULL) { -- LogError(0, RS_RET_ERR, "SD_JOURNAL_FOREACH_DATA()" -- "returned a malformed field (has no '='): '%s'", (char*)get); -- continue; /* skip the entry */ -- } -- -- /* get length of journal data prefix */ -- prefixlen = ((char *)equal_sign - (char *)get); -- -- name = strndup(get, prefixlen); -- CHKmalloc(name); -- -- prefixlen++; /* remove '=' */ -- -- CHKiRet_Hdlr(sanitizeValue(((const char *)get) + prefixlen, l - prefixlen, &data)) { -- free (name); -- FINALIZE; -- } -- -- /* and save them to json object */ -- jval = json_object_new_string((char *)data); -- json_object_object_add(json, name, jval); -- free (data); -- free (name); -- } -+ CHKiRet(readJSONfromJournalMsg(&json)); - - /* calculate timestamp */ -- if (sd_journal_get_realtime_usec(j, ×tamp) >= 0) { -+ if (sd_journal_get_realtime_usec(journalContext.j, ×tamp) >= 0) { - tv.tv_sec = timestamp / 1000000; - tv.tv_usec = timestamp % 1000000; - } - -- if (cs.bWorkAroundJournalBug) { -- /* save journal cursor (at this point we can be sure it is valid) */ -- if (!sd_journal_get_cursor(j, &c)) { -- free(last_cursor); -- last_cursor = c; -- } -- } -+ iRet = updateJournalCursor(); - - /* submit message */ - enqMsg((uchar *)message, (uchar *) sys_iden_help, facility, severity, &tv, json, 0); -@@ -456,32 +507,22 @@ readjournal(void) - } - - --/* This function gets journal cursor and saves it into state file. -- * If WorkAroundJournalBug option is turned on it does use cursor saved previously. -- * If it is false and if "trySave" is false it skips altogether. -+/* This function saves journal cursor into state file. -+ * It must be checked that stateFile is configured prior to calling this. - */ - static rsRetVal --persistJournalState(int trySave) -+persistJournalState(void) - { - DEFiRet; - FILE *sf = NULL; /* state file */ - char tmp_sf[MAXFNAME]; - size_t n; - -- if (cs.bWorkAroundJournalBug) { -- /* first check that we have valid cursor */ -- if (!last_cursor) { -- ABORT_FINALIZE(RS_RET_OK); -- } -- } else if (trySave) { -- int ret; -- free(last_cursor); -- if ((ret = sd_journal_get_cursor(j, &last_cursor))) { -- LogError(-ret, RS_RET_ERR, "imjournal: sd_journal_get_cursor() failed"); -- last_cursor = NULL; -- ABORT_FINALIZE(RS_RET_ERR); -- } -- } else { /* not trying to get cursor out of invalid journal state */ -+ DBGPRINTF("Persisting journal position, cursor: %s, at head? %d\n", -+ journalContext.cursor, journalContext.atHead); -+ -+ /* first check that we have valid cursor */ -+ if (!journalContext.cursor) { - ABORT_FINALIZE(RS_RET_OK); - } - -@@ -500,7 +541,7 @@ persistJournalState(int trySave) - ABORT_FINALIZE(RS_RET_FOPEN_FAILURE); - } - -- if(fputs(last_cursor, sf) == EOF) { -+ if(fputs(journalContext.cursor, sf) == EOF) { - LogError(errno, RS_RET_IO_ERROR, "imjournal: failed to save cursor to: '%s'", tmp_sf); - ABORT_FINALIZE(RS_RET_IO_ERROR); - } -@@ -541,43 +582,59 @@ persistJournalState(int trySave) - - static rsRetVal skipOldMessages(void); - --#define POLL_TIMEOUT 900000 /* timeout for poll is 900ms */ -- - static rsRetVal --pollJournal(void) -+handleRotation(void) - { - DEFiRet; -- int err; -+ int r; - -- err = sd_journal_wait(j, POLL_TIMEOUT); -- if (err == SD_JOURNAL_INVALIDATE && !reloaded) { -- STATSCOUNTER_INC(statsCounter.ctrRotations, statsCounter.mutCtrRotations); -- closeJournal(0); -+ LogMsg(0, RS_RET_OK, LOG_NOTICE, "imjournal: journal files changed, reloading...\n"); -+ STATSCOUNTER_INC(statsCounter.ctrRotations, statsCounter.mutCtrRotations); -+ closeJournal(); - -- iRet = openJournal(); -- if (iRet != RS_RET_OK) { -- ABORT_FINALIZE(RS_RET_ERR); -- } -+ iRet = openJournal(); -+ if (iRet != RS_RET_OK) { -+ ABORT_FINALIZE(RS_RET_ERR); -+ } - -- /* If we have locally saved cursor there is no need to read it from state file */ -- if (cs.bWorkAroundJournalBug && last_cursor) -- { -- if (sd_journal_seek_cursor(j, last_cursor) != 0) { -- LogError(0, RS_RET_ERR, "imjournal: " -- "couldn't seek to cursor `%s'\n", last_cursor); -- iRet = RS_RET_ERR; -- } -- /* Need to advance because cursor points at last processed message */ -- sd_journal_next(j); -+ /* If we have locally saved cursor there is no need to read it from state file */ -+ if (journalContext.cursor) -+ { -+ if (sd_journal_seek_cursor(journalContext.j, journalContext.cursor) != 0) { -+ LogError(0, RS_RET_ERR, "imjournal: " -+ "couldn't seek to cursor `%s'\n", journalContext.cursor); -+ iRet = RS_RET_ERR; - } -- else if (cs.stateFile) { -- iRet = loadJournalState(); -+ journalContext.atHead = 0; -+ /* Need to advance because cursor points at last processed message */ -+ if ((r = sd_journal_next(journalContext.j)) < 0) { -+ LogError(-r, RS_RET_ERR, "imjournal: sd_journal_next() failed"); -+ iRet = RS_RET_ERR; - } -- LogMsg(0, RS_RET_OK, LOG_NOTICE, "imjournal: journal reloaded..."); -- reloaded = 1; -+ } -+ else if (cs.stateFile) { -+ iRet = loadJournalState(); -+ } -+ journalContext.reloaded = 1; -+ -+finalize_it: -+ RETiRet; -+} -+ -+#define POLL_TIMEOUT 900000 /* timeout for poll is 900ms */ -+ -+static rsRetVal -+pollJournal(void) -+{ -+ DEFiRet; -+ int err; -+ -+ err = sd_journal_wait(journalContext.j, POLL_TIMEOUT); -+ if (err == SD_JOURNAL_INVALIDATE && !journalContext.reloaded) { -+ CHKiRet(handleRotation()); - } - else { -- reloaded = 0; -+ journalContext.reloaded = 0; - } - - finalize_it: -@@ -591,12 +648,13 @@ skipOldMessages(void) - int r; - DEFiRet; - -- if ((r = sd_journal_seek_tail(j)) < 0) { -+ if ((r = sd_journal_seek_tail(journalContext.j)) < 0) { - LogError(-r, RS_RET_ERR, - "imjournal: sd_journal_seek_tail() failed"); - ABORT_FINALIZE(RS_RET_ERR); - } -- if ((r = sd_journal_previous(j)) < 0) { -+ journalContext.atHead = 0; -+ if ((r = sd_journal_previous(journalContext.j)) < 0) { - LogError(-r, RS_RET_ERR, - "imjournal: sd_journal_previous() failed"); - ABORT_FINALIZE(RS_RET_ERR); -@@ -615,6 +673,9 @@ loadJournalState(void) - int r; - FILE *r_sf; - -+ DBGPRINTF("Loading journal position, at head? %d, reloaded? %d\n", -+ journalContext.atHead, journalContext.reloaded); -+ - if (cs.stateFile[0] != '/') { - char *new_stateFile; - if (-1 == asprintf(&new_stateFile, "%s/%s", (char *)glbl.GetWorkDir(), cs.stateFile)) { -@@ -639,13 +700,14 @@ loadJournalState(void) - if ((r_sf = fopen(cs.stateFile, "rb")) != NULL) { - char readCursor[128 + 1]; - if (fscanf(r_sf, "%128s\n", readCursor) != EOF) { -- if (sd_journal_seek_cursor(j, readCursor) != 0) { -+ if (sd_journal_seek_cursor(journalContext.j, readCursor) != 0) { - LogError(0, RS_RET_ERR, "imjournal: " - "couldn't seek to cursor `%s'\n", readCursor); - iRet = RS_RET_ERR; - } else { -+ journalContext.atHead = 0; - char * tmp_cursor = NULL; -- sd_journal_next(j); -+ sd_journal_next(journalContext.j); - /* - * This is resolving the situation when system is after reboot and boot_id - * doesn't match so cursor pointing into "future". -@@ -658,14 +720,15 @@ loadJournalState(void) - * but if cursor has been intentionally compromised it could stop logging even - * with persistent journal. - * */ -- if ((r = sd_journal_get_cursor(j, &tmp_cursor)) < 0) { -+ if ((r = sd_journal_get_cursor(journalContext.j, &tmp_cursor)) < 0) { - LogError(-r, RS_RET_IO_ERROR, "imjournal: " - "loaded invalid cursor, seeking to the head of journal\n"); -- if ((r = sd_journal_seek_head(j)) < 0) { -+ if ((r = sd_journal_seek_head(journalContext.j)) < 0) { - LogError(-r, RS_RET_ERR, "imjournal: " - "sd_journal_seek_head() failed, when cursor is invalid\n"); - iRet = RS_RET_ERR; - } -+ journalContext.atHead = 1; - } - free(tmp_cursor); - } -@@ -680,18 +743,15 @@ loadJournalState(void) - if (iRet != RS_RET_OK && cs.bIgnoreNonValidStatefile) { - /* ignore state file errors */ - iRet = RS_RET_OK; -- LogError(0, NO_ERRCODE, "imjournal: ignoring invalid state file %s", -- cs.stateFile); -+ LogError(0, NO_ERRCODE, "imjournal: ignoring invalid state file %s", cs.stateFile); - if (cs.bIgnorePrevious) { - skipOldMessages(); - } - } - } else { -- LogError(0, RS_RET_FOPEN_FAILURE, "imjournal: " -- "open on state file `%s' failed\n", cs.stateFile); -+ LogError(0, RS_RET_FOPEN_FAILURE, "imjournal: open on state file `%s' failed\n", cs.stateFile); - if (cs.bIgnorePrevious) { -- /* Seek to the very end of the journal and ignore all -- * older messages. */ -+ /* Seek to the very end of the journal and ignore all older messages. */ - skipOldMessages(); - } - } -@@ -704,7 +764,7 @@ static void - tryRecover(void) { - LogMsg(0, RS_RET_OK, LOG_INFO, "imjournal: trying to recover from journal error"); - STATSCOUNTER_INC(statsCounter.ctrRecoveryAttempts, statsCounter.mutCtrRecoveryAttempts); -- closeJournal(0); -+ closeJournal(); - srSleep(10, 0); // do not hammer machine with too-frequent retries - openJournal(); - } -@@ -723,8 +783,7 @@ CODESTARTrunInput - /* Load our position in the journal from the state file. */ - CHKiRet(loadJournalState()); - } else if (cs.bIgnorePrevious) { -- /* Seek to the very end of the journal and ignore all -- * older messages. */ -+ /* Seek to the very end of the journal and ignore all older messages. */ - skipOldMessages(); - } - -@@ -758,7 +817,7 @@ CODESTARTrunInput - while (glbl.GetGlobalInputTermState() == 0) { - int r; - -- r = sd_journal_next(j); -+ r = sd_journal_next(journalContext.j); - if (r < 0) { - LogError(-r, RS_RET_ERR, "imjournal: sd_journal_next() failed"); - tryRecover(); -@@ -766,8 +825,12 @@ CODESTARTrunInput - } - - if (r == 0) { -+ if (journalContext.atHead) { -+ LogMsg(0, RS_RET_OK, LOG_WARNING, "imjournal: " -+ "Journal indicates no msgs when positioned at head.\n"); -+ } - /* No new messages, wait for activity. */ -- if (pollJournal() != RS_RET_OK && !reloaded) { -+ if (pollJournal() != RS_RET_OK && !journalContext.reloaded) { - tryRecover(); - } - continue; -@@ -776,7 +839,7 @@ CODESTARTrunInput - /* - * update journal disk usage before reading the new message. - */ -- const int e = sd_journal_get_usage(j, (uint64_t *)&statsCounter.diskUsageBytes); -+ const int e = sd_journal_get_usage(journalContext.j, (uint64_t *)&statsCounter.diskUsageBytes); - if (e < 0) { - LogError(-e, RS_RET_ERR, "imjournal: sd_get_usage() failed"); - } -@@ -787,21 +850,12 @@ CODESTARTrunInput - } - - count++; -- -- if ((count % J_PROCESS_PERIOD) == 0) { -- /* Give the journal a periodic chance to detect rotated journal files to be cleaned up. */ -- r = sd_journal_process(j); -- if (r < 0) { -- LogError(-r, RS_RET_ERR, "imjournal: sd_journal_process() failed"); -- tryRecover(); -- continue; -- } -- } -+ journalContext.atHead = 0; - - if (cs.stateFile) { /* can't persist without a state file */ - /* TODO: This could use some finer metric. */ - if ((count % cs.iPersistStateInterval) == 0) { -- persistJournalState(1); -+ persistJournalState(); - } - } - } -@@ -825,6 +879,7 @@ CODESTARTbeginCnfLoad - cs.usePid = NULL; - cs.bWorkAroundJournalBug = 1; - cs.bFsync = 0; -+ cs.bRemote = 0; - ENDbeginCnfLoad - - -@@ -881,7 +936,7 @@ BEGINfreeCnf - CODESTARTfreeCnf - free(cs.stateFile); - free(cs.usePid); -- free(last_cursor); -+ free(journalContext.cursor); - statsobj.Destruct(&(statsCounter.stats)); - ENDfreeCnf - -@@ -894,7 +949,10 @@ ENDwillRun - /* close journal */ - BEGINafterRun - CODESTARTafterRun -- closeJournal(1); -+ if (cs.stateFile) { /* can't persist without a state file */ -+ persistJournalState(); -+ } -+ closeJournal(); - ratelimitDestruct(ratelimiter); - ENDafterRun - -@@ -966,6 +1024,8 @@ CODESTARTsetModCnf - cs.bWorkAroundJournalBug = (int) pvals[i].val.d.n; - } else if (!strcmp(modpblk.descr[i].name, "fsync")) { - 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 { - dbgprintf("imjournal: program error, non-handled " - "param '%s' in beginCnfLoad\n", modpblk.descr[i].name); -diff --git a/plugins/imjournal/imjournal.c b/plugins/imjournal/imjournal.c -index 8008f159c4..18e4d25ebb 100644 ---- a/plugins/imjournal/imjournal.c -+++ b/plugins/imjournal/imjournal.c -@@ -3,7 +3,7 @@ - * To test under Linux: - * emmit log message into systemd journal - * -- * Copyright (C) 2008-2017 Adiscon GmbH -+ * Copyright (C) 2008-2019 Adiscon GmbH - * - * This file is part of rsyslog. - * -@@ -676,16 +676,6 @@ loadJournalState(void) - DBGPRINTF("Loading journal position, at head? %d, reloaded? %d\n", - journalContext.atHead, journalContext.reloaded); - -- if (cs.stateFile[0] != '/') { -- char *new_stateFile; -- if (-1 == asprintf(&new_stateFile, "%s/%s", (char *)glbl.GetWorkDir(), cs.stateFile)) { -- LogError(0, RS_RET_OUT_OF_MEMORY, "imjournal: asprintf failed\n"); -- ABORT_FINALIZE(RS_RET_OUT_OF_MEMORY); -- } -- free (cs.stateFile); -- cs.stateFile = new_stateFile; -- } -- - /* if state file not exists (on very first run), skip */ - if (access(cs.stateFile, F_OK|R_OK) == -1 && errno == ENOENT) { - if (cs.bIgnorePrevious) { -@@ -885,6 +875,17 @@ ENDbeginCnfLoad - - BEGINendCnfLoad - CODESTARTendCnfLoad -+ /* bad trick to handle old and new style config all in old-style var */ -+ if(cs.stateFile != NULL && cs.stateFile[0] != '/') { -+ char *new_stateFile; -+ if (-1 == asprintf(&new_stateFile, "%s/%s", (char *)glbl.GetWorkDir(), cs.stateFile)) { -+ LogError(0, RS_RET_OUT_OF_MEMORY, "imjournal: asprintf failed\n"); -+ ABORT_FINALIZE(RS_RET_OUT_OF_MEMORY); -+ } -+ free (cs.stateFile); -+ cs.stateFile = new_stateFile; -+ } -+finalize_it: - ENDendCnfLoad - - -@@ -1032,7 +1033,6 @@ CODESTARTsetModCnf - } - } - -- - finalize_it: - if (pvals != NULL) - cnfparamvalsDestruct(pvals, &modpblk); diff --git a/rsyslog.spec b/rsyslog.spec index d0ed185..2594971 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -9,7 +9,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.2002.0 -Release: 3%{?dist} +Release: 4%{?dist} License: (GPLv3+ and ASL 2.0) URL: http://www.rsyslog.com/ Source0: http://www.rsyslog.com/files/download/rsyslog/%{name}-%{version}.tar.gz @@ -34,7 +34,7 @@ BuildRequires: python3-docutils # make sure systemd is in a version that isn't affected by rhbz#974132 BuildRequires: systemd-devel >= 204-8 BuildRequires: zlib-devel -BuildRequires: qpid-proton-c-devel +BuildRequires: qpid-proton-c-devel Requires: logrotate >= 3.5.2 Requires: bash >= 2.0 @@ -45,6 +45,7 @@ Obsoletes: sysklogd < 1.5-11 # tweak the upstream service file to honour configuration from /etc/sysconfig/rsyslog Patch0: rsyslog-8.34.0-sd-service.patch +Patch1: service-exec-reload.patch %package crypto Summary: Encryption support @@ -228,15 +229,15 @@ spoof the sender address. Also, it enables to circle through a number of source ports. %description omamqp1 -The omamqp1 output module can be used to send log messages via an AMQP +The omamqp1 output module can be used to send log messages via an AMQP 1.0-compatible messaging bus. %description kafka -The rsyslog-kafka package provides module for Apache Kafka output. +The rsyslog-kafka package provides module for Apache Kafka output. %description mmkubernetes -The rsyslog-mmkubernetes package provides module for adding kubernetes -container metadata. +The rsyslog-mmkubernetes package provides module for adding kubernetes +container metadata. %prep # set up rsyslog-doc sources @@ -246,6 +247,7 @@ mv build doc # set up rsyslog sources %setup -q -D %patch0 -p1 +%patch1 -p1 autoreconf -iv @@ -487,6 +489,10 @@ done %doc %{rsyslog_docdir}/k8s_container_name.rulebase %changelog +* Thu Aug 20 2020 Attila Lakatos - 8.2002.0-4 +- enable configuration reload in the service + resolves: rhbz#1868636 + * Sat Aug 01 2020 Fedora Release Engineering - 8.2002.0-3 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild @@ -646,7 +652,7 @@ done * Tue Apr 18 2017 Radovan Sroka - 8.26.0-1 - rebase to 8.26.0 - added doc patch rhbz#1436113 -- dropped chdir patch, https://github.com/rsyslog/rsyslog/pull/1420 +- dropped chdir patch, https://github.com/rsyslog/rsyslog/pull/1420 - moved dependency libgcrypt to rsyslog core * Wed Mar 01 2017 Jiri Vymazal - 8.25.0-2 @@ -700,7 +706,7 @@ done * Tue Dec 20 2016 Radovan Sroka - 8.23.0-1 - rebase to 8.23.0 -- change build requires from libfastjson to libfastjson-devel +- change build requires from libfastjson to libfastjson-devel * Thu Nov 10 2016 Tomas Sykora 8.22.0-1 - rebase to 8.22.0 @@ -709,7 +715,7 @@ done * Wed Oct 05 2016 Radovan Sroka 8.21.0-1 - rebase to 8.21.0 -- dropped rsyslog-8.12.0-gnutls-detection.patch +- dropped rsyslog-8.12.0-gnutls-detection.patch - dropped rsyslog-8.8.0-immutable-json-props.patch - remove from specs but nor from git - could be useful in future diff --git a/service-exec-reload.patch b/service-exec-reload.patch new file mode 100644 index 0000000..f3a0c21 --- /dev/null +++ b/service-exec-reload.patch @@ -0,0 +1,11 @@ +diff -up rsyslog-8.2002.0/rsyslog.service.in.orig rsyslog-8.2002.0/rsyslog.service.in +--- rsyslog-8.2002.0/rsyslog.service.in.orig 2020-08-20 14:23:22.358994995 +0200 ++++ rsyslog-8.2002.0/rsyslog.service.in 2020-08-20 14:23:48.345178883 +0200 +@@ -8,6 +8,7 @@ Documentation=https://www.rsyslog.com/do + Type=notify + EnvironmentFile=-/etc/sysconfig/rsyslog + ExecStart=@sbindir@/rsyslogd -n $SYSLOGD_OPTIONS ++ExecReload=/usr/bin/kill -HUP $MAINPID + UMask=0066 + StandardOutput=null + Restart=on-failure From db636a778d25d03e5f428b652e06f037a11ba013 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20=C5=98=C3=ADdk=C3=BD?= Date: Thu, 27 Aug 2020 14:13:48 +0200 Subject: [PATCH 37/99] Rebuilt for new net-snmp release --- rsyslog.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rsyslog.spec b/rsyslog.spec index 2594971..950e4d0 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -9,7 +9,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.2002.0 -Release: 4%{?dist} +Release: 5%{?dist} License: (GPLv3+ and ASL 2.0) URL: http://www.rsyslog.com/ Source0: http://www.rsyslog.com/files/download/rsyslog/%{name}-%{version}.tar.gz @@ -489,6 +489,9 @@ done %doc %{rsyslog_docdir}/k8s_container_name.rulebase %changelog +* Thu Aug 27 2020 Josef Řídký - 8.2002.0-5 +- Rebuilt for new net-snmp release + * Thu Aug 20 2020 Attila Lakatos - 8.2002.0-4 - enable configuration reload in the service resolves: rhbz#1868636 From 21122641c383e07f1c833b8bffbd7c1f0d1651d1 Mon Sep 17 00:00:00 2001 From: alakatos Date: Thu, 17 Sep 2020 12:05:31 +0200 Subject: [PATCH 38/99] rebase to upstream version 8.2008.0 resolves: rhbz#1829092 resolves: rhbz#1823862 resolves: rhbz#1876773 add service file back(upstream does not ship it anymore) --- .gitignore | 2 ++ rsyslog-8.34.0-sd-service.patch | 14 -------------- rsyslog.service | 22 ++++++++++++++++++++++ rsyslog.spec | 22 ++++++++++++---------- service-exec-reload.patch | 11 ----------- sources | 4 ++-- 6 files changed, 38 insertions(+), 37 deletions(-) delete mode 100644 rsyslog-8.34.0-sd-service.patch create mode 100644 rsyslog.service delete mode 100644 service-exec-reload.patch diff --git a/.gitignore b/.gitignore index d17d7e0..68cc2c1 100644 --- a/.gitignore +++ b/.gitignore @@ -73,3 +73,5 @@ rsyslog-4.6.3.tar.gz /rsyslog-doc-8.2001.0.tar.gz /rsyslog-8.2002.0.tar.gz /rsyslog-doc-8.2002.0.tar.gz +/rsyslog-8.2008.0.tar.gz +/rsyslog-doc-8.2008.0.tar.gz diff --git a/rsyslog-8.34.0-sd-service.patch b/rsyslog-8.34.0-sd-service.patch deleted file mode 100644 index f1191d4..0000000 --- a/rsyslog-8.34.0-sd-service.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up rsyslog-7.4.1/rsyslog.service.in.orig rsyslog-7.4.1/rsyslog.service.in ---- rsyslog-7.4.1/rsyslog.service.in.orig 2013-06-17 15:28:54.430023493 +0200 -+++ rsyslog-7.4.1/rsyslog.service.in 2013-06-17 15:30:05.874378084 +0200 -@@ -6,7 +6,9 @@ Requires=syslog.socket - - [Service] - Type=notify --ExecStart=@sbindir@/rsyslogd -n -iNONE -+EnvironmentFile=-/etc/sysconfig/rsyslog -+ExecStart=@sbindir@/rsyslogd -n $SYSLOGD_OPTIONS -+UMask=0066 - StandardOutput=null - Restart=on-failure - diff --git a/rsyslog.service b/rsyslog.service new file mode 100644 index 0000000..9c13b1d --- /dev/null +++ b/rsyslog.service @@ -0,0 +1,22 @@ +[Unit] +Description=System Logging Service +;Requires=syslog.socket +Documentation=man:rsyslogd(8) +Documentation=https://www.rsyslog.com/doc/ + +[Service] +Type=notify +EnvironmentFile=-/etc/sysconfig/rsyslog +ExecStart=/usr/sbin/rsyslogd -n $SYSLOGD_OPTIONS +ExecReload=/usr/bin/kill -HUP $MAINPID +UMask=0066 +StandardOutput=null +Restart=on-failure + +# Increase the default a bit in order to allow many simultaneous +# files to be monitored, we might need a lot of fds. +LimitNOFILE=16384 + +[Install] +WantedBy=multi-user.target +;Alias=syslog.service diff --git a/rsyslog.spec b/rsyslog.spec index 950e4d0..23298e8 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -8,8 +8,8 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog -Version: 8.2002.0 -Release: 5%{?dist} +Version: 8.2008.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 @@ -17,6 +17,7 @@ Source1: http://www.rsyslog.com/files/download/rsyslog/%{name}-doc-%{version}.ta Source2: rsyslog.conf Source3: rsyslog.sysconfig Source4: rsyslog.log +Source5: rsyslog.service BuildRequires: gcc BuildRequires: autoconf @@ -43,10 +44,6 @@ Requires: bash >= 2.0 Provides: syslog Obsoletes: sysklogd < 1.5-11 -# tweak the upstream service file to honour configuration from /etc/sysconfig/rsyslog -Patch0: rsyslog-8.34.0-sd-service.patch -Patch1: service-exec-reload.patch - %package crypto Summary: Encryption support Requires: %name = %version-%release @@ -246,8 +243,6 @@ rm -r LICENSE README.md source build/objects.inv mv build doc # set up rsyslog sources %setup -q -D -%patch0 -p1 -%patch1 -p1 autoreconf -iv @@ -322,6 +317,7 @@ make V=1 DESTDIR=%{buildroot} install install -d -m 755 %{buildroot}%{_sysconfdir}/sysconfig install -d -m 755 %{buildroot}%{_sysconfdir}/logrotate.d +install -d -m 755 %{buildroot}%{_unitdir} install -d -m 755 %{buildroot}%{_sysconfdir}/rsyslog.d install -d -m 700 %{buildroot}%{rsyslog_statedir} install -d -m 700 %{buildroot}%{rsyslog_pkidir} @@ -330,6 +326,7 @@ install -d -m 755 %{buildroot}%{rsyslog_docdir}/html 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 plugins/ommysql/createDB.sql %{buildroot}%{rsyslog_docdir}/mysql-createDB.sql install -p -m 644 plugins/ompgsql/createDB.sql %{buildroot}%{rsyslog_docdir}/pgsql-createDB.sql dos2unix tools/recover_qi.pl @@ -339,8 +336,6 @@ install -p -m 644 contrib/mmkubernetes/*.rulebase %{buildroot}%{rsyslog_docdir} cp -r doc/* %{buildroot}%{rsyslog_docdir}/html # get rid of libtool libraries rm -f %{buildroot}%{_libdir}/rsyslog/*.la -# get rid of socket activation by default -sed -i '/^Alias/s/^/;/;/^Requires=syslog.socket/s/^/;/' %{buildroot}%{_unitdir}/rsyslog.service # imdiag and liboverride is only used for testing rm -f %{buildroot}%{_libdir}/rsyslog/imdiag.so rm -f %{buildroot}%{_libdir}/rsyslog/liboverride_gethostname.so @@ -489,6 +484,13 @@ done %doc %{rsyslog_docdir}/k8s_container_name.rulebase %changelog +* Thu Sep 17 2020 Attila Lakatos - 8.2008.0-1 +- rebase to upstream version 8.2008.0 + resolves: rhbz#1829092 + resolves: rhbz#1823862 + resolves: rhbz#1876773 +- add service file back(upstream does not ship it anymore) + * Thu Aug 27 2020 Josef Řídký - 8.2002.0-5 - Rebuilt for new net-snmp release diff --git a/service-exec-reload.patch b/service-exec-reload.patch deleted file mode 100644 index f3a0c21..0000000 --- a/service-exec-reload.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up rsyslog-8.2002.0/rsyslog.service.in.orig rsyslog-8.2002.0/rsyslog.service.in ---- rsyslog-8.2002.0/rsyslog.service.in.orig 2020-08-20 14:23:22.358994995 +0200 -+++ rsyslog-8.2002.0/rsyslog.service.in 2020-08-20 14:23:48.345178883 +0200 -@@ -8,6 +8,7 @@ Documentation=https://www.rsyslog.com/do - Type=notify - EnvironmentFile=-/etc/sysconfig/rsyslog - ExecStart=@sbindir@/rsyslogd -n $SYSLOGD_OPTIONS -+ExecReload=/usr/bin/kill -HUP $MAINPID - UMask=0066 - StandardOutput=null - Restart=on-failure diff --git a/sources b/sources index 920af80..86230b8 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (rsyslog-8.2002.0.tar.gz) = a01bb2f67d21ab6d96dd1302bc351b509892834ef44956983db912a63ba23201653ca1e6b176a574c47568665b4d92579bb8bb0fe6911646bc841a3754c2754f -SHA512 (rsyslog-doc-8.2002.0.tar.gz) = 5d6bd8fe09b49644f000416c87c8600cd3df3facb07845afd85012279df203a44b234e94a7be90ad83709d5f2ad1a2bf8cb51571c5c0cd76383f76f81455945e +SHA512 (rsyslog-8.2008.0.tar.gz) = a077832de7076ac5e7d4c8f33edd044d0c18fd171a697ef68c1cd0f81f1938b3f008cddc1a61084181de512b643c15004744f0e79e6a44e9d239cec3d35f74fe +SHA512 (rsyslog-doc-8.2008.0.tar.gz) = 5b8bed19017c65469eb8ea7725ef162595b30f520605f37447498ab69b5cfe8f939cee7e7915ecbf3c025871408fd7af6d45ba960a83096f83a397df4cefef09 From bbfc785ba0e545d0218172ef47d34fc20d4d96fc Mon Sep 17 00:00:00 2001 From: alakatos Date: Fri, 18 Sep 2020 09:34:01 +0200 Subject: [PATCH 39/99] Rebuild rsyslog --- rsyslog.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rsyslog.spec b/rsyslog.spec index 23298e8..857ddf3 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -9,7 +9,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.2008.0 -Release: 1%{?dist} +Release: 2%{?dist} License: (GPLv3+ and ASL 2.0) URL: http://www.rsyslog.com/ Source0: http://www.rsyslog.com/files/download/rsyslog/%{name}-%{version}.tar.gz @@ -484,6 +484,9 @@ done %doc %{rsyslog_docdir}/k8s_container_name.rulebase %changelog +* Fri Sep 18 2020 Attila Lakatos - 8.2008.0-2 +- rebuild package + * Thu Sep 17 2020 Attila Lakatos - 8.2008.0-1 - rebase to upstream version 8.2008.0 resolves: rhbz#1829092 From b183776247b7e321c1f20e8486efead8a7ae1407 Mon Sep 17 00:00:00 2001 From: alakatos Date: Wed, 25 Nov 2020 14:53:53 +0100 Subject: [PATCH 40/99] rebase to upstream version 8.2010.0 resolves: rhbz#1890330 --- .gitignore | 2 ++ rsyslog.spec | 8 ++++++-- sources | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 68cc2c1..4d93b7d 100644 --- a/.gitignore +++ b/.gitignore @@ -75,3 +75,5 @@ rsyslog-4.6.3.tar.gz /rsyslog-doc-8.2002.0.tar.gz /rsyslog-8.2008.0.tar.gz /rsyslog-doc-8.2008.0.tar.gz +/rsyslog-8.2010.0.tar.gz +/rsyslog-doc-8.2010.0.tar.gz diff --git a/rsyslog.spec b/rsyslog.spec index 857ddf3..8f3a10e 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -8,8 +8,8 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog -Version: 8.2008.0 -Release: 2%{?dist} +Version: 8.2010.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 @@ -484,6 +484,10 @@ done %doc %{rsyslog_docdir}/k8s_container_name.rulebase %changelog +* Wed Nov 25 2020 Attila Lakatos - 8.2010.0-1 +- rebase to upstream version 8.2010.0 + resolves: rhbz#1890330 + * Fri Sep 18 2020 Attila Lakatos - 8.2008.0-2 - rebuild package diff --git a/sources b/sources index 86230b8..3018386 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (rsyslog-8.2008.0.tar.gz) = a077832de7076ac5e7d4c8f33edd044d0c18fd171a697ef68c1cd0f81f1938b3f008cddc1a61084181de512b643c15004744f0e79e6a44e9d239cec3d35f74fe -SHA512 (rsyslog-doc-8.2008.0.tar.gz) = 5b8bed19017c65469eb8ea7725ef162595b30f520605f37447498ab69b5cfe8f939cee7e7915ecbf3c025871408fd7af6d45ba960a83096f83a397df4cefef09 +SHA512 (rsyslog-8.2010.0.tar.gz) = e3c8ed6b631053e38abfe8ce183a1544d04a0207dc988d36f5141a7ea8c987915f4c0429ccd094b7e374c277b7ee5b50e65e7205c156af01ffe9bdf8338831c8 +SHA512 (rsyslog-doc-8.2010.0.tar.gz) = 072fb05a0117dc0970a4e5e302abbaf5dc065c2a0962c4160e7efb86fedad89a2caa546cd2bf4af07b7f5e2fa5267cf02889d911f7a6916725e6aea1760ab253 From 480dbb3683bf04f00acfb8e49b6818ea67d06335 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Fri, 8 Jan 2021 20:57:13 +0000 Subject: [PATCH 41/99] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- rsyslog.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/rsyslog.spec b/rsyslog.spec index 8f3a10e..50405ee 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -19,6 +19,7 @@ Source3: rsyslog.sysconfig Source4: rsyslog.log Source5: rsyslog.service +BuildRequires: make BuildRequires: gcc BuildRequires: autoconf BuildRequires: automake From 595d2133f9ef69116f210d93c62ce347997bbb3a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 27 Jan 2021 15:31:28 +0000 Subject: [PATCH 42/99] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rsyslog.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rsyslog.spec b/rsyslog.spec index 50405ee..3a2b18c 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -9,7 +9,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.2010.0 -Release: 1%{?dist} +Release: 2%{?dist} License: (GPLv3+ and ASL 2.0) URL: http://www.rsyslog.com/ Source0: http://www.rsyslog.com/files/download/rsyslog/%{name}-%{version}.tar.gz @@ -485,6 +485,9 @@ done %doc %{rsyslog_docdir}/k8s_container_name.rulebase %changelog +* Wed Jan 27 2021 Fedora Release Engineering - 8.2010.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Wed Nov 25 2020 Attila Lakatos - 8.2010.0-1 - rebase to upstream version 8.2010.0 resolves: rhbz#1890330 From 95788bcbece726cee3adcb86cee98c0ca480cb9b Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Mon, 8 Feb 2021 10:29:17 +0100 Subject: [PATCH 43/99] rebuild for libpq ABI fix Related: rhbz#1908268 --- rsyslog.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rsyslog.spec b/rsyslog.spec index 3a2b18c..dd232a4 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -9,7 +9,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.2010.0 -Release: 2%{?dist} +Release: 3%{?dist} License: (GPLv3+ and ASL 2.0) URL: http://www.rsyslog.com/ Source0: http://www.rsyslog.com/files/download/rsyslog/%{name}-%{version}.tar.gz @@ -485,6 +485,9 @@ done %doc %{rsyslog_docdir}/k8s_container_name.rulebase %changelog +* Mon Feb 08 2021 Pavel Raiskup - 8.2010.0-3 +- rebuild for libpq ABI fix rhbz#1908268 + * Wed Jan 27 2021 Fedora Release Engineering - 8.2010.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From 70ab8c4473d3ee955155d74964ced0338ac4b62d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 2 Mar 2021 16:12:56 +0100 Subject: [PATCH 44/99] Rebuilt for updated systemd-rpm-macros See https://pagure.io/fesco/issue/2583. --- rsyslog.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rsyslog.spec b/rsyslog.spec index dd232a4..b4fa346 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -9,7 +9,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.2010.0 -Release: 3%{?dist} +Release: 4%{?dist} License: (GPLv3+ and ASL 2.0) URL: http://www.rsyslog.com/ Source0: http://www.rsyslog.com/files/download/rsyslog/%{name}-%{version}.tar.gz @@ -485,6 +485,10 @@ done %doc %{rsyslog_docdir}/k8s_container_name.rulebase %changelog +* Tue Mar 02 2021 Zbigniew JÄ™drzejewski-Szmek - 8.2010.0-4 +- Rebuilt for updated systemd-rpm-macros + See https://pagure.io/fesco/issue/2583. + * Mon Feb 08 2021 Pavel Raiskup - 8.2010.0-3 - rebuild for libpq ABI fix rhbz#1908268 From d8cfafacf914f908af25995c0e7a1199cffba1e7 Mon Sep 17 00:00:00 2001 From: alakatos Date: Wed, 3 Mar 2021 11:25:18 +0100 Subject: [PATCH 45/99] rebase to upstream version 8.2102.0 resolves: rhbz#1905363 add additional plugin imkafka --- .gitignore | 3 + rsyslog.spec | 220 ++++++++++++++++++++++++++++++++++----------------- sources | 5 +- 3 files changed, 153 insertions(+), 75 deletions(-) diff --git a/.gitignore b/.gitignore index 4d93b7d..c93e2fc 100644 --- a/.gitignore +++ b/.gitignore @@ -77,3 +77,6 @@ rsyslog-4.6.3.tar.gz /rsyslog-doc-8.2008.0.tar.gz /rsyslog-8.2010.0.tar.gz /rsyslog-doc-8.2010.0.tar.gz +/qpid-proton-0.31.0.tar.gz +/rsyslog-8.2102.0.tar.gz +/rsyslog-doc-8.2102.0.tar.gz diff --git a/rsyslog.spec b/rsyslog.spec index b4fa346..17efd61 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -1,15 +1,14 @@ %define rsyslog_statedir %{_sharedstatedir}/rsyslog %define rsyslog_pkidir %{_sysconfdir}/pki/rsyslog %define rsyslog_docdir %{_docdir}/rsyslog -#due to multiple failures of extensive testbench on various archs -#and module requirements of certain tests need to have it disabled, -#tests execution possible locally on properly set up workstation -%global want_testbench 0 +# The following packages are not enabled on rhel: +# hiredis, libdbi, mongodb, rabbitmq +# The omamqp1 plugin is built differently as qpid-proton is not available on rhel Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog -Version: 8.2010.0 -Release: 4%{?dist} +Version: 8.2102.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,6 +17,13 @@ Source2: rsyslog.conf Source3: rsyslog.sysconfig Source4: rsyslog.log Source5: rsyslog.service +# Add qpid-proton as another source, enable omamqp1 module in a +# separatae sub-package with it statically linked(see rhbz#1713427) +%if 0%{?rhel} != 0 +Source6: qpid-proton-0.31.0.tar.gz +%else +BuildRequires: qpid-proton-c-devel +%endif BuildRequires: make BuildRequires: gcc @@ -36,7 +42,6 @@ BuildRequires: python3-docutils # make sure systemd is in a version that isn't affected by rhbz#974132 BuildRequires: systemd-devel >= 204-8 BuildRequires: zlib-devel -BuildRequires: qpid-proton-c-devel Requires: logrotate >= 3.5.2 Requires: bash >= 2.0 @@ -58,11 +63,6 @@ Summary: ElasticSearch output module for rsyslog Requires: %name = %version-%release BuildRequires: libcurl-devel -%package hiredis -Summary: Redis support for rsyslog -Requires: %name = %version-%release -BuildRequires: hiredis-devel - %package mmjsonparse Summary: JSON enhanced logging support Requires: %name = %version-%release @@ -80,31 +80,16 @@ Requires: %name = %version-%release Summary: Message modification module for snmptrapd generated messages Requires: %name = %version-%release -%package libdbi -Summary: Libdbi database support for rsyslog -Requires: %name = %version-%release -BuildRequires: libdbi-devel - %package mysql Summary: MySQL support for rsyslog Requires: %name = %version-%release BuildRequires: mariadb-connector-c-devel -%package mongodb -Summary: MongoDB support for rsyslog -Requires: %name = %version-%release -BuildRequires: mongo-c-driver-devel snappy-devel cyrus-sasl-devel - %package pgsql Summary: PostgresSQL support for rsyslog Requires: %name = %version-%release BuildRequires: libpq-devel -%package rabbitmq -Summary: RabbitMQ support for rsyslog -Requires: %name = %version-%release -BuildRequires: librabbitmq-devel >= 0.2 - %package gssapi Summary: GSSAPI authentication and encryption support for rsyslog Requires: %name = %version-%release @@ -133,7 +118,19 @@ BuildRequires: libnet-devel %package omamqp1 Summary: Provides the omamqp1 module Requires: %name = %version-%release +%if 0%{?rhel} != 0 +Requires: cyrus-sasl-lib +Requires: openssl-libs +BuildRequires: cmake +BuildRequires: make +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: cyrus-sasl-devel +BuildRequires: openssl-devel +BuildRequires: python3 +%else BuildRequires: qpid-proton-c-devel +%endif %package kafka Summary: Provides the omkafka module @@ -145,6 +142,29 @@ Summary: Provides the mmkubernetes module Requires: %name = %version-%release BuildRequires: libcurl-devel +%if 0%{?rhel} == 0 +%package hiredis +Summary: Redis support for rsyslog +Requires: %name = %version-%release +BuildRequires: hiredis-devel + +%package libdbi +Summary: Libdbi database support for rsyslog +Requires: %name = %version-%release +BuildRequires: libdbi-devel + +%package mongodb +Summary: MongoDB support for rsyslog +Requires: %name = %version-%release +BuildRequires: mongo-c-driver-devel snappy-devel cyrus-sasl-devel + +%package rabbitmq +Summary: RabbitMQ support for rsyslog +Requires: %name = %version-%release +BuildRequires: librabbitmq-devel >= 0.2 +%endif + + %description Rsyslog is an enhanced, multi-threaded syslog daemon. It supports MySQL, syslog/TCP, RFC 3195, permitted sender lists, filtering on any message part, @@ -164,9 +184,6 @@ This subpackage contains documentation for rsyslog. This module provides the capability for rsyslog to feed logs directly into Elasticsearch. -%description hiredis -This module provides output to Redis. - %description mmjsonparse This module provides the capability to recognize and parse JSON enhanced syslog messages. @@ -182,26 +199,14 @@ in various settings. This message modification module takes messages generated from snmptrapd and modifies them so that they look like they originated from the read originator. -%description libdbi -This module supports a large number of database systems via -libdbi. Libdbi abstracts the database layer and provides drivers for -many systems. Drivers are available via the libdbi-drivers project. - %description mysql The rsyslog-mysql package contains a dynamic shared object that will add MySQL database support to rsyslog. -%description mongodb -The rsyslog-mongodb package contains a dynamic shared object that will add -MongoDB database support to rsyslog. - %description pgsql The rsyslog-pgsql package contains a dynamic shared object that will add PostgreSQL database support to rsyslog. -%description rabbitmq -This module allows rsyslog to send messages to a RabbitMQ server. - %description gssapi The rsyslog-gssapi package contains the rsyslog plugins which support GSSAPI authentication and secure connections. GSSAPI is commonly used for Kerberos @@ -237,6 +242,23 @@ The rsyslog-kafka package provides module for Apache Kafka output. The rsyslog-mmkubernetes package provides module for adding kubernetes container metadata. +%if 0%{?rhel} == 0 +%description hiredis +This module provides output to Redis. + +%description libdbi +This module supports a large number of database systems via +libdbi. Libdbi abstracts the database layer and provides drivers for +many systems. Drivers are available via the libdbi-drivers project. + +%description mongodb +The rsyslog-mongodb package contains a dynamic shared object that will add +MongoDB database support to rsyslog. + +%description rabbitmq +This module allows rsyslog to send messages to a RabbitMQ server. +%endif + %prep # set up rsyslog-doc sources %setup -q -a 1 -T -c @@ -244,10 +266,39 @@ rm -r LICENSE README.md source build/objects.inv mv build doc # set up rsyslog sources %setup -q -D - -autoreconf -iv +# Unpack qpid-proton for rhel +%if 0%{?rhel} != 0 +%setup -q -D -T -b 6 +%endif %build +%if 0%{?rhel} != 0 +%ifarch sparc64 +#sparc64 need big PIC +export CFLAGS="$RPM_OPT_FLAGS -fPIC" +%else +export CFLAGS="$RPM_OPT_FLAGS -fpic" +%endif +# build the proton first +( + cd %{_builddir}/qpid-proton-0.31.0 + mkdir bld + 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 + 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'))") \ + -DCMAKE_AR="/usr/bin/gcc-ar" -DCMAKE_NM="/usr/bin/gcc-nm" -DCMAKE_RANLIB="/usr/bin/gcc-ranlib" + make -j8 +) +%endif + %ifarch sparc64 #sparc64 need big PIE export CFLAGS="$RPM_OPT_FLAGS -fPIE" @@ -257,27 +308,37 @@ export CFLAGS="$RPM_OPT_FLAGS -fpie" export LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now" # the hiredis-devel package doesn't provide a pkg-config file +%if 0%{?rhel} == 0 export HIREDIS_CFLAGS=-I/usr/include/hiredis export HIREDIS_LIBS="-L%{_libdir} -lhiredis" +%endif +sed -i 's/%{version}/%{version}-%{release}/g' configure.ac +autoreconf -if %configure \ --prefix=/usr \ --disable-static \ -%if %{want_testbench} - --enable-testbench \ + --disable-testbench \ +%if 0%{?rhel} == 0 + --enable-clickhouse \ + --enable-imdocker \ + --enable-improg \ + --enable-libdbi \ + --enable-omamqp1 \ + --enable-omhiredis \ + --enable-ommongodb \ + --enable-omrabbitmq \ +%else + --enable-omamqp1 PROTON_LIBS="%{_builddir}/qpid-proton-0.31.0/bld/c/libqpid-proton-core-static.a %{_builddir}/qpid-proton-0.31.0/bld/c/libqpid-proton-proactor-static.a %{_builddir}/qpid-proton-0.31.0/bld/c/libqpid-proton-static.a -lssl -lsasl2 -lcrypto" PROTON_CFLAGS="-I%{_builddir}/qpid-proton-0.31.0/bld/c/include" \ %endif --enable-elasticsearch \ - --enable-clickhouse \ --enable-generate-man-pages \ --enable-gnutls \ --enable-gssapi-krb5 \ - --enable-imdiag \ - --enable-imdocker \ --enable-imfile \ --enable-imjournal \ - --enable-improg \ + --enable-imkafka \ --enable-impstats \ --enable-imptcp \ - --enable-libdbi \ --enable-mail \ --enable-mmanon \ --enable-mmaudit \ @@ -286,14 +347,11 @@ export HIREDIS_LIBS="-L%{_libdir} -lhiredis" --enable-mmjsonparse \ --enable-mmnormalize \ --enable-mmsnmptrapd \ + --enable-mmutf8fix \ --enable-mysql \ - --enable-omamqp1 \ - --enable-omhiredis \ --enable-omhttp \ --enable-omjournal \ - --enable-ommongodb \ --enable-omprog \ - --enable-omrabbitmq \ --enable-omstdout \ --enable-omudpspoof \ --enable-omuxsock \ @@ -341,6 +399,9 @@ rm -f %{buildroot}%{_libdir}/rsyslog/*.la rm -f %{buildroot}%{_libdir}/rsyslog/imdiag.so rm -f %{buildroot}%{_libdir}/rsyslog/liboverride_gethostname.so +# convert line endings from "\r\n" to "\n" +cat tools/recover_qi.pl | tr -d '\r' > %{buildroot}%{_bindir}/rsyslog-recover-qi.pl + %post for n in /var/log/{messages,secure,maillog,spooler} do @@ -368,6 +429,7 @@ done %dir %{rsyslog_statedir} %dir %{rsyslog_pkidir} %{_sbindir}/rsyslogd +%attr(755,root,root) %{_bindir}/rsyslog-recover-qi.pl %{_mandir}/man5/rsyslog.conf.5.gz %{_mandir}/man8/rsyslogd.8.gz %{_unitdir}/rsyslog.service @@ -375,12 +437,12 @@ done %config(noreplace) %{_sysconfdir}/sysconfig/rsyslog %config(noreplace) %{_sysconfdir}/logrotate.d/rsyslog # plugins -%{_libdir}/rsyslog/imdocker.so +%{_libdir}/rsyslog/fmhash.so +%{_libdir}/rsyslog/fmhttp.so %{_libdir}/rsyslog/imfile.so %{_libdir}/rsyslog/imjournal.so %{_libdir}/rsyslog/imklog.so %{_libdir}/rsyslog/immark.so -%{_libdir}/rsyslog/improg.so %{_libdir}/rsyslog/impstats.so %{_libdir}/rsyslog/imptcp.so %{_libdir}/rsyslog/imtcp.so @@ -396,7 +458,7 @@ done %{_libdir}/rsyslog/mmanon.so %{_libdir}/rsyslog/mmcount.so %{_libdir}/rsyslog/mmexternal.so -%{_libdir}/rsyslog/omclickhouse.so +%{_libdir}/rsyslog/mmutf8fix.so %{_libdir}/rsyslog/omhttp.so %{_libdir}/rsyslog/omjournal.so %{_libdir}/rsyslog/ommail.so @@ -408,8 +470,11 @@ done %{_libdir}/rsyslog/pmcisconames.so %{_libdir}/rsyslog/pmlastmsg.so %{_libdir}/rsyslog/pmsnare.so -%{_libdir}/rsyslog/fmhttp.so -%{_libdir}/rsyslog/fmhash.so +%if 0%{?rhel} == 0 +%{_libdir}/rsyslog/imdocker.so +%{_libdir}/rsyslog/improg.so +%{_libdir}/rsyslog/omclickhouse.so +%endif %files crypto %{_bindir}/rscryutil @@ -422,12 +487,6 @@ done %files elasticsearch %{_libdir}/rsyslog/omelasticsearch.so -%files hiredis -%{_libdir}/rsyslog/omhiredis.so - -%files libdbi -%{_libdir}/rsyslog/omlibdbi.so - %files mmaudit %{_libdir}/rsyslog/mmaudit.so @@ -444,17 +503,10 @@ done %doc %{rsyslog_docdir}/mysql-createDB.sql %{_libdir}/rsyslog/ommysql.so -%files mongodb -%{_bindir}/logctl -%{_libdir}/rsyslog/ommongodb.so - %files pgsql %doc %{rsyslog_docdir}/pgsql-createDB.sql %{_libdir}/rsyslog/ompgsql.so -%files rabbitmq -%{_libdir}/rsyslog/omrabbitmq.so - %files gssapi %{_libdir}/rsyslog/lmgssutil.so %{_libdir}/rsyslog/imgssapi.so @@ -477,6 +529,7 @@ done %{_libdir}/rsyslog/omamqp1.so %files kafka +%{_libdir}/rsyslog/imkafka.so %{_libdir}/rsyslog/omkafka.so %files mmkubernetes @@ -484,7 +537,28 @@ done %doc %{rsyslog_docdir}/k8s_filename.rulebase %doc %{rsyslog_docdir}/k8s_container_name.rulebase +%if 0%{?rhel} == 0 +%files hiredis +%{_libdir}/rsyslog/omhiredis.so + +%files libdbi +%{_libdir}/rsyslog/omlibdbi.so + +%files mongodb +%{_bindir}/logctl +%{_libdir}/rsyslog/ommongodb.so + +%files rabbitmq +%{_libdir}/rsyslog/omrabbitmq.so +%endif + + %changelog +* Wed Mar 03 2021 Attila Lakatos - 8.2102.0-1 +- rebase to upstream version 8.2102.0 + resolves: rhbz#1905363 +- enable additional plugins: imkafka, mmutf8fix + * Tue Mar 02 2021 Zbigniew JÄ™drzejewski-Szmek - 8.2010.0-4 - Rebuilt for updated systemd-rpm-macros See https://pagure.io/fesco/issue/2583. diff --git a/sources b/sources index 3018386..ccff29d 100644 --- a/sources +++ b/sources @@ -1,2 +1,3 @@ -SHA512 (rsyslog-8.2010.0.tar.gz) = e3c8ed6b631053e38abfe8ce183a1544d04a0207dc988d36f5141a7ea8c987915f4c0429ccd094b7e374c277b7ee5b50e65e7205c156af01ffe9bdf8338831c8 -SHA512 (rsyslog-doc-8.2010.0.tar.gz) = 072fb05a0117dc0970a4e5e302abbaf5dc065c2a0962c4160e7efb86fedad89a2caa546cd2bf4af07b7f5e2fa5267cf02889d911f7a6916725e6aea1760ab253 +SHA512 (qpid-proton-0.31.0.tar.gz) = 39487c34ae6ae1cc0c2f57f2ffb2bdf48a554e9ba8439a5c3f9776205cdb138f71284c9fc7626e4bbee3110ccce7da61ddb45f51ebddfede981ada0872074202 +SHA512 (rsyslog-8.2102.0.tar.gz) = 281b0e5d5cb548c39a6e514e5fd5b1bdbe8ca0bdd9234f4fea581ed7679f76d2d75b65d14c3c5e799f86f91600074ff75b467aa1ff27cdbec0f4197261c5aec0 +SHA512 (rsyslog-doc-8.2102.0.tar.gz) = a5dc4fb9bd8892fac693c5692b926c8d7d9fa36667d6b4c6eccba750713af88d4317f6232efc2a16de38c2e58c4a8bc4d04c9ebb2e7ebc3b0878d53eef20dd2e From a5c99cffb1a91c5867ee13aab3354546a43ca9ce Mon Sep 17 00:00:00 2001 From: Cropi Date: Wed, 17 Mar 2021 09:01:26 +0100 Subject: [PATCH 46/99] Remove rsyslog-recover-qi.pl from bindir, so it does not add dep on /usr/bin/perl resolves: rhbz#1939556 --- rsyslog.spec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rsyslog.spec b/rsyslog.spec index 17efd61..ac6a26d 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -8,7 +8,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.2102.0 -Release: 1%{?dist} +Release: 2%{?dist} License: (GPLv3+ and ASL 2.0) URL: http://www.rsyslog.com/ Source0: http://www.rsyslog.com/files/download/rsyslog/%{name}-%{version}.tar.gz @@ -399,9 +399,6 @@ rm -f %{buildroot}%{_libdir}/rsyslog/*.la rm -f %{buildroot}%{_libdir}/rsyslog/imdiag.so rm -f %{buildroot}%{_libdir}/rsyslog/liboverride_gethostname.so -# convert line endings from "\r\n" to "\n" -cat tools/recover_qi.pl | tr -d '\r' > %{buildroot}%{_bindir}/rsyslog-recover-qi.pl - %post for n in /var/log/{messages,secure,maillog,spooler} do @@ -429,7 +426,6 @@ done %dir %{rsyslog_statedir} %dir %{rsyslog_pkidir} %{_sbindir}/rsyslogd -%attr(755,root,root) %{_bindir}/rsyslog-recover-qi.pl %{_mandir}/man5/rsyslog.conf.5.gz %{_mandir}/man8/rsyslogd.8.gz %{_unitdir}/rsyslog.service @@ -554,6 +550,10 @@ done %changelog +* Wed Mar 17 2021 Attila Lakatos - 8.2102.0-2 +- Remove rsyslog-recover-qi.pl from bindir, so it does not add dep on /usr/bin/perl + resolves: rhbz#1939556 + * Wed Mar 03 2021 Attila Lakatos - 8.2102.0-1 - rebase to upstream version 8.2102.0 resolves: rhbz#1905363 From 6ad07b6b5ae97e9200d909bb7ca94659a5eeac01 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 11:40:51 +0000 Subject: [PATCH 47/99] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rsyslog.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rsyslog.spec b/rsyslog.spec index ac6a26d..7791bf7 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -8,7 +8,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.2102.0 -Release: 2%{?dist} +Release: 3%{?dist} License: (GPLv3+ and ASL 2.0) URL: http://www.rsyslog.com/ Source0: http://www.rsyslog.com/files/download/rsyslog/%{name}-%{version}.tar.gz @@ -550,6 +550,9 @@ done %changelog +* Fri Jul 23 2021 Fedora Release Engineering - 8.2102.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Wed Mar 17 2021 Attila Lakatos - 8.2102.0-2 - Remove rsyslog-recover-qi.pl from bindir, so it does not add dep on /usr/bin/perl resolves: rhbz#1939556 From ad5200aa8cc1201a64e6dac58050af5aa1f40106 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Fri, 23 Jul 2021 08:54:42 +0200 Subject: [PATCH 48/99] rsyslog.conf: first load default modules, then third-party config When we installed file /etc/rsyslog.d/03-ratelimits.conf: $IMJournalStateFile imjournal.state $IMJournalPersistStateInterval 1000 $IMJournalRatelimitInterval 1 $IMJournalRatelimitBurst 10000 rsyslog failed: invalid or yet-unknown config file command 'IMJournalStateFile' - have you forgotten to load a module? [v8.2010.0 try https://www.rsyslog.com/e/3003 ] invalid or yet-unknown config file command 'IMJournalPersistStateInterval' - have you forgotten to load a module? [v8.2010.0 try https://www.rsyslog.com/e/3003 ] invalid or yet-unknown config file command 'IMJournalRatelimitInterval' - have you forgotten to load a module? [v8.2010.0 try https://www.rsyslog.com/e/3003 ] invalid or yet-unknown config file command 'IMJournalRatelimitBurst' - have you forgotten to load a module? [v8.2010.0 try https://www.rsyslog.com/e/3003 ] That's because imjournal was loaded later than that config file. If module was explicitly loaded via '$ModLoad imjournal' in our third-party file, we got a different error: module 'imjournal' already in this config, cannot be added [v8.2010.0 try https://www.rsyslog.com/e/2221 ] When the config file is reordered like this, no errors are shown. Resolves: rhbz#1985202 --- rsyslog.conf | 15 ++++++++------- rsyslog.spec | 5 ++++- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/rsyslog.conf b/rsyslog.conf index b51e844..f6d3f6a 100644 --- a/rsyslog.conf +++ b/rsyslog.conf @@ -9,19 +9,20 @@ # Where to place auxiliary files global(workDirectory="/var/lib/rsyslog") +#### MODULES #### + # Use default timestamp format module(load="builtin:omfile" Template="RSYSLOG_TraditionalFileFormat") +module(load="imuxsock" # provides support for local system logging (e.g. via logger command) + SysSock.Use="off") # Turn off message reception via local log socket; + # local messages are retrieved through imjournal now. +module(load="imjournal" # provides access to the systemd journal + StateFile="imjournal.state") # File to store the position in the journal + # Include all config files in /etc/rsyslog.d/ include(file="/etc/rsyslog.d/*.conf" mode="optional") -#### MODULES #### - -module(load="imuxsock" # provides support for local system logging (e.g. via logger command) - SysSock.Use="off") # Turn off message reception via local log socket; - # local messages are retrieved through imjournal now. -module(load="imjournal" # provides access to the systemd journal - StateFile="imjournal.state") # File to store the position in the journal #module(load="imklog") # reads kernel messages (the same are read from journald) #module(load="immark") # provides --MARK-- message capability diff --git a/rsyslog.spec b/rsyslog.spec index 7791bf7..ba6eb36 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -8,7 +8,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.2102.0 -Release: 3%{?dist} +Release: 4%{?dist} License: (GPLv3+ and ASL 2.0) URL: http://www.rsyslog.com/ Source0: http://www.rsyslog.com/files/download/rsyslog/%{name}-%{version}.tar.gz @@ -550,6 +550,9 @@ done %changelog +* Tue Jul 27 2021 Pavel Raiskup - 8.2102.0-4 +- reorder the rsyslog.conf to simplify the rsyslog.d configuration (#1985202) + * Fri Jul 23 2021 Fedora Release Engineering - 8.2102.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From ae606bed23ddb909234f06d3bb4033e2d8c8d9b5 Mon Sep 17 00:00:00 2001 From: alakatos Date: Wed, 25 Aug 2021 09:07:16 +0200 Subject: [PATCH 49/99] Enable openssl Do not set default template for omfile resolves: rhbz#1985195 --- rsyslog.conf | 2 +- rsyslog.spec | 32 ++++++++++++++++++++++++++++---- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/rsyslog.conf b/rsyslog.conf index f6d3f6a..6d45c53 100644 --- a/rsyslog.conf +++ b/rsyslog.conf @@ -12,7 +12,7 @@ global(workDirectory="/var/lib/rsyslog") #### MODULES #### # Use default timestamp format -module(load="builtin:omfile" Template="RSYSLOG_TraditionalFileFormat") +module(load="builtin:omfile") module(load="imuxsock" # provides support for local system logging (e.g. via logger command) SysSock.Use="off") # Turn off message reception via local log socket; diff --git a/rsyslog.spec b/rsyslog.spec index ba6eb36..9a5e92d 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -8,7 +8,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.2102.0 -Release: 4%{?dist} +Release: 5%{?dist} License: (GPLv3+ and ASL 2.0) URL: http://www.rsyslog.com/ Source0: http://www.rsyslog.com/files/download/rsyslog/%{name}-%{version}.tar.gz @@ -42,7 +42,9 @@ BuildRequires: python3-docutils # make sure systemd is in a version that isn't affected by rhbz#974132 BuildRequires: systemd-devel >= 204-8 BuildRequires: zlib-devel +BuildRequires: openssl-devel +Requires: openssl-libs Requires: logrotate >= 3.5.2 Requires: bash >= 2.0 %{?systemd_ordering} @@ -101,10 +103,16 @@ Requires: %name = %version-%release BuildRequires: librelp-devel >= 1.2.16 %package gnutls -Summary: TLS protocol support for rsyslog +Summary: TLS protocol support for rsyslog via GnuTLS library Requires: %name = %version-%release BuildRequires: gnutls-devel +%package openssl +Summary: TLS protocol support for rsyslog via OpenSSL library +Group: System Environment/Daemons +Requires: %name = %version-%release +BuildRequires: openssl-devel + %package snmp Summary: SNMP protocol support for rsyslog Requires: %name = %version-%release @@ -219,8 +227,15 @@ protocol. %description gnutls The rsyslog-gnutls package contains the rsyslog plugins that provide the -ability to receive syslog messages via upcoming syslog-transport-tls -IETF standard protocol. +ability to send and receive syslog messages via TCP or RELP using TLS +encryption via GnuTLS library. For details refer to rsyslog doc on imtcp +and omfwd modules. + +%description openssl +The rsyslog-openssl package contains the rsyslog plugins that provide the +ability to send and receive syslog messages via TCP or RELP using TLS +encryption via OpenSSL library. For details refer to rsyslog doc on imtcp +and omfwd modules. %description snmp The rsyslog-snmp package contains the rsyslog plugin that provides the @@ -333,6 +348,7 @@ autoreconf -if --enable-elasticsearch \ --enable-generate-man-pages \ --enable-gnutls \ + --enable-openssl \ --enable-gssapi-krb5 \ --enable-imfile \ --enable-imjournal \ @@ -515,6 +531,9 @@ done %files gnutls %{_libdir}/rsyslog/lmnsd_gtls.so +%files openssl +%{_libdir}/rsyslog/lmnsd_ossl.so + %files snmp %{_libdir}/rsyslog/omsnmp.so @@ -550,6 +569,11 @@ done %changelog +* Wed Aug 25 2021 Attila Lakatos - 8.2102.0-5 +- Enable openssl +- Do not set default template for omfile + resolves: rhbz#1985195 + * Tue Jul 27 2021 Pavel Raiskup - 8.2102.0-4 - reorder the rsyslog.conf to simplify the rsyslog.d configuration (#1985202) From 20fd06e404f21400649d5d9c07e959d5897a767f Mon Sep 17 00:00:00 2001 From: Sahana Prasad Date: Tue, 14 Sep 2021 19:13:52 +0200 Subject: [PATCH 50/99] Rebuilt with OpenSSL 3.0.0 --- rsyslog.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rsyslog.spec b/rsyslog.spec index 9a5e92d..02d160a 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -8,7 +8,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.2102.0 -Release: 5%{?dist} +Release: 6%{?dist} License: (GPLv3+ and ASL 2.0) URL: http://www.rsyslog.com/ Source0: http://www.rsyslog.com/files/download/rsyslog/%{name}-%{version}.tar.gz @@ -569,6 +569,9 @@ done %changelog +* Tue Sep 14 2021 Sahana Prasad - 8.2102.0-6 +- Rebuilt with OpenSSL 3.0.0 + * Wed Aug 25 2021 Attila Lakatos - 8.2102.0-5 - Enable openssl - Do not set default template for omfile From ffb46075f3a0814657d1d6b20d9af72cc6eadb49 Mon Sep 17 00:00:00 2001 From: alakatos Date: Wed, 15 Sep 2021 11:35:55 +0200 Subject: [PATCH 51/99] Enable mmfields module --- rsyslog.spec | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/rsyslog.spec b/rsyslog.spec index 02d160a..7918633 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -8,7 +8,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.2102.0 -Release: 6%{?dist} +Release: 7%{?dist} License: (GPLv3+ and ASL 2.0) URL: http://www.rsyslog.com/ Source0: http://www.rsyslog.com/files/download/rsyslog/%{name}-%{version}.tar.gz @@ -78,6 +78,10 @@ BuildRequires: libestr-devel liblognorm-devel >= 1.0.2 Summary: Message modification module supporting Linux audit format Requires: %name = %version-%release +%package mmfields +Summary: Fields extraction module +Requires: %name = %version-%release + %package mmsnmptrapd Summary: Message modification module for snmptrapd generated messages Requires: %name = %version-%release @@ -203,6 +207,12 @@ This module provides the capability to normalize log messages via liblognorm. This module provides message modification supporting Linux audit format in various settings. +%description mmfields +The mmfield module permits to extract fields. Using this module is of special +advantage if a field-based log format is to be processed, like for example CEF +and either a large number of fields is needed or a specific field is used multiple +times inside filters. + %description mmsnmptrapd This message modification module takes messages generated from snmptrapd and modifies them so that they look like they originated from the read originator. @@ -359,6 +369,7 @@ autoreconf -if --enable-mmanon \ --enable-mmaudit \ --enable-mmcount \ + --enable-mmfields \ --enable-mmkubernetes \ --enable-mmjsonparse \ --enable-mmnormalize \ @@ -502,6 +513,9 @@ done %files mmaudit %{_libdir}/rsyslog/mmaudit.so +%files mmfields +%{_libdir}/rsyslog/mmfields.so + %files mmjsonparse %{_libdir}/rsyslog/mmjsonparse.so @@ -569,6 +583,9 @@ done %changelog +* Wed Sep 15 2021 Attila Lakatos - 8.2102.0-7 +- Enable mmfields plugin + * Tue Sep 14 2021 Sahana Prasad - 8.2102.0-6 - Rebuilt with OpenSSL 3.0.0 From a01e46b838699c0d2a13ec131863837b6cad0057 Mon Sep 17 00:00:00 2001 From: Davide Cavalca Date: Tue, 10 Aug 2021 09:34:27 -0700 Subject: [PATCH 52/99] Split out logrotate config and dependency into a subpackage --- rsyslog.spec | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/rsyslog.spec b/rsyslog.spec index 7918633..01a24f8 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -8,7 +8,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.2102.0 -Release: 7%{?dist} +Release: 8%{?dist} License: (GPLv3+ and ASL 2.0) URL: http://www.rsyslog.com/ Source0: http://www.rsyslog.com/files/download/rsyslog/%{name}-%{version}.tar.gz @@ -45,13 +45,18 @@ BuildRequires: zlib-devel BuildRequires: openssl-devel Requires: openssl-libs -Requires: logrotate >= 3.5.2 +Recommends: %{name}-logrotate = %version-%release Requires: bash >= 2.0 %{?systemd_ordering} Provides: syslog Obsoletes: sysklogd < 1.5-11 +%package logrotate +Summary: Log rotation for rsyslog +Requires: %name = %version-%release +Requires: logrotate >= 3.5.2 + %package crypto Summary: Encryption support Requires: %name = %version-%release @@ -185,6 +190,9 @@ and can be used as a drop-in replacement. Rsyslog is simple to set up, with advanced features suitable for enterprise-class, encryption-protected syslog relay chains. +%description logrotate +This subpackage contains the default logrotate configuration for rsyslog. + %description crypto This package contains a module providing log file encryption and a command line tool to process encrypted logs. @@ -458,7 +466,6 @@ done %{_unitdir}/rsyslog.service %config(noreplace) %{_sysconfdir}/rsyslog.conf %config(noreplace) %{_sysconfdir}/sysconfig/rsyslog -%config(noreplace) %{_sysconfdir}/logrotate.d/rsyslog # plugins %{_libdir}/rsyslog/fmhash.so %{_libdir}/rsyslog/fmhttp.so @@ -499,6 +506,9 @@ done %{_libdir}/rsyslog/omclickhouse.so %endif +%files logrotate +%config(noreplace) %{_sysconfdir}/logrotate.d/rsyslog + %files crypto %{_bindir}/rscryutil %{_mandir}/man1/rscryutil.1.gz @@ -583,6 +593,10 @@ done %changelog +* Wed Oct 06 2021 Davide Cavalca - 8.2102.0-8 +- Split out logrotate config and dependency into a subpackage + resolves: rhbz#1992153 + * Wed Sep 15 2021 Attila Lakatos - 8.2102.0-7 - Enable mmfields plugin From 44085845eb327b7c45125d9b306341997359c77b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 21 Jan 2022 18:07:43 +0000 Subject: [PATCH 53/99] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rsyslog.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rsyslog.spec b/rsyslog.spec index 01a24f8..56fae6d 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -8,7 +8,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.2102.0 -Release: 8%{?dist} +Release: 9%{?dist} License: (GPLv3+ and ASL 2.0) URL: http://www.rsyslog.com/ Source0: http://www.rsyslog.com/files/download/rsyslog/%{name}-%{version}.tar.gz @@ -593,6 +593,9 @@ done %changelog +* Fri Jan 21 2022 Fedora Release Engineering - 8.2102.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Wed Oct 06 2021 Davide Cavalca - 8.2102.0-8 - Split out logrotate config and dependency into a subpackage resolves: rhbz#1992153 From 43871ce157092e3848ee5ae8e2c22f3766b45d9a Mon Sep 17 00:00:00 2001 From: alakatos Date: Mon, 24 Jan 2022 08:16:39 +0100 Subject: [PATCH 54/99] Rebuilt with bundled qpid-proton resolves: rhbz#2042940 --- .gitignore | 1 + openssl3-compatibility.patch | 83 ++++++++++++++++++++++++++++++++++++ rsyslog.spec | 35 +++++++-------- sources | 2 +- 4 files changed, 100 insertions(+), 21 deletions(-) create mode 100644 openssl3-compatibility.patch diff --git a/.gitignore b/.gitignore index c93e2fc..6f6bb6c 100644 --- a/.gitignore +++ b/.gitignore @@ -80,3 +80,4 @@ rsyslog-4.6.3.tar.gz /qpid-proton-0.31.0.tar.gz /rsyslog-8.2102.0.tar.gz /rsyslog-doc-8.2102.0.tar.gz +/qpid-proton-0.34.0.tar.gz diff --git a/openssl3-compatibility.patch b/openssl3-compatibility.patch new file mode 100644 index 0000000..c86fe23 --- /dev/null +++ b/openssl3-compatibility.patch @@ -0,0 +1,83 @@ +diff -up ./qpid-proton-0.34.0/c/src/ssl/openssl.c.orig ./qpid-proton-0.34.0/c/src/ssl/openssl.c +--- ./qpid-proton-0.34.0/c/src/ssl/openssl.c.orig 2021-06-01 09:29:27.976842727 +0200 ++++ ./qpid-proton-0.34.0/c/src/ssl/openssl.c 2021-06-01 09:31:05.232015887 +0200 +@@ -353,65 +353,6 @@ static int verify_callback(int preverify + return preverify_ok; + } + +-// This was introduced in v1.1 +-#if OPENSSL_VERSION_NUMBER < 0x10100000 +-int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g) +-{ +- dh->p = p; +- dh->q = q; +- dh->g = g; +- return 1; +-} +-#endif +- +-// this code was generated using the command: +-// "openssl dhparam -C -2 2048" +-static DH *get_dh2048(void) +-{ +- static const unsigned char dhp_2048[]={ +- 0xAE,0xF7,0xE9,0x66,0x26,0x7A,0xAC,0x0A,0x6F,0x1E,0xCD,0x81, +- 0xBD,0x0A,0x10,0x7E,0xFA,0x2C,0xF5,0x2D,0x98,0xD4,0xE7,0xD9, +- 0xE4,0x04,0x8B,0x06,0x85,0xF2,0x0B,0xA3,0x90,0x15,0x56,0x0C, +- 0x8B,0xBE,0xF8,0x48,0xBB,0x29,0x63,0x75,0x12,0x48,0x9D,0x7E, +- 0x7C,0x24,0xB4,0x3A,0x38,0x7E,0x97,0x3C,0x77,0x95,0xB0,0xA2, +- 0x72,0xB6,0xE9,0xD8,0xB8,0xFA,0x09,0x1B,0xDC,0xB3,0x80,0x6E, +- 0x32,0x0A,0xDA,0xBB,0xE8,0x43,0x88,0x5B,0xAB,0xC3,0xB2,0x44, +- 0xE1,0x95,0x85,0x0A,0x0D,0x13,0xE2,0x02,0x1E,0x96,0x44,0xCF, +- 0xA0,0xD8,0x46,0x32,0x68,0x63,0x7F,0x68,0xB3,0x37,0x52,0xCE, +- 0x3A,0x4E,0x48,0x08,0x7F,0xD5,0x53,0x00,0x59,0xA8,0x2C,0xCB, +- 0x51,0x64,0x3D,0x5F,0xEF,0x0E,0x5F,0xE6,0xAF,0xD9,0x1E,0xA2, +- 0x35,0x64,0x37,0xD7,0x4C,0xC9,0x24,0xFD,0x2F,0x75,0xBB,0x3A, +- 0x15,0x82,0x76,0x4D,0xC2,0x8B,0x1E,0xB9,0x4B,0xA1,0x33,0xCF, +- 0xAA,0x3B,0x7C,0xC2,0x50,0x60,0x6F,0x45,0x69,0xD3,0x6B,0x88, +- 0x34,0x9B,0xE4,0xF8,0xC6,0xC7,0x5F,0x10,0xA1,0xBA,0x01,0x8C, +- 0xDA,0xD1,0xA3,0x59,0x9C,0x97,0xEA,0xC3,0xF6,0x02,0x55,0x5C, +- 0x92,0x1A,0x39,0x67,0x17,0xE2,0x9B,0x27,0x8D,0xE8,0x5C,0xE9, +- 0xA5,0x94,0xBB,0x7E,0x16,0x6F,0x53,0x5A,0x6D,0xD8,0x03,0xC2, +- 0xAC,0x7A,0xCD,0x22,0x98,0x8E,0x33,0x2A,0xDE,0xAB,0x12,0xC0, +- 0x0B,0x7C,0x0C,0x20,0x70,0xD9,0x0B,0xAE,0x0B,0x2F,0x20,0x9B, +- 0xA4,0xED,0xFD,0x49,0x0B,0xE3,0x4A,0xF6,0x28,0xB3,0x98,0xB0, +- 0x23,0x1C,0x09,0x33, +- }; +- static const unsigned char dhg_2048[]={ +- 0x02, +- }; +- DH *dh = DH_new(); +- BIGNUM *dhp_bn, *dhg_bn; +- +- if (dh == NULL) +- return NULL; +- dhp_bn = BN_bin2bn(dhp_2048, sizeof (dhp_2048), NULL); +- dhg_bn = BN_bin2bn(dhg_2048, sizeof (dhg_2048), NULL); +- if (dhp_bn == NULL || dhg_bn == NULL +- || !DH_set0_pqg(dh, dhp_bn, NULL, dhg_bn)) { +- DH_free(dh); +- BN_free(dhp_bn); +- BN_free(dhg_bn); +- return NULL; +- } +- return dh; +-} +- + typedef struct { + char *id; + SSL_SESSION *session; +@@ -542,13 +483,6 @@ static bool pni_init_ssl_domain( pn_ssl_ + domain->default_seclevel = SSL_CTX_get_security_level(domain->ctx); + # endif + +- DH *dh = get_dh2048(); +- if (dh) { +- SSL_CTX_set_tmp_dh(domain->ctx, dh); +- DH_free(dh); +- SSL_CTX_set_options(domain->ctx, SSL_OP_SINGLE_DH_USE); +- } +- + return true; + } + diff --git a/rsyslog.spec b/rsyslog.spec index 56fae6d..2ca0722 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -8,7 +8,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.2102.0 -Release: 9%{?dist} +Release: 10%{?dist} License: (GPLv3+ and ASL 2.0) URL: http://www.rsyslog.com/ Source0: http://www.rsyslog.com/files/download/rsyslog/%{name}-%{version}.tar.gz @@ -19,11 +19,9 @@ Source4: rsyslog.log Source5: rsyslog.service # Add qpid-proton as another source, enable omamqp1 module in a # separatae sub-package with it statically linked(see rhbz#1713427) -%if 0%{?rhel} != 0 -Source6: qpid-proton-0.31.0.tar.gz -%else -BuildRequires: qpid-proton-c-devel -%endif +Source6: qpid-proton-0.34.0.tar.gz + +Patch0: openssl3-compatibility.patch BuildRequires: make BuildRequires: gcc @@ -135,7 +133,6 @@ BuildRequires: libnet-devel %package omamqp1 Summary: Provides the omamqp1 module Requires: %name = %version-%release -%if 0%{?rhel} != 0 Requires: cyrus-sasl-lib Requires: openssl-libs BuildRequires: cmake @@ -145,9 +142,6 @@ BuildRequires: gcc-c++ BuildRequires: cyrus-sasl-devel BuildRequires: openssl-devel BuildRequires: python3 -%else -BuildRequires: qpid-proton-c-devel -%endif %package kafka Summary: Provides the omkafka module @@ -299,13 +293,14 @@ rm -r LICENSE README.md source build/objects.inv mv build doc # set up rsyslog sources %setup -q -D -# Unpack qpid-proton for rhel -%if 0%{?rhel} != 0 +# Unpack qpid-proton %setup -q -D -T -b 6 -%endif +pushd .. +%patch0 -p1 -b .openssl-compatibility +popd + %build -%if 0%{?rhel} != 0 %ifarch sparc64 #sparc64 need big PIC export CFLAGS="$RPM_OPT_FLAGS -fPIC" @@ -314,7 +309,7 @@ export CFLAGS="$RPM_OPT_FLAGS -fpic" %endif # build the proton first ( - cd %{_builddir}/qpid-proton-0.31.0 + cd %{_builddir}/qpid-proton-0.34.0 mkdir bld cd bld @@ -330,7 +325,6 @@ export CFLAGS="$RPM_OPT_FLAGS -fpic" -DCMAKE_AR="/usr/bin/gcc-ar" -DCMAKE_NM="/usr/bin/gcc-nm" -DCMAKE_RANLIB="/usr/bin/gcc-ranlib" make -j8 ) -%endif %ifarch sparc64 #sparc64 need big PIE @@ -351,7 +345,6 @@ autoreconf -if --prefix=/usr \ --disable-static \ --disable-testbench \ -%if 0%{?rhel} == 0 --enable-clickhouse \ --enable-imdocker \ --enable-improg \ @@ -360,9 +353,7 @@ autoreconf -if --enable-omhiredis \ --enable-ommongodb \ --enable-omrabbitmq \ -%else - --enable-omamqp1 PROTON_LIBS="%{_builddir}/qpid-proton-0.31.0/bld/c/libqpid-proton-core-static.a %{_builddir}/qpid-proton-0.31.0/bld/c/libqpid-proton-proactor-static.a %{_builddir}/qpid-proton-0.31.0/bld/c/libqpid-proton-static.a -lssl -lsasl2 -lcrypto" PROTON_CFLAGS="-I%{_builddir}/qpid-proton-0.31.0/bld/c/include" \ -%endif + --enable-omamqp1 PROTON_LIBS="%{_builddir}/qpid-proton-0.34.0/bld/c/libqpid-proton-core-static.a %{_builddir}/qpid-proton-0.34.0/bld/c/libqpid-proton-proactor-static.a %{_builddir}/qpid-proton-0.34.0/bld/c/libqpid-proton-static.a -lssl -lsasl2 -lcrypto" PROTON_CFLAGS="-I%{_builddir}/qpid-proton-0.34.0/bld/c/include" \ --enable-elasticsearch \ --enable-generate-man-pages \ --enable-gnutls \ @@ -593,6 +584,10 @@ done %changelog +* Mon Jan 24 2022 Attila Lakatos - 8.2102.0-10 +- Rebuild package with bundled qpid-proton + resolves: rhbz#2042940 + * Fri Jan 21 2022 Fedora Release Engineering - 8.2102.0-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/sources b/sources index ccff29d..f9a09d9 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (qpid-proton-0.31.0.tar.gz) = 39487c34ae6ae1cc0c2f57f2ffb2bdf48a554e9ba8439a5c3f9776205cdb138f71284c9fc7626e4bbee3110ccce7da61ddb45f51ebddfede981ada0872074202 SHA512 (rsyslog-8.2102.0.tar.gz) = 281b0e5d5cb548c39a6e514e5fd5b1bdbe8ca0bdd9234f4fea581ed7679f76d2d75b65d14c3c5e799f86f91600074ff75b467aa1ff27cdbec0f4197261c5aec0 SHA512 (rsyslog-doc-8.2102.0.tar.gz) = a5dc4fb9bd8892fac693c5692b926c8d7d9fa36667d6b4c6eccba750713af88d4317f6232efc2a16de38c2e58c4a8bc4d04c9ebb2e7ebc3b0878d53eef20dd2e +SHA512 (qpid-proton-0.34.0.tar.gz) = 0de6c3d11baeee1d69821a0f1879a61b314f14589e02ea7ed0de8814c741217fdcafdd978b4061f73bc75588886299f4ac6808021506545ec8a883f39ad54fb3 From 81c2ffa0f1503a2882621daf8259caafe2bc88c4 Mon Sep 17 00:00:00 2001 From: alakatos Date: Mon, 9 May 2022 08:31:33 +0200 Subject: [PATCH 55/99] rebase to 8.2204.0 resolves: rhbz#1951970 CVE-2022-24903 rsyslog: Heap-based overflow in TCP syslog server resolves: rhbz#2082302 --- ...82302-CVE-heap-based-buffer-overflow.patch | 45 +++++++++++++++++++ rsyslog.spec | 12 ++++- 2 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 rsyslog-8.2204.0-rhbz2082302-CVE-heap-based-buffer-overflow.patch diff --git a/rsyslog-8.2204.0-rhbz2082302-CVE-heap-based-buffer-overflow.patch b/rsyslog-8.2204.0-rhbz2082302-CVE-heap-based-buffer-overflow.patch new file mode 100644 index 0000000..cfdfc59 --- /dev/null +++ b/rsyslog-8.2204.0-rhbz2082302-CVE-heap-based-buffer-overflow.patch @@ -0,0 +1,45 @@ +diff --git a/contrib/imhttp/imhttp.c b/contrib/imhttp/imhttp.c +index f09260b586..95704af985 100644 +--- a/contrib/imhttp/imhttp.c ++++ b/contrib/imhttp/imhttp.c +@@ -487,7 +487,9 @@ processOctetMsgLen(const instanceConf_t *const inst, struct conn_wrkr_s *connWrk + connWrkr->parseState.iOctetsRemain = connWrkr->parseState.iOctetsRemain * 10 + ch - '0'; + } + // temporarily save this character into the message buffer +- connWrkr->pMsg[connWrkr->iMsg++] = ch; ++ if(connWrkr->iMsg + 1 < s_iMaxLine) { ++ connWrkr->pMsg[connWrkr->iMsg++] = ch; ++ } + } else { + const char *remoteAddr = ""; + if (connWrkr->propRemoteAddr) { +diff --git a/plugins/imptcp/imptcp.c b/plugins/imptcp/imptcp.c +index 2df46a236c..c32dec5851 100644 +--- a/plugins/imptcp/imptcp.c ++++ b/plugins/imptcp/imptcp.c +@@ -1107,7 +1107,9 @@ processDataRcvd(ptcpsess_t *const __restrict__ pThis, + if(pThis->iOctetsRemain <= 200000000) { + pThis->iOctetsRemain = pThis->iOctetsRemain * 10 + c - '0'; + } +- *(pThis->pMsg + pThis->iMsg++) = c; ++ if(pThis->iMsg < iMaxLine) { ++ *(pThis->pMsg + pThis->iMsg++) = c; ++ } + } else { /* done with the octet count, so this must be the SP terminator */ + DBGPRINTF("TCP Message with octet-counter, size %d.\n", pThis->iOctetsRemain); + prop.GetString(pThis->peerName, &propPeerName, &lenPeerName); +diff --git a/runtime/tcps_sess.c b/runtime/tcps_sess.c +index 0efa2c23c4..c5442f7638 100644 +--- a/runtime/tcps_sess.c ++++ b/runtime/tcps_sess.c +@@ -390,7 +390,9 @@ processDataRcvd(tcps_sess_t *pThis, + if(pThis->iOctetsRemain <= 200000000) { + pThis->iOctetsRemain = pThis->iOctetsRemain * 10 + c - '0'; + } +- *(pThis->pMsg + pThis->iMsg++) = c; ++ if(pThis->iMsg < iMaxLine) { ++ *(pThis->pMsg + pThis->iMsg++) = c; ++ } + } else { /* done with the octet count, so this must be the SP terminator */ + DBGPRINTF("TCP Message with octet-counter, size %d.\n", pThis->iOctetsRemain); + prop.GetString(pThis->fromHost, &propPeerName, &lenPeerName); diff --git a/rsyslog.spec b/rsyslog.spec index 2ca0722..0c32ab5 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -7,8 +7,8 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog -Version: 8.2102.0 -Release: 10%{?dist} +Version: 8.2204.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 @@ -22,6 +22,7 @@ Source5: rsyslog.service Source6: qpid-proton-0.34.0.tar.gz Patch0: openssl3-compatibility.patch +Patch1: rsyslog-8.2204.0-rhbz2082302-CVE-heap-based-buffer-overflow.patch BuildRequires: make BuildRequires: gcc @@ -299,6 +300,7 @@ pushd .. %patch0 -p1 -b .openssl-compatibility popd +%patch1 -p1 -b .CVE-buffer-overflow %build %ifarch sparc64 @@ -584,6 +586,12 @@ done %changelog +* Mon May 09 2022 Attila Lakatos - 8.2204.0 +- rebase to 8.2204.0 + resolves: rhbz#1951970 +- CVE-2022-24903 rsyslog: Heap-based overflow in TCP syslog server + resolves: rhbz#2082302 + * Mon Jan 24 2022 Attila Lakatos - 8.2102.0-10 - Rebuild package with bundled qpid-proton resolves: rhbz#2042940 From 061666c54f2132670173ebc2448201c3ae35ae6e Mon Sep 17 00:00:00 2001 From: alakatos Date: Mon, 9 May 2022 09:05:15 +0200 Subject: [PATCH 56/99] Add back accidentally removed source --- .gitignore | 2 ++ rsyslog.spec | 2 +- sources | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 6f6bb6c..c2bb745 100644 --- a/.gitignore +++ b/.gitignore @@ -81,3 +81,5 @@ rsyslog-4.6.3.tar.gz /rsyslog-8.2102.0.tar.gz /rsyslog-doc-8.2102.0.tar.gz /qpid-proton-0.34.0.tar.gz +/rsyslog-8.2204.0.tar.gz +/rsyslog-doc-8.2204.0.tar.gz diff --git a/rsyslog.spec b/rsyslog.spec index 0c32ab5..6a6d7e4 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -586,7 +586,7 @@ done %changelog -* Mon May 09 2022 Attila Lakatos - 8.2204.0 +* Mon May 09 2022 Attila Lakatos - 8.2204.0-1 - rebase to 8.2204.0 resolves: rhbz#1951970 - CVE-2022-24903 rsyslog: Heap-based overflow in TCP syslog server diff --git a/sources b/sources index f9a09d9..660b19b 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (rsyslog-8.2102.0.tar.gz) = 281b0e5d5cb548c39a6e514e5fd5b1bdbe8ca0bdd9234f4fea581ed7679f76d2d75b65d14c3c5e799f86f91600074ff75b467aa1ff27cdbec0f4197261c5aec0 -SHA512 (rsyslog-doc-8.2102.0.tar.gz) = a5dc4fb9bd8892fac693c5692b926c8d7d9fa36667d6b4c6eccba750713af88d4317f6232efc2a16de38c2e58c4a8bc4d04c9ebb2e7ebc3b0878d53eef20dd2e +SHA512 (rsyslog-8.2204.0.tar.gz) = d26ab950788b8931b895719f7d8a42509f709b69a76e4188df16f72be050863ee402310ad9300840fed4ac089638497725d67433172778be7b2932fa82210472 +SHA512 (rsyslog-doc-8.2204.0.tar.gz) = 361528b95c1f02cdc2b2ca8ba5252c8215996e81ef1602e08c46be4e1fd8c1c287dd7d52ae9b2b58c0ec7fe38d7079a89e10642ac3f34fe0b6c5737968999fb4 SHA512 (qpid-proton-0.34.0.tar.gz) = 0de6c3d11baeee1d69821a0f1879a61b314f14589e02ea7ed0de8814c741217fdcafdd978b4061f73bc75588886299f4ac6808021506545ec8a883f39ad54fb3 From e74591073c18bd6742ecb7a377f58dacc82f0655 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 23 Jul 2022 01:07:25 +0000 Subject: [PATCH 57/99] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rsyslog.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rsyslog.spec b/rsyslog.spec index 6a6d7e4..1a996bf 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -8,7 +8,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.2204.0 -Release: 1%{?dist} +Release: 2%{?dist} License: (GPLv3+ and ASL 2.0) URL: http://www.rsyslog.com/ Source0: http://www.rsyslog.com/files/download/rsyslog/%{name}-%{version}.tar.gz @@ -586,6 +586,9 @@ done %changelog +* Sat Jul 23 2022 Fedora Release Engineering - 8.2204.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Mon May 09 2022 Attila Lakatos - 8.2204.0-1 - rebase to 8.2204.0 resolves: rhbz#1951970 From e45f631e5f547ba5ac86b23eb2f993d7b55ddaac Mon Sep 17 00:00:00 2001 From: alakatos Date: Wed, 27 Jul 2022 08:27:42 +0200 Subject: [PATCH 58/99] Restore default omfile template resolves: rhbz#2088618 --- rsyslog.conf | 2 +- rsyslog.spec | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/rsyslog.conf b/rsyslog.conf index 6d45c53..f6d3f6a 100644 --- a/rsyslog.conf +++ b/rsyslog.conf @@ -12,7 +12,7 @@ global(workDirectory="/var/lib/rsyslog") #### MODULES #### # Use default timestamp format -module(load="builtin:omfile") +module(load="builtin:omfile" Template="RSYSLOG_TraditionalFileFormat") module(load="imuxsock" # provides support for local system logging (e.g. via logger command) SysSock.Use="off") # Turn off message reception via local log socket; diff --git a/rsyslog.spec b/rsyslog.spec index 1a996bf..54efe70 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -8,7 +8,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.2204.0 -Release: 2%{?dist} +Release: 3%{?dist} License: (GPLv3+ and ASL 2.0) URL: http://www.rsyslog.com/ Source0: http://www.rsyslog.com/files/download/rsyslog/%{name}-%{version}.tar.gz @@ -586,6 +586,10 @@ done %changelog +* Wed Jul 27 2022 Attila Lakatos - 8.2204.0-3 +- Restore default omfile template + resolves: rhbz#2088618 + * Sat Jul 23 2022 Fedora Release Engineering - 8.2204.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 5f15cb8d9b938d9f86afbe1e5b97e8ef61a36e1c Mon Sep 17 00:00:00 2001 From: alakatos Date: Wed, 9 Nov 2022 08:57:04 +0100 Subject: [PATCH 59/99] rebase to 8.2210.0 resolves: rhbz#2097173 Drop capabilities to the necessary set via libcap-ng resolves: rhbz#2127403 --- .gitignore | 2 + ...82302-CVE-heap-based-buffer-overflow.patch | 45 --- ...2210.0-rhbz2127403-drop-capabilities.patch | 258 ++++++++++++++++++ rsyslog.spec | 16 +- sources | 4 +- 5 files changed, 274 insertions(+), 51 deletions(-) delete mode 100644 rsyslog-8.2204.0-rhbz2082302-CVE-heap-based-buffer-overflow.patch create mode 100644 rsyslog-8.2210.0-rhbz2127403-drop-capabilities.patch diff --git a/.gitignore b/.gitignore index c2bb745..54c1f3c 100644 --- a/.gitignore +++ b/.gitignore @@ -83,3 +83,5 @@ rsyslog-4.6.3.tar.gz /qpid-proton-0.34.0.tar.gz /rsyslog-8.2204.0.tar.gz /rsyslog-doc-8.2204.0.tar.gz +/rsyslog-8.2210.0.tar.gz +/rsyslog-doc-8.2210.0.tar.gz diff --git a/rsyslog-8.2204.0-rhbz2082302-CVE-heap-based-buffer-overflow.patch b/rsyslog-8.2204.0-rhbz2082302-CVE-heap-based-buffer-overflow.patch deleted file mode 100644 index cfdfc59..0000000 --- a/rsyslog-8.2204.0-rhbz2082302-CVE-heap-based-buffer-overflow.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff --git a/contrib/imhttp/imhttp.c b/contrib/imhttp/imhttp.c -index f09260b586..95704af985 100644 ---- a/contrib/imhttp/imhttp.c -+++ b/contrib/imhttp/imhttp.c -@@ -487,7 +487,9 @@ processOctetMsgLen(const instanceConf_t *const inst, struct conn_wrkr_s *connWrk - connWrkr->parseState.iOctetsRemain = connWrkr->parseState.iOctetsRemain * 10 + ch - '0'; - } - // temporarily save this character into the message buffer -- connWrkr->pMsg[connWrkr->iMsg++] = ch; -+ if(connWrkr->iMsg + 1 < s_iMaxLine) { -+ connWrkr->pMsg[connWrkr->iMsg++] = ch; -+ } - } else { - const char *remoteAddr = ""; - if (connWrkr->propRemoteAddr) { -diff --git a/plugins/imptcp/imptcp.c b/plugins/imptcp/imptcp.c -index 2df46a236c..c32dec5851 100644 ---- a/plugins/imptcp/imptcp.c -+++ b/plugins/imptcp/imptcp.c -@@ -1107,7 +1107,9 @@ processDataRcvd(ptcpsess_t *const __restrict__ pThis, - if(pThis->iOctetsRemain <= 200000000) { - pThis->iOctetsRemain = pThis->iOctetsRemain * 10 + c - '0'; - } -- *(pThis->pMsg + pThis->iMsg++) = c; -+ if(pThis->iMsg < iMaxLine) { -+ *(pThis->pMsg + pThis->iMsg++) = c; -+ } - } else { /* done with the octet count, so this must be the SP terminator */ - DBGPRINTF("TCP Message with octet-counter, size %d.\n", pThis->iOctetsRemain); - prop.GetString(pThis->peerName, &propPeerName, &lenPeerName); -diff --git a/runtime/tcps_sess.c b/runtime/tcps_sess.c -index 0efa2c23c4..c5442f7638 100644 ---- a/runtime/tcps_sess.c -+++ b/runtime/tcps_sess.c -@@ -390,7 +390,9 @@ processDataRcvd(tcps_sess_t *pThis, - if(pThis->iOctetsRemain <= 200000000) { - pThis->iOctetsRemain = pThis->iOctetsRemain * 10 + c - '0'; - } -- *(pThis->pMsg + pThis->iMsg++) = c; -+ if(pThis->iMsg < iMaxLine) { -+ *(pThis->pMsg + pThis->iMsg++) = c; -+ } - } else { /* done with the octet count, so this must be the SP terminator */ - DBGPRINTF("TCP Message with octet-counter, size %d.\n", pThis->iOctetsRemain); - prop.GetString(pThis->fromHost, &propPeerName, &lenPeerName); diff --git a/rsyslog-8.2210.0-rhbz2127403-drop-capabilities.patch b/rsyslog-8.2210.0-rhbz2127403-drop-capabilities.patch new file mode 100644 index 0000000..6b3f43f --- /dev/null +++ b/rsyslog-8.2210.0-rhbz2127403-drop-capabilities.patch @@ -0,0 +1,258 @@ +From e9f85312630eb25d0985e911475803bd06f4173e Mon Sep 17 00:00:00 2001 +From: alakatos +Date: Thu, 13 Oct 2022 10:41:38 +0200 +Subject: [PATCH 1/2] Introduce --enable-libcap-ng configure option + +The option allows to drop the capabilities to only +the necessary set, to minimize security exposure in +case there was ever a mistake in a networking +plugin or some other input resource. Resolves #4986 +--- + configure.ac | 24 ++++++++++++++++++++++++ + runtime/debug.c | 4 ++-- + runtime/modules.c | 6 +++--- + runtime/rsyslog.h | 1 + + tools/rsyslogd.c | 42 ++++++++++++++++++++++++++++++++++++++++++ + 5 files changed, 72 insertions(+), 5 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 9f73a708d0..958c26245e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -377,6 +377,28 @@ AC_ARG_ENABLE(fmhash, + [enable_fmhash=yes] + ) + ++AC_ARG_ENABLE(libcap-ng, ++ [AS_HELP_STRING([--enable-libcap-ng],[Enable dropping capabilities to only the necessary set @<:@default=no@:>@])], ++ [case "${enableval}" in ++ yes) enable_libcapng="yes" ;; ++ no) enable_libcapng="no" ;; ++ *) AC_MSG_ERROR(bad value ${enableval} for --enable_libcapng) ;; ++ esac], ++ [enable_libcapng=no] ++) ++ ++if test "$enable_libcapng" = "yes"; then ++ PKG_CHECK_MODULES( ++ [LIBCAPNG], ++ [libcap-ng >= 0.8.2], ++ [AC_DEFINE([ENABLE_LIBCAPNG], [1], [Indicator that libcap-ng is present])], ++ [AC_MSG_ERROR(libcap-ng is not present.)] ++ ) ++ CFLAGS="$CFLAGS $LIBCAPNG_CFLAGS" ++ LIBS="$LIBS $LIBCAPNG_LIBS" ++fi ++ ++ + AC_ARG_ENABLE(fmhash-xxhash, + [AS_HELP_STRING([--enable-fmhash-xxhash],[Enable xxhash in fmhash support @<:@default=no@:>@])], + [case "${enableval}" in +@@ -2820,6 +2842,8 @@ echo " liblogging-stdlog support enabled: $enable_liblogging_stdlog" + echo " libsystemd enabled: $enable_libsystemd" + echo " kafka static linking enabled: $enable_kafka_static" + echo " atomic operations enabled: $enable_atomic_operations" ++echo " libcap-ng support enabled: $enable_libcapng" ++ + echo + echo "---{ input plugins }---" + if test "$unamestr" != "AIX"; then +diff --git a/runtime/debug.c b/runtime/debug.c +index a655bc2e4e..6e6c9fd38f 100644 +--- a/runtime/debug.c ++++ b/runtime/debug.c +@@ -250,7 +250,7 @@ r_dbgoprint( const char *srcname, obj_t *pObj, const char *fmt, ...) + + if(!(Debug && debugging_on)) + return; +- ++ + if(!checkDbgFile(srcname)) { + return; + } +@@ -435,7 +435,7 @@ rsRetVal dbgClassInit(void) + { + rsRetVal iRet; /* do not use DEFiRet, as this makes calls into the debug system! */ + +- ++ + (void) pthread_key_create(&keyThrdName, dbgThrdNameDestruct); + + /* while we try not to use any of the real rsyslog code (to avoid infinite loops), we +diff --git a/runtime/modules.c b/runtime/modules.c +index 810b2e9b52..b39bd9f066 100644 +--- a/runtime/modules.c ++++ b/runtime/modules.c +@@ -595,7 +595,7 @@ doModInit(pModInit_t modInit, uchar *name, void *pModHdlr, modInfo_t **pNewModul + CHKiRet((*pNew->modQueryEtryPt)((uchar*)"getKeepType", &modGetKeepType)); + CHKiRet((*modGetKeepType)(&pNew->eKeepType)); + dbgprintf("module %s of type %d being loaded (keepType=%d).\n", name, pNew->eType, pNew->eKeepType); +- ++ + /* OK, we know we can successfully work with the module. So we now fill the + * rest of the data elements. First we load the interfaces common to all + * module types. +@@ -1242,7 +1242,7 @@ Load(uchar *const pModName, const sbool bConfLoad, struct nvlst *const lst) + } + + iLoadCnt++; +- ++ + } while(pModHdlr == NULL && *pModName != '/' && pModDirNext); + + if(load_err_msg != NULL) { +@@ -1323,7 +1323,7 @@ modulesProcessCnf(struct cnfobj *o) + + cnfModName = (uchar*)es_str2cstr(pvals[typeIdx].val.d.estr, NULL); + iRet = Load(cnfModName, 1, o->nvlst); +- ++ + finalize_it: + free(cnfModName); + cnfparamvalsDestruct(pvals, &pblk); +diff --git a/runtime/rsyslog.h b/runtime/rsyslog.h +index 908e5e7b73..01616d8f7d 100644 +--- a/runtime/rsyslog.h ++++ b/runtime/rsyslog.h +@@ -604,6 +604,7 @@ enum rsRetVal_ /** return value. All methods return this if not specified oth + RS_RET_REDIS_ERROR = -2452, /**< redis-specific error. See message foe details. */ + RS_RET_REDIS_AUTH_FAILED = -2453, /**< redis authentication failure */ + RS_RET_FAUP_INIT_OPTIONS_FAILED = -2454, /**< could not initialize faup options */ ++ RS_RET_LIBCAPNG_ERR = -2455, /**< error during dropping the capabilities */ + + /* RainerScript error messages (range 1000.. 1999) */ + RS_RET_SYSVAR_NOT_FOUND = 1001, /**< system variable could not be found (maybe misspelled) */ +diff --git a/tools/rsyslogd.c b/tools/rsyslogd.c +index 31b91a1bd1..c209e1bcdd 100644 +--- a/tools/rsyslogd.c ++++ b/tools/rsyslogd.c +@@ -37,6 +37,9 @@ + #ifdef HAVE_LIBSYSTEMD + # include + #endif ++#ifdef ENABLE_LIBCAPNG ++ #include ++#endif + + #include "rsyslog.h" + #include "wti.h" +@@ -2167,6 +2170,45 @@ main(int argc, char **argv) + fjson_global_do_case_sensitive_comparison(0); + + dbgClassInit(); ++ ++#ifdef ENABLE_LIBCAPNG ++ /* ++ * Drop capabilities to the necessary set ++ */ ++ int capng_rc; ++ capng_clear(CAPNG_SELECT_BOTH); ++ ++ if ((capng_rc = capng_updatev(CAPNG_ADD, CAPNG_EFFECTIVE|CAPNG_PERMITTED, ++ CAP_BLOCK_SUSPEND, ++ CAP_CHOWN, ++ CAP_IPC_LOCK, ++ CAP_LEASE, ++ CAP_NET_ADMIN, ++ CAP_NET_BIND_SERVICE, ++ CAP_PERFMON, ++ CAP_SETGID, ++ CAP_SETUID, ++ CAP_SYS_ADMIN, ++ CAP_SYS_CHROOT, ++ CAP_SYS_RESOURCE, ++ CAP_SYSLOG, ++ -1 ++ )) != 0) { ++ LogError(0, RS_RET_LIBCAPNG_ERR, ++ "could not update the internal posix capabilities settings " ++ "based on the options passed to it, capng_updatev=%d\n", capng_rc); ++ exit(-1); ++ } ++ ++ if ((capng_rc = capng_apply(CAPNG_SELECT_BOTH)) != 0) { ++ LogError(0, RS_RET_LIBCAPNG_ERR, ++ "could not transfer the specified internal posix capabilities " ++ "settings to the kernel, capng_apply=%d\n", capng_rc); ++ exit(-1); ++ } ++ DBGPRINTF("Capabilities were dropped successfully\n"); ++#endif ++ + initAll(argc, argv); + #ifdef HAVE_LIBSYSTEMD + sd_notify(0, "READY=1"); + +From 305e07a2b757b98dc7e26c148c175901034451b9 Mon Sep 17 00:00:00 2001 +From: alakatos +Date: Mon, 31 Oct 2022 12:30:48 +0100 +Subject: [PATCH 2/2] Add ability to change uid and gid while retaining the + capabilities previously specified + +--- + runtime/rsconf.c | 23 ++++++++++++++++++++++- + 1 file changed, 22 insertions(+), 1 deletion(-) + +diff --git a/runtime/rsconf.c b/runtime/rsconf.c +index 4620ff8d13..24d1ec3570 100644 +--- a/runtime/rsconf.c ++++ b/runtime/rsconf.c +@@ -34,6 +34,10 @@ + #include + #include + #include ++#ifdef ENABLE_LIBCAPNG ++ #include ++#endif ++ + + #include "rsyslog.h" + #include "obj.h" +@@ -656,6 +660,7 @@ rsRetVal doDropPrivGid(rsconf_t *cnf) + uchar szBuf[1024]; + DEFiRet; + ++#ifndef ENABLE_LIBCAPNG + if(!cnf->globals.gidDropPrivKeepSupplemental) { + res = setgroups(0, NULL); /* remove all supplemental group IDs */ + if(res) { +@@ -668,9 +673,19 @@ rsRetVal doDropPrivGid(rsconf_t *cnf) + res = setgid(cnf->globals.gidDropPriv); + if(res) { + LogError(errno, RS_RET_ERR_DROP_PRIV, +- "could not set requested group id %d", cnf->globals.gidDropPriv); ++ "could not set requested group id %d via setgid()", cnf->globals.gidDropPriv); + ABORT_FINALIZE(RS_RET_ERR_DROP_PRIV); + } ++#else ++ int capng_flags = cnf->globals.gidDropPrivKeepSupplemental ? CAPNG_NO_FLAG : CAPNG_DROP_SUPP_GRP; ++ res = capng_change_id(-1, cnf->globals.gidDropPriv, capng_flags); ++ if (res) { ++ LogError(0, RS_RET_LIBCAPNG_ERR, ++ "could not set requested group id %d via capng_change_id()", cnf->globals.gidDropPriv); ++ ABORT_FINALIZE(RS_RET_LIBCAPNG_ERR); ++ } ++#endif ++ + DBGPRINTF("setgid(%d): %d\n", cnf->globals.gidDropPriv, res); + snprintf((char*)szBuf, sizeof(szBuf), "rsyslogd's groupid changed to %d", + cnf->globals.gidDropPriv); +@@ -705,12 +720,18 @@ static void doDropPrivUid(rsconf_t *cnf) + cnf->globals.uidDropPriv); + } + ++#ifndef ENABLE_LIBCAPNG + res = setuid(cnf->globals.uidDropPriv); ++#else ++ int capng_flags = cnf->globals.gidDropPrivKeepSupplemental ? CAPNG_NO_FLAG : CAPNG_DROP_SUPP_GRP; ++ res = capng_change_id(cnf->globals.uidDropPriv, -1, capng_flags); ++#endif + if(res) { + /* if we can not set the userid, this is fatal, so let's unconditionally abort */ + perror("could not set requested userid"); + exit(1); + } ++ + DBGPRINTF("setuid(%d): %d\n", cnf->globals.uidDropPriv, res); + snprintf((char*)szBuf, sizeof(szBuf), "rsyslogd's userid changed to %d", cnf->globals.uidDropPriv); + logmsgInternal(NO_ERRCODE, LOG_SYSLOG|LOG_INFO, szBuf, 0); diff --git a/rsyslog.spec b/rsyslog.spec index 54efe70..5063094 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -7,8 +7,8 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog -Version: 8.2204.0 -Release: 3%{?dist} +Version: 8.2210.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 @@ -22,7 +22,7 @@ Source5: rsyslog.service Source6: qpid-proton-0.34.0.tar.gz Patch0: openssl3-compatibility.patch -Patch1: rsyslog-8.2204.0-rhbz2082302-CVE-heap-based-buffer-overflow.patch +Patch1: rsyslog-8.2210.0-rhbz2127403-drop-capabilities.patch BuildRequires: make BuildRequires: gcc @@ -42,6 +42,7 @@ BuildRequires: python3-docutils BuildRequires: systemd-devel >= 204-8 BuildRequires: zlib-devel BuildRequires: openssl-devel +BuildRequires: libcap-ng-devel Requires: openssl-libs Recommends: %{name}-logrotate = %version-%release @@ -300,7 +301,7 @@ pushd .. %patch0 -p1 -b .openssl-compatibility popd -%patch1 -p1 -b .CVE-buffer-overflow +%patch1 -p1 -b .libcap-ng %build %ifarch sparc64 @@ -350,6 +351,7 @@ autoreconf -if --enable-clickhouse \ --enable-imdocker \ --enable-improg \ + --enable-libcap-ng \ --enable-libdbi \ --enable-omamqp1 \ --enable-omhiredis \ @@ -586,6 +588,12 @@ done %changelog +* Wed Nov 09 2022 Attila Lakatos - 8.2210.0-1 +- rebase to 8.2210.0 + resolves: rhbz#2097173 +- Drop capabilities to the necessary set via libcap-ng + resolves: rhbz#2127403 + * Wed Jul 27 2022 Attila Lakatos - 8.2204.0-3 - Restore default omfile template resolves: rhbz#2088618 diff --git a/sources b/sources index 660b19b..4004c45 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (rsyslog-8.2204.0.tar.gz) = d26ab950788b8931b895719f7d8a42509f709b69a76e4188df16f72be050863ee402310ad9300840fed4ac089638497725d67433172778be7b2932fa82210472 -SHA512 (rsyslog-doc-8.2204.0.tar.gz) = 361528b95c1f02cdc2b2ca8ba5252c8215996e81ef1602e08c46be4e1fd8c1c287dd7d52ae9b2b58c0ec7fe38d7079a89e10642ac3f34fe0b6c5737968999fb4 SHA512 (qpid-proton-0.34.0.tar.gz) = 0de6c3d11baeee1d69821a0f1879a61b314f14589e02ea7ed0de8814c741217fdcafdd978b4061f73bc75588886299f4ac6808021506545ec8a883f39ad54fb3 +SHA512 (rsyslog-8.2210.0.tar.gz) = c665b7f7a3c5ef31c9b62b50f815cfbb52db0cbe4a06934f4f1c3cd2a56fb49c319d33857ee92ab843aa5894cac16c16b8eccdf83714f31ab57a95049c4af231 +SHA512 (rsyslog-doc-8.2210.0.tar.gz) = e7847a9307a91fdf87d6cf91d2391eb75869679905b9598310c456fb3fe1864fc06dbdc649778f5b3788e47ffda0a6d89cb894258e55db441f7df7e74b0ae9f4 From c61f1049a42724b20984dc257b464057e6cf2c7b Mon Sep 17 00:00:00 2001 From: alakatos Date: Fri, 16 Dec 2022 12:43:29 +0100 Subject: [PATCH 60/99] Move all if rhel feature conditions to bcond Move to bcond: rdkafka, relp, mysql, pgsql, gssapi, gnutls, udpspoof, omamqp1 Move to bcond: clickhouse, imdocker, improg The idea was initiated by trawets at PR32 --- rsyslog.spec | 198 +++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 186 insertions(+), 12 deletions(-) diff --git a/rsyslog.spec b/rsyslog.spec index 5063094..fe58095 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -4,11 +4,38 @@ # The following packages are not enabled on rhel: # hiredis, libdbi, mongodb, rabbitmq # The omamqp1 plugin is built differently as qpid-proton is not available on rhel +%if 0%{?rhel} +%bcond_with hiredis +%bcond_with libdbi +%bcond_with mongodb +%bcond_with rabbitmq +%else +%bcond_without hiredis +%bcond_without libdbi +%bcond_without mongodb +%bcond_without rabbitmq +%endif + +# Add options to not build with features listed below, +# the default is to build with them. +%bcond_without clickhouse +%bcond_without imdocker +%bcond_without improg +%bcond_without gnutls +%bcond_without openssl +%bcond_without gssapi +%bcond_without omamqp1 +%bcond_without rdkafka +%bcond_without relp +%bcond_without mysql +%bcond_without pgsql +%bcond_without snmp +%bcond_without udpspoof Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.2210.0 -Release: 1%{?dist} +Release: 2%{?dist} License: (GPLv3+ and ASL 2.0) URL: http://www.rsyslog.com/ Source0: http://www.rsyslog.com/files/download/rsyslog/%{name}-%{version}.tar.gz @@ -40,11 +67,10 @@ BuildRequires: pkgconfig BuildRequires: python3-docutils # make sure systemd is in a version that isn't affected by rhbz#974132 BuildRequires: systemd-devel >= 204-8 +BuildRequires: systemd-rpm-macros BuildRequires: zlib-devel -BuildRequires: openssl-devel BuildRequires: libcap-ng-devel -Requires: openssl-libs Recommends: %{name}-logrotate = %version-%release Requires: bash >= 2.0 %{?systemd_ordering} @@ -87,51 +113,71 @@ Requires: %name = %version-%release Summary: Fields extraction module Requires: %name = %version-%release +%if %{with snmp} %package mmsnmptrapd Summary: Message modification module for snmptrapd generated messages Requires: %name = %version-%release +%endif +%if %{with mysql} %package mysql Summary: MySQL support for rsyslog Requires: %name = %version-%release BuildRequires: mariadb-connector-c-devel +%endif +%if %{with pgsql} %package pgsql Summary: PostgresSQL support for rsyslog Requires: %name = %version-%release BuildRequires: libpq-devel +%endif +%if %{with gssapi} %package gssapi Summary: GSSAPI authentication and encryption support for rsyslog Requires: %name = %version-%release BuildRequires: krb5-devel +%endif +%if %{with relp} %package relp Summary: RELP protocol support for rsyslog Requires: %name = %version-%release BuildRequires: librelp-devel >= 1.2.16 +%endif +%if %{with gnutls} %package gnutls Summary: TLS protocol support for rsyslog via GnuTLS library Requires: %name = %version-%release BuildRequires: gnutls-devel +%endif +%if %{with openssl} %package openssl Summary: TLS protocol support for rsyslog via OpenSSL library Group: System Environment/Daemons Requires: %name = %version-%release +Requires: openssl-libs BuildRequires: openssl-devel +%endif +%if %{with snmp} %package snmp Summary: SNMP protocol support for rsyslog Requires: %name = %version-%release BuildRequires: net-snmp-devel +%endif +%if %{with udpspoof} %package udpspoof Summary: Provides the omudpspoof module Requires: %name = %version-%release BuildRequires: libnet-devel +%endif +%if %{with omamqp1} %package omamqp1 Summary: Provides the omamqp1 module Requires: %name = %version-%release @@ -144,33 +190,42 @@ BuildRequires: gcc-c++ BuildRequires: cyrus-sasl-devel BuildRequires: openssl-devel BuildRequires: python3 +%endif +%if %{with rdkafka} %package kafka Summary: Provides the omkafka module Requires: %name = %version-%release BuildRequires: librdkafka-devel +%endif %package mmkubernetes Summary: Provides the mmkubernetes module Requires: %name = %version-%release BuildRequires: libcurl-devel -%if 0%{?rhel} == 0 +%if %{with hiredis} %package hiredis Summary: Redis support for rsyslog Requires: %name = %version-%release BuildRequires: hiredis-devel +%endif +%if %{with libdbi} %package libdbi Summary: Libdbi database support for rsyslog Requires: %name = %version-%release BuildRequires: libdbi-devel +%endif +%if %{with mongodb} %package mongodb Summary: MongoDB support for rsyslog Requires: %name = %version-%release BuildRequires: mongo-c-driver-devel snappy-devel cyrus-sasl-devel +%endif +%if %{with rabbitmq} %package rabbitmq Summary: RabbitMQ support for rsyslog Requires: %name = %version-%release @@ -217,73 +272,101 @@ advantage if a field-based log format is to be processed, like for example CEF and either a large number of fields is needed or a specific field is used multiple times inside filters. +%if %{with snmp} %description mmsnmptrapd This message modification module takes messages generated from snmptrapd and modifies them so that they look like they originated from the read originator. +%endif +%if %{with mysql} %description mysql The rsyslog-mysql package contains a dynamic shared object that will add MySQL database support to rsyslog. +%endif +%if %{with pgsql} %description pgsql The rsyslog-pgsql package contains a dynamic shared object that will add PostgreSQL database support to rsyslog. +%endif +%if %{with gssapi} %description gssapi The rsyslog-gssapi package contains the rsyslog plugins which support GSSAPI authentication and secure connections. GSSAPI is commonly used for Kerberos authentication. +%endif +%if %{with relp} %description relp The rsyslog-relp package contains the rsyslog plugins that provide the ability to receive syslog messages via the reliable RELP protocol. +%endif +%if %{with gnutls} %description gnutls The rsyslog-gnutls package contains the rsyslog plugins that provide the ability to send and receive syslog messages via TCP or RELP using TLS encryption via GnuTLS library. For details refer to rsyslog doc on imtcp and omfwd modules. +%endif +%if %{with openssl} %description openssl The rsyslog-openssl package contains the rsyslog plugins that provide the ability to send and receive syslog messages via TCP or RELP using TLS encryption via OpenSSL library. For details refer to rsyslog doc on imtcp and omfwd modules. +%endif +%if %{with snmp} %description snmp The rsyslog-snmp package contains the rsyslog plugin that provides the ability to send syslog messages as SNMPv1 and SNMPv2c traps. +%endif +%if %{with udpspoof} %description udpspoof This module is similar to the regular UDP forwarder, but permits to spoof the sender address. Also, it enables to circle through a number of source ports. +%endif +%if %{with omamqp1} %description omamqp1 The omamqp1 output module can be used to send log messages via an AMQP 1.0-compatible messaging bus. +%endif +%if %{with rdkafka} %description kafka The rsyslog-kafka package provides module for Apache Kafka output. +%endif %description mmkubernetes The rsyslog-mmkubernetes package provides module for adding kubernetes container metadata. -%if 0%{?rhel} == 0 +%if %{with hiredis} %description hiredis This module provides output to Redis. +%endif +%if %{with libdbi} %description libdbi This module supports a large number of database systems via libdbi. Libdbi abstracts the database layer and provides drivers for many systems. Drivers are available via the libdbi-drivers project. +%endif +%if %{with mongodb} %description mongodb The rsyslog-mongodb package contains a dynamic shared object that will add MongoDB database support to rsyslog. +%endif +%if %{with rabbitmq} %description rabbitmq This module allows rsyslog to send messages to a RabbitMQ server. %endif @@ -295,11 +378,14 @@ rm -r LICENSE README.md source build/objects.inv mv build doc # set up rsyslog sources %setup -q -D + +%if %{with omamqp1} # Unpack qpid-proton %setup -q -D -T -b 6 pushd .. %patch0 -p1 -b .openssl-compatibility popd +%endif %patch1 -p1 -b .libcap-ng @@ -310,6 +396,8 @@ export CFLAGS="$RPM_OPT_FLAGS -fPIC" %else export CFLAGS="$RPM_OPT_FLAGS -fpic" %endif + +%if %{with omamqp1} # build the proton first ( cd %{_builddir}/qpid-proton-0.34.0 @@ -328,6 +416,7 @@ export CFLAGS="$RPM_OPT_FLAGS -fpic" -DCMAKE_AR="/usr/bin/gcc-ar" -DCMAKE_NM="/usr/bin/gcc-nm" -DCMAKE_RANLIB="/usr/bin/gcc-ranlib" make -j8 ) +%endif %ifarch sparc64 #sparc64 need big PIE @@ -337,35 +426,61 @@ export CFLAGS="$RPM_OPT_FLAGS -fpie" %endif export LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now" +%if %{with hiredis} # the hiredis-devel package doesn't provide a pkg-config file -%if 0%{?rhel} == 0 export HIREDIS_CFLAGS=-I/usr/include/hiredis export HIREDIS_LIBS="-L%{_libdir} -lhiredis" %endif + sed -i 's/%{version}/%{version}-%{release}/g' configure.ac + autoreconf -if %configure \ --prefix=/usr \ --disable-static \ --disable-testbench \ +%if %{with clickhouse} --enable-clickhouse \ +%endif +%if %{with imdocker} --enable-imdocker \ +%endif +%if %{with improg} --enable-improg \ - --enable-libcap-ng \ +%endif + --enable-libcap-ng \ +%if %{with libdbi} --enable-libdbi \ - --enable-omamqp1 \ +%endif +%if %{with hiredis} --enable-omhiredis \ +%endif +%if %{with mongodb} --enable-ommongodb \ +%endif +%if %{with rabbitmq} --enable-omrabbitmq \ +%endif +%if %{with omamqp1} --enable-omamqp1 PROTON_LIBS="%{_builddir}/qpid-proton-0.34.0/bld/c/libqpid-proton-core-static.a %{_builddir}/qpid-proton-0.34.0/bld/c/libqpid-proton-proactor-static.a %{_builddir}/qpid-proton-0.34.0/bld/c/libqpid-proton-static.a -lssl -lsasl2 -lcrypto" PROTON_CFLAGS="-I%{_builddir}/qpid-proton-0.34.0/bld/c/include" \ +%endif --enable-elasticsearch \ --enable-generate-man-pages \ +%if %{with gnutls} --enable-gnutls \ +%endif +%if %{with openssl} --enable-openssl \ +%endif +%if %{with gssapi} --enable-gssapi-krb5 \ +%endif --enable-imfile \ --enable-imjournal \ +%if %{with rdkafka} --enable-imkafka \ + --enable-omkafka \ +%endif --enable-impstats \ --enable-imptcp \ --enable-mail \ @@ -376,25 +491,36 @@ autoreconf -if --enable-mmkubernetes \ --enable-mmjsonparse \ --enable-mmnormalize \ +%if %{with snmp} --enable-mmsnmptrapd \ +%endif --enable-mmutf8fix \ +%if %{with mysql} --enable-mysql \ +%endif --enable-omhttp \ --enable-omjournal \ --enable-omprog \ --enable-omstdout \ +%if %{with udpspoof} --enable-omudpspoof \ +%endif --enable-omuxsock \ +%if %{with pgsql} --enable-pgsql \ +%endif --enable-pmaixforwardedfrom \ --enable-pmcisconames \ --enable-pmlastmsg \ --enable-pmsnare \ +%if %{with relp} --enable-relp \ +%endif +%if %{with snmp} --enable-snmp \ +%endif --enable-unlimited-select \ - --enable-usertools \ - --enable-omkafka + --enable-usertools make V=1 @@ -416,8 +542,15 @@ 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 + +%if %{with mysql} install -p -m 644 plugins/ommysql/createDB.sql %{buildroot}%{rsyslog_docdir}/mysql-createDB.sql +%endif + +%if %{with pgsql} install -p -m 644 plugins/ompgsql/createDB.sql %{buildroot}%{rsyslog_docdir}/pgsql-createDB.sql +%endif + dos2unix tools/recover_qi.pl install -p -m 644 tools/recover_qi.pl %{buildroot}%{rsyslog_docdir}/recover_qi.pl install -p -m 644 contrib/mmkubernetes/*.rulebase %{buildroot}%{rsyslog_docdir} @@ -449,8 +582,12 @@ done %doc AUTHORS ChangeLog README.md %{rsyslog_docdir} %exclude %{rsyslog_docdir}/html +%if %{with mysql} %exclude %{rsyslog_docdir}/mysql-createDB.sql +%endif +%if %{with pgsql} %exclude %{rsyslog_docdir}/pgsql-createDB.sql +%endif %dir %{_libdir}/rsyslog %dir %{_sysconfdir}/rsyslog.d %dir %{rsyslog_statedir} @@ -495,9 +632,13 @@ done %{_libdir}/rsyslog/pmcisconames.so %{_libdir}/rsyslog/pmlastmsg.so %{_libdir}/rsyslog/pmsnare.so -%if 0%{?rhel} == 0 +%if %{with imdocker} %{_libdir}/rsyslog/imdocker.so +%endif +%if %{with improg} %{_libdir}/rsyslog/improg.so +%endif +%if %{with clickhouse} %{_libdir}/rsyslog/omclickhouse.so %endif @@ -527,67 +668,100 @@ done %files mmnormalize %{_libdir}/rsyslog/mmnormalize.so +%if %{with snmp} %files mmsnmptrapd %{_libdir}/rsyslog/mmsnmptrapd.so +%endif +%if %{with mysql} %files mysql %doc %{rsyslog_docdir}/mysql-createDB.sql %{_libdir}/rsyslog/ommysql.so +%endif +%if %{with pgsql} %files pgsql %doc %{rsyslog_docdir}/pgsql-createDB.sql %{_libdir}/rsyslog/ompgsql.so +%endif +%if %{with gssapi} %files gssapi %{_libdir}/rsyslog/lmgssutil.so %{_libdir}/rsyslog/imgssapi.so %{_libdir}/rsyslog/omgssapi.so +%endif +%if %{with relp} %files relp %{_libdir}/rsyslog/imrelp.so %{_libdir}/rsyslog/omrelp.so +%endif +%if %{with gnutls} %files gnutls %{_libdir}/rsyslog/lmnsd_gtls.so +%endif +%if %{with openssl} %files openssl %{_libdir}/rsyslog/lmnsd_ossl.so +%endif +%if %{with snmp} %files snmp %{_libdir}/rsyslog/omsnmp.so +%endif +%if %{with udpspoof} %files udpspoof %{_libdir}/rsyslog/omudpspoof.so +%endif +%if %{with omamqp1} %files omamqp1 %{_libdir}/rsyslog/omamqp1.so +%endif +%if %{with rdkafka} %files kafka %{_libdir}/rsyslog/imkafka.so %{_libdir}/rsyslog/omkafka.so +%endif %files mmkubernetes %{_libdir}/rsyslog/mmkubernetes.so %doc %{rsyslog_docdir}/k8s_filename.rulebase %doc %{rsyslog_docdir}/k8s_container_name.rulebase -%if 0%{?rhel} == 0 +%if %{with hiredis} %files hiredis %{_libdir}/rsyslog/omhiredis.so +%endif +%if %{with libdbi} %files libdbi %{_libdir}/rsyslog/omlibdbi.so +%endif +%if %{with mongodb} %files mongodb %{_bindir}/logctl %{_libdir}/rsyslog/ommongodb.so +%endif +%if %{with rabbitmq} %files rabbitmq %{_libdir}/rsyslog/omrabbitmq.so %endif %changelog +* Fri Dec 16 2022 Attila Lakatos - 8.2210.0-2 +- Move all if rhel feature conditions to bcond +- Move to bcond: rdkafka, relp, mysql, pgsql, gssapi, gnutls, udpspoof, omamqp1 +- Move to bcond: clickhouse, imdocker, improg + * Wed Nov 09 2022 Attila Lakatos - 8.2210.0-1 - rebase to 8.2210.0 resolves: rhbz#2097173 From 8b6dfc76536de1794469f66d5f830692a040fdaf Mon Sep 17 00:00:00 2001 From: alakatos Date: Tue, 17 Jan 2023 17:01:37 +0100 Subject: [PATCH 61/99] Adjust capability set for libcap-ng --- ...2210.0-rhbz2127403-drop-capabilities.patch | 205 +++++++++--------- rsyslog.spec | 6 +- 2 files changed, 109 insertions(+), 102 deletions(-) diff --git a/rsyslog-8.2210.0-rhbz2127403-drop-capabilities.patch b/rsyslog-8.2210.0-rhbz2127403-drop-capabilities.patch index 6b3f43f..cb583fb 100644 --- a/rsyslog-8.2210.0-rhbz2127403-drop-capabilities.patch +++ b/rsyslog-8.2210.0-rhbz2127403-drop-capabilities.patch @@ -1,20 +1,3 @@ -From e9f85312630eb25d0985e911475803bd06f4173e Mon Sep 17 00:00:00 2001 -From: alakatos -Date: Thu, 13 Oct 2022 10:41:38 +0200 -Subject: [PATCH 1/2] Introduce --enable-libcap-ng configure option - -The option allows to drop the capabilities to only -the necessary set, to minimize security exposure in -case there was ever a mistake in a networking -plugin or some other input resource. Resolves #4986 ---- - configure.ac | 24 ++++++++++++++++++++++++ - runtime/debug.c | 4 ++-- - runtime/modules.c | 6 +++--- - runtime/rsyslog.h | 1 + - tools/rsyslogd.c | 42 ++++++++++++++++++++++++++++++++++++++++++ - 5 files changed, 72 insertions(+), 5 deletions(-) - diff --git a/configure.ac b/configure.ac index 9f73a708d0..958c26245e 100644 --- a/configure.ac @@ -110,91 +93,8 @@ index 810b2e9b52..b39bd9f066 100644 finalize_it: free(cnfModName); cnfparamvalsDestruct(pvals, &pblk); -diff --git a/runtime/rsyslog.h b/runtime/rsyslog.h -index 908e5e7b73..01616d8f7d 100644 ---- a/runtime/rsyslog.h -+++ b/runtime/rsyslog.h -@@ -604,6 +604,7 @@ enum rsRetVal_ /** return value. All methods return this if not specified oth - RS_RET_REDIS_ERROR = -2452, /**< redis-specific error. See message foe details. */ - RS_RET_REDIS_AUTH_FAILED = -2453, /**< redis authentication failure */ - RS_RET_FAUP_INIT_OPTIONS_FAILED = -2454, /**< could not initialize faup options */ -+ RS_RET_LIBCAPNG_ERR = -2455, /**< error during dropping the capabilities */ - - /* RainerScript error messages (range 1000.. 1999) */ - RS_RET_SYSVAR_NOT_FOUND = 1001, /**< system variable could not be found (maybe misspelled) */ -diff --git a/tools/rsyslogd.c b/tools/rsyslogd.c -index 31b91a1bd1..c209e1bcdd 100644 ---- a/tools/rsyslogd.c -+++ b/tools/rsyslogd.c -@@ -37,6 +37,9 @@ - #ifdef HAVE_LIBSYSTEMD - # include - #endif -+#ifdef ENABLE_LIBCAPNG -+ #include -+#endif - - #include "rsyslog.h" - #include "wti.h" -@@ -2167,6 +2170,45 @@ main(int argc, char **argv) - fjson_global_do_case_sensitive_comparison(0); - - dbgClassInit(); -+ -+#ifdef ENABLE_LIBCAPNG -+ /* -+ * Drop capabilities to the necessary set -+ */ -+ int capng_rc; -+ capng_clear(CAPNG_SELECT_BOTH); -+ -+ if ((capng_rc = capng_updatev(CAPNG_ADD, CAPNG_EFFECTIVE|CAPNG_PERMITTED, -+ CAP_BLOCK_SUSPEND, -+ CAP_CHOWN, -+ CAP_IPC_LOCK, -+ CAP_LEASE, -+ CAP_NET_ADMIN, -+ CAP_NET_BIND_SERVICE, -+ CAP_PERFMON, -+ CAP_SETGID, -+ CAP_SETUID, -+ CAP_SYS_ADMIN, -+ CAP_SYS_CHROOT, -+ CAP_SYS_RESOURCE, -+ CAP_SYSLOG, -+ -1 -+ )) != 0) { -+ LogError(0, RS_RET_LIBCAPNG_ERR, -+ "could not update the internal posix capabilities settings " -+ "based on the options passed to it, capng_updatev=%d\n", capng_rc); -+ exit(-1); -+ } -+ -+ if ((capng_rc = capng_apply(CAPNG_SELECT_BOTH)) != 0) { -+ LogError(0, RS_RET_LIBCAPNG_ERR, -+ "could not transfer the specified internal posix capabilities " -+ "settings to the kernel, capng_apply=%d\n", capng_rc); -+ exit(-1); -+ } -+ DBGPRINTF("Capabilities were dropped successfully\n"); -+#endif -+ - initAll(argc, argv); - #ifdef HAVE_LIBSYSTEMD - sd_notify(0, "READY=1"); - -From 305e07a2b757b98dc7e26c148c175901034451b9 Mon Sep 17 00:00:00 2001 -From: alakatos -Date: Mon, 31 Oct 2022 12:30:48 +0100 -Subject: [PATCH 2/2] Add ability to change uid and gid while retaining the - capabilities previously specified - ---- - runtime/rsconf.c | 23 ++++++++++++++++++++++- - 1 file changed, 22 insertions(+), 1 deletion(-) - diff --git a/runtime/rsconf.c b/runtime/rsconf.c -index 4620ff8d13..24d1ec3570 100644 +index 4620ff8d13..de2a21b406 100644 --- a/runtime/rsconf.c +++ b/runtime/rsconf.c @@ -34,6 +34,10 @@ @@ -256,3 +156,106 @@ index 4620ff8d13..24d1ec3570 100644 DBGPRINTF("setuid(%d): %d\n", cnf->globals.uidDropPriv, res); snprintf((char*)szBuf, sizeof(szBuf), "rsyslogd's userid changed to %d", cnf->globals.uidDropPriv); logmsgInternal(NO_ERRCODE, LOG_SYSLOG|LOG_INFO, szBuf, 0); +@@ -739,6 +760,29 @@ dropPrivileges(rsconf_t *cnf) + cnf->globals.uidDropPriv); + } + ++#ifdef ENABLE_LIBCAPNG ++ /* In case privileges were dropped, do not allow bypassing ++ * file read, write, and execute permission checks ++ */ ++ if (cnf->globals.gidDropPriv != 0 || cnf->globals.uidDropPriv != 0) { ++ int capng_rc; ++ if ((capng_rc = capng_update(CAPNG_DROP, CAPNG_EFFECTIVE|CAPNG_PERMITTED, CAP_DAC_OVERRIDE)) != 0) { ++ LogError(0, RS_RET_LIBCAPNG_ERR, ++ "could not update the internal posix capabilities settings " ++ "based on the options passed to it, capng_update=%d\n", capng_rc); ++ exit(-1); ++ } ++ ++ if ((capng_rc = capng_apply(CAPNG_SELECT_BOTH)) != 0) { ++ LogError(0, RS_RET_LIBCAPNG_ERR, ++ "could not transfer the specified internal posix capabilities " ++ "settings to the kernel, capng_apply=%d\n", capng_rc); ++ exit(-1); ++ } ++ } ++ ++#endif ++ + finalize_it: + RETiRet; + } +diff --git a/runtime/rsyslog.h b/runtime/rsyslog.h +index 908e5e7b73..01616d8f7d 100644 +--- a/runtime/rsyslog.h ++++ b/runtime/rsyslog.h +@@ -604,6 +604,7 @@ enum rsRetVal_ /** return value. All methods return this if not specified oth + RS_RET_REDIS_ERROR = -2452, /**< redis-specific error. See message foe details. */ + RS_RET_REDIS_AUTH_FAILED = -2453, /**< redis authentication failure */ + RS_RET_FAUP_INIT_OPTIONS_FAILED = -2454, /**< could not initialize faup options */ ++ RS_RET_LIBCAPNG_ERR = -2455, /**< error during dropping the capabilities */ + + /* RainerScript error messages (range 1000.. 1999) */ + RS_RET_SYSVAR_NOT_FOUND = 1001, /**< system variable could not be found (maybe misspelled) */ +diff --git a/tools/rsyslogd.c b/tools/rsyslogd.c +index 31b91a1bd1..77d814b482 100644 +--- a/tools/rsyslogd.c ++++ b/tools/rsyslogd.c +@@ -37,6 +37,9 @@ + #ifdef HAVE_LIBSYSTEMD + # include + #endif ++#ifdef ENABLE_LIBCAPNG ++ #include ++#endif + + #include "rsyslog.h" + #include "wti.h" +@@ -2167,6 +2170,46 @@ main(int argc, char **argv) + fjson_global_do_case_sensitive_comparison(0); + + dbgClassInit(); ++ ++#ifdef ENABLE_LIBCAPNG ++ /* ++ * Drop capabilities to the necessary set ++ */ ++ int capng_rc; ++ capng_clear(CAPNG_SELECT_BOTH); ++ ++ if ((capng_rc = capng_updatev(CAPNG_ADD, CAPNG_EFFECTIVE|CAPNG_PERMITTED, ++ CAP_BLOCK_SUSPEND, ++ CAP_CHOWN, ++ CAP_IPC_LOCK, ++ CAP_LEASE, ++ CAP_NET_ADMIN, ++ CAP_NET_BIND_SERVICE, ++ CAP_DAC_OVERRIDE, ++ CAP_SETGID, ++ CAP_SETUID, ++ CAP_SETPCAP, ++ CAP_SYS_ADMIN, ++ CAP_SYS_CHROOT, ++ CAP_SYS_RESOURCE, ++ CAP_SYSLOG, ++ -1 ++ )) != 0) { ++ LogError(0, RS_RET_LIBCAPNG_ERR, ++ "could not update the internal posix capabilities settings " ++ "based on the options passed to it, capng_updatev=%d\n", capng_rc); ++ exit(-1); ++ } ++ ++ if ((capng_rc = capng_apply(CAPNG_SELECT_BOTH)) != 0) { ++ LogError(0, RS_RET_LIBCAPNG_ERR, ++ "could not transfer the specified internal posix capabilities " ++ "settings to the kernel, capng_apply=%d\n", capng_rc); ++ exit(-1); ++ } ++ DBGPRINTF("Capabilities were dropped successfully\n"); ++#endif ++ + initAll(argc, argv); + #ifdef HAVE_LIBSYSTEMD + sd_notify(0, "READY=1"); diff --git a/rsyslog.spec b/rsyslog.spec index fe58095..867e492 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -35,7 +35,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.2210.0 -Release: 2%{?dist} +Release: 3%{?dist} License: (GPLv3+ and ASL 2.0) URL: http://www.rsyslog.com/ Source0: http://www.rsyslog.com/files/download/rsyslog/%{name}-%{version}.tar.gz @@ -757,6 +757,10 @@ done %changelog +* Tue Jan 17 2023 Attila Lakatos - 8.2210.0-3 +- Remove CAP_PERFMON from the capability set +- Add CAP_DAC_OVERRIDE to the capability set + * Fri Dec 16 2022 Attila Lakatos - 8.2210.0-2 - Move all if rhel feature conditions to bcond - Move to bcond: rdkafka, relp, mysql, pgsql, gssapi, gnutls, udpspoof, omamqp1 From cee335df7d97c78dd9338fe98151f0fad9331788 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 20 Jan 2023 20:02:28 +0000 Subject: [PATCH 62/99] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rsyslog.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rsyslog.spec b/rsyslog.spec index 867e492..6d8ce51 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -35,7 +35,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.2210.0 -Release: 3%{?dist} +Release: 4%{?dist} License: (GPLv3+ and ASL 2.0) URL: http://www.rsyslog.com/ Source0: http://www.rsyslog.com/files/download/rsyslog/%{name}-%{version}.tar.gz @@ -757,6 +757,9 @@ done %changelog +* Fri Jan 20 2023 Fedora Release Engineering - 8.2210.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Tue Jan 17 2023 Attila Lakatos - 8.2210.0-3 - Remove CAP_PERFMON from the capability set - Add CAP_DAC_OVERRIDE to the capability set From 00eb7785d393eb8d62b9a33811ca96912d1e38ba Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Wed, 10 May 2023 21:34:17 -0400 Subject: [PATCH 63/99] Use `systemctl reload` in logrotate script In 5f74814 (Use systemctl for sending SIGHUP to the service, 2015-06-29), a direct call to `kill` was replaced with `systemctl kill`. This can be simplified using `systemctl reload` instead. Doing so also resolves an issue when `POSIXLY_CORRECT` is set (rhbz#2124488). --- rsyslog.log | 2 +- rsyslog.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/rsyslog.log b/rsyslog.log index b101e32..42b31c8 100644 --- a/rsyslog.log +++ b/rsyslog.log @@ -7,6 +7,6 @@ missingok sharedscripts postrotate - /usr/bin/systemctl kill -s HUP rsyslog.service >/dev/null 2>&1 || true + /usr/bin/systemctl reload rsyslog.service >/dev/null 2>&1 || true endscript } diff --git a/rsyslog.spec b/rsyslog.spec index 6d8ce51..dfb6c1d 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -35,7 +35,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.2210.0 -Release: 4%{?dist} +Release: 5%{?dist} License: (GPLv3+ and ASL 2.0) URL: http://www.rsyslog.com/ Source0: http://www.rsyslog.com/files/download/rsyslog/%{name}-%{version}.tar.gz @@ -757,6 +757,9 @@ done %changelog +* Wed May 10 2023 Todd Zullinger - 8.2210.0-5 +- Use 'systemctl reload' in logrotate script + * Fri Jan 20 2023 Fedora Release Engineering - 8.2210.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 2e07e95fe6daedfd3783febe9f46ad9402b4d7da Mon Sep 17 00:00:00 2001 From: alakatos Date: Wed, 31 May 2023 10:22:06 +0200 Subject: [PATCH 64/99] Update License tag for SPDX --- rsyslog.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rsyslog.spec b/rsyslog.spec index dfb6c1d..9770566 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -36,7 +36,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.2210.0 Release: 5%{?dist} -License: (GPLv3+ and ASL 2.0) +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 Source1: http://www.rsyslog.com/files/download/rsyslog/%{name}-doc-%{version}.tar.gz From c9299748811187975207ed6c200555214aae9b57 Mon Sep 17 00:00:00 2001 From: alakatos Date: Wed, 31 May 2023 10:23:51 +0200 Subject: [PATCH 65/99] Fix deprecated %patchN --- rsyslog.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rsyslog.spec b/rsyslog.spec index 9770566..8aca4fe 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -383,11 +383,11 @@ mv build doc # Unpack qpid-proton %setup -q -D -T -b 6 pushd .. -%patch0 -p1 -b .openssl-compatibility +%patch -P 0 -p1 -b .openssl-compatibility popd %endif -%patch1 -p1 -b .libcap-ng +%patch -P 1 -p1 -b .libcap-ng %build %ifarch sparc64 From 88e628e1aa9d2832b1aeb9c45069beb446319ee9 Mon Sep 17 00:00:00 2001 From: alakatos Date: Wed, 21 Jun 2023 08:51:10 +0200 Subject: [PATCH 66/99] rebase to 8.2306.0 resolves: rhbz#2151339 resolves: rhbz#2151092 --- .gitignore | 2 + ...2210.0-rhbz2127403-drop-capabilities.patch | 261 ------------------ rsyslog.spec | 12 +- sources | 4 +- 4 files changed, 11 insertions(+), 268 deletions(-) delete mode 100644 rsyslog-8.2210.0-rhbz2127403-drop-capabilities.patch diff --git a/.gitignore b/.gitignore index 54c1f3c..ec39248 100644 --- a/.gitignore +++ b/.gitignore @@ -85,3 +85,5 @@ rsyslog-4.6.3.tar.gz /rsyslog-doc-8.2204.0.tar.gz /rsyslog-8.2210.0.tar.gz /rsyslog-doc-8.2210.0.tar.gz +/rsyslog-8.2306.0.tar.gz +/rsyslog-doc-8.2306.0.tar.gz diff --git a/rsyslog-8.2210.0-rhbz2127403-drop-capabilities.patch b/rsyslog-8.2210.0-rhbz2127403-drop-capabilities.patch deleted file mode 100644 index cb583fb..0000000 --- a/rsyslog-8.2210.0-rhbz2127403-drop-capabilities.patch +++ /dev/null @@ -1,261 +0,0 @@ -diff --git a/configure.ac b/configure.ac -index 9f73a708d0..958c26245e 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -377,6 +377,28 @@ AC_ARG_ENABLE(fmhash, - [enable_fmhash=yes] - ) - -+AC_ARG_ENABLE(libcap-ng, -+ [AS_HELP_STRING([--enable-libcap-ng],[Enable dropping capabilities to only the necessary set @<:@default=no@:>@])], -+ [case "${enableval}" in -+ yes) enable_libcapng="yes" ;; -+ no) enable_libcapng="no" ;; -+ *) AC_MSG_ERROR(bad value ${enableval} for --enable_libcapng) ;; -+ esac], -+ [enable_libcapng=no] -+) -+ -+if test "$enable_libcapng" = "yes"; then -+ PKG_CHECK_MODULES( -+ [LIBCAPNG], -+ [libcap-ng >= 0.8.2], -+ [AC_DEFINE([ENABLE_LIBCAPNG], [1], [Indicator that libcap-ng is present])], -+ [AC_MSG_ERROR(libcap-ng is not present.)] -+ ) -+ CFLAGS="$CFLAGS $LIBCAPNG_CFLAGS" -+ LIBS="$LIBS $LIBCAPNG_LIBS" -+fi -+ -+ - AC_ARG_ENABLE(fmhash-xxhash, - [AS_HELP_STRING([--enable-fmhash-xxhash],[Enable xxhash in fmhash support @<:@default=no@:>@])], - [case "${enableval}" in -@@ -2820,6 +2842,8 @@ echo " liblogging-stdlog support enabled: $enable_liblogging_stdlog" - echo " libsystemd enabled: $enable_libsystemd" - echo " kafka static linking enabled: $enable_kafka_static" - echo " atomic operations enabled: $enable_atomic_operations" -+echo " libcap-ng support enabled: $enable_libcapng" -+ - echo - echo "---{ input plugins }---" - if test "$unamestr" != "AIX"; then -diff --git a/runtime/debug.c b/runtime/debug.c -index a655bc2e4e..6e6c9fd38f 100644 ---- a/runtime/debug.c -+++ b/runtime/debug.c -@@ -250,7 +250,7 @@ r_dbgoprint( const char *srcname, obj_t *pObj, const char *fmt, ...) - - if(!(Debug && debugging_on)) - return; -- -+ - if(!checkDbgFile(srcname)) { - return; - } -@@ -435,7 +435,7 @@ rsRetVal dbgClassInit(void) - { - rsRetVal iRet; /* do not use DEFiRet, as this makes calls into the debug system! */ - -- -+ - (void) pthread_key_create(&keyThrdName, dbgThrdNameDestruct); - - /* while we try not to use any of the real rsyslog code (to avoid infinite loops), we -diff --git a/runtime/modules.c b/runtime/modules.c -index 810b2e9b52..b39bd9f066 100644 ---- a/runtime/modules.c -+++ b/runtime/modules.c -@@ -595,7 +595,7 @@ doModInit(pModInit_t modInit, uchar *name, void *pModHdlr, modInfo_t **pNewModul - CHKiRet((*pNew->modQueryEtryPt)((uchar*)"getKeepType", &modGetKeepType)); - CHKiRet((*modGetKeepType)(&pNew->eKeepType)); - dbgprintf("module %s of type %d being loaded (keepType=%d).\n", name, pNew->eType, pNew->eKeepType); -- -+ - /* OK, we know we can successfully work with the module. So we now fill the - * rest of the data elements. First we load the interfaces common to all - * module types. -@@ -1242,7 +1242,7 @@ Load(uchar *const pModName, const sbool bConfLoad, struct nvlst *const lst) - } - - iLoadCnt++; -- -+ - } while(pModHdlr == NULL && *pModName != '/' && pModDirNext); - - if(load_err_msg != NULL) { -@@ -1323,7 +1323,7 @@ modulesProcessCnf(struct cnfobj *o) - - cnfModName = (uchar*)es_str2cstr(pvals[typeIdx].val.d.estr, NULL); - iRet = Load(cnfModName, 1, o->nvlst); -- -+ - finalize_it: - free(cnfModName); - cnfparamvalsDestruct(pvals, &pblk); -diff --git a/runtime/rsconf.c b/runtime/rsconf.c -index 4620ff8d13..de2a21b406 100644 ---- a/runtime/rsconf.c -+++ b/runtime/rsconf.c -@@ -34,6 +34,10 @@ - #include - #include - #include -+#ifdef ENABLE_LIBCAPNG -+ #include -+#endif -+ - - #include "rsyslog.h" - #include "obj.h" -@@ -656,6 +660,7 @@ rsRetVal doDropPrivGid(rsconf_t *cnf) - uchar szBuf[1024]; - DEFiRet; - -+#ifndef ENABLE_LIBCAPNG - if(!cnf->globals.gidDropPrivKeepSupplemental) { - res = setgroups(0, NULL); /* remove all supplemental group IDs */ - if(res) { -@@ -668,9 +673,19 @@ rsRetVal doDropPrivGid(rsconf_t *cnf) - res = setgid(cnf->globals.gidDropPriv); - if(res) { - LogError(errno, RS_RET_ERR_DROP_PRIV, -- "could not set requested group id %d", cnf->globals.gidDropPriv); -+ "could not set requested group id %d via setgid()", cnf->globals.gidDropPriv); - ABORT_FINALIZE(RS_RET_ERR_DROP_PRIV); - } -+#else -+ int capng_flags = cnf->globals.gidDropPrivKeepSupplemental ? CAPNG_NO_FLAG : CAPNG_DROP_SUPP_GRP; -+ res = capng_change_id(-1, cnf->globals.gidDropPriv, capng_flags); -+ if (res) { -+ LogError(0, RS_RET_LIBCAPNG_ERR, -+ "could not set requested group id %d via capng_change_id()", cnf->globals.gidDropPriv); -+ ABORT_FINALIZE(RS_RET_LIBCAPNG_ERR); -+ } -+#endif -+ - DBGPRINTF("setgid(%d): %d\n", cnf->globals.gidDropPriv, res); - snprintf((char*)szBuf, sizeof(szBuf), "rsyslogd's groupid changed to %d", - cnf->globals.gidDropPriv); -@@ -705,12 +720,18 @@ static void doDropPrivUid(rsconf_t *cnf) - cnf->globals.uidDropPriv); - } - -+#ifndef ENABLE_LIBCAPNG - res = setuid(cnf->globals.uidDropPriv); -+#else -+ int capng_flags = cnf->globals.gidDropPrivKeepSupplemental ? CAPNG_NO_FLAG : CAPNG_DROP_SUPP_GRP; -+ res = capng_change_id(cnf->globals.uidDropPriv, -1, capng_flags); -+#endif - if(res) { - /* if we can not set the userid, this is fatal, so let's unconditionally abort */ - perror("could not set requested userid"); - exit(1); - } -+ - DBGPRINTF("setuid(%d): %d\n", cnf->globals.uidDropPriv, res); - snprintf((char*)szBuf, sizeof(szBuf), "rsyslogd's userid changed to %d", cnf->globals.uidDropPriv); - logmsgInternal(NO_ERRCODE, LOG_SYSLOG|LOG_INFO, szBuf, 0); -@@ -739,6 +760,29 @@ dropPrivileges(rsconf_t *cnf) - cnf->globals.uidDropPriv); - } - -+#ifdef ENABLE_LIBCAPNG -+ /* In case privileges were dropped, do not allow bypassing -+ * file read, write, and execute permission checks -+ */ -+ if (cnf->globals.gidDropPriv != 0 || cnf->globals.uidDropPriv != 0) { -+ int capng_rc; -+ if ((capng_rc = capng_update(CAPNG_DROP, CAPNG_EFFECTIVE|CAPNG_PERMITTED, CAP_DAC_OVERRIDE)) != 0) { -+ LogError(0, RS_RET_LIBCAPNG_ERR, -+ "could not update the internal posix capabilities settings " -+ "based on the options passed to it, capng_update=%d\n", capng_rc); -+ exit(-1); -+ } -+ -+ if ((capng_rc = capng_apply(CAPNG_SELECT_BOTH)) != 0) { -+ LogError(0, RS_RET_LIBCAPNG_ERR, -+ "could not transfer the specified internal posix capabilities " -+ "settings to the kernel, capng_apply=%d\n", capng_rc); -+ exit(-1); -+ } -+ } -+ -+#endif -+ - finalize_it: - RETiRet; - } -diff --git a/runtime/rsyslog.h b/runtime/rsyslog.h -index 908e5e7b73..01616d8f7d 100644 ---- a/runtime/rsyslog.h -+++ b/runtime/rsyslog.h -@@ -604,6 +604,7 @@ enum rsRetVal_ /** return value. All methods return this if not specified oth - RS_RET_REDIS_ERROR = -2452, /**< redis-specific error. See message foe details. */ - RS_RET_REDIS_AUTH_FAILED = -2453, /**< redis authentication failure */ - RS_RET_FAUP_INIT_OPTIONS_FAILED = -2454, /**< could not initialize faup options */ -+ RS_RET_LIBCAPNG_ERR = -2455, /**< error during dropping the capabilities */ - - /* RainerScript error messages (range 1000.. 1999) */ - RS_RET_SYSVAR_NOT_FOUND = 1001, /**< system variable could not be found (maybe misspelled) */ -diff --git a/tools/rsyslogd.c b/tools/rsyslogd.c -index 31b91a1bd1..77d814b482 100644 ---- a/tools/rsyslogd.c -+++ b/tools/rsyslogd.c -@@ -37,6 +37,9 @@ - #ifdef HAVE_LIBSYSTEMD - # include - #endif -+#ifdef ENABLE_LIBCAPNG -+ #include -+#endif - - #include "rsyslog.h" - #include "wti.h" -@@ -2167,6 +2170,46 @@ main(int argc, char **argv) - fjson_global_do_case_sensitive_comparison(0); - - dbgClassInit(); -+ -+#ifdef ENABLE_LIBCAPNG -+ /* -+ * Drop capabilities to the necessary set -+ */ -+ int capng_rc; -+ capng_clear(CAPNG_SELECT_BOTH); -+ -+ if ((capng_rc = capng_updatev(CAPNG_ADD, CAPNG_EFFECTIVE|CAPNG_PERMITTED, -+ CAP_BLOCK_SUSPEND, -+ CAP_CHOWN, -+ CAP_IPC_LOCK, -+ CAP_LEASE, -+ CAP_NET_ADMIN, -+ CAP_NET_BIND_SERVICE, -+ CAP_DAC_OVERRIDE, -+ CAP_SETGID, -+ CAP_SETUID, -+ CAP_SETPCAP, -+ CAP_SYS_ADMIN, -+ CAP_SYS_CHROOT, -+ CAP_SYS_RESOURCE, -+ CAP_SYSLOG, -+ -1 -+ )) != 0) { -+ LogError(0, RS_RET_LIBCAPNG_ERR, -+ "could not update the internal posix capabilities settings " -+ "based on the options passed to it, capng_updatev=%d\n", capng_rc); -+ exit(-1); -+ } -+ -+ if ((capng_rc = capng_apply(CAPNG_SELECT_BOTH)) != 0) { -+ LogError(0, RS_RET_LIBCAPNG_ERR, -+ "could not transfer the specified internal posix capabilities " -+ "settings to the kernel, capng_apply=%d\n", capng_rc); -+ exit(-1); -+ } -+ DBGPRINTF("Capabilities were dropped successfully\n"); -+#endif -+ - initAll(argc, argv); - #ifdef HAVE_LIBSYSTEMD - sd_notify(0, "READY=1"); diff --git a/rsyslog.spec b/rsyslog.spec index 8aca4fe..1e95405 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -34,8 +34,8 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog -Version: 8.2210.0 -Release: 5%{?dist} +Version: 8.2306.0 +Release: 1%{?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,7 +49,6 @@ Source5: rsyslog.service Source6: qpid-proton-0.34.0.tar.gz Patch0: openssl3-compatibility.patch -Patch1: rsyslog-8.2210.0-rhbz2127403-drop-capabilities.patch BuildRequires: make BuildRequires: gcc @@ -387,8 +386,6 @@ pushd .. popd %endif -%patch -P 1 -p1 -b .libcap-ng - %build %ifarch sparc64 #sparc64 need big PIC @@ -757,6 +754,11 @@ done %changelog +* Wed Jun 21 2023 Attila Lakatos - 8.2306.0-1 +- rebase to 8.2306.0 + resolves: rhbz#2151339 + resolves: rhbz#2151092 + * Wed May 10 2023 Todd Zullinger - 8.2210.0-5 - Use 'systemctl reload' in logrotate script diff --git a/sources b/sources index 4004c45..114fa0f 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ SHA512 (qpid-proton-0.34.0.tar.gz) = 0de6c3d11baeee1d69821a0f1879a61b314f14589e02ea7ed0de8814c741217fdcafdd978b4061f73bc75588886299f4ac6808021506545ec8a883f39ad54fb3 -SHA512 (rsyslog-8.2210.0.tar.gz) = c665b7f7a3c5ef31c9b62b50f815cfbb52db0cbe4a06934f4f1c3cd2a56fb49c319d33857ee92ab843aa5894cac16c16b8eccdf83714f31ab57a95049c4af231 -SHA512 (rsyslog-doc-8.2210.0.tar.gz) = e7847a9307a91fdf87d6cf91d2391eb75869679905b9598310c456fb3fe1864fc06dbdc649778f5b3788e47ffda0a6d89cb894258e55db441f7df7e74b0ae9f4 +SHA512 (rsyslog-8.2306.0.tar.gz) = 4012ea18d49efa75438aa225fec1daafcaadc216cd5c0ecceccdc34688940bbdca9eb19bd9c401e834b023d9b9a5a0870529f7b855bb64c796a55538639dadfc +SHA512 (rsyslog-doc-8.2306.0.tar.gz) = eb5df4285ed9f5afe884dae497ed77ad96050a9101e94c8d83125c893998094e27d4fad7b7a42391d72cfdc1bf2aeb9fac8f65d61d8aa5c49dda9d0cac81d777 From 0927f2c9f8e0bbeca8176464e2af6e9726b2d62a Mon Sep 17 00:00:00 2001 From: Yaroslav Fedevych Date: Sat, 15 Jul 2023 08:10:43 +0000 Subject: [PATCH 67/99] Specify qpid-proton's source as full URL to fix isolated builds The way qpid-proton's sources are specified, any automated build outside of RH infrastructure will fail as it won't know where to get them from. This makes the source a proper URL. --- rsyslog.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rsyslog.spec b/rsyslog.spec index 1e95405..530c452 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -35,7 +35,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.2306.0 -Release: 1%{?dist} +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 @@ -46,7 +46,7 @@ Source4: rsyslog.log 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: qpid-proton-0.34.0.tar.gz +Source6: https://archive.apache.org/dist/qpid/proton/0.34.0/qpid-proton-0.34.0.tar.gz Patch0: openssl3-compatibility.patch @@ -754,6 +754,9 @@ done %changelog +* Sat Jul 15 2023 Yaroslav Fedevych - 8.2306.0-2 +- Specify qpid-proton's source as full URL to fix isolated builds + * Wed Jun 21 2023 Attila Lakatos - 8.2306.0-1 - rebase to 8.2306.0 resolves: rhbz#2151339 From 0dd4435c2ebef1b64aa4863fc782996f5b52aaf2 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 21 Jul 2023 17:11:09 +0000 Subject: [PATCH 68/99] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rsyslog.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rsyslog.spec b/rsyslog.spec index 530c452..c5fbd54 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -35,7 +35,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.2306.0 -Release: 2%{?dist} +Release: 3%{?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 @@ -754,6 +754,9 @@ done %changelog +* Fri Jul 21 2023 Fedora Release Engineering - 8.2306.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Sat Jul 15 2023 Yaroslav Fedevych - 8.2306.0-2 - Specify qpid-proton's source as full URL to fix isolated builds From c5f5013b306b06c29ef59c4f9d7d27e3e6d75625 Mon Sep 17 00:00:00 2001 From: Stewart Smith Date: Tue, 15 Aug 2023 01:03:29 +0000 Subject: [PATCH 69/99] Add mmtaghostname module It appears that some people are finding use for this rsyslog module, and it doesn't add any more build-dependencies for rsyslog. Add it as a bcond to make a more minimal rsyslog possible, as well as keeping the pattern of having all of these as options. Fixes: https://github.com/amazonlinux/amazon-linux-2023/issues/122 --- rsyslog.spec | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/rsyslog.spec b/rsyslog.spec index c5fbd54..17c420f 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -31,11 +31,12 @@ %bcond_without pgsql %bcond_without snmp %bcond_without udpspoof +%bcond_without mmtaghostname Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.2306.0 -Release: 3%{?dist} +Release: 4%{?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 @@ -112,6 +113,12 @@ Requires: %name = %version-%release Summary: Fields extraction module Requires: %name = %version-%release +%if %{with mmtaghostname} +%package mmtaghostname +Summary: Message modification module supporting adding tags +Requires: %name = %version-%release +%endif + %if %{with snmp} %package mmsnmptrapd Summary: Message modification module for snmptrapd generated messages @@ -271,6 +278,9 @@ advantage if a field-based log format is to be processed, like for example CEF and either a large number of fields is needed or a specific field is used multiple times inside filters. +%description mmtaghostname +This module provides message modification for changing or adding the host name. + %if %{with snmp} %description mmsnmptrapd This message modification module takes messages generated from snmptrapd and @@ -488,6 +498,9 @@ autoreconf -if --enable-mmkubernetes \ --enable-mmjsonparse \ --enable-mmnormalize \ +%if %{with mmtaghostname} + --enable-mmtaghostname \ +%endif %if %{with snmp} --enable-mmsnmptrapd \ %endif @@ -665,6 +678,9 @@ done %files mmnormalize %{_libdir}/rsyslog/mmnormalize.so +%files mmtaghostname +%{_libdir}/rsyslog/mmtaghostname.so + %if %{with snmp} %files mmsnmptrapd %{_libdir}/rsyslog/mmsnmptrapd.so @@ -754,6 +770,9 @@ done %changelog +* Wed Aug 16 2023 Stewart Smith - 8.2306.0-4 +- Add mmtaghostname module as a subpackage + * Fri Jul 21 2023 Fedora Release Engineering - 8.2306.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 4cca27d51dfb82afabe0721ea0013d01d01fd149 Mon Sep 17 00:00:00 2001 From: alakatos Date: Fri, 25 Aug 2023 08:57:22 +0200 Subject: [PATCH 70/99] Rebase to 8.2308.0 --- .gitignore | 2 ++ rsyslog.spec | 7 +++++-- sources | 6 +++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index ec39248..34fa1a0 100644 --- a/.gitignore +++ b/.gitignore @@ -87,3 +87,5 @@ rsyslog-4.6.3.tar.gz /rsyslog-doc-8.2210.0.tar.gz /rsyslog-8.2306.0.tar.gz /rsyslog-doc-8.2306.0.tar.gz +/rsyslog-8.2308.0.tar.gz +/rsyslog-doc-8.2308.0.tar.gz diff --git a/rsyslog.spec b/rsyslog.spec index 17c420f..8126ae1 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -35,8 +35,8 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog -Version: 8.2306.0 -Release: 4%{?dist} +Version: 8.2308.0 +Release: 1%{?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 @@ -770,6 +770,9 @@ done %changelog +* Fri Aug 25 2023 Attila Lakatos - 8.2308.0-1 +- Rebase to 8.2308.0 + * Wed Aug 16 2023 Stewart Smith - 8.2306.0-4 - Add mmtaghostname module as a subpackage diff --git a/sources b/sources index 114fa0f..e22f0fc 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (qpid-proton-0.34.0.tar.gz) = 0de6c3d11baeee1d69821a0f1879a61b314f14589e02ea7ed0de8814c741217fdcafdd978b4061f73bc75588886299f4ac6808021506545ec8a883f39ad54fb3 -SHA512 (rsyslog-8.2306.0.tar.gz) = 4012ea18d49efa75438aa225fec1daafcaadc216cd5c0ecceccdc34688940bbdca9eb19bd9c401e834b023d9b9a5a0870529f7b855bb64c796a55538639dadfc -SHA512 (rsyslog-doc-8.2306.0.tar.gz) = eb5df4285ed9f5afe884dae497ed77ad96050a9101e94c8d83125c893998094e27d4fad7b7a42391d72cfdc1bf2aeb9fac8f65d61d8aa5c49dda9d0cac81d777 +SHA512 (qpid-proton-0.34.0.tar.gz) = 6a72540b662ac121838d8cc32b9480e948f9953f87036c3bcb72d9e77b07ea41973ccd3c2513b64c56b4f53077708a893e42e13fd5792cf8c4bcbbc4d2384e23 +SHA512 (rsyslog-8.2308.0.tar.gz) = f8bcbbfe2c5c0a7e56203fc4ff285594cfa27fa7c998db2fe065a3f06b9bc30692626787c509b1f5d081a4b176680183b651625c5e3ccb4580ac59f3980ae8a5 +SHA512 (rsyslog-doc-8.2308.0.tar.gz) = f0a581e2a7642d100cdca94125c39cf00acfc3339114ddad067d726f1526941f52ab33c0f5789f9cbd4197b3e1f3c841da86c71886fa97306990193db8d6c935 From e050f5c5b53dfe8b380c24d2dc17100288a43975 Mon Sep 17 00:00:00 2001 From: alakatos Date: Tue, 10 Oct 2023 10:24:08 +0200 Subject: [PATCH 71/99] Rebase to 8.2310.0 resolves: rhbz#2232275 --- .gitignore | 3 +++ rsyslog.spec | 19 ++++++++----------- sources | 6 +++--- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 34fa1a0..0504cda 100644 --- a/.gitignore +++ b/.gitignore @@ -89,3 +89,6 @@ rsyslog-4.6.3.tar.gz /rsyslog-doc-8.2306.0.tar.gz /rsyslog-8.2308.0.tar.gz /rsyslog-doc-8.2308.0.tar.gz +/qpid-proton-0.39.0.tar.gz +/rsyslog-8.2310.0.tar.gz +/rsyslog-doc-8.2310.0.tar.gz diff --git a/rsyslog.spec b/rsyslog.spec index 8126ae1..a3cf88b 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -1,6 +1,7 @@ %define rsyslog_statedir %{_sharedstatedir}/rsyslog %define rsyslog_pkidir %{_sysconfdir}/pki/rsyslog %define rsyslog_docdir %{_docdir}/rsyslog +%define qpid_proton_v 0.39.0 # The following packages are not enabled on rhel: # hiredis, libdbi, mongodb, rabbitmq # The omamqp1 plugin is built differently as qpid-proton is not available on rhel @@ -35,7 +36,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog -Version: 8.2308.0 +Version: 8.2310.0 Release: 1%{?dist} License: GPL-3.0-or-later AND Apache-2.0 URL: http://www.rsyslog.com/ @@ -47,9 +48,7 @@ Source4: rsyslog.log 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/0.34.0/qpid-proton-0.34.0.tar.gz - -Patch0: openssl3-compatibility.patch +Source6: https://archive.apache.org/dist/qpid/proton/%{qpid_proton_v}/qpid-proton-%{qpid_proton_v}.tar.gz BuildRequires: make BuildRequires: gcc @@ -391,9 +390,6 @@ mv build doc %if %{with omamqp1} # Unpack qpid-proton %setup -q -D -T -b 6 -pushd .. -%patch -P 0 -p1 -b .openssl-compatibility -popd %endif %build @@ -407,7 +403,7 @@ export CFLAGS="$RPM_OPT_FLAGS -fpic" %if %{with omamqp1} # build the proton first ( - cd %{_builddir}/qpid-proton-0.34.0 + cd %{_builddir}/qpid-proton-%{qpid_proton_v} mkdir bld cd bld @@ -469,7 +465,7 @@ autoreconf -if --enable-omrabbitmq \ %endif %if %{with omamqp1} - --enable-omamqp1 PROTON_LIBS="%{_builddir}/qpid-proton-0.34.0/bld/c/libqpid-proton-core-static.a %{_builddir}/qpid-proton-0.34.0/bld/c/libqpid-proton-proactor-static.a %{_builddir}/qpid-proton-0.34.0/bld/c/libqpid-proton-static.a -lssl -lsasl2 -lcrypto" PROTON_CFLAGS="-I%{_builddir}/qpid-proton-0.34.0/bld/c/include" \ + --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" \ %endif --enable-elasticsearch \ --enable-generate-man-pages \ @@ -770,8 +766,9 @@ done %changelog -* Fri Aug 25 2023 Attila Lakatos - 8.2308.0-1 -- Rebase to 8.2308.0 +* Fri Aug 25 2023 Attila Lakatos - 8.2310.0-1 +- Rebase to 8.2310.0 + resolves: rhbz#2232275 * Wed Aug 16 2023 Stewart Smith - 8.2306.0-4 - Add mmtaghostname module as a subpackage diff --git a/sources b/sources index e22f0fc..cb9d7c3 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (qpid-proton-0.34.0.tar.gz) = 6a72540b662ac121838d8cc32b9480e948f9953f87036c3bcb72d9e77b07ea41973ccd3c2513b64c56b4f53077708a893e42e13fd5792cf8c4bcbbc4d2384e23 -SHA512 (rsyslog-8.2308.0.tar.gz) = f8bcbbfe2c5c0a7e56203fc4ff285594cfa27fa7c998db2fe065a3f06b9bc30692626787c509b1f5d081a4b176680183b651625c5e3ccb4580ac59f3980ae8a5 -SHA512 (rsyslog-doc-8.2308.0.tar.gz) = f0a581e2a7642d100cdca94125c39cf00acfc3339114ddad067d726f1526941f52ab33c0f5789f9cbd4197b3e1f3c841da86c71886fa97306990193db8d6c935 +SHA512 (qpid-proton-0.39.0.tar.gz) = df5c5469ee82ba02de62dce15b73b81aab2aae07c7db668182df690cea4ff7584111bd12143fe5e3569469a9ddf4950ac68d60b53d1a7815da4748052948cd1b +SHA512 (rsyslog-8.2310.0.tar.gz) = f04e14ede8c35e1799eadc711a6e99dbe56d312c7909c7ebed4d4bd489d310a44a5c2d3ed23968fbf3ccff5b580870d0f3ceeb690deb1d1424420fc9d3220696 +SHA512 (rsyslog-doc-8.2310.0.tar.gz) = cf452f3705680fc81495e940ea7d5ae705a6dbfe0e2ce5a87865c3043f79daaec243df20e8aadd9fac6144a3df8f19d7c56fdf19ec68df78e2fdaffa45096143 From a2d2f9d9e8a34c1384669431fb2c7bf1350521c0 Mon Sep 17 00:00:00 2001 From: alakatos Date: Thu, 4 Jan 2024 13:03:18 +0100 Subject: [PATCH 72/99] Move rsyslog related logrotate config to the base package In the past, the logrotate script was part of the base package, but it has been moved to a separate package to reduce base package dependencies. It turned out to be a bad idea, because in some cases the logrotate subpackage was not installed and the logrotate config was missing. This turned off rotation of important logs, thus some logs could grow into extremely large files . --- rsyslog.spec | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/rsyslog.spec b/rsyslog.spec index a3cf88b..8bd55da 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -37,7 +37,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.2310.0 -Release: 1%{?dist} +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 @@ -247,7 +247,10 @@ advanced features suitable for enterprise-class, encryption-protected syslog relay chains. %description logrotate -This subpackage contains the default logrotate configuration for rsyslog. +The rsyslog-logrotate subpackage acts as a dependency puller, ensuring the +presence of logrotate, a crucial tool for managing log files. Logrotate allows +for the periodic rotation, compression, and removal of log files to prevent +them from consuming excessive disk space. %description crypto This package contains a module providing log file encryption and a @@ -604,6 +607,7 @@ done %{_unitdir}/rsyslog.service %config(noreplace) %{_sysconfdir}/rsyslog.conf %config(noreplace) %{_sysconfdir}/sysconfig/rsyslog +%config(noreplace) %{_sysconfdir}/logrotate.d/rsyslog # plugins %{_libdir}/rsyslog/fmhash.so %{_libdir}/rsyslog/fmhttp.so @@ -648,9 +652,6 @@ done %{_libdir}/rsyslog/omclickhouse.so %endif -%files logrotate -%config(noreplace) %{_sysconfdir}/logrotate.d/rsyslog - %files crypto %{_bindir}/rscryutil %{_mandir}/man1/rscryutil.1.gz @@ -766,6 +767,10 @@ done %changelog +* Thu Jan 04 2024 Attila Lakatos - 8.2310.0-2 +- Move rsyslog related logrotate config to the base package + resolves: rhbz#2242243 + * Fri Aug 25 2023 Attila Lakatos - 8.2310.0-1 - Rebase to 8.2310.0 resolves: rhbz#2232275 From de23c1e0c8e337fe2ab3a9761e9f31378cfa9938 Mon Sep 17 00:00:00 2001 From: Dominique Martinet Date: Fri, 5 Jan 2024 20:19:38 +0900 Subject: [PATCH 73/99] obsolete rsyslog-logrotate --- rsyslog.spec | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/rsyslog.spec b/rsyslog.spec index 8bd55da..cbd6c9b 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -70,18 +70,15 @@ BuildRequires: systemd-rpm-macros BuildRequires: zlib-devel BuildRequires: libcap-ng-devel -Recommends: %{name}-logrotate = %version-%release +Recommends: logrotate +Obsoletes: rsyslog-logrotate < 8.2310.0-2 +Provides: rsyslog-logrotate = %{version}-%{release} Requires: bash >= 2.0 %{?systemd_ordering} Provides: syslog Obsoletes: sysklogd < 1.5-11 -%package logrotate -Summary: Log rotation for rsyslog -Requires: %name = %version-%release -Requires: logrotate >= 3.5.2 - %package crypto Summary: Encryption support Requires: %name = %version-%release @@ -246,12 +243,6 @@ and can be used as a drop-in replacement. Rsyslog is simple to set up, with advanced features suitable for enterprise-class, encryption-protected syslog relay chains. -%description logrotate -The rsyslog-logrotate subpackage acts as a dependency puller, ensuring the -presence of logrotate, a crucial tool for managing log files. Logrotate allows -for the periodic rotation, compression, and removal of log files to prevent -them from consuming excessive disk space. - %description crypto This package contains a module providing log file encryption and a command line tool to process encrypted logs. From 3f11b7ff782f536096aff4c06139619a03d62ea2 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 22 Jan 2024 12:10:48 +0000 Subject: [PATCH 74/99] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- rsyslog.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rsyslog.spec b/rsyslog.spec index cbd6c9b..ba40593 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -37,7 +37,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.2310.0 -Release: 2%{?dist} +Release: 3%{?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 @@ -758,6 +758,9 @@ done %changelog +* Mon Jan 22 2024 Fedora Release Engineering - 8.2310.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Thu Jan 04 2024 Attila Lakatos - 8.2310.0-2 - Move rsyslog related logrotate config to the base package resolves: rhbz#2242243 From eb3dcaa1b2c6c92862fa4841c9bf2401036a70be Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 26 Jan 2024 16:26:43 +0000 Subject: [PATCH 75/99] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- rsyslog.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rsyslog.spec b/rsyslog.spec index ba40593..6016591 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -37,7 +37,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.2310.0 -Release: 3%{?dist} +Release: 4%{?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 @@ -758,6 +758,9 @@ done %changelog +* Fri Jan 26 2024 Fedora Release Engineering - 8.2310.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Mon Jan 22 2024 Fedora Release Engineering - 8.2310.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 1e6869a68124e0ab4b03c7ee98592e8047715cef Mon Sep 17 00:00:00 2001 From: alakatos Date: Mon, 12 Feb 2024 16:17:01 +0100 Subject: [PATCH 76/99] Rebase to 8.2312.0 resolves: rhbz#2232275 --- .gitignore | 2 ++ rsyslog.spec | 8 ++++++-- sources | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 0504cda..f331443 100644 --- a/.gitignore +++ b/.gitignore @@ -92,3 +92,5 @@ rsyslog-4.6.3.tar.gz /qpid-proton-0.39.0.tar.gz /rsyslog-8.2310.0.tar.gz /rsyslog-doc-8.2310.0.tar.gz +/rsyslog-8.2312.0.tar.gz +/rsyslog-doc-8.2312.0.tar.gz diff --git a/rsyslog.spec b/rsyslog.spec index 6016591..eb0110e 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -36,8 +36,8 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog -Version: 8.2310.0 -Release: 4%{?dist} +Version: 8.2312.0 +Release: 1%{?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 @@ -758,6 +758,10 @@ done %changelog +* Mon Feb 12 2024 Attila Lakatos - 8.2312.0-1 +- Rebase to 8.2312.0 + resolves: rhbz#2232275 + * Fri Jan 26 2024 Fedora Release Engineering - 8.2310.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild diff --git a/sources b/sources index cb9d7c3..d55fac4 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ SHA512 (qpid-proton-0.39.0.tar.gz) = df5c5469ee82ba02de62dce15b73b81aab2aae07c7db668182df690cea4ff7584111bd12143fe5e3569469a9ddf4950ac68d60b53d1a7815da4748052948cd1b -SHA512 (rsyslog-8.2310.0.tar.gz) = f04e14ede8c35e1799eadc711a6e99dbe56d312c7909c7ebed4d4bd489d310a44a5c2d3ed23968fbf3ccff5b580870d0f3ceeb690deb1d1424420fc9d3220696 -SHA512 (rsyslog-doc-8.2310.0.tar.gz) = cf452f3705680fc81495e940ea7d5ae705a6dbfe0e2ce5a87865c3043f79daaec243df20e8aadd9fac6144a3df8f19d7c56fdf19ec68df78e2fdaffa45096143 +SHA512 (rsyslog-8.2312.0.tar.gz) = a65ca1c6fe2d9dd853d073d93cfd4d007c3533bd10c633113fcf94c4746192945ed0a2b2ff84f9174b55de90ade2a062a0bd556ffe375864fad3772ef8ce39e3 +SHA512 (rsyslog-doc-8.2312.0.tar.gz) = 2fe8ab0e37a6899a545c09ea2586c33ab89a3e3d93ff079f99b15e9b1743423bbe54931684ba8509ed4f578a4b55ea22f6306aca256ee2245f88115a5f44e400 From 2189965d8382d804854e22e82d4cf05696e94c95 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Sat, 11 May 2024 15:44:22 -0700 Subject: [PATCH 77/99] rebuild for hiredis soname bump --- rsyslog.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rsyslog.spec b/rsyslog.spec index eb0110e..c97a8d1 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -37,7 +37,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.2312.0 -Release: 1%{?dist} +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 @@ -758,6 +758,9 @@ done %changelog +* Sat May 11 2024 Kevin Fenzi - 8.2312.0-2 +- rebuild for hiredis soname bump + * Mon Feb 12 2024 Attila Lakatos - 8.2312.0-1 - Rebase to 8.2312.0 resolves: rhbz#2232275 From 738d1ddec5aade671e1557248a0408cb7363eaea Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Wed, 29 May 2024 16:53:35 -0600 Subject: [PATCH 78/99] Explicitly set imjournal FileCreateMode to quiet warning --- rsyslog.conf | 1 + rsyslog.spec | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/rsyslog.conf b/rsyslog.conf index f6d3f6a..f2c718e 100644 --- a/rsyslog.conf +++ b/rsyslog.conf @@ -18,6 +18,7 @@ module(load="imuxsock" # provides support for local system logging (e.g. via SysSock.Use="off") # Turn off message reception via local log socket; # local messages are retrieved through imjournal now. module(load="imjournal" # provides access to the systemd journal + FileCreateMode="0600" # Quiet warning and ensure privacy StateFile="imjournal.state") # File to store the position in the journal # Include all config files in /etc/rsyslog.d/ diff --git a/rsyslog.spec b/rsyslog.spec index c97a8d1..64d2c11 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -37,7 +37,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.2312.0 -Release: 2%{?dist} +Release: 3%{?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 @@ -758,6 +758,9 @@ done %changelog +* Wed May 29 2024 Orion Poplawski - 8.2312.0-3 +- Explicitly set imjournal FileCreateMode to quiet warning + * Sat May 11 2024 Kevin Fenzi - 8.2312.0-2 - rebuild for hiredis soname bump From ba510f5b7c301aaf45092997c6ee97c4638bfda7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jul 2024 18:55:07 +0000 Subject: [PATCH 79/99] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- rsyslog.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rsyslog.spec b/rsyslog.spec index 64d2c11..6f0d95b 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -37,7 +37,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.2312.0 -Release: 3%{?dist} +Release: 4%{?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 @@ -758,6 +758,9 @@ done %changelog +* Fri Jul 19 2024 Fedora Release Engineering - 8.2312.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Wed May 29 2024 Orion Poplawski - 8.2312.0-3 - Explicitly set imjournal FileCreateMode to quiet warning From 4a1805d718bc0503b3f9662e0469199dd154e759 Mon Sep 17 00:00:00 2001 From: Gordon Messmer Date: Thu, 1 Aug 2024 15:17:12 -0700 Subject: [PATCH 80/99] openssl engine-related files have been moved to a sub-package, which rsyslog currently requires. --- rsyslog.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/rsyslog.spec b/rsyslog.spec index 6f0d95b..a03dfba 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -163,6 +163,7 @@ Group: System Environment/Daemons Requires: %name = %version-%release Requires: openssl-libs BuildRequires: openssl-devel +BuildRequires: openssl-devel-engine %endif %if %{with snmp} From 5d881b524c81126c4fc8908cf4b9d3db53bae4cd Mon Sep 17 00:00:00 2001 From: Gordon Messmer Date: Thu, 1 Aug 2024 12:07:22 -0700 Subject: [PATCH 81/99] Examine the server process GOT for signs of tampering. --- .fmf/version | 1 + plans/main.fmf | 6 +++++ tests/got-audit/got-audit.gdb | 2 ++ tests/got-audit/main.fmf | 10 +++++++++ tests/got-audit/runtest.sh | 41 +++++++++++++++++++++++++++++++++++ tests/main.fmf | 2 ++ 6 files changed, 62 insertions(+) create mode 100644 .fmf/version create mode 100644 plans/main.fmf create mode 100644 tests/got-audit/got-audit.gdb create mode 100644 tests/got-audit/main.fmf create mode 100755 tests/got-audit/runtest.sh create mode 100644 tests/main.fmf diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/plans/main.fmf b/plans/main.fmf new file mode 100644 index 0000000..ae0c305 --- /dev/null +++ b/plans/main.fmf @@ -0,0 +1,6 @@ +summary: Run all tests +execute: + how: tmt +discover: + how: fmf + diff --git a/tests/got-audit/got-audit.gdb b/tests/got-audit/got-audit.gdb new file mode 100644 index 0000000..6661297 --- /dev/null +++ b/tests/got-audit/got-audit.gdb @@ -0,0 +1,2 @@ +gef config gef.disable_color True +got-audit --all diff --git a/tests/got-audit/main.fmf b/tests/got-audit/main.fmf new file mode 100644 index 0000000..a90b249 --- /dev/null +++ b/tests/got-audit/main.fmf @@ -0,0 +1,10 @@ +summary: Audit the GOT for signs of tampering +description: | + Pointers in the server process GOT will be checked to ensure that + each function pointer's value is within a shared object file + that exports a symbol of that name, and that no shared object + files export conflicting symbols. +contact: Gordon Messmer +require+: + - gdb-gef # needed to test got-audit + diff --git a/tests/got-audit/runtest.sh b/tests/got-audit/runtest.sh new file mode 100755 index 0000000..03761a1 --- /dev/null +++ b/tests/got-audit/runtest.sh @@ -0,0 +1,41 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/rsyslog/Sanity/got-audit +# Description: Check pointers in the server process GOT for signs of tampering +# Author: Gordon Messmer +# + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +rlJournalStart + rlPhaseStartSetup + rlServiceStart rsyslog + rlRun "TestDir=\$(pwd)" + rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" + rlRun "pushd $TmpDir" + rlRun "auditfile=\$(mktemp --tmpdir=${TmpDir})" + rlPhaseEnd + + rlPhaseStartTest "Run GEF got-audit" + rlRun "SERVICE_PID=\$( systemctl show --property=MainPID rsyslog.service | cut -f2 -d= )" + rlRun "echo SERVICE_PID is '$SERVICE_PID'" + [ -n "$SERVICE_PID" ] || rlFail "No service pid was found" + rlRun "gdb-gef --pid '$SERVICE_PID' --command='$TestDir'/got-audit.gdb --batch > '$auditfile'" + # Basic test: ensure that at least one symbol is found in libc.so, + # to verify that the report looks plausible. + rlAssertGrep " : /.*/libc.so" "$auditfile" + # Ensure the got-audit did not report any errors + rlAssertNotGrep " :: ERROR" "$auditfile" + rlRun "cp '$auditfile' '$TMT_TEST_DATA'/got-audit.txt" + rlPhaseEnd + + rlPhaseStartCleanup + rlServiceRestore rsyslog + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd diff --git a/tests/main.fmf b/tests/main.fmf new file mode 100644 index 0000000..f225a72 --- /dev/null +++ b/tests/main.fmf @@ -0,0 +1,2 @@ +test: ./runtest.sh +framework: beakerlib From 10928b130757f01b48acebd45ce8c1e4bed3b311 Mon Sep 17 00:00:00 2001 From: alakatos Date: Wed, 21 Aug 2024 13:31:38 +0200 Subject: [PATCH 82/99] Rebase to 8.2408.0 Resolves: rhbz#2266329 Resolves: rhbz#2301246 Resolves: rhbz#2305398 --- .gitignore | 2 ++ rsyslog.spec | 14 +++++++++++--- sources | 4 ++-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index f331443..2674446 100644 --- a/.gitignore +++ b/.gitignore @@ -94,3 +94,5 @@ rsyslog-4.6.3.tar.gz /rsyslog-doc-8.2310.0.tar.gz /rsyslog-8.2312.0.tar.gz /rsyslog-doc-8.2312.0.tar.gz +/rsyslog-8.2408.0.tar.gz +/rsyslog-doc-8.2408.0.tar.gz diff --git a/rsyslog.spec b/rsyslog.spec index a03dfba..3e0bd84 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -36,8 +36,8 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog -Version: 8.2312.0 -Release: 4%{?dist} +Version: 8.2408.0 +Release: 1%{?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 @@ -521,7 +521,9 @@ autoreconf -if --enable-snmp \ %endif --enable-unlimited-select \ - --enable-usertools + --enable-usertools \ + --disable-libgcrypt \ + --enable-openssl_crypto_provider make V=1 @@ -759,6 +761,12 @@ done %changelog +* Wed Aug 21 2024 Attila Lakatos - 8.2408.0-1 +- Rebase to 8.2408.0 + Resolves: rhbz#2266329 + Resolves: rhbz#2301246 + Resolves: rhbz#2305398 + * Fri Jul 19 2024 Fedora Release Engineering - 8.2312.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild diff --git a/sources b/sources index d55fac4..f364de8 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ SHA512 (qpid-proton-0.39.0.tar.gz) = df5c5469ee82ba02de62dce15b73b81aab2aae07c7db668182df690cea4ff7584111bd12143fe5e3569469a9ddf4950ac68d60b53d1a7815da4748052948cd1b -SHA512 (rsyslog-8.2312.0.tar.gz) = a65ca1c6fe2d9dd853d073d93cfd4d007c3533bd10c633113fcf94c4746192945ed0a2b2ff84f9174b55de90ade2a062a0bd556ffe375864fad3772ef8ce39e3 -SHA512 (rsyslog-doc-8.2312.0.tar.gz) = 2fe8ab0e37a6899a545c09ea2586c33ab89a3e3d93ff079f99b15e9b1743423bbe54931684ba8509ed4f578a4b55ea22f6306aca256ee2245f88115a5f44e400 +SHA512 (rsyslog-8.2408.0.tar.gz) = 86901f76290aa451dfc8dc3d2c7eb2ea82bdbf39875fe2872169a3aa44933aff064dd5ea9b80964881fd07c34c17da25ec6a0efc1c5b7f4d6884435639fa0338 +SHA512 (rsyslog-doc-8.2408.0.tar.gz) = 9982688880b8362ca2ecd5f076f12aaf31b966144bd9b291761e660307e4c31e8c3ccc17b6b2b0cb2ccf2e30ba81927126991f9539562c2f02966a59fd1624aa From 9e24c81c5953333e0962c35d36587056fe902236 Mon Sep 17 00:00:00 2001 From: alakatos Date: Wed, 21 Aug 2024 14:04:07 +0200 Subject: [PATCH 83/99] Remove dependency on libgcrypt --- rsyslog.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/rsyslog.spec b/rsyslog.spec index 3e0bd84..3589a26 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -57,7 +57,6 @@ BuildRequires: automake BuildRequires: bison BuildRequires: dos2unix BuildRequires: flex -BuildRequires: libgcrypt-devel BuildRequires: libfastjson-devel >= 0.99.8 BuildRequires: libestr-devel >= 0.1.9 BuildRequires: libtool From 21c818925fa0abdb31a23c7cbe189340ae4f0f47 Mon Sep 17 00:00:00 2001 From: alakatos Date: Wed, 21 Aug 2024 14:15:06 +0200 Subject: [PATCH 84/99] Replace gcry crypto driver with ossl --- rsyslog.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rsyslog.spec b/rsyslog.spec index 3589a26..8351da8 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -648,7 +648,7 @@ done %files crypto %{_bindir}/rscryutil %{_mandir}/man1/rscryutil.1.gz -%{_libdir}/rsyslog/lmcry_gcry.so +%{_libdir}/rsyslog/lmcry_ossl.so %files doc %doc %{rsyslog_docdir}/html From 546fde3d353a1398e7c9905690bc6fe7a3c64ff2 Mon Sep 17 00:00:00 2001 From: Cropi Date: Fri, 4 Oct 2024 09:13:00 +0200 Subject: [PATCH 85/99] Rebuild package Resolves: rhzb#2316361 --- rsyslog.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rsyslog.spec b/rsyslog.spec index 8351da8..e538d90 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -37,7 +37,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.2408.0 -Release: 1%{?dist} +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 @@ -760,6 +760,10 @@ done %changelog +* Fri Oct 04 2024 Attila Lakatos - 8.2408.0-2 +- Rebuild package + Resolves: rhzb#2316361 + * Wed Aug 21 2024 Attila Lakatos - 8.2408.0-1 - Rebase to 8.2408.0 Resolves: rhbz#2266329 From 1064c4ef0e43bcc337ad3bfe070699530e657b23 Mon Sep 17 00:00:00 2001 From: Cropi Date: Thu, 5 Dec 2024 09:53:46 +0100 Subject: [PATCH 86/99] Rebase to 8.2412.0 Resolves: rhbz#2320050 --- .gitignore | 2 ++ rsyslog.spec | 8 ++++++-- sources | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 2674446..ff0224a 100644 --- a/.gitignore +++ b/.gitignore @@ -96,3 +96,5 @@ rsyslog-4.6.3.tar.gz /rsyslog-doc-8.2312.0.tar.gz /rsyslog-8.2408.0.tar.gz /rsyslog-doc-8.2408.0.tar.gz +/rsyslog-8.2412.0.tar.gz +/rsyslog-doc-8.2412.0.tar.gz diff --git a/rsyslog.spec b/rsyslog.spec index e538d90..462eb3c 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -36,8 +36,8 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog -Version: 8.2408.0 -Release: 2%{?dist} +Version: 8.2412.0 +Release: 1%{?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 @@ -760,6 +760,10 @@ done %changelog +* Thu Dec 05 2024 Attila Lakatos - 8.2412.0-1 +- Rebase to 8.2412.0 + Resolves: rhbz#2320050 + * Fri Oct 04 2024 Attila Lakatos - 8.2408.0-2 - Rebuild package Resolves: rhzb#2316361 diff --git a/sources b/sources index f364de8..380a910 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ SHA512 (qpid-proton-0.39.0.tar.gz) = df5c5469ee82ba02de62dce15b73b81aab2aae07c7db668182df690cea4ff7584111bd12143fe5e3569469a9ddf4950ac68d60b53d1a7815da4748052948cd1b -SHA512 (rsyslog-8.2408.0.tar.gz) = 86901f76290aa451dfc8dc3d2c7eb2ea82bdbf39875fe2872169a3aa44933aff064dd5ea9b80964881fd07c34c17da25ec6a0efc1c5b7f4d6884435639fa0338 -SHA512 (rsyslog-doc-8.2408.0.tar.gz) = 9982688880b8362ca2ecd5f076f12aaf31b966144bd9b291761e660307e4c31e8c3ccc17b6b2b0cb2ccf2e30ba81927126991f9539562c2f02966a59fd1624aa +SHA512 (rsyslog-8.2412.0.tar.gz) = fdd8bb096c9578fe2c4ed8cdb13179d7b3333d0f9be1b2c921b5b040f1e1414c3f9f8106e44444aaefba22f235a44d17c0c5b80cd114fe540a2aebb30e3eba72 +SHA512 (rsyslog-doc-8.2412.0.tar.gz) = 9b5d453b5774b027a6a4ba232133953d8a8058df4bfff31f835504656d7b01008cec5c0d28667bed0052799cf7389c0bafea7c76c3190bdcdf3d8a2eedf19b4e From 9279438445fd22e8bac472c20bc2e129ccd5ed75 Mon Sep 17 00:00:00 2001 From: Cropi Date: Thu, 5 Dec 2024 09:54:15 +0100 Subject: [PATCH 87/99] Harden service file --- rsyslog.service | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/rsyslog.service b/rsyslog.service index 9c13b1d..738f087 100644 --- a/rsyslog.service +++ b/rsyslog.service @@ -3,6 +3,8 @@ Description=System Logging Service ;Requires=syslog.socket Documentation=man:rsyslogd(8) Documentation=https://www.rsyslog.com/doc/ +Wants=network.target network-online.target +After=network.target network-online.target [Service] Type=notify @@ -12,6 +14,19 @@ ExecReload=/usr/bin/kill -HUP $MAINPID UMask=0066 StandardOutput=null Restart=on-failure +RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX +RestrictNamespaces=net +NoNewPrivileges=yes +ProtectControlGroups=yes +ProtectHome=read-only +ProtectKernelModules=yes +ProtectKernelTunables=yes +RestrictSUIDSGID=yes +SystemCallArchitectures=native +SystemCallFilter=~@clock @debug @module @raw-io @reboot @swap @cpu-emulation @obsolete +LockPersonality=yes +MemoryDenyWriteExecute=yes + # Increase the default a bit in order to allow many simultaneous # files to be monitored, we might need a lot of fds. From ae8648a28874f055af5aadfd302e4c7f92ea0e34 Mon Sep 17 00:00:00 2001 From: Cropi Date: Thu, 5 Dec 2024 09:57:42 +0100 Subject: [PATCH 88/99] Disable openssl engines support --- disable-openssl-engine.patch | 60 ++++++++++++++++++++++++++++++++++++ rsyslog.spec | 6 +++- 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 disable-openssl-engine.patch diff --git a/disable-openssl-engine.patch b/disable-openssl-engine.patch new file mode 100644 index 0000000..20ba01e --- /dev/null +++ b/disable-openssl-engine.patch @@ -0,0 +1,60 @@ +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/rsyslog.spec b/rsyslog.spec index 462eb3c..77d92d4 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -69,6 +69,8 @@ BuildRequires: systemd-rpm-macros BuildRequires: zlib-devel BuildRequires: libcap-ng-devel +Patch0: disable-openssl-engine.patch + Recommends: logrotate Obsoletes: rsyslog-logrotate < 8.2310.0-2 Provides: rsyslog-logrotate = %{version}-%{release} @@ -162,7 +164,6 @@ Group: System Environment/Daemons Requires: %name = %version-%release Requires: openssl-libs BuildRequires: openssl-devel -BuildRequires: openssl-devel-engine %endif %if %{with snmp} @@ -380,6 +381,7 @@ rm -r LICENSE README.md source build/objects.inv mv build doc # set up rsyslog sources %setup -q -D +%patch -P 0 -p1 %if %{with omamqp1} # Unpack qpid-proton @@ -762,6 +764,8 @@ done %changelog * Thu Dec 05 2024 Attila Lakatos - 8.2412.0-1 - Rebase to 8.2412.0 +- Harden rsyslog service unit +- Disable openssl engines support Resolves: rhbz#2320050 * Fri Oct 04 2024 Attila Lakatos - 8.2408.0-2 From cb8e5c624a25d0d32c9326206d67d9fe672e2141 Mon Sep 17 00:00:00 2001 From: Cropi Date: Thu, 5 Dec 2024 10:36:21 +0100 Subject: [PATCH 89/99] Add UsePid option to imjournal --- rsyslog.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/rsyslog.conf b/rsyslog.conf index f2c718e..4486f1f 100644 --- a/rsyslog.conf +++ b/rsyslog.conf @@ -19,6 +19,7 @@ module(load="imuxsock" # provides support for local system logging (e.g. via # local messages are retrieved through imjournal now. module(load="imjournal" # provides access to the systemd journal FileCreateMode="0600" # Quiet warning and ensure privacy + UsePid="system" # PID nummber is retrieved as the ID of the process the journal entry originates from StateFile="imjournal.state") # File to store the position in the journal # Include all config files in /etc/rsyslog.d/ From b019afff9ac4bc582d00bfd275f206ea83f91afd Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 18 Jan 2025 22:49:26 +0000 Subject: [PATCH 90/99] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- rsyslog.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rsyslog.spec b/rsyslog.spec index 77d92d4..333a978 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -37,7 +37,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.2412.0 -Release: 1%{?dist} +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 @@ -762,6 +762,9 @@ done %changelog +* Sat Jan 18 2025 Fedora Release Engineering - 8.2412.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Thu Dec 05 2024 Attila Lakatos - 8.2412.0-1 - Rebase to 8.2412.0 - Harden rsyslog service unit From b80cab473af65b2e3b503fc5b5cb115162065857 Mon Sep 17 00:00:00 2001 From: Cropi Date: Tue, 21 Jan 2025 09:51:47 +0100 Subject: [PATCH 91/99] Fix build problem by making gnu23 compatible --- gnu23.patch | 354 +++++++++++++++++++++++++++++++++++++++++++++++++++ rsyslog.spec | 7 +- 2 files changed, 360 insertions(+), 1 deletion(-) create mode 100644 gnu23.patch diff --git a/gnu23.patch b/gnu23.patch new file mode 100644 index 0000000..d671459 --- /dev/null +++ b/gnu23.patch @@ -0,0 +1,354 @@ +diff --git a/runtime/cfsysline.c b/runtime/cfsysline.c +index 06fdb4bb05..a9ba2684ec 100644 +--- a/runtime/cfsysline.c ++++ b/runtime/cfsysline.c +@@ -723,46 +723,46 @@ int *permitted) + static rsRetVal cslchCallHdlr(cslCmdHdlr_t *pThis, uchar **ppConfLine) + { + DEFiRet; +- rsRetVal (*pHdlr)() = NULL; ++ rsRetVal (*pHdlr)(void *, ...) = NULL; + assert(pThis != NULL); + assert(ppConfLine != NULL); + + switch(pThis->eType) { + case eCmdHdlrCustomHandler: +- pHdlr = doCustomHdlr; ++ pHdlr = (rsRetVal (*)(void *, ...)) doCustomHdlr; + break; + case eCmdHdlrUID: +- pHdlr = doGetUID; ++ pHdlr = (rsRetVal (*)(void *, ...)) doGetUID; + break; + case eCmdHdlrGID: +- pHdlr = doGetGID; ++ pHdlr = (rsRetVal (*)(void *, ...)) doGetGID; + break; + case eCmdHdlrBinary: +- pHdlr = doBinaryOptionLine; ++ pHdlr = (rsRetVal (*)(void *, ...)) doBinaryOptionLine; + break; + case eCmdHdlrFileCreateMode: +- pHdlr = doFileCreateMode; ++ pHdlr = (rsRetVal (*)(void *, ...)) doFileCreateMode; + break; + case eCmdHdlrInt: +- pHdlr = doGetInt; ++ pHdlr = (rsRetVal (*)(void *, ...)) doGetInt; + break; + case eCmdHdlrSize: +- pHdlr = doGetSize; ++ pHdlr = (rsRetVal (*)(void *, ...)) doGetSize; + break; + case eCmdHdlrGetChar: +- pHdlr = doGetChar; ++ pHdlr = (rsRetVal (*)(void *, ...)) doGetChar; + break; + case eCmdHdlrFacility: +- pHdlr = doFacility; ++ pHdlr = (rsRetVal (*)(void *, ...)) doFacility; + break; + case eCmdHdlrSeverity: +- pHdlr = doSeverity; ++ pHdlr = (rsRetVal (*)(void *, ...)) doSeverity; + break; + case eCmdHdlrGetWord: +- pHdlr = doGetWord; ++ pHdlr = (rsRetVal (*)(void *, ...)) doGetWord; + break; + case eCmdHdlrGoneAway: +- pHdlr = doGoneAway; ++ pHdlr = (rsRetVal (*)(void *, ...)) doGoneAway; + break; + /* some non-legacy handler (used in v6+ solely) */ + case eCmdHdlrInvalid: +@@ -827,7 +827,7 @@ static rsRetVal cslcConstruct(cslCmd_t **ppThis, int bChainingPermitted) + + pThis->bChainingPermitted = bChainingPermitted; + +- CHKiRet(llInit(&pThis->llCmdHdlrs, cslchDestruct, cslchKeyDestruct, cslchKeyCompare)); ++ CHKiRet(llInit(&pThis->llCmdHdlrs, cslchDestruct, cslchKeyDestruct, (int (*) (void*, void*)) cslchKeyCompare)); + + finalize_it: + *ppThis = pThis; +@@ -1074,7 +1074,7 @@ cfsyslineInit(void) + DEFiRet; + CHKiRet(objGetObjInterface(&obj)); + +- CHKiRet(llInit(&llCmdList, cslcDestruct, cslcKeyDestruct, strcasecmp)); ++ CHKiRet(llInit(&llCmdList, cslcDestruct, cslcKeyDestruct, (int (*)(void*, void*)) strcasecmp)); + + finalize_it: + RETiRet; +diff --git a/runtime/linkedlist.c b/runtime/linkedlist.c +index 70887379b2..499629399b 100644 +--- a/runtime/linkedlist.c ++++ b/runtime/linkedlist.c +@@ -43,7 +43,7 @@ + * pKey destructor may be zero to take care of non-keyed lists. + */ + rsRetVal llInit(linkedList_t *pThis, rsRetVal (*pEltDestructor)(void*), rsRetVal (*pKeyDestructor)(void*), +-int (*pCmpOp)(void*,void*)) ++ int (*pCmpOp)(void*,void*)) + { + assert(pThis != NULL); + assert(pEltDestructor != NULL); +diff --git a/runtime/linkedlist.h b/runtime/linkedlist.h +index 1cd3a143f2..9894541889 100644 +--- a/runtime/linkedlist.h ++++ b/runtime/linkedlist.h +@@ -52,7 +52,8 @@ typedef struct linkedList_s linkedList_t; + typedef llElt_t* linkedListCookie_t; /* this type avoids exposing internals and keeps us flexible */ + + /* prototypes */ +-rsRetVal llInit(linkedList_t *pThis, rsRetVal (*pEltDestructor)(), rsRetVal (*pKeyDestructor)(), int (*pCmpOp)()); ++rsRetVal llInit(linkedList_t *pThis, rsRetVal (*pEltDestructor)(void*), ++ rsRetVal (*pKeyDestructor)(void*), int (*pCmpOp)(void*,void*)); + rsRetVal llDestroy(linkedList_t *pThis); + rsRetVal llDestroyRootElt(linkedList_t *pThis); + rsRetVal llGetNextElt(linkedList_t *pThis, linkedListCookie_t *ppElt, void **ppUsr); +diff --git a/runtime/obj-types.h b/runtime/obj-types.h +index 21fb89bbe1..b708d6fc9e 100644 +--- a/runtime/obj-types.h ++++ b/runtime/obj-types.h +@@ -5,7 +5,7 @@ + * that loop somehow and I've done that by moving the typedefs + * into this file here. + * +- * Copyright 2008-2019 Rainer Gerhards and Adiscon GmbH. ++ * Copyright 2008-2024 Rainer Gerhards and Adiscon GmbH. + * + * This file is part of the rsyslog runtime library. + * +@@ -74,7 +74,7 @@ struct objInfo_s { + size_t lenID; /* length of the ID string */ + int iObjVers; + uchar *pszName; +- rsRetVal (*objMethods[OBJ_NUM_METHODS])(); ++ rsRetVal (*objMethods[OBJ_NUM_METHODS])(void*, ...); + rsRetVal (*QueryIF)(interface_t*); + struct modInfo_s *pModInfo; + }; +diff --git a/runtime/obj.c b/runtime/obj.c +index 03a56f7a3a..4fa39772f0 100644 +--- a/runtime/obj.c ++++ b/runtime/obj.c +@@ -48,7 +48,7 @@ + * + * File begun on 2008-01-04 by RGerhards + * +- * Copyright 2008-2019 Rainer Gerhards and Adiscon GmbH. ++ * Copyright 2008-2024 Rainer Gerhards and Adiscon GmbH. + * + * This file is part of the rsyslog runtime library. + * +@@ -125,7 +125,7 @@ static rsRetVal objInfoNotImplementedDummy(void __attribute__((unused)) *pThis) + * must be provided an objInfo_t pointer. + */ + #define objInfoIsImplemented(pThis, method) \ +- (pThis->objMethods[method] != objInfoNotImplementedDummy) ++ (pThis->objMethods[method] != (rsRetVal (*)(void *, ...)) objInfoNotImplementedDummy) + + /* construct an object Info object. Each class shall do this on init. The + * resulting object shall be cached during the lifetime of the class and each +@@ -154,10 +154,10 @@ InfoConstruct(objInfo_t **ppThis, uchar *pszID, int iObjVers, + pThis->QueryIF = pQueryIF; + pThis->pModInfo = pModInfo; + +- pThis->objMethods[0] = pConstruct; +- pThis->objMethods[1] = pDestruct; ++ pThis->objMethods[0] = (rsRetVal (*)(void *, ...)) pConstruct; ++ pThis->objMethods[1] = (rsRetVal (*)(void *, ...)) pDestruct; + for(i = 2 ; i < OBJ_NUM_METHODS ; ++i) { +- pThis->objMethods[i] = objInfoNotImplementedDummy; ++ pThis->objMethods[i] = (rsRetVal (*)(void *, ...)) objInfoNotImplementedDummy; + } + + *ppThis = pThis; +@@ -192,7 +192,7 @@ InfoDestruct(objInfo_t **ppThis) + static rsRetVal + InfoSetMethod(objInfo_t *pThis, objMethod_t objMethod, rsRetVal (*pHandler)(void*)) + { +- pThis->objMethods[objMethod] = pHandler; ++ pThis->objMethods[objMethod] = (rsRetVal (*)(void *, ...)) pHandler; + return RS_RET_OK; + } + +@@ -786,7 +786,7 @@ static rsRetVal objDeserializeTryRecover(strm_t *pStrm) + * of the trailer. Header must already have been processed. + * rgerhards, 2008-01-11 + */ +-static rsRetVal objDeserializeProperties(obj_t *pObj, rsRetVal (*objSetProperty)(), strm_t *pStrm) ++static rsRetVal objDeserializeProperties(obj_t *pObj, rsRetVal (*objSetProperty)(void*, ...), strm_t *pStrm) + { + DEFiRet; + var_t *pVar = NULL; +@@ -867,7 +867,8 @@ Deserialize(void *ppObj, uchar *pszTypeExpected, strm_t *pStrm, rsRetVal (*fFixu + CHKiRet(pObjInfo->objMethods[objMethod_CONSTRUCT](&pObj)); + + /* we got the object, now we need to fill the properties */ +- CHKiRet(objDeserializeProperties(pObj, pObjInfo->objMethods[objMethod_SETPROPERTY], pStrm)); ++ CHKiRet(objDeserializeProperties(pObj, ++ (rsRetVal (*)(void*, ...)) pObjInfo->objMethods[objMethod_SETPROPERTY], pStrm)); + + /* check if we need to call a fixup function that modifies the object + * before it is finalized. -- rgerhards, 2008-01-13 +@@ -898,8 +899,10 @@ Deserialize(void *ppObj, uchar *pszTypeExpected, strm_t *pStrm, rsRetVal (*fFixu + */ + rsRetVal + objDeserializeWithMethods(void *ppObj, uchar *pszTypeExpected, int lenTypeExpected, strm_t *pStrm, +-rsRetVal (*fFixup)(obj_t*,void*), void *pUsr, rsRetVal (*objConstruct)(), rsRetVal (*objConstructFinalize)(), +-rsRetVal (*objDeserialize)()) ++ rsRetVal (*fFixup)(obj_t*,void*), void *pUsr, ++ rsRetVal (*objConstruct)(void *, ...), ++ rsRetVal (*objConstructFinalize)(void *, ...), ++ rsRetVal (*objDeserialize)(void *, ...)) + { + DEFiRet; + rsRetVal iRetLocal; +@@ -1007,7 +1010,8 @@ DeserializePropBag(obj_t *pObj, strm_t *pStrm) + CHKiRet(FindObjInfo((char*)cstrGetSzStrNoNULL(pstrID), &pObjInfo)); + + /* we got the object, now we need to fill the properties */ +- CHKiRet(objDeserializeProperties(pObj, pObjInfo->objMethods[objMethod_SETPROPERTY], pStrm)); ++ CHKiRet(objDeserializeProperties(pObj, ++ (rsRetVal (*)(void*, ...)) pObjInfo->objMethods[objMethod_SETPROPERTY], pStrm)); + + finalize_it: + if(pstrID != NULL) +diff --git a/runtime/obj.h b/runtime/obj.h +index 0efe6e7081..455cb873f5 100644 +--- a/runtime/obj.h ++++ b/runtime/obj.h +@@ -21,7 +21,7 @@ + * + * pThis always references to a pointer of the object. + * +- * Copyright 2008-2018 Adiscon GmbH. ++ * Copyright 2008-2024 Adiscon GmbH. + * + * This file is part of the rsyslog runtime library. + * +@@ -119,9 +119,12 @@ ENDinterface(obj) + rsRetVal objGetObjInterface(obj_if_t *pIf); + PROTOTYPEObjClassInit(obj); + PROTOTYPEObjClassExit(obj); +-rsRetVal objDeserializeWithMethods(void *ppObj, uchar *pszTypeExpected, int lenTypeExpected, strm_t *pStrm, +-rsRetVal (*fFixup)(obj_t*,void*), void *pUsr, rsRetVal (*objConstruct)(), rsRetVal (*objConstructFinalize)(), +-rsRetVal (*objDeserialize)()); ++rsRetVal ++objDeserializeWithMethods(void *ppObj, uchar *pszTypeExpected, int lenTypeExpected, strm_t *pStrm, ++ rsRetVal (*fFixup)(obj_t*,void*), void *pUsr, ++ rsRetVal (*objConstruct)(void *, ...), ++ rsRetVal (*objConstructFinalize)(void *, ...), ++ rsRetVal (*objDeserialize)(void*, ...)); + rsRetVal objDeserializeProperty(var_t *pProp, strm_t *pStrm); + uchar *objGetName(obj_t *pThis); + +diff --git a/runtime/queue.c b/runtime/queue.c +index edc9d3513b..e17da6d7c3 100644 +--- a/runtime/queue.c ++++ b/runtime/queue.c +@@ -1063,7 +1063,8 @@ qDeqDisk(qqueue_t *pThis, smsg_t **ppMsg) + DEFiRet; + iRet = objDeserializeWithMethods(ppMsg, (uchar*) "msg", 3, + pThis->tVars.disk.pReadDeq, NULL, +- NULL, msgConstructForDeserializer, NULL, MsgDeserialize); ++ NULL, (rsRetVal (*)(void *, ...)) msgConstructForDeserializer, NULL, ++ (rsRetVal (*)(void *, ...)) MsgDeserialize); + if(iRet != RS_RET_OK) { + LogError(0, iRet, "%s: qDeqDisk error happened at around offset %lld", + obj.GetName((obj_t*)pThis), +diff --git a/runtime/rsconf.c b/runtime/rsconf.c +index 71b31be3cd..a0d735d423 100644 +--- a/runtime/rsconf.c ++++ b/runtime/rsconf.c +@@ -290,7 +290,7 @@ BEGINobjConstruct(rsconf) /* be sure to specify the object type also in END macr + CHKiRet(dynstats_initCnf(&pThis->dynstats_buckets)); + CHKiRet(perctile_initCnf(&pThis->perctile_buckets)); + CHKiRet(llInit(&pThis->rulesets.llRulesets, rulesetDestructForLinkedList, +- rulesetKeyDestruct, strcasecmp)); ++ rulesetKeyDestruct, (int (*)(void*, void*)) strcasecmp)); + finalize_it: + ENDobjConstruct(rsconf) + +diff --git a/runtime/rsyslog.h b/runtime/rsyslog.h +index 94b6605e8b..f98a5db3c7 100644 +--- a/runtime/rsyslog.h ++++ b/runtime/rsyslog.h +@@ -52,7 +52,9 @@ + * being emitted where nobody knows what the mean and why they appear :-( + */ + #pragma GCC diagnostic ignored "-Wjump-misses-init" +- #endif /* if __GNUC__ >= 8 */ ++ #pragma GCC diagnostic ignored "-Wincompatible-pointer-types" ++ #pragma GCC diagnostic ignored "-Wcast-function-type" ++ #endif + + #if defined(__clang__) + #define ATTR_NO_SANITIZE_UNDEFINED __attribute__((no_sanitize("undefined"))) +diff --git a/runtime/ruleset.c b/runtime/ruleset.c +index c137ee3b01..228283c28c 100644 +--- a/runtime/ruleset.c ++++ b/runtime/ruleset.c +@@ -888,7 +888,7 @@ destructAllActions(rsconf_t *conf) + + CHKiRet(llDestroy(&(conf->rulesets.llRulesets))); + CHKiRet(llInit(&(conf->rulesets.llRulesets), rulesetDestructForLinkedList, +- rulesetKeyDestruct, strcasecmp)); ++ rulesetKeyDestruct, (int (*)(void*, void*)) strcasecmp)); + conf->rulesets.pDflt = NULL; + + finalize_it: +diff --git a/tests/sndrcv_tls_anon_rebind.sh b/tests/sndrcv_tls_anon_rebind.sh +index dcd1e6e985..e3ae592a10 100755 +--- a/tests/sndrcv_tls_anon_rebind.sh ++++ b/tests/sndrcv_tls_anon_rebind.sh +@@ -3,6 +3,7 @@ + # rgerhards, 2011-04-04 + # This file is part of the rsyslog project, released under GPLv3 + . ${srcdir:=.}/diag.sh init ++skip_platform "SunOS" "Test fails with environment-induced errors, which we cannot solve" + + export NUMMESSAGES=25000 #25000 + +diff --git a/tests/sndrcv_tls_client_missing_cert.sh b/tests/sndrcv_tls_client_missing_cert.sh +index aa0c320244..c0c651706d 100755 +--- a/tests/sndrcv_tls_client_missing_cert.sh ++++ b/tests/sndrcv_tls_client_missing_cert.sh +@@ -1,6 +1,9 @@ + #!/bin/bash + # This file is part of the rsyslog project, released under ASL 2.0 + . ${srcdir:=.}/diag.sh init ++echo "This test is under review - it seems to have some issues" ++exit 77 ++ + printf 'using TLS driver: %s\n' ${RS_TLS_DRIVER:=gtls} + + # start up the instances +diff --git a/threads.c b/threads.c +index 2fd4bbb86c..95e85c1926 100644 +--- a/threads.c ++++ b/threads.c +@@ -302,7 +302,7 @@ rsRetVal thrdCreate(rsRetVal (*thrdMain)(thrdInfo_t*), rsRetVal(*afterRun)(thrdI + rsRetVal thrdInit(void) + { + DEFiRet; +- iRet = llInit(&llThrds, thrdDestruct, NULL, NULL); ++ iRet = llInit(&llThrds, (rsRetVal (*)(void*)) thrdDestruct, NULL, NULL); + RETiRet; + } + +diff --git a/tools/iminternal.c b/tools/iminternal.c +index c4dd548cee..105cf9f903 100644 +--- a/tools/iminternal.c ++++ b/tools/iminternal.c +@@ -163,7 +163,7 @@ rsRetVal iminternalRemoveMsg(smsg_t **ppMsg) + rsRetVal modInitIminternal(void) + { + DEFiRet; +- iRet = llInit(&llMsgs, iminternalDestruct, NULL, NULL); ++ iRet = llInit(&llMsgs, (rsRetVal (*)(void*)) iminternalDestruct, NULL, NULL); + RETiRet; + } + diff --git a/rsyslog.spec b/rsyslog.spec index 333a978..c9e2679 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -37,7 +37,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.2412.0 -Release: 2%{?dist} +Release: 3%{?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 @@ -70,6 +70,7 @@ BuildRequires: zlib-devel BuildRequires: libcap-ng-devel Patch0: disable-openssl-engine.patch +Patch1: gnu23.patch Recommends: logrotate Obsoletes: rsyslog-logrotate < 8.2310.0-2 @@ -382,6 +383,7 @@ mv build doc # set up rsyslog sources %setup -q -D %patch -P 0 -p1 +%patch -P 1 -p1 %if %{with omamqp1} # Unpack qpid-proton @@ -762,6 +764,9 @@ done %changelog +* Tue Jan 21 2025 Attila Lakatos - 8.2412.0-3 +- Fix build problem by resolving -Wincompatible-pointer-types error + * Sat Jan 18 2025 Fedora Release Engineering - 8.2412.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 8a0d7614d65ace0b23c8c6937daaeb1402b5b4bd Mon Sep 17 00:00:00 2001 From: Attila Lakatos Date: Thu, 12 Jun 2025 08:13:47 +0200 Subject: [PATCH 92/99] Rebase to 8.2506.0V Resolves: rhbz#2347628 --- .gitignore | 2 + disable-openssl-engine.patch | 60 ------ gnu23.patch | 354 ----------------------------------- rsyslog.spec | 15 +- sources | 4 +- 5 files changed, 11 insertions(+), 424 deletions(-) delete mode 100644 disable-openssl-engine.patch delete mode 100644 gnu23.patch diff --git a/.gitignore b/.gitignore index ff0224a..b2767df 100644 --- a/.gitignore +++ b/.gitignore @@ -98,3 +98,5 @@ rsyslog-4.6.3.tar.gz /rsyslog-doc-8.2408.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/gnu23.patch b/gnu23.patch deleted file mode 100644 index d671459..0000000 --- a/gnu23.patch +++ /dev/null @@ -1,354 +0,0 @@ -diff --git a/runtime/cfsysline.c b/runtime/cfsysline.c -index 06fdb4bb05..a9ba2684ec 100644 ---- a/runtime/cfsysline.c -+++ b/runtime/cfsysline.c -@@ -723,46 +723,46 @@ int *permitted) - static rsRetVal cslchCallHdlr(cslCmdHdlr_t *pThis, uchar **ppConfLine) - { - DEFiRet; -- rsRetVal (*pHdlr)() = NULL; -+ rsRetVal (*pHdlr)(void *, ...) = NULL; - assert(pThis != NULL); - assert(ppConfLine != NULL); - - switch(pThis->eType) { - case eCmdHdlrCustomHandler: -- pHdlr = doCustomHdlr; -+ pHdlr = (rsRetVal (*)(void *, ...)) doCustomHdlr; - break; - case eCmdHdlrUID: -- pHdlr = doGetUID; -+ pHdlr = (rsRetVal (*)(void *, ...)) doGetUID; - break; - case eCmdHdlrGID: -- pHdlr = doGetGID; -+ pHdlr = (rsRetVal (*)(void *, ...)) doGetGID; - break; - case eCmdHdlrBinary: -- pHdlr = doBinaryOptionLine; -+ pHdlr = (rsRetVal (*)(void *, ...)) doBinaryOptionLine; - break; - case eCmdHdlrFileCreateMode: -- pHdlr = doFileCreateMode; -+ pHdlr = (rsRetVal (*)(void *, ...)) doFileCreateMode; - break; - case eCmdHdlrInt: -- pHdlr = doGetInt; -+ pHdlr = (rsRetVal (*)(void *, ...)) doGetInt; - break; - case eCmdHdlrSize: -- pHdlr = doGetSize; -+ pHdlr = (rsRetVal (*)(void *, ...)) doGetSize; - break; - case eCmdHdlrGetChar: -- pHdlr = doGetChar; -+ pHdlr = (rsRetVal (*)(void *, ...)) doGetChar; - break; - case eCmdHdlrFacility: -- pHdlr = doFacility; -+ pHdlr = (rsRetVal (*)(void *, ...)) doFacility; - break; - case eCmdHdlrSeverity: -- pHdlr = doSeverity; -+ pHdlr = (rsRetVal (*)(void *, ...)) doSeverity; - break; - case eCmdHdlrGetWord: -- pHdlr = doGetWord; -+ pHdlr = (rsRetVal (*)(void *, ...)) doGetWord; - break; - case eCmdHdlrGoneAway: -- pHdlr = doGoneAway; -+ pHdlr = (rsRetVal (*)(void *, ...)) doGoneAway; - break; - /* some non-legacy handler (used in v6+ solely) */ - case eCmdHdlrInvalid: -@@ -827,7 +827,7 @@ static rsRetVal cslcConstruct(cslCmd_t **ppThis, int bChainingPermitted) - - pThis->bChainingPermitted = bChainingPermitted; - -- CHKiRet(llInit(&pThis->llCmdHdlrs, cslchDestruct, cslchKeyDestruct, cslchKeyCompare)); -+ CHKiRet(llInit(&pThis->llCmdHdlrs, cslchDestruct, cslchKeyDestruct, (int (*) (void*, void*)) cslchKeyCompare)); - - finalize_it: - *ppThis = pThis; -@@ -1074,7 +1074,7 @@ cfsyslineInit(void) - DEFiRet; - CHKiRet(objGetObjInterface(&obj)); - -- CHKiRet(llInit(&llCmdList, cslcDestruct, cslcKeyDestruct, strcasecmp)); -+ CHKiRet(llInit(&llCmdList, cslcDestruct, cslcKeyDestruct, (int (*)(void*, void*)) strcasecmp)); - - finalize_it: - RETiRet; -diff --git a/runtime/linkedlist.c b/runtime/linkedlist.c -index 70887379b2..499629399b 100644 ---- a/runtime/linkedlist.c -+++ b/runtime/linkedlist.c -@@ -43,7 +43,7 @@ - * pKey destructor may be zero to take care of non-keyed lists. - */ - rsRetVal llInit(linkedList_t *pThis, rsRetVal (*pEltDestructor)(void*), rsRetVal (*pKeyDestructor)(void*), --int (*pCmpOp)(void*,void*)) -+ int (*pCmpOp)(void*,void*)) - { - assert(pThis != NULL); - assert(pEltDestructor != NULL); -diff --git a/runtime/linkedlist.h b/runtime/linkedlist.h -index 1cd3a143f2..9894541889 100644 ---- a/runtime/linkedlist.h -+++ b/runtime/linkedlist.h -@@ -52,7 +52,8 @@ typedef struct linkedList_s linkedList_t; - typedef llElt_t* linkedListCookie_t; /* this type avoids exposing internals and keeps us flexible */ - - /* prototypes */ --rsRetVal llInit(linkedList_t *pThis, rsRetVal (*pEltDestructor)(), rsRetVal (*pKeyDestructor)(), int (*pCmpOp)()); -+rsRetVal llInit(linkedList_t *pThis, rsRetVal (*pEltDestructor)(void*), -+ rsRetVal (*pKeyDestructor)(void*), int (*pCmpOp)(void*,void*)); - rsRetVal llDestroy(linkedList_t *pThis); - rsRetVal llDestroyRootElt(linkedList_t *pThis); - rsRetVal llGetNextElt(linkedList_t *pThis, linkedListCookie_t *ppElt, void **ppUsr); -diff --git a/runtime/obj-types.h b/runtime/obj-types.h -index 21fb89bbe1..b708d6fc9e 100644 ---- a/runtime/obj-types.h -+++ b/runtime/obj-types.h -@@ -5,7 +5,7 @@ - * that loop somehow and I've done that by moving the typedefs - * into this file here. - * -- * Copyright 2008-2019 Rainer Gerhards and Adiscon GmbH. -+ * Copyright 2008-2024 Rainer Gerhards and Adiscon GmbH. - * - * This file is part of the rsyslog runtime library. - * -@@ -74,7 +74,7 @@ struct objInfo_s { - size_t lenID; /* length of the ID string */ - int iObjVers; - uchar *pszName; -- rsRetVal (*objMethods[OBJ_NUM_METHODS])(); -+ rsRetVal (*objMethods[OBJ_NUM_METHODS])(void*, ...); - rsRetVal (*QueryIF)(interface_t*); - struct modInfo_s *pModInfo; - }; -diff --git a/runtime/obj.c b/runtime/obj.c -index 03a56f7a3a..4fa39772f0 100644 ---- a/runtime/obj.c -+++ b/runtime/obj.c -@@ -48,7 +48,7 @@ - * - * File begun on 2008-01-04 by RGerhards - * -- * Copyright 2008-2019 Rainer Gerhards and Adiscon GmbH. -+ * Copyright 2008-2024 Rainer Gerhards and Adiscon GmbH. - * - * This file is part of the rsyslog runtime library. - * -@@ -125,7 +125,7 @@ static rsRetVal objInfoNotImplementedDummy(void __attribute__((unused)) *pThis) - * must be provided an objInfo_t pointer. - */ - #define objInfoIsImplemented(pThis, method) \ -- (pThis->objMethods[method] != objInfoNotImplementedDummy) -+ (pThis->objMethods[method] != (rsRetVal (*)(void *, ...)) objInfoNotImplementedDummy) - - /* construct an object Info object. Each class shall do this on init. The - * resulting object shall be cached during the lifetime of the class and each -@@ -154,10 +154,10 @@ InfoConstruct(objInfo_t **ppThis, uchar *pszID, int iObjVers, - pThis->QueryIF = pQueryIF; - pThis->pModInfo = pModInfo; - -- pThis->objMethods[0] = pConstruct; -- pThis->objMethods[1] = pDestruct; -+ pThis->objMethods[0] = (rsRetVal (*)(void *, ...)) pConstruct; -+ pThis->objMethods[1] = (rsRetVal (*)(void *, ...)) pDestruct; - for(i = 2 ; i < OBJ_NUM_METHODS ; ++i) { -- pThis->objMethods[i] = objInfoNotImplementedDummy; -+ pThis->objMethods[i] = (rsRetVal (*)(void *, ...)) objInfoNotImplementedDummy; - } - - *ppThis = pThis; -@@ -192,7 +192,7 @@ InfoDestruct(objInfo_t **ppThis) - static rsRetVal - InfoSetMethod(objInfo_t *pThis, objMethod_t objMethod, rsRetVal (*pHandler)(void*)) - { -- pThis->objMethods[objMethod] = pHandler; -+ pThis->objMethods[objMethod] = (rsRetVal (*)(void *, ...)) pHandler; - return RS_RET_OK; - } - -@@ -786,7 +786,7 @@ static rsRetVal objDeserializeTryRecover(strm_t *pStrm) - * of the trailer. Header must already have been processed. - * rgerhards, 2008-01-11 - */ --static rsRetVal objDeserializeProperties(obj_t *pObj, rsRetVal (*objSetProperty)(), strm_t *pStrm) -+static rsRetVal objDeserializeProperties(obj_t *pObj, rsRetVal (*objSetProperty)(void*, ...), strm_t *pStrm) - { - DEFiRet; - var_t *pVar = NULL; -@@ -867,7 +867,8 @@ Deserialize(void *ppObj, uchar *pszTypeExpected, strm_t *pStrm, rsRetVal (*fFixu - CHKiRet(pObjInfo->objMethods[objMethod_CONSTRUCT](&pObj)); - - /* we got the object, now we need to fill the properties */ -- CHKiRet(objDeserializeProperties(pObj, pObjInfo->objMethods[objMethod_SETPROPERTY], pStrm)); -+ CHKiRet(objDeserializeProperties(pObj, -+ (rsRetVal (*)(void*, ...)) pObjInfo->objMethods[objMethod_SETPROPERTY], pStrm)); - - /* check if we need to call a fixup function that modifies the object - * before it is finalized. -- rgerhards, 2008-01-13 -@@ -898,8 +899,10 @@ Deserialize(void *ppObj, uchar *pszTypeExpected, strm_t *pStrm, rsRetVal (*fFixu - */ - rsRetVal - objDeserializeWithMethods(void *ppObj, uchar *pszTypeExpected, int lenTypeExpected, strm_t *pStrm, --rsRetVal (*fFixup)(obj_t*,void*), void *pUsr, rsRetVal (*objConstruct)(), rsRetVal (*objConstructFinalize)(), --rsRetVal (*objDeserialize)()) -+ rsRetVal (*fFixup)(obj_t*,void*), void *pUsr, -+ rsRetVal (*objConstruct)(void *, ...), -+ rsRetVal (*objConstructFinalize)(void *, ...), -+ rsRetVal (*objDeserialize)(void *, ...)) - { - DEFiRet; - rsRetVal iRetLocal; -@@ -1007,7 +1010,8 @@ DeserializePropBag(obj_t *pObj, strm_t *pStrm) - CHKiRet(FindObjInfo((char*)cstrGetSzStrNoNULL(pstrID), &pObjInfo)); - - /* we got the object, now we need to fill the properties */ -- CHKiRet(objDeserializeProperties(pObj, pObjInfo->objMethods[objMethod_SETPROPERTY], pStrm)); -+ CHKiRet(objDeserializeProperties(pObj, -+ (rsRetVal (*)(void*, ...)) pObjInfo->objMethods[objMethod_SETPROPERTY], pStrm)); - - finalize_it: - if(pstrID != NULL) -diff --git a/runtime/obj.h b/runtime/obj.h -index 0efe6e7081..455cb873f5 100644 ---- a/runtime/obj.h -+++ b/runtime/obj.h -@@ -21,7 +21,7 @@ - * - * pThis always references to a pointer of the object. - * -- * Copyright 2008-2018 Adiscon GmbH. -+ * Copyright 2008-2024 Adiscon GmbH. - * - * This file is part of the rsyslog runtime library. - * -@@ -119,9 +119,12 @@ ENDinterface(obj) - rsRetVal objGetObjInterface(obj_if_t *pIf); - PROTOTYPEObjClassInit(obj); - PROTOTYPEObjClassExit(obj); --rsRetVal objDeserializeWithMethods(void *ppObj, uchar *pszTypeExpected, int lenTypeExpected, strm_t *pStrm, --rsRetVal (*fFixup)(obj_t*,void*), void *pUsr, rsRetVal (*objConstruct)(), rsRetVal (*objConstructFinalize)(), --rsRetVal (*objDeserialize)()); -+rsRetVal -+objDeserializeWithMethods(void *ppObj, uchar *pszTypeExpected, int lenTypeExpected, strm_t *pStrm, -+ rsRetVal (*fFixup)(obj_t*,void*), void *pUsr, -+ rsRetVal (*objConstruct)(void *, ...), -+ rsRetVal (*objConstructFinalize)(void *, ...), -+ rsRetVal (*objDeserialize)(void*, ...)); - rsRetVal objDeserializeProperty(var_t *pProp, strm_t *pStrm); - uchar *objGetName(obj_t *pThis); - -diff --git a/runtime/queue.c b/runtime/queue.c -index edc9d3513b..e17da6d7c3 100644 ---- a/runtime/queue.c -+++ b/runtime/queue.c -@@ -1063,7 +1063,8 @@ qDeqDisk(qqueue_t *pThis, smsg_t **ppMsg) - DEFiRet; - iRet = objDeserializeWithMethods(ppMsg, (uchar*) "msg", 3, - pThis->tVars.disk.pReadDeq, NULL, -- NULL, msgConstructForDeserializer, NULL, MsgDeserialize); -+ NULL, (rsRetVal (*)(void *, ...)) msgConstructForDeserializer, NULL, -+ (rsRetVal (*)(void *, ...)) MsgDeserialize); - if(iRet != RS_RET_OK) { - LogError(0, iRet, "%s: qDeqDisk error happened at around offset %lld", - obj.GetName((obj_t*)pThis), -diff --git a/runtime/rsconf.c b/runtime/rsconf.c -index 71b31be3cd..a0d735d423 100644 ---- a/runtime/rsconf.c -+++ b/runtime/rsconf.c -@@ -290,7 +290,7 @@ BEGINobjConstruct(rsconf) /* be sure to specify the object type also in END macr - CHKiRet(dynstats_initCnf(&pThis->dynstats_buckets)); - CHKiRet(perctile_initCnf(&pThis->perctile_buckets)); - CHKiRet(llInit(&pThis->rulesets.llRulesets, rulesetDestructForLinkedList, -- rulesetKeyDestruct, strcasecmp)); -+ rulesetKeyDestruct, (int (*)(void*, void*)) strcasecmp)); - finalize_it: - ENDobjConstruct(rsconf) - -diff --git a/runtime/rsyslog.h b/runtime/rsyslog.h -index 94b6605e8b..f98a5db3c7 100644 ---- a/runtime/rsyslog.h -+++ b/runtime/rsyslog.h -@@ -52,7 +52,9 @@ - * being emitted where nobody knows what the mean and why they appear :-( - */ - #pragma GCC diagnostic ignored "-Wjump-misses-init" -- #endif /* if __GNUC__ >= 8 */ -+ #pragma GCC diagnostic ignored "-Wincompatible-pointer-types" -+ #pragma GCC diagnostic ignored "-Wcast-function-type" -+ #endif - - #if defined(__clang__) - #define ATTR_NO_SANITIZE_UNDEFINED __attribute__((no_sanitize("undefined"))) -diff --git a/runtime/ruleset.c b/runtime/ruleset.c -index c137ee3b01..228283c28c 100644 ---- a/runtime/ruleset.c -+++ b/runtime/ruleset.c -@@ -888,7 +888,7 @@ destructAllActions(rsconf_t *conf) - - CHKiRet(llDestroy(&(conf->rulesets.llRulesets))); - CHKiRet(llInit(&(conf->rulesets.llRulesets), rulesetDestructForLinkedList, -- rulesetKeyDestruct, strcasecmp)); -+ rulesetKeyDestruct, (int (*)(void*, void*)) strcasecmp)); - conf->rulesets.pDflt = NULL; - - finalize_it: -diff --git a/tests/sndrcv_tls_anon_rebind.sh b/tests/sndrcv_tls_anon_rebind.sh -index dcd1e6e985..e3ae592a10 100755 ---- a/tests/sndrcv_tls_anon_rebind.sh -+++ b/tests/sndrcv_tls_anon_rebind.sh -@@ -3,6 +3,7 @@ - # rgerhards, 2011-04-04 - # This file is part of the rsyslog project, released under GPLv3 - . ${srcdir:=.}/diag.sh init -+skip_platform "SunOS" "Test fails with environment-induced errors, which we cannot solve" - - export NUMMESSAGES=25000 #25000 - -diff --git a/tests/sndrcv_tls_client_missing_cert.sh b/tests/sndrcv_tls_client_missing_cert.sh -index aa0c320244..c0c651706d 100755 ---- a/tests/sndrcv_tls_client_missing_cert.sh -+++ b/tests/sndrcv_tls_client_missing_cert.sh -@@ -1,6 +1,9 @@ - #!/bin/bash - # This file is part of the rsyslog project, released under ASL 2.0 - . ${srcdir:=.}/diag.sh init -+echo "This test is under review - it seems to have some issues" -+exit 77 -+ - printf 'using TLS driver: %s\n' ${RS_TLS_DRIVER:=gtls} - - # start up the instances -diff --git a/threads.c b/threads.c -index 2fd4bbb86c..95e85c1926 100644 ---- a/threads.c -+++ b/threads.c -@@ -302,7 +302,7 @@ rsRetVal thrdCreate(rsRetVal (*thrdMain)(thrdInfo_t*), rsRetVal(*afterRun)(thrdI - rsRetVal thrdInit(void) - { - DEFiRet; -- iRet = llInit(&llThrds, thrdDestruct, NULL, NULL); -+ iRet = llInit(&llThrds, (rsRetVal (*)(void*)) thrdDestruct, NULL, NULL); - RETiRet; - } - -diff --git a/tools/iminternal.c b/tools/iminternal.c -index c4dd548cee..105cf9f903 100644 ---- a/tools/iminternal.c -+++ b/tools/iminternal.c -@@ -163,7 +163,7 @@ rsRetVal iminternalRemoveMsg(smsg_t **ppMsg) - rsRetVal modInitIminternal(void) - { - DEFiRet; -- iRet = llInit(&llMsgs, iminternalDestruct, NULL, NULL); -+ iRet = llInit(&llMsgs, (rsRetVal (*)(void*)) iminternalDestruct, NULL, NULL); - RETiRet; - } - diff --git a/rsyslog.spec b/rsyslog.spec index c9e2679..1e8de05 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: 3%{?dist} +Version: 8.2506.0 +Release: 1%{?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 @@ -69,9 +69,6 @@ BuildRequires: systemd-rpm-macros BuildRequires: zlib-devel BuildRequires: libcap-ng-devel -Patch0: disable-openssl-engine.patch -Patch1: gnu23.patch - Recommends: logrotate Obsoletes: rsyslog-logrotate < 8.2310.0-2 Provides: rsyslog-logrotate = %{version}-%{release} @@ -382,8 +379,6 @@ rm -r LICENSE README.md source build/objects.inv mv build doc # set up rsyslog sources %setup -q -D -%patch -P 0 -p1 -%patch -P 1 -p1 %if %{with omamqp1} # Unpack qpid-proton @@ -764,6 +759,10 @@ done %changelog +* Thu Jun 12 2025 Attila Lakatos - 8.2506.0-1 +- Rebase to 8.2506.0 + Resolves: rhbz#2347628 + * Tue Jan 21 2025 Attila Lakatos - 8.2412.0-3 - Fix build problem by resolving -Wincompatible-pointer-types error @@ -778,7 +777,7 @@ done * Fri Oct 04 2024 Attila Lakatos - 8.2408.0-2 - Rebuild package - Resolves: rhzb#2316361 + Resolves: rhbz#2316361 * Wed Aug 21 2024 Attila Lakatos - 8.2408.0-1 - Rebase to 8.2408.0 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 From 6e2902bbf53ddc56069650ea82bac560d246afd5 Mon Sep 17 00:00:00 2001 From: Attila Lakatos Date: Thu, 12 Jun 2025 08:53:31 +0200 Subject: [PATCH 93/99] Fix building without openssl engines --- openssl-engines-disable.patch | 62 +++++++++++++++++++++++++++++++++++ rsyslog.spec | 3 ++ 2 files changed, 65 insertions(+) create mode 100644 openssl-engines-disable.patch diff --git a/openssl-engines-disable.patch b/openssl-engines-disable.patch new file mode 100644 index 0000000..877f0a4 --- /dev/null +++ b/openssl-engines-disable.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.spec b/rsyslog.spec index 1e8de05..429269e 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -69,6 +69,8 @@ BuildRequires: systemd-rpm-macros BuildRequires: zlib-devel BuildRequires: libcap-ng-devel +Patch0: openssl-engines-disable.patch + Recommends: logrotate Obsoletes: rsyslog-logrotate < 8.2310.0-2 Provides: rsyslog-logrotate = %{version}-%{release} @@ -379,6 +381,7 @@ rm -r LICENSE README.md source build/objects.inv mv build doc # set up rsyslog sources %setup -q -D +%patch -P 0 -p1 %if %{with omamqp1} # Unpack qpid-proton From 752b97d2f5fd211e9649ce834772f70a4abc5e53 Mon Sep 17 00:00:00 2001 From: Attila Lakatos Date: Thu, 12 Jun 2025 09:16:25 +0200 Subject: [PATCH 94/99] Add back accidentally removed patch --- rsyslog.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rsyslog.spec b/rsyslog.spec index 429269e..f3841a8 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -70,6 +70,7 @@ BuildRequires: zlib-devel BuildRequires: libcap-ng-devel Patch0: openssl-engines-disable.patch +Patch1: openssl3-compatibility.patch Recommends: logrotate Obsoletes: rsyslog-logrotate < 8.2310.0-2 @@ -382,6 +383,7 @@ mv build doc # set up rsyslog sources %setup -q -D %patch -P 0 -p1 +%patch -P 1 -p1 %if %{with omamqp1} # Unpack qpid-proton From 848f0a11426187fa3d557be0b3798bb2b34e3a4c Mon Sep 17 00:00:00 2001 From: Attila Lakatos Date: Thu, 12 Jun 2025 10:41:42 +0200 Subject: [PATCH 95/99] Fix broken omamqp1 module build --- rsyslog.spec | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/rsyslog.spec b/rsyslog.spec index f3841a8..9716008 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -70,7 +70,6 @@ BuildRequires: zlib-devel BuildRequires: libcap-ng-devel Patch0: openssl-engines-disable.patch -Patch1: openssl3-compatibility.patch Recommends: logrotate Obsoletes: rsyslog-logrotate < 8.2310.0-2 @@ -383,7 +382,6 @@ mv build doc # set up rsyslog sources %setup -q -D %patch -P 0 -p1 -%patch -P 1 -p1 %if %{with omamqp1} # Unpack qpid-proton @@ -406,14 +404,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 ) @@ -463,7 +460,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 \ From 06ff53b9e1ad1ec760b5da2c2355b3f0b6cdccd0 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 12:09:59 +0000 Subject: [PATCH 96/99] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- rsyslog.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rsyslog.spec b/rsyslog.spec index 9716008..1d14574 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -37,7 +37,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.2506.0 -Release: 1%{?dist} +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 @@ -761,6 +761,9 @@ done %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 8.2506.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Thu Jun 12 2025 Attila Lakatos - 8.2506.0-1 - Rebase to 8.2506.0 Resolves: rhbz#2347628 From 8770ba82dff70550a2db8959ac6eb7850695f322 Mon Sep 17 00:00:00 2001 From: Attila Lakatos Date: Fri, 5 Sep 2025 08:25:56 +0200 Subject: [PATCH 97/99] Rebase to 8.2508.0 Resolves: rhbz#2392918 --- .gitignore | 2 + openssl-engines-disable.patch | 62 -------------------------- openssl3-compatibility.patch | 83 ----------------------------------- rsyslog.spec | 43 +++++++++--------- sources | 5 +-- 5 files changed, 24 insertions(+), 171 deletions(-) delete mode 100644 openssl-engines-disable.patch delete mode 100644 openssl3-compatibility.patch diff --git a/.gitignore b/.gitignore index b2767df..54d79dc 100644 --- a/.gitignore +++ b/.gitignore @@ -100,3 +100,5 @@ rsyslog-4.6.3.tar.gz /rsyslog-doc-8.2412.0.tar.gz /rsyslog-8.2506.0.tar.gz /rsyslog-doc-8.2506.0.tar.gz +/rsyslog-8.2508.0.tar.gz +/qpid-proton-0.40.0.tar.gz diff --git a/openssl-engines-disable.patch b/openssl-engines-disable.patch deleted file mode 100644 index 877f0a4..0000000 --- a/openssl-engines-disable.patch +++ /dev/null @@ -1,62 +0,0 @@ -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/openssl3-compatibility.patch b/openssl3-compatibility.patch deleted file mode 100644 index c86fe23..0000000 --- a/openssl3-compatibility.patch +++ /dev/null @@ -1,83 +0,0 @@ -diff -up ./qpid-proton-0.34.0/c/src/ssl/openssl.c.orig ./qpid-proton-0.34.0/c/src/ssl/openssl.c ---- ./qpid-proton-0.34.0/c/src/ssl/openssl.c.orig 2021-06-01 09:29:27.976842727 +0200 -+++ ./qpid-proton-0.34.0/c/src/ssl/openssl.c 2021-06-01 09:31:05.232015887 +0200 -@@ -353,65 +353,6 @@ static int verify_callback(int preverify - return preverify_ok; - } - --// This was introduced in v1.1 --#if OPENSSL_VERSION_NUMBER < 0x10100000 --int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g) --{ -- dh->p = p; -- dh->q = q; -- dh->g = g; -- return 1; --} --#endif -- --// this code was generated using the command: --// "openssl dhparam -C -2 2048" --static DH *get_dh2048(void) --{ -- static const unsigned char dhp_2048[]={ -- 0xAE,0xF7,0xE9,0x66,0x26,0x7A,0xAC,0x0A,0x6F,0x1E,0xCD,0x81, -- 0xBD,0x0A,0x10,0x7E,0xFA,0x2C,0xF5,0x2D,0x98,0xD4,0xE7,0xD9, -- 0xE4,0x04,0x8B,0x06,0x85,0xF2,0x0B,0xA3,0x90,0x15,0x56,0x0C, -- 0x8B,0xBE,0xF8,0x48,0xBB,0x29,0x63,0x75,0x12,0x48,0x9D,0x7E, -- 0x7C,0x24,0xB4,0x3A,0x38,0x7E,0x97,0x3C,0x77,0x95,0xB0,0xA2, -- 0x72,0xB6,0xE9,0xD8,0xB8,0xFA,0x09,0x1B,0xDC,0xB3,0x80,0x6E, -- 0x32,0x0A,0xDA,0xBB,0xE8,0x43,0x88,0x5B,0xAB,0xC3,0xB2,0x44, -- 0xE1,0x95,0x85,0x0A,0x0D,0x13,0xE2,0x02,0x1E,0x96,0x44,0xCF, -- 0xA0,0xD8,0x46,0x32,0x68,0x63,0x7F,0x68,0xB3,0x37,0x52,0xCE, -- 0x3A,0x4E,0x48,0x08,0x7F,0xD5,0x53,0x00,0x59,0xA8,0x2C,0xCB, -- 0x51,0x64,0x3D,0x5F,0xEF,0x0E,0x5F,0xE6,0xAF,0xD9,0x1E,0xA2, -- 0x35,0x64,0x37,0xD7,0x4C,0xC9,0x24,0xFD,0x2F,0x75,0xBB,0x3A, -- 0x15,0x82,0x76,0x4D,0xC2,0x8B,0x1E,0xB9,0x4B,0xA1,0x33,0xCF, -- 0xAA,0x3B,0x7C,0xC2,0x50,0x60,0x6F,0x45,0x69,0xD3,0x6B,0x88, -- 0x34,0x9B,0xE4,0xF8,0xC6,0xC7,0x5F,0x10,0xA1,0xBA,0x01,0x8C, -- 0xDA,0xD1,0xA3,0x59,0x9C,0x97,0xEA,0xC3,0xF6,0x02,0x55,0x5C, -- 0x92,0x1A,0x39,0x67,0x17,0xE2,0x9B,0x27,0x8D,0xE8,0x5C,0xE9, -- 0xA5,0x94,0xBB,0x7E,0x16,0x6F,0x53,0x5A,0x6D,0xD8,0x03,0xC2, -- 0xAC,0x7A,0xCD,0x22,0x98,0x8E,0x33,0x2A,0xDE,0xAB,0x12,0xC0, -- 0x0B,0x7C,0x0C,0x20,0x70,0xD9,0x0B,0xAE,0x0B,0x2F,0x20,0x9B, -- 0xA4,0xED,0xFD,0x49,0x0B,0xE3,0x4A,0xF6,0x28,0xB3,0x98,0xB0, -- 0x23,0x1C,0x09,0x33, -- }; -- static const unsigned char dhg_2048[]={ -- 0x02, -- }; -- DH *dh = DH_new(); -- BIGNUM *dhp_bn, *dhg_bn; -- -- if (dh == NULL) -- return NULL; -- dhp_bn = BN_bin2bn(dhp_2048, sizeof (dhp_2048), NULL); -- dhg_bn = BN_bin2bn(dhg_2048, sizeof (dhg_2048), NULL); -- if (dhp_bn == NULL || dhg_bn == NULL -- || !DH_set0_pqg(dh, dhp_bn, NULL, dhg_bn)) { -- DH_free(dh); -- BN_free(dhp_bn); -- BN_free(dhg_bn); -- return NULL; -- } -- return dh; --} -- - typedef struct { - char *id; - SSL_SESSION *session; -@@ -542,13 +483,6 @@ static bool pni_init_ssl_domain( pn_ssl_ - domain->default_seclevel = SSL_CTX_get_security_level(domain->ctx); - # endif - -- DH *dh = get_dh2048(); -- if (dh) { -- SSL_CTX_set_tmp_dh(domain->ctx, dh); -- DH_free(dh); -- SSL_CTX_set_options(domain->ctx, SSL_OP_SINGLE_DH_USE); -- } -- - return true; - } - diff --git a/rsyslog.spec b/rsyslog.spec index 1d14574..051c0c4 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -1,7 +1,7 @@ %define rsyslog_statedir %{_sharedstatedir}/rsyslog %define rsyslog_pkidir %{_sysconfdir}/pki/rsyslog %define rsyslog_docdir %{_docdir}/rsyslog -%define qpid_proton_v 0.39.0 +%define qpid_proton_v 0.40.0 # The following packages are not enabled on rhel: # hiredis, libdbi, mongodb, rabbitmq # The omamqp1 plugin is built differently as qpid-proton is not available on rhel @@ -36,19 +36,18 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog -Version: 8.2506.0 -Release: 2%{?dist} +Version: 8.2508.0 +Release: 1%{?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 -Source1: http://www.rsyslog.com/files/download/rsyslog/%{name}-doc-%{version}.tar.gz -Source2: rsyslog.conf -Source3: rsyslog.sysconfig -Source4: rsyslog.log -Source5: rsyslog.service +Source1: rsyslog.conf +Source2: rsyslog.sysconfig +Source3: rsyslog.log +Source4: 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 +Source5: https://archive.apache.org/dist/qpid/proton/%{qpid_proton_v}/qpid-proton-%{qpid_proton_v}.tar.gz BuildRequires: make BuildRequires: gcc @@ -69,8 +68,6 @@ BuildRequires: systemd-rpm-macros BuildRequires: zlib-devel BuildRequires: libcap-ng-devel -Patch0: openssl-engines-disable.patch - Recommends: logrotate Obsoletes: rsyslog-logrotate < 8.2310.0-2 Provides: rsyslog-logrotate = %{version}-%{release} @@ -375,17 +372,12 @@ This module allows rsyslog to send messages to a RabbitMQ server. %endif %prep -# set up rsyslog-doc sources -%setup -q -a 1 -T -c -rm -r LICENSE README.md source build/objects.inv -mv build doc # set up rsyslog sources %setup -q -D -%patch -P 0 -p1 %if %{with omamqp1} # Unpack qpid-proton -%setup -q -D -T -b 6 +%setup -q -D -T -b 5 %endif %build @@ -541,10 +533,10 @@ install -d -m 700 %{buildroot}%{rsyslog_statedir} install -d -m 700 %{buildroot}%{rsyslog_pkidir} install -d -m 755 %{buildroot}%{rsyslog_docdir}/html -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 %{SOURCE1} %{buildroot}%{_sysconfdir}/rsyslog.conf +install -p -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/rsyslog +install -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/rsyslog +install -p -m 644 %{SOURCE4} %{buildroot}%{_unitdir}/rsyslog.service %if %{with mysql} install -p -m 644 plugins/ommysql/createDB.sql %{buildroot}%{rsyslog_docdir}/mysql-createDB.sql @@ -583,8 +575,8 @@ done %{!?_licensedir:%global license %%doc} %license COPYING* %doc AUTHORS ChangeLog README.md -%{rsyslog_docdir} %exclude %{rsyslog_docdir}/html +%exclude %{rsyslog_docdir}/recover_qi.pl %if %{with mysql} %exclude %{rsyslog_docdir}/mysql-createDB.sql %endif @@ -652,7 +644,8 @@ done %{_libdir}/rsyslog/lmcry_ossl.so %files doc -%doc %{rsyslog_docdir}/html +%{rsyslog_docdir}/html +%{rsyslog_docdir}/recover_qi.pl %files elasticsearch %{_libdir}/rsyslog/omelasticsearch.so @@ -761,6 +754,10 @@ done %changelog +* Fri Sep 05 2025 Attila Lakatos - 8.2508.0-1 +- Rebase to 8.2508.0 + Resolves: rhbz#2392918 + * Fri Jul 25 2025 Fedora Release Engineering - 8.2506.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild diff --git a/sources b/sources index 7e05396..e23ea0e 100644 --- a/sources +++ b/sources @@ -1,3 +1,2 @@ -SHA512 (qpid-proton-0.39.0.tar.gz) = df5c5469ee82ba02de62dce15b73b81aab2aae07c7db668182df690cea4ff7584111bd12143fe5e3569469a9ddf4950ac68d60b53d1a7815da4748052948cd1b -SHA512 (rsyslog-8.2506.0.tar.gz) = 82fd3a3e76217081c7903b0bdb8bdb46c23657593d84d5ff7f836efca4c76d7d2870706150a6473c0667f0c8571a3c8e5d237619a3ad3940701925efaec32941 -SHA512 (rsyslog-doc-8.2506.0.tar.gz) = 49db24f5905e4c48ab198358a646d105d0b10c23c7b9ea27d26baa533506e21420829a62acf52f4d34b56250d30988c1f8ab2d6798b3a416b0692c1fcf3c538d +SHA512 (rsyslog-8.2508.0.tar.gz) = 73d9cfa9e3260aacefc20acd2f30db2d6ea01fb2d309cebcc81802a9d6d756e719810572f330931027b2d21a9fb57deaadb8bf9bd0849be6da5794ff6d178a0c +SHA512 (qpid-proton-0.40.0.tar.gz) = 3e7fe56ca1423f45f71d81f5e1d6ec5f21c073cc580628e12a8dbd545a86805b7312834e0d1234dde43797633d575ed639f21a96239b217500cc0a824482aae3 From deb76591493ecda7eb9f63d2fcb5821dc2e26de6 Mon Sep 17 00:00:00 2001 From: Attila Lakatos Date: Mon, 20 Oct 2025 09:25:46 +0200 Subject: [PATCH 98/99] Rebase to 8.2510.0 Resolves: rhbz#2404131 imjournal open error handling fix Resolves: rhbz#2375742 --- .gitignore | 1 + rsyslog.spec | 8 +++++++- sources | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 54d79dc..cef7fab 100644 --- a/.gitignore +++ b/.gitignore @@ -102,3 +102,4 @@ rsyslog-4.6.3.tar.gz /rsyslog-doc-8.2506.0.tar.gz /rsyslog-8.2508.0.tar.gz /qpid-proton-0.40.0.tar.gz +/rsyslog-8.2510.0.tar.gz diff --git a/rsyslog.spec b/rsyslog.spec index 051c0c4..d1566f2 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -36,7 +36,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog -Version: 8.2508.0 +Version: 8.2510.0 Release: 1%{?dist} License: GPL-3.0-or-later AND Apache-2.0 URL: http://www.rsyslog.com/ @@ -754,6 +754,12 @@ done %changelog +* Mon Oct 20 2025 Attila Lakatos - 8.2510.0-1 +- Rebase to 8.2510.0 + Resolves: rhbz#2404131 +- imjournal open error handling fix + Resolves: rhbz#2375742 + * Fri Sep 05 2025 Attila Lakatos - 8.2508.0-1 - Rebase to 8.2508.0 Resolves: rhbz#2392918 diff --git a/sources b/sources index e23ea0e..1294997 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (rsyslog-8.2508.0.tar.gz) = 73d9cfa9e3260aacefc20acd2f30db2d6ea01fb2d309cebcc81802a9d6d756e719810572f330931027b2d21a9fb57deaadb8bf9bd0849be6da5794ff6d178a0c +SHA512 (rsyslog-8.2510.0.tar.gz) = d2e693fd8c7112e4ccc36ea6fbb19909df885e7cb2778e95c04b7c5e9db8240224decfee52308a46865b7deffcf1e31ade0104c90d84b768a4dece15e5ea190e SHA512 (qpid-proton-0.40.0.tar.gz) = 3e7fe56ca1423f45f71d81f5e1d6ec5f21c073cc580628e12a8dbd545a86805b7312834e0d1234dde43797633d575ed639f21a96239b217500cc0a824482aae3 From 3edd89e06c75ad44eb302280b5205a5dac7fed08 Mon Sep 17 00:00:00 2001 From: Attila Lakatos Date: Mon, 20 Oct 2025 09:47:39 +0200 Subject: [PATCH 99/99] Add mmleefparse module to base package --- rsyslog.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rsyslog.spec b/rsyslog.spec index d1566f2..3b67e3f 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -616,6 +616,7 @@ done %{_libdir}/rsyslog/mmanon.so %{_libdir}/rsyslog/mmcount.so %{_libdir}/rsyslog/mmexternal.so +%{_libdir}/rsyslog/mmleefparse.so %{_libdir}/rsyslog/mmutf8fix.so %{_libdir}/rsyslog/omhttp.so %{_libdir}/rsyslog/omjournal.so @@ -759,6 +760,7 @@ done Resolves: rhbz#2404131 - imjournal open error handling fix Resolves: rhbz#2375742 +- Add mmleefparse module to base package * Fri Sep 05 2025 Attila Lakatos - 8.2508.0-1 - Rebase to 8.2508.0