commit 0e59ab5

chld  ·  2025-12-20 20:23:53 +0000 UTC
parent 5fe417e
setup-apk
3 files changed,  +23, -7
+16, -3
 1@@ -1,7 +1,7 @@
 2 #!/bin/sh -e
 3 . ./util/lib.sh
 4 
 5-set -x
 6+#set -x
 7 
 8 # remove all except: kiss, musl, curl
 9 # kiss will be removed after bootstrapping apk
10@@ -16,8 +16,13 @@ _inc '
11 	kiss r binutils bison m4 flex pigz xz make
12 	kiss r baselayout
13 '
14+
15 ls /mnt/var/db/kiss/installed # wooh
16 
17+# now, lets remove all traces of KISS from /mnt
18+rm -rf /mnt/var/db/kiss/
19+rm -rf /mnt/bin/kiss-* /mnt/bin/kiss
20+
21 # now actually bootstrapping apk stage
22 # from https://wiki.alpinelinux.org/wiki/Bootstrapping_Alpine_Linux
23 
24@@ -32,9 +37,17 @@ chmod 755 /mnt/bin/apk # executable apk
25 mkdir -p /mnt/etc/
26 mkdir -p /mnt/etc/apk
27 cp ./rootfs/repositories /mnt/etc/apk/repositories
28+ls /mnt/lib/apk
29+ls /mnt/lib/apk/db
30+
31+# check for internet
32+#_inc '
33+#	ping google.com
34+#	ping codeberg.org
35+#'
36 
37 # sync repositories
38 _inc '
39-/bin/apk --root / --allow-untrusted update 
40-/bin/apk --root / add alpine-keys 
41+	/bin/apk --root / --allow-untrusted update 
42+	/bin/apk --root / add alpine-keys 
43 '
+3, -0
 1@@ -1,6 +1,9 @@
 2 #!/bin/sh -e
 3 
 4 set -x
 5+# unmount /mnt
 6+sh ./util/kiss-mount /mnt .
 7+
 8 sh ./setup-rootfs
 9 sh ./setup-userland
10 sh ./setup-apk
+4, -4
 1@@ -1,13 +1,13 @@
 2 #!/bin/sh -eu
 3 . ./util/lib.sh # source functions
 4 
 5-echo 'WARNING: assuming you have rootf mounted @ /mnt'
 6+echo "WARNING: $0 assumes you have rootfs mounted @ /mnt!"
 7 set -x
 8 
 9 rm -rf /mnt/*
10-#wget \
11-#	https://codeberg.org/kiss-community/repo/releases/download/24.12.18/kiss-chroot-24.12.18.tar.xz \
12-#	-O kiss.tar.xz
13+wget \
14+	https://codeberg.org/kiss-community/repo/releases/download/24.12.18/kiss-chroot-24.12.18.tar.xz \
15+	-O kiss.tar.xz
16 
17 tar -xvf kiss.tar.xz -C /mnt
18