-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests/content-origins: Verify expected vendor for all RPM packages #1947
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../data/commonlib.sh |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
# kola: {"platforms": "qemu", "exclusive": false, "distros": "fcos rhcos" } | ||
# Verify the RPM %{vendor} flag for everything installed matches what we expect. | ||
# | ||
# - platforms: qemu | ||
# - This test should pass everywhere if it passes anywhere. | ||
# - distros: This only handles Fedora and RHEL today. | ||
|
||
set -xeuo pipefail | ||
|
||
. $KOLA_EXT_DATA/commonlib.sh | ||
|
||
. /usr/lib/os-release | ||
|
||
case "${ID}" in | ||
fedora) vendor='Fedora Project';; | ||
rhel|rhcos) vendor='Red Hat, Inc.';; | ||
*) echo "Unknown operating system ID=${ID}; skipping this test"; exit 0;; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder if we should actually error here if an unknown vendor pops up? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You mean an unknown I didn't want to scope in looking at c9s, partially because based on active discussions it seems highly likely we may end up e.g. using a COPR or a SIG repo at some point, and we don't need to be strict. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think that's fair.. one counter is to make this run on still this is fine as is if we don't want to do that. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The tricky thing is today kola makes distros= |
||
esac | ||
|
||
cd $(mktemp -d) | ||
rpm -qa --queryformat='%{name},%{vendor}\n' > rpmvendors.txt | ||
if grep -vF ",${vendor}" rpmvendors.txt > unmatched.txt; then | ||
cat unmatched.txt | ||
cgwalters marked this conversation as resolved.
Show resolved
Hide resolved
|
||
fatal "Expected only vendor ${vendor} for all packages" | ||
fi | ||
echo "ok all RPMs produced by Vendor: ${vendor}" | ||
|
||
cgwalters marked this conversation as resolved.
Show resolved
Hide resolved
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know you have some opposition to this so I'll say:
optional: mention exclusive=false here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, my rationale against the duplicate comments is covered in coreos/coreos-assembler#3060 and coreos/coreos-assembler#3059