From 10c17202e82194d7f1ec6ab026ba76d9547e98a3 Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Tue, 4 Mar 2025 17:02:11 +0530 Subject: [PATCH] container-selinux-4:2.235.0-2.el10 - fetch TMT tests and plan from upstream - Resolves: RHEL-80817 Signed-off-by: Lokesh Mandvekar --- container-selinux.spec | 9 +++++++- plans/main.fmf | 50 +++++++++++++----------------------------- test/Makefile | 16 -------------- test/main.fmf | 14 +++++------- test/podman-tests.sh | 2 +- 5 files changed, 30 insertions(+), 61 deletions(-) delete mode 100644 test/Makefile diff --git a/container-selinux.spec b/container-selinux.spec index b545425..22d8756 100644 --- a/container-selinux.spec +++ b/container-selinux.spec @@ -36,7 +36,7 @@ Epoch: 4 # to the correct value by Packit for copr and koji builds. # IGNORE this comment if you're looking at it in dist-git. Version: 2.235.0 -Release: 1%{?dist} +Release: 2%{?dist} License: GPL-2.0-only URL: https://github.com/containers/%{name} Summary: SELinux policies for container runtimes @@ -114,6 +114,9 @@ fi #define license tag if not already defined %{!?_licensedir:%global license %doc} +# Placeholder check to silence rpmlint +%check + %files %doc README.md %{_datadir}/selinux/* @@ -135,6 +138,10 @@ if %{_sbindir}/selinuxenabled ; then fi %changelog +* Tue Mar 04 2025 Lokesh Mandvekar - 4:2.235.0-2 +- fetch TMT tests and plan from upstream +- Resolves: RHEL-80817 + * Mon Feb 24 2025 Jindrich Novy - 4:2.235.0-1 - update to https://github.com/containers/container-selinux/releases/tag/v2.235.0 - Resolves: RHEL-80476 diff --git a/plans/main.fmf b/plans/main.fmf index 2e13af5..baa8b2f 100644 --- a/plans/main.fmf +++ b/plans/main.fmf @@ -2,39 +2,19 @@ discover: how: fmf execute: how: tmt -adjust: +prepare: + - when: distro == centos-stream or distro == rhel + how: shell + script: | + dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(rpm --eval '%{?rhel}').noarch.rpm + dnf -y config-manager --set-enabled epel + order: 10 - when: initiator == packit - because: "We need to test with updated packages from rhcontainerbot/podman-next copr" - prepare+: - how: shell - script: | - sed -i -n '/^priority=/!p;$apriority=1' /etc/yum.repos.d/*podman-next*.repo - dnf -y upgrade --allowerasing - # FIXME: Use epel10 once bats is available there - - when: distro == centos-stream-10 or distro == rhel-10 - because: "bats isn't yet available on epel10" - prepare+: - how: install - copr: rhcontainerbot/bats-el10 - package: bats - - when: distro == centos-stream-9 or distro == rhel-9 - because: "bats is present on EPEL on rhel9 / c9s" - prepare+: - how: feature - epel: enabled - -/upstream: - summary: Run SELinux specific Podman tests on upstream PRs - discover+: - filter: tag:upstream - adjust+: - - enabled: false - when: initiator is not defined or initiator != packit - -/downstream: - summary: Run SELinux specific Podman tests on bodhi / errata and dist-git PRs - discover+: - filter: tag:downstream - adjust+: - - enabled: false - when: initiator == packit + how: shell + script: | + COPR_REPO_FILE="/etc/yum.repos.d/*podman-next*.repo" + if compgen -G $COPR_REPO_FILE > /dev/null; then + sed -i -n '/^priority=/!p;$apriority=1' $COPR_REPO_FILE + fi + dnf -y upgrade --allowerasing + order: 20 diff --git a/test/Makefile b/test/Makefile deleted file mode 100644 index 9088bd9..0000000 --- a/test/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -.PHONY: basic_check -basic_check: - semodule --list=full | grep container - semodule -B - rpm -Vqf /var/lib/selinux/*/active/modules/200/container - -.PHONY: podman_e2e_test -podman_e2e_test: - bash ./podman-tests.sh e2e - -.PHONY: podman_system_test -podman_system_test: - bash ./podman-tests.sh system - -clean: - rm -rf podman-*dev* podman.spec diff --git a/test/main.fmf b/test/main.fmf index bded6bc..4b186d5 100644 --- a/test/main.fmf +++ b/test/main.fmf @@ -1,19 +1,17 @@ require: + - attr - bats - container-selinux - - cpio - - golang - - make - - podman - podman-tests - policycoreutils /basic_check: - tag: [ upstream, downstream ] summary: Run basic checks - test: make basic_check + test: | + semodule --list=full | grep container + semodule -B + rpm -Vqf /var/lib/selinux/*/active/modules/200/container /podman_system_test: - tag: [ upstream, downstream ] summary: Run SELinux specific Podman system tests - test: make podman_system_test + test: bash ./podman-tests.sh diff --git a/test/podman-tests.sh b/test/podman-tests.sh index 0033d25..faa504b 100644 --- a/test/podman-tests.sh +++ b/test/podman-tests.sh @@ -10,7 +10,7 @@ if [[ "$(id -u)" -ne 0 ]];then fi # Print versions of distro and installed packages -rpm -q bats container-selinux golang podman podman-tests selinux-policy +rpm -q bats container-selinux podman podman-tests policycoreutils selinux-policy # Run podman system tests bats /usr/share/podman/test/system/410-selinux.bats