diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e6e29d2 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/librdkafka-0.11.4.tar.gz diff --git a/.librdkafka.metadata b/.librdkafka.metadata new file mode 100644 index 0000000..510f50e --- /dev/null +++ b/.librdkafka.metadata @@ -0,0 +1 @@ +00e5b9c610697a0f32910fd1ef19e9b2c684824e SOURCES/librdkafka-0.11.4.tar.gz diff --git a/SOURCES/librdkafka-python3.patch b/SOURCES/librdkafka-python3.patch new file mode 100644 index 0000000..be48a12 --- /dev/null +++ b/SOURCES/librdkafka-python3.patch @@ -0,0 +1,42 @@ +diff -up ./configure.librdkafka.python3 ./configure.librdkafka +--- ./configure.librdkafka.python3 2018-06-28 14:31:29.059417830 +0200 ++++ ./configure.librdkafka 2018-06-28 14:31:54.328300531 +0200 +@@ -179,7 +179,7 @@ void foo (void) { + + # The linker-script generator (lds-gen.py) requires python + if [[ $WITH_LDS == y ]]; then +- if ! mkl_command_check python "HAVE_PYTHON" "disable" "python -V"; then ++ if ! mkl_command_check python "HAVE_PYTHON" "disable" "python3 -V"; then + mkl_err "disabling linker-script since python is not available" + mkl_mkvar_set WITH_LDS WITH_LDS "n" + fi +diff -up ./lds-gen.py.python3 ./lds-gen.py +--- ./lds-gen.py.python3 2017-07-19 22:10:29.000000000 +0200 ++++ ./lds-gen.py 2018-06-28 14:22:12.745022430 +0200 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # + # + # Generate linker script to only expose symbols of the public API +diff -up ./Makefile.python3 ./Makefile +--- ./Makefile.python3 2018-06-28 14:32:46.176059853 +0200 ++++ ./Makefile 2018-06-28 14:32:56.542011734 +0200 +@@ -5,7 +5,7 @@ CHECK_FILES+= CONFIGURATION.md \ + examples/rdkafka_example_cpp + + PACKAGE_NAME?= librdkafka +-VERSION?= $(shell python packaging/get_version.py src/rdkafka.h) ++VERSION?= $(shell python3 packaging/get_version.py src/rdkafka.h) + + # Jenkins CI integration + BUILD_NUMBER ?= 1 +diff -up ./packaging/get_version.py.python3 ./packaging/get_version.py +--- ./packaging/get_version.py.python3 2018-06-28 14:33:48.825769032 +0200 ++++ ./packaging/get_version.py 2018-06-28 14:33:57.385729296 +0200 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + + import sys + diff --git a/SOURCES/rsyslog-0.11.4-rhbz1842817-crypto-compliance.patch b/SOURCES/rsyslog-0.11.4-rhbz1842817-crypto-compliance.patch new file mode 100644 index 0000000..235623e --- /dev/null +++ b/SOURCES/rsyslog-0.11.4-rhbz1842817-crypto-compliance.patch @@ -0,0 +1,13 @@ +diff -up librdkafka-0.11.4/src/rdkafka_conf.c.orig librdkafka-0.11.4/src/rdkafka_conf.c +--- librdkafka-0.11.4/src/rdkafka_conf.c.orig 2021-11-01 18:29:29.669679125 +0100 ++++ librdkafka-0.11.4/src/rdkafka_conf.c 2021-11-01 18:30:21.007126511 +0100 +@@ -468,7 +468,8 @@ static const struct rd_kafka_property rd + "encryption, MAC and key exchange algorithm used to negotiate the " + "security settings for a network connection using TLS or SSL network " + "protocol. See manual page for `ciphers(1)` and " +- "`SSL_CTX_set_cipher_list(3)." ++ "`SSL_CTX_set_cipher_list(3).", ++ .sdef = "PROFILE=SYSTEM" + }, + { _RK_GLOBAL, "ssl.key.location", _RK_C_STR, + _RK(ssl.key_location), diff --git a/SPECS/librdkafka.spec b/SPECS/librdkafka.spec new file mode 100644 index 0000000..86a19c0 --- /dev/null +++ b/SPECS/librdkafka.spec @@ -0,0 +1,122 @@ +Name: librdkafka +Version: 0.11.4 +Release: 3%{?dist} +Summary: The Apache Kafka C library + +Group: Development/Libraries +License: BSD +URL: https://github.com/edenhill/librdkafka +Source0: https://github.com/edenhill/librdkafka/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz + +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: python3 +BuildRequires: openssl-devel +BuildRequires: cyrus-sasl-devel +BuildRequires: lz4-devel + +Patch1: librdkafka-python3.patch +Patch2: rsyslog-0.11.4-rhbz1842817-crypto-compliance.patch + +%description +Librdkafka is a C/C++ library implementation of the Apache Kafka protocol, +containing both Producer and Consumer support. +It was designed with message delivery reliability and high performance in mind, +current figures exceed 800000 messages/second for the producer and 3 million +messages/second for the consumer. + +%package devel +Summary: The Apache Kafka C library (Development Environment) +Group: Development/Libraries +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +librdkafka is a C/C++ library implementation of the Apache Kafka protocol, +containing both Producer and Consumer support. +This package contains headers and libraries required to build applications +using librdkafka. + +%prep +%setup -q + +%patch1 -p1 -b .python3 +%patch2 -p1 -b .crypto-compliance + +%build +%configure --enable-lz4 \ + --enable-ssl \ + --enable-sasl + +%make_build + +%check +make check + +%install +%make_install +find %{buildroot} -name '*.a' -delete -print + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%{_libdir}/librdkafka.so.* +%{_libdir}/librdkafka++.so.* +%doc README.md CONFIGURATION.md INTRODUCTION.md +%license LICENSE LICENSE.pycrc LICENSE.snappy + +%files devel +%dir %{_includedir}/librdkafka +%attr(0644,root,root) %{_includedir}/librdkafka/* +%{_libdir}/librdkafka.so +%{_libdir}/librdkafka++.so +%{_libdir}/pkgconfig/rdkafka.pc +%{_libdir}/pkgconfig/rdkafka++.pc +%{_libdir}/pkgconfig/rdkafka-static.pc +%{_libdir}/pkgconfig/rdkafka++-static.pc + + +%changelog +* Mon Nov 01 2021 Attila Lakatos - 0.11.4-3 +- Set SSL_CTX_set_cipher_list to use system-wide crypto policies + resolves: rhbz#1842817 + +* Mon Jun 03 2019 Radovan Sroka - 0.11.4-2 +- rebuild + +* Fri Feb 08 2019 Jiri Vymazal - 0.11.4-1 +- rebase to v0.11.4 (0.11.5 was breaking rsyslog-kafka) + resolves: rhbz#1614697 + +* Fri Aug 10 2018 Jiri Vymazal - 0.11.5-1 +- rebase to v0.11.5 + resolves: rhbz#1614697 +- removed explicit %attr on symlinks + +* Thu Jun 28 2018 Radovan Sroka - 0.11.0-2 +- switch from python2 to python3 + resolves: rhbz#1595795 + +* Thu Aug 31 2017 Michal Luscon - 0.11.0-1 +- Update to 0.11.0 + +* Thu Aug 03 2017 Fedora Release Engineering - 0.9.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 0.9.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Mon May 22 2017 Radovan Sroka - 0.9.5-1 +- Update to 0.9.4 + +* Sat Mar 11 2017 Michal Luscon - 0.9.4-1 +- Update to 0.9.4 +- enable lz4, ssl, sasl + +* Fri Feb 10 2017 Fedora Release Engineering - 0.9.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + + +* Fri Nov 11 2016 Radovan Sroka 0.9.2-1 +- 0.9.2 release +- package created