Bug 1125376
Summary: | RFE: allow variable subsitution in config_opts['yum.conf'] | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Eric Schnoebelen <eric> |
Component: | mock | Assignee: | Miroslav Suchý <msuchy> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | eric, jdisnard, mebrown, msimacek, msuchy, praiskup, sergio, williams |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | mock-1.2.6-1.el6 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-01-21 23:08:54 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Attachments: |
Created attachment 923036 [details]
revised patch to implement the desired feature request.
Ok, the patch I submitted worked well for the test I was using, but it didn't handle the expansion of resultdir correctly if resultdir contained macros. (I was testing with the --resultdir=<path> case.
The attached patch pushes the expanded version of resultdir back into config_opts, so it can be used in config_opts['yum.conf']
You patch no longer apply. However I tried to rewrite it, but it is ugly. So then I step back and thought what you are trying to achieve. If your use case is just about getting resultdir in yum.conf, then mockchain is probably what you want to use. Mockchain will build several SRPM into resultdir and after each SRPM rebuild is created local yum repo, which is available in buildroot of next package. Does it solve your issue? Unfortunately, we're using the SCM integration in our build system, of which mock is a component. And, as far as I can tell, mockchain has no idea how to deal with SCM based components. I'm looking at the current mock sources from git, and will try to create a minimally intrusive patch providing the functionality my project is needing. Created attachment 977936 [details]
Updated patch to allow the subsitution of resultdir into the yum.conf block
The attached patch adds the desired feature of allowing the expansion of config_opts['resultdir'] (with it's own expansions) into the yum.conf generated by mock from the root configuration file.
The above patch is against the top of the git tree, branch master, as of 2015-01-07. I have to edit it little bit to make it work with DNF too. But thanks for that patch. Commited as 95a4504 mock-1.2.4-1.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/mock-1.2.4-1.fc21 mock-1.2.4-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/mock-1.2.4-1.fc20 mock-1.2.4-1.el7 has been submitted as an update for Fedora EPEL 7. https://admin.fedoraproject.org/updates/mock-1.2.4-1.el7 mock-1.2.4-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.2.4-1.el6 Package mock-1.2.4-1.el7: * should fix your issue, * was pushed to the Fedora EPEL 7 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=epel-testing mock-1.2.4-1.el7' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-EPEL-2015-0312/mock-1.2.4-1.el7 then log in and leave karma (feedback). I've been tracking the git repo, building and testing. Code inspection and testing demonstrated the changes are working as desired. Thank you. Hi, I think I have other RFE for yum vi /etc/mock/site-defaults.cfg can't set deltarpm=0 globally ? > Hi, I think I have other RFE for yum
One bugzilla, one issue. Please open new BZ report.
mock-1.2.4-1.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report. mock-1.2.4-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report. mock-1.2.5-1.el7 has been submitted as an update for Fedora EPEL 7. https://admin.fedoraproject.org/updates/mock-1.2.5-1.el7 mock-1.2.5-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.2.5-1.el6 mock-1.2.5-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/mock-1.2.5-1.fc20 mock-1.2.5-1.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/mock-1.2.5-1.fc21 mock-1.2.5-1.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report. mock-1.2.6-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.2.6-1.el6 mock-1.2.6-1.el7 has been submitted as an update for Fedora EPEL 7. https://admin.fedoraproject.org/updates/mock-1.2.6-1.el7 mock-1.2.6-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/mock-1.2.6-1.fc20 mock-1.2.6-1.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/mock-1.2.6-1.fc21 Hi, Can I set deltarpm=0 globally using this feature ( config_opts['yum.conf'] ) ? mock-1.2.6-1.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report. mock-1.2.6-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report. mock-1.2.6-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report. mock-1.2.6-1.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report. |
Created attachment 923006 [details] implement the desired feature request. Description of problem: Enhancement request: For our use of mock to build an internal product, it would be extremely useful of config_opts['yum.conf'] supported variable substitution in the fashion of config_opts['resultdir']. Doing so allows us to start from a virgin tree, and build RPMs that have dependencies on things built earlier. Our product tree's mixture of source RPMs and sources do not permit the use of mockchain (which does provide a similar feature.) Version-Release number of selected component (if applicable): 1.1.41 How reproducible: Attempt to do variable subsitution in config_opts['yum.conf'] in a mock root specification/configuration file. Steps to Reproduce: 1. modify a configuration file to have something similar to "baseurl=file://%(resultdir)s" in config_opts['yum.conf'] 2. attempt to use the configuration to build; (when an rpm needs something not in the standard repos) 3. look at the error messages (really from yum, but..) Actual results: failing with an ugly message. Expected results: Working without incident Additional info: The (one line) patch required to implement this feature is attached.