Fedora CI: Test that no unexpected dependency was added
This commit is contained in:
parent
09b13a3ec4
commit
f895eeaa56
11
tests/no-new-dependency/requires.txt
Normal file
11
tests/no-new-dependency/requires.txt
Normal file
@ -0,0 +1,11 @@
|
||||
coreutils
|
||||
dwz
|
||||
rpm
|
||||
zip
|
||||
/usr/bin/bash
|
||||
/usr/bin/file
|
||||
/usr/bin/find
|
||||
/usr/bin/grep
|
||||
/usr/bin/sed
|
||||
/usr/bin/sh
|
||||
/usr/bin/xargs
|
11
tests/no-new-dependency/runtest.sh
Executable file
11
tests/no-new-dependency/runtest.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash -ex
|
||||
|
||||
# we diff most of the dependencies against our list in requires.txt
|
||||
# generally, a new dependency is bad, for exceptional cases, we can add it to the list together with the change
|
||||
# we intentionally grep out:
|
||||
# -srpm-macros and -rpm-macros
|
||||
# rpmlib(...)
|
||||
# conditional dependencies (they contain if)
|
||||
# at the end, we strip the versions with cut
|
||||
diff -u <(cat $(dirname $0)/requires.txt | sort | uniq) \
|
||||
<(rpm -q --requires redhat-rpm-config | grep -Ev -- '-s?rpm-macros(\s|$)|^rpmlib\(|\sif\s' | cut -d' ' -f1 | sort | uniq)
|
@ -31,6 +31,9 @@
|
||||
- gcc
|
||||
- gcc-c++
|
||||
- annobin-annocheck
|
||||
# no-new-dependency
|
||||
- diffutils
|
||||
- grep
|
||||
repositories:
|
||||
- repo: https://src.fedoraproject.org/tests/clang.git
|
||||
dest: clang
|
||||
@ -40,3 +43,4 @@
|
||||
run: "dnf -y build-dep {{ tenv_workdir }}/redhat-rpm-config.spec && rpmbuild --define '_sourcedir {{ tenv_workdir }}' -ba {{ tenv_workdir }}/redhat-rpm-config.spec"
|
||||
- clang/fedora-flags
|
||||
- gcc-fedora-flags
|
||||
- no-new-dependency
|
||||
|
Loading…
Reference in New Issue
Block a user