View Issue Details

IDProjectCategoryView StatusLast Update
0017481CentOS-8dnfpublic2020-06-18 15:20
Reporterguzzijason Assigned To 
Status newResolutionopen 
OSCentOSOS Version8.2.2004 
Summary0017481: DNF custom variables which worked in 8.1.1911 are broken in 8.2.2004
DescriptionWhen using 'DNF_VAR_*' environment variables in dnf repo configs, substitution worked fine in 8.1.1911, but in 8.2.2004 does not.

RHEL bug filed here:
Steps To Reproduce1. Define dnf repo configs using 'DNF_VAR_*' variables
2. Export variables
3. Try to use dnf on affected repo
Additional InformationActual results:

Example repo config:

baseurl =$DNF_VAR_REL/BaseOS/$DNF_VAR_ARCH/os/
gpgcheck = 1
#gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-Official
enabled = 1

Example repolist output illustrating lack of substitution:

$ DNF_VAR_REL=8 DNF_VAR_ARCH=x86_64 dnf -c /etc/dnf.mirrors.conf repolist
repo id repo name
BaseOS-upstream CentOS $DNF_VAR_REL $DNF_VAR_ARCH (BaseOS)

Expected results:

Note, same host as above example, with dnf downgraded to dnf-4.2.7-7.el8_1 from the 8.1 repo.

$ DNF_VAR_REL=8 DNF_VAR_ARCH=x86_64 dnf -c /etc/dnf.mirrors.conf repolist
Last metadata expiration check: 0:23:04 ago on Wed 17 Jun 2020 07:53:48 PM UTC.
repo id repo name status
BaseOS-upstream CentOS 8 x86_64 (BaseOS) 1,675
TagsNo tags attached.




2020-06-18 15:20

reporter   ~0037161

Per the linked Redhat bug, it looks like this problem is the result of an undocumented change, and not an actual bug.

For example, an environment variable such as DNF_VAR_FOO needs to have the prefix stripped and simply be set to $FOO in the dnf repo config. Prior to 8.2.2004, it was necessary to include the DNF_VAR_ prefix in the repo config as well.

Issue History

Date Modified Username Field Change
2020-06-17 20:31 guzzijason New Issue
2020-06-18 15:20 guzzijason Note Added: 0037161