Bug 903686 - mockchain complains about macros entry in epel-5-* configs
Summary: mockchain complains about macros entry in epel-5-* configs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: 17
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Clark Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-24 15:05 UTC by Adam Huffman
Modified: 2013-03-23 23:54 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-04 22:43:46 UTC


Attachments (Terms of Use)
make epel-5-* config files safe to eval (1.64 KB, patch)
2013-01-30 22:57 UTC, Clark Williams
no flags Details | Diff

Description Adam Huffman 2013-01-24 15:05:55 UTC
Description of problem:

I've been trying to use mockchain to rebuild a set of SRPMs.

When I use either of the EPEL-5 targets, I see errors like this:

mockchain -r epel-5-x86_64 -l glexec-emi2-0.1 --recurse *.rpm
Traceback (most recent call last):
  File "/usr/bin/mockchain", line 329, in <module>
    main(sys.argv)
  File "/usr/bin/mockchain", line 222, in main
    res, msg = add_local_repo(mockcfg, my_mock_config, local_baseurl, 'local_build_repo')
  File "/usr/bin/mockchain", line 90, in add_local_repo
    execfile(infile)
  File "/etc/mock/epel-5-x86_64.cfg", line 6, in <module>
    config_opts['macros']['%__arch_install_post'] = '%{nil}'
KeyError: 'macros'


Version-Release number of selected component (if applicable):
mock-1.1.28-1.fc17.noarch

How reproducible:





Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

If I comment out the entry:

config_opts['macros']['%__arch_install_post'] = '%{nil}'

then the mockchain builds proceed as expected.  According to an RPM verify, those config files are intact.

Comment 1 Clark Williams 2013-01-30 17:05:21 UTC
That's odd. The top backtrace means that the config_opts dictionary doesn't have a key named 'macros' but that's initialized in mock.py, not from a config file.

Comment 2 Clark Williams 2013-01-30 22:57:50 UTC
Created attachment 690654 [details]
make epel-5-* config files safe to eval

talked to Seth Vidal about this. mockchain doens't go through the same config file paths as mock, so easiest thing to do for epel-5-* is to make the config files safe to evaluate on their own. 

This patch will be going into the next mock release.

Comment 3 Fedora Update System 2013-02-26 22:16:54 UTC
mock-1.1.29-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/mock-1.1.29-1.fc17

Comment 4 Fedora Update System 2013-02-26 22:17:42 UTC
mock-1.1.29-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.29-1.el6

Comment 5 Fedora Update System 2013-02-26 22:18:13 UTC
mock-1.1.29-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/mock-1.1.29-1.fc18

Comment 6 Fedora Update System 2013-02-27 18:04:00 UTC
Package mock-1.1.29-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.29-1.el6'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2013-0476/mock-1.1.29-1.el6
then log in and leave karma (feedback).

Comment 7 Adam Huffman 2013-03-04 13:32:25 UTC
This seemed to break mockchain for me.  Here are the errors in the log file:

DEBUG util.py:88:  remove tree: /var/lib/mock/epel-5-x86_64-mhuffman-30276/root/builddir
DEBUG util.py:314:  Executing command: ['/usr/sbin/userdel', '-r', '-f', 'mockbuild'] with env {'LANG': 'en_GB.utf8'
, 'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOSTNAME': 'mock', 'PROMPT_COMMAND': 'echo -n "<mock-chroot>"', 'HOME': '/
builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin'}
DEBUG util.py:264:  userdel: error removing directory /builddir
DEBUG util.py:354:  Child return code was: 12
DEBUG util.py:314:  Executing command: ['/usr/sbin/groupdel', 'mockbuild'] with env {'LANG': 'en_GB.utf8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOSTNAME': 'mock', 'PROMPT_COMMAND': 'echo -n "<mock-chroot>"', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin'}
DEBUG util.py:264:  groupdel: group mockbuild does not exist
DEBUG util.py:354:  Child return code was: 6

and

INFO backend.py:589:  Installed packages:
DEBUG util.py:314:  Executing command: ['rpm', '-q', '-a'] with env {'LANG': 'en_GB.utf8', 'TERM': 'vt100', 'SHELL':
 '/bin/bash', 'HOSTNAME': 'mock', 'PROMPT_COMMAND': 'echo -n "<mock-chroot>"', 'HOME': '/builddir', 'PATH': '/usr/bi
n:/bin:/usr/sbin:/sbin'}
DEBUG util.py:264:  error: cannot open Packages index using db3 - Invalid argument (22)
DEBUG util.py:264:  error: cannot open Packages database in /var/lib/rpm
DEBUG util.py:354:  Child return code was: 0

Comment 8 Adam Huffman 2013-03-04 13:36:21 UTC
If I revert to 1.1.28 and comment out the macros line in epel-5-x86_64.cfg, mockchain building works.

Comment 9 Fedora Update System 2013-03-04 22:43:47 UTC
mock-1.1.29-1.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2013-03-23 23:54:50 UTC
mock-1.1.29-1.fc17 has been pushed to the Fedora 17 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.