From 0a51fe1e6ba8b30fcdb2c2171fc49ea2e2d6a56d Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Feb 21 2024 11:02:00 +0000 Subject: Use %version_override/%release_override to specify version/release by users When backporting the latest changes to CentOS Hyperscale reviewers were confused by using %version and %release to define "Version" and "Release" which are supposed to specify the values for %version and %release. Let's use different macros to make it more clear that these are supposed to be set by users building the rpm and add a comment to explain why we do this. --- diff --git a/systemd.spec b/systemd.spec index a09be1d..0dc8f07 100644 --- a/systemd.spec +++ b/systemd.spec @@ -33,8 +33,10 @@ Name: systemd Url: https://systemd.io -Version: %{?version}%{!?version:255.3} -Release: %{?release}%{!?release:%autorelease} +# Allow users to specify the version and release when building the rpm by +# setting the %%version_override and %%release_override macros. +Version: %{?version_override}%{!?version_override:255.3} +Release: %{?release_override:%{release_override}%{?dist}}%{!?release_override:%autorelease} %global stable %(c="%version"; [ "$c" = "${c#*.*}" ]; echo $?)