repositories: exclude downstream from upstream
We don't want to give the impression we support building Fedora on RHEL or CentOS Stream, or CentOS Stream on RHEL, so drop these repositories from the package. Also adjust dnf-json to use test repositories, rather than the upstream ones. These are shipped in the test package, so makes sure we are unaffected by what is shipped in the RPM shipped in the distros.
This commit is contained in:
parent
961fef25ff
commit
8b84d92264
2 changed files with 32 additions and 2 deletions
|
|
@ -48,7 +48,7 @@ func TestFetchChecksum(t *testing.T) {
|
|||
// this should run cross-arch dependency solving N-1 times.
|
||||
func TestCrossArchDepsolve(t *testing.T) {
|
||||
// Load repositories from the definition we provide in the RPM package
|
||||
repoDir := "/usr/share/osbuild-composer"
|
||||
repoDir := "/usr/share/tests/osbuild-composer"
|
||||
|
||||
// NOTE: we can add RHEL, but don't make it hard requirement because it will fail outside of VPN
|
||||
for _, distroStruct := range []distro.Distro{fedora33.New()} {
|
||||
|
|
|
|||
|
|
@ -160,8 +160,38 @@ install -m 0755 -vp _bin/osbuild-composer %{buildroot}%{_l
|
|||
install -m 0755 -vp _bin/osbuild-worker %{buildroot}%{_libexecdir}/osbuild-composer/
|
||||
install -m 0755 -vp dnf-json %{buildroot}%{_libexecdir}/osbuild-composer/
|
||||
|
||||
# Only include repositories for the distribution and release
|
||||
install -m 0755 -vd %{buildroot}%{_datadir}/osbuild-composer/repositories
|
||||
install -m 0644 -vp repositories/* %{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
|
||||
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/
|
||||
|
||||
%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/
|
||||
|
||||
%endif
|
||||
%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}/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue