Compare commits
3 Commits
b13f03ab1f
...
4a41177e5c
Author | SHA1 | Date | |
---|---|---|---|
4a41177e5c | |||
0110f90cef | |||
9fa4823273 |
153
README.md
153
README.md
@ -1,3 +1,154 @@
|
|||||||
# openqa-testrepos
|
# openqa-testrepos
|
||||||
|
|
||||||
Testing repository content for openQA
|
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
|
||||||
|
...<snip>...
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
...<snip>...
|
||||||
|
|
||||||
|
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 `python3-rpmfluff` (and dependencies) packages are installed, one 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
|
||||||
|
```
|
||||||
|
4
openqa-testrepo-1/README
Normal file
4
openqa-testrepo-1/README
Normal file
@ -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
|
BIN
openqa-testrepo-1/acpica-tools-1-1.noarch.rpm
Normal file
BIN
openqa-testrepo-1/acpica-tools-1-1.noarch.rpm
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,54 +1,54 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<repomd xmlns="http://linux.duke.edu/metadata/repo" xmlns:rpm="http://linux.duke.edu/metadata/rpm">
|
<repomd xmlns="http://linux.duke.edu/metadata/repo" xmlns:rpm="http://linux.duke.edu/metadata/rpm">
|
||||||
<revision>1682811794</revision>
|
<revision>1703880781</revision>
|
||||||
<data type="primary">
|
<data type="primary">
|
||||||
<checksum type="sha256">27ae97301a166cd3c889cbb34e2b9474c84fb987d9aad2486d6f8ff8d689c6c2</checksum>
|
<checksum type="sha256">9fa3b0a4d0e160140cc533ce1fef61e8b6e5c7f33765c142a0cd936d98a772ef</checksum>
|
||||||
<open-checksum type="sha256">ec579255111b2b6b3a066b7ac203fcc53d51584b76803f2f22221241323521d2</open-checksum>
|
<open-checksum type="sha256">7e8275da284c3e5cbfa40bd2c3faac6431b184a73ec4080e3b31ac3d68cf46e5</open-checksum>
|
||||||
<location href="repodata/27ae97301a166cd3c889cbb34e2b9474c84fb987d9aad2486d6f8ff8d689c6c2-primary.xml.gz"/>
|
<location href="repodata/9fa3b0a4d0e160140cc533ce1fef61e8b6e5c7f33765c142a0cd936d98a772ef-primary.xml.gz"/>
|
||||||
<timestamp>1682811794</timestamp>
|
<timestamp>1703880781</timestamp>
|
||||||
<size>585</size>
|
<size>755</size>
|
||||||
<open-size>1129</open-size>
|
<open-size>2223</open-size>
|
||||||
</data>
|
</data>
|
||||||
<data type="filelists">
|
<data type="filelists">
|
||||||
<checksum type="sha256">a1bc71e37cfd3bfa5af96572272fb7a8dc705107e00e96415fe05258e4a568da</checksum>
|
<checksum type="sha256">3fa758dde6e9328d318ad0f3b245565a3b7eee2bcdfca60795cd9815520dc316</checksum>
|
||||||
<open-checksum type="sha256">315fd13dbbb4a0a08771aa6e25a0fcfb10c43924c7b7199cbc5f0ff8569e22ac</open-checksum>
|
<open-checksum type="sha256">047cd3a935e477c164f93f3512356a1050e995e33519d258906c6fce45c92ff3</open-checksum>
|
||||||
<location href="repodata/a1bc71e37cfd3bfa5af96572272fb7a8dc705107e00e96415fe05258e4a568da-filelists.xml.gz"/>
|
<location href="repodata/3fa758dde6e9328d318ad0f3b245565a3b7eee2bcdfca60795cd9815520dc316-filelists.xml.gz"/>
|
||||||
<timestamp>1682811794</timestamp>
|
<timestamp>1703880781</timestamp>
|
||||||
<size>229</size>
|
<size>287</size>
|
||||||
<open-size>293</open-size>
|
<open-size>460</open-size>
|
||||||
</data>
|
</data>
|
||||||
<data type="other">
|
<data type="other">
|
||||||
<checksum type="sha256">a31754daacb6dafa2e545cbc2cff9390cbc8b81dd71f2296853833cfab616a06</checksum>
|
<checksum type="sha256">5e9b69a2fb1cd170ffe391487aa26be04d89f241ecce945a18d84ecf5cc794f5</checksum>
|
||||||
<open-checksum type="sha256">62367dbca00f1ee5ce5fc1a404c7bc0b31b827bc10d1b4f2893443d545f5f996</open-checksum>
|
<open-checksum type="sha256">5cb3b3e9506bc9375bb04eb5c053597991d590c6a0cf4f19f371c9c9b862592e</open-checksum>
|
||||||
<location href="repodata/a31754daacb6dafa2e545cbc2cff9390cbc8b81dd71f2296853833cfab616a06-other.xml.gz"/>
|
<location href="repodata/5e9b69a2fb1cd170ffe391487aa26be04d89f241ecce945a18d84ecf5cc794f5-other.xml.gz"/>
|
||||||
<timestamp>1682811794</timestamp>
|
<timestamp>1703880781</timestamp>
|
||||||
<size>298</size>
|
<size>361</size>
|
||||||
<open-size>399</open-size>
|
<open-size>676</open-size>
|
||||||
</data>
|
</data>
|
||||||
<data type="primary_db">
|
<data type="primary_db">
|
||||||
<checksum type="sha256">959374c7ce5bf7090059d5ccb2bb873e05e5a6765b965cd4aa028045cfd6eb64</checksum>
|
<checksum type="sha256">d7b3175980f35ce5cec23a8ff3e5a215521b843fdd8968e2ef5367e4489ce1f9</checksum>
|
||||||
<open-checksum type="sha256">620c05308c34476b14d3fabb12dc2259f20a712cdd0e00e8a7914d2db183f3aa</open-checksum>
|
<open-checksum type="sha256">7e0f4ae41bb3a1da0a673382feedf22a7fd1c816b1151f12cb9f1bc38142d48d</open-checksum>
|
||||||
<location href="repodata/959374c7ce5bf7090059d5ccb2bb873e05e5a6765b965cd4aa028045cfd6eb64-primary.sqlite.bz2"/>
|
<location href="repodata/d7b3175980f35ce5cec23a8ff3e5a215521b843fdd8968e2ef5367e4489ce1f9-primary.sqlite.bz2"/>
|
||||||
<timestamp>1682811794</timestamp>
|
<timestamp>1703880781</timestamp>
|
||||||
<size>1695</size>
|
<size>1974</size>
|
||||||
<open-size>106496</open-size>
|
<open-size>106496</open-size>
|
||||||
<database_version>10</database_version>
|
<database_version>10</database_version>
|
||||||
</data>
|
</data>
|
||||||
<data type="filelists_db">
|
<data type="filelists_db">
|
||||||
<checksum type="sha256">67e5f84f66eeaff16106aca978e0e0bf966ba05467c4bd9ad0f37fe8b083f6c1</checksum>
|
<checksum type="sha256">94339dfd9b7491b3f237654307fd0256f79ff2598a2618a2a03f9e58979031cf</checksum>
|
||||||
<open-checksum type="sha256">40a94303f1a046be47d9f6ea8b4274917c9722736bbd04eda23ef65aa8ed5665</open-checksum>
|
<open-checksum type="sha256">40f81925dbdc1c4fc48da78d750dd3954e15e85fdd20312d1f9080a1d6c3c21f</open-checksum>
|
||||||
<location href="repodata/67e5f84f66eeaff16106aca978e0e0bf966ba05467c4bd9ad0f37fe8b083f6c1-filelists.sqlite.bz2"/>
|
<location href="repodata/94339dfd9b7491b3f237654307fd0256f79ff2598a2618a2a03f9e58979031cf-filelists.sqlite.bz2"/>
|
||||||
<timestamp>1682811794</timestamp>
|
<timestamp>1703880781</timestamp>
|
||||||
<size>675</size>
|
<size>761</size>
|
||||||
<open-size>28672</open-size>
|
<open-size>28672</open-size>
|
||||||
<database_version>10</database_version>
|
<database_version>10</database_version>
|
||||||
</data>
|
</data>
|
||||||
<data type="other_db">
|
<data type="other_db">
|
||||||
<checksum type="sha256">c98f712fab78814531cb01234d603d299aac3efbeb433e92996a5410b995f96b</checksum>
|
<checksum type="sha256">26935fe1816e282150f671c328808b740b7bc3ad42ecca2bb39d76452754fb12</checksum>
|
||||||
<open-checksum type="sha256">6d195673fc7c4c64d819064b6ee26d1fa6b1eb8f7442deb5bc6e253d33d7e04b</open-checksum>
|
<open-checksum type="sha256">7ae041f0d6649e66e9b813d680f1afc61d98763ccd89b64fba57eca373db62be</open-checksum>
|
||||||
<location href="repodata/c98f712fab78814531cb01234d603d299aac3efbeb433e92996a5410b995f96b-other.sqlite.bz2"/>
|
<location href="repodata/26935fe1816e282150f671c328808b740b7bc3ad42ecca2bb39d76452754fb12-other.sqlite.bz2"/>
|
||||||
<timestamp>1682811794</timestamp>
|
<timestamp>1703880781</timestamp>
|
||||||
<size>739</size>
|
<size>849</size>
|
||||||
<open-size>24576</open-size>
|
<open-size>24576</open-size>
|
||||||
<database_version>10</database_version>
|
<database_version>10</database_version>
|
||||||
</data>
|
</data>
|
||||||
|
@ -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 <jdoe@example.com> - 1-1
|
|
||||||
- Initial version
|
|
78
tools/testpackages8
Executable file
78
tools/testpackages8
Executable file
@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
# Author: Adam Williamson <awilliam@redhat.com>
|
||||||
|
# Modifications: Trevor Cooper <tcooper@rockylinux.org>
|
||||||
|
|
||||||
|
# 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) <releng@rockylinux.org>")
|
||||||
|
|
||||||
|
# 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 <releng@rockylinux.org>")
|
||||||
|
|
||||||
|
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)
|
79
tools/testpackages9
Executable file
79
tools/testpackages9
Executable file
@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
# Author: Adam Williamson <awilliam@redhat.com>
|
||||||
|
# Modifications: Trevor Cooper <tcooper@rockylinux.org>
|
||||||
|
|
||||||
|
# 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) <releng@rockylinux.org>")
|
||||||
|
|
||||||
|
# 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) <releng@rockylinux.org>")
|
||||||
|
|
||||||
|
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)
|
Loading…
Reference in New Issue
Block a user