From 70faeb029b105fb2a15aac51b7d0cdcd9c5fc659 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Fri, 14 Feb 2014 11:52:12 +0000 Subject: Don't create a blank /etc/fstab This messes up the baserock-system-config-sync tool. Systemd does not require /etc/fstab to exist in any case. I have bumped the 'system-compatibility-version' field in this commit to trigger rebuilding all system artifacts. --- morphlib/builder2.py | 25 ------------------------- morphlib/cachekeycomputer.py | 2 +- 2 files changed, 1 insertion(+), 26 deletions(-) (limited to 'morphlib') diff --git a/morphlib/builder2.py b/morphlib/builder2.py index 2dca738c..2c99c6f6 100644 --- a/morphlib/builder2.py +++ b/morphlib/builder2.py @@ -549,7 +549,6 @@ class SystemBuilder(BuilderBase): # pragma: no cover fs_root = self.staging_area.destdir(self.artifact.source) self.unpack_strata(fs_root) self.write_metadata(fs_root, rootfs_name) - self.create_fstab(fs_root) self.copy_kernel_into_artifact_cache(fs_root) unslashy_root = fs_root[1:] def uproot_info(info): @@ -649,30 +648,6 @@ class SystemBuilder(BuilderBase): # pragma: no cover os.chmod(os_release_file, 0644) - def create_fstab(self, path): - '''Create an /etc/fstab inside a system tree. - - The fstab is created using assumptions of the disk layout. - If the assumptions are wrong, extend this code so it can deal - with other cases. - - ''' - - self.app.status(msg='Creating fstab in %(path)s', - path=path, chatty=True) - with self.build_watch('create-fstab'): - fstab = os.path.join(path, 'etc', 'fstab') - if not os.path.exists(fstab): - # FIXME: should exist - if not os.path.exists(os.path.dirname(fstab)): - os.makedirs(os.path.dirname(fstab)) - # We create an empty fstab: systemd does not require - # /sys and /proc entries, and we can't know what the - # right entry for / is. The fstab gets built during - # deployment instead, when that information is available. - with open(fstab, 'w'): - pass - def copy_kernel_into_artifact_cache(self, path): '''Copy the installed kernel image into the local artifact cache. diff --git a/morphlib/cachekeycomputer.py b/morphlib/cachekeycomputer.py index bb536f82..3efe1cbb 100644 --- a/morphlib/cachekeycomputer.py +++ b/morphlib/cachekeycomputer.py @@ -114,6 +114,6 @@ class CacheKeyComputer(object): if kind == 'stratum': keys['stratum-format-version'] = 1 elif kind == 'system': - keys['system-compatibility-version'] = "1~ (temporary, root rw)" + keys['system-compatibility-version'] = "2~ (upgradable, root rw)" return keys -- cgit v1.2.1