mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-07 23:53:51 +02:00
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@b7b9aa6d9b * do_configure is renamed to post_patch as its contents fit the latter's purpose.
This commit is contained in:
parent
7dadf95944
commit
5367bf2ae7
2 changed files with 23 additions and 19 deletions
|
@ -8,7 +8,7 @@
|
||||||
- FINAL_CFLAGS+= -DUSE_JEMALLOC -I../deps/jemalloc/include
|
- FINAL_CFLAGS+= -DUSE_JEMALLOC -I../deps/jemalloc/include
|
||||||
- FINAL_LIBS := ../deps/jemalloc/lib/libjemalloc.a $(FINAL_LIBS)
|
- FINAL_LIBS := ../deps/jemalloc/lib/libjemalloc.a $(FINAL_LIBS)
|
||||||
+ FINAL_CFLAGS+= -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE
|
+ FINAL_CFLAGS+= -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE
|
||||||
+ FINAL_LIBS+= -ljemalloc -ldl
|
+ FINAL_LIBS+= -ljemalloc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS)
|
REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS)
|
||||||
|
|
|
@ -1,16 +1,18 @@
|
||||||
# Template file for 'redis'
|
# Template file for 'redis'
|
||||||
pkgname=redis
|
pkgname=redis
|
||||||
version=7.0.5
|
version=7.0.8
|
||||||
revision=1
|
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"
|
checkdepends="pkg-config procps-ng tcl-devel which"
|
||||||
short_desc="Advanced key-value store"
|
short_desc="Advanced key-value store"
|
||||||
maintainer="Enno Boland <gottox@voidlinux.org>"
|
maintainer="Enno Boland <gottox@voidlinux.org>"
|
||||||
license="BSD-3-Clause"
|
license="BSD-3-Clause"
|
||||||
homepage="https://redis.io"
|
homepage="https://redis.io"
|
||||||
changelog="https://raw.githubusercontent.com/antirez/redis/${version%.*}/00-RELEASENOTES"
|
changelog="https://raw.githubusercontent.com/redis/redis/${version%.*}/00-RELEASENOTES"
|
||||||
distfiles="http://download.redis.io/releases/${pkgname}-${version}.tar.gz"
|
distfiles="http://download.redis.io/releases/redis-${version}.tar.gz"
|
||||||
checksum=67054cc37b58c125df93bd78000261ec0ef4436a26b40f38262c780e56315cc3
|
checksum=06a339e491306783dcf55b97f15a5dbcbdc01ccbde6dc23027c475cab735e914
|
||||||
|
|
||||||
system_accounts="redis"
|
system_accounts="redis"
|
||||||
redis_homedir="/var/lib/redis"
|
redis_homedir="/var/lib/redis"
|
||||||
|
@ -18,24 +20,26 @@ conf_files="/etc/redis/redis.conf"
|
||||||
|
|
||||||
make_dirs="/var/lib/redis 0700 redis redis"
|
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 \
|
vsed -i \
|
||||||
-e "s|^# bind 127.0.0.1|bind 127.0.0.1|" \
|
-e "s|^# bind 127.0.0.1|bind 127.0.0.1|" \
|
||||||
-e "s|^dir .*|dir ${redis_homedir}|" \
|
-e "s|^dir .*|dir ${redis_homedir}|" \
|
||||||
-e "s|^pidfile .*|pidfile /run/redis/redis.pid|" redis.conf
|
-e "s|^pidfile .*|pidfile /run/redis/redis.pid|" redis.conf
|
||||||
|
|
||||||
|
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
|
||||||
vsed -i -e "s|^FINAL_LIBS=.*|& -latomic|" src/Makefile
|
vsed -i -e "s|^FINAL_LIBS=.*|& -latomic|" src/Makefile
|
||||||
}
|
fi
|
||||||
|
|
||||||
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
|
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue