From 34fe0d5b80a12d3a7ebdcbe4f977dbf136dc54fa Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Fri, 13 Mar 2020 20:19:23 +0100 Subject: [PATCH] mock: use 'private' mount option, not 'rprivate' (el7 fix) The 'mount --rbind -o rprivate' on EL7 does not work as we expected [1]; it looks like it actually reverses the '--rbind' option and does only '--bind' (filled rhbz#1815534). Using just 'private' seems to do the same (good) thing on both EL7 and modern Fedora. This fixes local baseurl=file:// repositories with bootstrap, and yum_chache plugin on EL7. Fixes: #381, #536 Relates: https://bugzilla.redhat.com/show_bug.cgi?id=1815534 --- mock/py/mock.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mock/py/mock.py b/mock/py/mock.py index ecf7a75eb..251a080b7 100755 --- a/mock/py/mock.py +++ b/mock/py/mock.py @@ -747,15 +747,15 @@ def main(): # add the extra bind mount to the outer chroot inner_mount = bootstrap_buildroot.make_chroot_path(buildroot.make_chroot_path()) - # Hide re-mounted chroot from host by rprivate tmpfs. + # Hide re-mounted chroot from host by private tmpfs. buildroot.mounts.managed_mounts.append( FileSystemMountPoint(filetype='tmpfs', device='hide_root_in_bootstrap', path=inner_mount, - options="rprivate")) + options="private")) buildroot.mounts.managed_mounts.append( BindMountPoint(buildroot.make_chroot_path(), inner_mount, - recursive=True, options="rprivate")) + recursive=True, options="private")) signal.signal(signal.SIGTERM, partial(handle_signals, buildroot)) signal.signal(signal.SIGPIPE, partial(handle_signals, buildroot))