rpm-software-management / mock

Mock is a tool for a reproducible build of RPM packages.
GNU General Public License v2.0
381 stars 227 forks source link

Home directory in not writable, why? #1364

Closed voxik closed 5 months ago

voxik commented 5 months ago

Short description of the problem

For some reason, the home directory is not writable for regular user anymore. I wonder why?

$ mock -r fedora-rawhide-x86_64 --init

... snip ...

$ mock -r fedora-rawhide-x86_64 --chroot --unpriv "touch ~/test"

... snip ...

INFO: Running in chroot: ['touch ~/test']
Start: chroot ['touch ~/test']
touch: cannot touch '/builddir/test': Permission denied
Finish: chroot ['touch ~/test']
Finish: run

Output of rpm -q mock

$ rpm -q mock
mock-5.5-1.fc41.noarch

Any additional notes

This likely used to work with mock-5.4-3.fc40.noarch

xsuchy commented 5 months ago

Cannot reproduce:

🎩[msuchy@triple//tmp]$ mock -r fedora-rawhide-x86_64 --chroot --unpriv "touch ~/test"
INFO: mock.py version 5.5.post1 starting (python version = 3.12.2, NVR = mock-5.5.post1-1.git.3712.87204e3.fc40), args: /usr/libexec/mock/mock -r fedora-rawhide-x86_64 --chroot --unpriv 'touch ~/test'
...
INFO: Package manager dnf5 detected and used (direct choice)
Finish: chroot init
INFO: Running in chroot: ['touch ~/test']
Start: chroot ['touch ~/test']
Finish: chroot ['touch ~/test']
Finish: run
🎩[msuchy@triple//tmp]$ rpm -q mock
mock-5.5.post1-1.git.3712.87204e3.fc40.noarch
voxik commented 5 months ago

Have you also tried $ mock -r fedora-rawhide-x86_64 --scrub all prior that? I have not hit the issue with buildroot I already had around.

xsuchy commented 5 months ago

Indeed after scubbing:

<mock-chroot> sh-5.2$ ls -ld .
drwxrwxr-x. 1 root root 30 Apr 24 09:24 .

I think that db64d46820234956bd41e8f350ba970b62b46093 may be culprit