buninu-linux 0.5.1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Dockerfile +23 -0
- package/NOTICE.md +111 -63
- package/README.md +280 -60
- package/build-image.sh +9 -5
- package/build-uki.sh +44 -28
- package/fetch-alpine.sh +43 -35
- package/fetch-bun.sh +14 -21
- package/index.js +150 -35
- package/initramfs/bin/buninu-linux-help +12 -0
- package/initramfs/bin/bunterm +64 -5
- package/initramfs/bin/chroot +4 -1
- package/initramfs/bin/ip +3 -2
- package/initramfs/bin/ps +3 -0
- package/initramfs/bin/tar +9 -0
- package/initramfs/init.js +79 -41
- package/initramfs/lib/bunterm/images.js +17 -2
- package/initramfs/lib/bunterm/terminal.js +25 -9
- package/initramfs/lib/bunterm/vt.js +91 -0
- package/initramfs/lib/dlopen.js +4 -0
- package/initramfs/lib/fbdev.js +33 -10
- package/initramfs/usr/share/doc/buninu-linux/bunterm.md +25 -7
- package/initramfs/usr/share/doc/buninu-linux/fbdev.md +1 -1
- package/initramfs/usr/share/doc/buninu-linux/tar.md +2 -0
- package/initramfs/usr/share/licenses/README.md +4 -0
- package/native/aarch64/lib/ld-musl-aarch64.so.1 +0 -0
- package/native/aarch64/lib/libc.musl-aarch64.so.1 +0 -0
- package/native/aarch64/lib/libgcc_s.so.1 +0 -0
- package/native/aarch64/lib/libstdc++.so.6 +0 -0
- package/package.json +2 -2
- package/run-qemu.sh +61 -12
- package/scripts/arch.sh +113 -0
- package/scripts/fetch.sh +5 -3
- package/scripts/pack-initramfs.sh +22 -4
- package/test/host/Dockerfile +13 -0
- package/test/host/boot-test.exp +70 -0
- package/test/host/host-test.sh +49 -0
- package/test/host/in-container.sh +58 -0
- /package/{initramfs → native/x86_64}/lib/ld-musl-x86_64.so.1 +0 -0
- /package/{initramfs → native/x86_64}/lib/libc.musl-x86_64.so.1 +0 -0
- /package/{initramfs → native/x86_64}/lib/libgcc_s.so.1 +0 -0
- /package/{initramfs → native/x86_64}/lib/libstdc++.so.6 +0 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Runs inside the container host-test.sh starts: an ordinary Debian 13 machine
|
|
3
|
+
# of the chosen CPU. Clones the committed HEAD of the checkout mounted at
|
|
4
|
+
# /repo, builds each guest with the host toolchain (no --docker), boots it
|
|
5
|
+
# through boot-test.exp, and checks that the builds leave git status clean.
|
|
6
|
+
set -euo pipefail
|
|
7
|
+
|
|
8
|
+
here=$(cd "$(dirname "$0")" && pwd)
|
|
9
|
+
guests=${GUESTS:-x86_64 aarch64}
|
|
10
|
+
kvm=no
|
|
11
|
+
if [ -r /dev/kvm ] && [ -w /dev/kvm ]; then kvm=yes; fi
|
|
12
|
+
echo "### host: $(uname -sm), node $(node --version), /dev/kvm: $kvm"
|
|
13
|
+
|
|
14
|
+
git config --global --add safe.directory '*'
|
|
15
|
+
git clone --quiet /repo /work
|
|
16
|
+
echo "### testing $(git -C /work log -1 --format='%h %s')"
|
|
17
|
+
# /cache is the host's downloads/, read-only; every file in it is still
|
|
18
|
+
# checked against its pinned SHA-256, and anything missing is fetched.
|
|
19
|
+
mkdir -p /work/downloads
|
|
20
|
+
cp -R /cache/. /work/downloads/
|
|
21
|
+
cd /work
|
|
22
|
+
|
|
23
|
+
strip_ansi() { sed 's/\x1b\[[0-9;?]*[a-zA-Z]//g' | tr -d '\r'; }
|
|
24
|
+
|
|
25
|
+
status=0
|
|
26
|
+
for guest in $guests; do
|
|
27
|
+
echo "### $guest: fetch + build ${BUILD_FLAGS:-}"
|
|
28
|
+
log=/tmp/build-$guest.log
|
|
29
|
+
# BUILD_FLAGS is split on purpose: it holds flags such as --linux-lts.
|
|
30
|
+
if node ./index.js -fb --arch "$guest" ${BUILD_FLAGS:-} > "$log" 2>&1; then
|
|
31
|
+
grep -E '^==>|^Fetched|^Built|^Packed|^note' "$log" || true
|
|
32
|
+
else
|
|
33
|
+
echo "### FAIL: $guest build; last lines:"
|
|
34
|
+
tail -n 30 "$log"
|
|
35
|
+
status=1
|
|
36
|
+
continue
|
|
37
|
+
fi
|
|
38
|
+
|
|
39
|
+
echo "### $guest: boot"
|
|
40
|
+
log=/tmp/boot-$guest.log
|
|
41
|
+
if expect "$here/boot-test.exp" /work "$guest" "${BOOT_TIMEOUT:-900}" > "$log" 2>&1; then
|
|
42
|
+
strip_ansi < "$log" | grep -a -E '^run-qemu.sh:|^network: eth0|^fetch example|^### ' || true
|
|
43
|
+
else
|
|
44
|
+
strip_ansi < "$log" | grep -a -E '^run-qemu.sh:|^### ok' || true
|
|
45
|
+
echo "### FAIL: $guest boot; last lines:"
|
|
46
|
+
strip_ansi < "$log" | tail -n 40
|
|
47
|
+
status=1
|
|
48
|
+
fi
|
|
49
|
+
done
|
|
50
|
+
|
|
51
|
+
echo "### git status after the builds (should be empty):"
|
|
52
|
+
if [ -n "$(git status --porcelain)" ]; then
|
|
53
|
+
git status --short
|
|
54
|
+
status=1
|
|
55
|
+
fi
|
|
56
|
+
|
|
57
|
+
if [ "$status" = 0 ]; then echo "### PASS"; else echo "### FAIL"; fi
|
|
58
|
+
exit "$status"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|