This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 971474 - mock: --copyout fails on directory trees with broken symlinks
mock: --copyout fails on directory trees with broken symlinks
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: mock (Show other bugs)
19
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Suchý
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-06 11:32 EDT by Florian Weimer
Modified: 2014-10-12 17:18 EDT (History)
3 users (show)

See Also:
Fixed In Version: mock-1.2.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-10-12 17:18:22 EDT
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)

  None (edit)
Description Florian Weimer 2013-06-06 11:32:25 EDT
I get this error when calling mock --copyout:

INFO: copying /var/lib/mock/fedora-19-x86_64/root/builddir/build/BUILD to agg-2.5-16.fc19
ERROR: [('/var/lib/mock/fedora-19-x86_64/root/builddir/build/BUILD/agg-2.5/config.guess', 'agg-2.5-16.fc19/agg-2.5/config.guess', "[Errno 2] No such file or directory: '/var/lib/mock/fedora-19-x86_64/root/builddir/build/BUILD/agg-2.5/config.guess'"), ('/var/lib/mock/fedora-19-x86_64/root/builddir/build/BUILD/agg-2.5/install-sh', 'agg-2.5-16.fc19/agg-2.5/install-sh', "[Errno 2] No such file or directory: '/var/lib/mock/fedora-19-x86_64/root/builddir/build/BUILD/agg-2.5/install-sh'"), ('/var/lib/mock/fedora-19-x86_64/root/builddir/build/BUILD/agg-2.5/missing', 'agg-2.5-16.fc19/agg-2.5/missing', "[Errno 2] No such file or directory: '/var/lib/mock/fedora-19-x86_64/root/builddir/build/BUILD/agg-2.5/missing'"), ('/var/lib/mock/fedora-19-x86_64/root/builddir/build/BUILD/agg-2.5/config.sub', 'agg-2.5-16.fc19/agg-2.5/config.sub', "[Errno 2] No such file or directory: '/var/lib/mock/fedora-19-x86_64/root/builddir/build/BUILD/agg-2.5/config.sub'")]
Traceback (most recent call last):
  File "/usr/sbin/mock", line 561, in <module>
    def do_buildsrpm(config_opts, chroot, options, args):
  File "/usr/sbin/mock", line 925, in main
    shutil.copytree(src, dest)
  File "/usr/lib64/python2.7/shutil.py", line 206, in copytree
    raise Error, errors
Error: [('/var/lib/mock/fedora-19-x86_64/root/builddir/build/BUILD/agg-2.5/config.guess', 'agg-2.5-16.fc19/agg-2.5/config.guess', "[Errno 2] No such file or directory: '/var/lib/mock/fedora-19-x86_64/root/builddir/build/BUILD/agg-2.5/config.guess'"), ('/var/lib/mock/fedora-19-x86_64/root/builddir/build/BUILD/agg-2.5/install-sh', 'agg-2.5-16.fc19/agg-2.5/install-sh', "[Errno 2] No such file or directory: '/var/lib/mock/fedora-19-x86_64/root/builddir/build/BUILD/agg-2.5/install-sh'"), ('/var/lib/mock/fedora-19-x86_64/root/builddir/build/BUILD/agg-2.5/missing', 'agg-2.5-16.fc19/agg-2.5/missing', "[Errno 2] No such file or directory: '/var/lib/mock/fedora-19-x86_64/root/builddir/build/BUILD/agg-2.5/missing'"), ('/var/lib/mock/fedora-19-x86_64/root/builddir/build/BUILD/agg-2.5/config.sub', 'agg-2.5-16.fc19/agg-2.5/config.sub', "[Errno 2] No such file or directory: '/var/lib/mock/fedora-19-x86_64/root/builddir/build/BUILD/agg-2.5/config.sub'")]

Some of the offending symbolic links look like this:

lrwxrwxrwx. 1 root root 37 Jun  6 17:23 /var/lib/mock/fedora-19-x86_64/root/builddir/build/BUILD/agg-2.5/config.guess -> /usr/share/automake-1.13/config.guess
lrwxrwxrwx. 1 root root 35 Jun  6 17:23 /var/lib/mock/fedora-19-x86_64/root/builddir/build/BUILD/agg-2.5/config.sub -> /usr/share/automake-1.13/config.sub

I think mock --copyout should not try to resolve symlinks, or at least be more clever about it (e.g., resolve them inside the chroot).

This is with mock-1.1.32-1.fc18.
Comment 1 Fedora End Of Life 2013-12-21 08:53:44 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 2 Florian Weimer 2013-12-23 11:52:44 EST
Still present in Fedora 19 AFACIT.
Comment 3 Miroslav Suchý 2014-10-01 16:18:57 EDT
Fixed in msuchy-work branch in commit 8b435e4.

Not this address only copyout.
Copyin does not have too much sense as it would require validaiton of symlinks and can be easily overengineered.
Comment 4 Miroslav Suchý 2014-10-12 17:18:22 EDT
Fixed in mock-1.2.0, which just landed in rawhide.

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