Bug 974499 - can't init mock behind a proxy
can't init mock behind a proxy
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: mock (Show other bugs)
19
Unspecified Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Clark Williams
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-14 05:50 EDT by Yann Droneaud
Modified: 2014-04-19 05:20 EDT (History)
3 users (show)

See Also:
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 00:02:52 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
[PATCH] package_state: proxy configuration might be needed [BZ #974499] (2.01 KB, patch)
2013-06-14 06:03 EDT, Yann Droneaud
no flags Details | Diff

  None (edit)
Description Yann Droneaud 2013-06-14 05:50:08 EDT
Version-Release number of selected component (if applicable):

Name        : mock
Version     : 1.1.32
Release     : 1.fc18


Description of problem:

Hi,

On my setup, with no direct connection to Internet, mock is failing to create a new build environment.

In my environment, DNS resolver is not available, direct connection is not possible: everything should goes through a HTTP proxy.

Mock was working previously in Fedora 17, but after upgrading to Fedora 18 it works no more. I wasn't able find the exact regression ...

The problem seems to happen only if the root_cache or yum_cache is obsolete and /usr/bin/repoquery need to access/rebuild some database.

The error reported is:

Start: yum update
Start: Outputting list of available packages
ERROR: Command failed. See logs for output.
 # /usr/bin/repoquery -c /var/lib/mock/fedora-17-i386-ext/root//etc/yum.conf -a --qf '%{nevra} %{buildtime} %{size} %{pkgid} %{repoid}' > /var/lib/mock//fedora-17-i386-ext/result/available_pkgs

In /var/lib/mock/fedora-17-i386-ext/result/root.log:

DEBUG util.py:314:  Executing command: /usr/bin/repoquery -c /var/lib/mock/fedora-17-i386-sdk2-test/root//etc/yum.conf -a --qf '%{nevra} %{buildtime} %{size} %{pkgid} %{repoid}' > /var/lib/mock//fedora-17-i386-sdk2-test/result/available_pkgs with env {'LANG': 'fr_FR.utf8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOSTNAME': 'mock', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin'}
DEBUG util.py:264:  Cannot find a valid baseurl for repo: fedora
DEBUG util.py:354:  Child return code was: 1

The error might be unclear, but in order to get a baseurl, I tought repoquery need to contact the mirror. To do this it need to use the proxy server.
Unfortunately /var/lib/mock/fedora-17-i386-sdk2-test/root//etc/yum.conf doesn't hold any proxy configuration variable (http_proxy, https_proxy, ftp_proxy). And the environment used to run repoquery lack of the same proxy configuration variables.

The proxy configuration variables are correctly set in /etc/mock/site-default.cfg and correctly used for running others commands. And they are also defined in the user environment.

Those variables are not used when running repoquery while they are needed for it to work.

A patch to fix will follow.

Regards.
Comment 1 Yann Droneaud 2013-06-14 05:53:03 EDT
BTW, there's a workaround: 

mock --disable-plugin=package_state --init   (as seen in bug #927496)

Regards.
Comment 2 Yann Droneaud 2013-06-14 06:03:20 EDT
Created attachment 761195 [details]
[PATCH] package_state: proxy configuration might be needed [BZ #974499]

Please find a git patch to apply on top of master
https://git.fedorahosted.org/cgit/mock.git/commit/?id=d066ccf1e11cd2662ef00d845ed87035ec592791

Regards.
Comment 3 Fedora End Of Life 2013-12-21 09:00:45 EST
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 4 Clark Williams 2014-02-03 15:20:55 EST
(In reply to Yann Droneaud from comment #2)
> Created attachment 761195 [details]
> [PATCH] package_state: proxy configuration might be needed [BZ #974499]
> 
> Please find a git patch to apply on top of master
> https://git.fedorahosted.org/cgit/mock.git/commit/
> ?id=d066ccf1e11cd2662ef00d845ed87035ec592791
> 
> Regards.

Applied to current tree, should be in 1.1.36 build
Comment 5 Fedora Update System 2014-02-05 21:09:14 EST
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
Comment 6 Fedora Update System 2014-02-05 21:10:54 EST
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
Comment 7 Fedora Update System 2014-02-05 21:12:27 EST
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
Comment 8 Fedora Update System 2014-02-06 16:08:23 EST
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).
Comment 9 Fedora Update System 2014-02-08 00:02:52 EST
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.
Comment 10 Fedora Update System 2014-03-25 16:25:09 EDT
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
Comment 11 Fedora Update System 2014-03-25 16:27:34 EDT
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
Comment 12 Fedora Update System 2014-03-25 16:29:34 EDT
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
Comment 13 Fedora Update System 2014-03-27 13:48:09 EDT
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
Comment 14 Fedora Update System 2014-03-27 13:50:03 EDT
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
Comment 15 Fedora Update System 2014-03-27 13:51:55 EDT
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
Comment 16 Fedora Update System 2014-03-31 15:04:46 EDT
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
Comment 17 Fedora Update System 2014-03-31 15:07:06 EDT
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
Comment 18 Fedora Update System 2014-03-31 15:09:04 EDT
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
Comment 19 Fedora Update System 2014-04-09 09:19:06 EDT
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.
Comment 20 Fedora Update System 2014-04-18 11:38:01 EDT
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.
Comment 21 Fedora Update System 2014-04-19 05:20:16 EDT
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.

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