Skip to content

Commit ae9d806

Browse files
Artemiy Romanovrpurdie
authored andcommitted
rpm: fix redudant slash remove and add extra cmake flag
do_install:append() formats paths using sed in macro files incorrectly causing resulting paths to have format 'usr/*' instead of '/usr/*'. Absence of debugedit in build-time depends results in incorrect expansion of '%__find_debuginfo' in usr/lib/rpm/macro file which looks like this: %__find_debuginfo __FIND_DEBUGINFO-NOTFOUND Adding debugedit-native in DEPENDS affects performance, so better solution is passing extra argument to cmake build call via EXTRA_OECMAKE variable which fixes the problem: %__find_debuginfo /usr/bin/find-debuginfo Signed-off-by: Artemiy Romanov <artemiy.romanov@yadro.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
1 parent 64f99eb commit ae9d806

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

meta/recipes-devtools/rpm/rpm_4.20.0.bb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ EXTRA_OECMAKE:append:libc-musl = " -DENABLE_NLS=OFF -DENABLE_OPENMP=OFF"
5757
EXTRA_OECMAKE:append:class-native = " -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/var"
5858
EXTRA_OECMAKE:append:class-nativesdk = " -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc -DCMAKE_INSTALL_FULL_SYSCONFDIR=/etc"
5959

60+
EXTRA_OECMAKE:append = " -D__FIND_DEBUGINFO=${bindir}/find-debuginfo"
61+
6062
inherit cmake gettext pkgconfig python3targetconfig
6163
OECMAKE_GENERATOR = "Unix Makefiles"
6264

@@ -131,10 +133,10 @@ do_install:append:class-nativesdk() {
131133
}
132134

133135
do_install:append () {
134-
sed -i -e 's:${HOSTTOOLS_DIR}/::g' \
135-
-e 's:${STAGING_DIR_NATIVE}/::g' \
136+
sed -i -e 's:${HOSTTOOLS_DIR}::g' \
137+
-e 's:${STAGING_DIR_NATIVE}::g' \
136138
${D}/${libdir}/rpm/macros
137-
sed -i -e 's:${RECIPE_SYSROOT}/::g' \
139+
sed -i -e 's:${RECIPE_SYSROOT}::g' \
138140
${D}/${libdir}/cmake/rpm/rpm-targets.cmake
139141

140142
}

0 commit comments

Comments
 (0)