import osbuild-composer-31-1.el8
This commit is contained in:
parent
f5fcf073a4
commit
ddee701866
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
SOURCES/osbuild-composer-28.6.tar.gz
|
||||
SOURCES/osbuild-composer-31.tar.gz
|
||||
|
@ -1 +1 @@
|
||||
1f4e8612339d328ce758d3bc6eb61f7f9cb92d88 SOURCES/osbuild-composer-28.6.tar.gz
|
||||
19802162d8deb87d67389a8bfd6f1fd162d54c7c SOURCES/osbuild-composer-31.tar.gz
|
||||
|
@ -0,0 +1,75 @@
|
||||
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
|
||||
|
10794
SOURCES/0002-PR-1638-fix-ami.patch
Normal file
10794
SOURCES/0002-PR-1638-fix-ami.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -4,14 +4,16 @@
|
||||
|
||||
%global goipath github.com/osbuild/osbuild-composer
|
||||
|
||||
Version: 28.6
|
||||
Version: 31
|
||||
|
||||
%gometa
|
||||
|
||||
%global common_description %{expand:
|
||||
An image building service based on osbuild
|
||||
It is inspired by lorax-composer and exposes the same API.
|
||||
As such, it is a drop-in replacement.
|
||||
A service for building customized OS artifacts, such as VM images and OSTree
|
||||
commits, that uses osbuild under the hood. Besides building images for local
|
||||
usage, it can also upload images directly to cloud.
|
||||
|
||||
It is compatible with composer-cli and cockpit-composer clients.
|
||||
}
|
||||
|
||||
Name: osbuild-composer
|
||||
@ -26,7 +28,8 @@ ExcludeArch: i686
|
||||
License: ASL 2.0
|
||||
URL: %{gourl}
|
||||
Source0: %{gosource}
|
||||
|
||||
Patch0: 0001-PR-1645-test-image-fix-pipeline-exports-for-v2-manifests.patch
|
||||
Patch1: 0002-PR-1638-fix-ami.patch
|
||||
|
||||
BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang}
|
||||
BuildRequires: systemd
|
||||
@ -45,6 +48,7 @@ BuildRequires: golang(github.com/coreos/go-systemd/activation)
|
||||
BuildRequires: golang(github.com/deepmap/oapi-codegen/pkg/codegen)
|
||||
BuildRequires: golang(github.com/go-chi/chi)
|
||||
BuildRequires: golang(github.com/google/uuid)
|
||||
BuildRequires: golang(github.com/jackc/pgx/v4)
|
||||
BuildRequires: golang(github.com/julienschmidt/httprouter)
|
||||
BuildRequires: golang(github.com/getkin/kin-openapi/openapi3)
|
||||
BuildRequires: golang(github.com/kolo/xmlrpc)
|
||||
@ -52,9 +56,12 @@ BuildRequires: golang(github.com/labstack/echo/v4)
|
||||
BuildRequires: golang(github.com/gobwas/glob)
|
||||
BuildRequires: golang(github.com/google/go-cmp/cmp)
|
||||
BuildRequires: golang(github.com/gophercloud/gophercloud)
|
||||
BuildRequires: golang(github.com/prometheus/client_golang/prometheus/promhttp)
|
||||
BuildRequires: golang(github.com/stretchr/testify/assert)
|
||||
BuildRequires: golang(github.com/ubccr/kerby)
|
||||
BuildRequires: golang(github.com/vmware/govmomi)
|
||||
BuildRequires: golang(cloud.google.com/go)
|
||||
BuildRequires: golang(gopkg.in/ini.v1)
|
||||
%endif
|
||||
|
||||
Requires: %{name}-core = %{version}-%{release}
|
||||
@ -91,20 +98,13 @@ Obsoletes: osbuild-composer-koji <= 23
|
||||
%goprep
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora} && 0%{?fedora} <= 32
|
||||
# Fedora 32 and older ships different kolo/xmlrpc and azure/azblob APIs. We
|
||||
# cannot specify build tags in gobuild macro because the macro itself
|
||||
# specifies build tags and -tags argument cannot be used more than once.
|
||||
# Therefore, this ugly hack with build tags switcharoo is required.
|
||||
# Remove when F32 is EOL.
|
||||
|
||||
# Remove the build constraint from the wrappers of the old APIs
|
||||
sed -i "s$// +build kolo_xmlrpc_oldapi$// +build !kolo_xmlrpc_oldapi$" internal/upload/koji/xmlrpc-response-oldapi.go
|
||||
sed -i "s$// +build azblob_oldapi$// +build !azblob_oldapi$" internal/upload/azure/page_blob_url_oldapi.go
|
||||
|
||||
# Add a build constraint to the wrappers of the new APIs
|
||||
sed -i "s$// +build !kolo_xmlrpc_oldapi$// +build kolo_xmlrpc_oldapi$" internal/upload/koji/xmlrpc-response.go
|
||||
sed -i "s$// +build !azblob_oldapi$// +build azblob_oldapi$" internal/upload/azure/page_blob_url.go
|
||||
%if 0%{?fedora} >= 34
|
||||
# Fedora 34 and newer ships a newer version of github.com/getkin/kin-openapi
|
||||
# package which has a different API than the older ones. Let's make the auto-
|
||||
# generated code compatible by applying some sed magic.
|
||||
#
|
||||
# Remove when F33 is EOL
|
||||
sed -i "s/openapi3.Swagger/openapi3.T/;s/openapi3.NewSwaggerLoader().LoadSwaggerFromData/openapi3.NewLoader().LoadFromData/" internal/cloudapi/openapi.gen.go
|
||||
%endif
|
||||
|
||||
%build
|
||||
@ -145,6 +145,7 @@ go test -c -tags=integration -ldflags="${TEST_LDFLAGS}" -o _bin/osbuild-weldr-te
|
||||
go test -c -tags=integration -ldflags="${TEST_LDFLAGS}" -o _bin/osbuild-image-tests %{goipath}/cmd/osbuild-image-tests
|
||||
go test -c -tags=integration -ldflags="${TEST_LDFLAGS}" -o _bin/osbuild-auth-tests %{goipath}/cmd/osbuild-auth-tests
|
||||
go test -c -tags=integration -ldflags="${TEST_LDFLAGS}" -o _bin/osbuild-koji-tests %{goipath}/cmd/osbuild-koji-tests
|
||||
go test -c -tags=integration -ldflags="${TEST_LDFLAGS}" -o _bin/osbuild-composer-dbjobqueue-tests %{goipath}/cmd/osbuild-composer-dbjobqueue-tests
|
||||
go build -tags=integration -ldflags="${TEST_LDFLAGS}" -o _bin/cloud-cleaner %{goipath}/cmd/cloud-cleaner
|
||||
|
||||
%endif
|
||||
@ -178,9 +179,12 @@ install -m 0755 -vp _bin/osbuild-dnf-json-tests %{buildroot}%{_l
|
||||
install -m 0755 -vp _bin/osbuild-image-tests %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
||||
install -m 0755 -vp _bin/osbuild-auth-tests %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
||||
install -m 0755 -vp _bin/osbuild-koji-tests %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
||||
install -m 0755 -vp _bin/osbuild-composer-dbjobqueue-tests %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
||||
install -m 0755 -vp _bin/cloud-cleaner %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
||||
install -m 0755 -vp tools/define-compose-url.sh %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
||||
install -m 0755 -vp tools/provision.sh %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
||||
install -m 0755 -vp tools/gen-certs.sh %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
||||
install -m 0755 -vp tools/gen-ssh.sh %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
||||
install -m 0755 -vp tools/image-info %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
||||
install -m 0755 -vp tools/run-koji-container.sh %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
||||
install -m 0755 -vp tools/koji-compose.py %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
||||
@ -203,6 +207,9 @@ install -m 0644 -vp test/data/cloud-init/* %{buildroot}%{_d
|
||||
install -m 0755 -vd %{buildroot}%{_datadir}/tests/osbuild-composer/composer
|
||||
install -m 0644 -vp test/data/composer/* %{buildroot}%{_datadir}/tests/osbuild-composer/composer/
|
||||
|
||||
install -m 0755 -vd %{buildroot}%{_datadir}/tests/osbuild-composer/worker
|
||||
install -m 0644 -vp test/data/worker/* %{buildroot}%{_datadir}/tests/osbuild-composer/worker/
|
||||
|
||||
install -m 0755 -vd %{buildroot}%{_datadir}/tests/osbuild-composer/repositories
|
||||
install -m 0644 -vp test/data/repositories/* %{buildroot}%{_datadir}/tests/osbuild-composer/repositories/
|
||||
|
||||
@ -219,6 +226,9 @@ install -m 0644 -vp test/data/koji/* %{buildroot}%{_d
|
||||
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 0755 -vd %{buildroot}%{_datadir}/tests/osbuild-composer/schemas
|
||||
install -m 0644 -vp internal/jobqueue/dbjobqueue/schemas/* %{buildroot}%{_datadir}/tests/osbuild-composer/schemas/
|
||||
|
||||
%endif
|
||||
|
||||
%check
|
||||
@ -267,8 +277,8 @@ The core osbuild-composer binary. This is suitable both for spawning in containe
|
||||
Summary: The worker for osbuild-composer
|
||||
Requires: systemd
|
||||
Requires: qemu-img
|
||||
Requires: osbuild >= 27.2
|
||||
Requires: osbuild-ostree >= 27.2
|
||||
Requires: osbuild >= 29
|
||||
Requires: osbuild-ostree >= 29
|
||||
|
||||
# remove in F34
|
||||
Obsoletes: golang-github-osbuild-composer-worker < %{version}-%{release}
|
||||
@ -305,7 +315,7 @@ Summary: Integration tests
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: composer-cli
|
||||
Requires: createrepo_c
|
||||
Requires: genisoimage
|
||||
Requires: xorriso
|
||||
Requires: qemu-kvm-core
|
||||
Requires: systemd-container
|
||||
Requires: jq
|
||||
@ -334,8 +344,11 @@ Requires: virt-install
|
||||
Requires: expect
|
||||
Requires: python3-lxml
|
||||
Requires: httpd
|
||||
Requires: mod_ssl
|
||||
Requires: openssl
|
||||
Requires: podman-plugins
|
||||
Requires: dnf-plugins-core
|
||||
Requires: skopeo
|
||||
%if 0%{?fedora}
|
||||
# koji and ansible are not in RHEL repositories. Depending on them breaks RHEL
|
||||
# gating (see OSCI-1541). The test script must enable EPEL and install those
|
||||
@ -358,22 +371,7 @@ Integration tests to be run on a pristine-dedicated system to test the osbuild-c
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Apr 27 2021 Achilleas Koutsou <achilleas@redhat.com> - 28.6-1
|
||||
- New upstream release (rhbz#1955094)
|
||||
|
||||
* Fri Apr 23 2021 Achilleas Koutsou <achilleas@redhat.com> - 28.5-1
|
||||
- New upstream release (rhbz#1951192)
|
||||
|
||||
* Fri Apr 09 2021 Ondrej Budai <obudai@redhat.com> - 28.4-1
|
||||
- New upstream release
|
||||
|
||||
* Mon Mar 22 2021 Ondrej Budai <obudai@redhat.com> - 28.3-1
|
||||
- New upstream release
|
||||
|
||||
* Thu Mar 18 2021 Ondrej Budai <obudai@redhat.com> - 28.2-1
|
||||
- New upstream release
|
||||
|
||||
* Wed Mar 17 2021 Ondrej Budai <obudai@redhat.com> - 28.1-1
|
||||
* Thu Aug 12 2021 Ondřej Budai <ondrej@budai.cz> - 31-1
|
||||
- New upstream release
|
||||
|
||||
* Sat Feb 20 2021 Martin Sehnoutka <msehnout@redhat.com> - 28-1
|
||||
|
Loading…
Reference in New Issue
Block a user