From 170a638329b842391daed9682c0f7b4a6a1b0685 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Thu, 18 Jul 2024 11:47:42 +0300 Subject: [PATCH] Create SPECS and SOURCES dirs --- .fmf/version | 1 - .gitignore | 30 ++++---- .go-rpm-macros.metadata | 3 + README.md => SOURCES/README.md | 0 changelog => SOURCES/changelog | 0 gating.yaml => SOURCES/gating.yaml | 0 rpminspect.yaml => SOURCES/rpminspect.yaml | 0 .../go-rpm-macros.spec | 0 plans/ci.fmf | 5 -- sources | 3 - tests/README | 2 - tests/Sanity/gobuild-grafana/Makefile | 66 ---------------- tests/Sanity/gobuild-grafana/PURPOSE | 3 - tests/Sanity/gobuild-grafana/main.fmf | 17 ----- tests/Sanity/gobuild-grafana/runtest.sh | 75 ------------------- 15 files changed, 18 insertions(+), 187 deletions(-) delete mode 100644 .fmf/version create mode 100644 .go-rpm-macros.metadata rename README.md => SOURCES/README.md (100%) rename changelog => SOURCES/changelog (100%) rename gating.yaml => SOURCES/gating.yaml (100%) rename rpminspect.yaml => SOURCES/rpminspect.yaml (100%) rename go-rpm-macros.spec => SPECS/go-rpm-macros.spec (100%) delete mode 100644 plans/ci.fmf delete mode 100644 sources delete mode 100644 tests/README delete mode 100644 tests/Sanity/gobuild-grafana/Makefile delete mode 100644 tests/Sanity/gobuild-grafana/PURPOSE delete mode 100644 tests/Sanity/gobuild-grafana/main.fmf delete mode 100755 tests/Sanity/gobuild-grafana/runtest.sh diff --git a/.fmf/version b/.fmf/version deleted file mode 100644 index d00491f..0000000 --- a/.fmf/version +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/.gitignore b/.gitignore index 69e8d1c..a13d777 100644 --- a/.gitignore +++ b/.gitignore @@ -1,15 +1,15 @@ -/go-rpm-macros-3.0.8.tar.gz -/go-rpm-macros-3.0.9.tar.gz -/go-rpm-macros-3.0.10.tar.gz -/go-rpm-macros-3.0.11.tar.gz -/go-rpm-macros-3.0.12.tar.gz -/go-rpm-macros-3.0.13.tar.gz -/go-rpm-macros-3.0.14.tar.gz -/go-rpm-macros-3.0.15.tar.gz -/go-rpm-macros-3.1.0.tar.gz -/go-rpm-macros-3.2.0.tar.gz -/golist-0.10.3.tar.gz -/golist-0.10.3-vendor.tar.xz -/golist-0.10.4.tar.gz -/golist-0.10.4-vendor.tar.xz -/go-rpm-macros-3.3.0.tar.gz +SOURCES/go-rpm-macros-3.0.8.tar.gz +SOURCES/go-rpm-macros-3.0.9.tar.gz +SOURCES/go-rpm-macros-3.0.10.tar.gz +SOURCES/go-rpm-macros-3.0.11.tar.gz +SOURCES/go-rpm-macros-3.0.12.tar.gz +SOURCES/go-rpm-macros-3.0.13.tar.gz +SOURCES/go-rpm-macros-3.0.14.tar.gz +SOURCES/go-rpm-macros-3.0.15.tar.gz +SOURCES/go-rpm-macros-3.1.0.tar.gz +SOURCES/go-rpm-macros-3.2.0.tar.gz +SOURCES/golist-0.10.3.tar.gz +SOURCES/golist-0.10.3-vendor.tar.xz +SOURCES/golist-0.10.4.tar.gz +SOURCES/golist-0.10.4-vendor.tar.xz +SOURCES/go-rpm-macros-3.3.0.tar.gz diff --git a/.go-rpm-macros.metadata b/.go-rpm-macros.metadata new file mode 100644 index 0000000..4e2df1f --- /dev/null +++ b/.go-rpm-macros.metadata @@ -0,0 +1,3 @@ +1f3e46f9c6df47b2a621fd9072c106e20a3ec169 SOURCES/go-rpm-macros-3.3.0.tar.gz +d372835dbdb7c93e1c3ec0b7d1d4957dd860ac6c SOURCES/golist-0.10.4-vendor.tar.xz +4a105131658d029fe0b2d312b078a056748af2b4 SOURCES/golist-0.10.4.tar.gz diff --git a/README.md b/SOURCES/README.md similarity index 100% rename from README.md rename to SOURCES/README.md diff --git a/changelog b/SOURCES/changelog similarity index 100% rename from changelog rename to SOURCES/changelog diff --git a/gating.yaml b/SOURCES/gating.yaml similarity index 100% rename from gating.yaml rename to SOURCES/gating.yaml diff --git a/rpminspect.yaml b/SOURCES/rpminspect.yaml similarity index 100% rename from rpminspect.yaml rename to SOURCES/rpminspect.yaml diff --git a/go-rpm-macros.spec b/SPECS/go-rpm-macros.spec similarity index 100% rename from go-rpm-macros.spec rename to SPECS/go-rpm-macros.spec diff --git a/plans/ci.fmf b/plans/ci.fmf deleted file mode 100644 index 3fd3ab7..0000000 --- a/plans/ci.fmf +++ /dev/null @@ -1,5 +0,0 @@ -summary: CI Gating Plan -discover: - how: fmf -execute: - how: tmt diff --git a/sources b/sources deleted file mode 100644 index 7e932e2..0000000 --- a/sources +++ /dev/null @@ -1,3 +0,0 @@ -SHA512 (go-rpm-macros-3.3.0.tar.gz) = b14086efbd1fcc7f3a8228756a54582b15a6c6a64dc263060c3fc042666f40db98d9e5f117cb2c53c884bded247366e594f4d0c30c69c4105a03b750bd39f0ba -SHA512 (golist-0.10.4.tar.gz) = 81fc9cdc4cb0fa1b78ade56c60cb2ac0070dcb11130a333e61053a266e2312b03e64a6705415d6d20883ae4f8cd0be57722c93835c3efffdfaeb9330f4cc12ea -SHA512 (golist-0.10.4-vendor.tar.xz) = 53efe2d344d5eeb7954dd7c18a1142c67c1e7009b4d34b503372e010a6380a2218bceccff4925b513c8a80a3c3de8290c244d338f1da00c438d00f9affd8b363 diff --git a/tests/README b/tests/README deleted file mode 100644 index 9ad59d4..0000000 --- a/tests/README +++ /dev/null @@ -1,2 +0,0 @@ -The test's Makefiles are not used in Fedora CI infrastructure. But are kept here -for backward compatibility with traditional beakerlib test harness in RHEL. diff --git a/tests/Sanity/gobuild-grafana/Makefile b/tests/Sanity/gobuild-grafana/Makefile deleted file mode 100644 index de0caba..0000000 --- a/tests/Sanity/gobuild-grafana/Makefile +++ /dev/null @@ -1,66 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /tools/go-rpm-macros/Sanity/gobuild-grafana -# Description: golang rpm macros usage building grafana -# Author: Jan Kuřík -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2021 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# 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, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/tools/go-rpm-macros/Sanity/gobuild-grafana -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Jan Kuřík " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: golang rpm macros usage building" >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 2h" >> $(METADATA) - @echo "RunFor: golang" >> $(METADATA) - @echo "Requires: golang" >> $(METADATA) - @echo "Requires: go-rpm-macros go-srpm-macros" >> $(METADATA) - @echo "Requires: /usr/bin/yumdownloader /usr/bin/yum-builddep" >> $(METADATA) - @echo "Requires: /usr/bin/rpmbuild" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2+" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Releases: Fedora" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/Sanity/gobuild-grafana/PURPOSE b/tests/Sanity/gobuild-grafana/PURPOSE deleted file mode 100644 index 8b029f5..0000000 --- a/tests/Sanity/gobuild-grafana/PURPOSE +++ /dev/null @@ -1,3 +0,0 @@ -PURPOSE of /tools/go-rpm-macros/Sanity/gobuild-grafana -Description: golang rpm macros usage building grafana -Author: Jan Kuřík diff --git a/tests/Sanity/gobuild-grafana/main.fmf b/tests/Sanity/gobuild-grafana/main.fmf deleted file mode 100644 index d041977..0000000 --- a/tests/Sanity/gobuild-grafana/main.fmf +++ /dev/null @@ -1,17 +0,0 @@ -summary: golang rpm macros usage building -description: '' -contact: Jan Kuřík -component: - - golang -test: ./runtest.sh -framework: beakerlib -recommend: - - golang - - go-rpm-macros - - go-srpm-macros - - /usr/bin/yumdownloader - - /usr/bin/yum-builddep - - /usr/bin/rpmbuild -duration: 2h -extra-summary: /tools/go-rpm-macros/Sanity/gobuild-grafana -extra-task: /tools/go-rpm-macros/Sanity/gobuild-grafana diff --git a/tests/Sanity/gobuild-grafana/runtest.sh b/tests/Sanity/gobuild-grafana/runtest.sh deleted file mode 100755 index 03537fb..0000000 --- a/tests/Sanity/gobuild-grafana/runtest.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /tools/go-rpm-macros/Sanity/gobuild-grafana -# Description: golang rpm macros usage building grafana -# Author: Jan Kuřík -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2021 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# 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, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE="go-rpm-macros" - -GO_PACKAGE="$(rpm -qf $(which go))" - -# Conserve the non-zero return value through the pipe -set -o pipefail - -rlJournalStart - rlPhaseStartSetup - rlRun "TmpDir=\$(mktemp -d /var/tmp/XXXXXXX)" 0 "Creating tmp directory" - rlRun "pushd $TmpDir" - rlPhaseEnd - - rlPhaseStartTest "check macros" - rlRun "gobuild_string=\"$(rpm -E '%gobuild')\"" 127 - rlRun "gotest_string=\"$(rpm -E '%gotest')\"" 127 - rlAssertNotEquals "Checking if %gobuild macro is defined" "$gobuild_string" "%gobuild" - rlAssertNotEquals "Checking if %gotest macro is defined" "$gotest_string" "%gotest" - rlPhaseEnd - - rlPhaseStart FAIL "setup grafana sources" - rlRun "SRPM=\$(basename \$(yumdownloader --source --url grafana | tail -n 1))" - rlRun "yumdownloader --source grafana" - rlRun "yum-builddep --enablerepo=\* -y --srpm ${SRPM}" - rlRun "rpm -i -D '_topdir $TmpDir' ${SRPM}" - rlRun "sed -i 's/^\s*%define\s*compile_frontend\s.*/%define compile_frontend 0/g' \ - SPECS/grafana.spec" 0 "Make sure we build only the golang part, no JS stuff" - rlPhaseEnd - - rlPhaseStartTest "rpmbuild grafana" - rlRun "rpmbuild --showrc &> ${TmpDir}/rpm.rc" - rlFileSubmit "${TmpDir}/rpm.rc" - rlAssertGrep "%gobuild" SPECS/grafana.spec -w - rlAssertGrep "%gotest" SPECS/grafana.spec -w - rlRun "rpmbuild -bc --define='_topdir $TmpDir' SPECS/grafana.spec \ - |& tee grafana.rpmbuild.log" - rlFileSubmit "grafana.rpmbuild.log" - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "popd" - rlRun "rm -r $TmpDir" 0 "Removing tmp directory" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd