diff options
author | Yi Zhao <yi.zhao@eng.windriver.com> | 2024-07-26 19:00:10 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-08-06 11:33:58 +0100 |
commit | db87ca070c5a4790dcdb9601bcb35037603f6d7f (patch) | |
tree | cabe577c4f8dab03e57e96e1504a346d86063d2c /meta/recipes-devtools/rpm/rpm_4.19.1.1.bb | |
parent | 24cccdbe28d49752b5a7bf304040156b97861d16 (diff) | |
download | poky-db87ca070c5a4790dcdb9601bcb35037603f6d7f.tar.gz |
rpm: fix expansion of %_libdir in macros
There is a patch in oe-core[1] to avoid hardcoded paths in macros. It
tries to use libdir to expand %_libdir in macros.in. However, in
upstream commit[2], libdir for macros in CMakeLists.txt is set to
${prefix}/=LIB=, which causes %_libdir to expand to ${prefix}/=LIB=
instead of the correct path in the final macros.
On target:
$ rpm --showrc | grep _libdir
[snip]
-13: _libdir ${prefix}/=LIB=
[snip]
This also causes %__pkgconfig_path in fileattrs/pkgconfig.attr to become
an invalid regular expression when building rpm packages. This results a
warning in log.do_package_write_rpm in all packages:
Warning: Ignoring invalid regular expression ^((${prefix}/=LIB=|usr/share)/pkgconfig/.*.pc|usr/bin/pkg-config)$
Set libdir to ${CMAKE_INSTALL_FULL_LIBDIR} instead of ${prefix}/=LIB= to
make sure it is expanded to the correct path in macros.
After the patch:
On target:
$ rpm --showrc | grep _libdir
[snip]
-13: _libdir /usr/lib
[snip]
[1] https://git.openembedded.org/openembedded-core/tree/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
[2] https://github.com/rpm-software-management/rpm/commit/d2abb7a48760418aacd7f17c8b64e39c25ca50c9
(From OE-Core rev: ae0e217145f45d065124aeb0a7d72a0c25f621ef)
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/rpm/rpm_4.19.1.1.bb')
-rw-r--r-- | meta/recipes-devtools/rpm/rpm_4.19.1.1.bb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rpm/rpm_4.19.1.1.bb b/meta/recipes-devtools/rpm/rpm_4.19.1.1.bb index 0802f26295..9330323797 100644 --- a/meta/recipes-devtools/rpm/rpm_4.19.1.1.bb +++ b/meta/recipes-devtools/rpm/rpm_4.19.1.1.bb | |||
@@ -38,6 +38,7 @@ SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.19.x;protoc | |||
38 | file://0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch \ | 38 | file://0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch \ |
39 | file://0001-CMakeLists.txt-look-for-lua-with-pkg-config-rather-t.patch \ | 39 | file://0001-CMakeLists.txt-look-for-lua-with-pkg-config-rather-t.patch \ |
40 | file://0002-rpmio-rpmglob.c-avoid-using-GLOB_BRACE-if-undefined-.patch \ | 40 | file://0002-rpmio-rpmglob.c-avoid-using-GLOB_BRACE-if-undefined-.patch \ |
41 | file://0001-CMakeLists.txt-set-libdir-to-CMAKE_INSTALL_FULL_LIBD.patch \ | ||
41 | " | 42 | " |
42 | 43 | ||
43 | PE = "1" | 44 | PE = "1" |