Bug 1056039
Summary: | [PATCH] $releasever in Repos field is not expanded | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jan Kaluža <jkaluza> | ||||||||
Component: | mock | Assignee: | Clark Williams <williams> | ||||||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||
Severity: | unspecified | Docs Contact: | |||||||||
Priority: | unspecified | ||||||||||
Version: | 20 | CC: | ignatenko, mebrown, msuchy, williams | ||||||||
Target Milestone: | --- | ||||||||||
Target Release: | --- | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | mock-1.1.38-1.el6 | Doc Type: | Bug Fix | ||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2014-02-08 05:02:58 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: |
|
Description
Jan Kaluža
2014-01-21 12:56:44 UTC
Created attachment 853431 [details]
[PATCH] unquote repos
I've not tested it.
Miroslav, test this patch and let me know if it wrong ;)
The problem is not in copr. You can see from log: 1390295406.79:executing: u"/usr/bin/mockchain -r fedora-20-i386 -l /var/tmp/mockremote-KPMUj/build/ -a 'http://copr-be.cloud.fedoraproject.org/results/msuchy/sclo-build/fedora-$releasever-$basearch/' -a http://copr-be.cloud.fedoraproject.org/results/jkaluza/httpd24//fedora-20-i386 -m '--define=copr_username jkaluza' -m '--define=copr_projectname httpd24' http://jkaluza.fedorapeople.org/httpd24-1-10.el7.src.rpm" that the url is passed correctly. So this is problem of mockchain. Steps to reproduce: 1. Run: /usr/bin/mockchain -r fedora-19-x86_64 -l /var/tmp/mockremote-ZAPFX/build/ -a 'http://copr-be.cloud.fedoraproject.org/results/msuchy/sclo-build/fedora-$releasever-$basearch/' -a http://copr-be-dev.cloud.fedoraproject.org/results/msuchy/afsdagfd//fedora-19-i386 http://copr-be.cloud.fedoraproject.org/results/msuchy/sclo-build/fedora-19-x86_64/sclo-build-4-1.fc20/sclo-build-4-1.fc19.src.rpm 2) grep ERROR /var/tmp/mockremote-ZAPFX/build/results/fedora-19-x86_64/sclo-build-4-1.fc19/root.log Actual output: DEBUG util.py:281: http://copr-be.cloud.fedoraproject.org/results/msuchy/sclo-build/fedora-%24releasever-x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found" Expected output: no error Note: you have to do that with mock-1.1.36 because otherwise this repo will not be considered at all due bug 1034805 Note2: It is strange. Notice that $basearch have been correctly substituted, while $releasever was instead escaped. Comment on attachment 853431 [details]
[PATCH] unquote repos
This patch is not relevant.
Hmm /var/tmp/mockremote-ZAPFX/build/configs/fedora-19-i386/fedora-19-i386.cfg contains: config_opts['yum.conf'] = '....[coprbecloudfedoraprojectorg_results_msuchy_sclobuild_fedorareleaseverbasearch_]\nname=http://copr-be.cloud.fedoraproject.org/results/msuchy/sclo-build/fedora-$releasever-$basearch/\nbaseurl=http://copr-be.cloud.fedoraproject.org/results/msuchy/sclo-build/fedora-$releasever-$basearch/\nenabled=1...' which is correct. So it seems to be problem in mock itself rather then mockchain. And /var/lib/mock/fedora-19-i386-root-3935/root//etc/yum.conf contain: [coprbecloudfedoraprojectorg_results_msuchy_sclobuild_fedorareleaseverbasearch_] name=http://copr-be.cloud.fedoraproject.org/results/msuchy/sclo-build/fedora-$releasever-$basearch/ baseurl=http://copr-be.cloud.fedoraproject.org/results/msuchy/sclo-build/fedora-$releasever-$basearch/ enabled=1 skip_if_unavailable=1 metadata_expire=30 cost=1 This seems to be ok as well. Hmpf - who is responsible for setting value of $releasever? Well. Setting distroverpkg=19 in config_opts['yum.conf'] does not help. Which is strange even if we use system yum. That is probably worth another BZ. But for our case we should stick with this part from "man yum" --releasever=version Pretend the current release version is the given string. This is very useful when combined with --installroot. You can also use --releasever=/ to take the releasever information from outside the installroot. Note that with the default upstream cachedir, of /var/cache/yum, using this option will corrupt your cache (and you can use $releasever in your cachedir configuration to stop this). And what is actually run is: 6035 pts/0 S+ 0:00 | \_ /usr/bin/python -tt /usr/sbin/mock --configdir /var/tmp/mockremote-ZAPFX/build/configs/fedora-19-i386 --resultdir /var/tmp/mockremote-ZAPFX/build/results/fedora-19-i386/sclo-build-4-1.fc19 --uniqueext root-6033 -r fedora-19-i386 --define=copr_username msuchy --define=copr_projectname afsdagfd --define=vendor Fedora Project COPR (msuchy/afsdagfd) /tmp/tmpVo7q5H/sclo-build-4-1.fc19.src.rpm 6058 ? Rs 0:03 | \_ /usr/bin/python /usr/bin/yum --installroot /var/lib/mock/fedora-19-i386-root-6033/root/ groupinstall buildsys-build --setopt=tsflags=nocontexts i.e mock does not pass --releasever to yum, which is then clueless. Created attachment 854105 [details]
First approach to fix the problem
I believe that this can fix the problem (however I did not test it yet - will do next day).
If it will work I will add that new variable to all mock configs.
I can confirm that this fix the problem and $releasever is substituted. I will prepare clean and final patch. Created attachment 854608 [details]
Final patch, which fix this issue.
BTW regarding the original report: I build the patched version in: http://copr.fedoraproject.org/coprs/msuchy/Mock/ and this patched version is now used by Copr. So this issue on Copr should be fixed now. mock-1.1.36-1.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/mock-1.1.36-1.fc19 mock-1.1.36-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/mock-1.1.36-1.fc20 mock-1.1.36-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.1.36-1.el6 Package mock-1.1.36-1.el6: * should fix your issue, * was pushed to the Fedora EPEL 6 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=epel-testing mock-1.1.36-1.el6' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-EPEL-2014-0467/mock-1.1.36-1.el6 then log in and leave karma (feedback). mock-1.1.36-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.1.37-1.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/mock-1.1.37-1.fc19 mock-1.1.37-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/mock-1.1.37-1.fc20 mock-1.1.37-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.1.37-1.el6 mock-1.1.37-2.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/mock-1.1.37-2.fc20 mock-1.1.37-2.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/mock-1.1.37-2.fc19 mock-1.1.37-2.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.1.37-2.el6 mock-1.1.38-1.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/mock-1.1.38-1.fc19 mock-1.1.38-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.1.38-1.el6 mock-1.1.38-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/mock-1.1.38-1.fc20 mock-1.1.38-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.1.38-1.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report. mock-1.1.38-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. |