public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/fedora-release] f45: RPM macros: Redefining %fedora now changes %dist
@ 2026-08-10  9:34 
  0 siblings, 0 replies; only message in thread
From:  @ 2026-08-10  9:34 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/fedora-release
            Branch : f45
            Commit : 7a2518287bd7d1f35d2b95797c6916f850712118
            Author : Miro Hrončok <miro@hroncok.cz>
            Date   : 2019-09-03T23:55:13+02:00
            Stats  : +5/-2 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/fedora-release/c/7a2518287bd7d1f35d2b95797c6916f850712118?branch=f45

            Log:
            RPM macros: Redefining %fedora now changes %dist

To get a deterministic NEVR including the dist tag on a different release,
it used to be enough to call `rpm` with:

    --define 'dist .fcXX'

Later it got more complicated:

    --define 'dist %{?distprefix}.fcXX%{?with_bootstrap:~bootstrap}'

And now it is even more complicated:

    --define 'dist %{!?distprefix0:%{?distprefix}}%{expand:%{lua:for i=0,9999 do print("%{?distprefix" .. i .."}") end}}.fcXX%{?with_bootstrap:~bootstrap}'

It becomes more and more tedious. This change makes it possible to do this instead:

    --define 'fedora XX'

Signed-off-by: There is nothing to sign

---
diff --git a/fedora-release.spec b/fedora-release.spec
index bdc3129..505d69e 100644
--- a/fedora-release.spec
+++ b/fedora-release.spec
@@ -14,7 +14,7 @@
 Summary:        Fedora release files
 Name:           fedora-release
 Version:        32
-Release:        0.1
+Release:        0.2
 License:        MIT
 URL:            https://fedoraproject.org/
 
@@ -481,7 +481,7 @@ cat >> %{buildroot}%{_rpmconfigdir}/macros.d/macros.dist << EOF
 
 %%fedora              %{dist_version}
 %%__bootstrap         ~bootstrap
-%%dist                %%{!?distprefix0:%%{?distprefix}}%%{expand:%%{lua:for i=0,9999 do print("%%{?distprefix" .. i .."}") end}}.fc%{dist_version}%%{?with_bootstrap:%{__bootstrap}}
+%%dist                %%{!?distprefix0:%%{?distprefix}}%%{expand:%%{lua:for i=0,9999 do print("%%{?distprefix" .. i .."}") end}}.fc%%{fedora}%%{?with_bootstrap:%{__bootstrap}}
 %%fc%{dist_version}                1
 EOF
 
@@ -642,6 +642,9 @@ echo _DISABLED_ > %{buildroot}%{_prefix}/lib/variant
 
 
 %changelog
+* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 32-0.2
+- RPM macros: Redefining %%fedora now changes %%dist
+
 * Tue Aug 13 2019 Mohan Boddu <mboddu@bhujji.com> - 32-0.1
 - Setup for rawhide being F32
 - Disable zram-swap service (sgallagh)

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-10  9:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-10  9:34 [rpms/fedora-release] f45: RPM macros: Redefining %fedora now changes %dist 

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox