mirror of
https://git.rockylinux.org/staging/src/rocky-release.git
synced 2024-11-25 15:31: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
|
## Notes for Packagers/Builders
|
||||||
|
|
||||||
This package produces both stable packages of `rocky-release`
|
This package produces multiple variants 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.
|
|
||||||
|
|
||||||
When building the package, the `rllh` macro can define the behavior of the
|
* Stable: `rocky-release`, `rocky-repos`, `rocky-gpg-keys`, etc
|
||||||
build:
|
* 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` or `rlbeta` are set to a number higher than 0, those variants are built
|
||||||
* If `rllh` is set to a number higher than `0`, the lookahead packages 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
|
When `rllh` is set the minor version will typically be `y+1`. So if the current
|
||||||
typically be `y+1`. So if the current stable os `X.0`, the next would be `X.1`.
|
stable is `X.0`, the next would be `X.1`.
|
||||||
For pre-releases, both packages should produce `X.0` until changed in the spec.
|
|
||||||
|
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.
|
The `rllh` macro may be versioned out for future use.
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
%define minor 0
|
%define minor 0
|
||||||
%define rocky_rel 1%{?rllh:.%{rllh}}%{!?rllh:.0}
|
%define rocky_rel 1%{?rllh:.%{rllh}}%{!?rllh:.0}
|
||||||
%define rpm_license BSD-3-Clause
|
%define rpm_license BSD-3-Clause
|
||||||
|
%define dist .el%{major}
|
||||||
|
|
||||||
%define contentdir pub/rocky
|
%define contentdir pub/rocky
|
||||||
%define rltype stable
|
%define rltype stable
|
||||||
@ -25,19 +26,31 @@
|
|||||||
################################################################################
|
################################################################################
|
||||||
# Rocky LookAhead Section
|
# Rocky LookAhead Section
|
||||||
#
|
#
|
||||||
# Check for lookahead and reset defines - This ensures a "lookahead" system
|
# Reset defines for LookAhead variant. Default is stable if 0 or undefined.
|
||||||
# will contact the mirrors or set the baseurl to properly use Rocky LookAhead,
|
|
||||||
# otherwise, the default is "stable"
|
|
||||||
%if 0%{?rllh}
|
%if 0%{?rllh}
|
||||||
%define minor 0
|
%define minor 0
|
||||||
%define contentdir pub/rocky-lh
|
%define contentdir pub/rocky-lh
|
||||||
%define rltype lookahead
|
%define rltype lookahead
|
||||||
%define rlpkg -lookahead
|
%define rlpkg -lookahead
|
||||||
%define rlstatement (LookAhead)
|
%define rlstatement LookAhead
|
||||||
%endif
|
%endif
|
||||||
# End Rocky LookAhead Section
|
# 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 base_release_version %{major}
|
||||||
%define dist_release_version %{major}
|
%define dist_release_version %{major}
|
||||||
%define full_release_version %{major}.%{minor}
|
%define full_release_version %{major}.%{minor}
|
||||||
@ -52,8 +65,8 @@
|
|||||||
# conditional section for future use
|
# conditional section for future use
|
||||||
|
|
||||||
Name: rocky-release%{?rlpkg}
|
Name: rocky-release%{?rlpkg}
|
||||||
Version: %{major}.%{minor}
|
Version: %{full_release_version}
|
||||||
Release: %{rocky_rel}.el%{major}
|
Release: %{rocky_rel}%{dist}
|
||||||
Summary: %{distro_name} release files
|
Summary: %{distro_name} release files
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
License: %{rpm_license}
|
License: %{rpm_license}
|
||||||
@ -158,6 +171,12 @@ Provides: system-sb-certs = %{version}-%{release}
|
|||||||
This package contains the %{distro_name} secureboot public certificates.
|
This package contains the %{distro_name} secureboot public certificates.
|
||||||
|
|
||||||
%prep
|
%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.
|
echo Good.
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -171,8 +190,8 @@ cp %{SOURCE201} %{SOURCE202} %{SOURCE203} ./docs
|
|||||||
################################################################################
|
################################################################################
|
||||||
# system-release data
|
# system-release data
|
||||||
install -d -m 0755 %{buildroot}%{_sysconfdir}
|
install -d -m 0755 %{buildroot}%{_sysconfdir}
|
||||||
echo "%{distro_name} release %{version} (%{distro_code})%{?rlstatement: %{rlstatement}}" > %{buildroot}%{_sysconfdir}/rocky-release
|
echo "%{distro_name} release %{full_release_version}%{?rlstatement: %{rlstatement}} (%{distro_code})" > %{buildroot}%{_sysconfdir}/rocky-release
|
||||||
echo "Derived from Red Hat Enterprise Linux %{version}" > %{buildroot}%{_sysconfdir}/rocky-release-upstream
|
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}/system-release
|
||||||
ln -s rocky-release %{buildroot}%{_sysconfdir}/redhat-release
|
ln -s rocky-release %{buildroot}%{_sysconfdir}/redhat-release
|
||||||
ln -s rocky-release %{buildroot}%{_sysconfdir}/centos-release
|
ln -s rocky-release %{buildroot}%{_sysconfdir}/centos-release
|
||||||
@ -188,13 +207,13 @@ ID="rocky"
|
|||||||
ID_LIKE="rhel centos fedora"
|
ID_LIKE="rhel centos fedora"
|
||||||
VERSION_ID="%{full_release_version}"
|
VERSION_ID="%{full_release_version}"
|
||||||
PLATFORM_ID="platform:el%{major}"
|
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"
|
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/"
|
HOME_URL="https://rockylinux.org/"
|
||||||
BUG_REPORT_URL="https://bugs.rockylinux.org/"
|
BUG_REPORT_URL="https://bugs.rockylinux.org/"
|
||||||
ROCKY_SUPPORT_PRODUCT="%{distro_name}"
|
ROCKY_SUPPORT_PRODUCT="%{distro_name}"
|
||||||
ROCKY_SUPPORT_PRODUCT_VERSION="%{major}"
|
ROCKY_SUPPORT_PRODUCT_VERSION="%{major}%{?rlstatement:-%{rlstatement}}"
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Create the symlink for /etc/os-release
|
# Create the symlink for /etc/os-release
|
||||||
@ -248,18 +267,6 @@ install -m 0644 %{SOURCE303} %{buildroot}/%{_prefix}/lib/systemd/user-preset/
|
|||||||
# sysctl presets
|
# sysctl presets
|
||||||
install -d -m 0755 %{buildroot}%{_prefix}/lib/sysctl.d/
|
install -d -m 0755 %{buildroot}%{_prefix}/lib/sysctl.d/
|
||||||
install -m 0644 %{SOURCE304} %{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
|
# systemd section
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
@ -314,11 +321,25 @@ echo "%{rltype}" > %{buildroot}%{_sysconfdir}/dnf/vars/rltype
|
|||||||
|
|
||||||
# Copy out GPG keys
|
# Copy out GPG keys
|
||||||
install -d -m 0755 %{buildroot}%{_sysconfdir}/pki/rpm-gpg
|
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/
|
install -p -m 0644 %{SOURCE102} %{buildroot}%{_sysconfdir}/pki/rpm-gpg/
|
||||||
# end dnf repo section
|
# 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
|
%files
|
||||||
%license docs/LICENSE
|
%license docs/LICENSE
|
||||||
%doc docs/Contributors docs/COMMUNITY-CHARTER
|
%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)
|
- Init for Rocky Linux 9 (Blue Onyx)
|
||||||
- Sync with upstream
|
- Sync with upstream
|
||||||
- Add direct LookAhead support
|
- Add direct LookAhead support
|
||||||
|
- Add direct Beta support
|
||||||
- Add spec file notes for packagers
|
- Add spec file notes for packagers
|
||||||
|
Loading…
Reference in New Issue
Block a user