Hide Forgot
Description of problem: The buildroot does not contain /bin/su. Therefore `/usr/bin/systemd-nspawn -q -M 0100e5ddf07b4eab9ac259f76aa547f7 -D /var/lib/mock/epel-7-x86_64/root /bin/su -l mockbuild -c /bin/rpm -Uvh --nodeps /builddir/build/originals/repowatch-20150913git8566d2f-1.el7.src.rpm` fails. Version-Release number of selected component (if applicable): mock-1.2.14 Actual results: Build fails due to missing su library DEBUG util.py:474: Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', 'eaa93d4df39e476fa924cdf3968a1ab8', '-D', '/var/lib/mock/epel-7-x86_64/root', '/bin/su', '-l', 'mockbuild', '-c', '/bin/rpm -Uvh --nodeps /builddir/build/originals/repowatch-20150913git8566d2f-1.el7.src.rpm'] with env {'LANG': 'en_US.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\x1b]0;<mock-chroot>\x07<mock-chroot>"', 'HOME': '/builddir', 'CCACHE_DIR': '/tmp/ccache', 'CCACHE_UMASK': '002'} and shell False DEBUG util.py:399: Directory /var/lib/mock/epel-7-x86_64/root lacks the binary to execute or doesn't look like a binary tree. Refusing. [build2 SPECS]$ sudo /usr/bin/systemd-nspawn -q -M eaa93d4df39e476fa924cdf3968a1ab8 -D /var/lib/mock/epel-7-x86_64/root /usr/bin/ls /bin/su /usr/bin/ls: cannot access /bin/su: No such file or directory Expected results: /bin/su should be installed inside the chroot and build should succeed Additional info: adding 'util-linux' to `config_opts['chroot_setup_cmd'] = 'install @buildsys-build'` solves the problem.
Fixed in commit: * 00ab711 (HEAD -> devel, origin/devel) do not call /bin/su and rather utilize --user of systemd-nspawn [RHBZ#1301953]
Created attachment 1131026 [details] Verbose log of a build attempt This change broke my local mock setup. I'm running mock upstream git master in place with this wrapper script in the mock dir: #!/bin/sh exec sudo $(dirname $0)/py/mock.py --configdir=/etc/mock "$@" Verbose build log from a build attempt is attached. The srpm rebuild with "rpmbuild -bs" is the last thing done, according to the log it exits successfully with return code 0, but produces no other output and no srpm, and that's it.
(Forgot to note that I'm running mock on F-23)
I think this changes breaks mocks for RHEL6 containers. $ sudo /bin/systemd-nspawn -q -M rhel-6-x86_64 id jenkins uid=10813(jenkins) gid=21373(jenkins) groups=21373(jenkins) $ sudo /bin/systemd-nspawn --user=jenkins -M rhel-6-x86_64 id jenkins Spawning container rhel-6-x86_64 on /var/lib/machines/rhel-6-x86_64. Press ^] three times within 1s to kill container. Container rhel-6-x86_64 failed with error code 1. I think the above behavior is seen because getent initgroups is not supported by RHEL6. On a mailing list thread back in 2014 Lennart stated: "There's nspawn's --user= switch which relies on glibc's "getent" binary to be available in the container, which it will use to resolve the username in the container's context and then change to it." "The getent binary has been part of glibc for a long time, but note that we make use of "getent initgroups" which is a more recent addition..." http://permalink.gmane.org/gmane.comp.sysutils.systemd.devel/23419
> I think this changes breaks mocks for RHEL6 containers. Then I would say - lets not support it on RHEL6. :( Mock with nspawn backend still has too many reported and unfixed bugs that it cannot be called stable. I would love to make it stable on recent Fedoras and then go back and eventually make it work on older systems. > The srpm rebuild with "rpmbuild -bs" is the last thing done, according to the log it exits successfully with return code 0, but produces no other output and no srpm, and that's it. Fixed in commit: * 8200ce4 define command that it works with old-chroot too [RHBZ#1301953]
mock-1.2.16-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-66229b4649
mock-1.2.16-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-3405d4e45b
mock-1.2.16-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-a9958aa8eb
mock-1.2.16-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-bbb4bfc16f
mock-1.2.16-1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-25ff2f1000
mock-1.2.16-1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-66229b4649
mock-1.2.16-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-a9958aa8eb
mock-1.2.16-1.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-25ff2f1000
mock-1.2.16-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-3405d4e45b
mock-1.2.16-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-bbb4bfc16f
mock-1.2.17-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-bbb4bfc16f
mock-1.2.17-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-66229b4649
mock-1.2.17-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-bbb4bfc16f
mock-1.2.17-1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-66229b4649
mock-1.2.17-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-23c93722c3
mock-1.2.17-1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-d4770f601d
mock-1.2.17-1.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-d4770f601d
mock-1.2.17-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-23c93722c3
mock-1.2.17-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.2.17-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.2.17-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-a9958aa8eb
mock-1.2.17-1.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.2.17-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.2.17-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
(In reply to Matthew Gyurgyik from comment #4) > I think this changes breaks mocks for RHEL6 containers. > > $ sudo /bin/systemd-nspawn -q -M rhel-6-x86_64 id jenkins > uid=10813(jenkins) gid=21373(jenkins) groups=21373(jenkins) > > $ sudo /bin/systemd-nspawn --user=jenkins -M rhel-6-x86_64 id jenkins > Spawning container rhel-6-x86_64 on /var/lib/machines/rhel-6-x86_64. > Press ^] three times within 1s to kill container. > Container rhel-6-x86_64 failed with error code 1. > > I think the above behavior is seen because getent initgroups is not > supported by RHEL6. > FYI If systemd want to be more compatible here in container world then they could use "id" for the same purpose which is available even in el5 sh$ getent initgroups test_user test_user 20728 1070 5977 sh$ id -G test_user 20728 5977 1070
I can confirm this update has broken all package building on EL7 hosts in an EL6 mock environment. I've tagged BZ#1468802 as depending on this.