Bug 1770667 - 32-bit mock fails to set times: Operation not permitted
Summary: 32-bit mock fails to set times: Operation not permitted
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: 30
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-11 05:45 UTC by Elliott Sales de Andrade
Modified: 2020-02-24 21:32 UTC (History)
12 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-02-08 16:48:44 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Elliott Sales de Andrade 2019-11-11 05:45:51 UTC
Description of problem:
When running a mock build on x86_64 for a 32-bit mock, it fails to unpack the tarball while setting utime.

This occurs for all files in the tarball:
/usr/bin/tar: pikepdf-1.6.5/setup.py: Cannot utime: Operation not permitted

It can also be reproduced by just running `touch` on any random file in a mock shell.


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


Steps to Reproduce:
1. mock -r fedora-rawhide-i386 --shell
2. touch ~/test


Actual results:
touch: setting times of '/builddir/test': Operation not permitted


Expected results:
File should be created and timestamp of file should be current.

Comment 1 Jos de Kloe 2019-11-18 20:46:09 UTC
confirmed on my side as well. Are there any workarounds?

Comment 2 Jos de Kloe 2019-11-18 20:55:05 UTC
Additional observation:
if I enter a 32-bit mock shell and try to untar a source package, the source is untarred, but it has UID and GID 1000, and not root.
Manually setting the owner back to root does not solve much, since any testing of a build of any software package will fail horribly as soon as it tries to create some directory or file.

Comment 3 Pavel Raiskup 2019-11-19 07:54:11 UTC
> Are there any workarounds?

Use `--old-chroot`.  This is
https://bugzilla.redhat.com/show_bug.cgi?id=1770154

Comment 4 Michael Eagle 2019-11-25 16:59:08 UTC
Hello,

This also affects all the COPR builds that are using fedora-rawhide-i386. 

Error:

>/usr/bin/tar -xof -
>/usr/bin/tar: Cannot utime: Operation not permitted
>/usr/bin/tar: Exiting with failure status due to previous errors
>ERROR: Command failed: 
> # /usr/bin/systemd-nspawn -q -M 0260de8336204609ba3a02c8ab68e0ac -D /var/lib/mock/1116847-fedora-rawhide-i386-1574565038.101060/root -a --capability=cap_ipc_lock --bind=/tmp/mock-resolv.zmfh2uta:/etc/resolv.conf --setenv=TERM=vt100 --setenv=SHELL=/bin/bash --setenv=HOME=/builddir --setenv=HOSTNAME=mock --setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin --setenv=PROMPT_COMMAND=printf "\033]0;<mock-chroot>\007" --setenv=PS1=<mock-chroot> \s-\v\$  --setenv=LANG=en_US.UTF-8 -u mockbuild bash --login -c /usr/bin/rpmbuild -bb --target i686 --nodeps /builddir/build/SPECS/mesa.spec


There is more than half a month since this issue appeared.
Any solution for this?

Comment 5 Pavel Raiskup 2020-02-08 16:48:44 UTC
This has been fixed in seccomp.

Comment 6 Elliott Sales de Andrade 2020-02-24 21:32:29 UTC
This is not yet fixed, see bug 1804415 (opened independently). I'll leave this closed so as to not have multiple bug reports open.


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