summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/redis/redis_8.0.6.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-extended/redis/redis_8.0.6.bb')
-rw-r--r--meta-oe/recipes-extended/redis/redis_8.0.6.bb83
1 files changed, 83 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/redis/redis_8.0.6.bb b/meta-oe/recipes-extended/redis/redis_8.0.6.bb
new file mode 100644
index 0000000000..f6866747eb
--- /dev/null
+++ b/meta-oe/recipes-extended/redis/redis_8.0.6.bb
@@ -0,0 +1,83 @@
1SUMMARY = "Redis key-value store"
2DESCRIPTION = "Redis is an open source, advanced key-value store."
3HOMEPAGE = "http://redis.io"
4SECTION = "libs"
5LICENSE = "RSAL-2 | AGPL-3.0-only | SSPL-1"
6LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=9f1da87999fb281d8a9e3e3b2d0403b4"
7DEPENDS = "readline lua ncurses"
8
9SRC_URI = "http://download.redis.io/releases/${BP}.tar.gz \
10 file://redis.conf \
11 file://init-redis-server \
12 file://redis.service \
13 file://0001-hiredis-use-default-CC-if-it-is-set.patch \
14 file://0002-lua-update-Makefile-to-use-environment-build-setting.patch \
15 file://0003-hack-to-force-use-of-libc-malloc.patch \
16 file://0004-src-Do-not-reset-FINAL_LIBS.patch \
17 file://0005-Define-_GNU_SOURCE-to-get-PTHREAD_MUTEX_INITIALIZER.patch \
18 "
19SRC_URI[sha256sum] = "6d0a9913887a4972536f9da226f1575859c34d86354129163260a5f9c6bd4229"
20
21RPROVIDES:${PN} = "virtual-redis"
22
23CVE_STATUS[CVE-2025-46686] = "disputed: upstream rejected because mitigating it would affect other functionality"
24
25inherit pkgconfig update-rc.d systemd useradd
26
27FINAL_LIBS:x86:toolchain-clang = "-latomic"
28FINAL_LIBS:riscv32 = "-latomic"
29FINAL_LIBS:mips = "-latomic"
30FINAL_LIBS:arm = "-latomic"
31FINAL_LIBS:powerpc = "-latomic"
32
33export FINAL_LIBS
34
35USERADD_PACKAGES = "${PN}"
36USERADD_PARAM:${PN} = "--system --home-dir /var/lib/redis -g redis --shell /bin/false redis"
37GROUPADD_PARAM:${PN} = "--system redis"
38
39PACKAGECONFIG = "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
40PACKAGECONFIG[systemd] = "USE_SYSTEMD=yes,USE_SYSTEMD=no,systemd"
41
42EXTRA_OEMAKE += "${PACKAGECONFIG_CONFARGS}"
43
44TARGET_LDFLAGS:append = " ${DEBUG_PREFIX_MAP}"
45
46do_compile:prepend() {
47 oe_runmake -C deps hdr_histogram fpconv hiredis lua linenoise
48}
49
50do_install() {
51 export PREFIX=${D}/${prefix}
52 oe_runmake install
53 install -d ${D}/${sysconfdir}/redis
54 install -m 0644 ${UNPACKDIR}/redis.conf ${D}/${sysconfdir}/redis/redis.conf
55 install -d ${D}/${sysconfdir}/init.d
56 install -m 0755 ${UNPACKDIR}/init-redis-server ${D}/${sysconfdir}/init.d/redis-server
57 install -d ${D}/var/lib/redis/
58 chown redis.redis ${D}/var/lib/redis/
59
60 install -d ${D}${systemd_system_unitdir}
61 install -m 0644 ${UNPACKDIR}/redis.service ${D}${systemd_system_unitdir}
62 sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${systemd_system_unitdir}/redis.service
63
64 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
65 sed -i 's!daemonize yes!# daemonize yes!' ${D}/${sysconfdir}/redis/redis.conf
66 sed -i 's!supervised no!supervised systemd!' ${D}/${sysconfdir}/redis/redis.conf
67 fi
68}
69
70CONFFILES:${PN} = "${sysconfdir}/redis/redis.conf"
71
72INITSCRIPT_NAME = "redis-server"
73INITSCRIPT_PARAMS = "defaults 87"
74
75SYSTEMD_SERVICE:${PN} = "redis.service"
76
77CVE_STATUS[CVE-2022-3734] = "not-applicable-platform: CVE only applies for Windows."
78# The vulnerability originates from Debian's packaging methodology,
79# which loads system-wide Lua libraries (lua-cjson, lua-cmsgpack),
80# enabling Lua sandbox escape. Upstream Redis builds, including
81# those built by Yocto/OpenEmbedded, utilize embedded Lua from the
82# deps/ directory and are therefore not affected by this issue.
83CVE_STATUS[CVE-2022-0543] = "not-applicable-config: Debian-specific packaging issue caused by loading system-wide Lua libraries; upstream builds use embedded Lua and are not affected"