Backport upstream fixes for c10s / el10
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
parent
f30bda80fa
commit
d897945642
1232
PR-4179.patch
Normal file
1232
PR-4179.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -25,7 +25,7 @@ It is compatible with composer-cli and cockpit-composer clients.
|
|||||||
}
|
}
|
||||||
|
|
||||||
Name: osbuild-composer
|
Name: osbuild-composer
|
||||||
Release: 1%{?dist}
|
Release: 2%{?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 and armv7hl images
|
# osbuild-composer doesn't have support for building i686 and armv7hl images
|
||||||
@ -36,6 +36,8 @@ License: Apache-2.0
|
|||||||
URL: %{gourl}
|
URL: %{gourl}
|
||||||
Source0: %{gosource}
|
Source0: %{gosource}
|
||||||
|
|
||||||
|
# https://github.com/osbuild/osbuild-composer/pull/4179
|
||||||
|
Patch0: PR-4179.patch
|
||||||
|
|
||||||
BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang}
|
BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang}
|
||||||
BuildRequires: systemd
|
BuildRequires: systemd
|
||||||
@ -126,6 +128,10 @@ export GOPATH=%{gobuilddir}:%{gopath}
|
|||||||
|
|
||||||
TEST_LDFLAGS="${LDFLAGS:-} -B 0x$(od -N 20 -An -tx1 -w100 /dev/urandom | tr -d ' ')"
|
TEST_LDFLAGS="${LDFLAGS:-} -B 0x$(od -N 20 -An -tx1 -w100 /dev/urandom | tr -d ' ')"
|
||||||
|
|
||||||
|
%if 0%{?rhel}
|
||||||
|
GOTAGS="${GOTAGS:+$GOTAGS,}rhel%{rhel}"
|
||||||
|
%endif
|
||||||
|
|
||||||
go test -c -tags="integration${GOTAGS:+,$GOTAGS}" -ldflags="${TEST_LDFLAGS}" -o _bin/osbuild-composer-cli-tests %{goipath}/cmd/osbuild-composer-cli-tests
|
go test -c -tags="integration${GOTAGS:+,$GOTAGS}" -ldflags="${TEST_LDFLAGS}" -o _bin/osbuild-composer-cli-tests %{goipath}/cmd/osbuild-composer-cli-tests
|
||||||
go test -c -tags="integration${GOTAGS:+,$GOTAGS}" -ldflags="${TEST_LDFLAGS}" -o _bin/osbuild-dnf-json-tests %{goipath}/cmd/osbuild-dnf-json-tests
|
go test -c -tags="integration${GOTAGS:+,$GOTAGS}" -ldflags="${TEST_LDFLAGS}" -o _bin/osbuild-dnf-json-tests %{goipath}/cmd/osbuild-dnf-json-tests
|
||||||
go test -c -tags="integration${GOTAGS:+,$GOTAGS}" -ldflags="${TEST_LDFLAGS}" -o _bin/osbuild-weldr-tests %{goipath}/internal/client/
|
go test -c -tags="integration${GOTAGS:+,$GOTAGS}" -ldflags="${TEST_LDFLAGS}" -o _bin/osbuild-weldr-tests %{goipath}/internal/client/
|
||||||
@ -147,28 +153,43 @@ install -m 0755 -vp _bin/osbuild-jobsite-builder %{buildroot}%
|
|||||||
|
|
||||||
# Only include repositories for the distribution and release
|
# Only include repositories for the distribution and release
|
||||||
install -m 0755 -vd %{buildroot}%{_datadir}/osbuild-composer/repositories
|
install -m 0755 -vd %{buildroot}%{_datadir}/osbuild-composer/repositories
|
||||||
|
|
||||||
# CentOS also defines rhel so we check for centos first
|
# CentOS also defines rhel so we check for centos first
|
||||||
%if 0%{?centos}
|
%if 0%{?centos}
|
||||||
|
|
||||||
# CentOS 9 supports building for CentOS 8 and later
|
# Latest CentOS supports building all CentOS versions
|
||||||
%if 0%{?centos} >= 9
|
%if 0%{?centos} >= 10
|
||||||
install -m 0644 -vp repositories/centos-* %{buildroot}%{_datadir}/osbuild-composer/repositories/
|
install -m 0644 -vp repositories/centos-* %{buildroot}%{_datadir}/osbuild-composer/repositories/
|
||||||
|
|
||||||
%else
|
%else
|
||||||
# CentOS 8 only supports building for CentOS 8
|
# All other CentOS versions support building for the same version
|
||||||
install -m 0644 -vp repositories/centos-%{centos}* %{buildroot}%{_datadir}/osbuild-composer/repositories/
|
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 0644 -vp repositories/centos-stream-%{centos}* %{buildroot}%{_datadir}/osbuild-composer/repositories/
|
||||||
|
|
||||||
|
# CentOS 9 supports building also for CentOS 8
|
||||||
|
%if 0%{?centos} == 9
|
||||||
|
install -m 0644 -vp repositories/centos-8* %{buildroot}%{_datadir}/osbuild-composer/repositories/
|
||||||
|
install -m 0644 -vp repositories/centos-stream-8* %{buildroot}%{_datadir}/osbuild-composer/repositories/
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%endif
|
||||||
|
|
||||||
%else
|
%else
|
||||||
|
|
||||||
%if 0%{?rhel}
|
%if 0%{?rhel}
|
||||||
# RHEL 9 supports building for RHEL 8 and later
|
# RHEL 10 supports building all RHEL versions
|
||||||
%if 0%{?rhel} >= 9
|
%if 0%{?rhel} >= 10
|
||||||
install -m 0644 -vp repositories/rhel-* %{buildroot}%{_datadir}/osbuild-composer/repositories/
|
install -m 0644 -vp repositories/rhel-* %{buildroot}%{_datadir}/osbuild-composer/repositories/
|
||||||
|
|
||||||
%else
|
%else
|
||||||
# RHEL 8 only supports building for 8
|
# All other RHEL versions support building for the same version
|
||||||
install -m 0644 -vp repositories/rhel-%{rhel}* %{buildroot}%{_datadir}/osbuild-composer/repositories/
|
install -m 0644 -vp repositories/rhel-%{rhel}* %{buildroot}%{_datadir}/osbuild-composer/repositories/
|
||||||
|
|
||||||
|
# RHEL 9 supports building also for RHEL 8
|
||||||
|
%if 0%{?rhel} == 9
|
||||||
|
install -m 0644 -vp repositories/rhel-8* %{buildroot}%{_datadir}/osbuild-composer/repositories/
|
||||||
|
%endif
|
||||||
|
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
@ -395,7 +416,11 @@ Requires: httpd
|
|||||||
Requires: mod_ssl
|
Requires: mod_ssl
|
||||||
Requires: openssl
|
Requires: openssl
|
||||||
Requires: firewalld
|
Requires: firewalld
|
||||||
|
# podman-plugins has been deprecated since podman version 5.0.0,
|
||||||
|
# which is in Fedora 40+ and in c10s / el10
|
||||||
|
%if (0%{?rhel} && 0%{?rhel} < 10) || (0%{?fedora} && 0%{?fedora} < 40)
|
||||||
Requires: podman-plugins
|
Requires: podman-plugins
|
||||||
|
%endif
|
||||||
Requires: dnf-plugins-core
|
Requires: dnf-plugins-core
|
||||||
Requires: skopeo
|
Requires: skopeo
|
||||||
Requires: make
|
Requires: make
|
||||||
@ -422,6 +447,9 @@ Integration tests to be run on a pristine-dedicated system to test the osbuild-c
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri May 31 2024 Tomáš Hozza <thozza@redhat.com> - 108-2
|
||||||
|
- Bachport upstream fixes to make tests pass
|
||||||
|
|
||||||
* Fri May 17 2024 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 108-1
|
* Fri May 17 2024 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 108-1
|
||||||
- New upstream release
|
- New upstream release
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user