public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/fedora-release] f45: make $releasever return "rawhide" on Rawhide
@ 2026-08-10  9:35 
  0 siblings, 0 replies; only message in thread
From:  @ 2026-08-10  9:35 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/fedora-release
            Branch : f45
            Commit : 77a0f46ca6bcd322b62a43fdcac4a97fe5ff7887
            Author : Kamil Páral <kparal@redhat.com>
            Date   : 2021-02-11T12:43:53+01:00
            Stats  : +17/-3 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/fedora-release/c/77a0f46ca6bcd322b62a43fdcac4a97fe5ff7887?branch=f45

            Log:
            make $releasever return "rawhide" on Rawhide

This is a fairly significant change which will make $releasever (as understood
by dnf) return "rawhide" instead of a number (e.g. 35) for Rawhide users. The
purpose is to have a constant identifier, that developers and repo owners can
rely on. This will make Rawhide a true rolling release which won't need careful
adjustments every time we branch - once on Rawhide, you'll always stay on
Rawhide. This should also significantly simplify repo management, because repos
will no longer need a separate config for Rawhide which is different from stable
releases. The same config file containing "$releasever" can be used (instead of
hardcoding "rawhide" in URL), and it will resolve correctly to a "rawhide/"
directory on the repo server.

The overall hope is that this change should help users (system maintenance),
developers (simplifying automation) and repo owners (release differentiation no
longer needed). Please read the included link for a longer discussion.

This change introduces a new variable `is_rawhide`, which should be set to `1`
or `0`, depending on whether this release is Rawhide or not. It will then set
some additional variables automatically, to simplify specfile maintenance.

This change is made possible by dnf looking at package provides, when
determining $releasever, and `system-release(releasever)` is the first provides
it looks at. We don't use it in stable releases, but we can set the value on
Rawhide and it will have precedence.

This change will also need an accompanying change in fedora-repos, to be
committed and built together.

Related: https://pagure.io/releng/issue/7445

---
diff --git a/fedora-release.spec b/fedora-release.spec
index 9b02cb4..51a234f 100644
--- a/fedora-release.spec
+++ b/fedora-release.spec
@@ -1,10 +1,18 @@
 %define release_name Rawhide
+%define is_rawhide 1
+
 %define dist_version 35
 %define rhel_dist_version 9
-%define bug_version rawhide
 
-# Change this when branching to fNN
+%if %{is_rawhide}
+%define bug_version rawhide
+%define releasever rawhide
 %define doc_version rawhide
+%else
+%define bug_version %{dist_version}
+%define releasever %{dist_version}
+%define doc_version f%{dist_version}
+%endif
 
 %if 0%{?eln}
 %bcond_with basic
@@ -50,7 +58,7 @@
 Summary:        Fedora release files
 Name:           fedora-release
 Version:        35
-Release:        0.1%{?eln:.eln%{eln}}
+Release:        0.10%{?eln:.eln%{eln}}
 License:        MIT
 URL:            https://fedoraproject.org/
 
@@ -107,6 +115,12 @@ Suggests:   fedora-release
 Requires:   fedora-repos(%{version})
 Requires:   fedora-release-identity = %{version}-%{release}
 
+%if %{is_rawhide}
+# Make $releasever return "rawhide" on Rawhide
+# https://pagure.io/releng/issue/7445
+Provides:       system-release(releasever) = %{releasever}
+%endif
+
 # Fedora ships a generic-release package to make the creation of Remixes
 # easier, but it cannot coexist with the fedora-release[-*] packages, so we
 # will explicitly conflict with it.

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

only message in thread, other threads:[~2026-08-10  9:35 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:35 [rpms/fedora-release] f45: make $releasever return "rawhide" on Rawhide 

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