diff options
author | Tomas Korbar <tkorbar@redhat.com> | 2023-01-26 11:19:46 +0100 |
---|---|---|
committer | Michal Domonkos <mdomonko@redhat.com> | 2023-03-13 15:32:25 +0100 |
commit | 540e178782c884f2307324c73e0259fe4226dee3 (patch) | |
tree | 9588c5dff58bff8cb0267cf34e07024d5631253e | |
parent | 64a81370faa561d673cacc42a707001c990e4fff (diff) | |
download | rpm-540e178782c884f2307324c73e0259fe4226dee3.tar.gz |
Split ___build_pre macro to make mocking rpm build environment easier
New macro ___build_package_notes_env contains environment variables
that package-notes depends on. This allows easier mocking of rpm
build environment and isolated execution of check phase of rpm
packages possible.
(cherry picked from commit a3889fe5b96812c0dd787317cbc9f1ecda917995)
-rw-r--r-- | macros.in | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -723,7 +723,7 @@ package or when debugging this package.\ %___build_shell %{?_buildshell:%{_buildshell}}%{!?_buildshell:/bin/sh} %___build_args -e %___build_cmd %{?_sudo:%{_sudo} }%{?_remsh:%{_remsh} %{_remhost} }%{?_remsudo:%{_remsudo} }%{?_remchroot:%{_remchroot} %{_remroot} }%{___build_shell} %{___build_args} -%___build_pre \ +%___build_pre_env \ RPM_SOURCE_DIR=\"%{_sourcedir}\"\ RPM_BUILD_DIR=\"%{_builddir}\"\ RPM_OPT_FLAGS=\"%{optflags}\"\ @@ -745,8 +745,10 @@ package or when debugging this package.\ %{?_javaclasspath:CLASSPATH=\"%{_javaclasspath}\"\ export CLASSPATH}\ PKG_CONFIG_PATH=\"${PKG_CONFIG_PATH}:%{_libdir}/pkgconfig:%{_datadir}/pkgconfig\"\ - export PKG_CONFIG_PATH\ - \ + export PKG_CONFIG_PATH + +%___build_pre \ + %{___build_pre_env} \ %[%{verbose}?"set -x":""]\ umask 022\ cd \"%{_builddir}\"\ |