redis: use the files path correctly
PATCH 1/1 redis: use the files path correctly
From: Chen Qi <[email protected]>
Recipes are not expected to set FILESPATH directly, they are expected to use FILESEXTRAPATH.
I can see the seting of FILESPATH in this recipe only wants to find redis-7 specific patches and files. This could be easily achieved by using redis-7.0.11/ directory to hold all those files.
---
.../0001-src-Do-not-reset-FINAL_LIBS.patch | 0
.../0006-Define-correct-gregs-for-RISCV32.patch | 0
.../redis/{redis-7 => redis-7.0.11}/GNU_SOURCE-7.patch | 0
.../hiredis-use-default-CC-if-it-is-set.patch | 0
.../redis/{redis-7 => redis-7.0.11}/init-redis-server | 0
.../lua-update-Makefile-to-use-environment-build-setting.patch | 0
.../redis/{redis-7 => redis-7.0.11}/oe-use-libc-malloc.patch | 0
.../recipes-extended/redis/{redis-7 => redis-7.0.11}/redis.conf | 0
.../redis/{redis-7 => redis-7.0.11}/redis.service | 0
meta-oe/recipes-extended/redis/redis_7.0.11.bb | 2 --
10 files changed, 2 deletions(-)
rename meta-oe/recipes-extended/redis/{redis-7 => redis-7.0.11}/0001-src-Do-not-reset-FINAL_LIBS.patch (100%)
rename meta-oe/recipes-extended/redis/{redis-7 => redis-7.0.11}/0006-Define-correct-gregs-for-RISCV32.patch (100%)
rename meta-oe/recipes-extended/redis/{redis-7 => redis-7.0.11}/GNU_SOURCE-7.patch (100%)
rename meta-oe/recipes-extended/redis/{redis-7 => redis-7.0.11}/hiredis-use-default-CC-if-it-is-set.patch (100%)
rename meta-oe/recipes-extended/redis/{redis-7 => redis-7.0.11}/init-redis-server (100%)
rename meta-oe/recipes-extended/redis/{redis-7 => redis-7.0.11}/lua-update-Makefile-to-use-environment-build-setting.patch (100%)
rename meta-oe/recipes-extended/redis/{redis-7 => redis-7.0.11}/oe-use-libc-malloc.patch (100%)
rename meta-oe/recipes-extended/redis/{redis-7 => redis-7.0.11}/redis.conf (100%)
rename meta-oe/recipes-extended/redis/{redis-7 => redis-7.0.11}/redis.service (100%)meta-oe/recipes-extended/redis/redis-7.0.11/0001-src-Do-not-reset-FINAL_LIBS.patch renamed from meta-oe/recipes-extended/redis/redis-7/0001-src-Do-not-reset-FINAL_LIBS.patch +0 -0
meta-oe/recipes-extended/redis/redis-7.0.11/0006-Define-correct-gregs-for-RISCV32.patch renamed from meta-oe/recipes-extended/redis/redis-7/0006-Define-correct-gregs-for-RISCV32.patch +0 -0
meta-oe/recipes-extended/redis/redis-7.0.11/GNU_SOURCE-7.patch renamed from meta-oe/recipes-extended/redis/redis-7/GNU_SOURCE-7.patch +0 -0
meta-oe/recipes-extended/redis/redis-7.0.11/hiredis-use-default-CC-if-it-is-set.patch renamed from meta-oe/recipes-extended/redis/redis-7/hiredis-use-default-CC-if-it-is-set.patch +0 -0
meta-oe/recipes-extended/redis/redis-7.0.11/init-redis-server renamed from meta-oe/recipes-extended/redis/redis-7/init-redis-server +0 -0
meta-oe/recipes-extended/redis/redis-7.0.11/lua-update-Makefile-to-use-environment-build-setting.patch renamed from meta-oe/recipes-extended/redis/redis-7/lua-update-Makefile-to-use-environment-build-setting.patch +0 -0
meta-oe/recipes-extended/redis/redis-7.0.11/oe-use-libc-malloc.patch renamed from meta-oe/recipes-extended/redis/redis-7/oe-use-libc-malloc.patch +0 -0
meta-oe/recipes-extended/redis/redis-7.0.11/redis.conf renamed from meta-oe/recipes-extended/redis/redis-7/redis.conf +0 -0
meta-oe/recipes-extended/redis/redis-7.0.11/redis.service renamed from meta-oe/recipes-extended/redis/redis-7/redis.service +0 -0
meta-oe/recipes-extended/redis/redis_7.0.11.bb +0 -2
@@ -6,8 +6,6 @@ LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=8ffdd6c926faaece928cf9d9640132d2" DEPENDS = "readline lua ncurses" -FILESPATH =. "${FILE_DIRNAME}/${BPN}-7:" - SRC_URI = "http://download.redis.io/releases/${BP}.tar.gz \ file://redis.conf \ file://init-redis-server \
Signature · 1 line
2.40.0
Quoted 10 lines · Chen Qi via lists.openembedded.org
From: Chen Qi <[email protected]>
Recipes are not expected to set FILESPATH directly, they are expected to use FILESEXTRAPATH.
I can see the seting of FILESPATH in this recipe only wants to find redis-7 specific patches and files. This could be easily achieved by using redis-7.0.11/ directory to hold all those files.
What's the issue with this, yes it's a bit uncommon but since:
https://git.openembedded.org/meta-openembedded/commit/?h=kirkstone&id=3deca451692e99d269812959e6b5e0b519a82f30
which correctly uses BPN in FILESPATH I don't see any patching issues with redis in my world builds. Before it was failing in multilib builds because it was searching in lib32-redis-7 directory and when not found there it used GNU_SOURCE.patch from the other directory and failed with patch-fuzz.
If you still want to go ahead with this then you can also
undo GNU_SOURCE.patch to GNU_SOURCE-7.patch rename (which is IMHO the only file which isn't unnecessary duplicated between redis-6 and redis-7.
Hi Martin,
Sorry I didn’t put enough explanation in the commit.
Using FILESPATH in this way removes the possibility of overriding some files (e.g., the redis service file) from other layers via FILESEXTRAPATH:prepend, which is kind of a common practice and is actually working for basically all other recipes.
Because we have:
meta/classes-global/base.bbclass:FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${BP}", "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files"], d)}" And FILESEXTRAPATH is handled in base_set_filespath.
The issue is not about multilib. And undoing the GNU_SOURCE patch is not necessary, because it does not change any output.
Regards,
Qi
From: Martin Jansa <[email protected]>
Sent: Tuesday, June 13, 2023 5:28 PM
To: Chen, Qi <[email protected]>
Cc: [email protected]
Subject: Re: [oe][meta-oe][master][mickledore][langdale][kirkstone][PATCH] redis: use the files path correctly
On Tue, Jun 13, 2023 at 9:23 AM Chen Qi via lists.openembedded.org<https://urldefense.com/v3/__http:/lists.openembedded.org__;!!AjveYdw8EvQ!dAF2fW0oHh2Z5vsexUKQehAWQ2GlwvfpgVWBV5LzXf4GUqD1fVHhhnT-TFPqz477ae1kW6Fhjx9z63m6cTvw92E$> <[email protected]<mailto:[email protected]>> wrote:
From: Chen Qi <[email protected]<mailto:[email protected]>>
Recipes are not expected to set FILESPATH directly, they are expected to use FILESEXTRAPATH.
I can see the seting of FILESPATH in this recipe only wants to find redis-7 specific patches and files. This could be easily achieved by using redis-7.0.11/ directory to hold all those files.
What's the issue with this, yes it's a bit uncommon but since:
https://git.openembedded.org/meta-openembedded/commit/?h=kirkstone&id=3deca451692e99d269812959e6b5e0b519a82f30<https://urldefense.com/v3/__https:/git.openembedded.org/meta-openembedded/commit/?h=kirkstone&id=3deca451692e99d269812959e6b5e0b519a82f30__;!!AjveYdw8EvQ!dAF2fW0oHh2Z5vsexUKQehAWQ2GlwvfpgVWBV5LzXf4GUqD1fVHhhnT-TFPqz477ae1kW6Fhjx9z63m6eVSS-FI$>
which correctly uses BPN in FILESPATH I don't see any patching issues with redis in my world builds. Before it was failing in multilib builds because it was searching in lib32-redis-7 directory and when not found there it used GNU_SOURCE.patch from the other directory and failed with patch-fuzz.
If you still want to go ahead with this then you can also undo GNU_SOURCE.patch to GNU_SOURCE-7.patch rename (which is IMHO the only file which isn't unnecessary duplicated between redis-6 and redis-7.
A message that is not in the archive (sent off-list or not yet received): [email protected]
V2 sent with commit message updated. Sorry for the confusion.
Regards,
Qi
From: [email protected] <[email protected]> On Behalf Of Chen Qi via lists.openembedded.org
Sent: Tuesday, June 13, 2023 5:42 PM
To: Martin Jansa <[email protected]>
Cc: [email protected]
Subject: Re: [oe][meta-oe][master][mickledore][langdale][kirkstone][PATCH] redis: use the files path correctly
Hi Martin,
Sorry I didn’t put enough explanation in the commit.
Using FILESPATH in this way removes the possibility of overriding some files (e.g., the redis service file) from other layers via FILESEXTRAPATH:prepend, which is kind of a common practice and is actually working for basically all other recipes.
Because we have:
meta/classes-global/base.bbclass:FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${BP}", "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files"], d)}" And FILESEXTRAPATH is handled in base_set_filespath.
The issue is not about multilib. And undoing the GNU_SOURCE patch is not necessary, because it does not change any output.
Regards,
Qi
From: Martin Jansa <[email protected]<mailto:[email protected]>>
Sent: Tuesday, June 13, 2023 5:28 PM
To: Chen, Qi <[email protected]<mailto:[email protected]>>
Cc: [email protected]<mailto:[email protected]>
Subject: Re: [oe][meta-oe][master][mickledore][langdale][kirkstone][PATCH] redis: use the files path correctly
On Tue, Jun 13, 2023 at 9:23 AM Chen Qi via lists.openembedded.org<https://urldefense.com/v3/__http:/lists.openembedded.org__;!!AjveYdw8EvQ!dAF2fW0oHh2Z5vsexUKQehAWQ2GlwvfpgVWBV5LzXf4GUqD1fVHhhnT-TFPqz477ae1kW6Fhjx9z63m6cTvw92E$> <[email protected]<mailto:[email protected]>> wrote:
From: Chen Qi <[email protected]<mailto:[email protected]>>
Recipes are not expected to set FILESPATH directly, they are expected to use FILESEXTRAPATH.
I can see the seting of FILESPATH in this recipe only wants to find redis-7 specific patches and files. This could be easily achieved by using redis-7.0.11/ directory to hold all those files.
What's the issue with this, yes it's a bit uncommon but since:
https://git.openembedded.org/meta-openembedded/commit/?h=kirkstone&id=3deca451692e99d269812959e6b5e0b519a82f30<https://urldefense.com/v3/__https:/git.openembedded.org/meta-openembedded/commit/?h=kirkstone&id=3deca451692e99d269812959e6b5e0b519a82f30__;!!AjveYdw8EvQ!dAF2fW0oHh2Z5vsexUKQehAWQ2GlwvfpgVWBV5LzXf4GUqD1fVHhhnT-TFPqz477ae1kW6Fhjx9z63m6eVSS-FI$>
which correctly uses BPN in FILESPATH I don't see any patching issues with redis in my world builds. Before it was failing in multilib builds because it was searching in lib32-redis-7 directory and when not found there it used GNU_SOURCE.patch from the other directory and failed with patch-fuzz.
If you still want to go ahead with this then you can also undo GNU_SOURCE.patch to GNU_SOURCE-7.patch rename (which is IMHO the only file which isn't unnecessary duplicated between redis-6 and redis-7.