aboutsummaryrefslogtreecommitdiffstats
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
parent3d0ea5e47184d37a198ca598c308cab8938ab177 (diff)
downloadaports-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
-rw-r--r--main/alpine-conf/0001-setup-disk-let-user-set-ROOT_SIZE.patch37
-rw-r--r--main/alpine-conf/APKBUILD6
2 files changed, 41 insertions, 2 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
+
diff --git a/main/alpine-conf/APKBUILD b/main/alpine-conf/APKBUILD
index 1c9e25696a..4846060938 100644
--- a/main/alpine-conf/APKBUILD
+++ b/main/alpine-conf/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=alpine-conf
pkgver=3.8.3
-pkgrel=1
+pkgrel=2
pkgdesc="Alpine configuration management scripts"
url="https://git.alpinelinux.org/alpine-conf/about"
arch="all"
@@ -9,6 +9,7 @@ license="MIT"
depends="openrc>=0.24.1-r6 busybox>=1.26.1-r3"
source="https://dev.alpinelinux.org/archive/alpine-conf/alpine-conf-$pkgver.tar.xz
0001-libalpine-use-correct-exit-code-in-trap.patch
+ 0001-setup-disk-let-user-set-ROOT_SIZE.patch
"
builddir="$srcdir"/$pkgname-$pkgver
@@ -26,4 +27,5 @@ package() {
}
sha512sums="73bd999b552d266c994cc1535570b86ddd7a7379f3b9e244c4985722f5754b11323a4e677cdae91fa4f0098dadd388eba679a99d98e140354ab7681bb85f9dfa alpine-conf-3.8.3.tar.xz
-b5a4ed4e1507a6dde503edca5bc71c9f26e81e3f85dd01aa3705b300d7e9b9f48b7005250dea3105bef89a688bbf70257290e921d49534f6e6dd8848bb5b2fdb 0001-libalpine-use-correct-exit-code-in-trap.patch"
+b5a4ed4e1507a6dde503edca5bc71c9f26e81e3f85dd01aa3705b300d7e9b9f48b7005250dea3105bef89a688bbf70257290e921d49534f6e6dd8848bb5b2fdb 0001-libalpine-use-correct-exit-code-in-trap.patch
+bf59558e5477929a0692c9ba182b71f7913533b50abd53303be6c47897348c53ec587c27a20442c180564c552f84d90d3c7d700b5f6e2cb4bb0a6ac1a7dafd1d 0001-setup-disk-let-user-set-ROOT_SIZE.patch"