summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2023-06-19 00:41:10 -0700
committerSteve Sakoman <steve@sakoman.com>2023-07-07 04:30:26 -1000
commit2ed4fd70e4520de0289ef2155ce7b4920dbca0f3 (patch)
tree8639a1228419d1767f6c1e6f93323eb9efd2969d
parente5a8c83db2e5099d83ce2880f42892554baf0a7f (diff)
downloadpoky-2ed4fd70e4520de0289ef2155ce7b4920dbca0f3.tar.gz
rpm: write macros under libdir
If we create a macros file under etc/, the populate_sdk task would fail if 'package-management' is in SDKIMAGE_FEATURES and nativesdk-rpm-build is installed.. The error message is like below: unable to place /.../sdk/image/etc/rpm in final SDK location This is because it's trying to move the etc/rpm dictory into the host sysroot but the <host_sysroot>/etc/rpm has already exists. To solve this problem, avoid creating /etc/rpm/macros for nativesdk-rpm-build, use ${libdir}/macros instead. In this way, the macros file is hold in nativesdk-rpm. As nativesdk-rpm-build depends on nativesdk-rpm, the 'rpmbuild' command inside SDK can still correctly find find-debuginfo binary. (From OE-Core rev: 2a13a671910cad68ab962ce369b9ed60a9bf7eea) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 5fde0eadf16d34d88a599009013913fe55d89283) Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/recipes-devtools/rpm/rpm_4.18.1.bb5
1 files changed, 2 insertions, 3 deletions
diff --git a/meta/recipes-devtools/rpm/rpm_4.18.1.bb b/meta/recipes-devtools/rpm/rpm_4.18.1.bb
index 6da2edddf3..83537d4761 100644
--- a/meta/recipes-devtools/rpm/rpm_4.18.1.bb
+++ b/meta/recipes-devtools/rpm/rpm_4.18.1.bb
@@ -134,8 +134,8 @@ do_install:append:class-target() {
134do_install:append:class-nativesdk() { 134do_install:append:class-nativesdk() {
135 rm -rf ${D}${SDKPATHNATIVE}/var 135 rm -rf ${D}${SDKPATHNATIVE}/var
136 # Ensure find-debuginfo is located correctly inside SDK 136 # Ensure find-debuginfo is located correctly inside SDK
137 mkdir -p ${D}${SDKPATHNATIVE}/etc/rpm 137 mkdir -p ${D}${libdir}/rpm
138 echo "%__find_debuginfo ${SDKPATHNATIVE}/usr/bin/find-debuginfo" >> ${D}${SDKPATHNATIVE}/etc/rpm/macros 138 echo "%__find_debuginfo ${SDKPATHNATIVE}/usr/bin/find-debuginfo" >> ${D}${libdir}/rpm/macros
139} 139}
140 140
141do_install:append () { 141do_install:append () {
@@ -173,7 +173,6 @@ FILES:${PN}-build = "\
173 ${libdir}/rpm/macros.p* \ 173 ${libdir}/rpm/macros.p* \
174 ${libdir}/rpm/fileattrs/* \ 174 ${libdir}/rpm/fileattrs/* \
175" 175"
176FILES:${PN}-build:append:class-nativesdk = " ${SDKPATHNATIVE}/etc/rpm/macros"
177 176
178FILES:${PN}-sign = "\ 177FILES:${PN}-sign = "\
179 ${bindir}/rpmsign \ 178 ${bindir}/rpmsign \