Mageia Bugzilla – Attachment 14483 Details for
Bug 33028
consider updating hiredis: our version is 8y old, a recent one exists
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
spec patch - switch to cmake, enable ssl
hiredis.spec.patch (text/plain), 3.23 KB, created by
Aurelian R
on 2024-03-28 20:46:05 CET
(
hide
)
Description:
spec patch - switch to cmake, enable ssl
Filename:
MIME Type:
Creator:
Aurelian R
Created:
2024-03-28 20:46:05 CET
Size:
3.23 KB
patch
obsolete
>--- hiredis/hiredis.spec 2024-03-26 22:41:42.799894718 +0200 >+++ SPECS/hiredis.spec 2024-03-28 15:48:30.110279903 +0200 >@@ -1,26 +1,24 @@ >-%define major 0.13 >+%define major 1.1.0 > %define libname %mklibname %{name} %{major} > %define devname %mklibname %{name} -d > >+%bcond_without tests >+ > Name: hiredis >-Version: 0.13.3 >-Release: %mkrel 8 >+Version: 1.2.0 >+Release: %mkrel 0.1 > Summary: Minimalistic C client library for Redis > Group: System/Libraries > License: BSD > URL: https://github.com/redis/hiredis >-Source0: https://github.com/redis/hiredis/archive/v%{version}/%{name}-%{version}.tar.gz >-# https://github.com/redis/hiredis/pull/554 >-Patch0: 0001-build-do-not-assume-that-INSTALL-is-cp.patch >-# Already upstream >-# >-# Security patches >-# P100 -> ... >-# >-# Fix for CVE-2020-7105. >-Patch100: CVE-2020-7105.patch >-# CVE-2021-32765 >-patch101: 08-CVE-2021-32765.patch >+Source0: https://github.com/redis/hiredis/refs/tags/%{name}-%{version}.tar.gz >+ >+BuildRequires: cmake >+BuildRequires: openssl-devel >+%if %{with tests} >+BuildRequires: event-devel >+BuildRequires: redis >+%endif > > %description > Hiredis is a minimalistic C client library for the Redis database. >@@ -30,14 +28,15 @@ Hiredis is a minimalistic C client libra > %package -n %{libname} > Summary: Minimalistic C client library for Redis > Group: System/Libraries >-Obsoletes: %{_lib}hiredis0 < 0.13.3-3 > > %description -n %{libname} > Hiredis is a minimalistic C client library for the Redis database. > > %files -n %{libname} >-%doc COPYING >+%doc README.md CHANGELOG.md >+%license COPYING > %{_libdir}/lib%{name}.so.%{major}{,.*} >+%{_libdir}/lib%{name}_ssl.so.%{major}{,.*} > > #---------------------------------------------------------------------- > >@@ -46,34 +45,39 @@ Summary: Development files for %{ > Group: Development/C > Requires: %{libname} = %{version}-%{release} > Provides: %{name}-devel = %{version}-%{release} >+Conflicts: %{name}-devel < %{version}-%{release} > > %description -n %{devname} > This package contains libraries and header files for > developing applications that use %{name}. > > %files -n %{devname} >-%doc README.md COPYING > %{_includedir}/%{name}/ > %{_libdir}/lib%{name}.so >+%{_libdir}/lib%{name}_ssl.so >+%{_libdir}/cmake/hiredis/ >+%{_libdir}/cmake/hiredis_ssl/ > %{_libdir}/pkgconfig/%{name}.pc >+%{_libdir}/pkgconfig/%{name}_ssl.pc >+# >+%exclude %{_prefix}/build/native/hiredis.targets > > #---------------------------------------------------------------------- > >+ > %prep > %autosetup -p1 > > %build >-%set_build_flags >-%make_build >+%define _disable_ld_no_undefined 1 >+%cmake -DENABLE_SSL=ON \ >+ %{!?with_tests: -DDISABLE_TESTS=ON } \ >+ %{?with_tests: -DENABLE_ASYNC_TESTS=ON } >+%cmake_build > > %install >-%make_install PREFIX=%{_prefix} LIBRARY_PATH=%{_lib} >- >-# fix pkgconfig file >-perl -pi \ >- -e 's|^prefix=.*|prefix=%{_prefix}|;' \ >- -e 's|^libdir=.*|libdir=%{_libdir}|;' \ >- -e 's|^includedir=.*|includedir=%{_includedir}|;' \ >- %{buildroot}%{_libdir}/pkgconfig/%{name}.pc >+%cmake_install > >-find %{buildroot} -name '*.a' -delete -print >+%check >+# On aarch64 the test might fail, don't stop! >+%{?with_tests:%ctest -VV || : }
--- hiredis/hiredis.spec 2024-03-26 22:41:42.799894718 +0200 +++ SPECS/hiredis.spec 2024-03-28 15:48:30.110279903 +0200 @@ -1,26 +1,24 @@ -%define major 0.13 +%define major 1.1.0 %define libname %mklibname %{name} %{major} %define devname %mklibname %{name} -d +%bcond_without tests + Name: hiredis -Version: 0.13.3 -Release: %mkrel 8 +Version: 1.2.0 +Release: %mkrel 0.1 Summary: Minimalistic C client library for Redis Group: System/Libraries License: BSD URL: https://github.com/redis/hiredis -Source0: https://github.com/redis/hiredis/archive/v%{version}/%{name}-%{version}.tar.gz -# https://github.com/redis/hiredis/pull/554 -Patch0: 0001-build-do-not-assume-that-INSTALL-is-cp.patch -# Already upstream -# -# Security patches -# P100 -> ... -# -# Fix for CVE-2020-7105. -Patch100: CVE-2020-7105.patch -# CVE-2021-32765 -patch101: 08-CVE-2021-32765.patch +Source0: https://github.com/redis/hiredis/refs/tags/%{name}-%{version}.tar.gz + +BuildRequires: cmake +BuildRequires: openssl-devel +%if %{with tests} +BuildRequires: event-devel +BuildRequires: redis +%endif %description Hiredis is a minimalistic C client library for the Redis database. @@ -30,14 +28,15 @@ Hiredis is a minimalistic C client libra %package -n %{libname} Summary: Minimalistic C client library for Redis Group: System/Libraries -Obsoletes: %{_lib}hiredis0 < 0.13.3-3 %description -n %{libname} Hiredis is a minimalistic C client library for the Redis database. %files -n %{libname} -%doc COPYING +%doc README.md CHANGELOG.md +%license COPYING %{_libdir}/lib%{name}.so.%{major}{,.*} +%{_libdir}/lib%{name}_ssl.so.%{major}{,.*} #---------------------------------------------------------------------- @@ -46,34 +45,39 @@ Summary: Development files for %{ Group: Development/C Requires: %{libname} = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} +Conflicts: %{name}-devel < %{version}-%{release} %description -n %{devname} This package contains libraries and header files for developing applications that use %{name}. %files -n %{devname} -%doc README.md COPYING %{_includedir}/%{name}/ %{_libdir}/lib%{name}.so +%{_libdir}/lib%{name}_ssl.so +%{_libdir}/cmake/hiredis/ +%{_libdir}/cmake/hiredis_ssl/ %{_libdir}/pkgconfig/%{name}.pc +%{_libdir}/pkgconfig/%{name}_ssl.pc +# +%exclude %{_prefix}/build/native/hiredis.targets #---------------------------------------------------------------------- + %prep %autosetup -p1 %build -%set_build_flags -%make_build +%define _disable_ld_no_undefined 1 +%cmake -DENABLE_SSL=ON \ + %{!?with_tests: -DDISABLE_TESTS=ON } \ + %{?with_tests: -DENABLE_ASYNC_TESTS=ON } +%cmake_build %install -%make_install PREFIX=%{_prefix} LIBRARY_PATH=%{_lib} - -# fix pkgconfig file -perl -pi \ - -e 's|^prefix=.*|prefix=%{_prefix}|;' \ - -e 's|^libdir=.*|libdir=%{_libdir}|;' \ - -e 's|^includedir=.*|includedir=%{_includedir}|;' \ - %{buildroot}%{_libdir}/pkgconfig/%{name}.pc +%cmake_install -find %{buildroot} -name '*.a' -delete -print +%check +# On aarch64 the test might fail, don't stop! +%{?with_tests:%ctest -VV || : }
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 33028
: 14483