diff --git a/tools/run_specchecks.sh b/tools/run_specchecks.sh new file mode 100755 index 000000000..b18fa0029 --- /dev/null +++ b/tools/run_specchecks.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +set -e + +basedir=${1:-$PWD} + +WORKSPACE=${WORKSPACE:-$basedir} + +echo "run checks over specfiles from $WORKSPACE/logs/" + +failed=0 +for spec in $WORKSPACE/logs/*.suse ; do + egrep -q '^Source:' $spec && { + echo "$spec should not have Source: lines. Please use Source0: instead." + failed=1 + } +done + +exit $failed diff --git a/tox.ini b/tox.ini index ffbfbdd2a..780a41e3e 100644 --- a/tox.ini +++ b/tox.ini @@ -12,6 +12,7 @@ passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY [testenv:lint] commands = {toxinidir}/tools/run_renderspec.sh {toxinidir} + {toxinidir}/tools/run_specchecks.sh {toxinidir} {toxinidir}/tools/run_speccleaner.sh {toxinidir} [testenv:venv]