Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

many: take repositories from the "images" library #4554

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmd/osbuild-composer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/coreos/go-systemd/journal"
"github.com/getsentry/sentry-go"
sentrylogrus "github.com/getsentry/sentry-go/logrus"
_ "github.com/osbuild/images/data/repositories"
"github.com/osbuild/osbuild-composer/internal/common"
slogger "github.com/osbuild/osbuild-composer/pkg/splunk_logger"
"github.com/sirupsen/logrus"
Expand Down
14 changes: 7 additions & 7 deletions osbuild-composer.spec
Original file line number Diff line number Diff line change
Expand Up @@ -159,20 +159,20 @@ install -m 0755 -vd %{buildroot}%

# Latest CentOS supports building all CentOS versions
%if 0%{?centos} >= 10
install -m 0644 -vp repositories/centos-* %{buildroot}%{_datadir}/osbuild-composer/repositories/
install -m 0644 -vp vendor/github.com/osbuild/images/repositories/centos-* %{buildroot}%{_datadir}/osbuild-composer/repositories/

%else
# 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/
install -m 0644 -vp vendor/github.com/osbuild/images/repositories/centos-%{centos}* %{buildroot}%{_datadir}/osbuild-composer/repositories/
install -m 0644 -vp vendor/github.com/osbuild/images/repositories/centos-stream-%{centos}* %{buildroot}%{_datadir}/osbuild-composer/repositories/
%endif

%else

%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
for REPO_FILE in $(ls vendor/github.com/osbuild/images/repositories/rhel-* | grep -v 'no-aux-key'); do
install -m 0644 -vp ${REPO_FILE} %{buildroot}%{_datadir}/osbuild-composer/repositories/$(basename ${REPO_FILE})
done

Expand All @@ -183,13 +183,13 @@ 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
for REPO_FILE in $(ls vendor/github.com/osbuild/images/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
for REPO_FILE in $(ls vendor/github.com/osbuild/images/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
Expand All @@ -200,7 +200,7 @@ done

# Fedora can build for all included fedora releases
%if 0%{?fedora}
install -m 0644 -vp repositories/fedora-* %{buildroot}%{_datadir}/osbuild-composer/repositories/
install -m 0644 -vp vendor/github.com/osbuild/images/repositories/fedora-* %{buildroot}%{_datadir}/osbuild-composer/repositories/
%endif

install -m 0755 -vd %{buildroot}%{_unitdir}
Expand Down
82 changes: 0 additions & 82 deletions repositories/rhel-8-no-aux-key.json

This file was deleted.

Loading
Loading