diff --git a/README.md b/README.md index 78ba32b..564cc9e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,154 @@ # openqa-testrepos -Testing repository content for openQA \ No newline at end of file +Create the contents of the `openqa-testrepo-1` in support of Rocky Linux openQA testing. + +## Requirements +The `openqa-testrepo-1` repository contents can be created on Rocky Linux 8 or Rocky Linux 9 host. In both cases the `python3-rpmfluff` package (and dependencies) must be installed. + +In Rocky Linux 8 the `python3-rpmfluff` package can be found in the AppStream repository. In Rocky Linux 9 the `python3-rpmfluff` package is provided by EPEL. + +### Rocky Linux 8 + +Installation of `python3-rpmfluff` in Rocky Linux 8 is shown below... + +``` +$ sudo dnf -y install python3-rpmfluff +Last metadata expiration check: 1:13:23 ago on Fri 29 Dec 2023 06:24:00 PM UTC. +Dependencies resolved. +=============================================================================================================================== + Package Architecture Version Repository Size +=============================================================================================================================== +Installing: + python3-rpmfluff noarch 0.5.7.1-2.el8 appstream 57 k +Installing dependencies: + createrepo_c x86_64 0.17.7-6.el8 appstream 88 k + createrepo_c-libs x86_64 0.17.7-6.el8 appstream 115 k + drpm x86_64 0.4.1-3.el8 appstream 67 k + elfutils x86_64 0.189-3.el8 baseos 552 k + gc x86_64 7.6.4-3.el8 appstream 108 k + gdb-headless x86_64 8.2-20.el8.0.1 appstream 3.7 M + guile x86_64 5:2.0.14-7.el8 appstream 3.5 M + libatomic_ops x86_64 7.6.2-3.el8 appstream 37 k + libbabeltrace x86_64 1.5.4-4.el8 baseos 199 k + libipt x86_64 1.6.1-8.el8 appstream 49 k + patch x86_64 2.7.6-11.el8 baseos 137 k + rpm-build x86_64 4.14.3-26.el8 appstream 173 k + zstd x86_64 1.4.4-1.el8 appstream 392 k + +Transaction Summary +=============================================================================================================================== +Install 14 Packages + +Total download size: 9.1 M +Installed size: 29 M +Downloading Packages: +(1/14): createrepo_c-0.17.7-6.el8.x86_64.rpm 1.2 MB/s | 88 kB 00:00 +...... + + Verifying : patch-2.7.6-11.el8.x86_64 14/14 + +Installed: + createrepo_c-0.17.7-6.el8.x86_64 createrepo_c-libs-0.17.7-6.el8.x86_64 drpm-0.4.1-3.el8.x86_64 + elfutils-0.189-3.el8.x86_64 gc-7.6.4-3.el8.x86_64 gdb-headless-8.2-20.el8.0.1.x86_64 + guile-5:2.0.14-7.el8.x86_64 libatomic_ops-7.6.2-3.el8.x86_64 libbabeltrace-1.5.4-4.el8.x86_64 + libipt-1.6.1-8.el8.x86_64 patch-2.7.6-11.el8.x86_64 python3-rpmfluff-0.5.7.1-2.el8.noarch + rpm-build-4.14.3-26.el8.x86_64 zstd-1.4.4-1.el8.x86_64 + +Complete! +``` + +### Rocky Linux 9 + +Installation of `python3-rpmfluff` from EPEL repository in Rocky Linux 9 is shown below... + +``` +$ sudo dnf -y --enablerepo=epel install python3-rpmfluff +Last metadata expiration check: 0:07:01 ago on Fri 29 Dec 2023 07:31:47 PM UTC. +Dependencies resolved. +=============================================================================================================================== + Package Architecture Version Repository Size +=============================================================================================================================== +Installing: + python3-rpmfluff noarch 0.6.3-1.el9 epel 59 k +Installing dependencies: + createrepo_c x86_64 0.20.1-2.el9 appstream 73 k + createrepo_c-libs x86_64 0.20.1-2.el9 appstream 99 k + debugedit x86_64 5.0-4.el9 appstream 76 k + ed x86_64 1.14.2-12.el9 baseos 74 k + elfutils x86_64 0.189-3.el9 baseos 526 k + gdb-minimal x86_64 10.2-11.el9 appstream 3.5 M + info x86_64 6.7-15.el9 baseos 224 k + patch x86_64 2.7.6-16.el9 appstream 127 k + rpm-build x86_64 4.16.1.3-25.el9 appstream 59 k + zstd x86_64 1.5.1-2.el9 baseos 546 k + +Transaction Summary +=============================================================================================================================== +Install 11 Packages + +Total download size: 5.3 M +Installed size: 17 M +Downloading Packages: +(1/11): python3-rpmfluff-0.6.3-1.el9.noarch.rpm 177 kB/s | 59 kB 00:00 + +...... + + Verifying : gdb-minimal-10.2-11.el9.x86_64 11/11 + +Installed: + createrepo_c-0.20.1-2.el9.x86_64 createrepo_c-libs-0.20.1-2.el9.x86_64 debugedit-5.0-4.el9.x86_64 + ed-1.14.2-12.el9.x86_64 elfutils-0.189-3.el9.x86_64 gdb-minimal-10.2-11.el9.x86_64 + info-6.7-15.el9.x86_64 patch-2.7.6-16.el9.x86_64 python3-rpmfluff-0.6.3-1.el9.noarch + rpm-build-4.16.1.3-25.el9.x86_64 zstd-1.5.1-2.el9.x86_64 + +Complete! +``` + +## Usage + +Once the `pyton3-rpmfluff` (and dependencies) packages are installed on of the version dependent scripts in this repository can be used to create the contents of the openqa-testrepo-1 repository. + +### Rocky Linux 8 + +``` +$ ./tools/testpackages8 + +$ tree openqa-testrepo-1 +openqa-testrepo-1 +├── acpica-tools-1-1.noarch.rpm +├── pandoc-common-1-1.noarch.rpm +├── README +└── repodata + ├── 2b41544bc8ee5e59ebb0893af7464f1aab0f85d58dda9d4976554ec29ebf092a-other.sqlite.bz2 + ├── 30426ccf32448eddf3d19345d0e4c924251a8b6ca9623954e9fb68fdc03b5ea2-other.xml.gz + ├── 545ace9c9a1bc62b165001e00fd19fb97daeec3facf2ad0fc1b817c4dd8804c2-primary.xml.gz + ├── bcbd4e18e103de3f88cce2cd5f7248790eeee1bcef100c287e0a6aee7eb03fd1-filelists.sqlite.bz2 + ├── e0675d7d49382249e902ca1937e904e3ab39ea798704e1b7638c047ea017cc25-primary.sqlite.bz2 + ├── edc8d257b7c5e25edef9160935cfafb0fdfb86a32f22b2f9a7bdf266f2aa7647-filelists.xml.gz + └── repomd.xml + +1 directory, 10 files +``` + + +### Rocky Linux 9 + +``` +$ ./tools/testpackages9 + +$ tree openqa-testrepo-1 +openqa-testrepo-1 +├── acpica-tools-1-1.noarch.rpm +├── pandoc-common-1-1.noarch.rpm +├── README +└── repodata + ├── 040b7b4eeb5eb795f50a24d01b9108db0c9d202ef5b593768a03e746545e7930-filelists.xml.gz + ├── 274e3829951600902693358c55990d9e9c1e0335a38d5b24a49a303d4fcd953a-primary.sqlite.bz2 + ├── 39a14b96bdeb72585a76cc58f613eaaaca3a3075181b302feeb9acf16a26b620-other.sqlite.bz2 + ├── 6bb78cc6422fa5cfd7e0c8bb8d5c32025ae3c1a877895e5819a75aea3b114a03-other.xml.gz + ├── 8b6c7c9a7f81fdfbe89ce090589207b1842af2681f16d98b599b1ee9b74f63b3-primary.xml.gz + ├── b271b1890dd76d5dd7644639d848f2527a0787d77ae497d2438680cba18aa990-filelists.sqlite.bz2 + └── repomd.xml + +1 directory, 10 files +``` diff --git a/openqa-testrepo-1/README b/openqa-testrepo-1/README new file mode 100644 index 0000000..9d76d45 --- /dev/null +++ b/openqa-testrepo-1/README @@ -0,0 +1,4 @@ +This repository contains empty test packages for openQA package +management tool testing. The repository and packages were created with the +'tools/testpackages8' script from the openqa-testrepos repository: +https://git.resf.org/testing/openqa-testrepos diff --git a/openqa-testrepo-1/acpica-tools-1-1.noarch.rpm b/openqa-testrepo-1/acpica-tools-1-1.noarch.rpm new file mode 100644 index 0000000..516e031 Binary files /dev/null and b/openqa-testrepo-1/acpica-tools-1-1.noarch.rpm differ diff --git a/openqa-testrepo-1/Packages/pandoc-common-1-1.noarch.rpm b/openqa-testrepo-1/pandoc-common-1-1.noarch.rpm similarity index 71% rename from openqa-testrepo-1/Packages/pandoc-common-1-1.noarch.rpm rename to openqa-testrepo-1/pandoc-common-1-1.noarch.rpm index 688e90e..39a8ff5 100644 Binary files a/openqa-testrepo-1/Packages/pandoc-common-1-1.noarch.rpm and b/openqa-testrepo-1/pandoc-common-1-1.noarch.rpm differ diff --git a/openqa-testrepo-1/repodata/26935fe1816e282150f671c328808b740b7bc3ad42ecca2bb39d76452754fb12-other.sqlite.bz2 b/openqa-testrepo-1/repodata/26935fe1816e282150f671c328808b740b7bc3ad42ecca2bb39d76452754fb12-other.sqlite.bz2 new file mode 100644 index 0000000..6f2d9ff Binary files /dev/null and b/openqa-testrepo-1/repodata/26935fe1816e282150f671c328808b740b7bc3ad42ecca2bb39d76452754fb12-other.sqlite.bz2 differ diff --git a/openqa-testrepo-1/repodata/27ae97301a166cd3c889cbb34e2b9474c84fb987d9aad2486d6f8ff8d689c6c2-primary.xml.gz b/openqa-testrepo-1/repodata/27ae97301a166cd3c889cbb34e2b9474c84fb987d9aad2486d6f8ff8d689c6c2-primary.xml.gz deleted file mode 100644 index fafcce4..0000000 Binary files a/openqa-testrepo-1/repodata/27ae97301a166cd3c889cbb34e2b9474c84fb987d9aad2486d6f8ff8d689c6c2-primary.xml.gz and /dev/null differ diff --git a/openqa-testrepo-1/repodata/3fa758dde6e9328d318ad0f3b245565a3b7eee2bcdfca60795cd9815520dc316-filelists.xml.gz b/openqa-testrepo-1/repodata/3fa758dde6e9328d318ad0f3b245565a3b7eee2bcdfca60795cd9815520dc316-filelists.xml.gz new file mode 100644 index 0000000..d79c7bd Binary files /dev/null and b/openqa-testrepo-1/repodata/3fa758dde6e9328d318ad0f3b245565a3b7eee2bcdfca60795cd9815520dc316-filelists.xml.gz differ diff --git a/openqa-testrepo-1/repodata/5e9b69a2fb1cd170ffe391487aa26be04d89f241ecce945a18d84ecf5cc794f5-other.xml.gz b/openqa-testrepo-1/repodata/5e9b69a2fb1cd170ffe391487aa26be04d89f241ecce945a18d84ecf5cc794f5-other.xml.gz new file mode 100644 index 0000000..42c1352 Binary files /dev/null and b/openqa-testrepo-1/repodata/5e9b69a2fb1cd170ffe391487aa26be04d89f241ecce945a18d84ecf5cc794f5-other.xml.gz differ diff --git a/openqa-testrepo-1/repodata/67e5f84f66eeaff16106aca978e0e0bf966ba05467c4bd9ad0f37fe8b083f6c1-filelists.sqlite.bz2 b/openqa-testrepo-1/repodata/67e5f84f66eeaff16106aca978e0e0bf966ba05467c4bd9ad0f37fe8b083f6c1-filelists.sqlite.bz2 deleted file mode 100644 index f4ab1a0..0000000 Binary files a/openqa-testrepo-1/repodata/67e5f84f66eeaff16106aca978e0e0bf966ba05467c4bd9ad0f37fe8b083f6c1-filelists.sqlite.bz2 and /dev/null differ diff --git a/openqa-testrepo-1/repodata/94339dfd9b7491b3f237654307fd0256f79ff2598a2618a2a03f9e58979031cf-filelists.sqlite.bz2 b/openqa-testrepo-1/repodata/94339dfd9b7491b3f237654307fd0256f79ff2598a2618a2a03f9e58979031cf-filelists.sqlite.bz2 new file mode 100644 index 0000000..1af0290 Binary files /dev/null and b/openqa-testrepo-1/repodata/94339dfd9b7491b3f237654307fd0256f79ff2598a2618a2a03f9e58979031cf-filelists.sqlite.bz2 differ diff --git a/openqa-testrepo-1/repodata/959374c7ce5bf7090059d5ccb2bb873e05e5a6765b965cd4aa028045cfd6eb64-primary.sqlite.bz2 b/openqa-testrepo-1/repodata/959374c7ce5bf7090059d5ccb2bb873e05e5a6765b965cd4aa028045cfd6eb64-primary.sqlite.bz2 deleted file mode 100644 index 5f1e50b..0000000 Binary files a/openqa-testrepo-1/repodata/959374c7ce5bf7090059d5ccb2bb873e05e5a6765b965cd4aa028045cfd6eb64-primary.sqlite.bz2 and /dev/null differ diff --git a/openqa-testrepo-1/repodata/9fa3b0a4d0e160140cc533ce1fef61e8b6e5c7f33765c142a0cd936d98a772ef-primary.xml.gz b/openqa-testrepo-1/repodata/9fa3b0a4d0e160140cc533ce1fef61e8b6e5c7f33765c142a0cd936d98a772ef-primary.xml.gz new file mode 100644 index 0000000..e3112b7 Binary files /dev/null and b/openqa-testrepo-1/repodata/9fa3b0a4d0e160140cc533ce1fef61e8b6e5c7f33765c142a0cd936d98a772ef-primary.xml.gz differ diff --git a/openqa-testrepo-1/repodata/a1bc71e37cfd3bfa5af96572272fb7a8dc705107e00e96415fe05258e4a568da-filelists.xml.gz b/openqa-testrepo-1/repodata/a1bc71e37cfd3bfa5af96572272fb7a8dc705107e00e96415fe05258e4a568da-filelists.xml.gz deleted file mode 100644 index 41fc0e8..0000000 Binary files a/openqa-testrepo-1/repodata/a1bc71e37cfd3bfa5af96572272fb7a8dc705107e00e96415fe05258e4a568da-filelists.xml.gz and /dev/null differ diff --git a/openqa-testrepo-1/repodata/a31754daacb6dafa2e545cbc2cff9390cbc8b81dd71f2296853833cfab616a06-other.xml.gz b/openqa-testrepo-1/repodata/a31754daacb6dafa2e545cbc2cff9390cbc8b81dd71f2296853833cfab616a06-other.xml.gz deleted file mode 100644 index cc7d6b5..0000000 Binary files a/openqa-testrepo-1/repodata/a31754daacb6dafa2e545cbc2cff9390cbc8b81dd71f2296853833cfab616a06-other.xml.gz and /dev/null differ diff --git a/openqa-testrepo-1/repodata/c98f712fab78814531cb01234d603d299aac3efbeb433e92996a5410b995f96b-other.sqlite.bz2 b/openqa-testrepo-1/repodata/c98f712fab78814531cb01234d603d299aac3efbeb433e92996a5410b995f96b-other.sqlite.bz2 deleted file mode 100644 index 238452c..0000000 Binary files a/openqa-testrepo-1/repodata/c98f712fab78814531cb01234d603d299aac3efbeb433e92996a5410b995f96b-other.sqlite.bz2 and /dev/null differ diff --git a/openqa-testrepo-1/repodata/d7b3175980f35ce5cec23a8ff3e5a215521b843fdd8968e2ef5367e4489ce1f9-primary.sqlite.bz2 b/openqa-testrepo-1/repodata/d7b3175980f35ce5cec23a8ff3e5a215521b843fdd8968e2ef5367e4489ce1f9-primary.sqlite.bz2 new file mode 100644 index 0000000..f2eb5d2 Binary files /dev/null and b/openqa-testrepo-1/repodata/d7b3175980f35ce5cec23a8ff3e5a215521b843fdd8968e2ef5367e4489ce1f9-primary.sqlite.bz2 differ diff --git a/openqa-testrepo-1/repodata/repomd.xml b/openqa-testrepo-1/repodata/repomd.xml index 6045b8d..2dea01b 100644 --- a/openqa-testrepo-1/repodata/repomd.xml +++ b/openqa-testrepo-1/repodata/repomd.xml @@ -1,54 +1,54 @@ - 1682811794 + 1703880781 - 27ae97301a166cd3c889cbb34e2b9474c84fb987d9aad2486d6f8ff8d689c6c2 - ec579255111b2b6b3a066b7ac203fcc53d51584b76803f2f22221241323521d2 - - 1682811794 - 585 - 1129 + 9fa3b0a4d0e160140cc533ce1fef61e8b6e5c7f33765c142a0cd936d98a772ef + 7e8275da284c3e5cbfa40bd2c3faac6431b184a73ec4080e3b31ac3d68cf46e5 + + 1703880781 + 755 + 2223 - a1bc71e37cfd3bfa5af96572272fb7a8dc705107e00e96415fe05258e4a568da - 315fd13dbbb4a0a08771aa6e25a0fcfb10c43924c7b7199cbc5f0ff8569e22ac - - 1682811794 - 229 - 293 + 3fa758dde6e9328d318ad0f3b245565a3b7eee2bcdfca60795cd9815520dc316 + 047cd3a935e477c164f93f3512356a1050e995e33519d258906c6fce45c92ff3 + + 1703880781 + 287 + 460 - a31754daacb6dafa2e545cbc2cff9390cbc8b81dd71f2296853833cfab616a06 - 62367dbca00f1ee5ce5fc1a404c7bc0b31b827bc10d1b4f2893443d545f5f996 - - 1682811794 - 298 - 399 + 5e9b69a2fb1cd170ffe391487aa26be04d89f241ecce945a18d84ecf5cc794f5 + 5cb3b3e9506bc9375bb04eb5c053597991d590c6a0cf4f19f371c9c9b862592e + + 1703880781 + 361 + 676 - 959374c7ce5bf7090059d5ccb2bb873e05e5a6765b965cd4aa028045cfd6eb64 - 620c05308c34476b14d3fabb12dc2259f20a712cdd0e00e8a7914d2db183f3aa - - 1682811794 - 1695 + d7b3175980f35ce5cec23a8ff3e5a215521b843fdd8968e2ef5367e4489ce1f9 + 7e0f4ae41bb3a1da0a673382feedf22a7fd1c816b1151f12cb9f1bc38142d48d + + 1703880781 + 1974 106496 10 - 67e5f84f66eeaff16106aca978e0e0bf966ba05467c4bd9ad0f37fe8b083f6c1 - 40a94303f1a046be47d9f6ea8b4274917c9722736bbd04eda23ef65aa8ed5665 - - 1682811794 - 675 + 94339dfd9b7491b3f237654307fd0256f79ff2598a2618a2a03f9e58979031cf + 40f81925dbdc1c4fc48da78d750dd3954e15e85fdd20312d1f9080a1d6c3c21f + + 1703880781 + 761 28672 10 - c98f712fab78814531cb01234d603d299aac3efbeb433e92996a5410b995f96b - 6d195673fc7c4c64d819064b6ee26d1fa6b1eb8f7442deb5bc6e253d33d7e04b - - 1682811794 - 739 + 26935fe1816e282150f671c328808b740b7bc3ad42ecca2bb39d76452754fb12 + 7ae041f0d6649e66e9b813d680f1afc61d98763ccd89b64fba57eca373db62be + + 1703880781 + 849 24576 10 diff --git a/pandoc-common.spec b/pandoc-common.spec deleted file mode 100644 index 96e19bd..0000000 --- a/pandoc-common.spec +++ /dev/null @@ -1,26 +0,0 @@ -Name: pandoc-common -Version: 1 -Release: 1 -License: GPL -Group: Applications/Productivity -Summary: Dummy summary -BuildArch: noarch - -%description -This is a dummy description.- - -%prep - - -%build - - -%install - - -%files - - -%changelog -* Sat Apr 29 2023 John Doe - 1-1 -- Initial version diff --git a/tools/testpackages8 b/tools/testpackages8 new file mode 100755 index 0000000..4849e6e --- /dev/null +++ b/tools/testpackages8 @@ -0,0 +1,78 @@ +#!/usr/bin/env python3 + +# Copyright Red Hat +# +# This script 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 3 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 . +# +# Author: Adam Williamson +# Modifications: Trevor Cooper + +# Original Source: https://pagure.io/fedora-qa/qa-misc/blob/master/f/testpackages + +# Script to create test packages and repos (currently, a single repo +# containing a fake acpica-tools package) for openQA package +# management testing. + +import os +import shutil +import sys + +import rpmfluff + +# The concept behind using a fake (low-versioned) acpica-tools is +# so we can test updating from the official repos. It gives us a 99% +# assurance we have a package we will be able to update, as it's a +# very simple package that has minimal dependencies and rarely +# changes. It is not critical path, so updates to it do not themselves +# get tested (which can produce odd consequences and is why we no +# longer use python3-kickstart). It is present in both Rocky Linux 8 +# Rocky Linux 9 as well as in upstream Fedora mainline and Fedora ELN +# allowing us to match upstream changes more easily. + +pkgacpi = rpmfluff.SimpleRpmBuild('acpica-tools', '1', '1', ['noarch']) +pkgacpi.addVendor("Rocky Enterprise Software Foundation") +pkgacpi.addPackager("Rocky Linux Build System (Peridot) ") + +# temporary, while we're switching from pandoc to acpi +pkgpandoc = rpmfluff.SimpleRpmBuild('pandoc-common', '1', '1', ['noarch']) +pkgpandoc.addVendor("Rocky Enterprise Software Foundation") +pkgpandoc.addPackager("Rocky Linux Koji ") + +repo1 = rpmfluff.YumRepoBuild([pkgacpi, pkgpandoc]) +repo1dir = 'openqa-testrepo-1' + +def cleanup(repos=True): + dirs = [pkgacpi.get_base_dir(), pkgpandoc.get_base_dir()] + if repos: + dirs.extend((repo1dir,)) + for _dir in dirs: + if os.path.isdir(_dir): + shutil.rmtree(_dir) + +cleanup() + +os.mkdir(repo1dir) +repo1.repoDir = repo1dir +repo1.make('noarch') + +README = """This repository contains empty test packages for openQA package +management tool testing. The repository and packages were created with the +'tools/testpackages8' script from the openqa-testrepos repository: +https://git.resf.org/testing/openqa-testrepos +""" + +with open('/'.join((repo1dir, 'README')), 'w') as rmfh: + rmfh.write(README) + +cleanup(repos=False) diff --git a/tools/testpackages9 b/tools/testpackages9 new file mode 100755 index 0000000..f16d3e3 --- /dev/null +++ b/tools/testpackages9 @@ -0,0 +1,79 @@ +#!/usr/bin/env python3 + +# Copyright Red Hat +# +# This script 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 3 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 . +# +# Author: Adam Williamson +# Modifications: Trevor Cooper + +# Original Source: https://pagure.io/fedora-qa/qa-misc/blob/master/f/testpackages + +# Script to create test packages and repos (currently, a single repo +# containing a fake acpica-tools package) for openQA package +# management testing. + +import os +import shutil +import sys + +import rpmfluff +import rpmfluff.yumrepobuild + +# The concept behind using a fake (low-versioned) acpica-tools is +# so we can test updating from the official repos. It gives us a 99% +# assurance we have a package we will be able to update, as it's a +# very simple package that has minimal dependencies and rarely +# changes. It is not critical path, so updates to it do not themselves +# get tested (which can produce odd consequences and is why we no +# longer use python3-kickstart). It is present in both Rocky Linux 8 +# Rocky Linux 9 as well as in upstream Fedora mainline and Fedora ELN +# allowing us to match upstream changes more easily. + +pkgacpi = rpmfluff.SimpleRpmBuild('acpica-tools', '1', '1', ['noarch']) +pkgacpi.addVendor("Rocky Enterprise Software Foundation") +pkgacpi.addPackager("Rocky Linux Build System (Peridot) ") + +# temporary, while we're switching from pandoc to acpi +pkgpandoc = rpmfluff.SimpleRpmBuild('pandoc-common', '1', '1', ['noarch']) +pkgpandoc.addVendor("Rocky Enterprise Software Foundation") +pkgpandoc.addPackager("Rocky Linux Build System (Peridot) ") + +repo1 = rpmfluff.yumrepobuild.YumRepoBuild([pkgacpi, pkgpandoc]) +repo1dir = 'openqa-testrepo-1' + +def cleanup(repos=True): + dirs = [pkgacpi.get_base_dir(), pkgpandoc.get_base_dir()] + if repos: + dirs.extend((repo1dir,)) + for _dir in dirs: + if os.path.isdir(_dir): + shutil.rmtree(_dir) + +cleanup() + +os.mkdir(repo1dir) +repo1.repoDir = repo1dir +repo1.make('noarch') + +README = """This repository contains empty test packages for openQA package +management tool testing. The repository and packages were created with the +'tools/testpackages9' script from the openqa-testrepos repository: +https://git.resf.org/testing/openqa-testrepos +""" + +with open('/'.join((repo1dir, 'README')), 'w') as rmfh: + rmfh.write(README) + +cleanup(repos=False)