summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2014-02-14 11:52:12 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2014-03-04 13:17:06 +0000
commit70faeb029b105fb2a15aac51b7d0cdcd9c5fc659 (patch)
treeee7a330f5e4b04929a8cbb4fcc69f262fa6e69a3
parent04cda36673767c37f2fc9bbe310c0f4cb6cf2b37 (diff)
downloadmorph-70faeb029b105fb2a15aac51b7d0cdcd9c5fc659.tar.gz
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.
-rw-r--r--morphlib/builder2.py25
-rw-r--r--morphlib/cachekeycomputer.py2
-rw-r--r--tests.as-root/tarball-image-is-sensible.stdout1
-rw-r--r--tests.build/bootstrap-mode.stdout1
-rw-r--r--tests.build/build-stratum-with-submodules.stdout1
-rw-r--r--tests.build/build-system.stdout1
6 files changed, 1 insertions, 30 deletions
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
diff --git a/tests.as-root/tarball-image-is-sensible.stdout b/tests.as-root/tarball-image-is-sensible.stdout
index 4141dee8..cf74a1ec 100644
--- a/tests.as-root/tarball-image-is-sensible.stdout
+++ b/tests.as-root/tarball-image-is-sensible.stdout
@@ -33,7 +33,6 @@
./boot/System.map
./boot/vmlinuz
./etc/
-./etc/fstab
./etc/os-release
./extlinux.conf
NAME="Baserock"
diff --git a/tests.build/bootstrap-mode.stdout b/tests.build/bootstrap-mode.stdout
index e1747b15..26544a75 100644
--- a/tests.build/bootstrap-mode.stdout
+++ b/tests.build/bootstrap-mode.stdout
@@ -7,7 +7,6 @@ build-essential strata:
hello-system:
./
etc/
-etc/fstab
etc/os-release
usr/
usr/bin/
diff --git a/tests.build/build-stratum-with-submodules.stdout b/tests.build/build-stratum-with-submodules.stdout
index 6dda5049..d4d03e13 100644
--- a/tests.build/build-stratum-with-submodules.stdout
+++ b/tests.build/build-stratum-with-submodules.stdout
@@ -1,4 +1,3 @@
./
etc/
-etc/fstab
etc/os-release
diff --git a/tests.build/build-system.stdout b/tests.build/build-system.stdout
index 2e8270dc..4d0fac2f 100644
--- a/tests.build/build-system.stdout
+++ b/tests.build/build-system.stdout
@@ -2,5 +2,4 @@
bin/
bin/hello
etc/
-etc/fstab
etc/os-release