From a6a26831d12b1fe240f971dda18869dce9caa008 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Tue, 15 Aug 2017 13:52:01 +0200 Subject: [PATCH] Evaluate singlespec macros for the tox-lint check With the introduction of the singlespec macros, those need to be available in the lint environment so that rpmspec checks don't fail on parse errors. Change-Id: I5cec87ba018255e1d91816c9b3a6ddedc17cbffc --- tools/run_specchecks.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/run_specchecks.sh b/tools/run_specchecks.sh index dc6896e8c..07e99beaa 100755 --- a/tools/run_specchecks.sh +++ b/tools/run_specchecks.sh @@ -8,6 +8,9 @@ WORKSPACE=${WORKSPACE:-$basedir} echo "run checks over specfiles from $WORKSPACE/logs/" +thome=$(mktemp -d) +cat openstack/openstack-macros/macros.openstack-singlespec > $thome/.rpmmacros + failed=0 for spec in $WORKSPACE/logs/suse/*.spec ; do egrep -q '^Source:' $spec && { @@ -20,11 +23,13 @@ for spec in $WORKSPACE/logs/suse/*.spec ; do } pushd $(dirname $spec) >/dev/null - rpmspec -q --qf "%{VERSION}\n" $(basename $spec) >/dev/null || { + HOME=$thome rpmspec -q --qf "%{VERSION}\n" $(basename $spec) >/dev/null || { echo "$spec does not parse properly. Please check your syntax." failed=1 } popd > /dev/null done +rm -rf $thome + exit $failed