Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] redis: update to 7.0.8.
@ 2023-01-21 13:06 kruceter
  2023-01-21 19:42 ` [PR REVIEW] " ahesford
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: kruceter @ 2023-01-21 13:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2253 bytes --]

There is a new pull request by kruceter against master on the void-packages repository

https://github.com/kruceter/void-packages redis
https://github.com/void-linux/void-packages/pull/41768

redis: update to 7.0.8.
The primary reason for updating this package is due to the following CVEs being found and fixed:

* [CVE-2022-35977](https://www.cvedetails.com/cve/CVE-2022-35977) (Integer overflow in the Redis SETRANGE and SORT/SORT_RO commands can drive Redis to OOM panic)

* [CVE-2023-22458](https://www.cvedetails.com/cve/CVE-2023-22458) (Integer overflow in the Redis HRANDFIELD and ZRANDMEMBER commands can lead to denial-of-service)

The rest is as follows:

* `jemalloc-devel` and `libatomic-devel` now are included conditionally.

* antirez/redis has been moved to redis/redis (antirez stepped down in 2020 and handed over his work to his colleagues).

* do_check can be executed by setting `make_check_target` to `"test"`.

* `V=1` is retained in `make_build_args`; `MALLOC` is defined outside the removed `do_build` function.

* the `-ldl` flag in `use-system-jemalloc.patch` is no longer necessary since it is already defined in `src/Makefile`; see redis/redis@b7b9aa6d9bbed5a292f3e939bf0c5906bdf965ca

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/41768.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-redis-41768.patch --]
[-- Type: text/x-diff, Size: 3878 bytes --]

From c86ccea0939b15a07bc9c59c73cf697a57b378cd Mon Sep 17 00:00:00 2001
From: Krul Ceter <kruceter@proton.me>
Date: Sat, 21 Jan 2023 14:53:59 +0300
Subject: [PATCH] redis: update to 7.0.8.

The primary reason for updating this package is due to the following
CVEs being found and fixed:

* CVE-2022-35977 (Integer overflow in the Redis SETRANGE and
  SORT/SORT_RO commands can drive Redis to OOM panic)

* CVE-2023-22458 (Integer overflow in the Redis HRANDFIELD and
  ZRANDMEMBER commands can lead to denial-of-service)

The rest is as follows:

* jemalloc-devel and libatomic-devel now are included conditionally.

* antirez/redis has been moved to redis/redis (antirez stepped down in
  2020 and handed over his work to his colleagues).

* do_check can be executed by setting make_check_target to "test".

* V=1 is retained in make_build_args; MALLOC is defined outside the
  removed do_build function.

* the "-ldl" flag in use-system-jemalloc.patch is no longer necessary
  since it is already defined in src/Makefile; see
  redis/redis@b7b9aa6d9bbed5a292f3e939bf0c5906bdf965ca
---
 .../redis/patches/use-system-jemalloc.patch   |  2 +-
 srcpkgs/redis/template                        | 38 ++++++++++---------
 2 files changed, 22 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/redis/patches/use-system-jemalloc.patch b/srcpkgs/redis/patches/use-system-jemalloc.patch
index c32bcdd09255..e3b8e555b9fc 100644
--- a/srcpkgs/redis/patches/use-system-jemalloc.patch
+++ b/srcpkgs/redis/patches/use-system-jemalloc.patch
@@ -8,7 +8,7 @@
 -	FINAL_CFLAGS+= -DUSE_JEMALLOC -I../deps/jemalloc/include
 -	FINAL_LIBS := ../deps/jemalloc/lib/libjemalloc.a $(FINAL_LIBS)
 +	FINAL_CFLAGS+= -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE
-+	FINAL_LIBS+= -ljemalloc -ldl
++	FINAL_LIBS+= -ljemalloc
  endif
  
  REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS)
diff --git a/srcpkgs/redis/template b/srcpkgs/redis/template
index 110484cdb527..29e103628970 100644
--- a/srcpkgs/redis/template
+++ b/srcpkgs/redis/template
@@ -1,16 +1,18 @@
 # Template file for 'redis'
 pkgname=redis
-version=7.0.5
+version=7.0.8
 revision=1
-makedepends="jemalloc-devel libatomic-devel"
+build_style=gnu-makefile
+make_build_args="V=1"
+make_check_target="test"
 checkdepends="pkg-config procps-ng tcl-devel which"
 short_desc="Advanced key-value store"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="BSD-3-Clause"
 homepage="https://redis.io"
-changelog="https://raw.githubusercontent.com/antirez/redis/${version%.*}/00-RELEASENOTES"
-distfiles="http://download.redis.io/releases/${pkgname}-${version}.tar.gz"
-checksum=67054cc37b58c125df93bd78000261ec0ef4436a26b40f38262c780e56315cc3
+changelog="https://raw.githubusercontent.com/redis/redis/${version%.*}/00-RELEASENOTES"
+distfiles="http://download.redis.io/releases/redis-${version}.tar.gz"
+checksum=06a339e491306783dcf55b97f15a5dbcbdc01ccbde6dc23027c475cab735e914
 
 system_accounts="redis"
 redis_homedir="/var/lib/redis"
@@ -18,24 +20,26 @@ conf_files="/etc/redis/redis.conf"
 
 make_dirs="/var/lib/redis 0700 redis redis"
 
+if [ "$XBPS_TARGET_LIBC" != "musl" ]; then
+	makedepends+=" jemalloc-devel"
+	_malloc="jemalloc"
+fi
+
+make_build_args+=" MALLOC=${_malloc:-libc}"
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	makedepends+=" libatomic-devel"
+fi
+
 do_configure() {
 	vsed -i \
 		-e "s|^# bind 127.0.0.1|bind 127.0.0.1|" \
 		-e "s|^dir .*|dir ${redis_homedir}|" \
 		-e "s|^pidfile .*|pidfile /run/redis/redis.pid|" redis.conf
-	vsed -i -e "s|^FINAL_LIBS=.*|& -latomic|" src/Makefile
-}
-
-do_build() {
-	case "$XBPS_TARGET_MACHINE" in
-		*-musl) _malloc="none";;
-		*) _malloc="jemalloc";;
-	esac
-	make CC=$CC CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" V=1 MALLOC=${_malloc} ${makejobs}
-}
 
-do_check() {
-	make test
+	if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+		vsed -i -e "s|^FINAL_LIBS=.*|& -latomic|" src/Makefile
+	fi
 }
 
 do_install() {

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

* Re: [PR REVIEW] redis: update to 7.0.8.
  2023-01-21 13:06 [PR PATCH] redis: update to 7.0.8 kruceter
@ 2023-01-21 19:42 ` ahesford
  2023-01-21 19:42 ` ahesford
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: ahesford @ 2023-01-21 19:42 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 239 bytes --]

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/41768#discussion_r1083327818

Comment:
Please rename this `post_patch`. These modifications never beloned in the configure stage.

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

* Re: [PR REVIEW] redis: update to 7.0.8.
  2023-01-21 13:06 [PR PATCH] redis: update to 7.0.8 kruceter
  2023-01-21 19:42 ` [PR REVIEW] " ahesford
@ 2023-01-21 19:42 ` ahesford
  2023-01-22  3:29 ` [PR PATCH] [Updated] " kruceter
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: ahesford @ 2023-01-21 19:42 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 325 bytes --]

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/41768#discussion_r1083327715

Comment:
```suggestion
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
	make_build_args+=" MALLOC=libc"
else
	makedepends+=" jemalloc-devel"
	make_build_args+=" MALLOC=jemalloc"
fi
```

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

* Re: [PR PATCH] [Updated] redis: update to 7.0.8.
  2023-01-21 13:06 [PR PATCH] redis: update to 7.0.8 kruceter
  2023-01-21 19:42 ` [PR REVIEW] " ahesford
  2023-01-21 19:42 ` ahesford
@ 2023-01-22  3:29 ` kruceter
  2023-01-22  3:39 ` kruceter
  2023-01-22 12:10 ` [PR PATCH] [Merged]: " leahneukirchen
  4 siblings, 0 replies; 6+ messages in thread
From: kruceter @ 2023-01-22  3:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2270 bytes --]

There is an updated pull request by kruceter against master on the void-packages repository

https://github.com/kruceter/void-packages redis
https://github.com/void-linux/void-packages/pull/41768

redis: update to 7.0.8.
The primary reason for updating this package is due to the following CVEs being found and fixed:

* [CVE-2022-35977](https://www.cvedetails.com/cve/CVE-2022-35977) (Integer overflow in the Redis SETRANGE and SORT/SORT_RO commands can drive Redis to OOM panic)

* [CVE-2023-22458](https://www.cvedetails.com/cve/CVE-2023-22458) (Integer overflow in the Redis HRANDFIELD and ZRANDMEMBER commands can lead to denial-of-service)

The rest is as follows:

* `jemalloc-devel` and `libatomic-devel` now are included conditionally.

* **antirez/redis** has been moved to **redis/redis88** (antirez stepped down in 2020 and handed over his work to his colleagues).

* `do_check` can be executed by setting `make_check_target` to `"test"`.

* `V=1` is retained in `make_build_args`; `MALLOC` is defined outside the removed `do_build` function.

* the `-ldl` flag in `use-system-jemalloc.patch` is no longer necessary since it is already defined in `src/Makefile`; see redis/redis@b7b9aa6d9bbed5a292f3e939bf0c5906bdf965ca

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/41768.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-redis-41768.patch --]
[-- Type: text/x-diff, Size: 3908 bytes --]

From d0ea1f5db08b117422386251fe719f320f022ae1 Mon Sep 17 00:00:00 2001
From: Krul Ceter <kruceter@proton.me>
Date: Sat, 21 Jan 2023 14:53:59 +0300
Subject: [PATCH] redis: update to 7.0.8.

The primary reason for updating this package is due to the following
CVEs being found and fixed:

* CVE-2022-35977 (Integer overflow in the Redis SETRANGE and
  SORT/SORT_RO commands can drive Redis to OOM panic)

* CVE-2023-22458 (Integer overflow in the Redis HRANDFIELD and
  ZRANDMEMBER commands can lead to denial-of-service)

The rest is as follows:

* jemalloc-devel and libatomic-devel now are included conditionally.

* antirez/redis has been moved to redis/redis (antirez stepped down in
  2020 and handed over his work to his colleagues).

* do_check can be executed by setting make_check_target to "test".

* V=1 is retained in make_build_args; MALLOC is defined outside the
  removed do_build function.

* the "-ldl" flag in use-system-jemalloc.patch is no longer necessary
  since it is already defined in src/Makefile; see
  redis/redis@b7b9aa6d9bbed5a292f3e939bf0c5906bdf965ca

* do_configure is renamed to post_patch as its contents fit the
  latter's purpose.
---
 .../redis/patches/use-system-jemalloc.patch   |  2 +-
 srcpkgs/redis/template                        | 36 +++++++++----------
 2 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/srcpkgs/redis/patches/use-system-jemalloc.patch b/srcpkgs/redis/patches/use-system-jemalloc.patch
index c32bcdd09255..e3b8e555b9fc 100644
--- a/srcpkgs/redis/patches/use-system-jemalloc.patch
+++ b/srcpkgs/redis/patches/use-system-jemalloc.patch
@@ -8,7 +8,7 @@
 -	FINAL_CFLAGS+= -DUSE_JEMALLOC -I../deps/jemalloc/include
 -	FINAL_LIBS := ../deps/jemalloc/lib/libjemalloc.a $(FINAL_LIBS)
 +	FINAL_CFLAGS+= -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE
-+	FINAL_LIBS+= -ljemalloc -ldl
++	FINAL_LIBS+= -ljemalloc
  endif
  
  REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS)
diff --git a/srcpkgs/redis/template b/srcpkgs/redis/template
index 110484cdb527..ff3be6c070ca 100644
--- a/srcpkgs/redis/template
+++ b/srcpkgs/redis/template
@@ -1,16 +1,18 @@
 # Template file for 'redis'
 pkgname=redis
-version=7.0.5
+version=7.0.8
 revision=1
-makedepends="jemalloc-devel libatomic-devel"
+build_style=gnu-makefile
+make_build_args="V=1"
+make_check_target="test"
 checkdepends="pkg-config procps-ng tcl-devel which"
 short_desc="Advanced key-value store"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="BSD-3-Clause"
 homepage="https://redis.io"
-changelog="https://raw.githubusercontent.com/antirez/redis/${version%.*}/00-RELEASENOTES"
-distfiles="http://download.redis.io/releases/${pkgname}-${version}.tar.gz"
-checksum=67054cc37b58c125df93bd78000261ec0ef4436a26b40f38262c780e56315cc3
+changelog="https://raw.githubusercontent.com/redis/redis/${version%.*}/00-RELEASENOTES"
+distfiles="http://download.redis.io/releases/redis-${version}.tar.gz"
+checksum=06a339e491306783dcf55b97f15a5dbcbdc01ccbde6dc23027c475cab735e914
 
 system_accounts="redis"
 redis_homedir="/var/lib/redis"
@@ -18,24 +20,22 @@ conf_files="/etc/redis/redis.conf"
 
 make_dirs="/var/lib/redis 0700 redis redis"
 
-do_configure() {
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+	make_build_args+=" MALLOC=libc"
+else
+	makedepends+=" jemalloc-devel"
+	make_build_args+=" MALLOC=jemalloc"
+fi
+
+post_patch() {
 	vsed -i \
 		-e "s|^# bind 127.0.0.1|bind 127.0.0.1|" \
 		-e "s|^dir .*|dir ${redis_homedir}|" \
 		-e "s|^pidfile .*|pidfile /run/redis/redis.pid|" redis.conf
-	vsed -i -e "s|^FINAL_LIBS=.*|& -latomic|" src/Makefile
-}
-
-do_build() {
-	case "$XBPS_TARGET_MACHINE" in
-		*-musl) _malloc="none";;
-		*) _malloc="jemalloc";;
-	esac
-	make CC=$CC CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" V=1 MALLOC=${_malloc} ${makejobs}
-}
 
-do_check() {
-	make test
+	if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+		vsed -i -e "s|^FINAL_LIBS=.*|& -latomic|" src/Makefile
+	fi
 }
 
 do_install() {

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

* Re: [PR PATCH] [Updated] redis: update to 7.0.8.
  2023-01-21 13:06 [PR PATCH] redis: update to 7.0.8 kruceter
                   ` (2 preceding siblings ...)
  2023-01-22  3:29 ` [PR PATCH] [Updated] " kruceter
@ 2023-01-22  3:39 ` kruceter
  2023-01-22 12:10 ` [PR PATCH] [Merged]: " leahneukirchen
  4 siblings, 0 replies; 6+ messages in thread
From: kruceter @ 2023-01-22  3:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2359 bytes --]

There is an updated pull request by kruceter against master on the void-packages repository

https://github.com/kruceter/void-packages redis
https://github.com/void-linux/void-packages/pull/41768

redis: update to 7.0.8.
The primary reason for updating this package is due to the following CVEs being found and fixed:

* [CVE-2022-35977](https://www.cvedetails.com/cve/CVE-2022-35977) (Integer overflow in the Redis SETRANGE and SORT/SORT_RO commands can drive Redis to OOM panic)

* [CVE-2023-22458](https://www.cvedetails.com/cve/CVE-2023-22458) (Integer overflow in the Redis HRANDFIELD and ZRANDMEMBER commands can lead to denial-of-service)

The rest is as follows:

* `jemalloc-devel` and `libatomic-devel` now are included conditionally.

* **antirez/redis** has been moved to **redis/redis88** (antirez stepped down in 2020 and handed over his work to his colleagues).

* `do_check` can be executed by setting `make_check_target` to `"test"`.

* `V=1` is retained in `make_build_args`; `MALLOC` is defined outside the removed `do_build` function.

* the `-ldl` flag in `use-system-jemalloc.patch` is no longer necessary since it is already defined in `src/Makefile`; see redis/redis@b7b9aa6d9bbed5a292f3e939bf0c5906bdf965ca

* `do_configure` is renamed to `post_patch` as its contents fit the latter's purpose.

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/41768.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-redis-41768.patch --]
[-- Type: text/x-diff, Size: 3988 bytes --]

From 2373e77abe33f07f9657351e61a961247b37b766 Mon Sep 17 00:00:00 2001
From: Krul Ceter <kruceter@proton.me>
Date: Sat, 21 Jan 2023 14:53:59 +0300
Subject: [PATCH] redis: update to 7.0.8.

The primary reason for updating this package is due to the following
CVEs being found and fixed:

* CVE-2022-35977 (Integer overflow in the Redis SETRANGE and
  SORT/SORT_RO commands can drive Redis to OOM panic)

* CVE-2023-22458 (Integer overflow in the Redis HRANDFIELD and
  ZRANDMEMBER commands can lead to denial-of-service)

The rest is as follows:

* jemalloc-devel and libatomic-devel now are included conditionally.

* antirez/redis has been moved to redis/redis (antirez stepped down in
  2020 and handed over his work to his colleagues).

* do_check can be executed by setting make_check_target to "test".

* V=1 is retained in make_build_args; MALLOC is defined outside the
  removed do_build function.

* the "-ldl" flag in use-system-jemalloc.patch is no longer necessary
  since it is already defined in src/Makefile; see
  redis/redis@b7b9aa6d9bbed5a292f3e939bf0c5906bdf965ca

* do_configure is renamed to post_patch as its contents fit the
  latter's purpose.
---
 .../redis/patches/use-system-jemalloc.patch   |  2 +-
 srcpkgs/redis/template                        | 40 ++++++++++---------
 2 files changed, 23 insertions(+), 19 deletions(-)

diff --git a/srcpkgs/redis/patches/use-system-jemalloc.patch b/srcpkgs/redis/patches/use-system-jemalloc.patch
index c32bcdd09255..e3b8e555b9fc 100644
--- a/srcpkgs/redis/patches/use-system-jemalloc.patch
+++ b/srcpkgs/redis/patches/use-system-jemalloc.patch
@@ -8,7 +8,7 @@
 -	FINAL_CFLAGS+= -DUSE_JEMALLOC -I../deps/jemalloc/include
 -	FINAL_LIBS := ../deps/jemalloc/lib/libjemalloc.a $(FINAL_LIBS)
 +	FINAL_CFLAGS+= -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE
-+	FINAL_LIBS+= -ljemalloc -ldl
++	FINAL_LIBS+= -ljemalloc
  endif
  
  REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS)
diff --git a/srcpkgs/redis/template b/srcpkgs/redis/template
index 110484cdb527..0cd5302a434c 100644
--- a/srcpkgs/redis/template
+++ b/srcpkgs/redis/template
@@ -1,16 +1,18 @@
 # Template file for 'redis'
 pkgname=redis
-version=7.0.5
+version=7.0.8
 revision=1
-makedepends="jemalloc-devel libatomic-devel"
+build_style=gnu-makefile
+make_build_args="V=1"
+make_check_target="test"
 checkdepends="pkg-config procps-ng tcl-devel which"
 short_desc="Advanced key-value store"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="BSD-3-Clause"
 homepage="https://redis.io"
-changelog="https://raw.githubusercontent.com/antirez/redis/${version%.*}/00-RELEASENOTES"
-distfiles="http://download.redis.io/releases/${pkgname}-${version}.tar.gz"
-checksum=67054cc37b58c125df93bd78000261ec0ef4436a26b40f38262c780e56315cc3
+changelog="https://raw.githubusercontent.com/redis/redis/${version%.*}/00-RELEASENOTES"
+distfiles="http://download.redis.io/releases/redis-${version}.tar.gz"
+checksum=06a339e491306783dcf55b97f15a5dbcbdc01ccbde6dc23027c475cab735e914
 
 system_accounts="redis"
 redis_homedir="/var/lib/redis"
@@ -18,24 +20,26 @@ conf_files="/etc/redis/redis.conf"
 
 make_dirs="/var/lib/redis 0700 redis redis"
 
-do_configure() {
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+	make_build_args+=" MALLOC=libc"
+else
+	makedepends+=" jemalloc-devel"
+	make_build_args+=" MALLOC=jemalloc"
+fi
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	makedepends+=" libatomic-devel"
+fi
+
+post_patch() {
 	vsed -i \
 		-e "s|^# bind 127.0.0.1|bind 127.0.0.1|" \
 		-e "s|^dir .*|dir ${redis_homedir}|" \
 		-e "s|^pidfile .*|pidfile /run/redis/redis.pid|" redis.conf
-	vsed -i -e "s|^FINAL_LIBS=.*|& -latomic|" src/Makefile
-}
-
-do_build() {
-	case "$XBPS_TARGET_MACHINE" in
-		*-musl) _malloc="none";;
-		*) _malloc="jemalloc";;
-	esac
-	make CC=$CC CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" V=1 MALLOC=${_malloc} ${makejobs}
-}
 
-do_check() {
-	make test
+	if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+		vsed -i -e "s|^FINAL_LIBS=.*|& -latomic|" src/Makefile
+	fi
 }
 
 do_install() {

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

* Re: [PR PATCH] [Merged]: redis: update to 7.0.8.
  2023-01-21 13:06 [PR PATCH] redis: update to 7.0.8 kruceter
                   ` (3 preceding siblings ...)
  2023-01-22  3:39 ` kruceter
@ 2023-01-22 12:10 ` leahneukirchen
  4 siblings, 0 replies; 6+ messages in thread
From: leahneukirchen @ 2023-01-22 12:10 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2203 bytes --]

There's a merged pull request on the void-packages repository

redis: update to 7.0.8.
https://github.com/void-linux/void-packages/pull/41768

Description:
The primary reason for updating this package is due to the following CVEs being found and fixed:

* [CVE-2022-35977](https://www.cvedetails.com/cve/CVE-2022-35977) (Integer overflow in the Redis SETRANGE and SORT/SORT_RO commands can drive Redis to OOM panic)

* [CVE-2023-22458](https://www.cvedetails.com/cve/CVE-2023-22458) (Integer overflow in the Redis HRANDFIELD and ZRANDMEMBER commands can lead to denial-of-service)

The rest is as follows:

* `jemalloc-devel` and `libatomic-devel` now are included conditionally.

* **antirez/redis** has been moved to **redis/redis88** (antirez stepped down in 2020 and handed over his work to his colleagues).

* `do_check` can be executed by setting `make_check_target` to `"test"`.

* `V=1` is retained in `make_build_args`; `MALLOC` is defined outside the removed `do_build` function.

* the `-ldl` flag in `use-system-jemalloc.patch` is no longer necessary since it is already defined in `src/Makefile`; see redis/redis@b7b9aa6d9bbed5a292f3e939bf0c5906bdf965ca

* `do_configure` is renamed to `post_patch` as its contents fit the latter's purpose.

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


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

end of thread, other threads:[~2023-01-22 12:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-21 13:06 [PR PATCH] redis: update to 7.0.8 kruceter
2023-01-21 19:42 ` [PR REVIEW] " ahesford
2023-01-21 19:42 ` ahesford
2023-01-22  3:29 ` [PR PATCH] [Updated] " kruceter
2023-01-22  3:39 ` kruceter
2023-01-22 12:10 ` [PR PATCH] [Merged]: " leahneukirchen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).