import osbuild-composer-33-1.el8

This commit is contained in:
CentOS Sources 2021-08-31 04:21:20 +00:00 committed by Andrew Lukoshko
parent ddee701866
commit 23eb5daf69
6 changed files with 199 additions and 10876 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/osbuild-composer-31.tar.gz SOURCES/osbuild-composer-33.tar.gz

View File

@ -1 +1 @@
19802162d8deb87d67389a8bfd6f1fd162d54c7c SOURCES/osbuild-composer-31.tar.gz 18bdc85004f4f5bb687ce6c39fb9560897e659ff SOURCES/osbuild-composer-33.tar.gz

View File

@ -1,75 +0,0 @@
From 85cc7687415a96db017acaf763d53abbc47d993f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Budai?= <ondrej@budai.cz>
Date: Mon, 16 Aug 2021 12:56:55 +0200
Subject: [PATCH] test/image: fix pipeline exports for v2 manifests
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Previously, we just assumed that all test manifests are of version 1, or we
should export the pipeline named assembler. However, this is no longer true
in RHEL 8.5 and 9 - they are only manifest v2 and they don't have a pipeline
named assembler.
This commit introduces a new way to guess the export name - if the manifest
is of version 1, we just export the assembler. In the case v2 manifest, the
last pipeline is exported.
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
---
cmd/osbuild-image-tests/main_test.go | 32 +++++++++++++++++++++++++---
1 file changed, 29 insertions(+), 3 deletions(-)
diff --git a/cmd/osbuild-image-tests/main_test.go b/cmd/osbuild-image-tests/main_test.go
index f6cbccc9..f73bab3d 100644
--- a/cmd/osbuild-image-tests/main_test.go
+++ b/cmd/osbuild-image-tests/main_test.go
@@ -482,6 +482,34 @@ func testImage(t *testing.T, testcase testcaseStruct, imagePath string) {
}
}
+// guessPipelineToExport return a best-effort guess about which
+// pipeline should be exported when running osbuild for the testcase
+//
+// If this function detects that this is a version 1 manifest, it
+// always returns "assembler"
+//
+// For manifests version 2, the name of the last pipeline is returned.
+func guessPipelineToExport(rawManifest json.RawMessage) string {
+ const v1ManifestExportName = "assembler"
+ var v2Manifest struct {
+ Version string `json:"version"`
+ Pipelines []struct {
+ Name string `json:"name,omitempty"`
+ } `json:"pipelines"`
+ }
+ err := json.Unmarshal(rawManifest, &v2Manifest)
+ if err != nil {
+ // if we cannot unmarshal, let's just assume that it's a version 1 manifest
+ return v1ManifestExportName
+ }
+
+ if v2Manifest.Version == "2" {
+ return v2Manifest.Pipelines[len(v2Manifest.Pipelines)-1].Name
+ }
+
+ return v1ManifestExportName
+}
+
// runTestcase builds the pipeline specified in the testcase and then it
// tests the result
func runTestcase(t *testing.T, testcase testcaseStruct, store string) {
@@ -494,9 +522,7 @@ func runTestcase(t *testing.T, testcase testcaseStruct, store string) {
require.NoError(t, err, "error removing temporary output directory")
}()
- // NOTE(akoutsou) 1to2t: new v2 manifests name their last pipeline
- // "assembler" for compatibility with v1
- exports := []string{"assembler"}
+ exports := []string{guessPipelineToExport(testcase.Manifest)}
err = runOsbuild(testcase.Manifest, store, outputDirectory, exports)
require.NoError(t, err)
--
2.31.1

View File

@ -0,0 +1,181 @@
From 7c635fc6b0a45e1d54bea9caaaf4ba82447cfe3f Mon Sep 17 00:00:00 2001
From: Tom Gundersen <teg@jklm.no>
Date: Sun, 29 Aug 2021 14:59:24 +0000
Subject: [PATCH] test/rhel85/qcow2/custom: regenerate
Signed-off-by: Tom Gundersen <teg@jklm.no>
---
.../rhel_85-x86_64-qcow2-customize.json | 64 +++++++++++--------
1 file changed, 39 insertions(+), 25 deletions(-)
diff --git a/test/data/manifests/rhel_85-x86_64-qcow2-customize.json b/test/data/manifests/rhel_85-x86_64-qcow2-customize.json
index 18524628..c1e1632a 100644
--- a/test/data/manifests/rhel_85-x86_64-qcow2-customize.json
+++ b/test/data/manifests/rhel_85-x86_64-qcow2-customize.json
@@ -100,17 +100,17 @@
]
},
"filesystem": [
- {
- "mountpoint": "/",
- "minsize": 131072000
- },
{
"mountpoint": "/usr",
"minsize": 2147483648
},
{
"mountpoint": "/var",
- "minsize": 131072000
+ "minsize": 1073741824
+ },
+ {
+ "mountpoint": "/",
+ "minsize": 2147483648
}
]
}
@@ -477,6 +477,7 @@
"sha256:53849d779914a944acc126459911030c8ac8310ffcab354c6a7bcc4ef4af5bab",
"sha256:39f86feba904fc4c4a9a04a54576d6d3b4e9af344155aee9e4321c27b4742f0a",
"sha256:8c9c059292e68dfbdec942133c22ef69fb4113166def6ad66903a1973bc9bccb",
+ "sha256:d5130266a054d7cc7cbfe68f84a7dd8d1668518d87361235d12a993bc0750a5d",
"sha256:ee5595a39aa681b5d91f25d5e9415733ac47e92840af4baaaf6d2f802c78f212",
"sha256:47b0a16a1305e23104da6f2f29ee2e7cbede921528e5a35a9df080c085a04d78",
"sha256:1291973fb1c479d3d3dab62d7dbcda052ab998779a0eb2e45427d0e2257d8db4",
@@ -1451,8 +1452,8 @@
"uuid": "68B2905B-DF3E-4FB3-80FA-49D1E773AA33"
},
{
- "size": 16312220,
- "start": 4659200,
+ "size": 14471068,
+ "start": 6500352,
"type": "0FC63DAF-8483-4772-8E79-3D69D8477DE4",
"uuid": "6264D520-3FB9-423F-8AB8-7A0A8E3D3562"
},
@@ -1463,7 +1464,7 @@
"uuid": "6e4ff95f-f662-45ee-a82a-bdf44a2d0b75"
},
{
- "size": 256000,
+ "size": 2097152,
"start": 4403200,
"type": "0FC63DAF-8483-4772-8E79-3D69D8477DE4",
"uuid": "a178892e-e285-4ce1-9114-55780875d64e"
@@ -1506,8 +1507,8 @@
"type": "org.osbuild.loopback",
"options": {
"filename": "disk.img",
- "start": 4659200,
- "size": 16312220
+ "start": 6500352,
+ "size": 14471068
}
}
}
@@ -1539,7 +1540,7 @@
"options": {
"filename": "disk.img",
"start": 4403200,
- "size": 256000
+ "size": 2097152
}
}
}
@@ -1576,8 +1577,8 @@
"type": "org.osbuild.loopback",
"options": {
"filename": "disk.img",
- "start": 4659200,
- "size": 16312220
+ "start": 6500352,
+ "size": 14471068
}
},
"usr": {
@@ -1593,7 +1594,7 @@
"options": {
"filename": "disk.img",
"start": 4403200,
- "size": 256000
+ "size": 2097152
}
}
},
@@ -2921,6 +2922,9 @@
"sha256:d50174632033170dfd1d8125f132962872c0042711e44ed59e91f6d2d26071c0": {
"url": "https://rpmrepo.osbuild.org/v2/mirror/rhvpn/el8/el8-x86_64-baseos-n8.5-20210730/Packages/polkit-libs-0.115-12.el8.x86_64.rpm"
},
+ "sha256:d5130266a054d7cc7cbfe68f84a7dd8d1668518d87361235d12a993bc0750a5d": {
+ "url": "https://rpmrepo.osbuild.org/v2/mirror/rhvpn/el8/el8-x86_64-baseos-n8.5-20210730/Packages/efibootmgr-16-1.el8.x86_64.rpm"
+ },
"sha256:d570af0578f5b2c6225f1f2354404f65bccf91c3974e98dcbc0c7b55a61b9b46": {
"url": "https://rpmrepo.osbuild.org/v2/mirror/rhvpn/el8/el8-x86_64-baseos-n8.5-20210730/Packages/grep-3.1-6.el8.x86_64.rpm"
},
@@ -9354,6 +9358,15 @@
"remote_location": "https://rpmrepo.osbuild.org/v2/mirror/rhvpn/el8/el8-x86_64-baseos-n8.5-20210730/Packages/efi-filesystem-3-3.el8.noarch.rpm",
"checksum": "sha256:8c9c059292e68dfbdec942133c22ef69fb4113166def6ad66903a1973bc9bccb"
},
+ {
+ "name": "efibootmgr",
+ "epoch": 0,
+ "version": "16",
+ "release": "1.el8",
+ "arch": "x86_64",
+ "remote_location": "https://rpmrepo.osbuild.org/v2/mirror/rhvpn/el8/el8-x86_64-baseos-n8.5-20210730/Packages/efibootmgr-16-1.el8.x86_64.rpm",
+ "checksum": "sha256:d5130266a054d7cc7cbfe68f84a7dd8d1668518d87361235d12a993bc0750a5d"
+ },
{
"name": "efivar",
"epoch": 0,
@@ -13168,6 +13181,7 @@
"e2fsprogs-1.45.6-2.el8.x86_64",
"e2fsprogs-libs-1.45.6-2.el8.x86_64",
"efi-filesystem-3-3.el8.noarch",
+ "efibootmgr-16-1.el8.x86_64",
"efivar-37-4.el8.x86_64",
"efivar-libs-37-4.el8.x86_64",
"elfutils-debuginfod-client-0.185-1.el8.x86_64",
@@ -13603,6 +13617,16 @@
"type": "C12A7328-F81F-11D2-BA4B-00A0C93EC93B",
"uuid": "7B77-95E7"
},
+ {
+ "bootable": false,
+ "fstype": "xfs",
+ "label": "root",
+ "partuuid": "6264D520-3FB9-423F-8AB8-7A0A8E3D3562",
+ "size": 7409186816,
+ "start": 3328180224,
+ "type": "0FC63DAF-8483-4772-8E79-3D69D8477DE4",
+ "uuid": "e2d3d0d0-de6b-48f9-b44c-e85ff044c6b1"
+ },
{
"bootable": false,
"fstype": "xfs",
@@ -13618,20 +13642,10 @@
"fstype": "xfs",
"label": null,
"partuuid": "A178892E-E285-4CE1-9114-55780875D64E",
- "size": 131072000,
+ "size": 1073741824,
"start": 2254438400,
"type": "0FC63DAF-8483-4772-8E79-3D69D8477DE4",
"uuid": "fb180daf-48a7-4ee0-b10d-394651850fd4"
- },
- {
- "bootable": false,
- "fstype": "xfs",
- "label": "root",
- "partuuid": "6264D520-3FB9-423F-8AB8-7A0A8E3D3562",
- "size": 8351856640,
- "start": 2385510400,
- "type": "0FC63DAF-8483-4772-8E79-3D69D8477DE4",
- "uuid": "e2d3d0d0-de6b-48f9-b44c-e85ff044c6b1"
}
],
"passwd": [
--
2.31.1

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,7 @@
%global goipath github.com/osbuild/osbuild-composer %global goipath github.com/osbuild/osbuild-composer
Version: 31 Version: 33
%gometa %gometa
@ -28,8 +28,7 @@ ExcludeArch: i686
License: ASL 2.0 License: ASL 2.0
URL: %{gourl} URL: %{gourl}
Source0: %{gosource} Source0: %{gosource}
Patch0: 0001-PR-1645-test-image-fix-pipeline-exports-for-v2-manifests.patch Patch0: 0001-test-rhel85-qcow2-custom-regenerate.patch
Patch1: 0002-PR-1638-fix-ami.patch
BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang} BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang}
BuildRequires: systemd BuildRequires: systemd
@ -226,6 +225,9 @@ install -m 0644 -vp test/data/koji/* %{buildroot}%{_d
install -m 0755 -vd %{buildroot}%{_datadir}/tests/osbuild-composer/x509 install -m 0755 -vd %{buildroot}%{_datadir}/tests/osbuild-composer/x509
install -m 0644 -vp test/data/x509/* %{buildroot}%{_datadir}/tests/osbuild-composer/x509/ install -m 0644 -vp test/data/x509/* %{buildroot}%{_datadir}/tests/osbuild-composer/x509/
install -m 0755 -vd %{buildroot}%{_datadir}/tests/osbuild-composer/openshift
install -m 0644 -vp test/data/openshift/* %{buildroot}%{_datadir}/tests/osbuild-composer/openshift/
install -m 0755 -vd %{buildroot}%{_datadir}/tests/osbuild-composer/schemas install -m 0755 -vd %{buildroot}%{_datadir}/tests/osbuild-composer/schemas
install -m 0644 -vp internal/jobqueue/dbjobqueue/schemas/* %{buildroot}%{_datadir}/tests/osbuild-composer/schemas/ install -m 0644 -vp internal/jobqueue/dbjobqueue/schemas/* %{buildroot}%{_datadir}/tests/osbuild-composer/schemas/
@ -277,8 +279,8 @@ The core osbuild-composer binary. This is suitable both for spawning in containe
Summary: The worker for osbuild-composer Summary: The worker for osbuild-composer
Requires: systemd Requires: systemd
Requires: qemu-img Requires: qemu-img
Requires: osbuild >= 29 Requires: osbuild >= 30
Requires: osbuild-ostree >= 29 Requires: osbuild-ostree >= 30
# remove in F34 # remove in F34
Obsoletes: golang-github-osbuild-composer-worker < %{version}-%{release} Obsoletes: golang-github-osbuild-composer-worker < %{version}-%{release}
@ -346,7 +348,10 @@ Requires: python3-lxml
Requires: httpd Requires: httpd
Requires: mod_ssl Requires: mod_ssl
Requires: openssl Requires: openssl
# see https://bugzilla.redhat.com/show_bug.cgi?id=1986333
%if 0%{?rhel} && 0%{?rhel} != 9
Requires: podman-plugins Requires: podman-plugins
%endif
Requires: dnf-plugins-core Requires: dnf-plugins-core
Requires: skopeo Requires: skopeo
%if 0%{?fedora} %if 0%{?fedora}
@ -371,6 +376,12 @@ Integration tests to be run on a pristine-dedicated system to test the osbuild-c
%endif %endif
%changelog %changelog
* Mon Aug 30 2021 Tom Gundersen <teg@jklm.no> - 33-1
- New upstream release
* Sun Aug 29 2021 Tom Gundersen <teg@jklm.no> - 32-2
- New upstream release
* Thu Aug 12 2021 Ondřej Budai <ondrej@budai.cz> - 31-1 * Thu Aug 12 2021 Ondřej Budai <ondrej@budai.cz> - 31-1
- New upstream release - New upstream release