diff mbox series

[meta-oe] redis: fix the install prefix

Message ID 20260825200515.1831303-1-ricardo.salveti@oss.qualcomm.com
State New
Headers show
Series [meta-oe] redis: fix the install prefix | expand

Commit Message

Ricardo Salveti Aug. 25, 2026, 8:05 p.m. UTC
redis 8.10.0 added "deploy: PREFIX ?= /usr/local" to the top level
Makefile. Assigning PREFIX there, even for an unrelated target, clears
the export flag it inherited from the environment, so recipe shells no
longer see it. As the install target recurses with "$(MAKE) -C src
install" from a recipe shell, the sub-make falls back to src/Makefile's
"PREFIX?=/usr/local" and installs outside ${D}:

  install: cannot create regular file '/usr/local/bin/redis-server': Permission denied
  make[1]: *** [Makefile:576: install] Error 1

Releases up to 8.8.1 had no PREFIX assignment there, so the exported
value propagated. Pass PREFIX on the make command line instead, which
is propagated to sub-makes.

AI-Generated: Uses Claude Code
Signed-off-by: Ricardo Salveti <ricardo.salveti@oss.qualcomm.com>
---
 meta-oe/recipes-extended/redis/redis_8.10.1.bb | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/meta-oe/recipes-extended/redis/redis_8.10.1.bb b/meta-oe/recipes-extended/redis/redis_8.10.1.bb
index 7c017e9579..d0220d228b 100644
--- a/meta-oe/recipes-extended/redis/redis_8.10.1.bb
+++ b/meta-oe/recipes-extended/redis/redis_8.10.1.bb
@@ -65,8 +65,7 @@  do_compile() {
 }
 
 do_install() {
-    export PREFIX=${D}/${prefix}
-    oe_runmake install
+    oe_runmake install PREFIX=${D}${prefix}
     install -d ${D}/${sysconfdir}/redis
     install -m 0644 ${UNPACKDIR}/redis.conf ${D}/${sysconfdir}/redis/redis.conf
     install -d ${D}/${sysconfdir}/init.d