aboutsummaryrefslogtreecommitdiffstats
path: root/main/alpine-conf/0001-setup-disk-let-user-set-ROOT_SIZE.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2019-12-06 16:19:57 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2019-12-06 17:14:03 +0000
commitfa593dab03b7325abc5a05235c4bdaf1a4c40206 (patch)
tree3db7347d0008c5cdd15a170e30b75cbed4d05b77 /main/alpine-conf/0001-setup-disk-let-user-set-ROOT_SIZE.patch
parent3d0ea5e47184d37a198ca598c308cab8938ab177 (diff)
downloadaports-fa593dab03b7325abc5a05235c4bdaf1a4c40206.tar.gz
aports-fa593dab03b7325abc5a05235c4bdaf1a4c40206.tar.bz2
aports-fa593dab03b7325abc5a05235c4bdaf1a4c40206.tar.xz
main/alpine-conf: backport support for ROOT_SIZE
so users can set rootfs size via env var ROOT_SIZE
Diffstat (limited to 'main/alpine-conf/0001-setup-disk-let-user-set-ROOT_SIZE.patch')
-rw-r--r--main/alpine-conf/0001-setup-disk-let-user-set-ROOT_SIZE.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/main/alpine-conf/0001-setup-disk-let-user-set-ROOT_SIZE.patch b/main/alpine-conf/0001-setup-disk-let-user-set-ROOT_SIZE.patch
new file mode 100644
index 0000000000..49d42167a5
--- /dev/null
+++ b/main/alpine-conf/0001-setup-disk-let-user-set-ROOT_SIZE.patch
@@ -0,0 +1,37 @@
+From 93ce697c0075aeb51db9b78c0d47e10213aa1885 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Fri, 6 Dec 2019 15:53:45 +0000
+Subject: [PATCH] setup-disk: let user set ROOT_SIZE
+
+allow user set rootfs size via ROOT_SIZE. For lvm it will be passed
+directly to lvmcreate. For the sfdisk partitions it will be a number in
+MiB.
+---
+ setup-disk.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/setup-disk.in b/setup-disk.in
+index 5eb8638..b309919 100644
+--- a/setup-disk.in
++++ b/setup-disk.in
+@@ -989,7 +989,7 @@ native_disk_install_lvm() {
+
+ setup_lvm_volume_group $vgname $@ || return 1
+ setup_lvm_swap $vgname
+- lvcreate --quiet -n ${root_dev##*/} -l 100%FREE $vgname
++ lvcreate --quiet -n ${root_dev##*/} -l ${ROOT_SIZE:-100%FREE} $vgname
+ rc-update add lvm boot
+ setup_root $root_dev $BOOT_DEV
+ }
+@@ -1002,7 +1002,7 @@ native_disk_install() {
+ local prep_size=8
+ local boot_size=${BOOT_SIZE:-100}
+ local swap_size=${SWAP_SIZE}
+- local root_size=
++ local root_size=${ROOT_SIZE}
+ local root_dev= boot_dev= swap_dev=
+ init_progs $(select_bootloader) || return 1
+ confirm_erase $@ || return 1
+--
+2.24.0
+