public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/hiredis/files/, dev-python/hiredis/
@ 2018-06-24 13:14 Pacho Ramos
  0 siblings, 0 replies; 6+ messages in thread
From: Pacho Ramos @ 2018-06-24 13:14 UTC (permalink / raw
  To: gentoo-commits

commit:     64b64fac141a31ed4dabc2790c495f2197393214
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 24 13:12:16 2018 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sun Jun 24 13:14:09 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64b64fac

dev-python/hiredis: Fix linking (#653790 by Ștefan Talpalaru)

Package-Manager: Portage-2.3.40, Repoman-2.3.9

 .../files/hiredis-0.2.0-r1-system-libs.patch       | 26 +++++++++++++++++++++
 dev-python/hiredis/hiredis-0.2.0-r1.ebuild         | 27 ++++++++++++++++++++++
 2 files changed, 53 insertions(+)

diff --git a/dev-python/hiredis/files/hiredis-0.2.0-r1-system-libs.patch b/dev-python/hiredis/files/hiredis-0.2.0-r1-system-libs.patch
new file mode 100644
index 00000000000..19d4bd8598f
--- /dev/null
+++ b/dev-python/hiredis/files/hiredis-0.2.0-r1-system-libs.patch
@@ -0,0 +1,26 @@
+diff -ur hiredis-0.2.0.orig/setup.py hiredis-0.2.0/setup.py
+--- hiredis-0.2.0.orig/setup.py	2015-04-03 16:08:45.000000000 +0200
++++ hiredis-0.2.0/setup.py	2018-04-22 16:57:15.966520939 +0200
+@@ -40,12 +40,11 @@
+ # supported Python versions is worse...
+ #
+ # Also see: https://github.com/pietern/hiredis-py/issues/15
+-lib = ("hiredis_for_hiredis_py", {
+-  "sources": ["vendor/hiredis/%s.c" % src for src in ("read", "sds")]})
+ 
+ ext = Extension("hiredis.hiredis",
+   sources=glob.glob("src/*.c"),
+-  include_dirs=["vendor"])
++  libraries=["hiredis"],
++)
+ 
+ setup(
+   name="hiredis",
+@@ -57,7 +56,6 @@
+   keywords=["Redis"],
+   license="BSD",
+   packages=["hiredis"],
+-  libraries=[lib],
+   ext_modules=[ext],
+ 
+   # Override "install_lib" command

diff --git a/dev-python/hiredis/hiredis-0.2.0-r1.ebuild b/dev-python/hiredis/hiredis-0.2.0-r1.ebuild
new file mode 100644
index 00000000000..c3bd6074380
--- /dev/null
+++ b/dev-python/hiredis/hiredis-0.2.0-r1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+
+inherit distutils-r1
+
+DESCRIPTION="Python extension that wraps hiredis"
+HOMEPAGE="https://github.com/pietern/hiredis-py"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+DEPEND=">=dev-libs/hiredis-0.13.1"
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}"/${P}-r1-system-libs.patch )
+
+python_compile() {
+	python_is_python3 || local -x CFLAGS="${CFLAGS} -fno-strict-aliasing"
+
+	distutils-r1_python_compile
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/hiredis/files/, dev-python/hiredis/
@ 2021-06-26 21:42 Sven Wegener
  0 siblings, 0 replies; 6+ messages in thread
From: Sven Wegener @ 2021-06-26 21:42 UTC (permalink / raw
  To: gentoo-commits

commit:     bfa0b339d6094863dd89316d742775398880d483
Author:     Sven Wegener <swegener <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 26 21:41:08 2021 +0000
Commit:     Sven Wegener <swegener <AT> gentoo <DOT> org>
CommitDate: Sat Jun 26 21:41:51 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bfa0b339

dev-python/hiredis: Version bump to 2.0.0

Package-Manager: Portage-3.0.20, Repoman-3.0.2
Signed-off-by: Sven Wegener <swegener <AT> gentoo.org>

 dev-python/hiredis/Manifest                        |  1 +
 .../hiredis/files/hiredis-2.0.0-system-libs.patch  | 14 ++++++++++
 dev-python/hiredis/hiredis-2.0.0.ebuild            | 31 ++++++++++++++++++++++
 3 files changed, 46 insertions(+)

diff --git a/dev-python/hiredis/Manifest b/dev-python/hiredis/Manifest
index 3504fdc829a..5f1ab167b26 100644
--- a/dev-python/hiredis/Manifest
+++ b/dev-python/hiredis/Manifest
@@ -1 +1,2 @@
 DIST hiredis-1.1.0.tar.gz 54620 BLAKE2B 9991745d277e87efe836c1c8eabb2016ce401e2be52c7e1b3a154350776fae6fd3c49e3096da57231e42c57bf36ba692ce26bc993d0923b5246376d8694ad058 SHA512 ad37868376de91303c15ffe6109dc7fadb4f458efdd44b7ddc0a410937a389b8e062ab7d36b1aec3fe324ecafe6b1e5e6b92f547cbf619251dad22a28e02ee9c
+DIST hiredis-2.0.0.tar.gz 75807 BLAKE2B dc7535f117c8ecfb2c924fe44a1cba2f02271c544588249de6794ce3aec27f66038ecb9f6364ca87b71f66ba13870a3be192eb79c1f360d2eb6dcb6dcae41caa SHA512 b9a313acdd00676dc046713a81bbf4336959f49f09bd2828997c23ca41259935047c657a4b6f81913715141a75fb6bbe7fc4429c7a5b0f4bc3d5de66b9cfa909

diff --git a/dev-python/hiredis/files/hiredis-2.0.0-system-libs.patch b/dev-python/hiredis/files/hiredis-2.0.0-system-libs.patch
new file mode 100644
index 00000000000..74f14cdc00b
--- /dev/null
+++ b/dev-python/hiredis/files/hiredis-2.0.0-system-libs.patch
@@ -0,0 +1,14 @@
+--- hiredis-2.0.0/setup.py
++++ hiredis-2.0.0/setup.py
+@@ -11,9 +11,8 @@
+   return module.__version__
+ 
+ ext = Extension("hiredis.hiredis",
+-  sources=sorted(glob.glob("src/*.c") +
+-                 ["vendor/hiredis/%s.c" % src for src in ("alloc", "read", "sds")]),
+-  include_dirs=["vendor"])
++  sources=sorted(glob.glob("src/*.c")),
++  libraries=["hiredis"])
+ 
+ setup(
+   name="hiredis",

diff --git a/dev-python/hiredis/hiredis-2.0.0.ebuild b/dev-python/hiredis/hiredis-2.0.0.ebuild
new file mode 100644
index 00000000000..c2881e5aae3
--- /dev/null
+++ b/dev-python/hiredis/hiredis-2.0.0.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit distutils-r1
+
+DESCRIPTION="Python extension that wraps hiredis"
+HOMEPAGE="https://github.com/redis/hiredis-py/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="system-libs"
+
+DEPEND="system-libs? ( dev-libs/hiredis:0/1.0.0 )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+	use system-libs && PATCHES+=(
+		"${FILESDIR}"/${P}-system-libs.patch
+	)
+	default
+}
+
+python_test() {
+	cd test || die
+	"${EPYTHON}" -m unittest reader.ReaderTest || die "tests failed"
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/hiredis/files/, dev-python/hiredis/
@ 2021-08-05 14:56 Michał Górny
  0 siblings, 0 replies; 6+ messages in thread
From: Michał Górny @ 2021-08-05 14:56 UTC (permalink / raw
  To: gentoo-commits

commit:     b2fc9e981903524fd3b02791128e11e2928b6a90
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Aug  5 14:47:31 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Aug  5 14:47:31 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2fc9e98

dev-python/hiredis: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/hiredis/Manifest                        |  1 -
 .../hiredis/files/hiredis-1.0.1-api-0.14.patch     | 32 ----------------------
 .../hiredis/files/hiredis-1.0.1-system-libs.patch  | 15 ----------
 dev-python/hiredis/hiredis-1.1.0.ebuild            | 32 ----------------------
 4 files changed, 80 deletions(-)

diff --git a/dev-python/hiredis/Manifest b/dev-python/hiredis/Manifest
index 5f1ab167b26..d7d0946290e 100644
--- a/dev-python/hiredis/Manifest
+++ b/dev-python/hiredis/Manifest
@@ -1,2 +1 @@
-DIST hiredis-1.1.0.tar.gz 54620 BLAKE2B 9991745d277e87efe836c1c8eabb2016ce401e2be52c7e1b3a154350776fae6fd3c49e3096da57231e42c57bf36ba692ce26bc993d0923b5246376d8694ad058 SHA512 ad37868376de91303c15ffe6109dc7fadb4f458efdd44b7ddc0a410937a389b8e062ab7d36b1aec3fe324ecafe6b1e5e6b92f547cbf619251dad22a28e02ee9c
 DIST hiredis-2.0.0.tar.gz 75807 BLAKE2B dc7535f117c8ecfb2c924fe44a1cba2f02271c544588249de6794ce3aec27f66038ecb9f6364ca87b71f66ba13870a3be192eb79c1f360d2eb6dcb6dcae41caa SHA512 b9a313acdd00676dc046713a81bbf4336959f49f09bd2828997c23ca41259935047c657a4b6f81913715141a75fb6bbe7fc4429c7a5b0f4bc3d5de66b9cfa909

diff --git a/dev-python/hiredis/files/hiredis-1.0.1-api-0.14.patch b/dev-python/hiredis/files/hiredis-1.0.1-api-0.14.patch
deleted file mode 100644
index 16c42022828..00000000000
--- a/dev-python/hiredis/files/hiredis-1.0.1-api-0.14.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-diff -Nur hiredis-1.0.1.orig/src/reader.c hiredis-1.0.1/src/reader.c
---- hiredis-1.0.1.orig/src/reader.c	2019-11-13 11:38:29.000000000 +0100
-+++ hiredis-1.0.1/src/reader.c	2020-04-01 13:15:19.852085240 +0200
-@@ -167,7 +167,7 @@
- static void Reader_dealloc(hiredis_ReaderObject *self) {
-     // we don't need to free self->encoding as the buffer is managed by Python
-     // https://docs.python.org/3/c-api/arg.html#strings-and-buffers
--    redisReplyReaderFree(self->reader);
-+    redisReaderFree(self->reader);
-     Py_XDECREF(self->protocolErrorClass);
-     Py_XDECREF(self->replyErrorClass);
- 
-@@ -271,7 +271,7 @@
-       goto error;
-     }
- 
--    redisReplyReaderFeed(self->reader, (char *)buf.buf + off, len);
-+    redisReaderFeed(self->reader, (char *)buf.buf + off, len);
-     PyBuffer_Release(&buf);
-     Py_RETURN_NONE;
- 
-@@ -290,8 +290,8 @@
-         return NULL;
-     }
- 
--    if (redisReplyReaderGetReply(self->reader, (void**)&obj) == REDIS_ERR) {
--        errstr = redisReplyReaderGetError(self->reader);
-+    if (redisReaderGetReply(self->reader, (void**)&obj) == REDIS_ERR) {
-+        errstr = redisReaderGetError(self->reader);
-         /* protocolErrorClass might be a callable. call it, then use it's type */
-         err = createError(self->protocolErrorClass, errstr, strlen(errstr));
-         if (err != NULL) {

diff --git a/dev-python/hiredis/files/hiredis-1.0.1-system-libs.patch b/dev-python/hiredis/files/hiredis-1.0.1-system-libs.patch
deleted file mode 100644
index c11d0baa563..00000000000
--- a/dev-python/hiredis/files/hiredis-1.0.1-system-libs.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff -Nur hiredis-1.0.1.orig/setup.py hiredis-1.0.1/setup.py
---- hiredis-1.0.1.orig/setup.py	2019-11-13 11:38:29.000000000 +0100
-+++ hiredis-1.0.1/setup.py	2020-03-19 08:18:53.414214592 +0100
-@@ -11,9 +11,8 @@
-   return module.__version__
- 
- ext = Extension("hiredis.hiredis",
--  sources=sorted(glob.glob("src/*.c") +
--                 ["vendor/hiredis/%s.c" % src for src in ("read", "sds")]),
--  include_dirs=["vendor"])
-+  sources=sorted(glob.glob("src/*.c")),
-+  libraries=["hiredis"])
- 
- setup(
-   name="hiredis",

diff --git a/dev-python/hiredis/hiredis-1.1.0.ebuild b/dev-python/hiredis/hiredis-1.1.0.ebuild
deleted file mode 100644
index 68ec424e3ae..00000000000
--- a/dev-python/hiredis/hiredis-1.1.0.ebuild
+++ /dev/null
@@ -1,32 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-PYTHON_COMPAT=( python3_{8..10} )
-
-inherit distutils-r1
-
-DESCRIPTION="Python extension that wraps hiredis"
-HOMEPAGE="https://github.com/redis/hiredis-py/"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="amd64 ~arm x86"
-IUSE="system-libs"
-
-DEPEND="system-libs? ( dev-libs/hiredis:0/0.14 )"
-RDEPEND="${DEPEND}"
-
-src_prepare() {
-	use system-libs && PATCHES+=(
-		"${FILESDIR}"/${PN}-1.0.1-system-libs.patch
-		"${FILESDIR}"/${PN}-1.0.1-api-0.14.patch
-	)
-	default
-}
-
-python_test() {
-	cd test || die
-	"${EPYTHON}" -m unittest reader.ReaderTest || die "tests failed"
-}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/hiredis/files/, dev-python/hiredis/
@ 2021-10-31 15:48 Sven Wegener
  0 siblings, 0 replies; 6+ messages in thread
From: Sven Wegener @ 2021-10-31 15:48 UTC (permalink / raw
  To: gentoo-commits

commit:     a0e1a56eed02c79bc1a261e3d13c9fe0c4a728e8
Author:     Sven Wegener <swegener <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 31 12:34:29 2021 +0000
Commit:     Sven Wegener <swegener <AT> gentoo <DOT> org>
CommitDate: Sun Oct 31 15:48:23 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0e1a56e

dev-python/hiredis: Revision bump for CVE-2021-32765

It includes a bundled copy of dev-libs/hiredis and is suffering the same
security issue.

URL: https://github.com/redis/hiredis/security/advisories/GHSA-hfm9-39pp-55p2
Bug: https://bugs.gentoo.org/816318
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Sven Wegener <swegener <AT> gentoo.org>

 .../files/hiredis-2.0.0-CVE-2021-32765.patch       | 36 ++++++++++++++++++++++
 dev-python/hiredis/hiredis-2.0.0-r2.ebuild         | 36 ++++++++++++++++++++++
 2 files changed, 72 insertions(+)

diff --git a/dev-python/hiredis/files/hiredis-2.0.0-CVE-2021-32765.patch b/dev-python/hiredis/files/hiredis-2.0.0-CVE-2021-32765.patch
new file mode 100644
index 00000000000..ad1bb80ac0d
--- /dev/null
+++ b/dev-python/hiredis/files/hiredis-2.0.0-CVE-2021-32765.patch
@@ -0,0 +1,36 @@
+--- a/vendor/hiredis/alloc.c
++++ b/vendor/hiredis/alloc.c
+@@ -68,6 +68,10 @@ void *hi_malloc(size_t size) {
+ }
+ 
+ void *hi_calloc(size_t nmemb, size_t size) {
++    /* Overflow check as the user can specify any arbitrary allocator */
++    if (SIZE_MAX / size < nmemb)
++        return NULL;
++
+     return hiredisAllocFns.callocFn(nmemb, size);
+ }
+ 
+diff --git a/alloc.h b/alloc.h
+index 34a05f4..771f9fe 100644
+--- a/vendor/hiredis/alloc.h
++++ b/vendor/hiredis/alloc.h
+@@ -32,6 +32,7 @@
+ #define HIREDIS_ALLOC_H
+ 
+ #include <stddef.h> /* for size_t */
++#include <stdint.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+@@ -59,6 +60,10 @@ static inline void *hi_malloc(size_t size) {
+ }
+ 
+ static inline void *hi_calloc(size_t nmemb, size_t size) {
++    /* Overflow check as the user can specify any arbitrary allocator */
++    if (SIZE_MAX / size < nmemb)
++        return NULL;
++
+     return hiredisAllocFns.callocFn(nmemb, size);
+ }
+ 

diff --git a/dev-python/hiredis/hiredis-2.0.0-r2.ebuild b/dev-python/hiredis/hiredis-2.0.0-r2.ebuild
new file mode 100644
index 00000000000..48e177fb23f
--- /dev/null
+++ b/dev-python/hiredis/hiredis-2.0.0-r2.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} pypy3 )
+inherit distutils-r1
+
+DESCRIPTION="Python extension that wraps hiredis"
+HOMEPAGE="https://github.com/redis/hiredis-py/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="system-libs"
+
+DEPEND="system-libs? ( >=dev-libs/hiredis-1.0.0:= )"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-CVE-2021-32765.patch
+)
+
+src_prepare() {
+	use system-libs && PATCHES+=(
+		"${FILESDIR}"/${P}-system-libs.patch
+	)
+	sed -i -e 's:description-file:description_file:' setup.cfg || die
+	default
+}
+
+python_test() {
+	cd test || die
+	"${EPYTHON}" -m unittest -v reader.ReaderTest || die "tests failed"
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/hiredis/files/, dev-python/hiredis/
@ 2023-04-05  9:14 Michał Górny
  0 siblings, 0 replies; 6+ messages in thread
From: Michał Górny @ 2023-04-05  9:14 UTC (permalink / raw
  To: gentoo-commits

commit:     cce314ad5ff63b3848b4c360d00d0b1272f2c703
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Apr  5 09:06:36 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Apr  5 09:14:12 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cce314ad

dev-python/hiredis: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/hiredis/Manifest                        |  1 -
 .../files/hiredis-2.0.0-CVE-2021-32765.patch       | 36 ----------------------
 .../hiredis/files/hiredis-2.0.0-system-libs.patch  | 14 ---------
 dev-python/hiredis/hiredis-2.0.0-r2.ebuild         | 36 ----------------------
 dev-python/hiredis/metadata.xml                    |  3 --
 5 files changed, 90 deletions(-)

diff --git a/dev-python/hiredis/Manifest b/dev-python/hiredis/Manifest
index bf1b5ba11125..cd80c0be9b4b 100644
--- a/dev-python/hiredis/Manifest
+++ b/dev-python/hiredis/Manifest
@@ -1,2 +1 @@
-DIST hiredis-2.0.0.tar.gz 75807 BLAKE2B dc7535f117c8ecfb2c924fe44a1cba2f02271c544588249de6794ce3aec27f66038ecb9f6364ca87b71f66ba13870a3be192eb79c1f360d2eb6dcb6dcae41caa SHA512 b9a313acdd00676dc046713a81bbf4336959f49f09bd2828997c23ca41259935047c657a4b6f81913715141a75fb6bbe7fc4429c7a5b0f4bc3d5de66b9cfa909
 DIST hiredis-2.2.2.gh.tar.gz 18010 BLAKE2B 67ab7c3f0667d3cf33abea58fbe37bcc28beb569f6f3da966f191d00965faa5a835a286172179d6f33f4e0fa81743fa345829f04d9d89350ab1394cc0c168147 SHA512 8a42df63911000cd119da33e7fea25fa1a5244a86016818bcb6c6e12c042b12b00b7272633d85dcf921fd2eba67145e3258c64689be799a0f59766e541139120

diff --git a/dev-python/hiredis/files/hiredis-2.0.0-CVE-2021-32765.patch b/dev-python/hiredis/files/hiredis-2.0.0-CVE-2021-32765.patch
deleted file mode 100644
index ad1bb80ac0de..000000000000
--- a/dev-python/hiredis/files/hiredis-2.0.0-CVE-2021-32765.patch
+++ /dev/null
@@ -1,36 +0,0 @@
---- a/vendor/hiredis/alloc.c
-+++ b/vendor/hiredis/alloc.c
-@@ -68,6 +68,10 @@ void *hi_malloc(size_t size) {
- }
- 
- void *hi_calloc(size_t nmemb, size_t size) {
-+    /* Overflow check as the user can specify any arbitrary allocator */
-+    if (SIZE_MAX / size < nmemb)
-+        return NULL;
-+
-     return hiredisAllocFns.callocFn(nmemb, size);
- }
- 
-diff --git a/alloc.h b/alloc.h
-index 34a05f4..771f9fe 100644
---- a/vendor/hiredis/alloc.h
-+++ b/vendor/hiredis/alloc.h
-@@ -32,6 +32,7 @@
- #define HIREDIS_ALLOC_H
- 
- #include <stddef.h> /* for size_t */
-+#include <stdint.h>
- 
- #ifdef __cplusplus
- extern "C" {
-@@ -59,6 +60,10 @@ static inline void *hi_malloc(size_t size) {
- }
- 
- static inline void *hi_calloc(size_t nmemb, size_t size) {
-+    /* Overflow check as the user can specify any arbitrary allocator */
-+    if (SIZE_MAX / size < nmemb)
-+        return NULL;
-+
-     return hiredisAllocFns.callocFn(nmemb, size);
- }
- 

diff --git a/dev-python/hiredis/files/hiredis-2.0.0-system-libs.patch b/dev-python/hiredis/files/hiredis-2.0.0-system-libs.patch
deleted file mode 100644
index 74f14cdc00b4..000000000000
--- a/dev-python/hiredis/files/hiredis-2.0.0-system-libs.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- hiredis-2.0.0/setup.py
-+++ hiredis-2.0.0/setup.py
-@@ -11,9 +11,8 @@
-   return module.__version__
- 
- ext = Extension("hiredis.hiredis",
--  sources=sorted(glob.glob("src/*.c") +
--                 ["vendor/hiredis/%s.c" % src for src in ("alloc", "read", "sds")]),
--  include_dirs=["vendor"])
-+  sources=sorted(glob.glob("src/*.c")),
-+  libraries=["hiredis"])
- 
- setup(
-   name="hiredis",

diff --git a/dev-python/hiredis/hiredis-2.0.0-r2.ebuild b/dev-python/hiredis/hiredis-2.0.0-r2.ebuild
deleted file mode 100644
index 5e6e08f77029..000000000000
--- a/dev-python/hiredis/hiredis-2.0.0-r2.ebuild
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{9..11} pypy3 )
-inherit distutils-r1
-
-DESCRIPTION="Python extension that wraps hiredis"
-HOMEPAGE="https://github.com/redis/hiredis-py/"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~ppc ~ppc64 ~riscv ~sparc x86"
-IUSE="system-libs"
-
-DEPEND="system-libs? ( >=dev-libs/hiredis-1.0.0:= )"
-RDEPEND="${DEPEND}"
-
-PATCHES=(
-	"${FILESDIR}"/${P}-CVE-2021-32765.patch
-)
-
-src_prepare() {
-	use system-libs && PATCHES+=(
-		"${FILESDIR}"/${P}-system-libs.patch
-	)
-	sed -i -e 's:description-file:description_file:' setup.cfg || die
-	default
-}
-
-python_test() {
-	cd test || die
-	"${EPYTHON}" -m unittest -v reader.ReaderTest || die "tests failed"
-}

diff --git a/dev-python/hiredis/metadata.xml b/dev-python/hiredis/metadata.xml
index 260530157e29..3f8f3a47818f 100644
--- a/dev-python/hiredis/metadata.xml
+++ b/dev-python/hiredis/metadata.xml
@@ -13,7 +13,4 @@
     <remote-id type="pypi">hiredis</remote-id>
     <remote-id type="github">redis/hiredis-py</remote-id>
   </upstream>
-  <use>
-    <flag name="system-libs">Use <pkg>dev-libs/hiredis</pkg> from system</flag>
-  </use>
 </pkgmetadata>


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/hiredis/files/, dev-python/hiredis/
@ 2024-07-19 19:56 Michał Górny
  0 siblings, 0 replies; 6+ messages in thread
From: Michał Górny @ 2024-07-19 19:56 UTC (permalink / raw
  To: gentoo-commits

commit:     c4958e250ed72493784b28448712625320b7b81a
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 19 18:38:41 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jul 19 19:56:15 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c4958e25

dev-python/hiredis: Bump to 2.4.0

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/hiredis/Manifest                        |  1 +
 .../hiredis/files/hiredis-2.4.0-system-libs.patch  | 33 ++++++++++++++++
 dev-python/hiredis/hiredis-2.4.0.ebuild            | 45 ++++++++++++++++++++++
 3 files changed, 79 insertions(+)

diff --git a/dev-python/hiredis/Manifest b/dev-python/hiredis/Manifest
index 6d51028a1b45..5f97ff664c28 100644
--- a/dev-python/hiredis/Manifest
+++ b/dev-python/hiredis/Manifest
@@ -1 +1,2 @@
 DIST hiredis-py-2.3.2.gh.tar.gz 19076 BLAKE2B 4a3e747765f559407b3ad84524bc1040e3a530723b5756320743fc20400bc70e867d48e71696d732a5fa5eb231199cbefb6f487d0b5ece6fc8f6c41f10f3c0d8 SHA512 1a22ab324f9675973c3dc37c55d6dd9cf43fbc161003003a73b2e1dfbb3fed7dcb1433f4fc51045a88cb2735f7c8495b93a819a0a9f6300e05b0cc85160eaace
+DIST hiredis-py-2.4.0.gh.tar.gz 19076 BLAKE2B a5b047db044801e5dabdd5bcaefb5a89cce472f45baa6a3d590b09014446695ed84baaa46bc4d8a809cc6ffa2a2e219e03b62268ee9f818ef5e9c770cd064591 SHA512 638184fff812cf2c0d0e731be98e22c37c2c07db539ce2ad1e5d45e8f399864bc49e5e26cd0b1fcdf7db9fc776a664f8541229ef00da0b597c4be4f3ab7461cf

diff --git a/dev-python/hiredis/files/hiredis-2.4.0-system-libs.patch b/dev-python/hiredis/files/hiredis-2.4.0-system-libs.patch
new file mode 100644
index 000000000000..92a14f91d200
--- /dev/null
+++ b/dev-python/hiredis/files/hiredis-2.4.0-system-libs.patch
@@ -0,0 +1,33 @@
+--- hiredis-2.2.2.orig/setup.py
++++ hiredis-2.2.2/setup.py
+@@ -18,8 +18,7 @@
+ 
+ 
+ def get_sources():
+-    hiredis_sources = ("alloc", "async", "hiredis", "net", "read", "sds", "sockcompat")
+-    return sorted(glob.glob("src/*.c") + ["vendor/hiredis/%s.c" % src for src in hiredis_sources])
++    return sorted(glob.glob("src/*.c"))
+ 
+ 
+ def get_linker_args():
+@@ -38,17 +37,16 @@
+ 
+ def get_libraries():
+     if 'win32' in sys.platform:
+-        return ["ws2_32", ]
++        return ["ws2_32", "hiredis"]
+     else:
+-        return []
++        return ["hiredis"]
+ 
+ 
+ ext = Extension("hiredis.hiredis",
+                 sources=get_sources(),
+                 extra_compile_args=get_compiler_args(),
+                 extra_link_args=get_linker_args(),
+-                libraries=get_libraries(),
+-                include_dirs=["vendor"])
++                libraries=get_libraries())
+ 
+ setup(
+     name="hiredis",

diff --git a/dev-python/hiredis/hiredis-2.4.0.ebuild b/dev-python/hiredis/hiredis-2.4.0.ebuild
new file mode 100644
index 000000000000..a7183e750350
--- /dev/null
+++ b/dev-python/hiredis/hiredis-2.4.0.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517="setuptools"
+PYTHON_COMPAT=( python3_{10..13} pypy3 )
+
+inherit distutils-r1
+
+MY_P=hiredis-py-${PV}
+DESCRIPTION="Python extension that wraps hiredis"
+HOMEPAGE="
+	https://github.com/redis/hiredis-py/
+	https://pypi.org/project/hiredis/
+"
+SRC_URI="
+	https://github.com/redis/hiredis-py/archive/v${PV}.tar.gz
+		-> ${MY_P}.gh.tar.gz
+"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
+
+DEPEND="
+	>=dev-libs/hiredis-1.0.0:=
+"
+RDEPEND="
+	${DEPEND}
+"
+
+PATCHES=(
+	"${FILESDIR}"/hiredis-2.4.0-system-libs.patch
+)
+
+distutils_enable_tests pytest
+
+python_test() {
+	local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+	rm -rf hiredis || die
+	epytest
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-07-19 19:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-19 19:56 [gentoo-commits] repo/gentoo:master commit in: dev-python/hiredis/files/, dev-python/hiredis/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2023-04-05  9:14 Michał Górny
2021-10-31 15:48 Sven Wegener
2021-08-05 14:56 Michał Górny
2021-06-26 21:42 Sven Wegener
2018-06-24 13:14 Pacho Ramos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox