[gnome-build-meta/matthiasc/3.38.0] vm/image.bst: make the image only as big as necessary
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-build-meta/matthiasc/3.38.0] vm/image.bst: make the image only as big as necessary
- Date: Tue, 15 Sep 2020 17:04:51 +0000 (UTC)
commit fe0224ec474ab340edabeca8af7b71599b9bd8cf
Author: Abderrahim Kitouni <akitouni gnome org>
Date: Sat Sep 12 16:02:49 2020 +0100
vm/image.bst: make the image only as big as necessary
This makes the installer go much faster at the cost of needing a resize for
those using the image directly
elements/vm/image.bst | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/elements/vm/image.bst b/elements/vm/image.bst
index a30d4ab0..f13331ae 100644
--- a/elements/vm/image.bst
+++ b/elements/vm/image.bst
@@ -72,6 +72,11 @@ config:
cp -r "%{sysroot}"/ostree/boot.1/gnome-os/*/*/boot/EFI/ "%{sysroot}/boot/"
- |
+ get_size() {
+ size=$(($(du --apparent-size -B 512 -s "${1}" | cut -f1)/2))
+ echo $((${size}+(${size}/10)))k
+ }
+
cat > %{install-root}/genimage.cfg <<EOF
image efi.img {
vfat {
@@ -85,7 +90,7 @@ config:
label = "root"
use-mke2fs = true
}
- size = 16G
+ size = $(get_size %{sysroot})
}
image disk.img {
hdimage {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]