]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test/test-rpm-macros.sh: add build directory to pkg-config search path
authorRadoslav Kolev <radoslav.kolev@suse.com>
Tue, 14 May 2024 09:19:22 +0000 (12:19 +0300)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 15 May 2024 16:25:27 +0000 (18:25 +0200)
If tests are run during build time, without an already installed
systemd they fail to resolve the sysusersdir and tpmfilesdir pkg-config variables.

test/test-rpm-macros.sh

index c7107dec3ead1766127b2c11f6e5ff2e9e99eb4c..c9a45dc78362c31a238e6798c929582f3c544bbf 100755 (executable)
@@ -137,7 +137,7 @@ for i in sysusers tmpfiles; do
 
     PKG_DATA_FILE="$(mktemp "$WORK_DIR/pkg-data-XXX")"
     EXP_OUT="$(mktemp "$WORK_DIR/exp-out-XXX.log")"
-    CONF_DIR="$(pkg-config --variable="${i}dir" systemd)"
+    CONF_DIR="$(PKG_CONFIG_PATH="${BUILD_DIR}/src/core" pkg-config --variable="${i}dir" systemd)"
     EXTRA_ARGS=()
 
     if [[ "$i" == tmpfiles ]]; then