Bug 1468802 - mock 1.4.2-1.el7 fails to build el6 packages.
Summary: mock 1.4.2-1.el7 fails to build el6 packages.
Keywords:
Status: CLOSED DUPLICATE of bug 1456421
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: mock
Version: epel7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Clark Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1301953
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-08 06:59 UTC by Steven Haigh
Modified: 2017-07-10 12:58 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-07-10 12:58:19 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Steven Haigh 2017-07-08 06:59:02 UTC
After the update to 1.4.2-1.el7, I have been unable to build packages targeting EL6.

INFO: mock.py version 1.4.2 starting (python version = 2.7.5)...
Start: init plugins
INFO: selinux disabled
Finish: init plugins
Start: run
INFO: Start(xen47.spec)  Config(epel-6-x86_64)
Start: clean chroot
Finish: clean chroot
Start: chroot init
INFO: calling preinit hooks
INFO: enabled root cache
Start: unpacking root cache
Finish: unpacking root cache
INFO: enabled yum cache
Start: cleaning yum metadata
Finish: cleaning yum metadata
INFO: enabled HW Info plugin
Mock Version: 1.4.2
INFO: Mock Version: 1.4.2
Start: yum update
Failed to set locale, defaulting to C
** snipped yum stuff **
Start: buildsrpm
Start: rpmbuild -bs
getent initgroups failed with error code 1.
Failed to parse group data from getent.
Finish: rpmbuild -bs
Finish: buildsrpm
ERROR: Exception(xen47.spec) Config(epel-6-x86_64) 0 minutes 35 seconds
INFO: Results and/or logs in: /home/netwiz/build_queue/
INFO: Cleaning up build root ('cleanup_on_failure=True')
Start: clean chroot
Traceback (most recent call last):
  File "/usr/libexec/mock/mock", line 934, in <module>
    main()
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 96, in trace
    result = func(*args, **kw)
  File "/usr/libexec/mock/mock", line 737, in main
    run_command(options, args, config_opts, commands, buildroot, state)
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 96, in trace
    result = func(*args, **kw)
  File "/usr/libexec/mock/mock", line 824, in run_command
    do_buildsrpm(config_opts, commands, buildroot, options, args)
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 96, in trace
    result = func(*args, **kw)
  File "/usr/libexec/mock/mock", line 545, in do_buildsrpm
    cmd=cmd, post=None, clean=clean)
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 96, in trace
    result = func(*args, **kw)
  File "/usr/libexec/mock/mock", line 492, in rebuild_generic
    commands.clean()
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 96, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.7/site-packages/mockbuild/backend.py", line 78, in clean
    self.buildroot.delete()
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 96, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.7/site-packages/mockbuild/buildroot.py", line 607, in delete
    util.rmtree(self.basedir, selinux=self.selinux)
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 96, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.7/site-packages/mockbuild/util.py", line 151, in rmtree
    rmtree(fullname, selinux=selinux, exclude=exclude)
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 96, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.7/site-packages/mockbuild/util.py", line 151, in rmtree
    rmtree(fullname, selinux=selinux, exclude=exclude)
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 96, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.7/site-packages/mockbuild/util.py", line 151, in rmtree
    rmtree(fullname, selinux=selinux, exclude=exclude)
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 96, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.7/site-packages/mockbuild/util.py", line 151, in rmtree
    rmtree(fullname, selinux=selinux, exclude=exclude)
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 96, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.7/site-packages/mockbuild/util.py", line 151, in rmtree
    rmtree(fullname, selinux=selinux, exclude=exclude)
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 96, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.7/site-packages/mockbuild/util.py", line 151, in rmtree
    rmtree(fullname, selinux=selinux, exclude=exclude)
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 96, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.7/site-packages/mockbuild/util.py", line 159, in rmtree
    os.remove(fullname)
OSError: [Errno 13] Permission denied: '/tmp/mock/epel-6-x86_64-3424/root/repos/7x/x86_64/updates/fastbugs/policycoreutils-2.5-11.el7_3.x86_64.rpm

Comment 1 Steven Haigh 2017-07-08 06:59:47 UTC
On a side note, I can confirm I can still build packages targeting epel-7-x86_64 without an issue.

Only epel-6-x86_64 building is broken.

Comment 2 Steven Haigh 2017-07-08 07:41:59 UTC
Rolling back to mock-1.3.4-1.el7.noarch.rpm and I can build again.

Hunting logs from here:
https://koji.fedoraproject.org/koji/buildinfo?buildID=906776

This stands out:
- Do not use systemd-nspawn for EL6 chroots [RHBZ#1456421]

It seems the magic line is:
config_opts['use_nspawn'] = False

If you have modified the epel-6-x86_64.cfg file (say, to add more repos), this file will not get updated.

Comment 3 Miroslav Suchý 2017-07-10 12:58:19 UTC
> If you have modified the epel-6-x86_64.cfg file (say, to add more repos), this file will not get updated.

If you modify it, then during installation is created epel-6-x86_64.cfg.rpmnew file and it is up to you to merge it. I highly recommend running `rpmconf -a` after every upgrade. Or `rpmconf -o mock` if you want to just merge mock' configs.

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


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