From 74810c5bc4fe7d872e54c253447ffd61bbc8839f Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: May 29 2024 12:54:54 +0000 Subject: Fix release field [skip changelog] --- diff --git a/systemd.spec b/systemd.spec index ba0c1d6..fc07235 100644 --- a/systemd.spec +++ b/systemd.spec @@ -32,14 +32,16 @@ # Build from git main %bcond upstream 0 -# %%{!?release_override:%%global release_override 1} +# Override %%autorelease. This is ugly, but rpmautospec doesn't implement +# autorelease correctly if the macro is conditionalized in the Release field. +%{?release_override:%global autorelease %{release_override}%{?dist}} Name: systemd Url: https://systemd.io # 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:256~rc3} -Release: %{?release_override:%{release_override}%{?dist}}%{!?release_override:%autorelease} +Release: %autorelease %global stable %(c="%version"; [ "$c" = "${c#*.*}" ]; echo $?)