import osbuild-composer-45-1.el8
This commit is contained in:
parent
c068e9173b
commit
882769a6ed
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
SOURCES/osbuild-composer-33.tar.gz
|
SOURCES/osbuild-composer-45.tar.gz
|
||||||
|
@ -1 +1 @@
|
|||||||
18bdc85004f4f5bb687ce6c39fb9560897e659ff SOURCES/osbuild-composer-33.tar.gz
|
47108ba5c6070459880624ec2ab065e110fc01f0 SOURCES/osbuild-composer-45.tar.gz
|
||||||
|
@ -1,181 +0,0 @@
|
|||||||
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
|
|
||||||
|
|
@ -2,9 +2,14 @@
|
|||||||
# Pass --with tests to rpmbuild to override
|
# Pass --with tests to rpmbuild to override
|
||||||
%bcond_with tests
|
%bcond_with tests
|
||||||
|
|
||||||
|
# When --with relax_requires is specified osbuild-composer-tests
|
||||||
|
# will require osbuild-composer only by name, excluding version/release
|
||||||
|
# This is used internally during nightly pipeline testing!
|
||||||
|
%bcond_with relax_requires
|
||||||
|
|
||||||
%global goipath github.com/osbuild/osbuild-composer
|
%global goipath github.com/osbuild/osbuild-composer
|
||||||
|
|
||||||
Version: 33
|
Version: 45
|
||||||
|
|
||||||
%gometa
|
%gometa
|
||||||
|
|
||||||
@ -20,15 +25,14 @@ Name: osbuild-composer
|
|||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: An image building service based on osbuild
|
Summary: An image building service based on osbuild
|
||||||
|
|
||||||
# osbuild-composer doesn't have support for building i686 images
|
# osbuild-composer doesn't have support for building i686 and armv7hl images
|
||||||
# and also RHEL and Fedora has now only limited support for this arch.
|
ExcludeArch: i686 armv7hl
|
||||||
ExcludeArch: i686
|
|
||||||
|
|
||||||
# Upstream license specification: Apache-2.0
|
# Upstream license specification: Apache-2.0
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
URL: %{gourl}
|
URL: %{gourl}
|
||||||
Source0: %{gosource}
|
Source0: %{gosource}
|
||||||
Patch0: 0001-test-rhel85-qcow2-custom-regenerate.patch
|
|
||||||
|
|
||||||
BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang}
|
BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang}
|
||||||
BuildRequires: systemd
|
BuildRequires: systemd
|
||||||
@ -46,6 +50,7 @@ BuildRequires: golang(github.com/coreos/go-semver/semver)
|
|||||||
BuildRequires: golang(github.com/coreos/go-systemd/activation)
|
BuildRequires: golang(github.com/coreos/go-systemd/activation)
|
||||||
BuildRequires: golang(github.com/deepmap/oapi-codegen/pkg/codegen)
|
BuildRequires: golang(github.com/deepmap/oapi-codegen/pkg/codegen)
|
||||||
BuildRequires: golang(github.com/go-chi/chi)
|
BuildRequires: golang(github.com/go-chi/chi)
|
||||||
|
BuildRequires: golang(github.com/golang-jwt/jwt)
|
||||||
BuildRequires: golang(github.com/google/uuid)
|
BuildRequires: golang(github.com/google/uuid)
|
||||||
BuildRequires: golang(github.com/jackc/pgx/v4)
|
BuildRequires: golang(github.com/jackc/pgx/v4)
|
||||||
BuildRequires: golang(github.com/julienschmidt/httprouter)
|
BuildRequires: golang(github.com/julienschmidt/httprouter)
|
||||||
@ -56,9 +61,12 @@ BuildRequires: golang(github.com/gobwas/glob)
|
|||||||
BuildRequires: golang(github.com/google/go-cmp/cmp)
|
BuildRequires: golang(github.com/google/go-cmp/cmp)
|
||||||
BuildRequires: golang(github.com/gophercloud/gophercloud)
|
BuildRequires: golang(github.com/gophercloud/gophercloud)
|
||||||
BuildRequires: golang(github.com/prometheus/client_golang/prometheus/promhttp)
|
BuildRequires: golang(github.com/prometheus/client_golang/prometheus/promhttp)
|
||||||
|
BuildRequires: golang(github.com/openshift-online/ocm-sdk-go)
|
||||||
|
BuildRequires: golang(github.com/segmentio/ksuid)
|
||||||
BuildRequires: golang(github.com/stretchr/testify/assert)
|
BuildRequires: golang(github.com/stretchr/testify/assert)
|
||||||
BuildRequires: golang(github.com/ubccr/kerby)
|
BuildRequires: golang(github.com/ubccr/kerby)
|
||||||
BuildRequires: golang(github.com/vmware/govmomi)
|
BuildRequires: golang(github.com/vmware/govmomi)
|
||||||
|
BuildRequires: golang(github.com/oracle/oci-go-sdk/v54)
|
||||||
BuildRequires: golang(cloud.google.com/go)
|
BuildRequires: golang(cloud.google.com/go)
|
||||||
BuildRequires: golang(gopkg.in/ini.v1)
|
BuildRequires: golang(gopkg.in/ini.v1)
|
||||||
%endif
|
%endif
|
||||||
@ -80,10 +88,6 @@ Conflicts: lorax-composer
|
|||||||
Obsoletes: lorax-composer < 34.3
|
Obsoletes: lorax-composer < 34.3
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# remove in F34
|
|
||||||
Obsoletes: golang-github-osbuild-composer < %{version}-%{release}
|
|
||||||
Provides: golang-github-osbuild-composer = %{version}-%{release}
|
|
||||||
|
|
||||||
# remove when F34 is EOL
|
# remove when F34 is EOL
|
||||||
Obsoletes: osbuild-composer-koji <= 23
|
Obsoletes: osbuild-composer-koji <= 23
|
||||||
|
|
||||||
@ -97,16 +101,8 @@ Obsoletes: osbuild-composer-koji <= 23
|
|||||||
%goprep
|
%goprep
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%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
|
%build
|
||||||
|
export GOFLAGS="-buildmode=pie"
|
||||||
%if 0%{?rhel}
|
%if 0%{?rhel}
|
||||||
GO_BUILD_PATH=$PWD/_build
|
GO_BUILD_PATH=$PWD/_build
|
||||||
install -m 0755 -vd $(dirname $GO_BUILD_PATH/src/%{goipath})
|
install -m 0755 -vd $(dirname $GO_BUILD_PATH/src/%{goipath})
|
||||||
@ -115,9 +111,17 @@ cd $GO_BUILD_PATH/src/%{goipath}
|
|||||||
install -m 0755 -vd _bin
|
install -m 0755 -vd _bin
|
||||||
export PATH=$PWD/_bin${PATH:+:$PATH}
|
export PATH=$PWD/_bin${PATH:+:$PATH}
|
||||||
export GOPATH=$GO_BUILD_PATH:%{gopath}
|
export GOPATH=$GO_BUILD_PATH:%{gopath}
|
||||||
export GOFLAGS=-mod=vendor
|
export GOFLAGS+=" -mod=vendor"
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# Set the commit hash so that composer can report what source version
|
||||||
|
# was used to build it. This has to be set explicitly when calling rpmbuild,
|
||||||
|
# this script will not attempt to automatically discover it.
|
||||||
|
%if %{?commit:1}0
|
||||||
|
export LDFLAGS="${LDFLAGS} -X 'github.com/osbuild/osbuild-composer/internal/common.GitRev=%{commit}'"
|
||||||
|
%endif
|
||||||
|
export LDFLAGS="${LDFLAGS} -X 'github.com/osbuild/osbuild-composer/internal/common.RpmVersion=%{name}-%{?epoch:%epoch:}%{version}-%{release}.%{_arch}'"
|
||||||
|
|
||||||
%gobuild -o _bin/osbuild-composer %{goipath}/cmd/osbuild-composer
|
%gobuild -o _bin/osbuild-composer %{goipath}/cmd/osbuild-composer
|
||||||
%gobuild -o _bin/osbuild-worker %{goipath}/cmd/osbuild-worker
|
%gobuild -o _bin/osbuild-worker %{goipath}/cmd/osbuild-worker
|
||||||
|
|
||||||
@ -145,97 +149,138 @@ go test -c -tags=integration -ldflags="${TEST_LDFLAGS}" -o _bin/osbuild-image-te
|
|||||||
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-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-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 test -c -tags=integration -ldflags="${TEST_LDFLAGS}" -o _bin/osbuild-composer-dbjobqueue-tests %{goipath}/cmd/osbuild-composer-dbjobqueue-tests
|
||||||
|
go test -c -tags=integration -ldflags="${TEST_LDFLAGS}" -o _bin/osbuild-composer-manifest-tests %{goipath}/cmd/osbuild-composer-manifest-tests
|
||||||
go build -tags=integration -ldflags="${TEST_LDFLAGS}" -o _bin/cloud-cleaner %{goipath}/cmd/cloud-cleaner
|
go build -tags=integration -ldflags="${TEST_LDFLAGS}" -o _bin/cloud-cleaner %{goipath}/cmd/cloud-cleaner
|
||||||
|
go build -tags=integration -ldflags="${TEST_LDFLAGS}" -o _bin/osbuild-mock-openid-provider %{goipath}/cmd/osbuild-mock-openid-provider
|
||||||
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
install -m 0755 -vd %{buildroot}%{_libexecdir}/osbuild-composer
|
install -m 0755 -vd %{buildroot}%{_libexecdir}/osbuild-composer
|
||||||
install -m 0755 -vp _bin/osbuild-composer %{buildroot}%{_libexecdir}/osbuild-composer/
|
install -m 0755 -vp _bin/osbuild-composer %{buildroot}%{_libexecdir}/osbuild-composer/
|
||||||
install -m 0755 -vp _bin/osbuild-worker %{buildroot}%{_libexecdir}/osbuild-composer/
|
install -m 0755 -vp _bin/osbuild-worker %{buildroot}%{_libexecdir}/osbuild-composer/
|
||||||
install -m 0755 -vp dnf-json %{buildroot}%{_libexecdir}/osbuild-composer/
|
install -m 0755 -vp dnf-json %{buildroot}%{_libexecdir}/osbuild-composer/
|
||||||
|
|
||||||
install -m 0755 -vd %{buildroot}%{_datadir}/osbuild-composer/repositories
|
# Only include repositories for the distribution and release
|
||||||
install -m 0644 -vp repositories/* %{buildroot}%{_datadir}/osbuild-composer/repositories/
|
install -m 0755 -vd %{buildroot}%{_datadir}/osbuild-composer/repositories
|
||||||
|
# CentOS also defines rhel so we check for centos first
|
||||||
|
%if 0%{?centos}
|
||||||
|
|
||||||
install -m 0755 -vd %{buildroot}%{_unitdir}
|
# CentOS 9 supports building for CentOS 8 and later
|
||||||
install -m 0644 -vp distribution/*.{service,socket} %{buildroot}%{_unitdir}/
|
%if 0%{?centos} >= 9
|
||||||
|
install -m 0644 -vp repositories/centos-* %{buildroot}%{_datadir}/osbuild-composer/repositories/
|
||||||
|
%else
|
||||||
|
# CentOS 8 only supports building for CentOS 8
|
||||||
|
install -m 0644 -vp repositories/centos-%{centos}* %{buildroot}%{_datadir}/osbuild-composer/repositories/
|
||||||
|
install -m 0644 -vp repositories/centos-stream-%{centos}* %{buildroot}%{_datadir}/osbuild-composer/repositories/
|
||||||
|
|
||||||
install -m 0755 -vd %{buildroot}%{_sysusersdir}
|
%endif
|
||||||
install -m 0644 -vp distribution/osbuild-composer.conf %{buildroot}%{_sysusersdir}/
|
%else
|
||||||
|
%if 0%{?rhel}
|
||||||
|
# RHEL 9 supports building for RHEL 8 and later
|
||||||
|
%if 0%{?rhel} >= 9
|
||||||
|
install -m 0644 -vp repositories/rhel-* %{buildroot}%{_datadir}/osbuild-composer/repositories/
|
||||||
|
|
||||||
install -m 0755 -vd %{buildroot}%{_localstatedir}/cache/osbuild-composer/dnf-cache
|
%else
|
||||||
|
# RHEL 8 only supports building for 8
|
||||||
|
install -m 0644 -vp repositories/rhel-%{rhel}* %{buildroot}%{_datadir}/osbuild-composer/repositories/
|
||||||
|
|
||||||
install -m 0755 -vd %{buildroot}%{_mandir}/man7
|
%endif
|
||||||
install -m 0644 -vp docs/*.7 %{buildroot}%{_mandir}/man7/
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# Fedora can build for all included fedora releases
|
||||||
|
%if 0%{?fedora}
|
||||||
|
install -m 0644 -vp repositories/fedora-* %{buildroot}%{_datadir}/osbuild-composer/repositories/
|
||||||
|
%endif
|
||||||
|
|
||||||
|
install -m 0755 -vd %{buildroot}%{_unitdir}
|
||||||
|
install -m 0644 -vp distribution/*.{service,socket} %{buildroot}%{_unitdir}/
|
||||||
|
|
||||||
|
install -m 0755 -vd %{buildroot}%{_sysusersdir}
|
||||||
|
install -m 0644 -vp distribution/osbuild-composer.conf %{buildroot}%{_sysusersdir}/
|
||||||
|
|
||||||
|
install -m 0755 -vd %{buildroot}%{_localstatedir}/cache/osbuild-composer/dnf-cache
|
||||||
|
|
||||||
|
install -m 0755 -vd %{buildroot}%{_mandir}/man7
|
||||||
|
install -m 0644 -vp docs/*.7 %{buildroot}%{_mandir}/man7/
|
||||||
|
|
||||||
%if %{with tests} || 0%{?rhel}
|
%if %{with tests} || 0%{?rhel}
|
||||||
|
|
||||||
install -m 0755 -vd %{buildroot}%{_libexecdir}/osbuild-composer-test
|
install -m 0755 -vd %{buildroot}%{_libexecdir}/osbuild-composer-test
|
||||||
install -m 0755 -vp _bin/osbuild-composer-cli-tests %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
install -m 0755 -vp _bin/osbuild-composer-cli-tests %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
||||||
install -m 0755 -vp _bin/osbuild-weldr-tests %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
install -m 0755 -vp _bin/osbuild-weldr-tests %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
||||||
install -m 0755 -vp _bin/osbuild-dnf-json-tests %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
install -m 0755 -vp _bin/osbuild-dnf-json-tests %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
||||||
install -m 0755 -vp _bin/osbuild-image-tests %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
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-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-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/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 _bin/osbuild-composer-manifest-tests %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
||||||
install -m 0755 -vp tools/define-compose-url.sh %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
install -m 0755 -vp _bin/cloud-cleaner %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
||||||
install -m 0755 -vp tools/provision.sh %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
install -m 0755 -vp _bin/osbuild-mock-openid-provider %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
||||||
install -m 0755 -vp tools/gen-certs.sh %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
install -m 0755 -vp tools/define-compose-url.sh %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
||||||
install -m 0755 -vp tools/gen-ssh.sh %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
install -m 0755 -vp tools/provision.sh %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
||||||
install -m 0755 -vp tools/image-info %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
install -m 0755 -vp tools/gen-certs.sh %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
||||||
install -m 0755 -vp tools/run-koji-container.sh %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
install -m 0755 -vp tools/gen-ssh.sh %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
||||||
install -m 0755 -vp tools/koji-compose.py %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
install -m 0755 -vp tools/image-info %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
||||||
install -m 0755 -vp tools/libvirt_test.sh %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
install -m 0755 -vp tools/run-koji-container.sh %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
||||||
install -m 0755 -vd %{buildroot}%{_libexecdir}/tests/osbuild-composer
|
install -m 0755 -vp tools/koji-compose.py %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
||||||
install -m 0755 -vp test/cases/* %{buildroot}%{_libexecdir}/tests/osbuild-composer/
|
install -m 0755 -vp tools/koji-compose-v2.py %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
||||||
|
install -m 0755 -vp tools/libvirt_test.sh %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
||||||
|
install -m 0755 -vp tools/set-env-variables.sh %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
||||||
|
install -m 0755 -vp tools/test-case-generators/generate-test-cases %{buildroot}%{_libexecdir}/osbuild-composer-test/
|
||||||
|
install -m 0755 -vd %{buildroot}%{_libexecdir}/tests/osbuild-composer
|
||||||
|
install -m 0755 -vp test/cases/* %{buildroot}%{_libexecdir}/tests/osbuild-composer/
|
||||||
|
|
||||||
install -m 0755 -vd %{buildroot}%{_datadir}/tests/osbuild-composer/ansible
|
install -m 0755 -vd %{buildroot}%{_datadir}/tests/osbuild-composer/ansible
|
||||||
install -m 0644 -vp test/data/ansible/* %{buildroot}%{_datadir}/tests/osbuild-composer/ansible/
|
install -m 0644 -vp test/data/ansible/* %{buildroot}%{_datadir}/tests/osbuild-composer/ansible/
|
||||||
|
|
||||||
install -m 0755 -vd %{buildroot}%{_datadir}/tests/osbuild-composer/azure
|
install -m 0755 -vd %{buildroot}%{_datadir}/tests/osbuild-composer/azure
|
||||||
install -m 0644 -vp test/data/azure/* %{buildroot}%{_datadir}/tests/osbuild-composer/azure/
|
install -m 0644 -vp test/data/azure/* %{buildroot}%{_datadir}/tests/osbuild-composer/azure/
|
||||||
|
|
||||||
install -m 0755 -vd %{buildroot}%{_datadir}/tests/osbuild-composer/manifests
|
install -m 0755 -vd %{buildroot}%{_datadir}/tests/osbuild-composer/manifests
|
||||||
install -m 0644 -vp test/data/manifests/* %{buildroot}%{_datadir}/tests/osbuild-composer/manifests/
|
install -m 0644 -vp test/data/manifests/* %{buildroot}%{_datadir}/tests/osbuild-composer/manifests/
|
||||||
|
|
||||||
install -m 0755 -vd %{buildroot}%{_datadir}/tests/osbuild-composer/cloud-init
|
install -m 0755 -vd %{buildroot}%{_datadir}/tests/osbuild-composer/cloud-init
|
||||||
install -m 0644 -vp test/data/cloud-init/* %{buildroot}%{_datadir}/tests/osbuild-composer/cloud-init/
|
install -m 0644 -vp test/data/cloud-init/* %{buildroot}%{_datadir}/tests/osbuild-composer/cloud-init/
|
||||||
|
|
||||||
install -m 0755 -vd %{buildroot}%{_datadir}/tests/osbuild-composer/composer
|
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 0644 -vp test/data/composer/* %{buildroot}%{_datadir}/tests/osbuild-composer/composer/
|
||||||
|
|
||||||
install -m 0755 -vd %{buildroot}%{_datadir}/tests/osbuild-composer/worker
|
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 0644 -vp test/data/worker/* %{buildroot}%{_datadir}/tests/osbuild-composer/worker/
|
||||||
|
|
||||||
install -m 0755 -vd %{buildroot}%{_datadir}/tests/osbuild-composer/repositories
|
install -m 0755 -vd %{buildroot}%{_datadir}/tests/osbuild-composer/repositories
|
||||||
install -m 0644 -vp test/data/repositories/* %{buildroot}%{_datadir}/tests/osbuild-composer/repositories/
|
install -m 0644 -vp test/data/repositories/* %{buildroot}%{_datadir}/tests/osbuild-composer/repositories/
|
||||||
|
|
||||||
install -m 0755 -vd %{buildroot}%{_datadir}/tests/osbuild-composer/kerberos
|
install -m 0755 -vd %{buildroot}%{_datadir}/tests/osbuild-composer/kerberos
|
||||||
install -m 0644 -vp test/data/kerberos/* %{buildroot}%{_datadir}/tests/osbuild-composer/kerberos/
|
install -m 0644 -vp test/data/kerberos/* %{buildroot}%{_datadir}/tests/osbuild-composer/kerberos/
|
||||||
|
|
||||||
install -m 0755 -vd %{buildroot}%{_datadir}/tests/osbuild-composer/keyring
|
install -m 0755 -vd %{buildroot}%{_datadir}/tests/osbuild-composer/keyring
|
||||||
install -m 0644 -vp test/data/keyring/id_rsa.pub %{buildroot}%{_datadir}/tests/osbuild-composer/keyring/
|
install -m 0644 -vp test/data/keyring/id_rsa.pub %{buildroot}%{_datadir}/tests/osbuild-composer/keyring/
|
||||||
install -m 0600 -vp test/data/keyring/id_rsa %{buildroot}%{_datadir}/tests/osbuild-composer/keyring/
|
install -m 0600 -vp test/data/keyring/id_rsa %{buildroot}%{_datadir}/tests/osbuild-composer/keyring/
|
||||||
|
|
||||||
install -m 0755 -vd %{buildroot}%{_datadir}/tests/osbuild-composer/koji
|
install -m 0755 -vd %{buildroot}%{_datadir}/tests/osbuild-composer/koji
|
||||||
install -m 0644 -vp test/data/koji/* %{buildroot}%{_datadir}/tests/osbuild-composer/koji/
|
install -m 0644 -vp test/data/koji/* %{buildroot}%{_datadir}/tests/osbuild-composer/koji/
|
||||||
|
|
||||||
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 0755 -vd %{buildroot}%{_datadir}/tests/osbuild-composer/openshift
|
||||||
install -m 0644 -vp test/data/openshift/* %{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/
|
||||||
|
|
||||||
|
install -m 0755 -vd %{buildroot}%{_datadir}/tests/osbuild-composer/upgrade8to9
|
||||||
|
install -m 0644 -vp test/data/upgrade8to9/* %{buildroot}%{_datadir}/tests/osbuild-composer/upgrade8to9/
|
||||||
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
export GOFLAGS="-buildmode=pie"
|
||||||
%if 0%{?rhel}
|
%if 0%{?rhel}
|
||||||
export GOFLAGS=-mod=vendor
|
export GOFLAGS+=" -mod=vendor"
|
||||||
export GOPATH=$PWD/_build:%{gopath}
|
export GOPATH=$PWD/_build:%{gopath}
|
||||||
# cd inside GOPATH, otherwise go with GO111MODULE=off ignores vendor directory
|
# cd inside GOPATH, otherwise go with GO111MODULE=off ignores vendor directory
|
||||||
cd $PWD/_build/src/%{goipath}
|
cd $PWD/_build/src/%{goipath}
|
||||||
@ -266,21 +311,22 @@ cd $PWD/_build/src/%{goipath}
|
|||||||
|
|
||||||
%package core
|
%package core
|
||||||
Summary: The core osbuild-composer binary
|
Summary: The core osbuild-composer binary
|
||||||
|
Requires: %{name}-dnf-json = %{version}-%{release}
|
||||||
|
|
||||||
%description core
|
%description core
|
||||||
The core osbuild-composer binary. This is suitable both for spawning in containers and by systemd.
|
The core osbuild-composer binary. This is suitable both for spawning in containers and by systemd.
|
||||||
|
|
||||||
%files core
|
%files core
|
||||||
%{_libexecdir}/osbuild-composer/osbuild-composer
|
%{_libexecdir}/osbuild-composer/osbuild-composer
|
||||||
%{_libexecdir}/osbuild-composer/dnf-json
|
|
||||||
%{_datadir}/osbuild-composer/
|
%{_datadir}/osbuild-composer/
|
||||||
|
|
||||||
%package worker
|
%package worker
|
||||||
Summary: The worker for osbuild-composer
|
Summary: The worker for osbuild-composer
|
||||||
Requires: systemd
|
Requires: systemd
|
||||||
Requires: qemu-img
|
Requires: qemu-img
|
||||||
Requires: osbuild >= 30
|
Requires: osbuild >= 41
|
||||||
Requires: osbuild-ostree >= 30
|
Requires: osbuild-ostree >= 41
|
||||||
|
Requires: %{name}-dnf-json = %{version}-%{release}
|
||||||
|
|
||||||
# remove in F34
|
# remove in F34
|
||||||
Obsoletes: golang-github-osbuild-composer-worker < %{version}-%{release}
|
Obsoletes: golang-github-osbuild-composer-worker < %{version}-%{release}
|
||||||
@ -301,20 +347,40 @@ The worker for osbuild-composer
|
|||||||
# systemd_preun uses systemctl disable --now which doesn't work well with template services.
|
# systemd_preun uses systemctl disable --now which doesn't work well with template services.
|
||||||
# See https://github.com/systemd/systemd/issues/15620
|
# See https://github.com/systemd/systemd/issues/15620
|
||||||
# The following lines mimicks its behaviour by running two commands:
|
# The following lines mimicks its behaviour by running two commands:
|
||||||
|
if [ -d /run/systemd/system ]; then
|
||||||
# disable and stop all the worker services
|
# disable and stop all the worker services
|
||||||
systemctl --no-reload disable osbuild-worker@.service osbuild-remote-worker@.service
|
systemctl --no-reload disable osbuild-worker@.service osbuild-remote-worker@.service
|
||||||
systemctl stop "osbuild-worker@*.service" "osbuild-remote-worker@*.service"
|
systemctl stop "osbuild-worker@*.service" "osbuild-remote-worker@*.service"
|
||||||
|
fi
|
||||||
|
|
||||||
%postun worker
|
%postun worker
|
||||||
# restart all the worker services
|
# restart all the worker services
|
||||||
%systemd_postun_with_restart "osbuild-worker@*.service" "osbuild-remote-worker@*.service"
|
%systemd_postun_with_restart "osbuild-worker@*.service" "osbuild-remote-worker@*.service"
|
||||||
|
|
||||||
|
%package dnf-json
|
||||||
|
Summary: The dnf-json binary used by osbuild-composer and the workers
|
||||||
|
|
||||||
|
# Conflicts with older versions of composer that provide the same files
|
||||||
|
# this can be removed when RHEL 8 and Fedora 35 reach EOL
|
||||||
|
Conflicts: osbuild-composer <= 35
|
||||||
|
|
||||||
|
%description dnf-json
|
||||||
|
The dnf-json binary used by osbuild-composer and the workers.
|
||||||
|
|
||||||
|
%files dnf-json
|
||||||
|
%{_libexecdir}/osbuild-composer/dnf-json
|
||||||
|
%{_unitdir}/osbuild-dnf-json.service
|
||||||
|
%{_unitdir}/osbuild-dnf-json.socket
|
||||||
|
|
||||||
%if %{with tests} || 0%{?rhel}
|
%if %{with tests} || 0%{?rhel}
|
||||||
|
|
||||||
%package tests
|
%package tests
|
||||||
Summary: Integration tests
|
Summary: Integration tests
|
||||||
|
%if %{with relax_requires}
|
||||||
|
Requires: %{name}
|
||||||
|
%else
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
%endif
|
||||||
Requires: composer-cli
|
Requires: composer-cli
|
||||||
Requires: createrepo_c
|
Requires: createrepo_c
|
||||||
Requires: xorriso
|
Requires: xorriso
|
||||||
@ -342,12 +408,14 @@ Requires: libvirt-daemon-driver-storage-disk
|
|||||||
Requires: libvirt-daemon-kvm
|
Requires: libvirt-daemon-kvm
|
||||||
Requires: qemu-img
|
Requires: qemu-img
|
||||||
Requires: qemu-kvm
|
Requires: qemu-kvm
|
||||||
|
Requires: rpmdevtools
|
||||||
Requires: virt-install
|
Requires: virt-install
|
||||||
Requires: expect
|
Requires: expect
|
||||||
Requires: python3-lxml
|
Requires: python3-lxml
|
||||||
Requires: httpd
|
Requires: httpd
|
||||||
Requires: mod_ssl
|
Requires: mod_ssl
|
||||||
Requires: openssl
|
Requires: openssl
|
||||||
|
Requires: firewalld
|
||||||
# see https://bugzilla.redhat.com/show_bug.cgi?id=1986333
|
# see https://bugzilla.redhat.com/show_bug.cgi?id=1986333
|
||||||
%if 0%{?rhel} && 0%{?rhel} != 9
|
%if 0%{?rhel} && 0%{?rhel} != 9
|
||||||
Requires: podman-plugins
|
Requires: podman-plugins
|
||||||
@ -376,6 +444,27 @@ Integration tests to be run on a pristine-dedicated system to test the osbuild-c
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Feb 19 2022 Ondřej Budai <ondrej@budai.cz> - 45-1
|
||||||
|
- New upstream release
|
||||||
|
|
||||||
|
* Mon Feb 14 2022 Thomas Lavocat <tlavocat@redhat.com> - 44-1
|
||||||
|
- New upstream release
|
||||||
|
|
||||||
|
* Mon Feb 07 2022 Thomas Lavocat <tlavocat@redhat.com> - 43-1
|
||||||
|
- New upstream release
|
||||||
|
|
||||||
|
* Tue Jan 18 2022 Thomas Lavocat <tlavocat@redhat.com> - 42-1
|
||||||
|
- New upstream release
|
||||||
|
|
||||||
|
* Thu Dec 09 2021 Ondřej Budai <ondrej@budai.cz> - 40-1
|
||||||
|
- New upstream release
|
||||||
|
|
||||||
|
* Fri Oct 15 2021 Achilleas Koutsou <achilleas@redhat.com> - 37-1
|
||||||
|
- New upstream release
|
||||||
|
|
||||||
|
* Fri Oct 15 2021 Achilleas Koutsou <achilleas@redhat.com> - 36-1
|
||||||
|
- New upstream release
|
||||||
|
|
||||||
* Mon Aug 30 2021 Tom Gundersen <teg@jklm.no> - 33-1
|
* Mon Aug 30 2021 Tom Gundersen <teg@jklm.no> - 33-1
|
||||||
- New upstream release
|
- New upstream release
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user