RHEL 9.0.0 Alpha bootstrap

The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/cockpit#1fd0512356a037b7a9995076c57fdb2b103abb34
This commit is contained in:
Petr Šabata 2020-10-14 23:00:28 +02:00
parent d844f0b08e
commit 6fa2310f0e
8 changed files with 2388 additions and 0 deletions

192
.gitignore vendored
View File

@ -0,0 +1,192 @@
/cockpit-0.*/
/x86_64
/noarch
.build*.log
*.src.rpm
/cockpit-0.24.tar.bz2
/cockpit-0.25.tar.bz2
/cockpit-0.26.tar.bz2
/cockpit-0.27.tar.bz2
/cockpit-0.28.tar.bz2
/cockpit-0.29.tar.bz2
/cockpit-0.30.tar.bz2
/cockpit-0.31.tar.bz2
/cockpit-0.32.tar.bz2
/cockpit-0.33.tar.bz2
/cockpit-0.34.tar.bz2
/cockpit-0.35.tar.bz2
/cockpit-0.36.tar.bz2
/cockpit-0.37.tar.bz2
/cockpit-0.38.tar.bz2
/cockpit-0.39.tar.bz2
/cockpit-0.40.tar.bz2
/cockpit-0.41.tar.bz2
/cockpit-0.42.tar.bz2
/cockpit-0.43.tar.bz2
/cockpit-0.44.tar.bz2
/cockpit-0.45.tar.bz2
/cockpit-0.46.tar.bz2
/cockpit-0.48.tar.bz2
/cockpit-0.49.tar.bz2
/cockpit-0.50.tar.bz2
/cockpit-0.51.tar.bz2
/cockpit-0.52.tar.bz2
/cockpit-0.53.tar.bz2
/cockpit-0.54.tar.bz2
/cockpit-0.55.tar.bz2
/cockpit-0.56.tar.bz2
/cockpit.pam
/cockpit-0.57.tar.bz2
/cockpit-0.58.tar.bz2
/cockpit-0.59.tar.bz2
/cockpit-0.60.tar.bz2
/cockpit-0.61.tar.bz2
/cockpit-0.62.tar.bz2
/cockpit-0.63.tar.bz2
/cockpit-0.64.tar.bz2
/cockpit-0.65.tar.bz2
/cockpit-0.66.tar.bz2
/cockpit-0.67.tar.bz2
/cockpit-0.68.tar.bz2
/cockpit-0.69.tar.bz2
/cockpit-0.70.tar.bz2
/cockpit-0.71.tar.bz2
/cockpit-0.73.tar.bz2
/cockpit-0.74.tar.bz2
/cockpit-0.75.tar.bz2
/cockpit-0.76.tar.bz2
/cockpit-0.77.tar.bz2
/cockpit-0.78.tar.bz2
/cockpit-0.79.tar.bz2
/cockpit-0.80.tar.bz2
/cockpit-0.81.tar.bz2
/cockpit-0.82.tar.bz2
/cockpit-0.83.tar.bz2
/cockpit-0.84.tar.bz2
/cockpit-0.86.tar.bz2
/cockpit-0.87.tar.bz2
/cockpit-0.88.tar.bz2
/cockpit-0.89.tar.bz2
/cockpit-0.90.tar.bz2
/cockpit-0.91.tar.xz
/cockpit-0.92.tar.xz
/cockpit-0.93.tar.xz
/cockpit-0.94.tar.xz
/cockpit-0.95.tar.xz
/cockpit-0.102.tar.xz
/cockpit-0.103.tar.xz
/cockpit-0.104.tar.xz
/cockpit-0.105.tar.xz
/cockpit-0.106.tar.xz
/cockpit-0.107.tar.xz
/cockpit-0.108.tar.xz
/cockpit-0.109.tar.xz
/cockpit-0.111.tar.xz
/cockpit-0.112.tar.xz
/cockpit-0.113.tar.xz
/cockpit-0.114.tar.xz
/cockpit-0.115.tar.xz
/cockpit-0.116.tar.xz
/cockpit-0.117.tar.xz
/cockpit-118.tar.xz
/cockpit-119.tar.xz
/cockpit-120.tar.xz
/cockpit-121.tar.xz
/cockpit-122.tar.xz
/cockpit-123.tar.xz
/cockpit-124.tar.xz
/cockpit-125.tar.xz
/cockpit-126.tar.xz
/cockpit-129.tar.xz
/cockpit-130.tar.xz
/cockpit-131.tar.xz
/cockpit-132.tar.xz
/cockpit-133.tar.xz
/cockpit-134.tar.xz
/cockpit-137.tar.xz
/cockpit-138.tar.xz
/cockpit-139.tar.xz
/cockpit-142.tar.xz
/cockpit-143.tar.xz
/cockpit-145.tar.xz
/cockpit-146.tar.xz
/cockpit-149.tar.xz
/cockpit-150.tar.xz
/cockpit-151.tar.xz
/cockpit-152.tar.xz
/cockpit-153.tar.xz
/cockpit-154.tar.xz
/cockpit-155.tar.xz
/cockpit-156.tar.xz
/cockpit-157.tar.xz
/cockpit-158.tar.xz
/cockpit-159.tar.xz
/cockpit-160.tar.xz
/cockpit-161.tar.xz
/cockpit-163.tar.xz
/cockpit-164.tar.xz
/cockpit-165.tar.xz
/cockpit-166.tar.xz
/cockpit-167.tar.xz
/cockpit-168.tar.xz
/cockpit-170.tar.xz
/cockpit-171.tar.xz
/cockpit-173.tar.xz
/cockpit-174.tar.xz
/cockpit-175.tar.xz
/cockpit-177.tar.xz
/cockpit-178.tar.xz
/cockpit-179.tar.xz
/cockpit-180.tar.xz
/cockpit-181.tar.xz
/cockpit-182.tar.xz
/cockpit-183.tar.xz
/cockpit-184.tar.xz
/cockpit-185.tar.xz
/cockpit-187.tar.xz
/cockpit-188.tar.xz
/cockpit-189.tar.xz
/cockpit-190.tar.xz
/cockpit-191.tar.xz
/cockpit-192.tar.xz
/cockpit-193.tar.xz
/cockpit-194.tar.xz
/cockpit-198.tar.xz
/cockpit-199.tar.xz
/cockpit-200.tar.xz
/cockpit-201.tar.xz
/cockpit-202.tar.xz
/cockpit-202.1.tar.xz
/cockpit-203.tar.xz
/cockpit-204.tar.xz
/cockpit-205.tar.xz
/cockpit-205.1.tar.xz
/cockpit-206.tar.xz
/cockpit-207.tar.xz
/cockpit-208.tar.xz
/cockpit-209.tar.xz
/cockpit-210.tar.xz
/cockpit-211.tar.xz
/cockpit-211.1.tar.xz
/cockpit-212.tar.xz
/cockpit-213.tar.xz
/cockpit-214.tar.xz
/cockpit-214.1.tar.xz
/cockpit-215.tar.xz
/cockpit-216.tar.xz
/cockpit-217.tar.xz
/cockpit-218.tar.xz
/cockpit-219.tar.xz
/cockpit-220.tar.xz
/cockpit-221.tar.xz
/cockpit-221.1.tar.xz
/cockpit-222.tar.xz
/cockpit-222.1.tar.xz
/cockpit-223.tar.xz
/cockpit-224.tar.xz
/cockpit-225.tar.xz
/cockpit-226.tar.xz
/cockpit-227.tar.xz
/cockpit-228.tar.xz
/cockpit-229.tar.xz
/cockpit-230.tar.xz

1977
cockpit.spec Normal file

File diff suppressed because it is too large Load Diff

6
gating.yaml Normal file
View File

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_stable
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (cockpit-230.tar.xz) = d068d20353533f2f9c764ab21687f803d11cdf2b6a735bd353e18f86cd3d5a22c9b5bb3300d05128623ac9ac8c76242cdf044ab8b19f1f2870a88ae8dbeb3002

3
tests/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
*.retry
artifacts/
source/

118
tests/run-test.sh Executable file
View File

@ -0,0 +1,118 @@
#!/bin/sh
set -eux
cd "$SOURCE"
. /etc/os-release
test_optional=
test_basic=
if ls ../cockpit-appstream* 1> /dev/null 2>&1; then
test_optional=1
else
test_basic=1
fi
if [ "$ID" = "fedora" ]; then
test_basic=1
test_optional=1
fi
# tests need cockpit's bots/ libraries
git clone --depth=1 https://github.com/cockpit-project/bots
# only install a subset to save time/space
rm package.json package-lock.json # otherwise the command below installs *everything*, argh
npm install axe-core chrome-remote-interface sizzle
export TEST_OS="${ID}-${VERSION_ID/./-}"
# HACK: upstream does not yet know about rawhide
if [ "$TEST_OS" = "fedora-34" ]; then
export TEST_OS=fedora-33
fi
# HACK: CI hits this selinux denial. Unrelated to our tests.
export TEST_ALLOW_JOURNAL_MESSAGES=".*Permission denied:.*/var/cache/app-info/xmls.*"
# select tests
TESTS=""
EXCLUDES=""
RC=0
if [ -n "$test_optional" ]; then
# pre-download cirros image for Machines tests
bots/image-download cirros
# takes too long, somehow breaks Ansible
EXCLUDES="$EXCLUDES TestMachines.testCreate"
# triggers SELinux violation
EXCLUDES="$EXCLUDES TestMachines.testAddDisk"
# not investigated yet
EXCLUDES="$EXCLUDES
TestMachines.testCreateThenInstall
TestMachines.testCreateFileSource
TestMachines.testCreateUrlSource
TestMachines.testVmNICs"
# TestUpdates: we can't run rebooting tests
TESTS="$TESTS
TestAutoUpdates
TestMachines
TestStorage
TestUpdates.testBasic
TestUpdates.testSecurityOnly"
fi
if [ -n "$test_basic" ]; then
# still too unstable
EXCLUDES="$EXCLUDES TestFirewall.testNetworkingPage"
# TODO: fix for CI environment
EXCLUDES="$EXCLUDES TestLogin.testTally"
EXCLUDES="$EXCLUDES TestAccounts.testBasic"
# PCI devices list is not predictable
EXCLUDES="$EXCLUDES TestSystemInfo.testHardwareInfo"
# Known issue #1008
EXCLUDES="$EXCLUDES TestTuned.testBasic"
# PAM bug in RHEL 8: it shouldn't pwquality the old password when having to set a new one, that's completely counter-productive and wrong
if [ "${TEST_OS#rhel}" != "$TEST_OS" ] || [ "$TEST_OS" = "fedora-31" ]; then
EXCLUDES="$EXCLUDES TestLogin.testExpired"
fi
TESTS="$TESTS
TestAccounts
TestBonding
TestBridge
TestFirewall
TestKdump
TestLogin
TestNetworking
TestServices
TestSOS
TestSystemInfo
TestTeam
TestTerminal
TestTuned
"
fi
exclude_options=""
for t in $EXCLUDES; do
exclude_options="$exclude_options --exclude $t"
done
# execute run-tests
test/common/run-tests --test-dir test/verify --trace --verbose --nondestructive $exclude_options \
--machine localhost:22 --browser localhost:9090 $TESTS || RC=$?
# check-menu is not @nondestructive yet, keep it last
if [ -n "$test_basic" ]; then
test/verify/check-menu -tv --machine localhost:22 --browser localhost:9090 || RC=$?
fi
echo $RC > "$LOGS/exitcode"
cp --verbose Test* "$LOGS" || true
# deliver test result via exitcode file
exit 0

40
tests/tests.yml Normal file
View File

@ -0,0 +1,40 @@
---
- hosts: localhost
roles:
- role: standard-test-source
tags:
- always
- role: standard-test-basic
tags:
- atomic
- classic
required_packages:
- cockpit
- cockpit-tests
- cockpit-dashboard
- cockpit-machines
- cockpit-sosreport
- cockpit-storaged
- createrepo_c
- cryptsetup
- dnf-automatic
- firewalld
- git
- libvirt-daemon-config-network
- libvirt-python3
- make
- NetworkManager-team
- npm
- python3
- sssd-dbus
- targetcli
- tlog
tests:
- smoke:
dir: ./source/tools/debian/tests/
run: ./smoke
- verify:
dir: .
run: ./verify.sh
save-files: ["logs/*"]

51
tests/verify.sh Executable file
View File

@ -0,0 +1,51 @@
#!/bin/sh
set -eux
# from standard-test-source
SOURCE="$(pwd)/source"
LOGS="$(pwd)/logs"
TESTS="$(pwd)/tests"
mkdir -p "$LOGS"
chmod a+w "$LOGS"
# install browser; on RHEL, use chromium from epel
if ! rpm -q chromium-headless; then
if grep -q 'ID=.*rhel' /etc/os-release; then
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
dnf config-manager --enable epel
fi
dnf install -y chromium-headless
fi
# make libpwquality less aggressive, so that our "foobar" password works
printf 'dictcheck = 0\nminlen = 6\n' >> /etc/security/pwquality.conf
# create user account for logging in
if ! id admin 2>/dev/null; then
useradd -c Administrator -G wheel admin
echo admin:foobar | chpasswd
fi
# create user account for running the test
if ! id runtest 2>/dev/null; then
useradd -c 'Test runner' runtest
# allow test to set up things on the machine
mkdir -p /root/.ssh
curl https://raw.githubusercontent.com/cockpit-project/bots/master/machine/identity.pub >> /root/.ssh/authorized_keys
chmod 600 /root/.ssh/authorized_keys
fi
chown -R runtest "$SOURCE"
# disable core dumps, we rather investigate them upstream where test VMs are accessible
echo core > /proc/sys/kernel/core_pattern
# make sure that we can access cockpit through the firewall
systemctl start firewalld
firewall-cmd --add-service=cockpit --permanent
firewall-cmd --add-service=cockpit
# Run tests as unprivileged user
su - -c "env SOURCE=$SOURCE LOGS=$LOGS $TESTS/run-test.sh" runtest
RC=$(cat $LOGS/exitcode)
exit ${RC:-1}