From 772207cbbf7b58228796d8307a9b6264755345d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cern=C3=BD?= Date: Wed, 22 May 2024 09:18:49 +0200 Subject: [PATCH 1/4] scap-security-guide-0.1.73 --- .gitignore | 1 + scap-security-guide.spec | 6 +++++- sources | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 9b442ec..3105ff4 100644 --- a/.gitignore +++ b/.gitignore @@ -56,3 +56,4 @@ /scap-security-guide-0.1.70.tar.bz2 /scap-security-guide-0.1.71.tar.bz2 /scap-security-guide-0.1.72.tar.bz2 +/scap-security-guide-0.1.73.tar.bz2 diff --git a/scap-security-guide.spec b/scap-security-guide.spec index ff6409e..7f855f6 100644 --- a/scap-security-guide.spec +++ b/scap-security-guide.spec @@ -4,7 +4,7 @@ %global _vpath_builddir build Name: scap-security-guide -Version: 0.1.72 +Version: 0.1.73 Release: 1%{?dist} Summary: Security guidance and baselines in SCAP formats License: BSD-3-Clause @@ -99,6 +99,10 @@ rm %{buildroot}/%{_docdir}/%{name}/Contributors.md %endif %changelog +* Wed May 22 2024 Jan Černý - 0.1.73-1 +- Update to latest upstream release + https://github.com/ComplianceAsCode/content/releases/tag/v0.1.73 + * Fri Feb 09 2024 Vojtech Polasek - 0.1.72-1 - Update to latest upstream SCAP-Security-Guide-0.1.72 release: https://github.com/ComplianceAsCode/content/releases/tag/v0.1.72 diff --git a/sources b/sources index 5ef0e99..ce6f37a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (scap-security-guide-0.1.72.tar.bz2) = 2b3fb7ff4d7f69796968afc61049753bce9f2cd5bc57ecc41f9ea17dbd2bb8c278a6e02ef98e34b1561dd38e55498ba2ba92079dbdc4ef5848186964cefbd92a +SHA512 (scap-security-guide-0.1.73.tar.bz2) = 8750aeb61378d7729e00e4bcfb17d1463d97192801ef6707593ec639dfef2abba6669b9d1b8f71958f7d24f6c66f308f1587d731dd4e63878f91266232883ad7 From 4e2d46b83640b71e00ef19a2e514355c702bdb59 Mon Sep 17 00:00:00 2001 From: Milan Lysonek Date: Tue, 9 Jul 2024 09:06:18 +0200 Subject: [PATCH 2/4] Move smoke-test from tests/scap-security-guide repo and with that update also test plans and gating configurations. --- gating.yaml | 4 +- plans/fedora_tests.fmf | 3 +- tests/smoke-test/main.fmf | 27 +++++++++++++ tests/smoke-test/runtest.sh | 80 +++++++++++++++++++++++++++++++++++++ 4 files changed, 109 insertions(+), 5 deletions(-) create mode 100644 tests/smoke-test/main.fmf create mode 100755 tests/smoke-test/runtest.sh diff --git a/gating.yaml b/gating.yaml index 1d65cc1..46eab8d 100644 --- a/gating.yaml +++ b/gating.yaml @@ -17,6 +17,4 @@ product_versions: - rhel-* decision_context: osci_compose_gate rules: - - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional} - - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.ci-beaker.functional} - - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tedude.validation} + - !PassingTestCaseRule {test_case_name: osci.brew-build./plans/ci/tier1.functional} diff --git a/plans/fedora_tests.fmf b/plans/fedora_tests.fmf index 63d6437..3f21692 100644 --- a/plans/fedora_tests.fmf +++ b/plans/fedora_tests.fmf @@ -1,6 +1,5 @@ -summary: Run tests from scap-security-guide tests repository +summary: Run all tests in this repository discover: how: fmf - url: https://src.fedoraproject.org/tests/scap-security-guide execute: how: tmt diff --git a/tests/smoke-test/main.fmf b/tests/smoke-test/main.fmf new file mode 100644 index 0000000..6e01198 --- /dev/null +++ b/tests/smoke-test/main.fmf @@ -0,0 +1,27 @@ +summary: Test calls upstream test suite. +description: | + Runs upstream test suite against content built from the source RPM - testing + the content from the installed scap-security-guide is not feasible as the + upstream test suite is hardcoded to test the content from the CMAKE_BINARY_DIR + directory with hardcoded paths which are not the same as paths where content is + installed from the scap-security-guide RPM. Test suite is also built from the + scap-security-guide source RPM by running %prep and %build stages from the spec + file. +contact: Matus Marhefka +test: ./runtest.sh +framework: beakerlib +require: + - library(ControlFlow/Cleanup) + - library(rpm/snapshot) + - scap-security-guide +recommend: + - yum-utils + - rpm-build + - dnf-plugins-core + - gcc + - python3-pytest + - python3-pip + - python3-devel + - ansible +duration: 90m +enabled: true diff --git a/tests/smoke-test/runtest.sh b/tests/smoke-test/runtest.sh new file mode 100755 index 0000000..b356a60 --- /dev/null +++ b/tests/smoke-test/runtest.sh @@ -0,0 +1,80 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/scap-security-guide/Sanity/smoke-test +# Description: Test calls upstream test suite. +# Author: Marek Haicman +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2018 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="scap-security-guide" + +rlJournalStart + + rlPhaseStartSetup + rlImport ControlFlow/Cleanup rpm/snapshot || rlDie "Failed to import libraries" + rlAssertRpm "$PACKAGE" + + RpmSnapshotCreate + CleanupRegister "RpmSnapshotRevert" + rlRun "TmpDir=\$(mktemp -d)" 0 + CleanupRegister "rlRun 'rm -r $TmpDir' 0 'Removing tmp directory'" + rlRun "pushd $TmpDir" + CleanupRegister "rlRun 'popd'" + + rlFetchSrcForInstalled $PACKAGE + rlRun "dnf builddep -y $PACKAGE*" + SITE_PACKAGES=$(python3 -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])') + rlRun "pip3 install --target=$SITE_PACKAGES ruamel.yaml yamlpath prometheus-client" + CleanupRegister "rlRun 'pip3 uninstall -y ruamel.yaml yamlpath prometheus-client'" + TOPDIR=`rpm --eval %_topdir` + rlRun "rm -rf ${TOPDIR}/BUILD/${PACKAGE}*" 0-255 + rlRun "rpm -ihv `ls *.rpm`" 0 "Install $PACKAGE source RPM" + rlPhaseEnd + + rlPhaseStartSetup "Prepare upstream test suite (%prep and %build stages from the spec file)" + rlRun "rpmbuild -v -bc ${TOPDIR}/SPECS/${PACKAGE}.spec" + CleanupRegister "rlRun 'rm -rf ${TOPDIR}/BUILD/${PACKAGE}*'" + CleanupRegister "rlRun 'rm -rf ${TOPDIR}/SPECS/${PACKAGE}*'" + CleanupRegister "rlRun 'rm -rf ${TOPDIR}/SOURCES/*'" + rlPhaseEnd + + rlPhaseStartTest "Run upstream test suite" + BUILD_DIR_PATH="$(find $TOPDIR -name build | grep scap-security-guide)" + rlRun -s "cmake --build $BUILD_DIR_PATH --target test -- ARGS='--output-on-failure'" + rv=$? + + # if we got error, submit file with result of particular test for easier debugging + if [ $rv -ne 0 ]; then + FILE="${BUILD_DIR_PATH}/Testing/Temporary/LastTest.log" + rlBundleLogs test_outputs $(readlink -f $FILE) + fi + rlPhaseEnd + + rlPhaseStartCleanup + CleanupDo + rlPhaseEnd + +rlJournalPrintText +rlJournalEnd From ca658c5e67c5f907e01e7b764df3d9c874ec0a81 Mon Sep 17 00:00:00 2001 From: Matthew Burket Date: Mon, 12 Aug 2024 12:06:41 -0500 Subject: [PATCH 3/4] Update to 0.1.74 --- .gitignore | 1 + scap-security-guide.spec | 6 +++++- sources | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 3105ff4..329f996 100644 --- a/.gitignore +++ b/.gitignore @@ -57,3 +57,4 @@ /scap-security-guide-0.1.71.tar.bz2 /scap-security-guide-0.1.72.tar.bz2 /scap-security-guide-0.1.73.tar.bz2 +/scap-security-guide-0.1.74.tar.bz2 diff --git a/scap-security-guide.spec b/scap-security-guide.spec index 7f855f6..c94cb33 100644 --- a/scap-security-guide.spec +++ b/scap-security-guide.spec @@ -4,7 +4,7 @@ %global _vpath_builddir build Name: scap-security-guide -Version: 0.1.73 +Version: 0.1.74 Release: 1%{?dist} Summary: Security guidance and baselines in SCAP formats License: BSD-3-Clause @@ -99,6 +99,10 @@ rm %{buildroot}/%{_docdir}/%{name}/Contributors.md %endif %changelog +* Mon Aug 12 2024 Matthew Burket - 0.1.74-1 +- Update to latest upstream release + https://github.com/ComplianceAsCode/content/releases/tag/v0.1.74 + * Wed May 22 2024 Jan Černý - 0.1.73-1 - Update to latest upstream release https://github.com/ComplianceAsCode/content/releases/tag/v0.1.73 diff --git a/sources b/sources index ce6f37a..0ced6da 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (scap-security-guide-0.1.73.tar.bz2) = 8750aeb61378d7729e00e4bcfb17d1463d97192801ef6707593ec639dfef2abba6669b9d1b8f71958f7d24f6c66f308f1587d731dd4e63878f91266232883ad7 +SHA512 (scap-security-guide-0.1.74.tar.bz2) = 773cc7fb72e8d24fe9b12bf58815e051db21ee474cd0c3aebd07c2026712a89e6174c00840b1fd56195c900a541ff9e656240ee6b5a1cf3f3fe9b119cbedc30f From 82afaa8e6c4d21edf4b676c59d392fa4d8b9d6ed Mon Sep 17 00:00:00 2001 From: Matthew Burket Date: Thu, 14 Nov 2024 15:10:44 -0600 Subject: [PATCH 4/4] Update to 0.1.75 --- .gitignore | 1 + scap-security-guide.spec | 6 +++++- sources | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 329f996..d1fdb0d 100644 --- a/.gitignore +++ b/.gitignore @@ -58,3 +58,4 @@ /scap-security-guide-0.1.72.tar.bz2 /scap-security-guide-0.1.73.tar.bz2 /scap-security-guide-0.1.74.tar.bz2 +/scap-security-guide-0.1.75.tar.bz2 diff --git a/scap-security-guide.spec b/scap-security-guide.spec index c94cb33..278e854 100644 --- a/scap-security-guide.spec +++ b/scap-security-guide.spec @@ -4,7 +4,7 @@ %global _vpath_builddir build Name: scap-security-guide -Version: 0.1.74 +Version: 0.1.75 Release: 1%{?dist} Summary: Security guidance and baselines in SCAP formats License: BSD-3-Clause @@ -99,6 +99,10 @@ rm %{buildroot}/%{_docdir}/%{name}/Contributors.md %endif %changelog +* Thu Nov 14 2024 Matthew Burket - 0.1.75-1 +- Update to latest upstream release + https://github.com/ComplianceAsCode/content/releases/tag/v0.1.75 + * Mon Aug 12 2024 Matthew Burket - 0.1.74-1 - Update to latest upstream release https://github.com/ComplianceAsCode/content/releases/tag/v0.1.74 diff --git a/sources b/sources index 0ced6da..0f120bc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (scap-security-guide-0.1.74.tar.bz2) = 773cc7fb72e8d24fe9b12bf58815e051db21ee474cd0c3aebd07c2026712a89e6174c00840b1fd56195c900a541ff9e656240ee6b5a1cf3f3fe9b119cbedc30f +SHA512 (scap-security-guide-0.1.75.tar.bz2) = ecab31c731612316b40d9e26ba81b7a44396bd6ef3cc616de27789cb75dec6f90cec69f1fd3186f20a03d46896e0d1231c79a31ced1c25dd6786c79c5baac416