So I’ve posted a bunch of times here about my various questions with creating a distribution based off of Fedora (called “Top Hat” for now) and I am almost finished with the basics. However, I’ve recently come upon a problem I have no lead on fixing. So, I was creating a package based off of generic-release
to set proper versioning (mainly for Anaconda). Anyways, the problem is that the variable $releasever
for DNF is being set to my test version 0.0
instead of the base version 32
, causing most uses of dnf
to fail.
Here are what files the package creates.
/usr/lib/fedora-release
:
Top Hat release 0.0 (The Dark Side of the Moon)
/usr/lib/os-release
:
NAME=Top Hat
VERSION="0.0 ("The Dark Side of the Moon")"
ID=top-hat
ID_LIKE=fedora
VERSION_ID=32
PRETTY_NAME="Top Hat 0.0 ("The Dark Side of the Moon")"
ANSI_COLOR="0;34"
LOGO=top-hat-logo-icon
CPE_NAME="cpe:/o:generic:generic:32"
HOME_URL=https://gitlab.com/CheeseEBoi/top-hat-release
SUPPORT_URL="https://en.wikipedia.org/wiki/Help!_(album)"
BUG_REPORT_URL="https://gitlab.com/CheeseEBoi/top-hat-release/-/issues"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=32
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=32
PRIVACY_POLICY_URL="http://nsa.gov"
Please note that these are not final and contain some placeholder data from the original generic-release
package. Also, in my kickstart files based off of those of Fedora, I have this line in the base file, but it likely isn’t related to this since it is a shell variable:
releasever=$(rpm -q --qf '%{base_version}\n' --whatprovides system-release)
So, the TLDR question is: How can I set $releasever
to 32 for the repo files in /etc/yum.repos.d/
while keeping the different versioning for the rest of the system?
PS: If you want to read through these files in detail, they’re on my Gitlab, criticism appreciated!