Bug 742046

Summary: RFE: support $releasever in gpgkey directive
Product: [Fedora] Fedora Reporter: Till Maas <opensource>
Component: yumAssignee: Seth Vidal <skvidal>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: ffesti, james.antill, maxamillion, pmatilai, tla, zpavlas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-09-29 14:56:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Till Maas 2011-09-28 20:51:21 UTC
Description of problem:

I would like to use a config option like
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-nonfree-fedora-$releasever-$basearch
in yum config files in mock, but yum does not substitute  $releasever:
| GPG-Schlüssel-Abruf fehlgeschlagen:[Errno 14] Could not open/read file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-nonfree-fedora-$releasever-i386

Comment 1 Zdeněk Pavlas 2011-09-29 09:23:25 UTC
Are you sure releasever is set?  Seems that $arch is expanded correctly.
Var expansion is done at fairly low level, and uniformly for all repo options.

>    def getReposFromConfigFile(self, repofn, repo_age=None, validate=None):
> ..
>        confpp_obj = ConfigPreProcessor(repofn, vars=self.conf.yumvar)
>        parser = ConfigParser()
>        try:
>            parser.readfp(confpp_obj)

Comment 2 James Antill 2011-09-29 14:56:08 UTC
 Also it is already used in rpmfusion:

/etc/yum.repos.d/rpmfusion-free.repo:gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-$releasever-$basearch

...so if this didn't work nobody would be able to install rpmfusion packages.