Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1789346 - RFE: Add support for $releasever_major, $releasever_minor, and limited shell expansion for zypp yum repo file compatibility
Summary: RFE: Add support for $releasever_major, $releasever_minor, and limited shell ...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: dnf-community
TreeView+ depends on / blocked
 
Reported: 2020-01-09 12:11 UTC by Neal Gompa
Modified: 2020-08-14 00:38 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Neal Gompa 2020-01-09 12:11:30 UTC
Description of problem:
Zypper defines in its man page that two additional variables are auto-defined based on $releasever's definition: $releasever_major and $releasever_minor.

Per zypper(8):

> In addition $releasever_major will be set to the leading portion up to
> (but not including) the 1st dot; $releasever_minor to the trailing portion
> after the 1st dot. If there’s no dot in $releasever, $releasever_major is
> the same as $releasever and $releasever_minor is empty.

This can be verified by reading the man page of zypper on any Fedora system.

In addition, it seems that SUSE has implemented very limited shell expansion capabilities for supporting SUSE Linux Enterprise upgrades due to how their OBS names the repos[1].

For example, this is a common thing to see in repo files for SLE when trying to use repos from the openSUSE Build Service (or other OBS instances making SLE packages): "SLE_${releasever_major}${releasever_minor:+_SP$releasever_minor}".

These features may also be useful for dealing with the screwiness of RHEL repositories for EPEL. Currently the epel-release package cannot use $releasever because RHEL defines it as major.minor (e.g. 8.1). This is problematic because it makes distro-upgrades more painful than they should be.

[1]: https://doc.opensuse.org/projects/libzypp/HEAD/structzypp_1_1repo_1_1RepoVarExpand.html

Version-Release number of selected component (if applicable):
4.2.17-1.fc32


Note You need to log in before you can comment on or make changes to this bug.