import CS osbuild-composer-118-1.el9

This commit is contained in:
eabdullin 2024-09-30 16:15:54 +00:00
parent 795978d6f2
commit 94e2e708ee
3 changed files with 99 additions and 40 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/osbuild-composer-100.tar.gz
SOURCES/osbuild-composer-118.tar.gz

View File

@ -1 +1 @@
ee2bb2068e42599ca6ef66499d00077ee06b3b44 SOURCES/osbuild-composer-100.tar.gz
be808e5f869ae48145daef50ed6ed82b91359b48 SOURCES/osbuild-composer-118.tar.gz

View File

@ -7,9 +7,12 @@
# This is used internally during nightly pipeline testing!
%bcond_with relax_requires
# The minimum required osbuild version
%global min_osbuild_version 120
%global goipath github.com/osbuild/osbuild-composer
Version: 100
Version: 118
%gometa
@ -103,6 +106,9 @@ export LDFLAGS="${LDFLAGS} -X 'github.com/osbuild/osbuild-composer/internal/comm
%gobuild ${GOTAGS:+-tags=$GOTAGS} -o _bin/osbuild-composer %{goipath}/cmd/osbuild-composer
%gobuild ${GOTAGS:+-tags=$GOTAGS} -o _bin/osbuild-worker %{goipath}/cmd/osbuild-worker
%gobuild ${GOTAGS:+-tags=$GOTAGS} -o _bin/osbuild-worker-executor %{goipath}/cmd/osbuild-worker-executor
%gobuild ${GOTAGS:+-tags=$GOTAGS} -o _bin/osbuild-jobsite-manager %{goipath}/cmd/osbuild-jobsite-manager
%gobuild ${GOTAGS:+-tags=$GOTAGS} -o _bin/osbuild-jobsite-builder %{goipath}/cmd/osbuild-jobsite-builder
make man
@ -121,6 +127,10 @@ export GOPATH=%{gobuilddir}:%{gopath}
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-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/
@ -137,31 +147,52 @@ go build -tags="integration${GOTAGS:+,$GOTAGS}" -ldflags="${TEST_LDFLAGS}" -o _b
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-worker %{buildroot}%{_libexecdir}/osbuild-composer/
install -m 0755 -vp dnf-json %{buildroot}%{_libexecdir}/osbuild-composer/
install -m 0755 -vp _bin/osbuild-worker-executor %{buildroot}%{_libexecdir}/osbuild-composer/
install -m 0755 -vp _bin/osbuild-jobsite-manager %{buildroot}%{_libexecdir}/osbuild-composer/
install -m 0755 -vp _bin/osbuild-jobsite-builder %{buildroot}%{_libexecdir}/osbuild-composer/
# Only include repositories for the distribution and release
install -m 0755 -vd %{buildroot}%{_datadir}/osbuild-composer/repositories
# CentOS also defines rhel so we check for centos first
%if 0%{?centos}
# CentOS 9 supports building for CentOS 8 and later
%if 0%{?centos} >= 9
# Latest CentOS supports building all CentOS versions
%if 0%{?centos} >= 10
install -m 0644 -vp repositories/centos-* %{buildroot}%{_datadir}/osbuild-composer/repositories/
%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-stream-%{centos}* %{buildroot}%{_datadir}/osbuild-composer/repositories/
%endif
%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/
%else
# RHEL 8 only supports building for 8
install -m 0644 -vp repositories/rhel-%{rhel}* %{buildroot}%{_datadir}/osbuild-composer/repositories/
%if 0%{?rhel}
# RHEL 10 supports building all RHEL versions
%if 0%{?rhel} >= 10
for REPO_FILE in $(ls repositories/rhel-* | grep -v 'no-aux-key'); do
install -m 0644 -vp ${REPO_FILE} %{buildroot}%{_datadir}/osbuild-composer/repositories/$(basename ${REPO_FILE})
done
# RHEL-8 auxiliary key is signed using SHA-1, which is not enabled by default on RHEL-10 and later
for REPO_FILE in $(ls repositories/rhel-8*-no-aux-key.json); do
install -m 0644 -vp ${REPO_FILE} %{buildroot}%{_datadir}/osbuild-composer/repositories/$(basename ${REPO_FILE} | sed 's/-no-aux-key//g')
done
%else
# All other RHEL versions support building for the same version
for REPO_FILE in $(ls repositories/rhel-%{rhel}* | grep -v 'no-aux-key'); do
install -m 0644 -vp ${REPO_FILE} %{buildroot}%{_datadir}/osbuild-composer/repositories/$(basename ${REPO_FILE})
done
# RHEL 9 supports building also for RHEL 8
%if 0%{?rhel} == 9
for REPO_FILE in $(ls repositories/rhel-8* | grep -v 'no-aux-key'); do
install -m 0644 -vp ${REPO_FILE} %{buildroot}%{_datadir}/osbuild-composer/repositories/$(basename ${REPO_FILE})
done
%endif
%endif
%endif
@ -294,7 +325,9 @@ cd $PWD/_build/src/%{goipath}
%package core
Summary: The core osbuild-composer binary
Requires: %{name}-dnf-json = %{version}-%{release}
Requires: osbuild-depsolve-dnf >= %{min_osbuild_version}
Provides: %{name}-dnf-json = %{version}-%{release}
Obsoletes: %{name}-dnf-json < %{version}-%{release}
%description core
The core osbuild-composer binary. This is suitable both for spawning in containers and by systemd.
@ -307,17 +340,22 @@ 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 >= 98
Requires: osbuild-ostree >= 98
Requires: osbuild-lvm2 >= 98
Requires: osbuild-luks2 >= 98
Requires: %{name}-dnf-json = %{version}-%{release}
Requires: osbuild >= %{min_osbuild_version}
Requires: osbuild-ostree >= %{min_osbuild_version}
Requires: osbuild-lvm2 >= %{min_osbuild_version}
Requires: osbuild-luks2 >= %{min_osbuild_version}
Requires: osbuild-depsolve-dnf >= %{min_osbuild_version}
Provides: %{name}-dnf-json = %{version}-%{release}
Obsoletes: %{name}-dnf-json < %{version}-%{release}
%description worker
The worker for osbuild-composer
%files worker
%{_libexecdir}/osbuild-composer/osbuild-worker
%{_libexecdir}/osbuild-composer/osbuild-worker-executor
%{_libexecdir}/osbuild-composer/osbuild-jobsite-manager
%{_libexecdir}/osbuild-composer/osbuild-jobsite-builder
%{_unitdir}/osbuild-worker@.service
%{_unitdir}/osbuild-remote-worker@.service
@ -339,25 +377,6 @@ fi
# restart all the worker services
%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 reaches 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
%post dnf-json
# Fix ownership of the rpmmd cache files from previous versions where it was owned by root:root
if [ -e /var/cache/osbuild-composer/rpmmd ]; then
chown -f -R --from root:root _osbuild-composer:_osbuild-composer /var/cache/osbuild-composer/rpmmd
fi
%if %{with tests} || 0%{?rhel}
%package tests
@ -402,7 +421,11 @@ Requires: httpd
Requires: mod_ssl
Requires: openssl
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
%endif
Requires: dnf-plugins-core
Requires: skopeo
Requires: make
@ -429,6 +452,42 @@ Integration tests to be run on a pristine-dedicated system to test the osbuild-c
%endif
%changelog
* Fri Aug 23 2024 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 118-1
- New upstream release
* Wed Aug 21 2024 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 117-1
- New upstream release
* Thu Aug 15 2024 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 116-1
- New upstream release
* Wed Aug 07 2024 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 115-1
- New upstream release
* Wed Jul 24 2024 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 114-1
- New upstream release
* Fri Jul 12 2024 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 113-1
- New upstream release
* Wed Jun 12 2024 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 110-1
- New upstream release
* Tue Jun 04 2024 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 109-1
- New upstream release
* Fri May 17 2024 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 108-1
- New upstream release
* Wed Apr 03 2024 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 104-1
- New upstream release
* Wed Mar 06 2024 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 102-1
- New upstream release
* Mon Feb 26 2024 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 101-1
- New upstream release
* Wed Feb 07 2024 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 100-1
- New upstream release