mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-11-24 03:12:18 +00:00
39c12e119b
buildall now calls prepare_mock_resultdirs before the cache checks, so a cached build also loads the mock configuration through mockbuild.config. release_repository.t builds xCAT-release in a user namespace on a host without mock, and the build stopped with "mock is not installed: cannot import mockbuild.config". The namespace fixture already stands in for /etc/mock. It now also puts a stand-in mockbuild package on PYTHONPATH. Its load_config fails when the chroot configuration is missing, and reports the caller as chrootuid, as mock does when no chrootuid is set. buildrpms.pl is unchanged. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
9 lines
243 B
Python
9 lines
243 B
Python
# Stand-in for mock's uid manager. The namespace has no sudo caller to drop to.
|
|
class _UidManager:
|
|
def run_in_subprocess_without_privileges(self, func, *args):
|
|
return func(*args)
|
|
|
|
|
|
def setup_uid_manager():
|
|
return _UidManager()
|