Bug 1770667

Summary: 32-bit mock fails to set times: Operation not permitted
Product: [Fedora] Fedora Reporter: Elliott Sales de Andrade <quantum.analyst>
Component: mockAssignee: Miroslav Suchý <msuchy>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 30CC: bgstack15, jdisnard, jkeating, John_Sauter, josdekloe, martin.gieseking, mebrown, msuchy, philip.wyett, praiskup, williams, xanto
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-02-08 16:48:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.