From ca5b2a3a63206fe0fb8587a00d8258cfed0cf0fa Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Jan 15 2022 23:58:06 +0000 Subject: Update to 1.0.2 --- diff --git a/0001-build-do-not-assume-that-INSTALL-is-cp.patch b/0001-build-do-not-assume-that-INSTALL-is-cp.patch deleted file mode 100644 index a15941c..0000000 --- a/0001-build-do-not-assume-that-INSTALL-is-cp.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 725a96aaa247cae90f46753ca85dadbf22a64e5f Mon Sep 17 00:00:00 2001 -From: Igor Gnatenko -Date: Mon, 30 Oct 2017 10:19:47 +0100 -Subject: [PATCH] build: do not assume that INSTALL is cp -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -INSTALL is supposed to be `install` in most of the cases which -doesn't work with directories, but works perfectly with files. - -Don't do this assumption. - -Reported-by: Jiří Vymazal -References: https://bugzilla.redhat.com/show_bug.cgi?id=1506251 -Signed-off-by: Igor Gnatenko ---- - Makefile | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/Makefile b/Makefile -index 781a41d..c6eb229 100644 ---- a/Makefile -+++ b/Makefile -@@ -181,8 +181,9 @@ $(PKGCONFNAME): hiredis.h - @echo Cflags: -I\$${includedir} -D_FILE_OFFSET_BITS=64 >> $@ - - install: $(DYLIBNAME) $(STLIBNAME) $(PKGCONFNAME) -- mkdir -p $(INSTALL_INCLUDE_PATH) $(INSTALL_LIBRARY_PATH) -- $(INSTALL) hiredis.h async.h read.h sds.h adapters $(INSTALL_INCLUDE_PATH) -+ mkdir -p $(INSTALL_INCLUDE_PATH) $(INSTALL_INCLUDE_PATH)/adapters $(INSTALL_LIBRARY_PATH) -+ $(INSTALL) hiredis.h async.h read.h sds.h $(INSTALL_INCLUDE_PATH) -+ $(INSTALL) adapters/*.h $(INSTALL_INCLUDE_PATH)/adapters - $(INSTALL) $(DYLIBNAME) $(INSTALL_LIBRARY_PATH)/$(DYLIB_MINOR_NAME) - cd $(INSTALL_LIBRARY_PATH) && ln -sf $(DYLIB_MINOR_NAME) $(DYLIBNAME) - $(INSTALL) $(STLIBNAME) $(INSTALL_LIBRARY_PATH) --- -2.14.3 - diff --git a/78cec256efa5ca4705af85edbdf137060c9a4b0a.patch b/78cec256efa5ca4705af85edbdf137060c9a4b0a.patch deleted file mode 100644 index b048d28..0000000 --- a/78cec256efa5ca4705af85edbdf137060c9a4b0a.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 78cec256efa5ca4705af85edbdf137060c9a4b0a Mon Sep 17 00:00:00 2001 -From: Chris Lamb -Date: Sun, 19 Jan 2020 11:49:13 +0000 -Subject: [PATCH] Abort if malloc() was unsuccessful. (Closes: #747) - ---- - async.c | 2 ++ - dict.c | 7 ++++++- - 2 files changed, 8 insertions(+), 1 deletion(-) - -diff --git a/async.c b/async.c -index 4f422d566..f9193dd05 100644 ---- a/async.c -+++ b/async.c -@@ -58,6 +58,8 @@ static unsigned int callbackHash(const void *key) { - static void *callbackValDup(void *privdata, const void *src) { - ((void) privdata); - redisCallback *dup = malloc(sizeof(*dup)); -+ if (dup == NULL) -+ abort(); - memcpy(dup,src,sizeof(*dup)); - return dup; - } -diff --git a/dict.c b/dict.c -index 5b349f078..70ef57f6b 100644 ---- a/dict.c -+++ b/dict.c -@@ -72,6 +72,8 @@ static void _dictReset(dict *ht) { - /* Create a new hash table */ - static dict *dictCreate(dictType *type, void *privDataPtr) { - dict *ht = malloc(sizeof(*ht)); -+ if (ht == NULL) -+ abort(); - _dictInit(ht,type,privDataPtr); - return ht; - } -@@ -143,6 +145,8 @@ static int dictAdd(dict *ht, void *key, void *val) { - - /* Allocates the memory and stores key */ - entry = malloc(sizeof(*entry)); -+ if (entry == NULL) -+ abort(); - entry->next = ht->table[index]; - ht->table[index] = entry; - -@@ -257,7 +261,8 @@ static dictEntry *dictFind(dict *ht, const void *key) { - - static dictIterator *dictGetIterator(dict *ht) { - dictIterator *iter = malloc(sizeof(*iter)); -- -+ if (iter == NULL) -+ abort(); - iter->ht = ht; - iter->index = -1; - iter->entry = NULL; diff --git a/hiredis.spec b/hiredis.spec index 730b075..69ba6e8 100644 --- a/hiredis.spec +++ b/hiredis.spec @@ -1,18 +1,14 @@ Name: hiredis -Version: 0.13.3 -Release: 16%{?dist} +Version: 1.0.2 +Release: 1%{?dist} Summary: Minimalistic C client library for Redis License: BSD URL: https://github.com/redis/hiredis -Source0: https://github.com/redis/hiredis/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz -# https://github.com/redis/hiredis/pull/554 -Patch0: 0001-build-do-not-assume-that-INSTALL-is-cp.patch -# Already upstream -# Fix for CVE-2020-7105. -Patch1: https://github.com/lamby/hiredis/commit/78cec256efa5ca4705af85edbdf137060c9a4b0a.patch +Source0: https://github.com/redis/hiredis/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: gcc +BuildRequires: make +BuildRequires: openssl-devel BuildRequires: redis -BuildRequires: make %description Hiredis is a minimalistic C client library for the Redis database. @@ -30,16 +26,13 @@ developing applications that use %{name}. %build %make_build PREFIX="%{_prefix}" LIBRARY_PATH="%{_lib}" \ - DEBUG="%{optflags}" LDFLAGS="%{?__global_ldflags}" + DEBUG="%{optflags}" LDFLAGS="%{?__global_ldflags}" USE_SSL=1 %install %make_install PREFIX="%{_prefix}" LIBRARY_PATH="%{_lib}" find %{buildroot} -name '*.a' -delete -print -# I don't believe it's stable, so keep previous schema here. -cd %{buildroot}%{_libdir} && ln -sf libhiredis.so.0.13 libhiredis.so.0 - %check # TODO: Koji isolated environment may cause some tests fail to pass. make check || true @@ -48,8 +41,7 @@ make check || true %files %doc COPYING -%{_libdir}/libhiredis.so.0 -%{_libdir}/libhiredis.so.0.13 +%{_libdir}/libhiredis.so.1.0.0 %files devel %doc CHANGELOG.md README.md @@ -58,6 +50,10 @@ make check || true %{_libdir}/pkgconfig/hiredis.pc %changelog +* Sat Jan 15 2022 Orion Poplawski - 1.0.2-1 +- Update to 1.0.2 +- Enable SSL + * Thu Jul 22 2021 Fedora Release Engineering - 0.13.3-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild diff --git a/sources b/sources index c135318..123ee9c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -43dca1445ec6d3b702821dba36000279 hiredis-0.13.3.tar.gz +SHA512 (hiredis-1.0.2.tar.gz) = 86497a1c21869bbe535378885eee6dbd594ef96325966511a3513f81e501af0f5ac7fed864f3230372f3ac7a23c05bad477fa5aa90b9747c9fb1408028174f9b