|
|
17b5fb |
%global distro CentOS Stream
|
|
|
17b5fb |
%global variant Hyperscale
|
|
|
17b5fb |
%global variant_lc %(echo %{variant} | tr "A-Z" "a-z")
|
|
|
17b5fb |
%global major 9
|
|
|
17b5fb |
|
|
|
17b5fb |
Name: centos-stream-spin-hyperscale-release
|
|
|
17b5fb |
Version: %{major}
|
|
|
17b5fb |
Release: 1%{?dist}
|
|
|
17b5fb |
Summary: %{distro} %{variant} release files
|
|
|
17b5fb |
License: GPLv2
|
|
|
17b5fb |
URL: https://centos.org
|
|
|
17b5fb |
BuildArch: noarch
|
|
|
17b5fb |
|
|
|
17b5fb |
# Make this higher than all other centos-release providers
|
|
|
17b5fb |
# to make it compatible with centos-gpg-keys and other packages
|
|
|
17b5fb |
Provides: centos-release = 9.12-1
|
|
|
17b5fb |
|
|
|
17b5fb |
# conflicts with vanilla centos-stream-release
|
|
|
17b5fb |
Conflicts: centos-stream-release
|
|
|
17b5fb |
|
|
|
17b5fb |
# upgrade path from old release packages
|
|
|
17b5fb |
Obsoletes: centos-release < 9.12-1
|
|
|
17b5fb |
|
|
|
17b5fb |
# upgrade path from RHEL
|
|
|
17b5fb |
Obsoletes: redhat-release < 10
|
|
|
17b5fb |
|
|
|
17b5fb |
# Replace centos-stream-release for comps compatibility
|
|
|
17b5fb |
Obsoletes: centos-stream-release < 9.12-1
|
|
|
17b5fb |
Provides: centos-stream-release = 9.12-1
|
|
|
17b5fb |
|
|
|
17b5fb |
# upgrade path from Hyperscale 8
|
|
|
17b5fb |
Obsoletes: centos-stream-hyperscale-spin-release < 9
|
|
|
17b5fb |
Provides: centos-stream-hyperscale-spin-release = %{version}-%{release}
|
|
|
17b5fb |
|
|
|
17b5fb |
# Required for a lorax run (to generate install media)
|
|
|
17b5fb |
Requires: centos-stream-hyperscale-repos(%{major})
|
|
|
17b5fb |
Provides: centos-release-eula
|
|
|
17b5fb |
Provides: redhat-release-eula
|
|
|
17b5fb |
|
|
|
17b5fb |
# required by epel-release
|
|
|
17b5fb |
Provides: redhat-release = 9.12-1
|
|
|
17b5fb |
|
|
|
17b5fb |
# required by dnf
|
|
|
17b5fb |
# https://github.com/rpm-software-management/dnf/blob/4.2.23/dnf/const.py.in#L26
|
|
|
17b5fb |
Provides: system-release = %{version}-%{release}
|
|
|
17b5fb |
Provides: system-release(releasever) = %{major}
|
|
|
17b5fb |
|
|
|
17b5fb |
# required by libdnf
|
|
|
17b5fb |
# https://github.com/rpm-software-management/libdnf/blob/0.48.0/libdnf/module/ModulePackage.cpp#L472
|
|
|
17b5fb |
Provides: base-module(platform:el%{major})
|
|
|
17b5fb |
|
|
|
17b5fb |
Source200: EULA
|
|
|
17b5fb |
Source201: LICENSE
|
|
|
17b5fb |
Source202: Contributors
|
|
|
17b5fb |
|
|
|
17b5fb |
Source300: 85-display-manager.preset
|
|
|
17b5fb |
Source301: 90-default.preset
|
|
|
17b5fb |
Source302: 90-default-user.preset
|
|
|
17b5fb |
Source303: 99-default-disable.preset
|
|
|
17b5fb |
Source304: 50-redhat.conf
|
|
|
17b5fb |
|
|
|
17b5fb |
Source500: centos.repo
|
|
|
17b5fb |
Source501: centos-addons.repo
|
|
|
17b5fb |
|
|
|
17b5fb |
%package -n centos-stream-spin-hyperscale-repos
|
|
|
17b5fb |
Summary: CentOS Stream package repositories
|
|
|
17b5fb |
|
|
|
17b5fb |
# conflicts with vanilla centos-stream-repos
|
|
|
17b5fb |
Conflicts: centos-stream-repos
|
|
|
17b5fb |
# Replace centos-stream-repos for comps compatibility
|
|
|
17b5fb |
Obsoletes: centos-stream-repos < 9.12-1
|
|
|
17b5fb |
Provides: centos-stream-repos = 9.12-1
|
|
|
17b5fb |
|
|
|
17b5fb |
Provides: system-repos = %{version}-%{release}
|
|
|
17b5fb |
Provides: centos-stream-repos(%{major}) = %{version}
|
|
|
17b5fb |
Provides: centos-stream-hyperscale-repos(%{major}) = %{version}
|
|
|
17b5fb |
Requires: centos-stream-spin-hyperscale-release = %{version}-%{release}
|
|
|
17b5fb |
# Depend on the correct centos-gpg-keys package from the main distribution
|
|
|
17b5fb |
Requires: (centos-gpg-keys >= 9 with centos-gpg-keys < 10)
|
|
|
17b5fb |
# yes, this is actually a repos package :/
|
|
|
17b5fb |
Requires: centos-release-hyperscale-spin
|
|
|
17b5fb |
|
|
|
17b5fb |
%description
|
|
|
17b5fb |
%{distro} release files.
|
|
|
17b5fb |
|
|
|
17b5fb |
%description -n centos-stream-spin-hyperscale-repos
|
|
|
17b5fb |
This package provides the package repository files for CentOS Stream Hyperscale.
|
|
|
17b5fb |
|
|
|
17b5fb |
|
|
|
17b5fb |
%install
|
|
|
17b5fb |
# copy license and contributors doc here for %%license and %%doc macros
|
|
|
17b5fb |
mkdir -p ./docs
|
|
|
17b5fb |
cp %{SOURCE201} %{SOURCE202} ./docs
|
|
|
17b5fb |
|
|
|
17b5fb |
# create /etc/system-release and /etc/redhat-release
|
|
|
17b5fb |
install -d -m 0755 %{buildroot}%{_sysconfdir}
|
|
|
17b5fb |
echo "%{distro} release %{major}" > %{buildroot}%{_sysconfdir}/centos-release
|
|
|
17b5fb |
ln -s centos-release %{buildroot}%{_sysconfdir}/system-release
|
|
|
17b5fb |
ln -s centos-release %{buildroot}%{_sysconfdir}/redhat-release
|
|
|
17b5fb |
|
|
|
17b5fb |
# Create the os-release file
|
|
|
17b5fb |
install -d -m 0755 %{buildroot}%{_prefix}/lib
|
|
|
17b5fb |
cat > %{buildroot}%{_prefix}/lib/os-release << EOF
|
|
|
17b5fb |
NAME="%{distro}"
|
|
|
17b5fb |
VERSION="%{major} (%{variant})"
|
|
|
17b5fb |
ID=centos
|
|
|
17b5fb |
ID_LIKE="rhel fedora"
|
|
|
17b5fb |
VERSION_ID="%{major}"
|
|
|
17b5fb |
PLATFORM_ID="platform:el%{major}"
|
|
|
17b5fb |
PRETTY_NAME="%{distro} %{major}"
|
|
|
17b5fb |
ANSI_COLOR="0;31"
|
|
|
17b5fb |
LOGO="fedora-logo-icon"
|
|
|
17b5fb |
CPE_NAME="cpe:/o:centos:centos:%{major}"
|
|
|
17b5fb |
HOME_URL="https://centos.org/"
|
|
|
17b5fb |
BUG_REPORT_URL="https://bugzilla.redhat.com/"
|
|
|
17b5fb |
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux %{major}"
|
|
|
17b5fb |
REDHAT_SUPPORT_PRODUCT_VERSION="%{distro}"
|
|
|
17b5fb |
VARIANT="%{variant}"
|
|
|
17b5fb |
VARIANT_ID=%{variant_lc}
|
|
|
17b5fb |
EOF
|
|
|
17b5fb |
|
|
|
17b5fb |
# Create the symlink for /etc/os-release
|
|
|
17b5fb |
ln -s ../usr/lib/os-release %{buildroot}%{_sysconfdir}/os-release
|
|
|
17b5fb |
|
|
|
17b5fb |
# write cpe to /etc/system/release-cpe
|
|
|
17b5fb |
echo "cpe:/o:centos:centos:%{major}" > %{buildroot}%{_sysconfdir}/system-release-cpe
|
|
|
17b5fb |
|
|
|
17b5fb |
# create /etc/issue, /etc/issue.net and /etc/issue.d
|
|
|
17b5fb |
echo '\S' > %{buildroot}%{_sysconfdir}/issue
|
|
|
17b5fb |
echo 'Kernel \r on an \m' >> %{buildroot}%{_sysconfdir}/issue
|
|
|
17b5fb |
cp %{buildroot}%{_sysconfdir}/issue{,.net}
|
|
|
17b5fb |
echo >> %{buildroot}%{_sysconfdir}/issue
|
|
|
17b5fb |
mkdir -p %{buildroot}%{_sysconfdir}/issue.d
|
|
|
17b5fb |
|
|
|
17b5fb |
# set up the dist tag macros
|
|
|
17b5fb |
mkdir -p %{buildroot}%{_rpmmacrodir}
|
|
|
17b5fb |
cat > %{buildroot}%{_rpmmacrodir}/macros.dist << EOF
|
|
|
17b5fb |
# dist macros.
|
|
|
17b5fb |
|
|
|
17b5fb |
%%__bootstrap ~bootstrap
|
|
|
17b5fb |
%%centos_ver %{major}
|
|
|
17b5fb |
%%centos_hs 1
|
|
|
17b5fb |
%%centos %{major}
|
|
|
17b5fb |
%%rhel %{major}
|
|
|
17b5fb |
%%dist %%{!?distprefix0:%%{?distprefix}}%%{expand:%%{lua:for i=0,9999 do print("%%{?distprefix" .. i .."}") end}}.hs.el%{major}%%{?with_bootstrap:%{__bootstrap}}
|
|
|
17b5fb |
%%el%{major} 1
|
|
|
17b5fb |
EOF
|
|
|
17b5fb |
|
|
|
17b5fb |
# use unbranded datadir
|
|
|
17b5fb |
install -d -m 0755 %{buildroot}%{_datadir}/centos-release
|
|
|
17b5fb |
ln -s centos-release %{buildroot}%{_datadir}/redhat-release
|
|
|
17b5fb |
install -p -m 0644 %{SOURCE200} %{buildroot}%{_datadir}/centos-release/
|
|
|
17b5fb |
|
|
|
17b5fb |
# copy systemd presets
|
|
|
17b5fb |
install -d -m 0755 %{buildroot}%{_prefix}/lib/systemd/system-preset/
|
|
|
17b5fb |
install -d -m 0755 %{buildroot}%{_prefix}/lib/systemd/user-preset
|
|
|
17b5fb |
install -p -m 0644 %{SOURCE300} %{buildroot}%{_prefix}/lib/systemd/system-preset/
|
|
|
17b5fb |
install -p -m 0644 %{SOURCE301} %{buildroot}%{_prefix}/lib/systemd/system-preset/
|
|
|
17b5fb |
install -p -m 0644 %{SOURCE302} %{buildroot}%{_prefix}/lib/systemd/user-preset/
|
|
|
17b5fb |
|
|
|
17b5fb |
# installing the same file for both system and user presets to set the same behavior for both
|
|
|
17b5fb |
install -p -m 0644 %{SOURCE303} %{buildroot}%{_prefix}/lib/systemd/system-preset/
|
|
|
17b5fb |
install -p -m 0644 %{SOURCE303} %{buildroot}%{_prefix}/lib/systemd/user-preset/
|
|
|
17b5fb |
|
|
|
17b5fb |
# copy sysctl presets
|
|
|
17b5fb |
mkdir -p %{buildroot}/%{_prefix}/lib/sysctl.d/
|
|
|
17b5fb |
install -m 0644 %{SOURCE304} %{buildroot}/%{_prefix}/lib/sysctl.d/
|
|
|
17b5fb |
|
|
|
17b5fb |
# Create stub yum repos
|
|
|
17b5fb |
mkdir %{buildroot}%{_sysconfdir}/yum.repos.d
|
|
|
17b5fb |
touch %{buildroot}%{_sysconfdir}/yum.repos.d/redhat.repo
|
|
|
17b5fb |
|
|
|
17b5fb |
# copy yum repos
|
|
|
17b5fb |
install -d -m 0755 %{buildroot}%{_sysconfdir}/yum.repos.d
|
|
|
17b5fb |
install -p -m 0644 %{SOURCE500} %{buildroot}%{_sysconfdir}/yum.repos.d/
|
|
|
17b5fb |
install -p -m 0644 %{SOURCE501} %{buildroot}%{_sysconfdir}/yum.repos.d/
|
|
|
17b5fb |
|
|
|
17b5fb |
# dnf variables
|
|
|
17b5fb |
install -d -m 0755 %{buildroot}%{_sysconfdir}/dnf/vars
|
|
|
17b5fb |
echo "%{major}-stream" > %{buildroot}%{_sysconfdir}/dnf/vars/stream
|
|
|
17b5fb |
|
|
|
17b5fb |
|
|
|
17b5fb |
%files
|
|
|
17b5fb |
%license docs/LICENSE
|
|
|
17b5fb |
%doc docs/Contributors
|
|
|
17b5fb |
%{_sysconfdir}/redhat-release
|
|
|
17b5fb |
%{_sysconfdir}/system-release
|
|
|
17b5fb |
%{_sysconfdir}/centos-release
|
|
|
17b5fb |
%config(noreplace) %{_sysconfdir}/os-release
|
|
|
17b5fb |
%config %{_sysconfdir}/system-release-cpe
|
|
|
17b5fb |
%config(noreplace) %{_sysconfdir}/issue
|
|
|
17b5fb |
%config(noreplace) %{_sysconfdir}/issue.net
|
|
|
17b5fb |
%dir %{_sysconfdir}/issue.d
|
|
|
17b5fb |
%dir %{_sysconfdir}/yum.repos.d
|
|
|
17b5fb |
%ghost %{_sysconfdir}/yum.repos.d/redhat.repo
|
|
|
17b5fb |
%{_rpmmacrodir}/macros.dist
|
|
|
17b5fb |
%{_datadir}/redhat-release
|
|
|
17b5fb |
%{_datadir}/centos-release
|
|
|
17b5fb |
%{_prefix}/lib/os-release
|
|
|
17b5fb |
%{_prefix}/lib/systemd/system-preset/*
|
|
|
17b5fb |
%{_prefix}/lib/systemd/user-preset/*
|
|
|
17b5fb |
%{_prefix}/lib/sysctl.d/50-redhat.conf
|
|
|
17b5fb |
|
|
|
17b5fb |
%files -n centos-stream-spin-hyperscale-repos
|
|
|
17b5fb |
%config(noreplace) %{_sysconfdir}/yum.repos.d/centos.repo
|
|
|
17b5fb |
%config(noreplace) %{_sysconfdir}/yum.repos.d/centos-addons.repo
|
|
|
17b5fb |
%config(noreplace) %{_sysconfdir}/dnf/vars/stream
|
|
|
17b5fb |
|
|
|
17b5fb |
|
|
|
17b5fb |
%changelog
|
|
|
cbb051 |
* Sun Feb 20 2022 Neal Gompa <ngompa@centosproject.org> - 9-2
|
|
|
cbb051 |
- Fix author email in initial changelog entry
|
|
|
cbb051 |
|
|
|
cbb051 |
* Sun Feb 20 2022 Neal Gompa <ngompa@centosproject.org> - 9-1
|
|
|
17b5fb |
- Initial spin release package based on centos-stream-release
|