2021-11-30 02:55:46 +00:00
|
|
|
%define debug_package %{nil}
|
|
|
|
|
|
|
|
# Product information
|
|
|
|
%define product_family Rocky Linux
|
|
|
|
%define variant_titlecase Server
|
|
|
|
%define variant_lowercase server
|
|
|
|
|
|
|
|
# Distribution Name and Version
|
|
|
|
%define distro_name Rocky Linux
|
|
|
|
%define distro_code Blue Onyx
|
|
|
|
%define major 9
|
|
|
|
%define minor 0
|
|
|
|
%define rocky_rel 1.2
|
|
|
|
%define rpm_license BSD-3-Clause
|
|
|
|
|
|
|
|
%define contentdir pub/rocky
|
|
|
|
%define rltype stable
|
|
|
|
|
2021-11-30 03:20:28 +00:00
|
|
|
################################################################################
|
|
|
|
# Rocky LookAhead Section
|
|
|
|
#
|
|
|
|
# Note to Packagers/Builders: If you wish to enable this, rllh should be
|
2021-11-30 04:10:39 +00:00
|
|
|
# set to a number greater than 0. There is a chance
|
|
|
|
# that rllh could be used as a way to define what
|
|
|
|
# the "internal" version of lookahead is.
|
2021-11-30 02:55:46 +00:00
|
|
|
# Check for lookahead and reset defines - This ensures a "lookahead" system
|
|
|
|
# will contact the mirrors or set the baseurl to properly use Rocky LookAhead,
|
|
|
|
# otherwise, the default is "stable"
|
|
|
|
%if 0%{?rllh}
|
|
|
|
%define minor 1
|
|
|
|
%define contentdir pub/rocky-lh
|
|
|
|
%define rltype lookahead
|
2021-11-30 04:10:39 +00:00
|
|
|
%define rlpkg -lookahead
|
|
|
|
%define rlstatement (LookAhead)
|
2021-11-30 02:55:46 +00:00
|
|
|
%endif
|
2021-11-30 03:20:28 +00:00
|
|
|
# End Rocky LookAhead Section
|
|
|
|
################################################################################
|
2021-11-30 02:55:46 +00:00
|
|
|
|
|
|
|
%define base_release_version %{major}
|
|
|
|
%define dist_release_version %{major}
|
|
|
|
%define full_release_version %{major}.%{minor}
|
|
|
|
|
|
|
|
%ifarch ppc64le
|
|
|
|
%define tuned_profile :server
|
|
|
|
%endif
|
|
|
|
|
|
|
|
# Avoids a weird anaconda problem
|
|
|
|
%global __requires_exclude_from %{_libexecdir}
|
|
|
|
|
2021-11-30 03:20:28 +00:00
|
|
|
# conditional section for future use
|
|
|
|
|
2021-11-30 04:10:39 +00:00
|
|
|
Name: rocky-release%{?rlpkg}
|
2021-11-30 02:55:46 +00:00
|
|
|
Version: %{major}.%{minor}
|
|
|
|
Release: %{rocky_rel}.el%{major}
|
|
|
|
Summary: %{distro_name} release files
|
2021-11-30 03:20:28 +00:00
|
|
|
Group: System Environment/Base
|
2021-11-30 02:55:46 +00:00
|
|
|
License: %{rpm_license}
|
|
|
|
URL: https://rockylinux.org
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
# What do we provide? Some of these needs are a necesity (think comps and
|
|
|
|
# groups) and things like EPEL need it.
|
|
|
|
Provides: rocky-release = %{version}-%{release}
|
|
|
|
Provides: rocky-release(upstream) = %{full_release_version}
|
|
|
|
Provides: redhat-release = %{version}-%{release}
|
|
|
|
Provides: system-release = %{version}-%{release}
|
|
|
|
Provides: system-release(releasever) = %{major}
|
|
|
|
Provides: centos-release = %{version}-%{release}
|
|
|
|
Provides: centos-release(upstream) = %{full_release_version}
|
|
|
|
|
|
|
|
## Required by libdnf
|
|
|
|
Provides: base-module(platform:el%{major})
|
|
|
|
|
|
|
|
## This makes lorax/pungi/anaconda happy
|
2021-11-30 03:20:28 +00:00
|
|
|
Provides: rocky-release-eula = %{version}-%{release}
|
|
|
|
Provides: redhat-release-eula = %{version}-%{release}
|
|
|
|
Provides: centos-release-eula = %{version}-%{release}
|
2021-11-30 02:55:46 +00:00
|
|
|
|
|
|
|
# What are our requirements?
|
|
|
|
Requires: rocky-repos(%{major})
|
|
|
|
|
|
|
|
# GPG Keys (100-199)
|
2021-11-30 03:20:28 +00:00
|
|
|
Source101: RPM-GPG-KEY-rocky-%{major}
|
2021-11-30 02:55:46 +00:00
|
|
|
Source102: RPM-GPG-KEY-rockytesting
|
|
|
|
|
|
|
|
# Release Sources (200-399)
|
|
|
|
Source200: EULA
|
|
|
|
Source201: LICENSE
|
|
|
|
Source202: Contributors
|
|
|
|
Source203: COMMUNITY-CHARTER
|
|
|
|
Source300: 85-display-manager.preset
|
|
|
|
Source301: 90-default.preset
|
|
|
|
Source302: 90-default-user.preset
|
|
|
|
Source303: 99-default-disable.preset
|
|
|
|
Source304: 50-redhat.conf
|
|
|
|
|
|
|
|
# Repo Sources (1200-1299)
|
|
|
|
Source1200: Rocky-BaseOS.repo
|
|
|
|
Source1201: Rocky-AppStream.repo
|
|
|
|
Source1202: Rocky-CRB.repo
|
|
|
|
Source1203: Rocky-Extras.repo
|
|
|
|
|
|
|
|
# Rocky Add-ons
|
|
|
|
Source1210: Rocky-HighAvailability.repo
|
|
|
|
Source1211: Rocky-ResilientStorage.repo
|
|
|
|
Source1212: Rocky-RT.repo
|
|
|
|
Source1213: Rocky-NFV.repo
|
|
|
|
Source1214: Rocky-SAP.repo
|
|
|
|
|
|
|
|
# Rocky Special Stuff
|
|
|
|
Source1220: Rocky-Media.repo
|
|
|
|
Source1223: Rocky-Devel.repo
|
|
|
|
Source1226: Rocky-Plus.repo
|
|
|
|
|
|
|
|
# Add ons (1300-1399)
|
|
|
|
Source1300: rocky.1.gz
|
|
|
|
|
|
|
|
# rocky secureboot certs placeholder (1400-1499)
|
|
|
|
|
|
|
|
%description
|
|
|
|
%{distro_name} release files.
|
|
|
|
|
2021-11-30 04:10:39 +00:00
|
|
|
%package -n rocky-repos%{?rlpkg}
|
2021-11-30 02:55:46 +00:00
|
|
|
Summary: %{distro_name} Package Repositories
|
|
|
|
License: %{rpm_license}
|
|
|
|
Provides: rocky-repos(%{major}) = %{full_release_version}
|
|
|
|
Requires: system-release = %{full_release_version}
|
|
|
|
Requires: rocky-gpg-keys
|
|
|
|
Conflicts: %{name} < 8.0
|
|
|
|
|
2021-11-30 04:10:39 +00:00
|
|
|
%description -n rocky-repos%{?rlpkg}
|
2021-11-30 02:55:46 +00:00
|
|
|
%{distro_name} package repository files for yum/dnf
|
|
|
|
|
2021-11-30 04:10:39 +00:00
|
|
|
%package -n rocky-gpg-keys%{?rlpkg}
|
2021-11-30 02:55:46 +00:00
|
|
|
Summary: Rocky RPM GPG Keys
|
|
|
|
Conflicts: %{name} < 8.0
|
|
|
|
|
2021-11-30 04:10:39 +00:00
|
|
|
%description -n rocky-gpg-keys%{?rlpkg}
|
2021-11-30 02:55:46 +00:00
|
|
|
This package provides the RPM signature keys for Rocky.
|
|
|
|
|
2021-11-30 04:10:39 +00:00
|
|
|
%package -n rocky-sb-certs%{?rlpkg}
|
2021-11-30 02:55:46 +00:00
|
|
|
Summary: %{distro_name} public secureboot certificates
|
|
|
|
Group: System Environment/Base
|
|
|
|
Provides: system-sb-certs = %{version}-%{release}
|
|
|
|
|
2021-11-30 04:10:39 +00:00
|
|
|
%description -n rocky-sb-certs%{?rlpkg}
|
2021-11-30 02:55:46 +00:00
|
|
|
This package contains the %{distro_name} secureboot public certificates.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
echo Good.
|
|
|
|
|
|
|
|
%build
|
|
|
|
echo Good.
|
|
|
|
|
|
|
|
%install
|
|
|
|
# docs dir for license and contributors
|
|
|
|
mkdir ./docs
|
|
|
|
cp %{SOURCE201} %{SOURCE202} %{SOURCE203} ./docs
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# system-release data
|
|
|
|
install -d -m 0755 %{buildroot}%{_sysconfdir}
|
2021-11-30 04:10:39 +00:00
|
|
|
echo "%{distro_name} release %{version} (%{distro_code})%{?rlstatement: %{rlstatement}}" > %{buildroot}%{_sysconfdir}/rocky-release
|
2021-11-30 02:55:46 +00:00
|
|
|
echo "Derived from Red Hat Enterprise Linux %{version}" > %{buildroot}%{_sysconfdir}/rocky-release-upstream
|
|
|
|
ln -s rocky-release %{buildroot}%{_sysconfdir}/system-release
|
|
|
|
ln -s rocky-release %{buildroot}%{_sysconfdir}/redhat-release
|
|
|
|
ln -s rocky-release %{buildroot}%{_sysconfdir}/centos-release
|
|
|
|
mkdir -p %{buildroot}%{_mandir}/man1
|
|
|
|
install -p -m 0644 %{SOURCE1300} %{buildroot}%{_mandir}/man1/
|
|
|
|
|
|
|
|
# Create the os-release file
|
|
|
|
install -d -m 0755 %{buildroot}%{_prefix}/lib
|
|
|
|
cat > %{buildroot}%{_prefix}/lib/os-release << EOF
|
|
|
|
NAME="%{distro_name}"
|
|
|
|
VERSION="%{full_release_version} (%{distro_code})"
|
|
|
|
ID="rocky"
|
|
|
|
ID_LIKE="rhel centos fedora"
|
|
|
|
VERSION_ID="%{full_release_version}"
|
|
|
|
PLATFORM_ID="platform:el%{major}"
|
2021-11-30 04:10:39 +00:00
|
|
|
PRETTY_NAME="%{distro_name} %{full_release_version} (%{distro_code})%{?rlstatement: %{rlstatement}}"
|
2021-11-30 02:55:46 +00:00
|
|
|
ANSI_COLOR="0;32"
|
|
|
|
CPE_NAME="cpe:/o:rocky:rocky:%{full_release_version}:GA"
|
|
|
|
HOME_URL="https://rockylinux.org/"
|
|
|
|
BUG_REPORT_URL="https://bugs.rockylinux.org/"
|
|
|
|
ROCKY_SUPPORT_PRODUCT="%{distro_name}"
|
|
|
|
ROCKY_SUPPORT_PRODUCT_VERSION="%{major}"
|
|
|
|
EOF
|
|
|
|
|
|
|
|
# Create the symlink for /etc/os-release
|
|
|
|
ln -s ../usr/lib/os-release %{buildroot}%{_sysconfdir}/os-release
|
|
|
|
|
|
|
|
# write cpe to /etc/system/release-cpe
|
|
|
|
echo "cpe:/o:rocky:rocky:%{full_release_version}:GA" > %{buildroot}%{_sysconfdir}/system-release-cpe
|
|
|
|
|
|
|
|
# create /etc/issue and /etc/issue.net, /etc/issue.d
|
|
|
|
echo '\S' > %{buildroot}%{_sysconfdir}/issue
|
|
|
|
echo 'Kernel \r on an \m' >> %{buildroot}%{_sysconfdir}/issue
|
|
|
|
cp %{buildroot}%{_sysconfdir}/issue{,.net}
|
|
|
|
echo >> %{buildroot}%{_sysconfdir}/issue
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/issue.d
|
|
|
|
|
|
|
|
# set up the dist tag macros
|
|
|
|
install -d -m 0755 %{buildroot}%{_sysconfdir}/rpm
|
|
|
|
cat > %{buildroot}%{_sysconfdir}/rpm/macros.dist << EOF
|
|
|
|
# dist macros.
|
|
|
|
|
|
|
|
%%rocky_ver %{major}
|
|
|
|
%%rocky %{major}
|
|
|
|
%%centos_ver %{major}
|
|
|
|
%%centos %{major}
|
|
|
|
%%rhel %{major}
|
|
|
|
%%dist .el%{major}
|
|
|
|
%%el%{major} 1
|
|
|
|
EOF
|
|
|
|
|
|
|
|
# Data directory
|
|
|
|
install -d -m 0755 %{buildroot}%{_datadir}/rocky-release
|
|
|
|
ln -s rocky-release %{buildroot}%{_datadir}/redhat-release
|
|
|
|
install -p -m 0644 %{SOURCE200} %{buildroot}%{_datadir}/rocky-release/
|
|
|
|
|
|
|
|
# end system-release data
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# systemd section
|
|
|
|
install -d -m 0755 %{buildroot}%{_prefix}/lib/systemd/system-preset/
|
|
|
|
install -d -m 0755 %{buildroot}%{_prefix}/lib/systemd/user-preset/
|
|
|
|
install -m 0644 %{SOURCE300} %{buildroot}/%{_prefix}/lib/systemd/system-preset/
|
|
|
|
install -m 0644 %{SOURCE301} %{buildroot}/%{_prefix}/lib/systemd/system-preset/
|
|
|
|
install -m 0644 %{SOURCE302} %{buildroot}/%{_prefix}/lib/systemd/system-preset/
|
|
|
|
|
|
|
|
# same behavior for both presets
|
|
|
|
install -m 0644 %{SOURCE303} %{buildroot}/%{_prefix}/lib/systemd/system-preset/
|
|
|
|
install -m 0644 %{SOURCE303} %{buildroot}/%{_prefix}/lib/systemd/user-preset/
|
|
|
|
|
|
|
|
# sysctl presets
|
|
|
|
install -d -m 0755 %{buildroot}%{_prefix}/lib/sysctl.d/
|
|
|
|
install -m 0644 %{SOURCE304} %{buildroot}/%{_prefix}/lib/sysctl.d/
|
|
|
|
|
|
|
|
# systemd section
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# start secureboot section
|
|
|
|
install -d -m 0755 %{buildroot}%{_sysconfdir}/pki/sb-certs/
|
|
|
|
install -d -m 0755 %{buildroot}%{_datadir}/pki/sb-certs/
|
|
|
|
|
|
|
|
# x86_64
|
|
|
|
echo "placeholder" > %{buildroot}%{_datadir}/pki/sb-certs/secureboot-ca-x86_64.crt
|
|
|
|
|
|
|
|
# aarch64
|
|
|
|
echo "placeholder" > %{buildroot}%{_datadir}/pki/sb-certs/secureboot-ca-aarch64.crt
|
|
|
|
|
|
|
|
# ppc64le
|
|
|
|
echo "placeholder" > %{buildroot}%{_datadir}/pki/sb-certs/secureboot-ca-ppc64le.crt
|
|
|
|
|
|
|
|
# armhfp
|
|
|
|
echo "placeholder" > %{buildroot}%{_datadir}/pki/sb-certs/secureboot-ca-armhfp.crt
|
|
|
|
|
|
|
|
# s390x
|
|
|
|
echo "placeholder" > %{buildroot}%{_datadir}/pki/sb-certs/secureboot-ca-s390x.crt
|
|
|
|
|
|
|
|
# symlinks for everybody
|
|
|
|
for x in $(ls %{buildroot}%{_datadir}/pki/sb-certs); do
|
|
|
|
ln -sr %{buildroot}%{_datadir}/pki/sb-certs/${x} %{buildroot}%{_sysconfdir}/pki/sb-certs/${x}
|
|
|
|
done
|
|
|
|
|
|
|
|
# end secureboot section
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# dnf repo section
|
|
|
|
install -d -m 0755 %{buildroot}%{_sysconfdir}/yum.repos.d
|
|
|
|
install -p -m 0644 %{SOURCE1200} %{buildroot}%{_sysconfdir}/yum.repos.d/
|
|
|
|
install -p -m 0644 %{SOURCE1201} %{buildroot}%{_sysconfdir}/yum.repos.d/
|
|
|
|
install -p -m 0644 %{SOURCE1202} %{buildroot}%{_sysconfdir}/yum.repos.d/
|
|
|
|
install -p -m 0644 %{SOURCE1203} %{buildroot}%{_sysconfdir}/yum.repos.d/
|
|
|
|
install -p -m 0644 %{SOURCE1210} %{buildroot}%{_sysconfdir}/yum.repos.d/
|
|
|
|
install -p -m 0644 %{SOURCE1211} %{buildroot}%{_sysconfdir}/yum.repos.d/
|
|
|
|
install -p -m 0644 %{SOURCE1212} %{buildroot}%{_sysconfdir}/yum.repos.d/
|
|
|
|
install -p -m 0644 %{SOURCE1213} %{buildroot}%{_sysconfdir}/yum.repos.d/
|
|
|
|
install -p -m 0644 %{SOURCE1214} %{buildroot}%{_sysconfdir}/yum.repos.d/
|
|
|
|
install -p -m 0644 %{SOURCE1220} %{buildroot}%{_sysconfdir}/yum.repos.d/
|
|
|
|
install -p -m 0644 %{SOURCE1223} %{buildroot}%{_sysconfdir}/yum.repos.d/
|
|
|
|
install -p -m 0644 %{SOURCE1226} %{buildroot}%{_sysconfdir}/yum.repos.d/
|
|
|
|
|
|
|
|
# dnf stuff
|
|
|
|
install -d -m 0755 %{buildroot}%{_sysconfdir}/dnf/vars
|
|
|
|
echo "%{contentdir}" > %{buildroot}%{_sysconfdir}/dnf/vars/contentdir
|
|
|
|
echo "%{rltype}" > %{buildroot}%{_sysconfdir}/dnf/vars/rltype
|
|
|
|
|
|
|
|
# Copy out GPG keys
|
|
|
|
install -d -m 0755 %{buildroot}%{_sysconfdir}/pki/rpm-gpg
|
|
|
|
#install -p -m 0644 %{SOURCE101} %{buildroot}%{_sysconfdir}/pki/rpm-gpg/
|
|
|
|
install -p -m 0644 %{SOURCE102} %{buildroot}%{_sysconfdir}/pki/rpm-gpg/
|
|
|
|
# end dnf repo section
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
%files
|
|
|
|
%license docs/LICENSE
|
|
|
|
%doc docs/Contributors docs/COMMUNITY-CHARTER
|
|
|
|
%dir %{_sysconfdir}/yum.repos.d
|
|
|
|
%{_sysconfdir}/redhat-release
|
|
|
|
%{_sysconfdir}/centos-release
|
|
|
|
%{_sysconfdir}/system-release
|
|
|
|
%{_sysconfdir}/rocky-release
|
|
|
|
%{_sysconfdir}/rocky-release-upstream
|
|
|
|
%config(noreplace) %{_sysconfdir}/os-release
|
|
|
|
%config %{_sysconfdir}/system-release-cpe
|
|
|
|
%config(noreplace) %{_sysconfdir}/issue
|
|
|
|
%config(noreplace) %{_sysconfdir}/issue.net
|
|
|
|
%dir %{_sysconfdir}/issue.d
|
|
|
|
%{_sysconfdir}/rpm/macros.dist
|
|
|
|
%{_datadir}/redhat-release
|
|
|
|
%{_datadir}/rocky-release
|
|
|
|
%{_prefix}/lib/os-release
|
|
|
|
%{_prefix}/lib/systemd/system-preset/*
|
|
|
|
%{_prefix}/lib/systemd/user-preset/*
|
|
|
|
%{_prefix}/lib/sysctl.d/50-redhat.conf
|
|
|
|
%{_mandir}/man1/rocky.1.gz
|
|
|
|
|
2021-11-30 04:10:39 +00:00
|
|
|
%files -n rocky-repos%{?rlpkg}
|
2021-11-30 02:55:46 +00:00
|
|
|
%license docs/LICENSE
|
|
|
|
%config(noreplace) %{_sysconfdir}/yum.repos.d/Rocky-*.repo
|
|
|
|
%config(noreplace) %{_sysconfdir}/dnf/vars/contentdir
|
|
|
|
%config(noreplace) %{_sysconfdir}/dnf/vars/rltype
|
|
|
|
|
2021-11-30 04:10:39 +00:00
|
|
|
%files -n rocky-gpg-keys%{?rlpkg}
|
2021-11-30 02:55:46 +00:00
|
|
|
%{_sysconfdir}/pki/rpm-gpg/
|
|
|
|
|
2021-11-30 04:10:39 +00:00
|
|
|
%files -n rocky-sb-certs%{?rlpkg}
|
2021-11-30 02:55:46 +00:00
|
|
|
# care: resetting symlinks is intended
|
|
|
|
%dir %{_sysconfdir}/pki/sb-certs
|
|
|
|
%dir %{_datadir}/pki/sb-certs
|
|
|
|
%{_sysconfdir}/pki/sb-certs/*.crt
|
|
|
|
%{_datadir}/pki/sb-certs/*.crt
|
|
|
|
|
|
|
|
%changelog
|
2021-11-30 04:10:39 +00:00
|
|
|
* Mon Nov 29 2021 Louis Abel <label@rockylinux.org> - 9.0-1.2
|
2021-11-30 02:55:46 +00:00
|
|
|
- Sync with upstream
|
|
|
|
- Adding conditionals section for future use
|
2021-11-30 04:10:39 +00:00
|
|
|
- Add direct LookAhead support
|
2021-11-30 02:55:46 +00:00
|
|
|
|
|
|
|
* Mon Nov 01 2021 Louis Abel <label@rockylinux.org> - 9.0-1.1
|
|
|
|
- Change everything to baseurl for now
|
|
|
|
- Add LH repository
|
|
|
|
|
|
|
|
* Tue Oct 05 2021 Louis Abel <label@rockylinux.org> - 9.0-1
|
|
|
|
- Init for Rocky Linux 9 (Blue Onyx)
|