Bug 1446847

Summary: Cannot rebuild src.rpm with disabled SELinux and enabled tmpfs plugin
Product: [Fedora] Fedora Reporter: Lukas Slebodnik <lslebodn>
Component: mockAssignee: Miroslav Suchý <msuchy>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: herrold, jdisnard, mebrown, msimacek, msuchy, praiskup, williams
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: 2018-05-26 14:54:19 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 Lukas Slebodnik 2017-04-29 15:16:15 UTC
Description of problem:
I cannot rebuild src.rpm with disabled SELinux and enabled tmpfs plugin.
It works well with mock-1.3.4-1.fc26. It is not caused by change from chroot -> systemd-nspawn because I tested with --old-chroot 

Version-Release number of selected component (if applicable):
sh$ rpm -q mock
mock-1.4.1-1.fc27.noarch

How reproducible:
Deterministic

Steps to Reproduce:
1. docker run --rm -ti --cap-add=SYS_ADMIN --cap-add=FOWNER docker.io/fedora:rawhide bash
2. dnf install -y -e0 -d0 mock
3. mkdir ~/.config
4. echo "config_opts['plugin_conf']['tmpfs_enable'] = True" > ~/.config/mock.cfg
5. curl -O https://kojipkgs.fedoraproject.org//packages/mock/1.4.1/1.fc26/src/mock-1.4.1-1.fc26.src.rpm
6. /usr/bin/mock --old-chroot --resultdir . --rebuild mock-1.4.1-1.fc26.src.rpm 

Actual results:
Complete!
Finish: dnf install
ERROR: Exception(mock-1.4.1-1.fc26.src.rpm) Config(fedora-rawhide-x86_64) 10 minutes 23 seconds
INFO: Results and/or logs in: .
INFO: Cleaning up build root ('cleanup_on_failure=True')
Start: clean chroot
INFO: unmounting tmpfs.
INFO: unmounting tmpfs.
Finish: clean chroot
ERROR: Could not find useradd in chroot, maybe the install failed?

Expected results:
No errors and rpms produced without any problem

Comment 1 Lukas Slebodnik 2017-04-29 15:35:05 UTC
BTW it works well with enabled/permissive SElinux
e.g. docker run --rm -ti --cap-add=SYS_ADMIN --cap-add=FOWNER -v =/sys/fs/selinux/:/sys/fs/selinux/ docker.io/fedora:rawhide bash

Or with disabled SELinux + --no-bootstrap-chroot

In both cases, tmpfs plugin was enabled.

Comment 2 Fedora End Of Life 2018-05-03 08:30:20 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. 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 EOL if it remains open with a Fedora  'version'
of '26'.

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.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 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 this bug is closed as described in the policy above.

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 3 Lukas Slebodnik 2018-05-26 14:54:19 UTC
Works well with mock-1.4.9-1.fc26.noarch and also on f28
mock-1.4.10-1.fc28.noarch