Bug 1251774 - [RFE] DNF should support custom variables for repo files (same as /etc/yum/vars)
Summary: [RFE] DNF should support custom variables for repo files (same as /etc/yum/vars)
Keywords:
Status: CLOSED UPSTREAM
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:
: 1211253 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-09 23:21 UTC by Henning Schmiedehausen
Modified: 2017-11-01 10:34 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-19 17:26:08 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
sample repo file (601 bytes, text/plain)
2015-09-09 01:52 UTC, Henning Schmiedehausen
no flags Details

Description Henning Schmiedehausen 2015-08-09 23:21:37 UTC
Description of problem:

yum supports custom variables by putting files into /etc/yum/vars

From the man page of yum.conf:

"As  of  3.2.28, any properly named file in /etc/yum/vars is turned into a variable named after the filename (or over‐rides any of the above variables). 
Filenames may contain only alphanumeric characters and underscores and be in lowercase."

This feature does not seem to exist in dnf.


Version-Release number of selected component (if applicable):

1.0.1
  Installed: dnf-0:1.0.1-2.fc22.noarch at 2015-08-09 21:27
  Built    : Fedora Project at 2015-06-12 09:00

  Installed: rpm-0:4.12.0.1-12.fc22.x86_64 at 2015-08-09 21:26
  Built    : Fedora Project at 2015-06-29 10:36


How reproducible:

Always. It is a missing feature.

Comment 1 Honza Silhan 2015-08-11 14:31:51 UTC

*** This bug has been marked as a duplicate of bug 1211253 ***

Comment 2 Henning Schmiedehausen 2015-08-11 16:25:44 UTC
I disagree that this is a duplicate of #1211253. This bug is about overriding an existing variable from the command line.

What this bug is about is creating custom variables and storing their values on the file system. yum allows this by creating files in /etc/yum/vars. No such mechanism exists in dnf and the #1211253 does not talk about this.

Closing this bug as a duplicate means that this RFE will get lost. I would like to keep it open because it addresses a different problem.

Comment 3 Radek Holy 2015-08-12 10:48:18 UTC
BTW, can you please tell us what is your use case? Maybe some examples (the more the better)?

Comment 4 Henning Schmiedehausen 2015-09-09 01:52:57 UTC
Created attachment 1071539 [details]
sample repo file

Comment 5 Henning Schmiedehausen 2015-09-09 01:54:39 UTC
I attached a demo file which we use to share repo files between e.g. Fedora and RHEL / CentOS. We set a custom variable 'some-service_distro' to either "fedora" or "rhel" to select the main repo and drop this variable into /etc/yum/vars as part of our installation process. This allows us to maintain only a single repo file for all distribution flavors.

Comment 6 Travers Carter 2016-03-11 00:09:30 UTC
I'd like to see this yum feature re-introduced to DNF too.

My primary use case is that we have some repos where we require HTTP auth for access from outside our company networks, by systems which other people may have access to (so we don't want a single set of shared credentials), so we set up these repos with a baseurl of

https://$our_auth@repo.example.com/path/to/repo/...

or some such then and then drop our_auth into /etc/yum/vars, this allows us to configure the auth across all the relevant repos in a single place.

Comment 7 Fedora Admin XMLRPC Client 2016-07-08 09:29:23 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 8 Fedora End Of Life 2016-07-19 17:26:08 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 9 Igor Gnatenko 2016-07-19 22:18:27 UTC
Let's track in upstream: https://github.com/rpm-software-management/libhif/issues/170

Comment 10 Till Maas 2017-09-04 16:28:47 UTC
*** Bug 1211253 has been marked as a duplicate of this bug. ***


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