Bug 2239035 - mock fails to copyout files with ~ in their names
Summary: mock fails to copyout files with ~ in their names
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: 39
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Pavel Raiskup
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-09-14 20:54 UTC by Tulio Magno Quites Machado Filho
Modified: 2023-10-06 00:39 UTC (History)
5 users (show)

Fixed In Version: mock-5.2-1.fc39 mock-5.2-1.fc38 mock-5.2-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-10-01 03:38:36 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Tulio Magno Quites Machado Filho 2023-09-14 20:54:05 UTC
I have a script that uses mock in order to generate some files that are copied out in the end.

mock fails to copy out files that have ~ in their names.

If I use mock --shell I can confirm the file is there and the path is right.
Likewise if I visit the mock root at /var/lib/mock.

Version tested: mock-5.0-1.fc39.noarch

Reproducible: Always

Steps to Reproduce:
Steps to reproduce:

1. Initialize a mock root:
$ mock -r fedora-39-x86_64 --init

2. Create a file that has ~ in its name, e.g.:
$ mock -r fedora-39-x86_64 --chroot 'touch /builddir/libclang.clang-libs-17.0.0~rc3-1.fc39.ppc64le.abi'
...
INFO: Running in chroot: ['touch /builddir/libclang.clang-libs-17.0.0~rc3-1.fc39.ppc64le.abi']
Start: chroot ['touch /builddir/libclang.clang-libs-17.0.0~rc3-1.fc39.ppc64le.abi']
Finish: chroot ['touch /builddir/libclang.clang-libs-17.0.0~rc3-1.fc39.ppc64le.abi']

3. Try to copy this file:
$ mock -r fedora-39-x86_64 --copyout /builddir/libclang.clang-libs-17.0.0~rc3-1.fc39.ppc64le.abi /tmp/
...
INFO: enabled HW Info plugin
INFO: Package manager dnf detected and used (direct choice)
Finish: chroot init
CRITICAL: /builddir/libclang.clang-libs-17.0.0~rc3-1.fc39.ppc64le.abi not found
Actual Results:  
mock crashes without finding a file that exists.

Expected Results:  
mock should have copied the file from the mock root.

Comment 1 Pavel Raiskup 2023-09-18 14:42:33 UTC
Thank you for the report.  Proposed fix: https://github.com/rpm-software-management/mock/pull/1229

Comment 2 Fedora Update System 2023-09-27 13:13:05 UTC
FEDORA-2023-e77b339591 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-e77b339591

Comment 3 Fedora Update System 2023-09-27 13:13:06 UTC
FEDORA-2023-4bee40ebe6 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-4bee40ebe6

Comment 4 Fedora Update System 2023-09-28 01:39:10 UTC
FEDORA-EPEL-2023-e7ebd56bcd has been pushed to the Fedora EPEL 9 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-e7ebd56bcd

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2023-09-28 02:05:39 UTC
FEDORA-2023-e77b339591 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-e77b339591`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-e77b339591

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2023-09-28 20:17:20 UTC
FEDORA-2023-4bee40ebe6 has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-4bee40ebe6`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-4bee40ebe6

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2023-10-01 03:38:36 UTC
FEDORA-2023-4bee40ebe6 has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 8 Fedora Update System 2023-10-03 02:22:47 UTC
FEDORA-2023-e77b339591 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 9 Fedora Update System 2023-10-06 00:39:34 UTC
FEDORA-EPEL-2023-e7ebd56bcd has been pushed to the Fedora EPEL 9 stable repository.
If problem still persists, 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.