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 31f7ed8..8f560d7 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -1,14 +1,11 @@ %define rsyslog_statedir %{_sharedstatedir}/rsyslog %define rsyslog_pkidir %{_sysconfdir}/pki/rsyslog %define rsyslog_docdir %{_docdir}/rsyslog -# 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.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 @@ -19,11 +16,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 @@ -118,7 +113,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 @@ -128,9 +122,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 @@ -142,29 +133,6 @@ 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, @@ -242,23 +210,6 @@ 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 @@ -267,12 +218,13 @@ mv build doc # set up rsyslog sources %setup -q -D # Unpack qpid-proton for rhel -%if 0%{?rhel} != 0 %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" @@ -281,7 +233,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 @@ -297,7 +249,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 @@ -308,28 +259,13 @@ 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 \ --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-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 \ @@ -466,11 +402,6 @@ done %{_libdir}/rsyslog/pmcisconames.so %{_libdir}/rsyslog/pmlastmsg.so %{_libdir}/rsyslog/pmsnare.so -%if 0%{?rhel} == 0 -%{_libdir}/rsyslog/imdocker.so -%{_libdir}/rsyslog/improg.so -%{_libdir}/rsyslog/omclickhouse.so -%endif %files crypto %{_bindir}/rscryutil @@ -533,23 +464,13 @@ 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 +* Mon May 31 2021 Attila Lakatos - 8.2102.0-4 +- Spec file clean up +- Port to OpenSSL 3.0 + resolves: rhbz#1964823 + * Fri Apr 16 2021 Mohan Boddu - 8.2102.0-3 - Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 diff --git a/sources b/sources index ccff29d..d12920a 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (qpid-proton-0.31.0.tar.gz) = 39487c34ae6ae1cc0c2f57f2ffb2bdf48a554e9ba8439a5c3f9776205cdb138f71284c9fc7626e4bbee3110ccce7da61ddb45f51ebddfede981ada0872074202 +SHA512 (qpid-proton-0.34.0.tar.gz) = 0de6c3d11baeee1d69821a0f1879a61b314f14589e02ea7ed0de8814c741217fdcafdd978b4061f73bc75588886299f4ac6808021506545ec8a883f39ad54fb3 SHA512 (rsyslog-8.2102.0.tar.gz) = 281b0e5d5cb548c39a6e514e5fd5b1bdbe8ca0bdd9234f4fea581ed7679f76d2d75b65d14c3c5e799f86f91600074ff75b467aa1ff27cdbec0f4197261c5aec0 SHA512 (rsyslog-doc-8.2102.0.tar.gz) = a5dc4fb9bd8892fac693c5692b926c8d7d9fa36667d6b4c6eccba750713af88d4317f6232efc2a16de38c2e58c4a8bc4d04c9ebb2e7ebc3b0878d53eef20dd2e