Skip to content

Commit 56e5548

Browse files
committed
macros: add %_cross_buildsrcdir
Twoliter mounts sources for the current workspace into the SDK build environment at `/home/builder/rpmbuild/BUILD/sources`, which packages can refer to via the %_builddir macro - e.g. "%{_builddir}/sources" - to avoid hard-coding assumptions about the SDK environment, such as the user account that executes the build. In RPM 4.20, the %_builddir macro now points to a package-specific directory rather than the top-level build directory, which breaks this approach. Define %_cross_buildsrcdir as a replacement for %_builddir which will always point to the path in the SDK where Twoliter mounts the sources from the current workspace. Signed-off-by: Ben Cressey <[email protected]>
1 parent 8c399bb commit 56e5548

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

macros/shared

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
%_cross_ldflags -Wl,-z,relro -Wl,-z,now -Wl,-Bsymbolic-functions
2424
%_cross_c_link_args '-Wl,-z,relro', '-Wl,-z,now', '-Wl,-Bsymbolic-functions'
2525

26+
%_cross_buildsrcdir %{_topdir}/BUILD/sources
2627
%_cross_bootdir /boot
2728
%_cross_bootconfigdir %{_cross_bootdir}/boot-config.d
2829
%_cross_lib lib

0 commit comments

Comments
 (0)