#288 make $releasever return eln and not rawhide
Merged 7 months ago by sgallagh. Opened 7 months ago by sbonazzo.
rpms/ sbonazzo/fedora-release eln_releasever  into  rawhide

file modified
+6 -1
@@ -8,7 +8,11 @@ 

  

  %if %{is_rawhide}

  %define bug_version rawhide

- %define releasever rawhide

+ %if 0%{?eln}

+   %define releasever eln

+ %else

+   %define releasever rawhide

+ %endif

  %define doc_version rawhide

  %else

  %define bug_version %{dist_version}
@@ -153,6 +157,7 @@ 

  

  %if %{is_rawhide}

  # Make $releasever return "rawhide" on Rawhide

+ # and "eln" on ELN.

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

  Provides:       system-release(releasever) = %{releasever}

  %endif

makes life much easier when using copr repo for ELN.

Signed-off-by: Sandro Bonazzola sbonazzo@redhat.com

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/8f78c2fc64a54f23a07b53931fbe477f

Can you explain why you think this is a good idea? What benefit does it provide? I'm wary of changing this value without knowing what the fallout will be.

@kparal Maybe you have thoughts here? You were the driving force for the Rawhide version of this.

As far as I can tell, by providing system-release(releasever) = eln instead of system-release(releasever) = rawhide what happens is that dnf is going to take $releasever as eln instead of rawhide when parsing dnf repo config.

This means that copr generated repo file like https://copr.fedorainfracloud.org/coprs/g/centos-automotive-sig/dui/repo/fedora-eln/group_centos-automotive-sig-dui-fedora-eln.repo which has:

baseurl=https://download.copr.fedorainfracloud.org/results/@centos-automotive-sig/dui/fedora-$releasever-$basearch/

will really get to https://download.copr.fedorainfracloud.org/results/@centos-automotive-sig/dui/fedora-eln-x86_64/ instead of https://download.copr.fedorainfracloud.org/results/@centos-automotive-sig/dui/fedora-rawhide-x86_64/

As far as I can tell, $releasever is used only with dnf repository configuration and shouldn't have side effects.

@kparal Maybe you have thoughts here? You were the driving force for the Rawhide version of this.

Yes, I was the one who pushed https://pagure.io/releng/issue/7445 . It was 2 years ago, but I'll try to remember :-) At that point, I haven't considered ELN at all. Also, I didn't know how exactly ELN repos are handled (when it comes to $releasever, repo definitions, mirror manager, etc).

I tried to quickly look at it now. In fedora-eln.repo, all URLs are hardcoded (don't use $releasever), and mirror manager doesn't support eln as a repo key. So, this patch shouldn't affect any of that.

Assuming that ELN is and will continue to be just a rebuilt Rawhide, this patch will make it easier to consume COPR repos, which currently uses $releasever even for ELN. Here's the dui copr. You can see that for CentosStream9, it hardcodes the URL. The same hardcoding happens for EPEL, e.g. here.

An alternative approach is to ask Copr devs to hardcode the ELN path for ELN repos, instead of using $releasever.

This patch seems like the more systemic approach from the two. But it would be good if someone more knowledgeable than me looked at it as well, to confirm this won't have unintended consequences elsewhere.

rebased onto a4043c9

7 months ago

Pull-Request has been merged by sgallagh

7 months ago

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/68388b7dff6f4273a7c594b28757dd20

Metadata