mirror of
https://git.rockylinux.org/staging/src/rocky-release.git
synced 2024-11-21 21:51:24 +00:00
clarification, fixes
This commit is contained in:
parent
db752a4424
commit
67818c4232
21
README.md
21
README.md
@ -2,20 +2,19 @@ Release package - All PR's should be against original/rpms/rocky-release
|
||||
|
||||
## Notes for Packagers/Builders
|
||||
|
||||
This package produces both stable packages of `rocky-release`
|
||||
(`rocky-release`, `rocky-repos`, `rocky-gpg-keys`) as well as `rocky-release-lookahead`
|
||||
(all packages appended with `-lookahead`). By default, it only produces the
|
||||
"stable" version of the packages.
|
||||
This package produces multiple variants of `rocky-release`:
|
||||
|
||||
When building the package, the `rllh` macro can define the behavior of the
|
||||
build:
|
||||
* Stable: `rocky-release`, `rocky-repos`, `rocky-gpg-keys`, etc
|
||||
* LookAhead: All packages appended with `-lookahead`
|
||||
* Beta: All packages appended with `-Beta`
|
||||
|
||||
* If `rllh` is set to `0` or is undefined, the stable packages are built
|
||||
* If `rllh` is set to a number higher than `0`, the lookahead packages are built
|
||||
* If `rllh` or `rlbeta` are set to a number higher than 0, those variants are built
|
||||
* If `rllh` and `rlbeta` are set at the same time higher than 0, build will fail.
|
||||
|
||||
When `rllh` is set to something higher than `0`, the minor version will
|
||||
typically be `y+1`. So if the current stable os `X.0`, the next would be `X.1`.
|
||||
For pre-releases, both packages should produce `X.0` until changed in the spec.
|
||||
When `rllh` is set the minor version will typically be `y+1`. So if the current
|
||||
stable is `X.0`, the next would be `X.1`.
|
||||
|
||||
For pre-releases/beta, both packages should produce `X.0` until changed in the spec.
|
||||
|
||||
The `rllh` macro may be versioned out for future use.
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
%define minor 0
|
||||
%define rocky_rel 1%{?rllh:.%{rllh}}%{!?rllh:.0}
|
||||
%define rpm_license BSD-3-Clause
|
||||
%define dist .el%{major}
|
||||
|
||||
%define contentdir pub/rocky
|
||||
%define rltype stable
|
||||
@ -25,19 +26,31 @@
|
||||
################################################################################
|
||||
# Rocky LookAhead Section
|
||||
#
|
||||
# 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"
|
||||
# Reset defines for LookAhead variant. Default is stable if 0 or undefined.
|
||||
%if 0%{?rllh}
|
||||
%define minor 0
|
||||
%define contentdir pub/rocky-lh
|
||||
%define rltype lookahead
|
||||
%define rlpkg -lookahead
|
||||
%define rlstatement (LookAhead)
|
||||
%define rlstatement LookAhead
|
||||
%endif
|
||||
# End Rocky LookAhead Section
|
||||
################################################################################
|
||||
|
||||
################################################################################
|
||||
# Rocky Beta Section
|
||||
#
|
||||
# Reset defines for Beta variant. Default is stable if 0 or undefined.
|
||||
# We do NOT override the minor version number here.
|
||||
%if 0%{?rlbeta}
|
||||
%define contentdir pub/rocky-beta
|
||||
%define rltype beta
|
||||
%define rlpkg -beta
|
||||
%define rlstatement Beta
|
||||
%endif
|
||||
# End Rocky Beta Section
|
||||
################################################################################
|
||||
|
||||
%define base_release_version %{major}
|
||||
%define dist_release_version %{major}
|
||||
%define full_release_version %{major}.%{minor}
|
||||
@ -52,8 +65,8 @@
|
||||
# conditional section for future use
|
||||
|
||||
Name: rocky-release%{?rlpkg}
|
||||
Version: %{major}.%{minor}
|
||||
Release: %{rocky_rel}.el%{major}
|
||||
Version: %{full_release_version}
|
||||
Release: %{rocky_rel}%{dist}
|
||||
Summary: %{distro_name} release files
|
||||
Group: System Environment/Base
|
||||
License: %{rpm_license}
|
||||
@ -158,6 +171,12 @@ Provides: system-sb-certs = %{version}-%{release}
|
||||
This package contains the %{distro_name} secureboot public certificates.
|
||||
|
||||
%prep
|
||||
%if 0%{?rllh} && 0%{?rlbeta}
|
||||
echo "!! WARNING !!"
|
||||
echo "Both LookAhead and Beta were enabled. This is not supported."
|
||||
echo "As a result: BUILD FAILED."
|
||||
exit 1
|
||||
%endif
|
||||
echo Good.
|
||||
|
||||
%build
|
||||
@ -171,8 +190,8 @@ cp %{SOURCE201} %{SOURCE202} %{SOURCE203} ./docs
|
||||
################################################################################
|
||||
# system-release data
|
||||
install -d -m 0755 %{buildroot}%{_sysconfdir}
|
||||
echo "%{distro_name} release %{version} (%{distro_code})%{?rlstatement: %{rlstatement}}" > %{buildroot}%{_sysconfdir}/rocky-release
|
||||
echo "Derived from Red Hat Enterprise Linux %{version}" > %{buildroot}%{_sysconfdir}/rocky-release-upstream
|
||||
echo "%{distro_name} release %{full_release_version}%{?rlstatement: %{rlstatement}} (%{distro_code})" > %{buildroot}%{_sysconfdir}/rocky-release
|
||||
echo "Derived from Red Hat Enterprise Linux %{full_release_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
|
||||
@ -188,13 +207,13 @@ ID="rocky"
|
||||
ID_LIKE="rhel centos fedora"
|
||||
VERSION_ID="%{full_release_version}"
|
||||
PLATFORM_ID="platform:el%{major}"
|
||||
PRETTY_NAME="%{distro_name} %{full_release_version} (%{distro_code})%{?rlstatement: %{rlstatement}}"
|
||||
PRETTY_NAME="%{distro_name} %{full_release_version}%{?rlstatement: %{rlstatement}} (%{distro_code})"
|
||||
ANSI_COLOR="0;32"
|
||||
CPE_NAME="cpe:/o:rocky:rocky:%{full_release_version}:GA"
|
||||
CPE_NAME="cpe:/o:rocky:rocky:%{full_release_version}"
|
||||
HOME_URL="https://rockylinux.org/"
|
||||
BUG_REPORT_URL="https://bugs.rockylinux.org/"
|
||||
ROCKY_SUPPORT_PRODUCT="%{distro_name}"
|
||||
ROCKY_SUPPORT_PRODUCT_VERSION="%{major}"
|
||||
ROCKY_SUPPORT_PRODUCT_VERSION="%{major}%{?rlstatement:-%{rlstatement}}"
|
||||
EOF
|
||||
|
||||
# Create the symlink for /etc/os-release
|
||||
@ -248,18 +267,6 @@ 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/
|
||||
|
||||
# lookahead replacements
|
||||
# TODO: Is there a cleaner way?
|
||||
%if 0%{?rllh}
|
||||
install -m 0644 %{SOURCE400} %{buildroot}/%{_prefix}/lib/systemd/system-preset/85-display-manager.preset
|
||||
install -m 0644 %{SOURCE401} %{buildroot}/%{_prefix}/lib/systemd/system-preset/90-default.preset
|
||||
install -m 0644 %{SOURCE402} %{buildroot}/%{_prefix}/lib/systemd/system-preset/90-default-user.preset
|
||||
install -m 0644 %{SOURCE403} %{buildroot}/%{_prefix}/lib/systemd/system-preset/99-default-disable.preset
|
||||
install -m 0644 %{SOURCE403} %{buildroot}/%{_prefix}/lib/systemd/user-preset/99-default-disable.preset
|
||||
install -m 0644 %{SOURCE404} %{buildroot}/%{_prefix}/lib/sysctl.d/50-redhat.conf
|
||||
%endif
|
||||
|
||||
# systemd section
|
||||
################################################################################
|
||||
|
||||
@ -314,11 +321,25 @@ 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 %{SOURCE101} %{buildroot}%{_sysconfdir}/pki/rpm-gpg/
|
||||
install -p -m 0644 %{SOURCE102} %{buildroot}%{_sysconfdir}/pki/rpm-gpg/
|
||||
# end dnf repo section
|
||||
################################################################################
|
||||
|
||||
################################################################################
|
||||
# lookahead overrides
|
||||
# TODO: Is there a cleaner way?
|
||||
%if 0%{?rllh}
|
||||
install -m 0644 %{SOURCE400} %{buildroot}/%{_prefix}/lib/systemd/system-preset/85-display-manager.preset
|
||||
install -m 0644 %{SOURCE401} %{buildroot}/%{_prefix}/lib/systemd/system-preset/90-default.preset
|
||||
install -m 0644 %{SOURCE402} %{buildroot}/%{_prefix}/lib/systemd/system-preset/90-default-user.preset
|
||||
install -m 0644 %{SOURCE403} %{buildroot}/%{_prefix}/lib/systemd/system-preset/99-default-disable.preset
|
||||
install -m 0644 %{SOURCE403} %{buildroot}/%{_prefix}/lib/systemd/user-preset/99-default-disable.preset
|
||||
install -m 0644 %{SOURCE404} %{buildroot}/%{_prefix}/lib/sysctl.d/50-redhat.conf
|
||||
%endif
|
||||
# lookahead replacements
|
||||
################################################################################
|
||||
|
||||
%files
|
||||
%license docs/LICENSE
|
||||
%doc docs/Contributors docs/COMMUNITY-CHARTER
|
||||
@ -363,4 +384,5 @@ install -p -m 0644 %{SOURCE102} %{buildroot}%{_sysconfdir}/pki/rpm-gpg/
|
||||
- Init for Rocky Linux 9 (Blue Onyx)
|
||||
- Sync with upstream
|
||||
- Add direct LookAhead support
|
||||
- Add direct Beta support
|
||||
- Add spec file notes for packagers
|
||||
|
Loading…
Reference in New Issue
Block a user