diff options
-rw-r--r-- | meta/recipes-devtools/rpm/files/0001-CMakeLists.txt-set-libdir-to-CMAKE_INSTALL_FULL_LIBD.patch | 53 | ||||
-rw-r--r-- | meta/recipes-devtools/rpm/rpm_4.19.1.1.bb | 1 |
2 files changed, 54 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rpm/files/0001-CMakeLists.txt-set-libdir-to-CMAKE_INSTALL_FULL_LIBD.patch b/meta/recipes-devtools/rpm/files/0001-CMakeLists.txt-set-libdir-to-CMAKE_INSTALL_FULL_LIBD.patch new file mode 100644 index 0000000000..1bd83e7bef --- /dev/null +++ b/meta/recipes-devtools/rpm/files/0001-CMakeLists.txt-set-libdir-to-CMAKE_INSTALL_FULL_LIBD.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | From fea9cea49aa0844de14126e54d05b91ba619427f Mon Sep 17 00:00:00 2001 | ||
2 | From: Yi Zhao <yi.zhao@windriver.com> | ||
3 | Date: Fri, 26 Jul 2024 17:18:30 +0800 | ||
4 | Subject: [PATCH] CMakeLists.txt: set libdir to ${CMAKE_INSTALL_FULL_LIBDIR} in | ||
5 | macros | ||
6 | |||
7 | There is a patch in oe-core[1] to avoid hardcoded paths in macros. It | ||
8 | tries to use libdir to expand %_libdir in macros.in. However, in | ||
9 | upstream commit[2], libdir for macros in CMakeLists.txt is set to | ||
10 | ${prefix}/=LIB=, which causes %_libdir to expand to ${prefix}/=LIB= | ||
11 | instead of the correct path in the final macros. | ||
12 | |||
13 | On target: | ||
14 | $ rpm --showrc | grep _libdir | ||
15 | [snip] | ||
16 | -13: _libdir ${prefix}/=LIB= | ||
17 | [snip] | ||
18 | |||
19 | This also causes %__pkgconfig_path in fileattrs/pkgconfig.attr to become | ||
20 | an invalid regular expression when building rpm packages. This results a | ||
21 | warning in log.do_package_write_rpm in all packages: | ||
22 | |||
23 | Warning: Ignoring invalid regular expression ^((${prefix}/=LIB=|usr/share)/pkgconfig/.*.pc|usr/bin/pkg-config)$ | ||
24 | |||
25 | Set libdir to ${CMAKE_INSTALL_FULL_LIBDIR} instead of ${prefix}/=LIB= to | ||
26 | make sure it is expanded to the correct path in macros. | ||
27 | |||
28 | [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 | ||
29 | [2] https://github.com/rpm-software-management/rpm/commit/d2abb7a48760418aacd7f17c8b64e39c25ca50c9 | ||
30 | |||
31 | Upstream-Status: Inappropriate [oe specific] | ||
32 | |||
33 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
34 | --- | ||
35 | CMakeLists.txt | 2 +- | ||
36 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
37 | |||
38 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
39 | index ed847c09a1..385b5040c6 100644 | ||
40 | --- a/CMakeLists.txt | ||
41 | +++ b/CMakeLists.txt | ||
42 | @@ -84,7 +84,7 @@ function(makemacros) | ||
43 | set(sysconfdir "${CMAKE_INSTALL_FULL_SYSCONFDIR}") | ||
44 | set(sharedstatedir "${CMAKE_INSTALL_FULL_SHAREDSTATEDIR}") | ||
45 | set(localstatedir "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}") | ||
46 | - set(libdir "\${prefix}/=LIB=") | ||
47 | + set(libdir "${CMAKE_INSTALL_FULL_LIBDIR}") | ||
48 | set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}") | ||
49 | set(oldincludedir "${CMAKE_INSTALL_FULL_OLDINCLUDEDIR}") | ||
50 | set(infodir "\${prefix}/${CMAKE_INSTALL_INFODIR}") | ||
51 | -- | ||
52 | 2.25.1 | ||
53 | |||
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" |