diff options
author | Clark Williams <williams@redhat.com> | 2009-07-08 12:47:14 -0500 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2009-07-08 12:47:14 -0500 |
commit | 2046136e9f984d844021b3f8521d66a0ac056571 (patch) | |
tree | e623f2524986c4a44a458444da74352c81f94316 /py | |
parent | b9819b8f173d6e0cc2ac6c2e189691e1854ef2a8 (diff) | |
download | mock-2046136e9f984d844021b3f8521d66a0ac056571.tar.gz mock-2046136e9f984d844021b3f8521d66a0ac056571.tar.xz mock-2046136e9f984d844021b3f8521d66a0ac056571.zip |
Add directory and infrastructure that will allow dbus to start in chroot.
BZ# 460574
Signed-off-by: Clark Williams <williams@redhat.com>
Diffstat (limited to 'py')
-rw-r--r-- | py/mock/backend.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/py/mock/backend.py b/py/mock/backend.py index b8213fd..a453012 100644 --- a/py/mock/backend.py +++ b/py/mock/backend.py @@ -13,6 +13,7 @@ import logging import os import shutil import stat +import uuid # our imports import mock.util @@ -193,6 +194,7 @@ class Root(object): for item in [ 'var/lib/rpm', 'var/lib/yum', + 'var/lib/dbus', 'var/log', 'var/lock/rpm', 'etc/rpm', @@ -241,6 +243,15 @@ class Root(object): os.remove(hostspath) shutil.copy2('/etc/hosts', etcdir) + # Anything that tries to use libdbus inside the chroot will require this + # FIXME - merge this code with other OS-image building code + machine_uuid = uuid.uuid4().hex + dbus_uuid_path = self.makeChrootPath('var', 'lib', 'dbus', 'machine-id') + f = open(dbus_uuid_path, 'w') + f.write(machine_uuid) + f.write('\n') + f.close() + # files in /etc that need doing for key in self.chroot_file_contents: p = self.makeChrootPath(key) |