diff options
-rwxr-xr-x | baserock-bootstrap | 1 | ||||
-rwxr-xr-x | mkimage.sh | 2 | ||||
-rw-r--r-- | morphlib/bins.py | 2 | ||||
-rw-r--r-- | morphlib/builder.py | 8 | ||||
-rwxr-xr-x | run-bootstrap-in-chroot | 4 | ||||
-rwxr-xr-x | tests/name-clash.script | 2 |
6 files changed, 10 insertions, 9 deletions
diff --git a/baserock-bootstrap b/baserock-bootstrap index 1187b747..ce59b178 100755 --- a/baserock-bootstrap +++ b/baserock-bootstrap @@ -347,6 +347,7 @@ EOF $HOST_CHMOD +x "$do_chroot" "$do_chroot" /baserock/build.sh } + pass3_build_with_morph_in_chroot() { echo "Building Baserock with morph" @@ -108,7 +108,7 @@ trap "umount $part; dummy_kpartx_delete $img" EXIT # Unpack all the strata that are to be installed. for stratum do - tar -C "$mp" -xf "$stratum" + tar -C "$mp" -xhf "$stratum" done # Configure fstab for the new system. diff --git a/morphlib/bins.py b/morphlib/bins.py index b6201756..fd0f28d4 100644 --- a/morphlib/bins.py +++ b/morphlib/bins.py @@ -109,5 +109,5 @@ def unpack_binary(filename, dirname, ex): ''' logging.debug('Unpacking %s into %s' % (filename, dirname)) - ex.runv(['tar', '-C', dirname, '-xvf', filename]) + ex.runv(['tar', '-C', dirname, '-xvhf', filename]) diff --git a/morphlib/builder.py b/morphlib/builder.py index 735e4334..05298994 100644 --- a/morphlib/builder.py +++ b/morphlib/builder.py @@ -494,7 +494,7 @@ class SystemBuilder(BlobBuilder): # pragma: no cover with self.build_watch('unpack-strata'): for name, filename in self.stage_items: self.msg('unpack %s from %s' % (name, filename)) - self.ex.runv(['tar', '-C', mount_point, '-xf', filename]) + self.ex.runv(['tar', '-C', mount_point, '-xhf', filename]) ldconfig(self.ex, mount_point) def _create_fstab(self, mount_point): @@ -503,9 +503,9 @@ class SystemBuilder(BlobBuilder): # pragma: no cover if not os.path.exists(os.path.dirname(fstab)): os.makedirs(os.path.dirname(fstab)) with open(fstab, 'w') as f: - f.write('proc /proc proc defaults 0 0') - f.write('sysfs /sys sysfs defaults 0 0') - f.write('/dev/sda1 / ext4 errors=remount-ro 0 1') + f.write('proc /proc proc defaults 0 0\n') + f.write('sysfs /sys sysfs defaults 0 0\n') + f.write('/dev/sda1 / ext4 errors=remount-ro 0 1\n') def _install_extlinux(self, mount_point): with self.build_watch('install-bootloader'): diff --git a/run-bootstrap-in-chroot b/run-bootstrap-in-chroot index e33334f4..2c2e420d 100755 --- a/run-bootstrap-in-chroot +++ b/run-bootstrap-in-chroot @@ -42,7 +42,7 @@ run_pass() if "$snapshot" && has_pass "$passname" then - tar -C "$dir" -xf "$tarball" + tar -C "$dir" -xhf "$tarball" update_morph "$dir" else update_morph "$dir" @@ -111,7 +111,7 @@ mkdir "$dir" chrootsnapshot="$snapshotdir/squeeze.tar.gz" if "$snapshot" && [ -e "$chrootsnapshot" ] then - tar -C "$dir" -xf "$chrootsnapshot" + tar -C "$dir" -xhf "$chrootsnapshot" else debootstrap \ --include=build-essential,\ diff --git a/tests/name-clash.script b/tests/name-clash.script index 8f762a3e..ce9ec051 100755 --- a/tests/name-clash.script +++ b/tests/name-clash.script @@ -65,5 +65,5 @@ EOF # unpack it and check the contents INSTDIR="$DATADIR"/unpack mkdir -p "$INSTDIR" -tar -C "$INSTDIR" -xf "$cache/"*hello-stratum* +tar -C "$INSTDIR" -xhf "$cache/"*hello-stratum* test "$("$INSTDIR"/bin/hello)" = "hello, world" |