commit 34b9a26ff21717698ddaca9bc01f52a601fe027b Author: MeexReay Date: Wed Mar 12 22:20:47 2025 +0300 init commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..f3f570a --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ +# minceraftOS + +It is a small OS without installation scripts and other bullshit, only minecraft on startup \ +You just boot on it and play minceraft in offline mode + +## How to make iso file + +That's easy enough to understand it without instructions + +``` +cd /tmp +git clone https://github.com/MeexReay/minceraftOS +cd minceraftOS +sudo ./mkmine.sh +cd output +ls # here has to be the iso file +``` + +## How to burn it on disk + +First link in google bro + +``` +sudo dd if= of= +``` + +## How to play minceraft + +IDK bro just do what you want that's it diff --git a/container/Containerfile b/container/Containerfile new file mode 100644 index 0000000..67b69b3 --- /dev/null +++ b/container/Containerfile @@ -0,0 +1,10 @@ +FROM ghcr.io/void-linux/void-glibc-full:latest + +ARG MIRROR="https://repo-default.voidlinux.org/" + +RUN xbps-install -SyuR "${MIRROR}/current" xbps \ + && xbps-install -yuR "${MIRROR}/current" \ + && xbps-install -yuR "${MIRROR}/current" \ + bash make git kmod xz lzo qemu-user-arm qemu-user-aarch64 binfmt-support outils dosfstools e2fsprogs + +CMD ["/bin/sh"] diff --git a/container/docker-bake.hcl b/container/docker-bake.hcl new file mode 100644 index 0000000..6cc8a0a --- /dev/null +++ b/container/docker-bake.hcl @@ -0,0 +1,20 @@ +variable "MIRROR" { + default = "https://repo-ci.voidlinux.org/" +} + +target "docker-metadata-action" {} + +target "_common" { + inherits = ["docker-metadata-action"] + dockerfile = "container/Containerfile" + cache-to = ["type=local,dest=/tmp/buildx-cache"] + cache-from = ["type=local,src=/tmp/buildx-cache"] + args = { + "MIRROR" = "${MIRROR}" + } +} + +target "void-mklive" { + inherits = ["_common"] + platforms = ["linux/amd64", "linux/arm64"] +} diff --git a/data/bash_profile b/data/bash_profile new file mode 100755 index 0000000..a67d540 --- /dev/null +++ b/data/bash_profile @@ -0,0 +1,3 @@ +# .bash_profile + +[[ -z $DISPLAY ]] && [[ "$(tty)" == "/dev/tty1" ]] && exec startx diff --git a/data/cursors/00000000000000020006000e7e9ffc3f b/data/cursors/00000000000000020006000e7e9ffc3f new file mode 100755 index 0000000..c57bcc3 Binary files /dev/null and b/data/cursors/00000000000000020006000e7e9ffc3f differ diff --git a/data/cursors/00008160000006810000408080010102 b/data/cursors/00008160000006810000408080010102 new file mode 100755 index 0000000..4177ecb Binary files /dev/null and b/data/cursors/00008160000006810000408080010102 differ diff --git a/data/cursors/028006030e0e7ebffc7f7070c0600140 b/data/cursors/028006030e0e7ebffc7f7070c0600140 new file mode 100755 index 0000000..b42ca04 Binary files /dev/null and b/data/cursors/028006030e0e7ebffc7f7070c0600140 differ diff --git a/data/cursors/03b6e0fcb3499374a867c041f52298f0 b/data/cursors/03b6e0fcb3499374a867c041f52298f0 new file mode 100755 index 0000000..d04dbff Binary files /dev/null and b/data/cursors/03b6e0fcb3499374a867c041f52298f0 differ diff --git a/data/cursors/03b6e0fcb3499374a867d041f52298f0 b/data/cursors/03b6e0fcb3499374a867d041f52298f0 new file mode 100755 index 0000000..9cde864 Binary files /dev/null and b/data/cursors/03b6e0fcb3499374a867d041f52298f0 differ diff --git a/data/cursors/0426c94ea35c87780ff01dc239897213 b/data/cursors/0426c94ea35c87780ff01dc239897213 new file mode 100755 index 0000000..0285637 Binary files /dev/null and b/data/cursors/0426c94ea35c87780ff01dc239897213 differ diff --git a/data/cursors/043a9f68147c53184671403ffa811cc5 b/data/cursors/043a9f68147c53184671403ffa811cc5 new file mode 100755 index 0000000..3e9d10e Binary files /dev/null and b/data/cursors/043a9f68147c53184671403ffa811cc5 differ diff --git a/data/cursors/048008013003cff3c00c801001200000 b/data/cursors/048008013003cff3c00c801001200000 new file mode 100755 index 0000000..eb7cbf1 Binary files /dev/null and b/data/cursors/048008013003cff3c00c801001200000 differ diff --git a/data/cursors/0876e1c15ff2fc01f906f1c363074c0f b/data/cursors/0876e1c15ff2fc01f906f1c363074c0f new file mode 100755 index 0000000..2e29deb Binary files /dev/null and b/data/cursors/0876e1c15ff2fc01f906f1c363074c0f differ diff --git a/data/cursors/08e8e1c95fe2fc01f976f1e063a24ccd b/data/cursors/08e8e1c95fe2fc01f976f1e063a24ccd new file mode 100755 index 0000000..c57bcc3 Binary files /dev/null and b/data/cursors/08e8e1c95fe2fc01f976f1e063a24ccd differ diff --git a/data/cursors/08ffe1cb5fe6fc01f906f1c063814ccf b/data/cursors/08ffe1cb5fe6fc01f906f1c063814ccf new file mode 100755 index 0000000..e2121a4 Binary files /dev/null and b/data/cursors/08ffe1cb5fe6fc01f906f1c063814ccf differ diff --git a/data/cursors/08ffe1e65f80fcfdf9fff11263e74c48 b/data/cursors/08ffe1e65f80fcfdf9fff11263e74c48 new file mode 100755 index 0000000..8593444 Binary files /dev/null and b/data/cursors/08ffe1e65f80fcfdf9fff11263e74c48 differ diff --git a/data/cursors/1081e37283d90000800003c07f3ef6bf b/data/cursors/1081e37283d90000800003c07f3ef6bf new file mode 100755 index 0000000..e2121a4 Binary files /dev/null and b/data/cursors/1081e37283d90000800003c07f3ef6bf differ diff --git a/data/cursors/14fef782d02440884392942c11205230 b/data/cursors/14fef782d02440884392942c11205230 new file mode 100755 index 0000000..3e9d10e Binary files /dev/null and b/data/cursors/14fef782d02440884392942c11205230 differ diff --git a/data/cursors/208530c400c041818281048008011002 b/data/cursors/208530c400c041818281048008011002 new file mode 100755 index 0000000..86b6db2 Binary files /dev/null and b/data/cursors/208530c400c041818281048008011002 differ diff --git a/data/cursors/2870a09082c103050810ffdffffe0204 b/data/cursors/2870a09082c103050810ffdffffe0204 new file mode 100755 index 0000000..4177ecb Binary files /dev/null and b/data/cursors/2870a09082c103050810ffdffffe0204 differ diff --git a/data/cursors/3085a0e285430894940527032f8b26df b/data/cursors/3085a0e285430894940527032f8b26df new file mode 100755 index 0000000..2e29deb Binary files /dev/null and b/data/cursors/3085a0e285430894940527032f8b26df differ diff --git a/data/cursors/38c5dff7c7b8962045400281044508d2 b/data/cursors/38c5dff7c7b8962045400281044508d2 new file mode 100755 index 0000000..66405ad Binary files /dev/null and b/data/cursors/38c5dff7c7b8962045400281044508d2 differ diff --git a/data/cursors/3ecb610c1bf2410f44200f48c40d3599 b/data/cursors/3ecb610c1bf2410f44200f48c40d3599 new file mode 100755 index 0000000..c57bcc3 Binary files /dev/null and b/data/cursors/3ecb610c1bf2410f44200f48c40d3599 differ diff --git a/data/cursors/4498f0e0c1937ffe01fd06f973665830 b/data/cursors/4498f0e0c1937ffe01fd06f973665830 new file mode 100755 index 0000000..8ecd2ef Binary files /dev/null and b/data/cursors/4498f0e0c1937ffe01fd06f973665830 differ diff --git a/data/cursors/50585d75b494802d0151028115016902 b/data/cursors/50585d75b494802d0151028115016902 new file mode 100755 index 0000000..eed3387 Binary files /dev/null and b/data/cursors/50585d75b494802d0151028115016902 differ diff --git a/data/cursors/5aca4d189052212118709018842178c0 b/data/cursors/5aca4d189052212118709018842178c0 new file mode 100755 index 0000000..fd95cf5 Binary files /dev/null and b/data/cursors/5aca4d189052212118709018842178c0 differ diff --git a/data/cursors/5c6cd98b3f3ebcb1f9c7f1c204630408 b/data/cursors/5c6cd98b3f3ebcb1f9c7f1c204630408 new file mode 100755 index 0000000..d28b33a Binary files /dev/null and b/data/cursors/5c6cd98b3f3ebcb1f9c7f1c204630408 differ diff --git a/data/cursors/6407b0e94181790501fd1e167b474872 b/data/cursors/6407b0e94181790501fd1e167b474872 new file mode 100755 index 0000000..e2121a4 Binary files /dev/null and b/data/cursors/6407b0e94181790501fd1e167b474872 differ diff --git a/data/cursors/640fb0e74195791501fd1ed57b41487f b/data/cursors/640fb0e74195791501fd1ed57b41487f new file mode 100755 index 0000000..2e29deb Binary files /dev/null and b/data/cursors/640fb0e74195791501fd1ed57b41487f differ diff --git a/data/cursors/9081237383d90e509aa00f00170e968f b/data/cursors/9081237383d90e509aa00f00170e968f new file mode 100755 index 0000000..8ecd2ef Binary files /dev/null and b/data/cursors/9081237383d90e509aa00f00170e968f differ diff --git a/data/cursors/9116a3ea924ed2162ecab71ba103b17f b/data/cursors/9116a3ea924ed2162ecab71ba103b17f new file mode 100755 index 0000000..c57bcc3 Binary files /dev/null and b/data/cursors/9116a3ea924ed2162ecab71ba103b17f differ diff --git a/data/cursors/9d800788f1b08800ae810202380a0822 b/data/cursors/9d800788f1b08800ae810202380a0822 new file mode 100755 index 0000000..1f0bdbf Binary files /dev/null and b/data/cursors/9d800788f1b08800ae810202380a0822 differ diff --git a/data/cursors/X_cursor b/data/cursors/X_cursor new file mode 100755 index 0000000..bdcdb11 Binary files /dev/null and b/data/cursors/X_cursor differ diff --git a/data/cursors/a2a266d0498c3104214a47bd64ab0fc8 b/data/cursors/a2a266d0498c3104214a47bd64ab0fc8 new file mode 100755 index 0000000..2e29deb Binary files /dev/null and b/data/cursors/a2a266d0498c3104214a47bd64ab0fc8 differ diff --git a/data/cursors/alias b/data/cursors/alias new file mode 100755 index 0000000..2e29deb Binary files /dev/null and b/data/cursors/alias differ diff --git a/data/cursors/all-scroll b/data/cursors/all-scroll new file mode 100755 index 0000000..fd95cf5 Binary files /dev/null and b/data/cursors/all-scroll differ diff --git a/data/cursors/arrow b/data/cursors/arrow new file mode 100755 index 0000000..288e315 Binary files /dev/null and b/data/cursors/arrow differ diff --git a/data/cursors/b66166c04f8c3109214a4fbd64a50fc8 b/data/cursors/b66166c04f8c3109214a4fbd64a50fc8 new file mode 100755 index 0000000..e2121a4 Binary files /dev/null and b/data/cursors/b66166c04f8c3109214a4fbd64a50fc8 differ diff --git a/data/cursors/bd_double_arrow b/data/cursors/bd_double_arrow new file mode 100755 index 0000000..66405ad Binary files /dev/null and b/data/cursors/bd_double_arrow differ diff --git a/data/cursors/bottom_left_corner b/data/cursors/bottom_left_corner new file mode 100755 index 0000000..eed3387 Binary files /dev/null and b/data/cursors/bottom_left_corner differ diff --git a/data/cursors/bottom_right_corner b/data/cursors/bottom_right_corner new file mode 100755 index 0000000..66405ad Binary files /dev/null and b/data/cursors/bottom_right_corner differ diff --git a/data/cursors/bottom_side b/data/cursors/bottom_side new file mode 100755 index 0000000..4177ecb Binary files /dev/null and b/data/cursors/bottom_side differ diff --git a/data/cursors/bottom_tee b/data/cursors/bottom_tee new file mode 100755 index 0000000..d753b3a Binary files /dev/null and b/data/cursors/bottom_tee differ diff --git a/data/cursors/c07385c7190e701020ff7ffffd08103c b/data/cursors/c07385c7190e701020ff7ffffd08103c new file mode 100755 index 0000000..4177ecb Binary files /dev/null and b/data/cursors/c07385c7190e701020ff7ffffd08103c differ diff --git a/data/cursors/c7088f0f3e6c8088236ef8e1e3e70000 b/data/cursors/c7088f0f3e6c8088236ef8e1e3e70000 new file mode 100755 index 0000000..66405ad Binary files /dev/null and b/data/cursors/c7088f0f3e6c8088236ef8e1e3e70000 differ diff --git a/data/cursors/cell b/data/cursors/cell new file mode 100755 index 0000000..1a78b5f Binary files /dev/null and b/data/cursors/cell differ diff --git a/data/cursors/center_ptr b/data/cursors/center_ptr new file mode 100755 index 0000000..bf23cf0 Binary files /dev/null and b/data/cursors/center_ptr differ diff --git a/data/cursors/circle b/data/cursors/circle new file mode 100755 index 0000000..d04dbff Binary files /dev/null and b/data/cursors/circle differ diff --git a/data/cursors/closedhand b/data/cursors/closedhand new file mode 100755 index 0000000..86b6db2 Binary files /dev/null and b/data/cursors/closedhand differ diff --git a/data/cursors/col-resize b/data/cursors/col-resize new file mode 100755 index 0000000..3e9d10e Binary files /dev/null and b/data/cursors/col-resize differ diff --git a/data/cursors/color-picker b/data/cursors/color-picker new file mode 100755 index 0000000..19deabc Binary files /dev/null and b/data/cursors/color-picker differ diff --git a/data/cursors/context-menu b/data/cursors/context-menu new file mode 100755 index 0000000..8593444 Binary files /dev/null and b/data/cursors/context-menu differ diff --git a/data/cursors/copy b/data/cursors/copy new file mode 100755 index 0000000..e2121a4 Binary files /dev/null and b/data/cursors/copy differ diff --git a/data/cursors/cross b/data/cursors/cross new file mode 100755 index 0000000..50757e3 Binary files /dev/null and b/data/cursors/cross differ diff --git a/data/cursors/cross_reverse b/data/cursors/cross_reverse new file mode 100755 index 0000000..e384f78 Binary files /dev/null and b/data/cursors/cross_reverse differ diff --git a/data/cursors/crossed_circle b/data/cursors/crossed_circle new file mode 100755 index 0000000..d04dbff Binary files /dev/null and b/data/cursors/crossed_circle differ diff --git a/data/cursors/crosshair b/data/cursors/crosshair new file mode 100755 index 0000000..e384f78 Binary files /dev/null and b/data/cursors/crosshair differ diff --git a/data/cursors/d9ce0ab605698f320427677b458ad60b b/data/cursors/d9ce0ab605698f320427677b458ad60b new file mode 100755 index 0000000..d28b33a Binary files /dev/null and b/data/cursors/d9ce0ab605698f320427677b458ad60b differ diff --git a/data/cursors/default b/data/cursors/default new file mode 100755 index 0000000..288e315 Binary files /dev/null and b/data/cursors/default differ diff --git a/data/cursors/diamond_cross b/data/cursors/diamond_cross new file mode 100755 index 0000000..e384f78 Binary files /dev/null and b/data/cursors/diamond_cross differ diff --git a/data/cursors/dnd-ask b/data/cursors/dnd-ask new file mode 100755 index 0000000..d28b33a Binary files /dev/null and b/data/cursors/dnd-ask differ diff --git a/data/cursors/dnd-copy b/data/cursors/dnd-copy new file mode 100755 index 0000000..e2121a4 Binary files /dev/null and b/data/cursors/dnd-copy differ diff --git a/data/cursors/dnd-link b/data/cursors/dnd-link new file mode 100755 index 0000000..2e29deb Binary files /dev/null and b/data/cursors/dnd-link differ diff --git a/data/cursors/dnd-move b/data/cursors/dnd-move new file mode 100755 index 0000000..8ecd2ef Binary files /dev/null and b/data/cursors/dnd-move differ diff --git a/data/cursors/dnd-no-drop b/data/cursors/dnd-no-drop new file mode 100755 index 0000000..488150b Binary files /dev/null and b/data/cursors/dnd-no-drop differ diff --git a/data/cursors/dnd-none b/data/cursors/dnd-none new file mode 100755 index 0000000..288e315 Binary files /dev/null and b/data/cursors/dnd-none differ diff --git a/data/cursors/dot b/data/cursors/dot new file mode 100755 index 0000000..08050a3 Binary files /dev/null and b/data/cursors/dot differ diff --git a/data/cursors/dot_box_mask b/data/cursors/dot_box_mask new file mode 100755 index 0000000..08050a3 Binary files /dev/null and b/data/cursors/dot_box_mask differ diff --git a/data/cursors/dotbox b/data/cursors/dotbox new file mode 100755 index 0000000..08050a3 Binary files /dev/null and b/data/cursors/dotbox differ diff --git a/data/cursors/double_arrow b/data/cursors/double_arrow new file mode 100755 index 0000000..4177ecb Binary files /dev/null and b/data/cursors/double_arrow differ diff --git a/data/cursors/down-arrow b/data/cursors/down-arrow new file mode 100755 index 0000000..d5b2b0b Binary files /dev/null and b/data/cursors/down-arrow differ diff --git a/data/cursors/draft b/data/cursors/draft new file mode 100755 index 0000000..2ae908e Binary files /dev/null and b/data/cursors/draft differ diff --git a/data/cursors/draft_large b/data/cursors/draft_large new file mode 100755 index 0000000..fd7420b Binary files /dev/null and b/data/cursors/draft_large differ diff --git a/data/cursors/draft_small b/data/cursors/draft_small new file mode 100755 index 0000000..fd7420b Binary files /dev/null and b/data/cursors/draft_small differ diff --git a/data/cursors/draped_box b/data/cursors/draped_box new file mode 100755 index 0000000..08050a3 Binary files /dev/null and b/data/cursors/draped_box differ diff --git a/data/cursors/e-resize b/data/cursors/e-resize new file mode 100755 index 0000000..b42ca04 Binary files /dev/null and b/data/cursors/e-resize differ diff --git a/data/cursors/e29285e634086352946a0e7090d73106 b/data/cursors/e29285e634086352946a0e7090d73106 new file mode 100755 index 0000000..1f0bdbf Binary files /dev/null and b/data/cursors/e29285e634086352946a0e7090d73106 differ diff --git a/data/cursors/ew-resize b/data/cursors/ew-resize new file mode 100755 index 0000000..b42ca04 Binary files /dev/null and b/data/cursors/ew-resize differ diff --git a/data/cursors/f41c0e382c94c0958e07017e42b00462 b/data/cursors/f41c0e382c94c0958e07017e42b00462 new file mode 100755 index 0000000..eb9ea38 Binary files /dev/null and b/data/cursors/f41c0e382c94c0958e07017e42b00462 differ diff --git a/data/cursors/f41c0e382c97c0938e07017e42800402 b/data/cursors/f41c0e382c97c0938e07017e42800402 new file mode 100755 index 0000000..6fed83c Binary files /dev/null and b/data/cursors/f41c0e382c97c0938e07017e42800402 differ diff --git a/data/cursors/fcf1c3c7cd4491d801f1e1c78f100000 b/data/cursors/fcf1c3c7cd4491d801f1e1c78f100000 new file mode 100755 index 0000000..eed3387 Binary files /dev/null and b/data/cursors/fcf1c3c7cd4491d801f1e1c78f100000 differ diff --git a/data/cursors/fcf21c00b30f7e3f83fe0dfd12e71cff b/data/cursors/fcf21c00b30f7e3f83fe0dfd12e71cff new file mode 100755 index 0000000..8ecd2ef Binary files /dev/null and b/data/cursors/fcf21c00b30f7e3f83fe0dfd12e71cff differ diff --git a/data/cursors/fd_double_arrow b/data/cursors/fd_double_arrow new file mode 100755 index 0000000..eed3387 Binary files /dev/null and b/data/cursors/fd_double_arrow differ diff --git a/data/cursors/fleur b/data/cursors/fleur new file mode 100755 index 0000000..fd95cf5 Binary files /dev/null and b/data/cursors/fleur differ diff --git a/data/cursors/forbidden b/data/cursors/forbidden new file mode 100755 index 0000000..488150b Binary files /dev/null and b/data/cursors/forbidden differ diff --git a/data/cursors/grab b/data/cursors/grab new file mode 100755 index 0000000..fd95cf5 Binary files /dev/null and b/data/cursors/grab differ diff --git a/data/cursors/grabbing b/data/cursors/grabbing new file mode 100755 index 0000000..86b6db2 Binary files /dev/null and b/data/cursors/grabbing differ diff --git a/data/cursors/h_double_arrow b/data/cursors/h_double_arrow new file mode 100755 index 0000000..b42ca04 Binary files /dev/null and b/data/cursors/h_double_arrow differ diff --git a/data/cursors/half-busy b/data/cursors/half-busy new file mode 100755 index 0000000..c57bcc3 Binary files /dev/null and b/data/cursors/half-busy differ diff --git a/data/cursors/hand b/data/cursors/hand new file mode 100755 index 0000000..1f0bdbf Binary files /dev/null and b/data/cursors/hand differ diff --git a/data/cursors/hand1 b/data/cursors/hand1 new file mode 100755 index 0000000..fd95cf5 Binary files /dev/null and b/data/cursors/hand1 differ diff --git a/data/cursors/hand2 b/data/cursors/hand2 new file mode 100755 index 0000000..1f0bdbf Binary files /dev/null and b/data/cursors/hand2 differ diff --git a/data/cursors/help b/data/cursors/help new file mode 100755 index 0000000..d28b33a Binary files /dev/null and b/data/cursors/help differ diff --git a/data/cursors/ibeam b/data/cursors/ibeam new file mode 100755 index 0000000..ba5ea69 Binary files /dev/null and b/data/cursors/ibeam differ diff --git a/data/cursors/icon b/data/cursors/icon new file mode 100755 index 0000000..08050a3 Binary files /dev/null and b/data/cursors/icon differ diff --git a/data/cursors/left-arrow b/data/cursors/left-arrow new file mode 100755 index 0000000..99dec48 Binary files /dev/null and b/data/cursors/left-arrow differ diff --git a/data/cursors/left_ptr b/data/cursors/left_ptr new file mode 100755 index 0000000..288e315 Binary files /dev/null and b/data/cursors/left_ptr differ diff --git a/data/cursors/left_ptr_help b/data/cursors/left_ptr_help new file mode 100755 index 0000000..d28b33a Binary files /dev/null and b/data/cursors/left_ptr_help differ diff --git a/data/cursors/left_ptr_watch b/data/cursors/left_ptr_watch new file mode 100755 index 0000000..c57bcc3 Binary files /dev/null and b/data/cursors/left_ptr_watch differ diff --git a/data/cursors/left_side b/data/cursors/left_side new file mode 100755 index 0000000..b42ca04 Binary files /dev/null and b/data/cursors/left_side differ diff --git a/data/cursors/left_tee b/data/cursors/left_tee new file mode 100755 index 0000000..c70ea69 Binary files /dev/null and b/data/cursors/left_tee differ diff --git a/data/cursors/link b/data/cursors/link new file mode 100755 index 0000000..2e29deb Binary files /dev/null and b/data/cursors/link differ diff --git a/data/cursors/ll_angle b/data/cursors/ll_angle new file mode 100755 index 0000000..b71f9ab Binary files /dev/null and b/data/cursors/ll_angle differ diff --git a/data/cursors/lr_angle b/data/cursors/lr_angle new file mode 100755 index 0000000..82f8006 Binary files /dev/null and b/data/cursors/lr_angle differ diff --git a/data/cursors/move b/data/cursors/move new file mode 100755 index 0000000..8ecd2ef Binary files /dev/null and b/data/cursors/move differ diff --git a/data/cursors/n-resize b/data/cursors/n-resize new file mode 100755 index 0000000..4177ecb Binary files /dev/null and b/data/cursors/n-resize differ diff --git a/data/cursors/ne-resize b/data/cursors/ne-resize new file mode 100755 index 0000000..eed3387 Binary files /dev/null and b/data/cursors/ne-resize differ diff --git a/data/cursors/nesw-resize b/data/cursors/nesw-resize new file mode 100755 index 0000000..eed3387 Binary files /dev/null and b/data/cursors/nesw-resize differ diff --git a/data/cursors/no-drop b/data/cursors/no-drop new file mode 100755 index 0000000..488150b Binary files /dev/null and b/data/cursors/no-drop differ diff --git a/data/cursors/not-allowed b/data/cursors/not-allowed new file mode 100755 index 0000000..4f781f1 Binary files /dev/null and b/data/cursors/not-allowed differ diff --git a/data/cursors/ns-resize b/data/cursors/ns-resize new file mode 100755 index 0000000..4177ecb Binary files /dev/null and b/data/cursors/ns-resize differ diff --git a/data/cursors/nw-resize b/data/cursors/nw-resize new file mode 100755 index 0000000..66405ad Binary files /dev/null and b/data/cursors/nw-resize differ diff --git a/data/cursors/nwse-resize b/data/cursors/nwse-resize new file mode 100755 index 0000000..66405ad Binary files /dev/null and b/data/cursors/nwse-resize differ diff --git a/data/cursors/openhand b/data/cursors/openhand new file mode 100755 index 0000000..fd95cf5 Binary files /dev/null and b/data/cursors/openhand differ diff --git a/data/cursors/pencil b/data/cursors/pencil new file mode 100755 index 0000000..2ae908e Binary files /dev/null and b/data/cursors/pencil differ diff --git a/data/cursors/pirate b/data/cursors/pirate new file mode 100755 index 0000000..6cbf117 Binary files /dev/null and b/data/cursors/pirate differ diff --git a/data/cursors/plus b/data/cursors/plus new file mode 100755 index 0000000..41fa295 Binary files /dev/null and b/data/cursors/plus differ diff --git a/data/cursors/pointer b/data/cursors/pointer new file mode 100755 index 0000000..1f0bdbf Binary files /dev/null and b/data/cursors/pointer differ diff --git a/data/cursors/pointer-move b/data/cursors/pointer-move new file mode 100755 index 0000000..8ecd2ef Binary files /dev/null and b/data/cursors/pointer-move differ diff --git a/data/cursors/pointing_hand b/data/cursors/pointing_hand new file mode 100755 index 0000000..1f0bdbf Binary files /dev/null and b/data/cursors/pointing_hand differ diff --git a/data/cursors/progress b/data/cursors/progress new file mode 100755 index 0000000..c57bcc3 Binary files /dev/null and b/data/cursors/progress differ diff --git a/data/cursors/question_arrow b/data/cursors/question_arrow new file mode 100755 index 0000000..23751e7 Binary files /dev/null and b/data/cursors/question_arrow differ diff --git a/data/cursors/right-arrow b/data/cursors/right-arrow new file mode 100755 index 0000000..60f67d8 Binary files /dev/null and b/data/cursors/right-arrow differ diff --git a/data/cursors/right_ptr b/data/cursors/right_ptr new file mode 100755 index 0000000..fd7420b Binary files /dev/null and b/data/cursors/right_ptr differ diff --git a/data/cursors/right_side b/data/cursors/right_side new file mode 100755 index 0000000..b42ca04 Binary files /dev/null and b/data/cursors/right_side differ diff --git a/data/cursors/right_tee b/data/cursors/right_tee new file mode 100755 index 0000000..01c6cc2 Binary files /dev/null and b/data/cursors/right_tee differ diff --git a/data/cursors/row-resize b/data/cursors/row-resize new file mode 100755 index 0000000..b55696b Binary files /dev/null and b/data/cursors/row-resize differ diff --git a/data/cursors/s-resize b/data/cursors/s-resize new file mode 100755 index 0000000..4177ecb Binary files /dev/null and b/data/cursors/s-resize differ diff --git a/data/cursors/sb_down_arrow b/data/cursors/sb_down_arrow new file mode 100755 index 0000000..d5b2b0b Binary files /dev/null and b/data/cursors/sb_down_arrow differ diff --git a/data/cursors/sb_h_double_arrow b/data/cursors/sb_h_double_arrow new file mode 100755 index 0000000..b42ca04 Binary files /dev/null and b/data/cursors/sb_h_double_arrow differ diff --git a/data/cursors/sb_left_arrow b/data/cursors/sb_left_arrow new file mode 100755 index 0000000..99dec48 Binary files /dev/null and b/data/cursors/sb_left_arrow differ diff --git a/data/cursors/sb_right_arrow b/data/cursors/sb_right_arrow new file mode 100755 index 0000000..60f67d8 Binary files /dev/null and b/data/cursors/sb_right_arrow differ diff --git a/data/cursors/sb_up_arrow b/data/cursors/sb_up_arrow new file mode 100755 index 0000000..bf23cf0 Binary files /dev/null and b/data/cursors/sb_up_arrow differ diff --git a/data/cursors/sb_v_double_arrow b/data/cursors/sb_v_double_arrow new file mode 100755 index 0000000..4177ecb Binary files /dev/null and b/data/cursors/sb_v_double_arrow differ diff --git a/data/cursors/se-resize b/data/cursors/se-resize new file mode 100755 index 0000000..66405ad Binary files /dev/null and b/data/cursors/se-resize differ diff --git a/data/cursors/size_all b/data/cursors/size_all new file mode 100755 index 0000000..86b6db2 Binary files /dev/null and b/data/cursors/size_all differ diff --git a/data/cursors/size_bdiag b/data/cursors/size_bdiag new file mode 100755 index 0000000..eed3387 Binary files /dev/null and b/data/cursors/size_bdiag differ diff --git a/data/cursors/size_fdiag b/data/cursors/size_fdiag new file mode 100755 index 0000000..66405ad Binary files /dev/null and b/data/cursors/size_fdiag differ diff --git a/data/cursors/size_hor b/data/cursors/size_hor new file mode 100755 index 0000000..b42ca04 Binary files /dev/null and b/data/cursors/size_hor differ diff --git a/data/cursors/size_ver b/data/cursors/size_ver new file mode 100755 index 0000000..4177ecb Binary files /dev/null and b/data/cursors/size_ver differ diff --git a/data/cursors/split_h b/data/cursors/split_h new file mode 100755 index 0000000..3e9d10e Binary files /dev/null and b/data/cursors/split_h differ diff --git a/data/cursors/split_v b/data/cursors/split_v new file mode 100755 index 0000000..b55696b Binary files /dev/null and b/data/cursors/split_v differ diff --git a/data/cursors/sw-resize b/data/cursors/sw-resize new file mode 100755 index 0000000..eed3387 Binary files /dev/null and b/data/cursors/sw-resize differ diff --git a/data/cursors/target b/data/cursors/target new file mode 100755 index 0000000..08050a3 Binary files /dev/null and b/data/cursors/target differ diff --git a/data/cursors/tcross b/data/cursors/tcross new file mode 100755 index 0000000..439e264 Binary files /dev/null and b/data/cursors/tcross differ diff --git a/data/cursors/text b/data/cursors/text new file mode 100755 index 0000000..ba5ea69 Binary files /dev/null and b/data/cursors/text differ diff --git a/data/cursors/top_left_arrow b/data/cursors/top_left_arrow new file mode 100755 index 0000000..288e315 Binary files /dev/null and b/data/cursors/top_left_arrow differ diff --git a/data/cursors/top_left_corner b/data/cursors/top_left_corner new file mode 100755 index 0000000..66405ad Binary files /dev/null and b/data/cursors/top_left_corner differ diff --git a/data/cursors/top_right_corner b/data/cursors/top_right_corner new file mode 100755 index 0000000..eed3387 Binary files /dev/null and b/data/cursors/top_right_corner differ diff --git a/data/cursors/top_side b/data/cursors/top_side new file mode 100755 index 0000000..4177ecb Binary files /dev/null and b/data/cursors/top_side differ diff --git a/data/cursors/top_tee b/data/cursors/top_tee new file mode 100755 index 0000000..237ff3d Binary files /dev/null and b/data/cursors/top_tee differ diff --git a/data/cursors/ul_angle b/data/cursors/ul_angle new file mode 100755 index 0000000..2ff1b7b Binary files /dev/null and b/data/cursors/ul_angle differ diff --git a/data/cursors/up-arrow b/data/cursors/up-arrow new file mode 100755 index 0000000..bf23cf0 Binary files /dev/null and b/data/cursors/up-arrow differ diff --git a/data/cursors/ur_angle b/data/cursors/ur_angle new file mode 100755 index 0000000..fc35c73 Binary files /dev/null and b/data/cursors/ur_angle differ diff --git a/data/cursors/v_double_arrow b/data/cursors/v_double_arrow new file mode 100755 index 0000000..4177ecb Binary files /dev/null and b/data/cursors/v_double_arrow differ diff --git a/data/cursors/vertical-text b/data/cursors/vertical-text new file mode 100755 index 0000000..eb7cbf1 Binary files /dev/null and b/data/cursors/vertical-text differ diff --git a/data/cursors/w-resize b/data/cursors/w-resize new file mode 100755 index 0000000..b42ca04 Binary files /dev/null and b/data/cursors/w-resize differ diff --git a/data/cursors/wait b/data/cursors/wait new file mode 100755 index 0000000..0285637 Binary files /dev/null and b/data/cursors/wait differ diff --git a/data/cursors/watch b/data/cursors/watch new file mode 100755 index 0000000..0285637 Binary files /dev/null and b/data/cursors/watch differ diff --git a/data/cursors/whats_this b/data/cursors/whats_this new file mode 100755 index 0000000..23751e7 Binary files /dev/null and b/data/cursors/whats_this differ diff --git a/data/cursors/xterm b/data/cursors/xterm new file mode 100755 index 0000000..ba5ea69 Binary files /dev/null and b/data/cursors/xterm differ diff --git a/data/cursors/zoom-in b/data/cursors/zoom-in new file mode 100755 index 0000000..eb9ea38 Binary files /dev/null and b/data/cursors/zoom-in differ diff --git a/data/cursors/zoom-out b/data/cursors/zoom-out new file mode 100755 index 0000000..6fed83c Binary files /dev/null and b/data/cursors/zoom-out differ diff --git a/data/index.theme b/data/index.theme new file mode 100755 index 0000000..61767af --- /dev/null +++ b/data/index.theme @@ -0,0 +1,4 @@ +[Icon Theme] +Name=MOYASH-Pixel-Purple-vr11 +Inherits="hicolor" + diff --git a/data/issue b/data/issue new file mode 100644 index 0000000..e240ae4 --- /dev/null +++ b/data/issue @@ -0,0 +1 @@ +welcome to minceraft os dude diff --git a/data/minceraft/UltimMC b/data/minceraft/UltimMC new file mode 100755 index 0000000..4788c5e --- /dev/null +++ b/data/minceraft/UltimMC @@ -0,0 +1,94 @@ +#!/bin/bash +# Basic start script for running the launcher with the libs packaged with it. + +function printerror { + printf "$1" + if which zenity >/dev/null; then zenity --error --text="$1" &>/dev/null; + elif which kdialog >/dev/null; then kdialog --error "$1" &>/dev/null; + fi +} + +if [[ $EUID -eq 0 ]]; then + printerror "This program should not be run using sudo or as the root user!\n" + exit 1 +fi + + +LAUNCHER_NAME=UltimMC +LAUNCHER_DIR="$(dirname "$(readlink -f "$0")")" +echo "Launcher Dir: ${LAUNCHER_DIR}" + +# Set up env - filter out input LD_ variables but pass them in under different names +export GAME_LIBRARY_PATH=${GAME_LIBRARY_PATH-${LD_LIBRARY_PATH}} +export GAME_PRELOAD=${GAME_PRELOAD-${LD_PRELOAD}} +export LD_LIBRARY_PATH="${LAUNCHER_DIR}/bin":$LAUNCHER_LIBRARY_PATH +export LD_PRELOAD=$LAUNCHER_PRELOAD +export QT_PLUGIN_PATH="${LAUNCHER_DIR}/plugins" +export QT_FONTPATH="${LAUNCHER_DIR}/fonts" + +# Detect missing dependencies... +DEPS_LIST=`ldd "${LAUNCHER_DIR}"/plugins/*/*.so 2>/dev/null | grep "not found" | sort -u | awk -vORS=", " '{ print $1 }'` +if [ "x$DEPS_LIST" = "x" ]; then + # We have all our dependencies. Run the launcher. + echo "No missing dependencies found." + + # Just to be sure... + chmod +x "${LAUNCHER_DIR}/bin/${LAUNCHER_NAME}" + + # Run the launcher + exec -a "${LAUNCHER_DIR}/${LAUNCHER_NAME}" "${LAUNCHER_DIR}/bin/${LAUNCHER_NAME}" -d "${LAUNCHER_DIR}" "$@" + + # Run the launcher in valgrind + # valgrind --log-file="valgrind.log" --leak-check=full --track-origins=yes "${LAUNCHER_DIR}/bin/${LAUNCHER_NAME}" -d "${LAUNCHER_DIR}" "$@" + + # Run the launcher with callgrind, delay instrumentation + # valgrind --log-file="valgrind.log" --tool=callgrind --instr-atstart=no "${LAUNCHER_DIR}/bin/${LAUNCHER_NAME}" -d "${LAUNCHER_DIR}" "$@" + # use callgrind_control -i on/off to profile actions + + # Exit with launcher's exit code. + # exit $? +else + # apt + if which apt-file &>/dev/null; then + LIBRARIES=`echo "$DEPS_LIST" | grep -oP "[^, ]*" | sort -u` + COMMAND_LIBS=`for LIBRARY in $LIBRARIES; do apt-file -l search $LIBRARY; done` + COMMAND_LIBS=`echo "$COMMAND_LIBS" | sort -u | awk -vORS=" " '{ print $1 }'` + INSTALL_CMD="sudo apt-get install $COMMAND_LIBS" + # pacman + elif which pkgfile &>/dev/null; then + LIBRARIES=`echo "$DEPS_LIST" | grep -oP "[^, ]*" | sort -u` + COMMAND_LIBS=`for LIBRARY in $LIBRARIES; do pkgfile $LIBRARY; done` + COMMAND_LIBS=`echo "$COMMAND_LIBS" | sort -u | awk -vORS=" " '{ print $1 }'` + INSTALL_CMD="sudo pacman -S $COMMAND_LIBS" + # dnf + elif which dnf &>/dev/null; then + LIBRARIES=`echo "$DEPS_LIST" | grep -oP "[^, ]*" | sort -u` + COMMAND_LIBS=`for LIBRARY in $LIBRARIES; do dnf whatprovides -q $LIBRARY; done` + COMMAND_LIBS=`echo "$COMMAND_LIBS" | grep -v 'Repo' | sort -u | awk -vORS=" " '{ print $1 }'` + INSTALL_CMD="sudo dnf install $COMMAND_LIBS" + # yum + elif which yum &>/dev/null; then + LIBRARIES=`echo "$DEPS_LIST" | grep -oP "[^, ]*" | sort -u` + COMMAND_LIBS=`for LIBRARY in $LIBRARIES; do yum whatprovides $LIBRARY; done` + COMMAND_LIBS=`echo "$COMMAND_LIBS" | sort -u | awk -vORS=" " '{ print $1 }'` + INSTALL_CMD="sudo yum install $COMMAND_LIBS" + # zypper + elif which zypper &>/dev/null; then + LIBRARIES=`echo "$DEPS_LIST" | grep -oP "[^, ]*" | sort -u` + COMMAND_LIBS=`for LIBRARY in $LIBRARIES; do zypper wp $LIBRARY; done` + COMMAND_LIBS=`echo "$COMMAND_LIBS" | sort -u | awk -vORS=" " '{ print $1 }'` + INSTALL_CMD="sudo zypper install $COMMAND_LIBS" + # emerge + elif which pfl &>/dev/null; then + LIBRARIES=`echo "$DEPS_LIST" | grep -oP "[^, ]*" | sort -u` + COMMAND_LIBS=`for LIBRARY in $LIBRARIES; do pfl $LIBRARY; done` + COMMAND_LIBS=`echo "$COMMAND_LIBS" | sort -u | awk -vORS=" " '{ print $1 }'` + INSTALL_CMD="sudo emerge $COMMAND_LIBS" + fi + + MESSAGE="Error: The launcher is missing the following libraries that it needs to work correctly:\n\t${DEPS_LIST}\nPlease install them from your distribution's package manager." + MESSAGE="$MESSAGE\n\nHint (please apply common sense): $INSTALL_CMD\n" + + printerror "$MESSAGE" + exit 1 +fi diff --git a/data/minceraft/accounts.json b/data/minceraft/accounts.json new file mode 100644 index 0000000..7932612 --- /dev/null +++ b/data/minceraft/accounts.json @@ -0,0 +1,31 @@ +{ + "accounts": [ + { + "active": true, + "entitlement": { + "canPlayMinecraft": true, + "ownsMinecraft": true + }, + "profile": { + "capes": [ + ], + "id": "5627dd98e6be3c21b8a8e92344183641", + "name": "Steve", + "skin": { + "id": "", + "url": "", + "variant": "" + } + }, + "type": "Local", + "ygg": { + "extra": { + "clientToken": "08db5b7f52414da9acae79e23aa07e63", + "userName": "Steve" + }, + "iat": 1741787232 + } + } + ], + "formatVersion": 3 +} diff --git a/data/minceraft/bin/UltimMC b/data/minceraft/bin/UltimMC new file mode 100755 index 0000000..a39756e Binary files /dev/null and b/data/minceraft/bin/UltimMC differ diff --git a/data/minceraft/bin/jars/JavaCheck.jar b/data/minceraft/bin/jars/JavaCheck.jar new file mode 100755 index 0000000..4566498 Binary files /dev/null and b/data/minceraft/bin/jars/JavaCheck.jar differ diff --git a/data/minceraft/bin/jars/NewLaunch.jar b/data/minceraft/bin/jars/NewLaunch.jar new file mode 100755 index 0000000..ac2937f Binary files /dev/null and b/data/minceraft/bin/jars/NewLaunch.jar differ diff --git a/data/minceraft/bin/libLauncher_iconfix.so b/data/minceraft/bin/libLauncher_iconfix.so new file mode 100755 index 0000000..4b89fcb Binary files /dev/null and b/data/minceraft/bin/libLauncher_iconfix.so differ diff --git a/data/minceraft/bin/libLauncher_nbt++.so b/data/minceraft/bin/libLauncher_nbt++.so new file mode 100755 index 0000000..1b2300c Binary files /dev/null and b/data/minceraft/bin/libLauncher_nbt++.so differ diff --git a/data/minceraft/bin/libLauncher_quazip.so b/data/minceraft/bin/libLauncher_quazip.so new file mode 100755 index 0000000..ec2fc5a Binary files /dev/null and b/data/minceraft/bin/libLauncher_quazip.so differ diff --git a/data/minceraft/bin/libLauncher_rainbow.so b/data/minceraft/bin/libLauncher_rainbow.so new file mode 100755 index 0000000..3f5835e Binary files /dev/null and b/data/minceraft/bin/libLauncher_rainbow.so differ diff --git a/data/minceraft/instances/1.21.4/.minecraft/authlib-injector.log b/data/minceraft/instances/1.21.4/.minecraft/authlib-injector.log new file mode 100755 index 0000000..5b6d1da --- /dev/null +++ b/data/minceraft/instances/1.21.4/.minecraft/authlib-injector.log @@ -0,0 +1,25 @@ +Logging started at 2025-03-12T16:15:19.881952392Z +[authlib-injector] [INFO] Version: 1.2.5 +[authlib-injector] [INFO] Authentication server: http://127.0.0.1:44095 +[authlib-injector] [WARNING] You are using HTTP protocol, which is INSECURE! Please switch to HTTPS if possible. +[authlib-injector] [INFO] Transformed [net.minecraft.client.main.Main] with [Main Arguments Transformer] +[authlib-injector] [INFO] Transformed [com.mojang.authlib.properties.Property] with [Yggdrasil Public Key Transformer] +[authlib-injector] [INFO] Transformed [com.mojang.authlib.HttpAuthenticationService] with [ConcatenateURL Workaround] +[authlib-injector] [INFO] Httpd is running on port 37783 +[authlib-injector] [INFO] Transformed [com.mojang.authlib.yggdrasil.YggdrasilEnvironment] with [Constant URL Transformer] +[authlib-injector] [INFO] Transformed [com.mojang.authlib.yggdrasil.YggdrasilServicesKeyInfo] with [Yggdrasil Public Key Transformer] +[authlib-injector] [WARNING] An error occurred while processing request [/https/sessionserver.mojang.com/session/minecraft/profile/5627dd98e6be3c21b8a8e92344183641] +java.io.UncheckedIOException: java.io.FileNotFoundException: http://127.0.0.1:44095/sessionserver/session/minecraft/profile/5627dd98e6be3c21b8a8e92344183641?unsigned=false + at moe.yushi.authlibinjector.yggdrasil.YggdrasilClient.queryProfile(YggdrasilClient.java:92) + at moe.yushi.authlibinjector.httpd.QueryProfileFilter.handle(QueryProfileFilter.java:82) + at moe.yushi.authlibinjector.httpd.URLProcessor$1.serve(URLProcessor.java:142) + at moe.yushi.authlibinjector.internal.fi.iki.elonen.HTTPSession.execute(HTTPSession.java:246) + at moe.yushi.authlibinjector.internal.fi.iki.elonen.NanoHTTPD$ClientHandler.run(NanoHTTPD.java:104) + at java.base/java.lang.Thread.run(Thread.java:1583) +Caused by: java.io.FileNotFoundException: http://127.0.0.1:44095/sessionserver/session/minecraft/profile/5627dd98e6be3c21b8a8e92344183641?unsigned=false + at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:2009) + at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1614) + at moe.yushi.authlibinjector.util.IOUtils.http(IOUtils.java:49) + at moe.yushi.authlibinjector.yggdrasil.YggdrasilClient.queryProfile(YggdrasilClient.java:90) + ... 5 more + diff --git a/data/minceraft/instances/1.21.4/.minecraft/downloads/log.json b/data/minceraft/instances/1.21.4/.minecraft/downloads/log.json new file mode 100755 index 0000000..e69de29 diff --git a/data/minceraft/instances/1.21.4/.minecraft/icon.png b/data/minceraft/instances/1.21.4/.minecraft/icon.png new file mode 100755 index 0000000..f601a9a Binary files /dev/null and b/data/minceraft/instances/1.21.4/.minecraft/icon.png differ diff --git a/data/minceraft/instances/1.21.4/.minecraft/options.txt b/data/minceraft/instances/1.21.4/.minecraft/options.txt new file mode 100644 index 0000000..5e2a6cc --- /dev/null +++ b/data/minceraft/instances/1.21.4/.minecraft/options.txt @@ -0,0 +1,142 @@ +version:4189 +ao:true +biomeBlendRadius:2 +enableVsync:true +entityDistanceScaling:1.0 +entityShadows:true +forceUnicodeFont:false +japaneseGlyphVariants:false +fov:0.0 +fovEffectScale:1.0 +darknessEffectScale:1.0 +glintSpeed:0.5 +glintStrength:0.75 +prioritizeChunkUpdates:0 +fullscreen:true +gamma:0.5 +graphicsMode:1 +guiScale:0 +maxFps:120 +inactivityFpsLimit:"afk" +mipmapLevels:4 +narrator:0 +particles:0 +reducedDebugInfo:false +renderClouds:"true" +renderDistance:12 +simulationDistance:12 +screenEffectScale:1.0 +soundDevice:"" +autoJump:false +rotateWithMinecart:false +operatorItemsTab:false +autoSuggestions:true +chatColors:true +chatLinks:true +chatLinksPrompt:true +discrete_mouse_scroll:false +invertYMouse:false +realmsNotifications:true +showSubtitles:false +directionalAudio:false +touchscreen:false +bobView:true +toggleCrouch:false +toggleSprint:false +darkMojangStudiosBackground:false +hideLightningFlashes:false +hideSplashTexts:false +mouseSensitivity:0.5 +damageTiltStrength:1.0 +highContrast:false +highContrastBlockOutline:false +narratorHotkey:true +resourcePacks:[] +incompatibleResourcePacks:[] +lastServer: +lang:en_us +chatVisibility:0 +chatOpacity:1.0 +chatLineSpacing:0.0 +textBackgroundOpacity:0.5 +backgroundForChatOnly:true +hideServerAddress:false +advancedItemTooltips:false +pauseOnLostFocus:true +overrideWidth:0 +overrideHeight:0 +chatHeightFocused:1.0 +chatDelay:0.0 +chatHeightUnfocused:0.4375 +chatScale:1.0 +chatWidth:1.0 +notificationDisplayTime:1.0 +useNativeTransport:true +mainHand:"right" +attackIndicator:1 +tutorialStep:movement +mouseWheelSensitivity:1.0 +rawMouseInput:true +glDebugVerbosity:1 +skipMultiplayerWarning:false +hideMatchedNames:true +joinedFirstServer:false +syncChunkWrites:false +showAutosaveIndicator:true +allowServerListing:true +onlyShowSecureChat:false +panoramaScrollSpeed:1.0 +telemetryOptInExtra:false +onboardAccessibility:false +menuBackgroundBlurriness:5 +key_key.attack:key.mouse.left +key_key.use:key.mouse.right +key_key.forward:key.keyboard.w +key_key.left:key.keyboard.a +key_key.back:key.keyboard.s +key_key.right:key.keyboard.d +key_key.jump:key.keyboard.space +key_key.sneak:key.keyboard.left.shift +key_key.sprint:key.keyboard.left.control +key_key.drop:key.keyboard.q +key_key.inventory:key.keyboard.e +key_key.chat:key.keyboard.t +key_key.playerlist:key.keyboard.tab +key_key.pickItem:key.mouse.middle +key_key.command:key.keyboard.slash +key_key.socialInteractions:key.keyboard.p +key_key.screenshot:key.keyboard.f2 +key_key.togglePerspective:key.keyboard.f5 +key_key.smoothCamera:key.keyboard.unknown +key_key.fullscreen:key.keyboard.f11 +key_key.spectatorOutlines:key.keyboard.unknown +key_key.swapOffhand:key.keyboard.f +key_key.saveToolbarActivator:key.keyboard.c +key_key.loadToolbarActivator:key.keyboard.x +key_key.advancements:key.keyboard.l +key_key.hotbar.1:key.keyboard.1 +key_key.hotbar.2:key.keyboard.2 +key_key.hotbar.3:key.keyboard.3 +key_key.hotbar.4:key.keyboard.4 +key_key.hotbar.5:key.keyboard.5 +key_key.hotbar.6:key.keyboard.6 +key_key.hotbar.7:key.keyboard.7 +key_key.hotbar.8:key.keyboard.8 +key_key.hotbar.9:key.keyboard.9 +soundCategory_master:1.0 +soundCategory_music:1.0 +soundCategory_record:1.0 +soundCategory_weather:1.0 +soundCategory_block:1.0 +soundCategory_hostile:1.0 +soundCategory_neutral:1.0 +soundCategory_player:1.0 +soundCategory_ambient:1.0 +soundCategory_voice:1.0 +modelPart_cape:true +modelPart_jacket:true +modelPart_left_sleeve:true +modelPart_right_sleeve:true +modelPart_left_pants_leg:true +modelPart_right_pants_leg:true +modelPart_hat:true diff --git a/data/minceraft/instances/1.21.4/instance.cfg b/data/minceraft/instances/1.21.4/instance.cfg new file mode 100755 index 0000000..bc446f0 --- /dev/null +++ b/data/minceraft/instances/1.21.4/instance.cfg @@ -0,0 +1,33 @@ +ForgeVersion= +InstanceType=OneSix +IntendedVersion= +JavaPath=/usr/lib64/jvm/openjdk21/bin/java +JoinServerOnLaunch=true +JoinServerOnLaunchAddress= +JoinSingleplayerWorldOnLaunch=false +JoinWorldOnLaunch=false +LWJGLVersion= +LiteloaderVersion= +LogPrePostOutput=true +MCLaunchMethod=LauncherPart +ManagedPack=false +ManagedPackID= +ManagedPackName= +ManagedPackType= +ManagedPackVersionID= +ManagedPackVersionName= +OverrideCommands=false +OverrideConsole=false +OverrideGameTime=false +OverrideJavaArgs=false +OverrideJavaLocation=true +OverrideMCLaunchMethod=false +OverrideMemory=false +OverrideNativeWorkarounds=false +OverrideWindow=false +iconKey=default +lastLaunchTime=1741796119722 +lastTimePlayed=94 +name=1.21.4 +notes= +totalTimePlayed=584 diff --git a/data/minceraft/instances/1.21.4/mmc-pack.json b/data/minceraft/instances/1.21.4/mmc-pack.json new file mode 100755 index 0000000..b2759f3 --- /dev/null +++ b/data/minceraft/instances/1.21.4/mmc-pack.json @@ -0,0 +1,12 @@ +{ + "components": [ + { + "cachedName": "Minecraft", + "cachedVersion": "1.21.4", + "important": true, + "uid": "net.minecraft", + "version": "1.21.4" + } + ], + "formatVersion": 1 +} diff --git a/data/minceraft/instances/instgroups.json b/data/minceraft/instances/instgroups.json new file mode 100755 index 0000000..5ee8ee1 --- /dev/null +++ b/data/minceraft/instances/instgroups.json @@ -0,0 +1,5 @@ +{ + "formatVersion": "1", + "groups": { + } +} diff --git a/data/minceraft/libraries/com/fasterxml/jackson/core/jackson-annotations/2.13.4/jackson-annotations-2.13.4.jar b/data/minceraft/libraries/com/fasterxml/jackson/core/jackson-annotations/2.13.4/jackson-annotations-2.13.4.jar new file mode 100755 index 0000000..0c5e9c1 Binary files /dev/null and b/data/minceraft/libraries/com/fasterxml/jackson/core/jackson-annotations/2.13.4/jackson-annotations-2.13.4.jar differ diff --git a/data/minceraft/libraries/com/fasterxml/jackson/core/jackson-core/2.13.4/jackson-core-2.13.4.jar b/data/minceraft/libraries/com/fasterxml/jackson/core/jackson-core/2.13.4/jackson-core-2.13.4.jar new file mode 100755 index 0000000..0cb7a37 Binary files /dev/null and b/data/minceraft/libraries/com/fasterxml/jackson/core/jackson-core/2.13.4/jackson-core-2.13.4.jar differ diff --git a/data/minceraft/libraries/com/fasterxml/jackson/core/jackson-databind/2.13.4.2/jackson-databind-2.13.4.2.jar b/data/minceraft/libraries/com/fasterxml/jackson/core/jackson-databind/2.13.4.2/jackson-databind-2.13.4.2.jar new file mode 100755 index 0000000..5b653d6 Binary files /dev/null and b/data/minceraft/libraries/com/fasterxml/jackson/core/jackson-databind/2.13.4.2/jackson-databind-2.13.4.2.jar differ diff --git a/data/minceraft/libraries/com/github/oshi/oshi-core/6.6.5/oshi-core-6.6.5.jar b/data/minceraft/libraries/com/github/oshi/oshi-core/6.6.5/oshi-core-6.6.5.jar new file mode 100755 index 0000000..53775a5 Binary files /dev/null and b/data/minceraft/libraries/com/github/oshi/oshi-core/6.6.5/oshi-core-6.6.5.jar differ diff --git a/data/minceraft/libraries/com/github/stephenc/jcip/jcip-annotations/1.0-1/jcip-annotations-1.0-1.jar b/data/minceraft/libraries/com/github/stephenc/jcip/jcip-annotations/1.0-1/jcip-annotations-1.0-1.jar new file mode 100755 index 0000000..edfda76 Binary files /dev/null and b/data/minceraft/libraries/com/github/stephenc/jcip/jcip-annotations/1.0-1/jcip-annotations-1.0-1.jar differ diff --git a/data/minceraft/libraries/com/google/code/gson/gson/2.11.0/gson-2.11.0.jar b/data/minceraft/libraries/com/google/code/gson/gson/2.11.0/gson-2.11.0.jar new file mode 100755 index 0000000..18e59c8 Binary files /dev/null and b/data/minceraft/libraries/com/google/code/gson/gson/2.11.0/gson-2.11.0.jar differ diff --git a/data/minceraft/libraries/com/google/guava/failureaccess/1.0.2/failureaccess-1.0.2.jar b/data/minceraft/libraries/com/google/guava/failureaccess/1.0.2/failureaccess-1.0.2.jar new file mode 100755 index 0000000..d73ab80 Binary files /dev/null and b/data/minceraft/libraries/com/google/guava/failureaccess/1.0.2/failureaccess-1.0.2.jar differ diff --git a/data/minceraft/libraries/com/google/guava/guava/33.3.1-jre/guava-33.3.1-jre.jar b/data/minceraft/libraries/com/google/guava/guava/33.3.1-jre/guava-33.3.1-jre.jar new file mode 100755 index 0000000..9a88e16 Binary files /dev/null and b/data/minceraft/libraries/com/google/guava/guava/33.3.1-jre/guava-33.3.1-jre.jar differ diff --git a/data/minceraft/libraries/com/ibm/icu/icu4j/76.1/icu4j-76.1.jar b/data/minceraft/libraries/com/ibm/icu/icu4j/76.1/icu4j-76.1.jar new file mode 100755 index 0000000..17f5845 Binary files /dev/null and b/data/minceraft/libraries/com/ibm/icu/icu4j/76.1/icu4j-76.1.jar differ diff --git a/data/minceraft/libraries/com/microsoft/azure/msal4j/1.17.2/msal4j-1.17.2.jar b/data/minceraft/libraries/com/microsoft/azure/msal4j/1.17.2/msal4j-1.17.2.jar new file mode 100755 index 0000000..c2f9d39 Binary files /dev/null and b/data/minceraft/libraries/com/microsoft/azure/msal4j/1.17.2/msal4j-1.17.2.jar differ diff --git a/data/minceraft/libraries/com/mojang/authlib/6.0.57/authlib-6.0.57.jar b/data/minceraft/libraries/com/mojang/authlib/6.0.57/authlib-6.0.57.jar new file mode 100755 index 0000000..8552698 Binary files /dev/null and b/data/minceraft/libraries/com/mojang/authlib/6.0.57/authlib-6.0.57.jar differ diff --git a/data/minceraft/libraries/com/mojang/blocklist/1.0.10/blocklist-1.0.10.jar b/data/minceraft/libraries/com/mojang/blocklist/1.0.10/blocklist-1.0.10.jar new file mode 100755 index 0000000..4b5c6a9 Binary files /dev/null and b/data/minceraft/libraries/com/mojang/blocklist/1.0.10/blocklist-1.0.10.jar differ diff --git a/data/minceraft/libraries/com/mojang/brigadier/1.3.10/brigadier-1.3.10.jar b/data/minceraft/libraries/com/mojang/brigadier/1.3.10/brigadier-1.3.10.jar new file mode 100755 index 0000000..fed2379 Binary files /dev/null and b/data/minceraft/libraries/com/mojang/brigadier/1.3.10/brigadier-1.3.10.jar differ diff --git a/data/minceraft/libraries/com/mojang/datafixerupper/8.0.16/datafixerupper-8.0.16.jar b/data/minceraft/libraries/com/mojang/datafixerupper/8.0.16/datafixerupper-8.0.16.jar new file mode 100755 index 0000000..faa58c2 Binary files /dev/null and b/data/minceraft/libraries/com/mojang/datafixerupper/8.0.16/datafixerupper-8.0.16.jar differ diff --git a/data/minceraft/libraries/com/mojang/jtracy/1.0.29/jtracy-1.0.29-natives-linux.jar b/data/minceraft/libraries/com/mojang/jtracy/1.0.29/jtracy-1.0.29-natives-linux.jar new file mode 100755 index 0000000..d8edd57 Binary files /dev/null and b/data/minceraft/libraries/com/mojang/jtracy/1.0.29/jtracy-1.0.29-natives-linux.jar differ diff --git a/data/minceraft/libraries/com/mojang/jtracy/1.0.29/jtracy-1.0.29.jar b/data/minceraft/libraries/com/mojang/jtracy/1.0.29/jtracy-1.0.29.jar new file mode 100755 index 0000000..012083b Binary files /dev/null and b/data/minceraft/libraries/com/mojang/jtracy/1.0.29/jtracy-1.0.29.jar differ diff --git a/data/minceraft/libraries/com/mojang/logging/1.5.10/logging-1.5.10.jar b/data/minceraft/libraries/com/mojang/logging/1.5.10/logging-1.5.10.jar new file mode 100755 index 0000000..4985959 Binary files /dev/null and b/data/minceraft/libraries/com/mojang/logging/1.5.10/logging-1.5.10.jar differ diff --git a/data/minceraft/libraries/com/mojang/minecraft/1.21.4/minecraft-1.21.4-client.jar b/data/minceraft/libraries/com/mojang/minecraft/1.21.4/minecraft-1.21.4-client.jar new file mode 100755 index 0000000..776646b Binary files /dev/null and b/data/minceraft/libraries/com/mojang/minecraft/1.21.4/minecraft-1.21.4-client.jar differ diff --git a/data/minceraft/libraries/com/mojang/patchy/2.2.10/patchy-2.2.10.jar b/data/minceraft/libraries/com/mojang/patchy/2.2.10/patchy-2.2.10.jar new file mode 100755 index 0000000..e9abf8e Binary files /dev/null and b/data/minceraft/libraries/com/mojang/patchy/2.2.10/patchy-2.2.10.jar differ diff --git a/data/minceraft/libraries/com/mojang/text2speech/1.17.9/text2speech-1.17.9.jar b/data/minceraft/libraries/com/mojang/text2speech/1.17.9/text2speech-1.17.9.jar new file mode 100755 index 0000000..716ceb0 Binary files /dev/null and b/data/minceraft/libraries/com/mojang/text2speech/1.17.9/text2speech-1.17.9.jar differ diff --git a/data/minceraft/libraries/com/nimbusds/content-type/2.3/content-type-2.3.jar b/data/minceraft/libraries/com/nimbusds/content-type/2.3/content-type-2.3.jar new file mode 100755 index 0000000..7e88769 Binary files /dev/null and b/data/minceraft/libraries/com/nimbusds/content-type/2.3/content-type-2.3.jar differ diff --git a/data/minceraft/libraries/com/nimbusds/lang-tag/1.7/lang-tag-1.7.jar b/data/minceraft/libraries/com/nimbusds/lang-tag/1.7/lang-tag-1.7.jar new file mode 100755 index 0000000..c089707 Binary files /dev/null and b/data/minceraft/libraries/com/nimbusds/lang-tag/1.7/lang-tag-1.7.jar differ diff --git a/data/minceraft/libraries/com/nimbusds/nimbus-jose-jwt/9.40/nimbus-jose-jwt-9.40.jar b/data/minceraft/libraries/com/nimbusds/nimbus-jose-jwt/9.40/nimbus-jose-jwt-9.40.jar new file mode 100755 index 0000000..342eee7 Binary files /dev/null and b/data/minceraft/libraries/com/nimbusds/nimbus-jose-jwt/9.40/nimbus-jose-jwt-9.40.jar differ diff --git a/data/minceraft/libraries/com/nimbusds/oauth2-oidc-sdk/11.18/oauth2-oidc-sdk-11.18.jar b/data/minceraft/libraries/com/nimbusds/oauth2-oidc-sdk/11.18/oauth2-oidc-sdk-11.18.jar new file mode 100755 index 0000000..e372022 Binary files /dev/null and b/data/minceraft/libraries/com/nimbusds/oauth2-oidc-sdk/11.18/oauth2-oidc-sdk-11.18.jar differ diff --git a/data/minceraft/libraries/commons-codec/commons-codec/1.17.1/commons-codec-1.17.1.jar b/data/minceraft/libraries/commons-codec/commons-codec/1.17.1/commons-codec-1.17.1.jar new file mode 100755 index 0000000..5023670 Binary files /dev/null and b/data/minceraft/libraries/commons-codec/commons-codec/1.17.1/commons-codec-1.17.1.jar differ diff --git a/data/minceraft/libraries/commons-io/commons-io/2.17.0/commons-io-2.17.0.jar b/data/minceraft/libraries/commons-io/commons-io/2.17.0/commons-io-2.17.0.jar new file mode 100755 index 0000000..ad00ddc Binary files /dev/null and b/data/minceraft/libraries/commons-io/commons-io/2.17.0/commons-io-2.17.0.jar differ diff --git a/data/minceraft/libraries/commons-logging/commons-logging/1.3.4/commons-logging-1.3.4.jar b/data/minceraft/libraries/commons-logging/commons-logging/1.3.4/commons-logging-1.3.4.jar new file mode 100755 index 0000000..b6339bb Binary files /dev/null and b/data/minceraft/libraries/commons-logging/commons-logging/1.3.4/commons-logging-1.3.4.jar differ diff --git a/data/minceraft/libraries/io/netty/netty-buffer/4.1.115.Final/netty-buffer-4.1.115.Final.jar b/data/minceraft/libraries/io/netty/netty-buffer/4.1.115.Final/netty-buffer-4.1.115.Final.jar new file mode 100755 index 0000000..5372981 Binary files /dev/null and b/data/minceraft/libraries/io/netty/netty-buffer/4.1.115.Final/netty-buffer-4.1.115.Final.jar differ diff --git a/data/minceraft/libraries/io/netty/netty-codec/4.1.115.Final/netty-codec-4.1.115.Final.jar b/data/minceraft/libraries/io/netty/netty-codec/4.1.115.Final/netty-codec-4.1.115.Final.jar new file mode 100755 index 0000000..342629f Binary files /dev/null and b/data/minceraft/libraries/io/netty/netty-codec/4.1.115.Final/netty-codec-4.1.115.Final.jar differ diff --git a/data/minceraft/libraries/io/netty/netty-common/4.1.115.Final/netty-common-4.1.115.Final.jar b/data/minceraft/libraries/io/netty/netty-common/4.1.115.Final/netty-common-4.1.115.Final.jar new file mode 100755 index 0000000..6b610ea Binary files /dev/null and b/data/minceraft/libraries/io/netty/netty-common/4.1.115.Final/netty-common-4.1.115.Final.jar differ diff --git a/data/minceraft/libraries/io/netty/netty-handler/4.1.115.Final/netty-handler-4.1.115.Final.jar b/data/minceraft/libraries/io/netty/netty-handler/4.1.115.Final/netty-handler-4.1.115.Final.jar new file mode 100755 index 0000000..30a7a35 Binary files /dev/null and b/data/minceraft/libraries/io/netty/netty-handler/4.1.115.Final/netty-handler-4.1.115.Final.jar differ diff --git a/data/minceraft/libraries/io/netty/netty-resolver/4.1.115.Final/netty-resolver-4.1.115.Final.jar b/data/minceraft/libraries/io/netty/netty-resolver/4.1.115.Final/netty-resolver-4.1.115.Final.jar new file mode 100755 index 0000000..63d1b3e Binary files /dev/null and b/data/minceraft/libraries/io/netty/netty-resolver/4.1.115.Final/netty-resolver-4.1.115.Final.jar differ diff --git a/data/minceraft/libraries/io/netty/netty-transport-classes-epoll/4.1.115.Final/netty-transport-classes-epoll-4.1.115.Final.jar b/data/minceraft/libraries/io/netty/netty-transport-classes-epoll/4.1.115.Final/netty-transport-classes-epoll-4.1.115.Final.jar new file mode 100755 index 0000000..84e06bc Binary files /dev/null and b/data/minceraft/libraries/io/netty/netty-transport-classes-epoll/4.1.115.Final/netty-transport-classes-epoll-4.1.115.Final.jar differ diff --git a/data/minceraft/libraries/io/netty/netty-transport-native-epoll/4.1.115.Final/netty-transport-native-epoll-4.1.115.Final-linux-aarch_64.jar b/data/minceraft/libraries/io/netty/netty-transport-native-epoll/4.1.115.Final/netty-transport-native-epoll-4.1.115.Final-linux-aarch_64.jar new file mode 100755 index 0000000..5d5f754 Binary files /dev/null and b/data/minceraft/libraries/io/netty/netty-transport-native-epoll/4.1.115.Final/netty-transport-native-epoll-4.1.115.Final-linux-aarch_64.jar differ diff --git a/data/minceraft/libraries/io/netty/netty-transport-native-epoll/4.1.115.Final/netty-transport-native-epoll-4.1.115.Final-linux-x86_64.jar b/data/minceraft/libraries/io/netty/netty-transport-native-epoll/4.1.115.Final/netty-transport-native-epoll-4.1.115.Final-linux-x86_64.jar new file mode 100755 index 0000000..ce021e5 Binary files /dev/null and b/data/minceraft/libraries/io/netty/netty-transport-native-epoll/4.1.115.Final/netty-transport-native-epoll-4.1.115.Final-linux-x86_64.jar differ diff --git a/data/minceraft/libraries/io/netty/netty-transport-native-unix-common/4.1.115.Final/netty-transport-native-unix-common-4.1.115.Final.jar b/data/minceraft/libraries/io/netty/netty-transport-native-unix-common/4.1.115.Final/netty-transport-native-unix-common-4.1.115.Final.jar new file mode 100755 index 0000000..78db923 Binary files /dev/null and b/data/minceraft/libraries/io/netty/netty-transport-native-unix-common/4.1.115.Final/netty-transport-native-unix-common-4.1.115.Final.jar differ diff --git a/data/minceraft/libraries/io/netty/netty-transport/4.1.115.Final/netty-transport-4.1.115.Final.jar b/data/minceraft/libraries/io/netty/netty-transport/4.1.115.Final/netty-transport-4.1.115.Final.jar new file mode 100755 index 0000000..3a64746 Binary files /dev/null and b/data/minceraft/libraries/io/netty/netty-transport/4.1.115.Final/netty-transport-4.1.115.Final.jar differ diff --git a/data/minceraft/libraries/it/unimi/dsi/fastutil/8.5.15/fastutil-8.5.15.jar b/data/minceraft/libraries/it/unimi/dsi/fastutil/8.5.15/fastutil-8.5.15.jar new file mode 100755 index 0000000..2e03f48 Binary files /dev/null and b/data/minceraft/libraries/it/unimi/dsi/fastutil/8.5.15/fastutil-8.5.15.jar differ diff --git a/data/minceraft/libraries/net/java/dev/jna/jna-platform/5.15.0/jna-platform-5.15.0.jar b/data/minceraft/libraries/net/java/dev/jna/jna-platform/5.15.0/jna-platform-5.15.0.jar new file mode 100755 index 0000000..645b692 Binary files /dev/null and b/data/minceraft/libraries/net/java/dev/jna/jna-platform/5.15.0/jna-platform-5.15.0.jar differ diff --git a/data/minceraft/libraries/net/java/dev/jna/jna/5.15.0/jna-5.15.0.jar b/data/minceraft/libraries/net/java/dev/jna/jna/5.15.0/jna-5.15.0.jar new file mode 100755 index 0000000..a216935 Binary files /dev/null and b/data/minceraft/libraries/net/java/dev/jna/jna/5.15.0/jna-5.15.0.jar differ diff --git a/data/minceraft/libraries/net/minidev/accessors-smart/2.5.1/accessors-smart-2.5.1.jar b/data/minceraft/libraries/net/minidev/accessors-smart/2.5.1/accessors-smart-2.5.1.jar new file mode 100755 index 0000000..de9487c Binary files /dev/null and b/data/minceraft/libraries/net/minidev/accessors-smart/2.5.1/accessors-smart-2.5.1.jar differ diff --git a/data/minceraft/libraries/net/minidev/json-smart/2.5.1/json-smart-2.5.1.jar b/data/minceraft/libraries/net/minidev/json-smart/2.5.1/json-smart-2.5.1.jar new file mode 100755 index 0000000..2842d99 Binary files /dev/null and b/data/minceraft/libraries/net/minidev/json-smart/2.5.1/json-smart-2.5.1.jar differ diff --git a/data/minceraft/libraries/net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.jar b/data/minceraft/libraries/net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.jar new file mode 100755 index 0000000..317b2b0 Binary files /dev/null and b/data/minceraft/libraries/net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.jar differ diff --git a/data/minceraft/libraries/org/apache/commons/commons-compress/1.27.1/commons-compress-1.27.1.jar b/data/minceraft/libraries/org/apache/commons/commons-compress/1.27.1/commons-compress-1.27.1.jar new file mode 100755 index 0000000..1bea2d9 Binary files /dev/null and b/data/minceraft/libraries/org/apache/commons/commons-compress/1.27.1/commons-compress-1.27.1.jar differ diff --git a/data/minceraft/libraries/org/apache/commons/commons-lang3/3.17.0/commons-lang3-3.17.0.jar b/data/minceraft/libraries/org/apache/commons/commons-lang3/3.17.0/commons-lang3-3.17.0.jar new file mode 100755 index 0000000..f6486b4 Binary files /dev/null and b/data/minceraft/libraries/org/apache/commons/commons-lang3/3.17.0/commons-lang3-3.17.0.jar differ diff --git a/data/minceraft/libraries/org/apache/httpcomponents/httpclient/4.5.14/httpclient-4.5.14.jar b/data/minceraft/libraries/org/apache/httpcomponents/httpclient/4.5.14/httpclient-4.5.14.jar new file mode 100755 index 0000000..2bb7c07 Binary files /dev/null and b/data/minceraft/libraries/org/apache/httpcomponents/httpclient/4.5.14/httpclient-4.5.14.jar differ diff --git a/data/minceraft/libraries/org/apache/httpcomponents/httpcore/4.4.16/httpcore-4.4.16.jar b/data/minceraft/libraries/org/apache/httpcomponents/httpcore/4.4.16/httpcore-4.4.16.jar new file mode 100755 index 0000000..f0bdebe Binary files /dev/null and b/data/minceraft/libraries/org/apache/httpcomponents/httpcore/4.4.16/httpcore-4.4.16.jar differ diff --git a/data/minceraft/libraries/org/apache/logging/log4j/log4j-api/2.24.1/log4j-api-2.24.1.jar b/data/minceraft/libraries/org/apache/logging/log4j/log4j-api/2.24.1/log4j-api-2.24.1.jar new file mode 100755 index 0000000..f9d5b43 Binary files /dev/null and b/data/minceraft/libraries/org/apache/logging/log4j/log4j-api/2.24.1/log4j-api-2.24.1.jar differ diff --git a/data/minceraft/libraries/org/apache/logging/log4j/log4j-core/2.24.1/log4j-core-2.24.1.jar b/data/minceraft/libraries/org/apache/logging/log4j/log4j-core/2.24.1/log4j-core-2.24.1.jar new file mode 100755 index 0000000..ea8eefa Binary files /dev/null and b/data/minceraft/libraries/org/apache/logging/log4j/log4j-core/2.24.1/log4j-core-2.24.1.jar differ diff --git a/data/minceraft/libraries/org/apache/logging/log4j/log4j-slf4j2-impl/2.24.1/log4j-slf4j2-impl-2.24.1.jar b/data/minceraft/libraries/org/apache/logging/log4j/log4j-slf4j2-impl/2.24.1/log4j-slf4j2-impl-2.24.1.jar new file mode 100755 index 0000000..0a914b9 Binary files /dev/null and b/data/minceraft/libraries/org/apache/logging/log4j/log4j-slf4j2-impl/2.24.1/log4j-slf4j2-impl-2.24.1.jar differ diff --git a/data/minceraft/libraries/org/jcraft/jorbis/0.0.17/jorbis-0.0.17.jar b/data/minceraft/libraries/org/jcraft/jorbis/0.0.17/jorbis-0.0.17.jar new file mode 100755 index 0000000..e58a6aa Binary files /dev/null and b/data/minceraft/libraries/org/jcraft/jorbis/0.0.17/jorbis-0.0.17.jar differ diff --git a/data/minceraft/libraries/org/joml/joml/1.10.8/joml-1.10.8.jar b/data/minceraft/libraries/org/joml/joml/1.10.8/joml-1.10.8.jar new file mode 100755 index 0000000..ddcad59 Binary files /dev/null and b/data/minceraft/libraries/org/joml/joml/1.10.8/joml-1.10.8.jar differ diff --git a/data/minceraft/libraries/org/lwjgl/lwjgl-freetype/3.3.3/lwjgl-freetype-3.3.3-natives-linux.jar b/data/minceraft/libraries/org/lwjgl/lwjgl-freetype/3.3.3/lwjgl-freetype-3.3.3-natives-linux.jar new file mode 100755 index 0000000..caa2984 Binary files /dev/null and b/data/minceraft/libraries/org/lwjgl/lwjgl-freetype/3.3.3/lwjgl-freetype-3.3.3-natives-linux.jar differ diff --git a/data/minceraft/libraries/org/lwjgl/lwjgl-freetype/3.3.3/lwjgl-freetype-3.3.3.jar b/data/minceraft/libraries/org/lwjgl/lwjgl-freetype/3.3.3/lwjgl-freetype-3.3.3.jar new file mode 100755 index 0000000..9fcdfa9 Binary files /dev/null and b/data/minceraft/libraries/org/lwjgl/lwjgl-freetype/3.3.3/lwjgl-freetype-3.3.3.jar differ diff --git a/data/minceraft/libraries/org/lwjgl/lwjgl-glfw/3.3.3/lwjgl-glfw-3.3.3-natives-linux.jar b/data/minceraft/libraries/org/lwjgl/lwjgl-glfw/3.3.3/lwjgl-glfw-3.3.3-natives-linux.jar new file mode 100755 index 0000000..28db301 Binary files /dev/null and b/data/minceraft/libraries/org/lwjgl/lwjgl-glfw/3.3.3/lwjgl-glfw-3.3.3-natives-linux.jar differ diff --git a/data/minceraft/libraries/org/lwjgl/lwjgl-glfw/3.3.3/lwjgl-glfw-3.3.3.jar b/data/minceraft/libraries/org/lwjgl/lwjgl-glfw/3.3.3/lwjgl-glfw-3.3.3.jar new file mode 100755 index 0000000..791fe06 Binary files /dev/null and b/data/minceraft/libraries/org/lwjgl/lwjgl-glfw/3.3.3/lwjgl-glfw-3.3.3.jar differ diff --git a/data/minceraft/libraries/org/lwjgl/lwjgl-jemalloc/3.3.3/lwjgl-jemalloc-3.3.3-natives-linux.jar b/data/minceraft/libraries/org/lwjgl/lwjgl-jemalloc/3.3.3/lwjgl-jemalloc-3.3.3-natives-linux.jar new file mode 100755 index 0000000..c72f93a Binary files /dev/null and b/data/minceraft/libraries/org/lwjgl/lwjgl-jemalloc/3.3.3/lwjgl-jemalloc-3.3.3-natives-linux.jar differ diff --git a/data/minceraft/libraries/org/lwjgl/lwjgl-jemalloc/3.3.3/lwjgl-jemalloc-3.3.3.jar b/data/minceraft/libraries/org/lwjgl/lwjgl-jemalloc/3.3.3/lwjgl-jemalloc-3.3.3.jar new file mode 100755 index 0000000..6881c26 Binary files /dev/null and b/data/minceraft/libraries/org/lwjgl/lwjgl-jemalloc/3.3.3/lwjgl-jemalloc-3.3.3.jar differ diff --git a/data/minceraft/libraries/org/lwjgl/lwjgl-openal/3.3.3/lwjgl-openal-3.3.3-natives-linux.jar b/data/minceraft/libraries/org/lwjgl/lwjgl-openal/3.3.3/lwjgl-openal-3.3.3-natives-linux.jar new file mode 100755 index 0000000..46252b4 Binary files /dev/null and b/data/minceraft/libraries/org/lwjgl/lwjgl-openal/3.3.3/lwjgl-openal-3.3.3-natives-linux.jar differ diff --git a/data/minceraft/libraries/org/lwjgl/lwjgl-openal/3.3.3/lwjgl-openal-3.3.3.jar b/data/minceraft/libraries/org/lwjgl/lwjgl-openal/3.3.3/lwjgl-openal-3.3.3.jar new file mode 100755 index 0000000..2a60334 Binary files /dev/null and b/data/minceraft/libraries/org/lwjgl/lwjgl-openal/3.3.3/lwjgl-openal-3.3.3.jar differ diff --git a/data/minceraft/libraries/org/lwjgl/lwjgl-opengl/3.3.3/lwjgl-opengl-3.3.3-natives-linux.jar b/data/minceraft/libraries/org/lwjgl/lwjgl-opengl/3.3.3/lwjgl-opengl-3.3.3-natives-linux.jar new file mode 100755 index 0000000..b4198d5 Binary files /dev/null and b/data/minceraft/libraries/org/lwjgl/lwjgl-opengl/3.3.3/lwjgl-opengl-3.3.3-natives-linux.jar differ diff --git a/data/minceraft/libraries/org/lwjgl/lwjgl-opengl/3.3.3/lwjgl-opengl-3.3.3.jar b/data/minceraft/libraries/org/lwjgl/lwjgl-opengl/3.3.3/lwjgl-opengl-3.3.3.jar new file mode 100755 index 0000000..9905636 Binary files /dev/null and b/data/minceraft/libraries/org/lwjgl/lwjgl-opengl/3.3.3/lwjgl-opengl-3.3.3.jar differ diff --git a/data/minceraft/libraries/org/lwjgl/lwjgl-stb/3.3.3/lwjgl-stb-3.3.3-natives-linux.jar b/data/minceraft/libraries/org/lwjgl/lwjgl-stb/3.3.3/lwjgl-stb-3.3.3-natives-linux.jar new file mode 100755 index 0000000..b8ccae2 Binary files /dev/null and b/data/minceraft/libraries/org/lwjgl/lwjgl-stb/3.3.3/lwjgl-stb-3.3.3-natives-linux.jar differ diff --git a/data/minceraft/libraries/org/lwjgl/lwjgl-stb/3.3.3/lwjgl-stb-3.3.3.jar b/data/minceraft/libraries/org/lwjgl/lwjgl-stb/3.3.3/lwjgl-stb-3.3.3.jar new file mode 100755 index 0000000..ba65bed Binary files /dev/null and b/data/minceraft/libraries/org/lwjgl/lwjgl-stb/3.3.3/lwjgl-stb-3.3.3.jar differ diff --git a/data/minceraft/libraries/org/lwjgl/lwjgl-tinyfd/3.3.3/lwjgl-tinyfd-3.3.3-natives-linux.jar b/data/minceraft/libraries/org/lwjgl/lwjgl-tinyfd/3.3.3/lwjgl-tinyfd-3.3.3-natives-linux.jar new file mode 100755 index 0000000..df5d573 Binary files /dev/null and b/data/minceraft/libraries/org/lwjgl/lwjgl-tinyfd/3.3.3/lwjgl-tinyfd-3.3.3-natives-linux.jar differ diff --git a/data/minceraft/libraries/org/lwjgl/lwjgl-tinyfd/3.3.3/lwjgl-tinyfd-3.3.3.jar b/data/minceraft/libraries/org/lwjgl/lwjgl-tinyfd/3.3.3/lwjgl-tinyfd-3.3.3.jar new file mode 100755 index 0000000..7fbd1bf Binary files /dev/null and b/data/minceraft/libraries/org/lwjgl/lwjgl-tinyfd/3.3.3/lwjgl-tinyfd-3.3.3.jar differ diff --git a/data/minceraft/libraries/org/lwjgl/lwjgl/3.3.3/lwjgl-3.3.3-natives-linux.jar b/data/minceraft/libraries/org/lwjgl/lwjgl/3.3.3/lwjgl-3.3.3-natives-linux.jar new file mode 100755 index 0000000..68018d8 Binary files /dev/null and b/data/minceraft/libraries/org/lwjgl/lwjgl/3.3.3/lwjgl-3.3.3-natives-linux.jar differ diff --git a/data/minceraft/libraries/org/lwjgl/lwjgl/3.3.3/lwjgl-3.3.3.jar b/data/minceraft/libraries/org/lwjgl/lwjgl/3.3.3/lwjgl-3.3.3.jar new file mode 100755 index 0000000..2d1fcf9 Binary files /dev/null and b/data/minceraft/libraries/org/lwjgl/lwjgl/3.3.3/lwjgl-3.3.3.jar differ diff --git a/data/minceraft/libraries/org/lz4/lz4-java/1.8.0/lz4-java-1.8.0.jar b/data/minceraft/libraries/org/lz4/lz4-java/1.8.0/lz4-java-1.8.0.jar new file mode 100755 index 0000000..89c644b Binary files /dev/null and b/data/minceraft/libraries/org/lz4/lz4-java/1.8.0/lz4-java-1.8.0.jar differ diff --git a/data/minceraft/libraries/org/ow2/asm/asm/9.6/asm-9.6.jar b/data/minceraft/libraries/org/ow2/asm/asm/9.6/asm-9.6.jar new file mode 100755 index 0000000..cc1c2cd Binary files /dev/null and b/data/minceraft/libraries/org/ow2/asm/asm/9.6/asm-9.6.jar differ diff --git a/data/minceraft/libraries/org/slf4j/slf4j-api/2.0.16/slf4j-api-2.0.16.jar b/data/minceraft/libraries/org/slf4j/slf4j-api/2.0.16/slf4j-api-2.0.16.jar new file mode 100755 index 0000000..cbb5448 Binary files /dev/null and b/data/minceraft/libraries/org/slf4j/slf4j-api/2.0.16/slf4j-api-2.0.16.jar differ diff --git a/data/minceraft/metacache b/data/minceraft/metacache new file mode 100755 index 0000000..b3f791d --- /dev/null +++ b/data/minceraft/metacache @@ -0,0 +1,645 @@ +{ + "entries": [ + { + "base": "asset_indexes", + "etag": "", + "last_changed_timestamp": 1741796071218, + "md5sum": "d5a9c66300c0d7eacd8293b62a5986a8", + "path": "19.json", + "remote_changed_timestamp": "Wed, 12 Mar 2025 12:46:52 GMT" + }, + { + "base": "injectors", + "etag": "\"65d0ebf9-537d2\"", + "last_changed_timestamp": 1741787699920, + "md5sum": "c60d3899b711537e10be33c680ebd8ae", + "path": "authlib-injector-1.2.5.jar", + "remote_changed_timestamp": "Sat, 17 Feb 2024 17:25:13 GMT" + }, + { + "base": "injectors", + "etag": "W/\"65d0ebf9-11f\"", + "last_changed_timestamp": 1741787699583, + "md5sum": "e206374eedab95eef76581f3e5c26867", + "path": "version.json", + "remote_changed_timestamp": "Sat, 17 Feb 2024 17:25:13 GMT" + }, + { + "base": "libraries", + "etag": "0x8DC80A2DCB5773E", + "last_changed_timestamp": 1741787273446, + "md5sum": "7e982dafcf25c24b365b5088eaf8a0a6", + "path": "com/fasterxml/jackson/core/jackson-annotations/2.13.4/jackson-annotations-2.13.4.jar", + "remote_changed_timestamp": "Thu, 30 May 2024 12:20:15 GMT" + }, + { + "base": "libraries", + "etag": "0x8DC80A2DC6C8B4B", + "last_changed_timestamp": 1741787274069, + "md5sum": "e8f064827ddb8deb06e45d20988bcaa5", + "path": "com/fasterxml/jackson/core/jackson-core/2.13.4/jackson-core-2.13.4.jar", + "remote_changed_timestamp": "Thu, 30 May 2024 12:20:15 GMT" + }, + { + "base": "libraries", + "etag": "0x8DC80A2DC4C0872", + "last_changed_timestamp": 1741787274037, + "md5sum": "f26eab82fa1da09f8e8bc7e52fc82088", + "path": "com/fasterxml/jackson/core/jackson-databind/2.13.4.2/jackson-databind-2.13.4.2.jar", + "remote_changed_timestamp": "Thu, 30 May 2024 12:20:14 GMT" + }, + { + "base": "libraries", + "etag": "0x8DD054C56DAFC7C", + "last_changed_timestamp": 1741787275892, + "md5sum": "e4e15667573ea6a967d0171289d59e9c", + "path": "com/github/oshi/oshi-core/6.6.5/oshi-core-6.6.5.jar", + "remote_changed_timestamp": "Fri, 15 Nov 2024 08:05:58 GMT" + }, + { + "base": "libraries", + "etag": "0x8DC80A2DBDE58B1", + "last_changed_timestamp": 1741787273192, + "md5sum": "d62dbfa8789378457ada685e2f614846", + "path": "com/github/stephenc/jcip/jcip-annotations/1.0-1/jcip-annotations-1.0-1.jar", + "remote_changed_timestamp": "Thu, 30 May 2024 12:20:14 GMT" + }, + { + "base": "libraries", + "etag": "0x8DD054C584D3738", + "last_changed_timestamp": 1741787273613, + "md5sum": "0c69b9199d3a4e6c34dc03619ff7feee", + "path": "com/google/code/gson/gson/2.11.0/gson-2.11.0.jar", + "remote_changed_timestamp": "Fri, 15 Nov 2024 08:06:01 GMT" + }, + { + "base": "libraries", + "etag": "0x8DD054C58333CC5", + "last_changed_timestamp": 1741787273256, + "md5sum": "3f75955b49b6758fd6d1e1bd9bf777b3", + "path": "com/google/guava/failureaccess/1.0.2/failureaccess-1.0.2.jar", + "remote_changed_timestamp": "Fri, 15 Nov 2024 08:06:01 GMT" + }, + { + "base": "libraries", + "etag": "0x8DD054C57E1334F", + "last_changed_timestamp": 1741787275442, + "md5sum": "7b7d80d99af4181db55b00dad50a91bb", + "path": "com/google/guava/guava/33.3.1-jre/guava-33.3.1-jre.jar", + "remote_changed_timestamp": "Fri, 15 Nov 2024 08:06:00 GMT" + }, + { + "base": "libraries", + "etag": "0x8DD054C569016F6", + "last_changed_timestamp": 1741787341151, + "md5sum": "0621976c76a3b05b0622aef5a4c1d981", + "path": "com/ibm/icu/icu4j/76.1/icu4j-76.1.jar", + "remote_changed_timestamp": "Fri, 15 Nov 2024 08:05:58 GMT" + }, + { + "base": "libraries", + "etag": "0x8DD054C59ABD8EF", + "last_changed_timestamp": 1741787273926, + "md5sum": "af37c5d9f4d839c78a103c866ea2bfe4", + "path": "com/microsoft/azure/msal4j/1.17.2/msal4j-1.17.2.jar", + "remote_changed_timestamp": "Fri, 15 Nov 2024 08:06:03 GMT" + }, + { + "base": "libraries", + "etag": "0x8DCF8C600B13DA5", + "last_changed_timestamp": 1741787274089, + "md5sum": "f6c1f2b733258d1dc74533cbad0da8f6", + "path": "com/mojang/authlib/6.0.57/authlib-6.0.57.jar", + "remote_changed_timestamp": "Wed, 30 Oct 2024 09:34:07 GMT" + }, + { + "base": "libraries", + "etag": "0x8DAB7EC4634A6BF", + "last_changed_timestamp": 1741787274102, + "md5sum": "fc1420e3182dd32b4df9933f810ebebb", + "path": "com/mojang/blocklist/1.0.10/blocklist-1.0.10.jar", + "remote_changed_timestamp": "Thu, 27 Oct 2022 07:24:24 GMT" + }, + { + "base": "libraries", + "etag": "0x8DCB6E7544D8099", + "last_changed_timestamp": 1741787274275, + "md5sum": "a755b426eb7942bb74b46a95b02f1de4", + "path": "com/mojang/brigadier/1.3.10/brigadier-1.3.10.jar", + "remote_changed_timestamp": "Wed, 07 Aug 2024 13:46:24 GMT" + }, + { + "base": "libraries", + "etag": "0x8DC6E7281CD0C4C", + "last_changed_timestamp": 1741787274637, + "md5sum": "d932ac637b6d83e6c45a8f269fe81e3b", + "path": "com/mojang/datafixerupper/8.0.16/datafixerupper-8.0.16.jar", + "remote_changed_timestamp": "Tue, 07 May 2024 08:48:46 GMT" + }, + { + "base": "libraries", + "etag": "0x8DCCDAC732329E6", + "last_changed_timestamp": 1741787274337, + "md5sum": "b8dc2f815666609419b80263d7a34969", + "path": "com/mojang/jtracy/1.0.29/jtracy-1.0.29-natives-linux.jar", + "remote_changed_timestamp": "Thu, 05 Sep 2024 13:12:52 GMT" + }, + { + "base": "libraries", + "etag": "0x8DCCDAC724C594D", + "last_changed_timestamp": 1741787274170, + "md5sum": "1c06cd97d006339f58085cdfd8065000", + "path": "com/mojang/jtracy/1.0.29/jtracy-1.0.29.jar", + "remote_changed_timestamp": "Thu, 05 Sep 2024 13:12:51 GMT" + }, + { + "base": "libraries", + "etag": "0x8DD04C20161983D", + "last_changed_timestamp": 1741787274448, + "md5sum": "0b7da24cea4e840b91c13ed08657a6d3", + "path": "com/mojang/logging/1.5.10/logging-1.5.10.jar", + "remote_changed_timestamp": "Thu, 14 Nov 2024 15:35:44 GMT" + }, + { + "base": "libraries", + "etag": "0x8DD1384AF4AC9E1", + "last_changed_timestamp": 1741787468606, + "md5sum": "70e2838411853210dce14bdd30769458", + "path": "com/mojang/minecraft/1.21.4/minecraft-1.21.4-client.jar", + "remote_changed_timestamp": "Tue, 03 Dec 2024 10:24:35 GMT" + }, + { + "base": "libraries", + "etag": "0x8DAB7EC4DC28215", + "last_changed_timestamp": 1741787274405, + "md5sum": "ff905bf0aacf501149a13880a2d6742d", + "path": "com/mojang/patchy/2.2.10/patchy-2.2.10.jar", + "remote_changed_timestamp": "Thu, 27 Oct 2022 07:24:37 GMT" + }, + { + "base": "libraries", + "etag": "0x8DB5528647B683F", + "last_changed_timestamp": 1741787274474, + "md5sum": "f5b05e8db22e2e0668b786e11ac9d3ce", + "path": "com/mojang/text2speech/1.17.9/text2speech-1.17.9.jar", + "remote_changed_timestamp": "Mon, 15 May 2023 09:40:17 GMT" + }, + { + "base": "libraries", + "etag": "0x8DC80A2DCECEAB3", + "last_changed_timestamp": 1741787274591, + "md5sum": "f0fc0d6be73e838863e2197c03a27c3f", + "path": "com/nimbusds/content-type/2.3/content-type-2.3.jar", + "remote_changed_timestamp": "Thu, 30 May 2024 12:20:15 GMT" + }, + { + "base": "libraries", + "etag": "0x8DC80A2DD4E9A00", + "last_changed_timestamp": 1741787274552, + "md5sum": "31b8a4f76fdbf21f1d667f9d6618e0b2", + "path": "com/nimbusds/lang-tag/1.7/lang-tag-1.7.jar", + "remote_changed_timestamp": "Thu, 30 May 2024 12:20:16 GMT" + }, + { + "base": "libraries", + "etag": "0x8DD054C596A8593", + "last_changed_timestamp": 1741787275435, + "md5sum": "42ce81c8d034f163663d23e8bbc3638d", + "path": "com/nimbusds/nimbus-jose-jwt/9.40/nimbus-jose-jwt-9.40.jar", + "remote_changed_timestamp": "Fri, 15 Nov 2024 08:06:03 GMT" + }, + { + "base": "libraries", + "etag": "0x8DD054C58FA679B", + "last_changed_timestamp": 1741787277744, + "md5sum": "7ea0239e0e285c7625964893dcba95ec", + "path": "com/nimbusds/oauth2-oidc-sdk/11.18/oauth2-oidc-sdk-11.18.jar", + "remote_changed_timestamp": "Fri, 15 Nov 2024 08:06:02 GMT" + }, + { + "base": "libraries", + "etag": "0x8DD054C5466CBEB", + "last_changed_timestamp": 1741787275798, + "md5sum": "7b3438ab4c6d91e0066d410947e43f3e", + "path": "commons-codec/commons-codec/1.17.1/commons-codec-1.17.1.jar", + "remote_changed_timestamp": "Fri, 15 Nov 2024 08:05:54 GMT" + }, + { + "base": "libraries", + "etag": "0x8DD054C542DACB3", + "last_changed_timestamp": 1741787276668, + "md5sum": "f6232d0e290d58bb93f74f67165bf91f", + "path": "commons-io/commons-io/2.17.0/commons-io-2.17.0.jar", + "remote_changed_timestamp": "Fri, 15 Nov 2024 08:05:54 GMT" + }, + { + "base": "libraries", + "etag": "0x8DD054C53E22B96", + "last_changed_timestamp": 1741787275631, + "md5sum": "e7a1e7cb6a89241ed9bfec4c25b6c645", + "path": "commons-logging/commons-logging/1.3.4/commons-logging-1.3.4.jar", + "remote_changed_timestamp": "Fri, 15 Nov 2024 08:05:53 GMT" + }, + { + "base": "libraries", + "etag": "0x8DD054C4EE1F06E", + "last_changed_timestamp": 1741787276240, + "md5sum": "c4ddfa85fddc7cdd84ef38c87c036010", + "path": "io/netty/netty-buffer/4.1.115.Final/netty-buffer-4.1.115.Final.jar", + "remote_changed_timestamp": "Fri, 15 Nov 2024 08:05:45 GMT" + }, + { + "base": "libraries", + "etag": "0x8DD054C500F0B81", + "last_changed_timestamp": 1741787276167, + "md5sum": "5391594c6f5bbdd944e3e8bcecf3d9ea", + "path": "io/netty/netty-codec/4.1.115.Final/netty-codec-4.1.115.Final.jar", + "remote_changed_timestamp": "Fri, 15 Nov 2024 08:05:47 GMT" + }, + { + "base": "libraries", + "etag": "0x8DD054C5054C6B8", + "last_changed_timestamp": 1741787278222, + "md5sum": "6241a4cfb9c478bbd7aa12512b90735d", + "path": "io/netty/netty-common/4.1.115.Final/netty-common-4.1.115.Final.jar", + "remote_changed_timestamp": "Fri, 15 Nov 2024 08:05:47 GMT" + }, + { + "base": "libraries", + "etag": "0x8DD054C5120CE15", + "last_changed_timestamp": 1741787276705, + "md5sum": "2a752fae3646b70f7bd17a2265c788ed", + "path": "io/netty/netty-handler/4.1.115.Final/netty-handler-4.1.115.Final.jar", + "remote_changed_timestamp": "Fri, 15 Nov 2024 08:05:49 GMT" + }, + { + "base": "libraries", + "etag": "0x8DD054C50A06EB6", + "last_changed_timestamp": 1741787276397, + "md5sum": "e133793fdcb3ea2846693f1de1d31906", + "path": "io/netty/netty-resolver/4.1.115.Final/netty-resolver-4.1.115.Final.jar", + "remote_changed_timestamp": "Fri, 15 Nov 2024 08:05:48 GMT" + }, + { + "base": "libraries", + "etag": "0x8DD054C4FBF9735", + "last_changed_timestamp": 1741787276825, + "md5sum": "9cbf83e1fe1dcc8c92075196f6f0f88c", + "path": "io/netty/netty-transport-classes-epoll/4.1.115.Final/netty-transport-classes-epoll-4.1.115.Final.jar", + "remote_changed_timestamp": "Fri, 15 Nov 2024 08:05:47 GMT" + }, + { + "base": "libraries", + "etag": "0x8DD054C4F17435B", + "last_changed_timestamp": 1741787276816, + "md5sum": "e76aa9d835b3dceb7004d644d6f4badc", + "path": "io/netty/netty-transport-native-epoll/4.1.115.Final/netty-transport-native-epoll-4.1.115.Final-linux-aarch_64.jar", + "remote_changed_timestamp": "Fri, 15 Nov 2024 08:05:45 GMT" + }, + { + "base": "libraries", + "etag": "0x8DD054C4F21711B", + "last_changed_timestamp": 1741787276831, + "md5sum": "1949f9a395ac49f303c99251c4710844", + "path": "io/netty/netty-transport-native-epoll/4.1.115.Final/netty-transport-native-epoll-4.1.115.Final-linux-x86_64.jar", + "remote_changed_timestamp": "Fri, 15 Nov 2024 08:05:45 GMT" + }, + { + "base": "libraries", + "etag": "0x8DD054C50C9736A", + "last_changed_timestamp": 1741787276959, + "md5sum": "c5714e7bc9bbd800a52d8d6c145b19e2", + "path": "io/netty/netty-transport-native-unix-common/4.1.115.Final/netty-transport-native-unix-common-4.1.115.Final.jar", + "remote_changed_timestamp": "Fri, 15 Nov 2024 08:05:48 GMT" + }, + { + "base": "libraries", + "etag": "0x8DD054C4F7070B4", + "last_changed_timestamp": 1741787277504, + "md5sum": "c2da3befce20eaf33fa8005e0797e03a", + "path": "io/netty/netty-transport/4.1.115.Final/netty-transport-4.1.115.Final.jar", + "remote_changed_timestamp": "Fri, 15 Nov 2024 08:05:46 GMT" + }, + { + "base": "libraries", + "etag": "0x8DD054C565131DC", + "last_changed_timestamp": 1741787348101, + "md5sum": "da830fa5023a010d2c2af1484d13cefc", + "path": "it/unimi/dsi/fastutil/8.5.15/fastutil-8.5.15.jar", + "remote_changed_timestamp": "Fri, 15 Nov 2024 08:05:58 GMT" + }, + { + "base": "libraries", + "etag": "0x8DD054C555A2C31", + "last_changed_timestamp": 1741787281838, + "md5sum": "41d91e4a13428fb79c12024cb92a4091", + "path": "net/java/dev/jna/jna-platform/5.15.0/jna-platform-5.15.0.jar", + "remote_changed_timestamp": "Fri, 15 Nov 2024 08:05:56 GMT" + }, + { + "base": "libraries", + "etag": "0x8DD054C5594A96F", + "last_changed_timestamp": 1741787282363, + "md5sum": "cd756a719c1892e56d9c9d424e8983bb", + "path": "net/java/dev/jna/jna/5.15.0/jna-5.15.0.jar", + "remote_changed_timestamp": "Fri, 15 Nov 2024 08:05:56 GMT" + }, + { + "base": "libraries", + "etag": "0x8DD054C550676F3", + "last_changed_timestamp": 1741787277943, + "md5sum": "51e60dbf9ac51f6666f0077317990944", + "path": "net/minidev/accessors-smart/2.5.1/accessors-smart-2.5.1.jar", + "remote_changed_timestamp": "Fri, 15 Nov 2024 08:05:55 GMT" + }, + { + "base": "libraries", + "etag": "0x8DD054C549AC0D3", + "last_changed_timestamp": 1741787278435, + "md5sum": "88a65001b616c2e7796f9263ad97bbf1", + "path": "net/minidev/json-smart/2.5.1/json-smart-2.5.1.jar", + "remote_changed_timestamp": "Fri, 15 Nov 2024 08:05:55 GMT" + }, + { + "base": "libraries", + "etag": "0x8DAB7EC4420E1F8", + "last_changed_timestamp": 1741787278607, + "md5sum": "eb0d9dffe9b0eddead68fe678be76c49", + "path": "net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.jar", + "remote_changed_timestamp": "Thu, 27 Oct 2022 07:24:20 GMT" + }, + { + "base": "libraries", + "etag": "0x8DD054C52C9451A", + "last_changed_timestamp": 1741787281272, + "md5sum": "1db4bd87b0082044c6e7a6af0b977a3e", + "path": "org/apache/commons/commons-compress/1.27.1/commons-compress-1.27.1.jar", + "remote_changed_timestamp": "Fri, 15 Nov 2024 08:05:52 GMT" + }, + { + "base": "libraries", + "etag": "0x8DD054C5261822A", + "last_changed_timestamp": 1741787280694, + "md5sum": "7730df72b7fdff4a3a32d89a314f826a", + "path": "org/apache/commons/commons-lang3/3.17.0/commons-lang3-3.17.0.jar", + "remote_changed_timestamp": "Fri, 15 Nov 2024 08:05:51 GMT" + }, + { + "base": "libraries", + "etag": "0x8DD054C530326C3", + "last_changed_timestamp": 1741787282713, + "md5sum": "2cb357c4b763f47e58af6cad47df6ba3", + "path": "org/apache/httpcomponents/httpclient/4.5.14/httpclient-4.5.14.jar", + "remote_changed_timestamp": "Fri, 15 Nov 2024 08:05:52 GMT" + }, + { + "base": "libraries", + "etag": "0x8DBA8624587D567", + "last_changed_timestamp": 1741787282217, + "md5sum": "28d2cd9bf8789fd2ec774fb88436ebd1", + "path": "org/apache/httpcomponents/httpcore/4.4.16/httpcore-4.4.16.jar", + "remote_changed_timestamp": "Tue, 29 Aug 2023 07:33:42 GMT" + }, + { + "base": "libraries", + "etag": "0x8DD054C520A2785", + "last_changed_timestamp": 1741787283154, + "md5sum": "4dac8bc9a21f3503cd1a856503b6fea0", + "path": "org/apache/logging/log4j/log4j-api/2.24.1/log4j-api-2.24.1.jar", + "remote_changed_timestamp": "Fri, 15 Nov 2024 08:05:50 GMT" + }, + { + "base": "libraries", + "etag": "0x8DD054C519C77D6", + "last_changed_timestamp": 1741787287115, + "md5sum": "fd982d71f36250bc31528fc7e3d0807d", + "path": "org/apache/logging/log4j/log4j-core/2.24.1/log4j-core-2.24.1.jar", + "remote_changed_timestamp": "Fri, 15 Nov 2024 08:05:50 GMT" + }, + { + "base": "libraries", + "etag": "0x8DD054C51E6E8AE", + "last_changed_timestamp": 1741787282540, + "md5sum": "033362ddeac79ba54fdc33cc2004d445", + "path": "org/apache/logging/log4j/log4j-slf4j2-impl/2.24.1/log4j-slf4j2-impl-2.24.1.jar", + "remote_changed_timestamp": "Fri, 15 Nov 2024 08:05:50 GMT" + }, + { + "base": "libraries", + "etag": "0x8DC3A103D72187B", + "last_changed_timestamp": 1741787282895, + "md5sum": "4794379b6074b962bb4cab21bfdb8d9c", + "path": "org/jcraft/jorbis/0.0.17/jorbis-0.0.17.jar", + "remote_changed_timestamp": "Fri, 01 Mar 2024 16:54:20 GMT" + }, + { + "base": "libraries", + "etag": "0x8DD054C513A7AC1", + "last_changed_timestamp": 1741787284243, + "md5sum": "58a4c6e7475f1121bfd390a819e62c98", + "path": "org/joml/joml/1.10.8/joml-1.10.8.jar", + "remote_changed_timestamp": "Fri, 15 Nov 2024 08:05:49 GMT" + }, + { + "base": "libraries", + "etag": "0x8DC4CD0C44385BF", + "last_changed_timestamp": 1741787286495, + "md5sum": "7da8d8e06e7315c6c877ae5e542407b6", + "path": "org/lwjgl/lwjgl-freetype/3.3.3/lwjgl-freetype-3.3.3-natives-linux.jar", + "remote_changed_timestamp": "Mon, 25 Mar 2024 13:37:50 GMT" + }, + { + "base": "libraries", + "etag": "0x8DC4CD0C4FB9761", + "last_changed_timestamp": 1741787284060, + "md5sum": "4506c5f102d10aab0dae80214579352c", + "path": "org/lwjgl/lwjgl-freetype/3.3.3/lwjgl-freetype-3.3.3.jar", + "remote_changed_timestamp": "Mon, 25 Mar 2024 13:37:52 GMT" + }, + { + "base": "libraries", + "etag": "0x8DC4CD0C52734E1", + "last_changed_timestamp": 1741787284465, + "md5sum": "9b31da2f80cbbdc6d76b72c8ac2cf943", + "path": "org/lwjgl/lwjgl-glfw/3.3.3/lwjgl-glfw-3.3.3-natives-linux.jar", + "remote_changed_timestamp": "Mon, 25 Mar 2024 13:37:52 GMT" + }, + { + "base": "libraries", + "etag": "0x8DC4CD0C5BF8E23", + "last_changed_timestamp": 1741787284406, + "md5sum": "41c1287c1219fd0b67e8d51879f4c812", + "path": "org/lwjgl/lwjgl-glfw/3.3.3/lwjgl-glfw-3.3.3.jar", + "remote_changed_timestamp": "Mon, 25 Mar 2024 13:37:53 GMT" + }, + { + "base": "libraries", + "etag": "0x8DC4CD0C6B5B12A", + "last_changed_timestamp": 1741787285019, + "md5sum": "a3867865fad43f2ccb6b20dea405b3c8", + "path": "org/lwjgl/lwjgl-jemalloc/3.3.3/lwjgl-jemalloc-3.3.3-natives-linux.jar", + "remote_changed_timestamp": "Mon, 25 Mar 2024 13:37:55 GMT" + }, + { + "base": "libraries", + "etag": "0x8DC4CD0C69FBB55", + "last_changed_timestamp": 1741787284630, + "md5sum": "a8ffc7d8a0d54981f1d7b5c2a40acf01", + "path": "org/lwjgl/lwjgl-jemalloc/3.3.3/lwjgl-jemalloc-3.3.3.jar", + "remote_changed_timestamp": "Mon, 25 Mar 2024 13:37:54 GMT" + }, + { + "base": "libraries", + "etag": "0x8DC4CD0C329B354", + "last_changed_timestamp": 1741787286930, + "md5sum": "82bec56d8f88b000b29550c5946bada4", + "path": "org/lwjgl/lwjgl-openal/3.3.3/lwjgl-openal-3.3.3-natives-linux.jar", + "remote_changed_timestamp": "Mon, 25 Mar 2024 13:37:49 GMT" + }, + { + "base": "libraries", + "etag": "0x8DC4CD0C30519A1", + "last_changed_timestamp": 1741787284996, + "md5sum": "3ae8606b16891af57eb08ed5a6f78ed8", + "path": "org/lwjgl/lwjgl-openal/3.3.3/lwjgl-openal-3.3.3.jar", + "remote_changed_timestamp": "Mon, 25 Mar 2024 13:37:48 GMT" + }, + { + "base": "libraries", + "etag": "0x8DC4CD0C68A13A2", + "last_changed_timestamp": 1741787286792, + "md5sum": "de05e5c258591d07d294a9c16096a383", + "path": "org/lwjgl/lwjgl-opengl/3.3.3/lwjgl-opengl-3.3.3-natives-linux.jar", + "remote_changed_timestamp": "Mon, 25 Mar 2024 13:37:54 GMT" + }, + { + "base": "libraries", + "etag": "0x8DC4CD0C5FAB9C7", + "last_changed_timestamp": 1741787287223, + "md5sum": "d5a85fe9c675ff040197e2e2dd694fc1", + "path": "org/lwjgl/lwjgl-opengl/3.3.3/lwjgl-opengl-3.3.3.jar", + "remote_changed_timestamp": "Mon, 25 Mar 2024 13:37:53 GMT" + }, + { + "base": "libraries", + "etag": "0x8DC4CD0C7BFCE76", + "last_changed_timestamp": 1741787287830, + "md5sum": "23a604402c5e9527ecce65e66086308a", + "path": "org/lwjgl/lwjgl-stb/3.3.3/lwjgl-stb-3.3.3-natives-linux.jar", + "remote_changed_timestamp": "Mon, 25 Mar 2024 13:37:56 GMT" + }, + { + "base": "libraries", + "etag": "0x8DC4CD0C74FDEE5", + "last_changed_timestamp": 1741787287164, + "md5sum": "11b824be2cd8532eb6ef063ada6a75bd", + "path": "org/lwjgl/lwjgl-stb/3.3.3/lwjgl-stb-3.3.3.jar", + "remote_changed_timestamp": "Mon, 25 Mar 2024 13:37:56 GMT" + }, + { + "base": "libraries", + "etag": "0x8DC4CD0C822EEA1", + "last_changed_timestamp": 1741787287441, + "md5sum": "36797f4097de3e127cefc1ed5aa09f02", + "path": "org/lwjgl/lwjgl-tinyfd/3.3.3/lwjgl-tinyfd-3.3.3-natives-linux.jar", + "remote_changed_timestamp": "Mon, 25 Mar 2024 13:37:57 GMT" + }, + { + "base": "libraries", + "etag": "0x8DC4CD0C82D9B79", + "last_changed_timestamp": 1741787287291, + "md5sum": "c687eaba9debbc609df72ab45f4e1164", + "path": "org/lwjgl/lwjgl-tinyfd/3.3.3/lwjgl-tinyfd-3.3.3.jar", + "remote_changed_timestamp": "Mon, 25 Mar 2024 13:37:57 GMT" + }, + { + "base": "libraries", + "etag": "0x8DC4CD0C3F808CE", + "last_changed_timestamp": 1741787287856, + "md5sum": "be04104b73f6154ceb5fdfa651e07e84", + "path": "org/lwjgl/lwjgl/3.3.3/lwjgl-3.3.3-natives-linux.jar", + "remote_changed_timestamp": "Mon, 25 Mar 2024 13:37:50 GMT" + }, + { + "base": "libraries", + "etag": "0x8DC4CD0C40748DB", + "last_changed_timestamp": 1741787289015, + "md5sum": "d89fce0be944d8cffd1f82c6546509bf", + "path": "org/lwjgl/lwjgl/3.3.3/lwjgl-3.3.3.jar", + "remote_changed_timestamp": "Mon, 25 Mar 2024 13:37:50 GMT" + }, + { + "base": "libraries", + "etag": "0x8DC1CC20CCAC2F0", + "last_changed_timestamp": 1741787289591, + "md5sum": "936a927700aa8fc3b75d21d7571171f6", + "path": "org/lz4/lz4-java/1.8.0/lz4-java-1.8.0.jar", + "remote_changed_timestamp": "Wed, 24 Jan 2024 09:51:34 GMT" + }, + { + "base": "libraries", + "etag": "0x8DD054C536B109B", + "last_changed_timestamp": 1741787288294, + "md5sum": "6f8bccf756f170d4185bb24c8c2d2020", + "path": "org/ow2/asm/asm/9.6/asm-9.6.jar", + "remote_changed_timestamp": "Fri, 15 Nov 2024 08:05:53 GMT" + }, + { + "base": "libraries", + "etag": "0x8DD054C534B9E10", + "last_changed_timestamp": 1741787288137, + "md5sum": "c8de8f5d740584cb24b5652cfba8b3c4", + "path": "org/slf4j/slf4j-api/2.0.16/slf4j-api-2.0.16.jar", + "remote_changed_timestamp": "Fri, 15 Nov 2024 08:05:52 GMT" + }, + { + "base": "meta", + "etag": "W/\"67d1b06c-6b3\"", + "last_changed_timestamp": 1741796066274, + "md5sum": "cf2ef84d8b941ed397e73ad3f99b1515", + "path": "index.json", + "remote_changed_timestamp": "Wed, 12 Mar 2025 16:03:56 GMT" + }, + { + "base": "meta", + "etag": "W/\"67d1b06c-10be2\"", + "last_changed_timestamp": 1741796066680, + "md5sum": "b2cbeddaca7ad3c3219dfbe6cead381e", + "path": "net.minecraft/1.21.4.json", + "remote_changed_timestamp": "Wed, 12 Mar 2025 16:03:56 GMT" + }, + { + "base": "meta", + "etag": "W/\"67d1b06d-4f79c\"", + "last_changed_timestamp": 1741796189155, + "md5sum": "947e142002eecb37abae388519809f17", + "path": "net.minecraft/index.json", + "remote_changed_timestamp": "Wed, 12 Mar 2025 16:03:57 GMT" + }, + { + "base": "root", + "etag": "\"550e6bb5-356\"", + "last_changed_timestamp": 1741787183638, + "md5sum": "a8a8094545267c76ad51fe276b0e9e8f", + "path": "notifications.json", + "remote_changed_timestamp": "Sun, 22 Mar 2015 07:13:57 GMT" + }, + { + "base": "translations", + "etag": "\"678d1f1a-3e3b\"", + "last_changed_timestamp": 1741787162461, + "md5sum": "e9a6cb5c7168458327f5ea6c5f0b6ebc", + "path": "index_v2.json", + "remote_changed_timestamp": "Sun, 19 Jan 2025 15:49:46 GMT" + }, + { + "base": "translations", + "etag": "\"678d1f1a-22df3\"", + "last_changed_timestamp": 1741787170329, + "md5sum": "8dd856913c4c78006bc4c5ddafba720b", + "path": "mmc_ru.qm", + "remote_changed_timestamp": "Sun, 19 Jan 2025 15:49:46 GMT" + } + ], + "version": "1" +} diff --git a/data/minceraft/translations/index_v2.json b/data/minceraft/translations/index_v2.json new file mode 100755 index 0000000..dd69a47 --- /dev/null +++ b/data/minceraft/translations/index_v2.json @@ -0,0 +1,454 @@ +{ + "file_type" : "MMC-TRANSLATION-INDEX", + "version" : 2, + "languages" : { + "ar" : { + "file" : "eb6a15e60a23901ea6a8005d8e9125bed4922f3d.class", + "sha1" : "eb6a15e60a23901ea6a8005d8e9125bed4922f3d", + "size" : 126775, + "translated" : 988, + "fuzzy" : 0, + "untranslated" : 105 + }, + "be" : { + "file" : "339e0b746e7908755f426b0d1c350acb072079d8.class", + "sha1" : "339e0b746e7908755f426b0d1c350acb072079d8", + "size" : 140090, + "translated" : 1024, + "fuzzy" : 0, + "untranslated" : 69 + }, + "bg" : { + "file" : "b6395a0c931c2e2a880224cee74d01fa969467c1.class", + "sha1" : "b6395a0c931c2e2a880224cee74d01fa969467c1", + "size" : 112989, + "translated" : 816, + "fuzzy" : 0, + "untranslated" : 277 + }, + "ca" : { + "file" : "57cdcee61737e6c0f7218899558e67fecea9e262.class", + "sha1" : "57cdcee61737e6c0f7218899558e67fecea9e262", + "size" : 141064, + "translated" : 975, + "fuzzy" : 0, + "untranslated" : 118 + }, + "cs" : { + "file" : "8b2ecbc4e2a439f27bdcaab5b2189c02cbcd079c.class", + "sha1" : "8b2ecbc4e2a439f27bdcaab5b2189c02cbcd079c", + "size" : 138537, + "translated" : 1024, + "fuzzy" : 0, + "untranslated" : 69 + }, + "cy" : { + "file" : "5c65378e6b7933dbf45ed7dd2a0deb0836d45de9.class", + "sha1" : "5c65378e6b7933dbf45ed7dd2a0deb0836d45de9", + "size" : 76254, + "translated" : 551, + "fuzzy" : 0, + "untranslated" : 542 + }, + "da" : { + "file" : "6fd5896ee6ed59f6803a446a8445b2f4e236268b.class", + "sha1" : "6fd5896ee6ed59f6803a446a8445b2f4e236268b", + "size" : 66801, + "translated" : 550, + "fuzzy" : 0, + "untranslated" : 543 + }, + "de" : { + "file" : "144b5c6ceb391a6b2e196356344d7e9abca97b88.class", + "sha1" : "144b5c6ceb391a6b2e196356344d7e9abca97b88", + "size" : 147827, + "translated" : 1024, + "fuzzy" : 0, + "untranslated" : 69 + }, + "de_CH" : { + "file" : "df553b69076153b1b9e0dcd045ebaf614a1703bc.class", + "sha1" : "df553b69076153b1b9e0dcd045ebaf614a1703bc", + "size" : 147899, + "translated" : 1024, + "fuzzy" : 0, + "untranslated" : 69 + }, + "el" : { + "file" : "48fdfc6fef33430de278a80a6a47db38e21bb78f.class", + "sha1" : "48fdfc6fef33430de278a80a6a47db38e21bb78f", + "size" : 142770, + "translated" : 986, + "fuzzy" : 0, + "untranslated" : 107 + }, + "en_GB" : { + "file" : "b1e7c270b460947711de28fbc7e6eabf292db4e0.class", + "sha1" : "b1e7c270b460947711de28fbc7e6eabf292db4e0", + "size" : 136327, + "translated" : 1024, + "fuzzy" : 0, + "untranslated" : 69 + }, + "eo" : { + "file" : "b3386dfd7d2c263598ebaf1950eb94e1cf20a5ab.class", + "sha1" : "b3386dfd7d2c263598ebaf1950eb94e1cf20a5ab", + "size" : 24371, + "translated" : 218, + "fuzzy" : 0, + "untranslated" : 875 + }, + "es" : { + "file" : "c98f678f9356e19ef6b8017b40a3c92de9643f07.class", + "sha1" : "c98f678f9356e19ef6b8017b40a3c92de9643f07", + "size" : 155344, + "translated" : 1074, + "fuzzy" : 0, + "untranslated" : 19 + }, + "es_UY" : { + "file" : "2e7156bb88c2bec8a0ed2c010aba81b822f1cd6d.class", + "sha1" : "2e7156bb88c2bec8a0ed2c010aba81b822f1cd6d", + "size" : 148293, + "translated" : 1024, + "fuzzy" : 0, + "untranslated" : 69 + }, + "et" : { + "file" : "e14f350b7de44997805853f859a0451a16ac483f.class", + "sha1" : "e14f350b7de44997805853f859a0451a16ac483f", + "size" : 110023, + "translated" : 881, + "fuzzy" : 0, + "untranslated" : 212 + }, + "fa" : { + "file" : "756c328866b85302445ec1ae55e11b4c10831fda.class", + "sha1" : "756c328866b85302445ec1ae55e11b4c10831fda", + "size" : 135579, + "translated" : 1020, + "fuzzy" : 0, + "untranslated" : 73 + }, + "fi" : { + "file" : "bdc7421f620fced85d84fd05ce7a2ef9eb89c3e1.class", + "sha1" : "bdc7421f620fced85d84fd05ce7a2ef9eb89c3e1", + "size" : 141197, + "translated" : 1024, + "fuzzy" : 0, + "untranslated" : 69 + }, + "fr" : { + "file" : "c3172e77e068e615c3bf4a447361f4b7ef0da764.class", + "sha1" : "c3172e77e068e615c3bf4a447361f4b7ef0da764", + "size" : 164857, + "translated" : 1093, + "fuzzy" : 0, + "untranslated" : 0 + }, + "gl" : { + "file" : "495c4cc380a80fa25163a2a2622f2643414831f0.class", + "sha1" : "495c4cc380a80fa25163a2a2622f2643414831f0", + "size" : 156017, + "translated" : 1093, + "fuzzy" : 0, + "untranslated" : 0 + }, + "he" : { + "file" : "5c4fac508c9c85f001980d11c6a6b64d26c4c510.class", + "sha1" : "5c4fac508c9c85f001980d11c6a6b64d26c4c510", + "size" : 127071, + "translated" : 1024, + "fuzzy" : 0, + "untranslated" : 69 + }, + "hu" : { + "file" : "37bd219c4a50c12ba70a0108f5fb5153731ee3a0.class", + "sha1" : "37bd219c4a50c12ba70a0108f5fb5153731ee3a0", + "size" : 144644, + "translated" : 1024, + "fuzzy" : 0, + "untranslated" : 69 + }, + "hy" : { + "file" : "2b6b042c110594ec1e8af5c77ba9e91d34030c3e.class", + "sha1" : "2b6b042c110594ec1e8af5c77ba9e91d34030c3e", + "size" : 6603, + "translated" : 102, + "fuzzy" : 0, + "untranslated" : 991 + }, + "id" : { + "file" : "a6e0bf75acff59c31c49265b5414170f50e0e2e5.class", + "sha1" : "a6e0bf75acff59c31c49265b5414170f50e0e2e5", + "size" : 135268, + "translated" : 984, + "fuzzy" : 0, + "untranslated" : 109 + }, + "is" : { + "file" : "061661de40508f2b5c044bbf7df314a2897768a4.class", + "sha1" : "061661de40508f2b5c044bbf7df314a2897768a4", + "size" : 11020, + "translated" : 145, + "fuzzy" : 0, + "untranslated" : 948 + }, + "it" : { + "file" : "f91c8470d31c6485417df6840c2638a21a80f8b1.class", + "sha1" : "f91c8470d31c6485417df6840c2638a21a80f8b1", + "size" : 153828, + "translated" : 1061, + "fuzzy" : 0, + "untranslated" : 32 + }, + "ja" : { + "file" : "c8cb1d373557a58e5e85c5fc628f40233660dcf3.class", + "sha1" : "c8cb1d373557a58e5e85c5fc628f40233660dcf3", + "size" : 110002, + "translated" : 1016, + "fuzzy" : 0, + "untranslated" : 77 + }, + "ja_KANJI" : { + "file" : "509c74b64179f0bac0d07c794b3f2ac73d8c8b00.class", + "sha1" : "509c74b64179f0bac0d07c794b3f2ac73d8c8b00", + "size" : 107852, + "translated" : 997, + "fuzzy" : 0, + "untranslated" : 96 + }, + "jv" : { + "file" : "4884fd9af6890647b7af1aefa57f38cca49ad899.class", + "sha1" : "4884fd9af6890647b7af1aefa57f38cca49ad899", + "size" : 16, + "translated" : 0, + "fuzzy" : 0, + "untranslated" : 1030 + }, + "ka" : { + "file" : "f50883cad9dd7abbadba01a4303cfd1014ae2b21.class", + "sha1" : "f50883cad9dd7abbadba01a4303cfd1014ae2b21", + "size" : 34461, + "translated" : 253, + "fuzzy" : 0, + "untranslated" : 840 + }, + "kn" : { + "file" : "2aa2d42c51f9cf024e3777f0dde4270388fd22ae.class", + "sha1" : "2aa2d42c51f9cf024e3777f0dde4270388fd22ae", + "size" : 23, + "translated" : 0, + "fuzzy" : 0, + "untranslated" : 1030 + }, + "ko" : { + "file" : "5e5506a3c2ea90e1c396b54f070a2620f20fbe30.class", + "sha1" : "5e5506a3c2ea90e1c396b54f070a2620f20fbe30", + "size" : 112422, + "translated" : 1024, + "fuzzy" : 0, + "untranslated" : 69 + }, + "lb" : { + "file" : "e588e4755a1e407314bf3753572744514e04bea6.class", + "sha1" : "e588e4755a1e407314bf3753572744514e04bea6", + "size" : 21524, + "translated" : 152, + "fuzzy" : 0, + "untranslated" : 941 + }, + "lt" : { + "file" : "969a032f2aca58c6cd8def04aed39763e923077b.class", + "sha1" : "969a032f2aca58c6cd8def04aed39763e923077b", + "size" : 81459, + "translated" : 701, + "fuzzy" : 0, + "untranslated" : 392 + }, + "lv" : { + "file" : "4453f6a649d5a079b116aa742bac2207a796860c.class", + "sha1" : "4453f6a649d5a079b116aa742bac2207a796860c", + "size" : 139731, + "translated" : 1024, + "fuzzy" : 0, + "untranslated" : 69 + }, + "mk" : { + "file" : "5bd1feff346ff9e945079856554d174075d5f5c7.class", + "sha1" : "5bd1feff346ff9e945079856554d174075d5f5c7", + "size" : 13284, + "translated" : 86, + "fuzzy" : 0, + "untranslated" : 1007 + }, + "mn" : { + "file" : "ba4455b0bfcc24d23499587637aebc9ce283000e.class", + "sha1" : "ba4455b0bfcc24d23499587637aebc9ce283000e", + "size" : 145103, + "translated" : 1024, + "fuzzy" : 0, + "untranslated" : 69 + }, + "ms" : { + "file" : "0a2440c5ba866d5813b33fbaae04568dea18dfe8.class", + "sha1" : "0a2440c5ba866d5813b33fbaae04568dea18dfe8", + "size" : 128928, + "translated" : 958, + "fuzzy" : 0, + "untranslated" : 135 + }, + "nb" : { + "file" : "c5c8b5642165dcb28604bd40d7f2e6a508e51725.class", + "sha1" : "c5c8b5642165dcb28604bd40d7f2e6a508e51725", + "size" : 65006, + "translated" : 607, + "fuzzy" : 0, + "untranslated" : 486 + }, + "nl" : { + "file" : "3fced84194ef345022dddee84738bb8c742012c5.class", + "sha1" : "3fced84194ef345022dddee84738bb8c742012c5", + "size" : 145861, + "translated" : 1024, + "fuzzy" : 0, + "untranslated" : 69 + }, + "nn" : { + "file" : "9b568b72e01e6e3a805be3fcac81a8d2a81487e8.class", + "sha1" : "9b568b72e01e6e3a805be3fcac81a8d2a81487e8", + "size" : 137945, + "translated" : 1024, + "fuzzy" : 0, + "untranslated" : 69 + }, + "pl" : { + "file" : "a3060323d787011872c3d8aae9f2f6660a40cf9c.class", + "sha1" : "a3060323d787011872c3d8aae9f2f6660a40cf9c", + "size" : 143293, + "translated" : 1024, + "fuzzy" : 0, + "untranslated" : 69 + }, + "pt_PT" : { + "file" : "cba7ae8c6b93047045ab92a42651d5e9bdd654da.class", + "sha1" : "cba7ae8c6b93047045ab92a42651d5e9bdd654da", + "size" : 144795, + "translated" : 1024, + "fuzzy" : 0, + "untranslated" : 69 + }, + "pt_BR" : { + "file" : "f7c9ce421a50ce1f07e33c521bf63021eaabf39c.class", + "sha1" : "f7c9ce421a50ce1f07e33c521bf63021eaabf39c", + "size" : 141123, + "translated" : 1024, + "fuzzy" : 0, + "untranslated" : 69 + }, + "ro" : { + "file" : "937ae3c194c0857ed9b804a229efce92fa4c5674.class", + "sha1" : "937ae3c194c0857ed9b804a229efce92fa4c5674", + "size" : 144892, + "translated" : 1024, + "fuzzy" : 0, + "untranslated" : 69 + }, + "ru" : { + "file" : "6ef2160cd14f59f23bda3df995da9bdc7e28cbba.class", + "sha1" : "6ef2160cd14f59f23bda3df995da9bdc7e28cbba", + "size" : 142835, + "translated" : 1031, + "fuzzy" : 0, + "untranslated" : 62 + }, + "si" : { + "file" : "b156f906a02decf93cf1f988984c7b5a43409590.class", + "sha1" : "b156f906a02decf93cf1f988984c7b5a43409590", + "size" : 454, + "translated" : 7, + "fuzzy" : 0, + "untranslated" : 1086 + }, + "sk" : { + "file" : "f1d32f055feac63a4c9e773c3e66ab7b4ae35626.class", + "sha1" : "f1d32f055feac63a4c9e773c3e66ab7b4ae35626", + "size" : 139643, + "translated" : 1024, + "fuzzy" : 0, + "untranslated" : 69 + }, + "sl" : { + "file" : "8c66381fe0bf8e858a41bac30d28240c3c7d2d9a.class", + "sha1" : "8c66381fe0bf8e858a41bac30d28240c3c7d2d9a", + "size" : 83079, + "translated" : 599, + "fuzzy" : 0, + "untranslated" : 494 + }, + "sr" : { + "file" : "e28850462023c55c1ec87117f342039ff9251e6a.class", + "sha1" : "e28850462023c55c1ec87117f342039ff9251e6a", + "size" : 55187, + "translated" : 450, + "fuzzy" : 0, + "untranslated" : 643 + }, + "sv" : { + "file" : "99ab207f3d99a59b8173a2ee5eedb8cdb79e9b1a.class", + "sha1" : "99ab207f3d99a59b8173a2ee5eedb8cdb79e9b1a", + "size" : 134617, + "translated" : 990, + "fuzzy" : 0, + "untranslated" : 103 + }, + "th" : { + "file" : "805e8d895166a8942afc90fed6b693dee1a8b134.class", + "sha1" : "805e8d895166a8942afc90fed6b693dee1a8b134", + "size" : 48926, + "translated" : 405, + "fuzzy" : 0, + "untranslated" : 688 + }, + "tr" : { + "file" : "7454355d341c712932b707d70faec9d1f7ca3e7b.class", + "sha1" : "7454355d341c712932b707d70faec9d1f7ca3e7b", + "size" : 139854, + "translated" : 1024, + "fuzzy" : 0, + "untranslated" : 69 + }, + "uk" : { + "file" : "1ff78912f28968ee7149818c5fcb20d9ad123aee.class", + "sha1" : "1ff78912f28968ee7149818c5fcb20d9ad123aee", + "size" : 143599, + "translated" : 1038, + "fuzzy" : 0, + "untranslated" : 55 + }, + "vi" : { + "file" : "95cced97bbf4706976d133113aaebce1d8d6dd0e.class", + "sha1" : "95cced97bbf4706976d133113aaebce1d8d6dd0e", + "size" : 139812, + "translated" : 1024, + "fuzzy" : 0, + "untranslated" : 69 + }, + "zh" : { + "file" : "1764ce984b322bf8ab2f88f93c47db62261df4a3.class", + "sha1" : "1764ce984b322bf8ab2f88f93c47db62261df4a3", + "size" : 101420, + "translated" : 1024, + "fuzzy" : 0, + "untranslated" : 69 + }, + "zh_TW" : { + "file" : "53db715fc238e97bee26c4b2e537076324063979.class", + "sha1" : "53db715fc238e97bee26c4b2e537076324063979", + "size" : 108891, + "translated" : 1092, + "fuzzy" : 0, + "untranslated" : 1 + } + } +} diff --git a/data/minceraft/translations/mmc_ru.qm b/data/minceraft/translations/mmc_ru.qm new file mode 100755 index 0000000..140e845 Binary files /dev/null and b/data/minceraft/translations/mmc_ru.qm differ diff --git a/data/minceraft/ultimmc.cfg b/data/minceraft/ultimmc.cfg new file mode 100755 index 0000000..0cfee9a --- /dev/null +++ b/data/minceraft/ultimmc.cfg @@ -0,0 +1,51 @@ +Analytics=true +AutoCloseConsole=false +AutoUpdate=true +CentralModsDir=mods +ConsoleFont=DejaVu Sans Mono +ConsoleFontSize=11 +ConsoleMaxLines=100000 +ConsoleOverflowStop=true +ConsoleWindowGeometry=AdnQywADAAAAAAUCAAAAMAAAB30AAAStAAAAAAAAAAD////+/////gAAAAACAAAAB4AAAAUCAAAAMAAAB30AAASt +ConsoleWindowState=AAAA/wAAAAD9AAAAAAAAAnwAAAR+AAAABAAAAAQAAAAIAAAACPwAAAAA +IconTheme=multimc +IconsDir=icons +InstSortMode=Name +InstanceDir=instances +JProfilerPath= +JVisualVMPath= +JavaPath=java +JsonEditor= +JvmArgs= +Language=ru +LastHostname=minceraftos +LastUsedGroupForNewInstance= +LaunchMaximized=false +MCEditPath= +MainWindowGeometry=AdnQywADAAAAAAKCAAAAMAAABP0AAAStAAAAAAAAABQAAAPVAAACYwAAAAACAAAAB4AAAAKCAAAAMAAABP0AAASt +MainWindowState=AAAA/wAAAAD9AAAAAAAAAZoAAAQiAAAABAAAAAQAAAAIAAAACPwAAAADAAAAAQAAAAEAAAAeAGkAbgBzAHQAYQBuAGMAZQBUAG8AbwBsAEIAYQByAwAAAAD/////AAAAAAAAAAAAAAACAAAAAQAAABYAbQBhAGkAbgBUAG8AbwBsAEIAYQByAQAAAAD/////AAAAAAAAAAAAAAADAAAAAQAAABYAbgBlAHcAcwBUAG8AbwBsAEIAYQByAQAAAAD/////AAAAAAAAAAA= +MaxMemAlloc=1024 +MinMemAlloc=512 +MinecraftWinHeight=480 +MinecraftWinWidth=854 +NewInstanceGeometry=AdnQywADAAAAAAJTAAABhQAABSwAAANBAAACUwAAAYUAAAUsAAADQQAAAAAAAAAAB4AAAAJTAAABhQAABSwAAANB +PagedGeometry=AdnQywADAAAAAAIuAAAA5QAABVAAAAPhAAACLgAAAOUAAAVQAAAD4QAAAAAAAAAAB4AAAAIuAAAA5QAABVAAAAPh +PasteEEAPIKey=multimc +PostExitCommand= +PreLaunchCommand= +ProxyAddr=127.0.0.1 +ProxyPass= +ProxyPort=8080 +ProxyType=None +ProxyUser= +RecordGameTime=true +SelectedInstance=1.21.4 +ShowConsole=false +ShowConsoleOnError=true +ShowGameTime=true +ShowGameTimeHours=false +ShowGlobalGameTime=true +ShownNotifications= +UseNativeGLFW=false +UseNativeOpenAL=false +WrapperCommand= diff --git a/data/splash.png b/data/splash.png new file mode 100644 index 0000000..f0e3a9a Binary files /dev/null and b/data/splash.png differ diff --git a/data/xinitrc b/data/xinitrc new file mode 100755 index 0000000..04bb6bd --- /dev/null +++ b/data/xinitrc @@ -0,0 +1,4 @@ +xsetroot -cursor_name arrow +cd /home/player/minceraft +export INST_JAVA=java +exec ./UltimMC -n Steve -o -l 1.21.4 diff --git a/dracut/autoinstaller/autoinstall.cfg b/dracut/autoinstaller/autoinstall.cfg new file mode 100644 index 0000000..0e04be7 --- /dev/null +++ b/dracut/autoinstaller/autoinstall.cfg @@ -0,0 +1,76 @@ +#!/bin/sh +# Void Linux Automatic Install Configuration + +# === +# Disk Configuration +# === +# disk: the disk to install to +# default: the first disk that isn't the installer +#disk=/dev/hda + +# bootpartitionsize: controls how large the boot partition will be +# default: 500M +#bootpartitionsize=500M + +# swapsize: how large should the swap partition be +# default: equal to the installed physical memory +#swapsize= + +# === +# XBPS Configuration +# === +# xbpsrepository: which repo should the install pull from +# default: https://repo-default.voidlinux.org/current +#xbpsrepository="https://repo-default.voidlinux.org/current" + +# pkgs: additional packages to install into the target +# default: none +#pkgs="" + +# === +# Default User +# === +# username: the username of the user to be created +# default: voidlinux +username=player + +# password: password to set for the new user +# default: unset (will prompt during install) +# Warning: This does not work in musl! +password=password + +# === +# Misc. Options +# === +# timezone: Timezone in TZ format +# default: America/Chicago +#timezone="America/Chicago" + +# keymap: Keymap to use by default +# default: us +#keymap="us" + +# locale: initial glibc locale +# default: en_US.UTF-8 +#libclocale=en.US.UTF-8 + +# hostname: static hostname for the system +# default: derived from DNS +hostname=MinceraftOS + +# end_action: what to do at the end of the install +# default: shutdown +# alternate values: reboot, script, func +#end_action=shutdown + +# end_script: script to optionally run at end of install +# the user script must reside somewhere xbps-uhelper fetch +# can retrieve it from +# default: not set +#end_script="" + +# end_function: a function to optionally be run at +# the end of the install. +#end_function() { +# +#} diff --git a/dracut/autoinstaller/install.sh b/dracut/autoinstaller/install.sh new file mode 100755 index 0000000..4df5e7d --- /dev/null +++ b/dracut/autoinstaller/install.sh @@ -0,0 +1,310 @@ +#!/bin/sh + +type getargbool >/dev/null 2>&1 || . /lib/dracut-lib.sh + +# These functions pulled from void's excellent mklive.sh +VAI_info_msg() { + printf "\033[1m%s\n\033[m" "$@" +} + +VAI_print_step() { + CURRENT_STEP=$((CURRENT_STEP+1)) + VAI_info_msg "[${CURRENT_STEP}/${STEP_COUNT}] $*" +} + +# ----------------------- Install Functions ------------------------ + +VAI_welcome() { + clear + printf "=============================================================\n" + printf "================ Void Linux Auto-Installer ==================\n" + printf "=============================================================\n" +} + +VAI_udev_settle() { + /usr/bin/udevd --daemon + /usr/bin/udevadm trigger --action=add --type=subsystems + /usr/bin/udevadm trigger --action=add --type=devices + /usr/bin/udevadm settle +} + +VAI_get_address() { + mkdir -p /var/lib/dhclient + + # This will fork, but it means that over a slow link the DHCP + # lease will still be maintained. It also doesn't have a + # hard-coded privsep user in it like dhcpcd. + dhclient +} + +VAI_partition_disk() { + # Paritition Disk + sfdisk "${disk}" < "${target}/etc/sudoers.d/00-wheel" + chmod 0440 "${target}/etc/sudoers.d/00-wheel" +} + +VAI_correct_root_permissions() { + chroot "${target}" chown root:root / + chroot "${target}" chmod 755 / +} + +VAI_configure_hostname() { + # Set the hostname + echo "${hostname}" > "${target}/etc/hostname" +} + +VAI_configure_rc_conf() { + # Set the value of various tokens + sed -i "s:Europe/Madrid:${timezone}:" "${target}/etc/rc.conf" + sed -i "s:\"es\":\"${keymap}\":" "${target}/etc/rc.conf" + + # Activate various tokens + sed -i "s:#HARDWARECLOCK:HARDWARECLOCK:" "${target}/etc/rc.conf" + sed -i "s:#TIMEZONE:TIMEZONE:" "${target}/etc/rc.conf" + sed -i "s:#KEYMAP:KEYMAP:" "${target}/etc/rc.conf" +} + +VAI_add_user() { + chroot "${target}" useradd -m -s /bin/bash -U -G wheel,users,audio,video,cdrom,input "${username}" + if [ -z "${password}" ] ; then + chroot "${target}" passwd "${username}" + else + # For reasons that remain unclear, this does not work in musl + echo "${username}:${password}" | chpasswd -c SHA512 -R "${target}" +fi +} + +VAI_configure_grub() { + # Set hostonly + echo "hostonly=yes" > "${target}/etc/dracut.conf.d/hostonly.conf" + + # Choose the newest kernel + kernel_version="$(chroot "${target}" xbps-query linux | awk -F "[-_]" '/pkgver/ {print $2}')" + + # Install grub + chroot "${target}" grub-install "${disk}" + chroot "${target}" xbps-reconfigure -f "linux${kernel_version}" + + # Correct the grub install + chroot "${target}" update-grub +} + +VAI_configure_fstab() { + # Grab UUIDs + uuid1="$(blkid -s UUID -o value "${disk}1")" + uuid2="$(blkid -s UUID -o value "${disk}2")" + uuid3="$(blkid -s UUID -o value "${disk}3")" + + # Installl UUIDs into /etc/fstab + echo "UUID=$uuid3 / ext4 defaults,errors=remount-ro 0 1" >> "${target}/etc/fstab" + echo "UUID=$uuid1 /boot ext4 defaults 0 2" >> "${target}/etc/fstab" + if [ "${swapsize}" -ne 0 ] ; then + echo "UUID=$uuid2 swap swap defaults 0 0" >> "${target}/etc/fstab" + fi +} + +VAI_configure_locale() { + # Set the libc-locale iff glibc + case "${XBPS_ARCH}" in + *-musl) + VAI_info_msg "Glibc locales are not supported on musl" + ;; + *) + sed -i "/${libclocale}/s/#//" "${target}/etc/default/libc-locales" + + chroot "${target}" xbps-reconfigure -f glibc-locales + ;; + esac +} + +VAI_end_action() { + case $end_action in + reboot) + VAI_info_msg "Rebooting the system" + sync + umount -R "${target}" + reboot -f + ;; + shutdown) + VAI_info_msg "Shutting down the system" + sync + umount -R "${target}" + poweroff -f + ;; + script) + VAI_info_msg "Running user provided script" + xbps-uhelper fetch "${end_script}>/script" + chmod +x /script + target=${target} xbpsrepository=${xbpsrepository} /script + ;; + func) + VAI_info_msg "Running user provided function" + end_function + ;; + esac +} + +VAI_configure_autoinstall() { + # -------------------------- Setup defaults --------------------------- + bootpartitionsize="500M" + disk="$(lsblk -ipo NAME,TYPE,MOUNTPOINT | awk '{if ($2=="disk") {disks[$1]=0; last=$1} if ($3=="/") {disks[last]++}} END {for (a in disks) {if(disks[a] == 0){print a; break}}}')" + hostname="$(ip -4 -o -r a | awk -F'[ ./]' '{x=$7} END {print x}')" + # XXX: Set a manual swapsize here if the default doesn't fit your use case + swapsize="$(awk -F"\n" '/MemTotal/ {split($0, b, " "); print b[2] }' /proc/meminfo)"; + target="/mnt" + timezone="America/Chicago" + keymap="us" + libclocale="en_US.UTF-8" + username="voidlinux" + end_action="shutdown" + end_script="/bin/true" + + XBPS_ARCH="$(xbps-uhelper arch)" + case $XBPS_ARCH in + *-musl) + xbpsrepository="https://repo-default.voidlinux.org/current/musl" + ;; + *) + xbpsrepository="https://repo-default.voidlinux.org/current" + ;; + esac + + # --------------- Pull config URL out of kernel cmdline ------------------------- + set +e + if getargbool 0 autourl ; then + set -e + xbps-uhelper fetch "$(getarg autourl)>/etc/autoinstall.cfg" + + else + set -e + mv /etc/autoinstall.default /etc/autoinstall.cfg + fi + + # Read in the resulting config file which we got via some method + if [ -f /etc/autoinstall.cfg ] ; then + VAI_info_msg "Reading configuration file" + . ./etc/autoinstall.cfg + fi + + # Bail out if we didn't get a usable disk + if [ -z "$disk" ] ; then + die "No valid disk!" + fi +} + +VAI_main() { + CURRENT_STEP=0 + STEP_COUNT=17 + + VAI_welcome + + VAI_print_step "Wait on hardware" + VAI_udev_settle + + VAI_print_step "Bring up the network" + VAI_get_address + + VAI_print_step "Configuring installer" + VAI_configure_autoinstall + + VAI_print_step "Configuring disk using scheme 'Atomic'" + VAI_partition_disk + VAI_format_disk + + VAI_print_step "Mounting the target filesystems" + VAI_mount_target + + VAI_print_step "Installing XBPS keys" + VAI_install_xbps_keys + + VAI_print_step "Installing the base system" + VAI_install_base_system + + VAI_print_step "Granting sudo to default user" + VAI_configure_sudo + + VAI_print_step "Setting hostname" + VAI_configure_hostname + + VAI_print_step "Configure rc.conf" + VAI_configure_rc_conf + + VAI_print_step "Preparing the chroot" + VAI_prepare_chroot + + VAI_print_step "Fix ownership of /" + VAI_correct_root_permissions + + VAI_print_step "Adding default user" + VAI_add_user + + VAI_print_step "Configuring GRUB" + VAI_configure_grub + + VAI_print_step "Configuring /etc/fstab" + VAI_configure_fstab + + VAI_print_step "Configuring libc-locales" + VAI_configure_locale + + VAI_print_step "Performing end-action" + VAI_end_action +} + +# If we are using the autoinstaller, launch it +if getargbool 0 auto ; then + set -e + VAI_main + # Very important to release this before returning to dracut code + set +e +fi + diff --git a/dracut/autoinstaller/module-setup.sh b/dracut/autoinstaller/module-setup.sh new file mode 100644 index 0000000..6dd84cc --- /dev/null +++ b/dracut/autoinstaller/module-setup.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh + +check() { + return 255 +} + +depends() { + echo network +} + +install() { + inst /usr/bin/awk + inst /usr/bin/chmod + inst /usr/bin/chroot + inst /usr/bin/clear + inst /usr/bin/cp + inst /usr/bin/chpasswd + inst /usr/bin/dhclient + inst /usr/bin/dhclient-script + inst /usr/bin/halt + inst /usr/bin/install + inst /usr/bin/lsblk + inst /usr/bin/mkdir + inst /usr/bin/mkfs.ext4 + inst /usr/bin/mkswap + inst /usr/bin/mount + inst /usr/bin/resolvconf + inst /usr/bin/sfdisk + inst /usr/bin/sync + inst /usr/bin/xbps-install + inst /usr/bin/xbps-uhelper + inst /usr/bin/xbps-query + + inst_multiple /var/db/xbps/keys/* + inst_multiple /usr/share/xbps.d/* + + inst_multiple /etc/ssl/certs/* + inst /etc/ssl/certs.pem + + inst_hook pre-mount 01 "$moddir/install.sh" + inst_hook cmdline 99 "$moddir/parse-vai-root.sh" + inst "$moddir/autoinstall.cfg" /etc/autoinstall.default +} diff --git a/dracut/autoinstaller/parse-vai-root.sh b/dracut/autoinstaller/parse-vai-root.sh new file mode 100644 index 0000000..baa4a18 --- /dev/null +++ b/dracut/autoinstaller/parse-vai-root.sh @@ -0,0 +1,4 @@ +#!/bin/sh +if [ "${root}" = "vai" ] ; then + rootok=1 +fi diff --git a/dracut/netmenu/module-setup.sh b/dracut/netmenu/module-setup.sh new file mode 100644 index 0000000..5ba5318 --- /dev/null +++ b/dracut/netmenu/module-setup.sh @@ -0,0 +1,86 @@ +#!/bin/bash +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh + +check() { + return 255 +} + +depends() { + echo network +} + +install() { + inst /usr/bin/awk + inst /usr/bin/basename + inst /usr/bin/bash + inst /usr/bin/cat + inst /usr/bin/cfdisk + inst /usr/bin/chroot + inst /usr/bin/clear + inst /usr/bin/cut + inst /usr/bin/cp + inst /usr/bin/dhcpcd + inst /usr/bin/dialog + inst /usr/bin/echo + inst /usr/bin/env + inst /usr/bin/find + inst /usr/bin/find + inst /usr/bin/grep + inst /usr/bin/head + inst /usr/bin/id + inst /usr/bin/ln + inst /usr/bin/ls + inst /usr/bin/lsblk + inst /usr/bin/mke2fs + inst /usr/bin/mkfs.btrfs + inst /usr/bin/mkfs.f2fs + inst /usr/bin/mkfs.vfat + inst /usr/bin/mkfs.xfs + inst /usr/bin/mkswap + inst /usr/bin/mktemp + inst /usr/bin/mount + inst /usr/bin/reboot + inst /usr/bin/rm + inst /usr/bin/sed + inst /usr/bin/sh + inst /usr/bin/sort + inst /usr/bin/sync + inst /usr/bin/stdbuf + inst /usr/bin/sleep + inst /usr/bin/touch + inst /usr/bin/xargs + inst /usr/bin/xbps-install + inst /usr/bin/xbps-reconfigure + inst /usr/bin/xbps-remove + inst /usr/bin/xbps-uhelper + + inst /usr/libexec/dhcpcd-hooks/20-resolv.conf + inst /usr/libexec/dhcpcd-run-hooks + inst /usr/libexec/coreutils/libstdbuf.so + + inst_multiple /var/db/xbps/keys/* + inst_multiple /usr/share/xbps.d/* + inst_multiple /usr/share/zoneinfo/*/* + + inst_multiple /etc/ssl/certs/* + inst /etc/ssl/certs.pem + + inst /etc/default/libc-locales + inst /etc/group + + # We need to remove a choice here since the installer's initrd + # can't function as a local source. Strictly we shouldn't be + # doing this from dracut's installation function, but this is the + # last place that file really exists 'on disk' in the sense that + # we can modify it, so this change is applied here. + sed -i '/Packages from ISO image/d' "$moddir/installer.sh" + + # The system doesn't have a real init up so the reboot is going to + # be rough, we make it an option though if the end user wants to + # do this... + sed -i "s:shutdown -r now:sync && reboot -f:" "$moddir/installer.sh" + + inst "$moddir/installer.sh" /usr/bin/void-installer + inst_hook pre-mount 05 "$moddir/netmenu.sh" +} diff --git a/dracut/netmenu/netmenu.sh b/dracut/netmenu/netmenu.sh new file mode 100755 index 0000000..a873b1c --- /dev/null +++ b/dracut/netmenu/netmenu.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +dialog --colors --keep-tite --no-shadow --no-mouse \ + --backtitle "\Zb\Z7Void Linux installation -- https://www.voidlinux.org\Zn" \ + --cancel-label "Reboot" --aspect 20 \ + --menu "Select an Action:" 10 50 2 \ + "Install" "Run void-installer" \ + "Shell" "Run dash" \ + 2>/tmp/netmenu.action + +if [ ! $? ] ; then + reboot -f +fi + +case $(cat /tmp/netmenu.action) in + "Install") /usr/bin/void-installer ; exec sh ;; + "Shell") exec sh ;; +esac diff --git a/dracut/vmklive/59-mtd.rules b/dracut/vmklive/59-mtd.rules new file mode 100644 index 0000000..d81a6ad --- /dev/null +++ b/dracut/vmklive/59-mtd.rules @@ -0,0 +1,8 @@ +SUBSYSTEM!="block", GOTO="ps_end" +ACTION!="add|change", GOTO="ps_end" +# Also don't process disks that are slated to be a multipath device +ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="ps_end" + +KERNEL=="mtdblock[0-9]*", IMPORT BLKID + +LABEL="ps_end" diff --git a/dracut/vmklive/61-mtd.rules b/dracut/vmklive/61-mtd.rules new file mode 100644 index 0000000..0711d3a --- /dev/null +++ b/dracut/vmklive/61-mtd.rules @@ -0,0 +1,20 @@ +SUBSYSTEM!="block", GOTO="pss_end" +ACTION!="add|change", GOTO="pss_end" +# Also don't process disks that are slated to be a multipath device +ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="pss_end" + +ACTION=="change", KERNEL=="dm-[0-9]*", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}!="1", GOTO="do_pss" +KERNEL=="mtdblock*", GOTO="do_pss" + +GOTO="pss_end" + +LABEL="do_pss" +# by-path (parent device path) +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="", DEVPATH!="*/virtual/*", IMPORT PATH_ID +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n" + +# by-label/by-uuid links (filesystem metadata) +ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}" +ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}" +LABEL="pss_end" diff --git a/dracut/vmklive/accessibility.sh b/dracut/vmklive/accessibility.sh new file mode 100644 index 0000000..8f231d9 --- /dev/null +++ b/dracut/vmklive/accessibility.sh @@ -0,0 +1,10 @@ +#!/bin/sh -x +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh + +type getargbool >/dev/null 2>&1 || . /lib/dracut-lib.sh + +if getargbool 0 live.accessibility; then + [ -d "${NEWROOT}/etc/sv/espeakup" ] && ln -s "/etc/sv/espeakup" "${NEWROOT}/etc/runit/runsvdir/current/" + [ -d "${NEWROOT}/etc/sv/brltty" ] && ln -s "/etc/sv/brltty" "${NEWROOT}/etc/runit/runsvdir/current/" +fi diff --git a/dracut/vmklive/adduser.sh b/dracut/vmklive/adduser.sh new file mode 100644 index 0000000..3b3ee05 --- /dev/null +++ b/dracut/vmklive/adduser.sh @@ -0,0 +1,57 @@ +#!/bin/sh -x +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh + +if ! type getarg >/dev/null 2>&1 && ! type getargbool >/dev/null 2>&1; then + . /lib/dracut-lib.sh +fi + +echo minceraftos > ${NEWROOT}/etc/hostname + +USERNAME=player +USERSHELL=bash + +[ -z "$USERNAME" ] && USERNAME=player +[ -x $NEWROOT/bin/bash -a -z "$USERSHELL" ] && USERSHELL=/bin/bash +[ -z "$USERSHELL" ] && USERSHELL=/bin/bash + +# Create /etc/default/live.conf to store USER. +echo "USERNAME=$USERNAME" >> ${NEWROOT}/etc/default/live.conf +chmod 644 ${NEWROOT}/etc/default/live.conf + +if ! grep -q ${USERSHELL} ${NEWROOT}/etc/shells ; then + echo ${USERSHELL} >> ${NEWROOT}/etc/shells +fi + +# Create new user and remove password. We'll use autologin by default. +chroot ${NEWROOT} useradd -m -c player -G audio,video,wheel player +chroot ${NEWROOT} passwd -d $USERNAME >/dev/null 2>&1 + +# Setup default root/user password (voidlinux). +chroot ${NEWROOT} sh -c 'echo "player:password" | chpasswd -c SHA512' +chroot ${NEWROOT} sh -c 'echo "root:password" | chpasswd -c SHA512' + +# Enable sudo permission by default. +if [ -f ${NEWROOT}/etc/sudoers ]; then + echo "${USERNAME} ALL=(ALL:ALL) NOPASSWD: ALL" > "${NEWROOT}/etc/sudoers.d/99-void-live" +fi + +if [ -d ${NEWROOT}/etc/polkit-1 ]; then + # If polkit is installed allow users in the wheel group to run anything. + cat > ${NEWROOT}/etc/polkit-1/rules.d/void-live.rules <<_EOF +polkit.addAdminRule(function(action, subject) { + return ["unix-group:wheel"]; +}); + +polkit.addRule(function(action, subject) { + if (subject.isInGroup("wheel")) { + return polkit.Result.YES; + } +}); +_EOF + chroot ${NEWROOT} chown polkitd:polkitd /etc/polkit-1/rules.d/void-live.rules +fi + + +sed -i "s,GETTY_ARGS=\"--noclear\",GETTY_ARGS=\"--noclear -a player\",g" ${NEWROOT}/etc/sv/agetty-tty1/conf + diff --git a/dracut/vmklive/display-manager-autologin.sh b/dracut/vmklive/display-manager-autologin.sh new file mode 100644 index 0000000..7801c4a --- /dev/null +++ b/dracut/vmklive/display-manager-autologin.sh @@ -0,0 +1,65 @@ +#!/bin/sh +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh + +type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh + +USERNAME=$(getarg live.user) +[ -z "$USERNAME" ] && USERNAME=anon + +# Configure GDM autologin +if [ -d ${NEWROOT}/etc/gdm ]; then + GDMCustomFile=${NEWROOT}/etc/gdm/custom.conf + AutologinParameters="AutomaticLoginEnable=true\nAutomaticLogin=$USERNAME" + + # Prevent from updating if parameters already present (persistent usb key) + if ! `grep -qs 'AutomaticLoginEnable' $GDMCustomFile` ; then + if ! `grep -qs '\[daemon\]' $GDMCustomFile` ; then + echo '[daemon]' >> $GDMCustomFile + fi + sed -i "s/\[daemon\]/\[daemon\]\n$AutologinParameters/" $GDMCustomFile + fi +fi + +# Configure sddm autologin for the kde iso. +if [ -x ${NEWROOT}/usr/bin/sddm ]; then + cat > ${NEWROOT}/etc/sddm.conf <<_EOF +[Autologin] +User=${USERNAME} +Session=plasma.desktop +_EOF +fi + +# Configure lightdm autologin. +if [ -r "${NEWROOT}/etc/lightdm/lightdm.conf" ]; then + sed -i -e "s|^\#\(autologin-user=\).*|\1player|" \ + "${NEWROOT}/etc/lightdm/lightdm.conf" + sed -i -e "s|^\#\(autologin-user-timeout=\).*|\10|" \ + "${NEWROOT}/etc/lightdm/lightdm.conf" + sed -i -e "s|^\#\(autologin-session=\).*|\1$(cat "${NEWROOT}/etc/lightdm/.session")|" \ + "${NEWROOT}/etc/lightdm/lightdm.conf" + sed -i -e "s|^\#\(user-session=\).*|\1$(cat "${NEWROOT}/etc/lightdm/.session")|" \ + "${NEWROOT}/etc/lightdm/lightdm.conf" +fi + +# Configure lxdm autologin. +if [ -r ${NEWROOT}/etc/lxdm/lxdm.conf ]; then + sed -e "s,.*autologin.*=.*,autologin=$USERNAME," -i ${NEWROOT}/etc/lxdm/lxdm.conf + if [ -x ${NEWROOT}/usr/bin/enlightenment_start ]; then + sed -e "s,.*session.*=.*,session=/usr/bin/enlightenment_start," -i ${NEWROOT}/etc/lxdm/lxdm.conf + elif [ -x ${NEWROOT}/usr/bin/startxfce4 ]; then + sed -e "s,.*session.*=.*,session=/usr/bin/startxfce4," -i ${NEWROOT}/etc/lxdm/lxdm.conf + elif [ -x ${NEWROOT}/usr/bin/mate-session ]; then + sed -e "s,.*session.*=.*,session=/usr/bin/mate-session," -i ${NEWROOT}/etc/lxdm/lxdm.conf + elif [ -x ${NEWROOT}/usr/bin/cinnamon-session ]; then + sed -e "s,.*session.*=.*,session=/usr/bin/cinnamon-session," -i ${NEWROOT}/etc/lxdm/lxdm.conf + elif [ -x ${NEWROOT}/usr/bin/i3 ]; then + sed -e "s,.*session.*=.*,session=/usr/bin/i3," -i ${NEWROOT}/etc/lxdm/lxdm.conf + elif [ -x ${NEWROOT}/usr/bin/startlxde ]; then + sed -e "s,.*session.*=.*,session=/usr/bin/startlxde," -i ${NEWROOT}/etc/lxdm/lxdm.conf + elif [ -x ${NEWROOT}/usr/bin/startlxqt ]; then + sed -e "s,.*session.*=.*,session=/usr/bin/startlxqt," -i ${NEWROOT}/etc/lxdm/lxdm.conf + elif [ -x ${NEWROOT}/usr/bin/startfluxbox ]; then + sed -e "s,.*session.*=.*,session=/usr/bin/startfluxbox," -i ${NEWROOT}/etc/lxdm/lxdm.conf + fi +fi diff --git a/dracut/vmklive/getty-serial.sh b/dracut/vmklive/getty-serial.sh new file mode 100644 index 0000000..6761f54 --- /dev/null +++ b/dracut/vmklive/getty-serial.sh @@ -0,0 +1,18 @@ +#!/bin/sh +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh + +type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh + +CONSOLE=$(getarg console) +case "$CONSOLE" in +*ttyS0*) + ln -s /etc/sv/agetty-ttyS0 ${NEWROOT}/etc/runit/runsvdir/default/ + ;; +*hvc0*) + ln -s /etc/sv/agetty-hvc0 ${NEWROOT}/etc/runit/runsvdir/default/ + ;; +*hvsi0*) + ln -s /etc/sv/agetty-hvsi0 ${NEWROOT}/etc/runit/runsvdir/default/ + ;; +esac diff --git a/dracut/vmklive/locale.sh b/dracut/vmklive/locale.sh new file mode 100644 index 0000000..4ba1dd2 --- /dev/null +++ b/dracut/vmklive/locale.sh @@ -0,0 +1,22 @@ +#!/bin/sh +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh + +type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh + +LOCALE=$(getarg locale.LANG) +[ -z "$LOCALE" ] && LOCALE="en_US.UTF-8" + +# also enable this locale in newroot. +echo "LANG=$LOCALE" > $NEWROOT/etc/locale.conf +echo "LC_COLLATE=C" >> $NEWROOT/etc/locale.conf + +# set keymap too. +KEYMAP=$(getarg vconsole.keymap) +[ -z "$KEYMAP" ] && KEYMAP="us" + +if [ -f ${NEWROOT}/etc/vconsole.conf ]; then + sed -e "s,^KEYMAP=.*,KEYMAP=$KEYMAP," -i $NEWROOT/etc/vconsole.conf +elif [ -f ${NEWROOT}/etc/rc.conf ]; then + sed -e "s,^#KEYMAP=.*,KEYMAP=$KEYMAP," -i $NEWROOT/etc/rc.conf +fi diff --git a/dracut/vmklive/module-setup.sh b/dracut/vmklive/module-setup.sh new file mode 100644 index 0000000..ef62d1e --- /dev/null +++ b/dracut/vmklive/module-setup.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh + +check() { + return 255 +} + +depends() { + echo dmsquash-live +} + +install() { + inst /usr/bin/chroot + inst /usr/bin/chmod + inst /usr/bin/sed + + if [ -e /usr/bin/memdiskfind ]; then + inst /usr/bin/memdiskfind + instmods mtdblock phram + inst_rules "$moddir/59-mtd.rules" "$moddir/61-mtd.rules" + prepare_udev_rules 59-mtd.rules 61-mtd.rules + inst_hook pre-udev 01 "$moddir/mtd.sh" + fi + + inst_hook pre-pivot 01 "$moddir/adduser.sh" + inst_hook pre-pivot 02 "$moddir/display-manager-autologin.sh" + inst_hook pre-pivot 02 "$moddir/getty-serial.sh" + inst_hook pre-pivot 03 "$moddir/locale.sh" + inst_hook pre-pivot 04 "$moddir/accessibility.sh" + inst_hook pre-pivot 05 "$moddir/nomodeset.sh" +} diff --git a/dracut/vmklive/mtd.sh b/dracut/vmklive/mtd.sh new file mode 100755 index 0000000..1d94a4e --- /dev/null +++ b/dracut/vmklive/mtd.sh @@ -0,0 +1,7 @@ +#!/bin/sh +MEMDISK=$(memdiskfind) +if [ "$MEMDISK" ]; then + modprobe phram phram=memdisk,$MEMDISK + modprobe mtdblock + printf 'KERNEL=="mtdblock0", RUN+="/sbin/initqueue --settled --onetime --unique /sbin/dmsquash-live-root /dev/mtdblock0"\n' >> /etc/udev/rules.d/99-live-squash.rules +fi diff --git a/dracut/vmklive/nomodeset.sh b/dracut/vmklive/nomodeset.sh new file mode 100644 index 0000000..1f0c46c --- /dev/null +++ b/dracut/vmklive/nomodeset.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh + +type getargbool >/dev/null 2>&1 || . /lib/dracut-lib.sh + +if getargbool 0 nomodeset; then + for dm in lightdm sddm gdm; do + if [ -e "${NEWROOT}/etc/sv/${dm}" ]; then + :> "${NEWROOT}/etc/sv/${dm}/down" + fi + done +fi diff --git a/grub/grub.cfg b/grub/grub.cfg new file mode 100644 index 0000000..c5ab087 --- /dev/null +++ b/grub/grub.cfg @@ -0,0 +1,15 @@ +insmod usbms +insmod usb_keyboard +insmod part_gpt +insmod part_msdos +insmod fat +insmod iso9660 +insmod udf +insmod ext2 +insmod reiserfs +insmod ntfs +insmod hfsplus +insmod linux +insmod chain +search --file --no-floppy --set=voidlive "/boot/grub/grub_void.cfg" +source "(${voidlive})/boot/grub/grub_void.cfg" diff --git a/grub/grub_void.cfg.post b/grub/grub_void.cfg.post new file mode 100644 index 0000000..81b9162 --- /dev/null +++ b/grub/grub_void.cfg.post @@ -0,0 +1 @@ +fi # for if [ cpuid -l ] in grub_void.cfg.pre diff --git a/grub/grub_void.cfg.pre b/grub/grub_void.cfg.pre new file mode 100644 index 0000000..7215001 --- /dev/null +++ b/grub/grub_void.cfg.pre @@ -0,0 +1,35 @@ +export voidlive + +set pager="1" +set locale_dir="(${voidlive})/boot/grub/locale" + +if [ -e "${prefix}/${grub_cpu}-${grub_platform}/all_video.mod" ]; then + insmod all_video +else + insmod efi_gop + insmod efi_uga + insmod video_bochs + insmod video_cirrus +fi + +insmod font + +if loadfont "(${voidlive})/boot/grub/fonts/unicode.pf2" ; then + insmod gfxterm + set gfxmode="auto" + + terminal_input console + terminal_output gfxterm + + insmod png +fi + +# Set default menu entry +default=linux +timeout=0 +timeout_style=hidden + +# GRUB init tune for accessibility +play 600 988 1 1319 4 + +if [ cpuid -l ]; then diff --git a/installer.sh b/installer.sh new file mode 100755 index 0000000..c41affc --- /dev/null +++ b/installer.sh @@ -0,0 +1,1614 @@ +#!/bin/bash +#- +# Copyright (c) 2012-2015 Juan Romero Pardines . +# 2012 Dave Elusive . +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +#- + +# Make sure we don't inherit these from env. +SOURCE_DONE= +HOSTNAME_DONE= +KEYBOARD_DONE= +LOCALE_DONE= +TIMEZONE_DONE= +ROOTPASSWORD_DONE= +USERLOGIN_DONE= +USERPASSWORD_DONE= +USERNAME_DONE= +USERGROUPS_DONE= +USERACCOUNT_DONE= +BOOTLOADER_DONE= +PARTITIONS_DONE= +NETWORK_DONE= +FILESYSTEMS_DONE= +MIRROR_DONE= + +TARGETDIR=/mnt/target +LOG=/dev/tty8 +CONF_FILE=/tmp/.void-installer.conf +if [ ! -f $CONF_FILE ]; then + touch -f $CONF_FILE +fi +ANSWER=$(mktemp -t vinstall-XXXXXXXX || exit 1) +TARGET_SERVICES=$(mktemp -t vinstall-sv-XXXXXXXX || exit 1) +TARGET_FSTAB=$(mktemp -t vinstall-fstab-XXXXXXXX || exit 1) + +trap "DIE" INT TERM QUIT + +# disable printk +if [ -w /proc/sys/kernel/printk ]; then + echo 0 >/proc/sys/kernel/printk +fi + +# Detect if this is an EFI system. +if [ -e /sys/firmware/efi/systab ]; then + EFI_SYSTEM=1 + EFI_FW_BITS=$(cat /sys/firmware/efi/fw_platform_size) + if [ $EFI_FW_BITS -eq 32 ]; then + EFI_TARGET=i386-efi + else + EFI_TARGET=x86_64-efi + fi +fi + +# dialog colors +BLACK="\Z0" +RED="\Z1" +GREEN="\Z2" +YELLOW="\Z3" +BLUE="\Z4" +MAGENTA="\Z5" +CYAN="\Z6" +WHITE="\Z7" +BOLD="\Zb" +REVERSE="\Zr" +UNDERLINE="\Zu" +RESET="\Zn" + +# Properties shared per widget. +MENULABEL="${BOLD}Use UP and DOWN keys to navigate \ +menus. Use TAB to switch between buttons and ENTER to select.${RESET}" +MENUSIZE="14 60 0" +INPUTSIZE="8 60" +MSGBOXSIZE="8 70" +YESNOSIZE="$INPUTSIZE" +WIDGET_SIZE="10 70" + +DIALOG() { + rm -f $ANSWER + dialog --colors --keep-tite --no-shadow --no-mouse \ + --backtitle "${BOLD}${WHITE}Void Linux installation -- https://www.voidlinux.org (@@MKLIVE_VERSION@@)${RESET}" \ + --cancel-label "Back" --aspect 20 "$@" 2>$ANSWER + return $? +} + +INFOBOX() { + # Note: dialog --infobox and --keep-tite don't work together + dialog --colors --no-shadow --no-mouse \ + --backtitle "${BOLD}${WHITE}Void Linux installation -- https://www.voidlinux.org (@@MKLIVE_VERSION@@)${RESET}" \ + --title "${TITLE}" --aspect 20 --infobox "$@" +} + +DIE() { + rval=$1 + [ -z "$rval" ] && rval=0 + clear + rm -f $ANSWER $TARGET_FSTAB $TARGET_SERVICES + # reenable printk + if [ -w /proc/sys/kernel/printk ]; then + echo 4 >/proc/sys/kernel/printk + fi + umount_filesystems + exit $rval +} + +set_option() { + if grep -Eq "^${1} .*" $CONF_FILE; then + sed -i -e "/^${1} .*/d" $CONF_FILE + fi + echo "${1} ${2}" >>$CONF_FILE +} + +get_option() { + grep -E "^${1} .*" $CONF_FILE | sed -e "s|^${1} ||" +} + +# ISO-639 language names for locales +iso639_language() { + case "$1" in + aa) echo "Afar" ;; + af) echo "Afrikaans" ;; + an) echo "Aragonese" ;; + ar) echo "Arabic" ;; + ast) echo "Asturian" ;; + be) echo "Belgian" ;; + bg) echo "Bulgarian" ;; + bhb) echo "Bhili" ;; + br) echo "Breton" ;; + bs) echo "Bosnian" ;; + ca) echo "Catalan" ;; + cs) echo "Czech" ;; + cy) echo "Welsh" ;; + da) echo "Danish" ;; + de) echo "German" ;; + el) echo "Greek" ;; + en) echo "English" ;; + es) echo "Spanish" ;; + et) echo "Estonian" ;; + eu) echo "Basque" ;; + fi) echo "Finnish" ;; + fo) echo "Faroese" ;; + fr) echo "French" ;; + ga) echo "Irish" ;; + gd) echo "Scottish Gaelic" ;; + gl) echo "Galician" ;; + gv) echo "Manx" ;; + he) echo "Hebrew" ;; + hr) echo "Croatian" ;; + hsb) echo "Upper Sorbian" ;; + hu) echo "Hungarian" ;; + id) echo "Indonesian" ;; + is) echo "Icelandic" ;; + it) echo "Italian" ;; + iw) echo "Hebrew" ;; + ja) echo "Japanese" ;; + ka) echo "Georgian" ;; + kk) echo "Kazakh" ;; + kl) echo "Kalaallisut" ;; + ko) echo "Korean" ;; + ku) echo "Kurdish" ;; + kw) echo "Cornish" ;; + lg) echo "Ganda" ;; + lt) echo "Lithuanian" ;; + lv) echo "Latvian" ;; + mg) echo "Malagasy" ;; + mi) echo "Maori" ;; + mk) echo "Macedonian" ;; + ms) echo "Malay" ;; + mt) echo "Maltese" ;; + nb) echo "Norwegian Bokmål" ;; + nl) echo "Dutch" ;; + nn) echo "Norwegian Nynorsk" ;; + oc) echo "Occitan" ;; + om) echo "Oromo" ;; + pl) echo "Polish" ;; + pt) echo "Portugese" ;; + ro) echo "Romanian" ;; + ru) echo "Russian" ;; + sk) echo "Slovak" ;; + sl) echo "Slovenian" ;; + so) echo "Somali" ;; + sq) echo "Albanian" ;; + st) echo "Southern Sotho" ;; + sv) echo "Swedish" ;; + tcy) echo "Tulu" ;; + tg) echo "Tajik" ;; + th) echo "Thai" ;; + tl) echo "Tagalog" ;; + tr) echo "Turkish" ;; + uk) echo "Ukrainian" ;; + uz) echo "Uzbek" ;; + wa) echo "Walloon" ;; + xh) echo "Xhosa" ;; + yi) echo "Yiddish" ;; + zh) echo "Chinese" ;; + zu) echo "Zulu" ;; + *) echo "$1" ;; + esac +} + +# ISO-3166 country codes for locales +iso3166_country() { + case "$1" in + AD) echo "Andorra" ;; + AE) echo "United Arab Emirates" ;; + AL) echo "Albania" ;; + AR) echo "Argentina" ;; + AT) echo "Austria" ;; + AU) echo "Australia" ;; + BA) echo "Bonsia and Herzegovina" ;; + BE) echo "Belgium" ;; + BG) echo "Bulgaria" ;; + BH) echo "Bahrain" ;; + BO) echo "Bolivia" ;; + BR) echo "Brazil" ;; + BW) echo "Botswana" ;; + BY) echo "Belarus" ;; + CA) echo "Canada" ;; + CH) echo "Switzerland" ;; + CL) echo "Chile" ;; + CN) echo "China" ;; + CO) echo "Colombia" ;; + CR) echo "Costa Rica" ;; + CY) echo "Cyprus" ;; + CZ) echo "Czech Republic" ;; + DE) echo "Germany" ;; + DJ) echo "Djibouti" ;; + DK) echo "Denmark" ;; + DO) echo "Dominican Republic" ;; + DZ) echo "Algeria" ;; + EC) echo "Ecuador" ;; + EE) echo "Estonia" ;; + EG) echo "Egypt" ;; + ES) echo "Spain" ;; + FI) echo "Finland" ;; + FO) echo "Faroe Islands" ;; + FR) echo "France" ;; + GB) echo "Great Britain" ;; + GE) echo "Georgia" ;; + GL) echo "Greenland" ;; + GR) echo "Greece" ;; + GT) echo "Guatemala" ;; + HK) echo "Hong Kong" ;; + HN) echo "Honduras" ;; + HR) echo "Croatia" ;; + HU) echo "Hungary" ;; + ID) echo "Indonesia" ;; + IE) echo "Ireland" ;; + IL) echo "Israel" ;; + IN) echo "India" ;; + IQ) echo "Iraq" ;; + IS) echo "Iceland" ;; + IT) echo "Italy" ;; + JO) echo "Jordan" ;; + JP) echo "Japan" ;; + KE) echo "Kenya" ;; + KR) echo "Korea, Republic of" ;; + KW) echo "Kuwait" ;; + KZ) echo "Kazakhstan" ;; + LB) echo "Lebanon" ;; + LT) echo "Lithuania" ;; + LU) echo "Luxembourg" ;; + LV) echo "Latvia" ;; + LY) echo "Libya" ;; + MA) echo "Morocco" ;; + MG) echo "Madagascar" ;; + MK) echo "Macedonia" ;; + MT) echo "Malta" ;; + MX) echo "Mexico" ;; + MY) echo "Malaysia" ;; + NI) echo "Nicaragua" ;; + NL) echo "Netherlands" ;; + NO) echo "Norway" ;; + NZ) echo "New Zealand" ;; + OM) echo "Oman" ;; + PA) echo "Panama" ;; + PE) echo "Peru" ;; + PH) echo "Philippines" ;; + PL) echo "Poland" ;; + PR) echo "Puerto Rico" ;; + PT) echo "Portugal" ;; + PY) echo "Paraguay" ;; + QA) echo "Qatar" ;; + RO) echo "Romania" ;; + RU) echo "Russian Federation" ;; + SA) echo "Saudi Arabia" ;; + SD) echo "Sudan" ;; + SE) echo "Sweden" ;; + SG) echo "Singapore" ;; + SI) echo "Slovenia" ;; + SK) echo "Slovakia" ;; + SO) echo "Somalia" ;; + SV) echo "El Salvador" ;; + SY) echo "Syria" ;; + TH) echo "Thailand" ;; + TJ) echo "Tajikistan" ;; + TN) echo "Tunisia" ;; + TR) echo "Turkey" ;; + TW) echo "Taiwan" ;; + UA) echo "Ukraine" ;; + UG) echo "Uganda" ;; + US) echo "United States of America" ;; + UY) echo "Uruguay" ;; + UZ) echo "Uzbekistan" ;; + VE) echo "Venezuela" ;; + YE) echo "Yemen" ;; + ZA) echo "South Africa" ;; + ZW) echo "Zimbabwe" ;; + *) echo "$1" ;; + esac +} + +show_disks() { + local dev size sectorsize gbytes + + # IDE + for dev in $(ls /sys/block|grep -E '^hd'); do + if [ "$(cat /sys/block/$dev/device/media)" = "disk" ]; then + # Find out nr sectors and bytes per sector; + echo "/dev/$dev" + size=$(cat /sys/block/$dev/size) + sectorsize=$(cat /sys/block/$dev/queue/hw_sector_size) + gbytes="$(($size * $sectorsize / 1024 / 1024 / 1024))" + echo "size:${gbytes}GB;sector_size:$sectorsize" + fi + done + # SATA/SCSI and Virtual disks (virtio) + for dev in $(ls /sys/block|grep -E '^([sv]|xv)d|mmcblk|nvme'); do + echo "/dev/$dev" + size=$(cat /sys/block/$dev/size) + sectorsize=$(cat /sys/block/$dev/queue/hw_sector_size) + gbytes="$(($size * $sectorsize / 1024 / 1024 / 1024))" + echo "size:${gbytes}GB;sector_size:$sectorsize" + done + # cciss(4) devices + for dev in $(ls /dev/cciss 2>/dev/null|grep -E 'c[0-9]d[0-9]$'); do + echo "/dev/cciss/$dev" + size=$(cat /sys/block/cciss\!$dev/size) + sectorsize=$(cat /sys/block/cciss\!$dev/queue/hw_sector_size) + gbytes="$(($size * $sectorsize / 1024 / 1024 / 1024))" + echo "size:${gbytes}GB;sector_size:$sectorsize" + done +} + +get_partfs() { + # Get fs type from configuration if available. This ensures + # that the user is shown the proper fs type if they install the system. + local part="$1" + local default="${2:-none}" + local fstype=$(grep "MOUNTPOINT ${part} " "$CONF_FILE"|awk '{print $3}') + echo "${fstype:-$default}" +} + +show_partitions() { + local dev fstype fssize p part + + set -- $(show_disks) + while [ $# -ne 0 ]; do + disk=$(basename $1) + shift 2 + # ATA/SCSI/SATA + for p in /sys/block/$disk/$disk*; do + if [ -d $p ]; then + part=$(basename $p) + fstype=$(lsblk -nfr /dev/$part|awk '{print $2}'|head -1) + [ "$fstype" = "iso9660" ] && continue + [ "$fstype" = "crypto_LUKS" ] && continue + [ "$fstype" = "LVM2_member" ] && continue + fssize=$(lsblk -nr /dev/$part|awk '{print $4}'|head -1) + echo "/dev/$part" + echo "size:${fssize:-unknown};fstype:$(get_partfs "/dev/$part")" + fi + done + done + # Device Mapper + for p in /dev/mapper/*; do + part=$(basename $p) + [ "${part}" = "live-rw" ] && continue + [ "${part}" = "live-base" ] && continue + [ "${part}" = "control" ] && continue + + fstype=$(lsblk -nfr $p|awk '{print $2}'|head -1) + fssize=$(lsblk -nr $p|awk '{print $4}'|head -1) + echo "${p}" + echo "size:${fssize:-unknown};fstype:$(get_partfs "$p")" + done + # Software raid (md) + for p in $(ls -d /dev/md* 2>/dev/null|grep '[0-9]'); do + part=$(basename $p) + if cat /proc/mdstat|grep -qw $part; then + fstype=$(lsblk -nfr /dev/$part|awk '{print $2}') + [ "$fstype" = "crypto_LUKS" ] && continue + [ "$fstype" = "LVM2_member" ] && continue + fssize=$(lsblk -nr /dev/$part|awk '{print $4}') + echo "$p" + echo "size:${fssize:-unknown};fstype:$(get_partfs "$p")" + fi + done + # cciss(4) devices + for part in $(ls /dev/cciss 2>/dev/null|grep -E 'c[0-9]d[0-9]p[0-9]+'); do + fstype=$(lsblk -nfr /dev/cciss/$part|awk '{print $2}') + [ "$fstype" = "crypto_LUKS" ] && continue + [ "$fstype" = "LVM2_member" ] && continue + fssize=$(lsblk -nr /dev/cciss/$part|awk '{print $4}') + echo "/dev/cciss/$part" + echo "size:${fssize:-unknown};fstype:$(get_partfs "/dev/cciss/$part")" + done + if [ -e /sbin/lvs ]; then + # LVM + lvs --noheadings|while read lvname vgname perms size; do + echo "/dev/mapper/${vgname}-${lvname}" + echo "size:${size};fstype:$(get_partfs "/dev/mapper/${vgname}-${lvname}" lvm)" + done + fi +} + +menu_filesystems() { + local dev fstype fssize mntpoint reformat + + while true; do + DIALOG --ok-label "Change" --cancel-label "Done" \ + --title " Select the partition to edit " --menu "$MENULABEL" \ + ${MENUSIZE} $(show_partitions) + [ $? -ne 0 ] && return + + dev=$(cat $ANSWER) + DIALOG --title " Select the filesystem type for $dev " \ + --menu "$MENULABEL" ${MENUSIZE} \ + "btrfs" "Oracle's Btrfs" \ + "ext2" "Linux ext2 (no journaling)" \ + "ext3" "Linux ext3 (journal)" \ + "ext4" "Linux ext4 (journal)" \ + "f2fs" "Flash-Friendly Filesystem" \ + "swap" "Linux swap" \ + "vfat" "FAT32" \ + "xfs" "SGI's XFS" + if [ $? -eq 0 ]; then + fstype=$(cat $ANSWER) + else + continue + fi + if [ "$fstype" != "swap" ]; then + DIALOG --inputbox "Please specify the mount point for $dev:" ${INPUTSIZE} + if [ $? -eq 0 ]; then + mntpoint=$(cat $ANSWER) + elif [ $? -eq 1 ]; then + continue + fi + else + mntpoint=swap + fi + DIALOG --yesno "Do you want to create a new filesystem on $dev?" ${YESNOSIZE} + if [ $? -eq 0 ]; then + reformat=1 + elif [ $? -eq 1 ]; then + reformat=0 + else + continue + fi + fssize=$(lsblk -nr $dev|awk '{print $4}') + set -- "$fstype" "$fssize" "$mntpoint" "$reformat" + if [ -n "$1" -a -n "$2" -a -n "$3" -a -n "$4" ]; then + local bdev=$(basename $dev) + local ddev=$(basename $(dirname $dev)) + if [ "$ddev" != "dev" ]; then + sed -i -e "/^MOUNTPOINT \/dev\/${ddev}\/${bdev} .*/d" $CONF_FILE + else + sed -i -e "/^MOUNTPOINT \/dev\/${bdev} .*/d" $CONF_FILE + fi + echo "MOUNTPOINT $dev $1 $2 $3 $4" >>$CONF_FILE + fi + done + FILESYSTEMS_DONE=1 +} + +menu_partitions() { + DIALOG --title " Select the disk to partition " \ + --menu "$MENULABEL" ${MENUSIZE} $(show_disks) + if [ $? -eq 0 ]; then + local device=$(cat $ANSWER) + + DIALOG --title " Select the software for partitioning " \ + --menu "$MENULABEL" ${MENUSIZE} \ + "cfdisk" "Easy to use" \ + "fdisk" "More advanced" + if [ $? -eq 0 ]; then + local software=$(cat $ANSWER) + + DIALOG --title "Modify Partition Table on $device" --msgbox "\n +${BOLD}${software} will be executed in disk $device.${RESET}\n\n +For BIOS systems, MBR or GPT partition tables are supported. To use GPT\n +on PC BIOS systems, an empty partition of 1MB must be added at the first\n +2GB of the disk with the partition type \`BIOS Boot'.\n +${BOLD}NOTE: you don't need this on EFI systems.${RESET}\n\n +For EFI systems, GPT is mandatory and a FAT32 partition with at least 100MB\n +must be created with the partition type \`EFI System'. This will be used as\n +the EFI System Partition. This partition must have the mountpoint \`/boot/efi'.\n\n +At least 1 partition is required for the rootfs (/). For this partition,\n +at least 2GB is required, but more is recommended. The rootfs partition\n +should have the partition type \`Linux Filesystem'. For swap, RAM*2\n +should be enough and the partition type \`Linux swap' should be used.\n\n +${BOLD}WARNING: /usr is not supported as a separate partition.${RESET}\n +${RESET}\n" 23 80 + if [ $? -eq 0 ]; then + while true; do + clear; $software $device; PARTITIONS_DONE=1 + break + done + else + return + fi + fi + fi +} + +menu_keymap() { + local _keymaps="$(find /usr/share/kbd/keymaps/ -type f -iname "*.map.gz" -printf "%f\n" | sed 's|.map.gz||g' | sort)" + local _KEYMAPS= + + for f in ${_keymaps}; do + _KEYMAPS="${_KEYMAPS} ${f} -" + done + while true; do + DIALOG --title " Select your keymap " --menu "$MENULABEL" 14 70 14 ${_KEYMAPS} + if [ $? -eq 0 ]; then + set_option KEYMAP "$(cat $ANSWER)" + loadkeys "$(cat $ANSWER)" + KEYBOARD_DONE=1 + break + else + return + fi + done +} + +set_keymap() { + local KEYMAP=$(get_option KEYMAP) + + if [ -f /etc/vconsole.conf ]; then + sed -i -e "s|KEYMAP=.*|KEYMAP=$KEYMAP|g" $TARGETDIR/etc/vconsole.conf + else + sed -i -e "s|#\?KEYMAP=.*|KEYMAP=$KEYMAP|g" $TARGETDIR/etc/rc.conf + fi +} + +menu_locale() { + local _locales="$(grep -E '\.UTF-8' /etc/default/libc-locales|awk '{print $1}'|sed -e 's/^#//')" + local LOCALES ISO639 ISO3166 + local TMPFILE=$(mktemp -t vinstall-XXXXXXXX || exit 1) + INFOBOX "Scanning locales ..." 4 60 + for f in ${_locales}; do + eval $(echo $f | awk 'BEGIN { FS="." } \ + { FS="_"; split($1, a); printf "ISO639=%s ISO3166=%s\n", a[1], a[2] }') + echo "$f|$(iso639_language $ISO639) ($(iso3166_country $ISO3166))|" >> $TMPFILE + done + clear + # Sort by ISO-639 language names + LOCALES=$(sort -t '|' -k 2 < $TMPFILE | xargs | sed -e's/| /|/g') + rm -f $TMPFILE + while true; do + (IFS="|"; DIALOG --title " Select your locale " --menu "$MENULABEL" 18 70 18 ${LOCALES}) + if [ $? -eq 0 ]; then + set_option LOCALE "$(cat $ANSWER)" + LOCALE_DONE=1 + break + else + return + fi + done +} + +set_locale() { + if [ -f $TARGETDIR/etc/default/libc-locales ]; then + local LOCALE="$(get_option LOCALE)" + : "${LOCALE:=C.UTF-8}" + sed -i -e "s|LANG=.*|LANG=$LOCALE|g" $TARGETDIR/etc/locale.conf + # Uncomment locale from /etc/default/libc-locales and regenerate it. + sed -e "/${LOCALE}/s/^\#//" -i $TARGETDIR/etc/default/libc-locales + echo "Running xbps-reconfigure -f glibc-locales ..." >$LOG + chroot $TARGETDIR xbps-reconfigure -f glibc-locales >$LOG 2>&1 + fi +} + +menu_timezone() { + local areas=(Africa America Antarctica Arctic Asia Atlantic Australia Europe Indian Pacific) + + local area locations location + while (IFS='|'; DIALOG ${area:+--default-item|"$area"} --title " Select area " --menu "$MENULABEL" 19 51 19 $(printf '%s||' "${areas[@]}")); do + area=$(cat $ANSWER) + read -a locations -d '\n' < <(find /usr/share/zoneinfo/$area -type f -printf '%P\n' | sort) + if (IFS='|'; DIALOG --title " Select location (${area}) " --menu "$MENULABEL" 19 51 19 $(printf '%s||' "${locations[@]//_/ }")); then + location=$(tr ' ' '_' < $ANSWER) + set_option TIMEZONE "$area/$location" + TIMEZONE_DONE=1 + return 0 + else + continue + fi + done + return 1 +} + +set_timezone() { + local TIMEZONE="$(get_option TIMEZONE)" + + ln -sf "/usr/share/zoneinfo/${TIMEZONE}" "${TARGETDIR}/etc/localtime" +} + +menu_hostname() { + while true; do + DIALOG --inputbox "Set the machine hostname:" ${INPUTSIZE} + if [ $? -eq 0 ]; then + set_option HOSTNAME "$(cat $ANSWER)" + HOSTNAME_DONE=1 + break + else + return + fi + done +} + +set_hostname() { + local hostname="$(get_option HOSTNAME)" + echo "${hostname:-void}" > $TARGETDIR/etc/hostname +} + +menu_rootpassword() { + local _firstpass _secondpass _again _desc + + while true; do + if [ -z "${_firstpass}" ]; then + _desc="Enter the root password" + else + _again=" again" + fi + DIALOG --insecure --passwordbox "${_desc}${_again}" ${INPUTSIZE} + if [ $? -eq 0 ]; then + if [ -z "${_firstpass}" ]; then + _firstpass="$(cat $ANSWER)" + else + _secondpass="$(cat $ANSWER)" + fi + if [ -n "${_firstpass}" -a -n "${_secondpass}" ]; then + if [ "${_firstpass}" != "${_secondpass}" ]; then + INFOBOX "Passwords do not match! Please enter again." 6 60 + unset _firstpass _secondpass _again + sleep 2 && clear && continue + fi + set_option ROOTPASSWORD "${_firstpass}" + ROOTPASSWORD_DONE=1 + break + fi + else + return + fi + done +} + +set_rootpassword() { + echo "root:$(get_option ROOTPASSWORD)" | chroot $TARGETDIR chpasswd -c SHA512 +} + +menu_useraccount() { + local _firstpass _secondpass _desc _again + local _groups _status _group _checklist + local _preset _userlogin + + while true; do + _preset=$(get_option USERLOGIN) + [ -z "$_preset" ] && _preset="void" + DIALOG --inputbox "Enter a primary login name:" ${INPUTSIZE} "$_preset" + if [ $? -eq 0 ]; then + _userlogin="$(cat $ANSWER)" + # based on useradd(8) § Caveats + if [ "${#_userlogin}" -le 32 ] && [[ "${_userlogin}" =~ ^[a-z_][a-z0-9_-]*[$]?$ ]]; then + set_option USERLOGIN "${_userlogin}" + USERLOGIN_DONE=1 + break + else + INFOBOX "Invalid login name! Please try again." 6 60 + unset _userlogin + sleep 2 && clear && continue + fi + else + return + fi + done + + while true; do + _preset=$(get_option USERNAME) + [ -z "$_preset" ] && _preset="Void User" + DIALOG --inputbox "Enter a display name for login '$(get_option USERLOGIN)' :" \ + ${INPUTSIZE} "$_preset" + if [ $? -eq 0 ]; then + set_option USERNAME "$(cat $ANSWER)" + USERNAME_DONE=1 + break + else + return + fi + done + + while true; do + if [ -z "${_firstpass}" ]; then + _desc="Enter the password for login '$(get_option USERLOGIN)'" + else + _again=" again" + fi + DIALOG --insecure --passwordbox "${_desc}${_again}" ${INPUTSIZE} + if [ $? -eq 0 ]; then + if [ -z "${_firstpass}" ]; then + _firstpass="$(cat $ANSWER)" + else + _secondpass="$(cat $ANSWER)" + fi + if [ -n "${_firstpass}" -a -n "${_secondpass}" ]; then + if [ "${_firstpass}" != "${_secondpass}" ]; then + INFOBOX "Passwords do not match! Please enter again." 6 60 + unset _firstpass _secondpass _again + sleep 2 && clear && continue + fi + set_option USERPASSWORD "${_firstpass}" + USERPASSWORD_DONE=1 + break + fi + else + return + fi + done + + _groups="wheel,audio,video,floppy,cdrom,optical,kvm,users,xbuilder" + while true; do + _desc="Select group membership for login '$(get_option USERLOGIN)':" + for _group in $(cat /etc/group); do + _gid="$(echo ${_group} | cut -d: -f3)" + _group="$(echo ${_group} | cut -d: -f1)" + _status="$(echo ${_groups} | grep -w ${_group})" + if [ -z "${_status}" ]; then + _status=off + else + _status=on + fi + # ignore the groups of root, existing users, and package groups + if [[ "${_gid}" -ge 1000 || "${_group}" = "_"* || "${_group}" =~ ^(root|nogroup|chrony|dbus|lightdm|polkitd)$ ]]; then + continue + fi + if [ -z "${_checklist}" ]; then + _checklist="${_group} ${_group}:${_gid} ${_status}" + else + _checklist="${_checklist} ${_group} ${_group}:${_gid} ${_status}" + fi + done + DIALOG --no-tags --checklist "${_desc}" 20 60 18 ${_checklist} + if [ $? -eq 0 ]; then + set_option USERGROUPS $(cat $ANSWER | sed -e's| |,|g') + USERGROUPS_DONE=1 + break + else + return + fi + done +} + +set_useraccount() { + [ -z "$USERACCOUNT_DONE" ] && return + chroot $TARGETDIR useradd -m -G "$(get_option USERGROUPS)" \ + -c "$(get_option USERNAME)" "$(get_option USERLOGIN)" + echo "$(get_option USERLOGIN):$(get_option USERPASSWORD)" | \ + chroot $TARGETDIR chpasswd -c SHA512 +} + +menu_bootloader() { + while true; do + DIALOG --title " Select the disk to install the bootloader" \ + --menu "$MENULABEL" ${MENUSIZE} $(show_disks) none "Manage bootloader otherwise" + if [ $? -eq 0 ]; then + set_option BOOTLOADER "$(cat $ANSWER)" + BOOTLOADER_DONE=1 + break + else + return + fi + done + while true; do + DIALOG --yesno "Use a graphical terminal for the boot loader?" ${YESNOSIZE} + if [ $? -eq 0 ]; then + set_option TEXTCONSOLE 0 + break + elif [ $? -eq 1 ]; then + set_option TEXTCONSOLE 1 + break + else + return + fi + done +} + +set_bootloader() { + local dev=$(get_option BOOTLOADER) grub_args= + + if [ "$dev" = "none" ]; then return; fi + + # Check if it's an EFI system via efivars module. + if [ -n "$EFI_SYSTEM" ]; then + grub_args="--target=$EFI_TARGET --efi-directory=/boot/efi --bootloader-id=void_grub --recheck" + fi + echo "Running grub-install $grub_args $dev..." >$LOG + chroot $TARGETDIR grub-install $grub_args $dev >$LOG 2>&1 + if [ $? -ne 0 ]; then + DIALOG --msgbox "${BOLD}${RED}ERROR:${RESET} \ +failed to install GRUB to $dev!\nCheck $LOG for errors." ${MSGBOXSIZE} + DIE 1 + fi + echo "Running grub-mkconfig on $TARGETDIR..." >$LOG + chroot $TARGETDIR grub-mkconfig -o /boot/grub/grub.cfg >$LOG 2>&1 + if [ $? -ne 0 ]; then + DIALOG --msgbox "${BOLD}${RED}ERROR${RESET}: \ +failed to run grub-mkconfig!\nCheck $LOG for errors." ${MSGBOXSIZE} + DIE 1 + fi +} + +test_network() { + # Reset the global variable to ensure that network is accessible for this test. + NETWORK_DONE= + + rm -f otime && \ + xbps-uhelper fetch https://repo-default.voidlinux.org/current/otime >$LOG 2>&1 + local status=$? + rm -f otime + + if [ "$status" -eq 0 ]; then + DIALOG --msgbox "Network is working properly!" ${MSGBOXSIZE} + NETWORK_DONE=1 + return 1 + fi + if [ "$1" = "nm" ]; then + DIALOG --msgbox "Network Manager is enabled but network is inaccessible, please set it up externally with nmcli, nmtui, or the Network Manager tray applet." ${MSGBOXSIZE} + else + DIALOG --msgbox "Network is inaccessible, please set it up properly." ${MSGBOXSIZE} + fi +} + +configure_wifi() { + local dev="$1" ssid enc pass _wpasupconf=/etc/wpa_supplicant/wpa_supplicant.conf + + DIALOG --form "Wireless configuration for ${dev}\n(encryption type: wep or wpa)" 0 0 0 \ + "SSID:" 1 1 "" 1 16 30 0 \ + "Encryption:" 2 1 "" 2 16 4 3 \ + "Password:" 3 1 "" 3 16 63 0 || return 1 + readarray -t values <<<$(cat $ANSWER) + ssid="${values[0]}"; enc="${values[1]}"; pass="${values[2]}" + + if [ -z "$ssid" ]; then + DIALOG --msgbox "Invalid SSID." ${MSGBOXSIZE} + return 1 + elif [ -z "$enc" -o "$enc" != "wep" -a "$enc" != "wpa" ]; then + DIALOG --msgbox "Invalid encryption type (possible values: wep or wpa)." ${MSGBOXSIZE} + return 1 + elif [ -z "$pass" ]; then + DIALOG --msgbox "Invalid AP password." ${MSGBOXSIZE} + fi + + # reset the configuration to the default, if necessary + # otherwise backup the configuration + if [ -f ${_wpasupconf}.orig ]; then + cp -f ${_wpasupconf}.orig ${_wpasupconf} + else + cp -f ${_wpasupconf} ${_wpasupconf}.orig + fi + if [ "$enc" = "wep" ]; then + cat << EOF >> ${_wpasupconf} +network={ + ssid="$ssid" + wep_key0="$pass" + wep_tx_keyidx=0 + auth_alg=SHARED +} +EOF + else + wpa_passphrase "$ssid" "$pass" >> ${_wpasupconf} + fi + + sv restart wpa_supplicant + configure_net_dhcp $dev + return $? +} + +configure_net() { + local dev="$1" rval + + DIALOG --yesno "Do you want to use DHCP for $dev?" ${YESNOSIZE} + rval=$? + if [ $rval -eq 0 ]; then + configure_net_dhcp $dev + elif [ $rval -eq 1 ]; then + configure_net_static $dev + fi +} + +iface_setup() { + ip addr show dev $1 | grep -q -e 'inet ' -e 'inet6 ' + return $? +} + +configure_net_dhcp() { + local dev="$1" + + iface_setup $dev + if [ $? -eq 1 ]; then + sv restart dhcpcd 2>&1 | tee $LOG | \ + DIALOG --progressbox "Initializing $dev via DHCP..." ${WIDGET_SIZE} + if [ $? -ne 0 ]; then + DIALOG --msgbox "${BOLD}${RED}ERROR:${RESET} failed to run dhcpcd. See $LOG for details." ${MSGBOXSIZE} + return 1 + fi + export -f iface_setup + timeout 10s bash -c "while true; do iface_setup $dev; sleep 0.25; done" + if [ $? -eq 1 ]; then + DIALOG --msgbox "${BOLD}${RED}ERROR:${RESET} DHCP request failed for $dev. Check $LOG for errors." ${MSGBOXSIZE} + return 1 + fi + fi + test_network + if [ $? -eq 1 ]; then + set_option NETWORK "${dev} dhcp" + fi +} + +configure_net_static() { + local ip gw dns1 dns2 dev=$1 + + DIALOG --form "Static IP configuration for $dev:" 0 0 0 \ + "IP address:" 1 1 "192.168.0.2" 1 21 20 0 \ + "Gateway:" 2 1 "192.168.0.1" 2 21 20 0 \ + "DNS Primary" 3 1 "8.8.8.8" 3 21 20 0 \ + "DNS Secondary" 4 1 "8.8.4.4" 4 21 20 0 || return 1 + + set -- $(cat $ANSWER) + ip=$1; gw=$2; dns1=$3; dns2=$4 + echo "running: ip link set dev $dev up" >$LOG + ip link set dev $dev up >$LOG 2>&1 + if [ $? -ne 0 ]; then + DIALOG --msgbox "${BOLD}${RED}ERROR:${RESET} Failed to bring $dev interface." ${MSGBOXSIZE} + return 1 + fi + echo "running: ip addr add $ip dev $dev" >$LOG + ip addr add $ip dev $dev >$LOG 2>&1 + if [ $? -ne 0 ]; then + DIALOG --msgbox "${BOLD}${RED}ERROR:${RESET} Failed to set ip to the $dev interface." ${MSGBOXSIZE} + return 1 + fi + ip route add default via $gw >$LOG 2>&1 + if [ $? -ne 0 ]; then + DIALOG --msgbox "${BOLD}${RED}ERROR:${RESET} failed to setup your gateway." ${MSGBOXSIZE} + return 1 + fi + echo "nameserver $dns1" >/etc/resolv.conf + echo "nameserver $dns2" >>/etc/resolv.conf + test_network + if [ $? -eq 1 ]; then + set_option NETWORK "${dev} static $ip $gw $dns1 $dns2" + fi +} + +menu_network() { + local dev addr f DEVICES + + if [ -e /var/service/NetworkManager ]; then + test_network nm + return + fi + + for f in $(ls /sys/class/net); do + [ "$f" = "lo" ] && continue + addr=$(cat /sys/class/net/$f/address) + DEVICES="$DEVICES $f $addr" + done + DIALOG --title " Select the network interface to configure " \ + --menu "$MENULABEL" ${MENUSIZE} ${DEVICES} + if [ $? -eq 0 ]; then + dev=$(cat $ANSWER) + if $(echo $dev|egrep -q "^wl.*" 2>/dev/null); then + configure_wifi $dev + else + configure_net $dev + fi + fi +} + +validate_useraccount() { + # don't check that USERNAME has been set because it can be empty + local USERLOGIN=$(get_option USERLOGIN) + local USERPASSWORD=$(get_option USERPASSWORD) + local USERGROUPS=$(get_option USERGROUPS) + + if [ -n "$USERLOGIN" ] && [ -n "$USERPASSWORD" ] && [ -n "$USERGROUPS" ]; then + USERACCOUNT_DONE=1 + fi +} + +validate_filesystems() { + local mnts dev size fstype mntpt mkfs rootfound fmt + local usrfound efi_system_partition + local bootdev=$(get_option BOOTLOADER) + + unset TARGETFS + mnts=$(grep -E '^MOUNTPOINT .*' $CONF_FILE) + set -- ${mnts} + while [ $# -ne 0 ]; do + fmt="" + dev=$2; fstype=$3; size=$4; mntpt="$5"; mkfs=$6 + shift 6 + + if [ "$mntpt" = "/" ]; then + rootfound=1 + elif [ "$mntpt" = "/usr" ]; then + usrfound=1 + elif [ "$fstype" = "vfat" -a "$mntpt" = "/boot/efi" ]; then + efi_system_partition=1 + fi + if [ "$mkfs" -eq 1 ]; then + fmt="NEW FILESYSTEM: " + fi + if [ -z "$TARGETFS" ]; then + TARGETFS="${fmt}$dev ($size) mounted on $mntpt as ${fstype}\n" + else + TARGETFS="${TARGETFS}${fmt}${dev} ($size) mounted on $mntpt as ${fstype}\n" + fi + done + if [ -z "$rootfound" ]; then + DIALOG --msgbox "${BOLD}${RED}ERROR:${RESET} \ +the mount point for the root filesystem (/) has not yet been configured." ${MSGBOXSIZE} + return 1 + elif [ -n "$usrfound" ]; then + DIALOG --msgbox "${BOLD}${RED}ERROR:${RESET} \ +/usr mount point has been configured but is not supported, please remove it to continue." ${MSGBOXSIZE} + return 1 + elif [ -n "$EFI_SYSTEM" -a "$bootdev" != "none" -a -z "$efi_system_partition" ]; then + DIALOG --msgbox "${BOLD}${RED}ERROR:${RESET} \ +The EFI System Partition has not yet been configured, please create it\n +as FAT32, mountpoint /boot/efi and at least with 100MB of size." ${MSGBOXSIZE} + return 1 + fi + FILESYSTEMS_DONE=1 +} + +create_filesystems() { + local mnts dev mntpt fstype fspassno mkfs size rv uuid + + mnts=$(grep -E '^MOUNTPOINT .*' $CONF_FILE | sort -k 5) + set -- ${mnts} + while [ $# -ne 0 ]; do + dev=$2; fstype=$3; mntpt="$5"; mkfs=$6 + shift 6 + + # swap partitions + if [ "$fstype" = "swap" ]; then + swapoff $dev >/dev/null 2>&1 + if [ "$mkfs" -eq 1 ]; then + mkswap $dev >$LOG 2>&1 + if [ $? -ne 0 ]; then + DIALOG --msgbox "${BOLD}${RED}ERROR:${RESET} \ +failed to create swap on ${dev}!\ncheck $LOG for errors." ${MSGBOXSIZE} + DIE 1 + fi + fi + swapon $dev >$LOG 2>&1 + if [ $? -ne 0 ]; then + DIALOG --msgbox "${BOLD}${RED}ERROR:${RESET} \ +failed to activate swap on $dev!\ncheck $LOG for errors." ${MSGBOXSIZE} + DIE 1 + fi + # Add entry for target fstab + uuid=$(blkid -o value -s UUID "$dev") + echo "UUID=$uuid none swap defaults 0 0" >>$TARGET_FSTAB + continue + fi + + if [ "$mkfs" -eq 1 ]; then + case "$fstype" in + btrfs) MKFS="mkfs.btrfs -f"; modprobe btrfs >$LOG 2>&1;; + ext2) MKFS="mke2fs -F"; modprobe ext2 >$LOG 2>&1;; + ext3) MKFS="mke2fs -F -j"; modprobe ext3 >$LOG 2>&1;; + ext4) MKFS="mke2fs -F -t ext4"; modprobe ext4 >$LOG 2>&1;; + f2fs) MKFS="mkfs.f2fs -f"; modprobe f2fs >$LOG 2>&1;; + vfat) MKFS="mkfs.vfat -F32"; modprobe vfat >$LOG 2>&1;; + xfs) MKFS="mkfs.xfs -f -i sparse=0"; modprobe xfs >$LOG 2>&1;; + esac + TITLE="Check $LOG for details ..." + INFOBOX "Creating filesystem $fstype on $dev for $mntpt ..." 8 60 + echo "Running $MKFS $dev..." >$LOG + $MKFS $dev >$LOG 2>&1; rv=$? + if [ $rv -ne 0 ]; then + DIALOG --msgbox "${BOLD}${RED}ERROR:${RESET} \ +failed to create filesystem $fstype on $dev!\ncheck $LOG for errors." ${MSGBOXSIZE} + DIE 1 + fi + fi + # Mount rootfs the first one. + [ "$mntpt" != "/" ] && continue + mkdir -p $TARGETDIR + echo "Mounting $dev on $mntpt ($fstype)..." >$LOG + mount -t $fstype $dev $TARGETDIR >$LOG 2>&1 + if [ $? -ne 0 ]; then + DIALOG --msgbox "${BOLD}${RED}ERROR:${RESET} \ +failed to mount $dev on ${mntpt}! check $LOG for errors." ${MSGBOXSIZE} + DIE 1 + fi + # Add entry to target fstab + uuid=$(blkid -o value -s UUID "$dev") + if [ "$fstype" = "f2fs" -o "$fstype" = "btrfs" -o "$fstype" = "xfs" ]; then + fspassno=0 + else + fspassno=1 + fi + echo "UUID=$uuid $mntpt $fstype defaults 0 $fspassno" >>$TARGET_FSTAB + done + + # mount all filesystems in target rootfs + mnts=$(grep -E '^MOUNTPOINT .*' $CONF_FILE | sort -k 5) + set -- ${mnts} + while [ $# -ne 0 ]; do + dev=$2; fstype=$3; mntpt="$5" + shift 6 + [ "$mntpt" = "/" -o "$fstype" = "swap" ] && continue + mkdir -p ${TARGETDIR}${mntpt} + echo "Mounting $dev on $mntpt ($fstype)..." >$LOG + mount -t $fstype $dev ${TARGETDIR}${mntpt} >$LOG 2>&1 + if [ $? -ne 0 ]; then + DIALOG --msgbox "${BOLD}${RED}ERROR:${RESET} \ +failed to mount $dev on $mntpt! check $LOG for errors." ${MSGBOXSIZE} + DIE + fi + # Add entry to target fstab + uuid=$(blkid -o value -s UUID "$dev") + if [ "$fstype" = "f2fs" -o "$fstype" = "btrfs" -o "$fstype" = "xfs" ]; then + fspassno=0 + else + fspassno=2 + fi + echo "UUID=$uuid $mntpt $fstype defaults 0 $fspassno" >>$TARGET_FSTAB + done +} + +mount_filesystems() { + for f in sys proc dev; do + [ ! -d $TARGETDIR/$f ] && mkdir $TARGETDIR/$f + echo "Mounting $TARGETDIR/$f..." >$LOG + mount --rbind /$f $TARGETDIR/$f >$LOG 2>&1 + done +} + +umount_filesystems() { + local mnts="$(grep -E '^MOUNTPOINT .* swap .*$' $CONF_FILE | sort -r -k 5)" + set -- ${mnts} + while [ $# -ne 0 ]; do + local dev=$2; local fstype=$3 + shift 6 + if [ "$fstype" = "swap" ]; then + echo "Disabling swap space on $dev..." >$LOG + swapoff $dev >$LOG 2>&1 + continue + fi + done + echo "Unmounting $TARGETDIR..." >$LOG + umount -R $TARGETDIR >$LOG 2>&1 +} + +log_and_count() { + local progress whole tenth + while read line; do + echo "$line" >$LOG + copy_count=$((copy_count + 1)) + progress=$((1000 * copy_count / copy_total)) + if [ "$progress" != "$copy_progress" ]; then + whole=$((progress / 10)) + tenth=$((progress % 10)) + printf "Progress: %d.%d%% (%d of %d files)\n" $whole $tenth $copy_count $copy_total + copy_progress=$progress + fi + done +} + +copy_rootfs() { + local tar_in="--create --one-file-system --xattrs" + TITLE="Check $LOG for details ..." + INFOBOX "Counting files, please be patient ..." 4 60 + copy_total=$(tar ${tar_in} -v -f /dev/null / 2>/dev/null | wc -l) + export copy_total copy_count=0 copy_progress= + clear + tar ${tar_in} -f - / 2>/dev/null | \ + tar --extract --xattrs --xattrs-include='*' --preserve-permissions -v -f - -C $TARGETDIR | \ + log_and_count | \ + DIALOG --title "${TITLE}" \ + --progressbox "Copying live image to target rootfs." 5 60 + if [ $? -ne 0 ]; then + DIE 1 + fi + unset copy_total copy_count copy_percent +} + +install_packages() { + local _grub= _syspkg= + + if [ "$(get_option BOOTLOADER)" != none ]; then + if [ -n "$EFI_SYSTEM" ]; then + if [ $EFI_FW_BITS -eq 32 ]; then + _grub="grub-i386-efi" + else + _grub="grub-x86_64-efi" + fi + else + _grub="grub" + fi + fi + + _syspkg="base-system" + + mkdir -p $TARGETDIR/var/db/xbps/keys $TARGETDIR/usr/share + cp -a /usr/share/xbps.d $TARGETDIR/usr/share/ + cp /var/db/xbps/keys/*.plist $TARGETDIR/var/db/xbps/keys + if [ -n "$MIRROR_DONE" ]; then + mkdir -p $TARGETDIR/etc + cp -a /etc/xbps.d $TARGETDIR/etc + fi + mkdir -p $TARGETDIR/boot/grub + + _arch=$(xbps-uhelper arch) + + stdbuf -oL env XBPS_ARCH=${_arch} \ + xbps-install -r $TARGETDIR -SyU ${_syspkg} ${_grub} 2>&1 | \ + DIALOG --title "Installing base system packages..." \ + --programbox 24 80 + if [ $? -ne 0 ]; then + DIE 1 + fi + xbps-reconfigure -r $TARGETDIR -f base-files >/dev/null 2>&1 + stdbuf -oL chroot $TARGETDIR xbps-reconfigure -a 2>&1 | \ + DIALOG --title "Configuring base system packages..." --programbox 24 80 + if [ $? -ne 0 ]; then + DIE 1 + fi +} + +menu_services() { + local sv _status _checklist="" + # filter out services that probably shouldn't be messed with + local sv_ignore='^(agetty-(tty[1-9]|generic|serial|console)|udevd|sulogin)$' + find $TARGETDIR/etc/runit/runsvdir/default -mindepth 1 -maxdepth 1 -xtype d -printf '%f\n' | \ + grep -Ev "$sv_ignore" | sort -u > "$TARGET_SERVICES" + while true; do + while read -r sv; do + if [ -n "$sv" ]; then + if grep -qx "$sv" "$TARGET_SERVICES" 2>/dev/null; then + _status=on + else + _status=off + fi + _checklist+=" ${sv} ${sv} ${_status}" + fi + done < <(find $TARGETDIR/etc/sv -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | grep -Ev "$sv_ignore" | sort -u) + DIALOG --no-tags --checklist "Select services to enable:" 20 60 18 ${_checklist} + if [ $? -eq 0 ]; then + comm -13 "$TARGET_SERVICES" <(cat "$ANSWER" | tr ' ' '\n') | while read -r sv; do + enable_service "$sv" + done + comm -23 "$TARGET_SERVICES" <(cat "$ANSWER" | tr ' ' '\n') | while read -r sv; do + disable_service "$sv" + done + break + else + return + fi + done +} + +enable_service() { + ln -sf "/etc/sv/$1" "$TARGETDIR/etc/runit/runsvdir/default/$1" +} + +disable_service() { + rm -f "$TARGETDIR/etc/runit/runsvdir/default/$1" +} + +menu_install() { + ROOTPASSWORD_DONE="$(get_option ROOTPASSWORD)" + BOOTLOADER_DONE="$(get_option BOOTLOADER)" + + if [ -z "$ROOTPASSWORD_DONE" ]; then + DIALOG --msgbox "${BOLD}The root password has not been configured, \ +please do so before starting the installation.${RESET}" ${MSGBOXSIZE} + return 1 + elif [ -z "$BOOTLOADER_DONE" ]; then + DIALOG --msgbox "${BOLD}The disk to install the bootloader has not been \ +configured, please do so before starting the installation.${RESET}" ${MSGBOXSIZE} + return 1 + fi + + # Validate filesystems after making sure bootloader is done, + # so that specific checks can be made based on the selection + validate_filesystems || return 1 + + if [ -z "$FILESYSTEMS_DONE" ]; then + DIALOG --msgbox "${BOLD}Required filesystems were not configured, \ +please do so before starting the installation.${RESET}" ${MSGBOXSIZE} + return 1 + fi + + # Validate useraccount. All parameters must be set (name, password, login name, groups). + validate_useraccount + + if [ -z "$USERACCOUNT_DONE" ]; then + DIALOG --yesno "${BOLD}The user account is not set up properly.${RESET}\n\n +${BOLD}${RED}WARNING: no user will be created. You will only be able to login \ +with the root user in your new system.${RESET}\n\n +${BOLD}Do you want to continue?${RESET}" 10 60 || return + fi + + DIALOG --yesno "${BOLD}The following operations will be executed:${RESET}\n\n +${BOLD}${TARGETFS}${RESET}\n +${BOLD}${RED}WARNING: data on partitions will be COMPLETELY DESTROYED for new \ +filesystems.${RESET}\n\n +${BOLD}Do you want to continue?${RESET}" 20 80 || return + unset TARGETFS + + # Create and mount filesystems + create_filesystems + + SOURCE_DONE="$(get_option SOURCE)" + # If source not set use defaults. + if [ "$(get_option SOURCE)" = "local" -o -z "$SOURCE_DONE" ]; then + copy_rootfs + . /etc/default/live.conf + rm -f $TARGETDIR/etc/motd + rm -f $TARGETDIR/etc/issue + rm -f $TARGETDIR/usr/sbin/void-installer + # Remove modified sddm.conf to let sddm use the defaults. + rm -f $TARGETDIR/etc/sddm.conf + # Remove live user. + echo "Removing $USERNAME live user from targetdir ..." >$LOG + chroot $TARGETDIR userdel -r $USERNAME >$LOG 2>&1 + rm -f $TARGETDIR/etc/sudoers.d/99-void-live + sed -i "s,GETTY_ARGS=\"--noclear -a $USERNAME\",GETTY_ARGS=\"--noclear\",g" $TARGETDIR/etc/sv/agetty-tty1/conf + TITLE="Check $LOG for details ..." + INFOBOX "Rebuilding initramfs for target ..." 4 60 + echo "Rebuilding initramfs for target ..." >$LOG + # mount required fs + mount_filesystems + chroot $TARGETDIR dracut --no-hostonly --add-drivers "ahci" --force >>$LOG 2>&1 + INFOBOX "Removing temporary packages from target ..." 4 60 + echo "Removing temporary packages from target ..." >$LOG + TO_REMOVE="dialog xtools-minimal xmirror" + # only remove espeakup and brltty if it wasn't enabled in the live environment + if ! [ -e "/var/service/espeakup" ]; then + TO_REMOVE+=" espeakup" + fi + if ! [ -e "/var/service/brltty" ]; then + TO_REMOVE+=" brltty" + fi + if [ "$(get_option BOOTLOADER)" = none ]; then + TO_REMOVE+=" grub-x86_64-efi grub-i386-efi grub" + fi + # uninstall separately to minimise errors + for pkg in $TO_REMOVE; do + xbps-remove -r $TARGETDIR -Ry "$pkg" >>$LOG 2>&1 + done + rmdir $TARGETDIR/mnt/target + else + # mount required fs + mount_filesystems + # network install, use packages. + install_packages + fi + + INFOBOX "Applying installer settings..." 4 60 + + # copy target fstab. + install -Dm644 $TARGET_FSTAB $TARGETDIR/etc/fstab + # Mount /tmp as tmpfs. + echo "tmpfs /tmp tmpfs defaults,nosuid,nodev 0 0" >> $TARGETDIR/etc/fstab + + + # set up keymap, locale, timezone, hostname, root passwd and user account. + set_keymap + set_locale + set_timezone + set_hostname + set_rootpassword + set_useraccount + + # Copy /etc/skel files for root. + cp $TARGETDIR/etc/skel/.[bix]* $TARGETDIR/root + + NETWORK_DONE="$(get_option NETWORK)" + # network settings for target + if [ -n "$NETWORK_DONE" ]; then + local net="$(get_option NETWORK)" + set -- ${net} + local _dev="$1" _type="$2" _ip="$3" _gw="$4" _dns1="$5" _dns2="$6" + if [ -z "$_type" ]; then + # network type empty??!!! + : + elif [ "$_type" = "dhcp" ]; then + if $(echo $_dev|egrep -q "^wl.*" 2>/dev/null); then + cp /etc/wpa_supplicant/wpa_supplicant.conf $TARGETDIR/etc/wpa_supplicant + enable_service wpa_supplicant + fi + enable_service dhcpcd + elif [ -n "$_dev" -a "$_type" = "static" ]; then + # static IP through dhcpcd. + mv $TARGETDIR/etc/dhcpcd.conf $TARGETDIR/etc/dhcpcd.conf.orig + echo "# Static IP configuration set by the void-installer for $_dev." \ + >$TARGETDIR/etc/dhcpcd.conf + echo "interface $_dev" >>$TARGETDIR/etc/dhcpcd.conf + echo "static ip_address=$_ip" >>$TARGETDIR/etc/dhcpcd.conf + echo "static routers=$_gw" >>$TARGETDIR/etc/dhcpcd.conf + echo "static domain_name_servers=$_dns1 $_dns2" >>$TARGETDIR/etc/dhcpcd.conf + enable_service dhcpcd + fi + fi + + if [ -d $TARGETDIR/etc/sudoers.d ]; then + USERLOGIN="$(get_option USERLOGIN)" + if [ -z "$(echo $(get_option USERGROUPS) | grep -w wheel)" -a -n "$USERLOGIN" ]; then + # enable sudo for primary user USERLOGIN who is not member of wheel + echo "# Enable sudo for login '$USERLOGIN'" > "$TARGETDIR/etc/sudoers.d/$USERLOGIN" + echo "$USERLOGIN ALL=(ALL:ALL) ALL" >> "$TARGETDIR/etc/sudoers.d/$USERLOGIN" + else + # enable the sudoers entry for members of group wheel + echo "%wheel ALL=(ALL:ALL) ALL" > "$TARGETDIR/etc/sudoers.d/wheel" + fi + unset USERLOGIN + fi + + # clean up polkit rule - it's only useful in live systems + rm -f $TARGETDIR/etc/polkit-1/rules.d/void-live.rules + + # enable text console for grub if chosen + if [ "$(get_option TEXTCONSOLE)" = "1" ]; then + sed -i $TARGETDIR/etc/default/grub \ + -e 's|#\(GRUB_TERMINAL_INPUT\).*|\1=console|' \ + -e 's|#\(GRUB_TERMINAL_OUTPUT\).*|\1=console|' + fi + + # install bootloader. + set_bootloader + + # menu for enabling services + menu_services + + sync && sync && sync + + # unmount all filesystems. + umount_filesystems + + # installed successfully. + DIALOG --yesno "${BOLD}Void Linux has been installed successfully!${RESET}\n +Do you want to reboot the system?" ${YESNOSIZE} + if [ $? -eq 0 ]; then + shutdown -r now + else + return + fi +} + +menu_source() { + local src= + + DIALOG --title " Select installation source " \ + --menu "$MENULABEL" 8 70 0 \ + "Local" "Packages from ISO image" \ + "Network" "Base system only, downloaded from official repository" + case "$(cat $ANSWER)" in + "Local") src="local";; + "Network") src="net"; + if [ -z "$NETWORK_DONE" ]; then + if test_network; then + menu_network + fi + fi;; + *) return 1;; + esac + SOURCE_DONE=1 + set_option SOURCE $src +} + +menu_mirror() { + xmirror 2>$LOG && MIRROR_DONE=1 +} + +menu() { + local AFTER_HOSTNAME + if [ -z "$DEFITEM" ]; then + DEFITEM="Keyboard" + fi + + if xbps-uhelper arch | grep -qe '-musl$'; then + AFTER_HOSTNAME="Timezone" + DIALOG --default-item $DEFITEM \ + --extra-button --extra-label "Settings" \ + --title " Void Linux installation menu " \ + --menu "$MENULABEL" 10 70 0 \ + "Keyboard" "Set system keyboard" \ + "Network" "Set up the network" \ + "Source" "Set source installation" \ + "Mirror" "Select XBPS mirror" \ + "Hostname" "Set system hostname" \ + "Timezone" "Set system time zone" \ + "RootPassword" "Set system root password" \ + "UserAccount" "Set primary user name and password" \ + "BootLoader" "Set disk to install bootloader" \ + "Partition" "Partition disk(s)" \ + "Filesystems" "Configure filesystems and mount points" \ + "Install" "Start installation with saved settings" \ + "Exit" "Exit installation" + else + AFTER_HOSTNAME="Locale" + DIALOG --default-item $DEFITEM \ + --extra-button --extra-label "Settings" \ + --title " Void Linux installation menu " \ + --menu "$MENULABEL" 10 70 0 \ + "Keyboard" "Set system keyboard" \ + "Network" "Set up the network" \ + "Source" "Set source installation" \ + "Mirror" "Select XBPS mirror" \ + "Hostname" "Set system hostname" \ + "Locale" "Set system locale" \ + "Timezone" "Set system time zone" \ + "RootPassword" "Set system root password" \ + "UserAccount" "Set primary user name and password" \ + "BootLoader" "Set disk to install bootloader" \ + "Partition" "Partition disk(s)" \ + "Filesystems" "Configure filesystems and mount points" \ + "Install" "Start installation with saved settings" \ + "Exit" "Exit installation" + fi + + if [ $? -eq 3 ]; then + # Show settings + cp $CONF_FILE /tmp/conf_hidden.$$; + sed -i "s/^ROOTPASSWORD .*/ROOTPASSWORD <-hidden->/" /tmp/conf_hidden.$$ + sed -i "s/^USERPASSWORD .*/USERPASSWORD <-hidden->/" /tmp/conf_hidden.$$ + DIALOG --title "Saved settings for installation" --textbox /tmp/conf_hidden.$$ 14 60 + rm /tmp/conf_hidden.$$ + return + fi + + case $(cat $ANSWER) in + "Keyboard") menu_keymap && [ -n "$KEYBOARD_DONE" ] && DEFITEM="Network";; + "Network") menu_network && [ -n "$NETWORK_DONE" ] && DEFITEM="Source";; + "Source") menu_source && [ -n "$SOURCE_DONE" ] && DEFITEM="Mirror";; + "Mirror") menu_mirror && [ -n "$MIRROR_DONE" ] && DEFITEM="Hostname";; + "Hostname") menu_hostname && [ -n "$HOSTNAME_DONE" ] && DEFITEM="$AFTER_HOSTNAME";; + "Locale") menu_locale && [ -n "$LOCALE_DONE" ] && DEFITEM="Timezone";; + "Timezone") menu_timezone && [ -n "$TIMEZONE_DONE" ] && DEFITEM="RootPassword";; + "RootPassword") menu_rootpassword && [ -n "$ROOTPASSWORD_DONE" ] && DEFITEM="UserAccount";; + "UserAccount") menu_useraccount && [ -n "$USERLOGIN_DONE" ] && [ -n "$USERPASSWORD_DONE" ] \ + && DEFITEM="BootLoader";; + "BootLoader") menu_bootloader && [ -n "$BOOTLOADER_DONE" ] && DEFITEM="Partition";; + "Partition") menu_partitions && [ -n "$PARTITIONS_DONE" ] && DEFITEM="Filesystems";; + "Filesystems") menu_filesystems && [ -n "$FILESYSTEMS_DONE" ] && DEFITEM="Install";; + "Install") menu_install;; + "Exit") DIE;; + *) DIALOG --yesno "Abort Installation?" ${YESNOSIZE} && DIE + esac +} + +if ! command -v dialog >/dev/null; then + echo "ERROR: missing dialog command, exiting..." + exit 1 +fi + +if [ "$(id -u)" != "0" ]; then + echo "void-installer must run as root" 1>&2 + exit 1 +fi + +# +# main() +# +DIALOG --title "${BOLD}${RED} Enter the void ... ${RESET}" --msgbox "\n +Welcome to the Void Linux installation. A simple and minimal \ +Linux distribution made from scratch and built from the source package tree \ +available for XBPS, a new alternative binary package system.\n\n +The installation should be pretty straightforward. If you are in trouble \ +please join us at ${BOLD}#voidlinux${RESET} on ${BOLD}irc.libera.chat${RESET}.\n\n +${BOLD}https://www.voidlinux.org${RESET}\n\n" 16 80 + +while true; do + menu +done + +exit 0 +# vim: set ts=4 sw=4 et: diff --git a/isolinux/isolinux.cfg.in b/isolinux/isolinux.cfg.in new file mode 100644 index 0000000..5178fc3 --- /dev/null +++ b/isolinux/isolinux.cfg.in @@ -0,0 +1,10 @@ +UI vesamenu.c32 +PROMPT 0 +TIMEOUT 1 +ONTIMEOUT linux + + +LABEL linux +MENU LABEL @@BOOT_TITLE@@ @@KERNVER@@ @@ARCH@@ +KERNEL /boot/vmlinuz +APPEND initrd=/boot/initrd root=live:CDLABEL=VOID_LIVE init=/sbin/init ro rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@ live.autologin live.user=player quiet diff --git a/lib.sh b/lib.sh new file mode 100755 index 0000000..96c3e33 --- /dev/null +++ b/lib.sh @@ -0,0 +1,338 @@ +#!/bin/sh + +# This contains the COMPLETE list of binaries that this script needs +# to function. The only exception is the QEMU binary since it is not +# known in advance which one wil be required. +readonly LIBTOOLS="cp echo cat printf which mountpoint mount umount modprobe" +readonly HOSTARCH=$(xbps-uhelper arch) + +is_target_native() { + # Because checking whether the target is runnable is ugly, stuff + # it into a single function. That makes it easy to check anywhere. + local target_arch + + target_arch="$1" + # this will cover most + if [ "${target_arch%-musl}" = "${HOSTARCH%-musl}" ]; then + return 0 + fi + + case "$HOSTARCH" in + # ppc64le has no 32-bit variant, only runs its own stuff + ppc64le*) return 1 ;; + # x86_64 also runs i686 + x86_64*) test -z "${target_arch##*86*}" ;; + # aarch64 also runs armv* + aarch64*) test -z "${target_arch##armv*}" ;; + # bigendian ppc64 also runs ppc + ppc64*) test "${target_arch%-musl}" = "ppc" ;; + # anything else is just their own + *) return 1 ;; + esac + + return $? +} + +version() ( + set +u + [ -n "$PROGNAME" ] && printf "%s " "$PROGNAME" + echo "$(cat ./version) ${MKLIVE_REV:-"$(git -c safe.directory="$(pwd)" rev-parse --short HEAD 2> /dev/null)"}" +) + +info_msg() { + # This function handles the printing that is bold within all + # scripts. This is a convenience function so that the rather ugly + # looking ASCII escape codes live in only one place. + printf "\033[1m%s\n\033[m" "$@" +} + +die() { + # This function is registered in all the scripts to make sure that + # the important mounts get cleaned up and the $ROOTFS location is + # removed. + printf "FATAL: %s\n" "$@" + umount_pseudofs + [ -d "$ROOTFS" ] && rm -rf "$ROOTFS" + exit 1 +} + +check_tools() { + # All scripts within mklive declare the tools they will use in a + # variable called "REQTOOLS". This function checks that these + # tools are available and prints out the path to each tool that + # will be used. This can be useful to figure out what is broken + # if a different version of something is used than was expected. + for tool in $LIBTOOLS $REQTOOLS ; do + if ! which "$tool" > /dev/null ; then + die "Required tool $tool is not available on this system!" + fi + done + + info_msg "The following tools will be used:" + for tool in $LIBTOOLS $REQTOOLS ; do + which "$tool" + done +} + +mount_pseudofs() { + # This function ensures that the psuedofs mountpoints are present + # in the chroot. Strictly they are not necessary to have for many + # commands, but bind-mounts are cheap and it isn't too bad to just + # mount them all the time. + for f in dev proc sys; do + # In a naked chroot there is nothing to bind the mounts to, so + # we need to create directories for these first. + [ ! -d "$ROOTFS/$f" ] && mkdir -p "$ROOTFS/$f" + if ! mountpoint -q "$ROOTFS/$f" ; then + # It is VERY important that this only happen if the + # pseudofs isn't already mounted. If it already is then + # this is virtually impossible to troubleshoot because it + # looks like the subsequent umount just isn't working. + mount -r --rbind /$f "$ROOTFS/$f" --make-rslave + fi + done + if ! mountpoint -q "$ROOTFS/tmp" ; then + mkdir -p "$ROOTFS/tmp" + mount -o mode=0755,nosuid,nodev -t tmpfs tmpfs "$ROOTFS/tmp" + fi +} + +umount_pseudofs() { + # This function cleans up the mounts in the chroot. Failure to + # clean up these mounts will prevent the tmpdir from being + # deletable instead throwing the error "Device or Resource Busy". + # The '-f' option is passed to umount to account for the + # contingency where the psuedofs mounts are not present. + if [ -d "${ROOTFS}" ]; then + for f in dev proc sys; do + umount -R -f "$ROOTFS/$f" >/dev/null 2>&1 + done + fi + umount -f "$ROOTFS/tmp" >/dev/null 2>&1 +} + +run_cmd_target() { + info_msg "Running $* for target $XBPS_TARGET_ARCH ..." + if is_target_native "$XBPS_TARGET_ARCH"; then + # This is being run on the same architecture as the host, + # therefore we should set XBPS_ARCH. + if ! eval XBPS_ARCH="$XBPS_TARGET_ARCH" "$@" ; then + die "Could not run command $*" + fi + else + # This is being run on a foriegn arch, therefore we should set + # XBPS_TARGET_ARCH. In this case XBPS will not attempt + # certain actions and will require reconfiguration later. + if ! eval XBPS_TARGET_ARCH="$XBPS_TARGET_ARCH" "$@" ; then + die "Could not run command $*" + fi + fi +} + +run_cmd() { + # This is a general purpose function to run commands that a user + # may wish to see. For example its useful to see the tar/xz + # pipeline to not need to delve into the scripts to see what + # options its set up with. + info_msg "Running $*" + eval "$@" +} + +run_cmd_chroot() { + # General purpose chroot function which makes sure the chroot is + # prepared. This function takes 2 arguments, the location to + # chroot to and the command to run. + + # This is an idempotent function, it is safe to call every time + # before entering the chroot. This has the advantage of making + # execution in the chroot appear as though it "Just Works(tm)". + register_binfmt + + # Before we step into the chroot we need to make sure the + # pseudo-filesystems are ready to go. Not all commands will need + # this, but its still a good idea to call it here anyway. + mount_pseudofs + + # With assurance that things will run now we can jump into the + # chroot and run stuff! + chroot "$1" sh -c "$2" +} + +cleanup_chroot() { + # This function cleans up the chroot shims that are used by QEMU + # to allow builds on alien platforms. It takes no arguments but + # expects the global $ROOTFS variable to be set. + + # Un-Mount the pseudofs mounts if they were mounted + umount_pseudofs +} + +register_binfmt() { + # This function sets up everything that is needed to be able to + # chroot into a ROOTFS and be able to run commands there. This + # really matters on platforms where the host architecture is + # different from the target, and you wouldn't be able to run + # things like xbps-reconfigure -a. This function is idempotent + # (You can run it multiple times without modifying state). This + # function takes no arguments, but does expect the global variable + # $XBPS_TARGET_ARCH to be set. + + # This select sets up the "magic" bytes in /proc that let the + # kernel select an alternate interpreter. More values for this + # map can be obtained from here: + # https://github.com/qemu/qemu/blob/master/scripts/qemu-binfmt-conf.sh + + # If the XBPS_TARGET_ARCH is unset but the PLATFORM is known, it + # may be possible to set the architecture from the static + # platforms map. + if [ -z "$XBPS_TARGET_ARCH" ] && [ ! -z "$PLATFORM" ] ; then + set_target_arch_from_platform + fi + + # In the special case where the build is native we can return + # without doing anything else + # This is only a basic check for identical archs, with more careful + # checks below for cases like ppc64 -> ppc and x86_64 -> i686. + _hostarch="${HOSTARCH%-musl}" + _targetarch="${XBPS_TARGET_ARCH%-musl}" + if [ "$_hostarch" = "$_targetarch" ] ; then + return + fi + + case "${_targetarch}" in + armv*) + # TODO: detect aarch64 hosts that run 32 bit ARM without qemu (some cannot) + if ( [ "${_targetarch}" = "armv6l" ] && [ "${_hostarch}" = "armv7l" ] ) ; then + return + fi + if [ "${_targetarch}" = "armv5tel" -a \ + \( "${_hostarch}" = "armv6l" -o "${_hostarch}" = "armv7l" \) ] ; then + return + fi + _cpu=arm + ;; + aarch64) + _cpu=aarch64 + ;; + ppc64le) + _cpu=ppc64le + ;; + ppc64) + _cpu=ppc64 + ;; + ppc) + if [ "$_hostarch" = "ppc64" ] ; then + return + fi + _cpu=ppc + ;; + mipsel) + if [ "$_hostarch" = "mips64el" ] ; then + return + fi + _cpu=mipsel + ;; + x86_64) + _cpu=x86_64 + ;; + i686) + if [ "$_hostarch" = "x86_64" ] ; then + return + fi + _cpu=i386 + ;; + riscv64) + _cpu=riscv64 + ;; + *) + die "Unknown target architecture!" + ;; + esac + + # For builds that do not match the host architecture, the correct + # qemu binary will be required. + QEMU_BIN="qemu-${_cpu}" + if ! $QEMU_BIN -version >/dev/null 2>&1; then + die "$QEMU_BIN binary is missing in your system, exiting." + fi + + # In order to use the binfmt system the binfmt_misc mountpoint + # must exist inside of proc + if ! mountpoint -q /proc/sys/fs/binfmt_misc ; then + modprobe -q binfmt_misc + mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc 2>/dev/null + fi + + # Only register if the map is incomplete + if [ ! -f /proc/sys/fs/binfmt_misc/qemu-$_cpu ] ; then + if ! command -v update-binfmts >/dev/null 2>&1; then + die "could not add binfmt: update-binfmts binary is missing in your system" + fi + update-binfmts --import "qemu-$_cpu" + fi +} + +set_target_arch_from_platform() { + # This function maintains a lookup from platform to target + # architecture. This is required for scripts that need to know + # the target architecture, but don't necessarily need to know it + # internally (i.e. only run_cmd_chroot). + case "$PLATFORM" in + rpi-aarch64*) XBPS_TARGET_ARCH="aarch64";; + rpi-armv7l*) XBPS_TARGET_ARCH="armv7l";; + rpi-armv6l*) XBPS_TARGET_ARCH="armv6l";; + i686*) XBPS_TARGET_ARCH="i686";; + x86_64*) XBPS_TARGET_ARCH="x86_64";; + GCP*) XBPS_TARGET_ARCH="x86_64";; + pinebookpro*) XBPS_TARGET_ARCH="aarch64";; + pinephone*) XBPS_TARGET_ARCH="aarch64";; + rock64*) XBPS_TARGET_ARCH="aarch64";; + rockpro64*) XBPS_TARGET_ARCH="aarch64";; + asahi*) XBPS_TARGET_ARCH="aarch64";; + *) die "$PROGNAME: Unable to compute target architecture from platform";; + esac + + if [ -z "${PLATFORM##*-musl}" ] ; then + XBPS_TARGET_ARCH="${XBPS_TARGET_ARCH}-musl" + fi +} + +set_dracut_args_from_platform() { + # In rare cases it is necessary to set platform specific dracut + # args. This is mostly the case on ARM platforms. + case "$PLATFORM" in + *) ;; + esac +} + +set_cachedir() { + # The package artifacts are cacheable, but they need to be isolated + # from the host cache. + : "${XBPS_CACHEDIR:=--cachedir=$PWD/xbps-cache/${XBPS_TARGET_ARCH}}" +} + +rk33xx_flash_uboot() { + local dir="$1" + local dev="$2" + dd if="${dir}/idbloader.img" of="${dev}" seek=64 conv=notrunc,fsync >/dev/null 2>&1 + dd if="${dir}/u-boot.itb" of="${dev}" seek=16384 conv=notrunc,fsync >/dev/null 2>&1 +} + +# These should all resolve even if they won't have the appropriate +# repodata files for the selected architecture. +: "${XBPS_REPOSITORY:=--repository=https://repo-default.voidlinux.org/current \ + --repository=https://repo-default.voidlinux.org/current/musl \ + --repository=https://repo-default.voidlinux.org/current/aarch64}" + +# This library is the authoritative source of the platform map, +# because of this we may need to get this information from the command +# line. This select allows us to get that information out. This +# fails silently if the toolname isn't known since this script is +# sourced. +case "${1:-}" in + platform2arch) + PLATFORM=$2 + set_target_arch_from_platform + echo "$XBPS_TARGET_ARCH" + ;; +esac diff --git a/mkmine.sh b/mkmine.sh new file mode 100755 index 0000000..511b3f9 --- /dev/null +++ b/mkmine.sh @@ -0,0 +1,651 @@ +#!/bin/bash +# +#- +# Copyright (c) 2009-2015 Juan Romero Pardines. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +#- +umask 022 + +. ./lib.sh + +MOSVER="$(cat version)" +REQUIRED_PKGS=(base-files libgcc dash coreutils sed tar gawk squashfs-tools xorriso) +TARGET_PKGS=(base-files) +INITRAMFS_PKGS=(binutils xz device-mapper dhclient dracut-network openresolv plymouth xsetroot) +PACKAGE_LIST=(bash openjdk21 xorg qt5 qt5-devel) +IGNORE_PKGS=() +PLATFORMS=() +readonly PROGNAME="$(basename "$0")" +declare -a INCLUDE_DIRS=() + +# sudo ./mklive.sh -T minceraftOS -p openjdk21 live.autologin live.user=player live.shell=/bin/bash + +die() { + info_msg "ERROR: $*" + error_out 1 $LINENO +} + +print_step() { + CURRENT_STEP=$((CURRENT_STEP+1)) + info_msg "[${CURRENT_STEP}/${STEP_COUNT}] $*" +} + +mount_pseudofs() { + for f in sys dev proc; do + mkdir -p "$ROOTFS"/$f + mount --rbind /$f "$ROOTFS"/$f + done +} + +umount_pseudofs() { + for f in sys dev proc; do + if [ -d "$ROOTFS/$f" ] && ! umount -R -f "$ROOTFS/$f"; then + info_msg "ERROR: failed to unmount $ROOTFS/$f/" + return 1 + fi + done +} + +error_out() { + trap - INT TERM 0 + umount_pseudofs || exit "${1:-0}" + [ -d "$BUILDDIR" ] && [ -z "$KEEP_BUILDDIR" ] && rm -rf --one-file-system "$BUILDDIR" + exit "${1:-0}" +} + +copy_void_keys() { + mkdir -p "$1"/var/db/xbps/keys + cp keys/*.plist "$1"/var/db/xbps/keys +} + +copy_dracut_files() { + mkdir -p "$1"/usr/lib/dracut/modules.d/01vmklive + cp dracut/vmklive/* "$1"/usr/lib/dracut/modules.d/01vmklive/ +} + +copy_autoinstaller_files() { + mkdir -p "$1"/usr/lib/dracut/modules.d/01autoinstaller + cp dracut/autoinstaller/* "$1"/usr/lib/dracut/modules.d/01autoinstaller/ +} + +install_prereqs() { + XBPS_ARCH=$HOST_ARCH "$XBPS_INSTALL_CMD" -r "$VOIDHOSTDIR" ${XBPS_REPOSITORY} \ + -c "$XBPS_HOST_CACHEDIR" -y "${REQUIRED_PKGS[@]}" + [ $? -ne 0 ] && die "Failed to install required software, exiting..." +} + +install_target_pkgs() { + XBPS_ARCH=$TARGET_ARCH "$XBPS_INSTALL_CMD" -r "$VOIDTARGETDIR" ${XBPS_REPOSITORY} \ + -c "$XBPS_HOST_CACHEDIR" -y "${TARGET_PKGS[@]}" + [ $? -ne 0 ] && die "Failed to install required software, exiting..." +} + +post_install_packages() { + # Cleanup and remove useless stuff. + rm -rf "$ROOTFS"/var/cache/* "$ROOTFS"/run/* "$ROOTFS"/var/run/* + + # boot failure if disks have raid logical volumes and this isn't loaded + for f in "$ROOTFS/usr/lib/modules/$KERNELVERSION/kernel/drivers/md/dm-raid.ko".*; do + echo "dm-raid" > "$ROOTFS"/etc/modules-load.d/dm-raid.conf + break + done +} + +install_plymouth() { + chroot "$ROOTFS" env -i plymouth-set-default-theme -R "spinner" +} + +install_packages() { + XBPS_ARCH=$TARGET_ARCH "${XBPS_INSTALL_CMD}" -r "$ROOTFS" \ + ${XBPS_REPOSITORY} -c "$XBPS_CACHEDIR" -yn "${PACKAGE_LIST[@]}" "${INITRAMFS_PKGS[@]}" + [ $? -ne 0 ] && die "Missing required binary packages, exiting..." + + mount_pseudofs + + LANG=C XBPS_TARGET_ARCH=$TARGET_ARCH "${XBPS_INSTALL_CMD}" -U -r "$ROOTFS" \ + ${XBPS_REPOSITORY} -c "$XBPS_CACHEDIR" -y "${PACKAGE_LIST[@]}" "${INITRAMFS_PKGS[@]}" + [ $? -ne 0 ] && die "Failed to install ${PACKAGE_LIST[*]} ${INITRAMFS_PKGS[*]}" + + xbps-reconfigure -r "$ROOTFS" -f base-files >/dev/null 2>&1 + chroot "$ROOTFS" env -i xbps-reconfigure -f base-files + + # Enable choosen UTF-8 locale and generate it into the target rootfs. + if [ -f "$ROOTFS"/etc/default/libc-locales ]; then + sed -e "s/\#\(${LOCALE}.*\)/\1/g" -i "$ROOTFS"/etc/default/libc-locales + fi + + if XBPS_ARCH=$BASE_ARCH "$XBPS_QUERY_CMD" -r "$ROOTFS" dkms >/dev/null 2>&1; then + # dkms modules alphabetically before dkms can't configure + # if dkms hasn't configured beforehand to create /var/lib/dkms + chroot "$ROOTFS" env -i xbps-reconfigure dkms + fi + + chroot "$ROOTFS" env -i xbps-reconfigure -a + + if XBPS_ARCH=$BASE_ARCH "$XBPS_QUERY_CMD" -r "$ROOTFS" dash >/dev/null 2>&1; then + # bash configures alphabetically before dash, + # so if it's installed we should ensure it's /bin/sh + chroot "$ROOTFS" env -i xbps-alternatives -s dash + fi + + post_install_packages +} + +ignore_packages() { + mkdir -p "$ROOTFS"/etc/xbps.d + for pkg in "${IGNORE_PKGS[@]}"; do + echo "ignorepkg=$pkg" >> "$ROOTFS"/etc/xbps.d/mklive-ignore.conf + done +} + +enable_services() { + SERVICE_LIST="$*" + for service in $SERVICE_LIST; do + if ! [ -e $ROOTFS/etc/sv/$service ]; then + die "service $service not in /etc/sv" + fi + ln -sf /etc/sv/$service $ROOTFS/etc/runit/runsvdir/default/ + done +} + +change_shell() { + chroot "$ROOTFS" chsh -s "$ROOT_SHELL" root + [ $? -ne 0 ] && die "Failed to change the shell for root" +} + +copy_include_directories() { + for includedir in "${INCLUDE_DIRS[@]}"; do + info_msg "=> copying include directory '$includedir' ..." + find "$includedir" -mindepth 1 -maxdepth 1 -exec cp -rfpPv {} "$ROOTFS"/ \; + done +} + +generate_initramfs() { + local _args + + copy_dracut_files "$ROOTFS" + copy_autoinstaller_files "$ROOTFS" + chroot "$ROOTFS" env -i /usr/bin/dracut -N --"${INITRAMFS_COMPRESSION}" \ + --add-drivers "ahci" --force-add "vmklive autoinstaller" --omit systemd "/boot/initrd" $KERNELVERSION + [ $? -ne 0 ] && die "Failed to generate the initramfs" + + mv "$ROOTFS"/boot/initrd "$BOOT_DIR" + case "$TARGET_ARCH" in + i686*|x86_64*) cp "$ROOTFS/boot/vmlinuz-$KERNELVERSION" "$BOOT_DIR"/vmlinuz ;; + aarch64*) cp "$ROOTFS/boot/vmlinux-$KERNELVERSION" "$BOOT_DIR"/vmlinux ;; + esac +} + +cleanup_rootfs() { + for f in "${INITRAMFS_PKGS[@]}"; do + revdeps=$(xbps-query -r "$ROOTFS" -X $f) + if [ -n "$revdeps" ]; then + xbps-pkgdb -r "$ROOTFS" -m auto $f + else + xbps-remove -r "$ROOTFS" -Ry ${f} >/dev/null 2>&1 + fi + done + rm -r "$ROOTFS"/usr/lib/dracut/modules.d/01vmklive + rm -r "$ROOTFS"/usr/lib/dracut/modules.d/01autoinstaller +} + +generate_isolinux_boot() { + cp -f "$SYSLINUX_DATADIR"/isolinux.bin "$ISOLINUX_DIR" + cp -f "$SYSLINUX_DATADIR"/ldlinux.c32 "$ISOLINUX_DIR" + cp -f "$SYSLINUX_DATADIR"/libcom32.c32 "$ISOLINUX_DIR" + cp -f "$SYSLINUX_DATADIR"/vesamenu.c32 "$ISOLINUX_DIR" + cp -f "$SYSLINUX_DATADIR"/libutil.c32 "$ISOLINUX_DIR" + cp -f "$SYSLINUX_DATADIR"/chain.c32 "$ISOLINUX_DIR" + cp -f "$SYSLINUX_DATADIR"/reboot.c32 "$ISOLINUX_DIR" + cp -f "$SYSLINUX_DATADIR"/poweroff.c32 "$ISOLINUX_DIR" + cp -f isolinux/isolinux.cfg.in "$ISOLINUX_DIR"/isolinux.cfg + cp -f ${SPLASH_IMAGE} "$ISOLINUX_DIR" + + sed -i -e "s|@@SPLASHIMAGE@@|$(basename "${SPLASH_IMAGE}")|" \ + -e "s|@@KERNVER@@|${KERNELVERSION}|" \ + -e "s|@@KEYMAP@@|${KEYMAP}|" \ + -e "s|@@ARCH@@|$TARGET_ARCH|" \ + -e "s|@@LOCALE@@|${LOCALE}|" \ + -e "s|@@BOOT_TITLE@@|${BOOT_TITLE}|" \ + -e "s|@@BOOT_CMDLINE@@|${BOOT_CMDLINE}|" \ + "$ISOLINUX_DIR"/isolinux.cfg + + # include memtest86+ + if [ -e "$VOIDTARGETDIR"/boot/memtest86+/memtest.bin ]; then + cp "$VOIDTARGETDIR"/boot/memtest86+/memtest.bin "$BOOT_DIR" + fi +} + +generate_grub_efi_boot() { + cp -f grub/grub.cfg "$GRUB_DIR" + cp -f "${SPLASH_IMAGE}" "$ISOLINUX_DIR" + cp -f grub/grub_void.cfg.pre "$GRUB_DIR"/grub_void.cfg + + case "$TARGET_ARCH" in + i686*|x86_64*) KERNEL_IMG=vmlinuz; WANT_MEMTEST=yes ;; + aarch64*) KERNEL_IMG=vmlinux; WANT_MEMTEST=no ;; + esac + + write_entry() { + local entrytitle="$1" id="$2" cmdline="$3" dtb="$4" hotkey="$5" + cat << EOF >> "$GRUB_DIR"/grub_void.cfg +menuentry "${entrytitle}" --id "${id}" ${hotkey:+--hotkey $hotkey} { + set gfxpayload="keep" + linux (\${voidlive})/boot/${KERNEL_IMG} \\ + root=live:CDLABEL=VOID_LIVE ro init=/sbin/init \\ + rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 gpt add_efi_memmap \\ + vconsole.unicode=1 vconsole.keymap=${KEYMAP} locale.LANG=${LOCALE} ${cmdline} + initrd (\${voidlive})/boot/initrd +EOF + if [ -n "${dtb}" ]; then + printf ' devicetree (${voidlive})/boot/dtbs/%s\n' "${dtb}" >> "$GRUB_DIR"/grub_void.cfg + fi + printf '}\n' >> "$GRUB_DIR"/grub_void.cfg + } + + write_entries() { + local title_sfx="$1" id_sfx="$2" cmdline="$3" dtb="$4" + + ENTRY_TITLE="${BOOT_TITLE}" + + write_entry "${ENTRY_TITLE}" "linux${id_sfx}" \ + "$BOOT_CMDLINE $cmdline live.autologin live.user=player live.shell=/bin/bash quiet" "$dtb" + } + + write_entries + + # for platform in "${PLATFORMS[@]}"; do + # ( + # . "platforms/${platform}.sh" + + # if [ -n "$PLATFORM_DTB" ]; then + # mkdir -p "${BOOT_DIR}/dtbs/${PLATFORM_DTB%/*}" + # cp "${ROOTFS}/boot/dtbs/dtbs-${KERNVER}"*/"${PLATFORM_DTB}" "${BOOT_DIR}/dtbs/${PLATFORM_DTB}" + # fi + + # printf 'submenu "%s" --id platform-%s {\n' \ + # "${BOOT_TITLE} for ${PLATFORM_NAME:-$platform} >" "${platform}" >> "$GRUB_DIR"/grub_void.cfg + # write_entries "for ${PLATFORM_NAME:-$platform} " "-$platform" "$PLATFORM_CMDLINE" "${PLATFORM_DTB}" + # printf '}\n' >> "$GRUB_DIR"/grub_void.cfg + # ) + # done + + cat grub/grub_void.cfg.post >> "$GRUB_DIR"/grub_void.cfg + + cat grub/grub_void.cfg + + sed -i -e "s|@@SPLASHIMAGE@@|$(basename "${SPLASH_IMAGE}")|" "$GRUB_DIR"/grub_void.cfg + + mkdir -p "$GRUB_DIR"/fonts + + cp -f "$GRUB_DATADIR"/unicode.pf2 "$GRUB_DIR"/fonts + + modprobe -q loop || : + + # Create EFI vfat image. + truncate -s 32M "$GRUB_DIR"/efiboot.img >/dev/null 2>&1 + mkfs.vfat -F12 -S 512 -n "grub_uefi" "$GRUB_DIR/efiboot.img" >/dev/null 2>&1 + + GRUB_EFI_TMPDIR="$(mktemp --tmpdir="$BUILDDIR" -dt grub-efi.XXXXX)" + LOOP_DEVICE="$(losetup --show --find "${GRUB_DIR}"/efiboot.img)" + mount -o rw,flush -t vfat "${LOOP_DEVICE}" "${GRUB_EFI_TMPDIR}" >/dev/null 2>&1 + + build_grub_image() { + local GRUB_ARCH="$1" EFI_ARCH="$2" + xbps-uchroot "$VOIDTARGETDIR" grub-mkstandalone -- \ + --directory="/usr/lib/grub/${GRUB_ARCH}-efi" \ + --format="${GRUB_ARCH}-efi" \ + --output="/tmp/boot${EFI_ARCH,,}.efi" \ + "boot/grub/grub.cfg" + if [ $? -ne 0 ]; then + umount "$GRUB_EFI_TMPDIR" + losetup --detach "${LOOP_DEVICE}" + die "Failed to generate EFI loader" + fi + mkdir -p "${GRUB_EFI_TMPDIR}"/EFI/BOOT + cp -f "$VOIDTARGETDIR/tmp/boot${EFI_ARCH,,}.efi" "${GRUB_EFI_TMPDIR}/EFI/BOOT/BOOT${EFI_ARCH^^}.EFI" + } + + cp -a "$IMAGEDIR"/boot "$VOIDTARGETDIR" + + case "$TARGET_ARCH" in + i686*|x86_64*) + # XXX: why are both built on both arches? + build_grub_image i386 ia32 + build_grub_image x86_64 x64 + # include memtest86+ + if [ -e "$VOIDTARGETDIR"/boot/memtest86+/memtest.efi ]; then + cp "$VOIDTARGETDIR"/boot/memtest86+/memtest.efi "$BOOT_DIR" + fi + ;; + aarch64*) + build_grub_image arm64 aa64 + ;; + esac + umount "$GRUB_EFI_TMPDIR" + losetup --detach "${LOOP_DEVICE}" + rm -rf "$GRUB_EFI_TMPDIR" +} + +generate_squashfs() { + umount_pseudofs || exit 1 + + # Find out required size for the rootfs and create an ext3fs image off it. + ROOTFS_SIZE=$(du --apparent-size -sm "$ROOTFS"|awk '{print $1}') + mkdir -p "$BUILDDIR/tmp/LiveOS" + truncate -s "$((ROOTFS_SIZE+ROOTFS_SIZE))M" \ + "$BUILDDIR"/tmp/LiveOS/ext3fs.img >/dev/null 2>&1 + mkdir -p "$BUILDDIR/tmp-rootfs" + mkfs.ext3 -F -m1 "$BUILDDIR/tmp/LiveOS/ext3fs.img" >/dev/null 2>&1 + mount -o loop "$BUILDDIR/tmp/LiveOS/ext3fs.img" "$BUILDDIR/tmp-rootfs" + cp -a "$ROOTFS"/* "$BUILDDIR"/tmp-rootfs/ + umount -f "$BUILDDIR/tmp-rootfs" + mkdir -p "$IMAGEDIR/LiveOS" + + "$VOIDHOSTDIR"/usr/bin/mksquashfs "$BUILDDIR/tmp" "$IMAGEDIR/LiveOS/squashfs.img" \ + -comp "${SQUASHFS_COMPRESSION}" || die "Failed to generate squashfs image" + chmod 444 "$IMAGEDIR/LiveOS/squashfs.img" + + # Remove rootfs and temporary dirs, we don't need them anymore. + rm -rf "$ROOTFS" "$BUILDDIR/tmp-rootfs" "$BUILDDIR/tmp" +} + +generate_iso_image() { + local bootloader n + XORRISO_ARGS=( + -iso-level 3 -rock -joliet -joliet-long -max-iso9660-filenames -omit-period + -omit-version-number -relaxed-filenames -allow-lowercase + -volid VOID_LIVE + ) + + if [ "$IMAGE_TYPE" = hybrid ]; then + XORRISO_ARGS+=(-isohybrid-mbr "$SYSLINUX_DATADIR"/isohdpfx.bin) + fi + + n=1 + for bootloader in "${BOOTLOADERS[@]}"; do + if (( n > 1 )); then + XORRISO_ARGS+=(-eltorito-alt-boot) + fi + + case "${bootloader}" in + grub) + XORRISO_ARGS+=( + -e boot/grub/efiboot.img -no-emul-boot + -isohybrid-gpt-basdat -isohybrid-apm-hfsplus + ) + ;; + syslinux) + XORRISO_ARGS+=( + -eltorito-boot boot/isolinux/isolinux.bin + -eltorito-catalog boot/isolinux/boot.cat + -no-emul-boot -boot-load-size 4 -boot-info-table + ) + ;; + esac + + n=$(( n + 1 )) + done + + XORRISO_ARGS+=( + -output "$OUTPUT_FILE" "$IMAGEDIR" + ) + + "$VOIDHOSTDIR"/usr/bin/xorriso -as mkisofs "${XORRISO_ARGS[@]}" || die "Failed to generate ISO image" +} + +# +# main() +# +while getopts "a:b:r:c:C:T:Kk:l:i:I:S:e:s:o:p:g:v:P:Vh" opt; do + case $opt in + a) TARGET_ARCH="$OPTARG";; + b) BASE_SYSTEM_PKG="$OPTARG";; + r) XBPS_REPOSITORY="--repository=$OPTARG $XBPS_REPOSITORY";; + c) XBPS_CACHEDIR="$OPTARG";; + g) IGNORE_PKGS+=($OPTARG) ;; + K) readonly KEEP_BUILDDIR=1;; + k) KEYMAP="$OPTARG";; + l) LOCALE="$OPTARG";; + i) INITRAMFS_COMPRESSION="$OPTARG";; + I) INCLUDE_DIRS+=("$OPTARG");; + S) SERVICE_LIST="$SERVICE_LIST $OPTARG";; + e) ROOT_SHELL="$OPTARG";; + s) SQUASHFS_COMPRESSION="$OPTARG";; + o) OUTPUT_FILE="$OPTARG";; + p) PACKAGE_LIST+=($OPTARG);; + P) PLATFORMS+=($OPTARG) ;; + C) BOOT_CMDLINE="$OPTARG";; + T) BOOT_TITLE="$OPTARG";; + v) LINUX_VERSION="$OPTARG";; + esac +done +shift $((OPTIND - 1)) +XBPS_REPOSITORY="$XBPS_REPOSITORY --repository=https://repo-default.voidlinux.org/current --repository=https://repo-default.voidlinux.org/current/musl --repository=https://repo-default.voidlinux.org/current/aarch64" + +# Configure dracut to use overlayfs for the writable overlay. +BOOT_CMDLINE="$BOOT_CMDLINE rd.live.overlay.overlayfs=1 " + +HOST_ARCH=$(xbps-uhelper arch) + +# Set defaults +: ${TARGET_ARCH:=$(xbps-uhelper arch 2>/dev/null || uname -m)} +: ${XBPS_CACHEDIR:="$(pwd -P)"/xbps-cachedir-${TARGET_ARCH}} +: ${XBPS_HOST_CACHEDIR:="$(pwd -P)"/xbps-cachedir-${HOST_ARCH}} +: ${KEYMAP:=us} +: ${LOCALE:=en_US.UTF-8} +: ${INITRAMFS_COMPRESSION:=xz} +: ${SQUASHFS_COMPRESSION:=xz} +: ${BASE_SYSTEM_PKG:=base-system} +: ${BOOT_TITLE:="MinceraftOS"} +: ${LINUX_VERSION:=linux} + +XBPS_TARGET_ARCH="$TARGET_ARCH" register_binfmt + +case "$TARGET_ARCH" in + x86_64*|i686*) + BOOTLOADERS=(syslinux grub) + IMAGE_TYPE='hybrid' + TARGET_PKGS+=(syslinux grub-i386-efi grub-x86_64-efi memtest86+) + PLATFORMS=() # arm only + ;; + aarch64*) + BOOTLOADERS=(grub) + IMAGE_TYPE='efi' + TARGET_PKGS+=(grub-arm64-efi) + for platform in "${PLATFORMS[@]}"; do + if [ -r "platforms/${platform}.sh" ]; then + . "platforms/${platform}.sh" + else + die "unknown platform: ${platform}" + fi + PACKAGE_LIST+=("${PLATFORM_PKGS[@]}") + unset PLATFORM_PKGS PLATFORM_CMDLINE PLATFORM_DTB + done + + ;; + *) >&2 echo "architecture $TARGET_ARCH not supported by mklive.sh"; exit 1;; +esac + +# Required packages in the image for a working system. +PACKAGE_LIST+=("$BASE_SYSTEM_PKG") + +# Check for root permissions. +if [ "$(id -u)" -ne 0 ]; then + die "Must be run as root, exiting..." +fi + +trap 'error_out $? $LINENO' INT TERM 0 + +BUILDDIR="/home/user/Source/minceraftOS/build" +rm -rf $BUILDDIR +IMAGEDIR="$BUILDDIR/image" +ROOTFS="$IMAGEDIR/rootfs" +VOIDHOSTDIR="$BUILDDIR/void-host" +VOIDTARGETDIR="$BUILDDIR/void-target" +BOOT_DIR="$IMAGEDIR/boot" +ISOLINUX_DIR="$BOOT_DIR/isolinux" +GRUB_DIR="$BOOT_DIR/grub" +ROOT_SHELL="/bin/bash" +CURRENT_STEP=0 +STEP_COUNT=10 +[ "${IMAGE_TYPE}" = hybrid ] && STEP_COUNT=$((STEP_COUNT+1)) +[ "${#INCLUDE_DIRS[@]}" -gt 0 ] && STEP_COUNT=$((STEP_COUNT+1)) +[ "${#IGNORE_PKGS[@]}" -gt 0 ] && STEP_COUNT=$((STEP_COUNT+1)) +[ -n "$ROOT_SHELL" ] && STEP_COUNT=$((STEP_COUNT+1)) + +: ${SYSLINUX_DATADIR:="$VOIDTARGETDIR"/usr/lib/syslinux} +: ${GRUB_DATADIR:="$VOIDTARGETDIR"/usr/share/grub} +: ${SPLASH_IMAGE:=data/splash.png} +: ${XBPS_INSTALL_CMD:=xbps-install} +: ${XBPS_REMOVE_CMD:=xbps-remove} +: ${XBPS_QUERY_CMD:=xbps-query} +: ${XBPS_RINDEX_CMD:=xbps-rindex} +: ${XBPS_UHELPER_CMD:=xbps-uhelper} +: ${XBPS_RECONFIGURE_CMD:=xbps-reconfigure} + +mkdir -p "$ROOTFS" "$VOIDHOSTDIR" "$VOIDTARGETDIR" "$GRUB_DIR" "$ISOLINUX_DIR" + +print_step "Synchronizing XBPS repository data..." +copy_void_keys "$ROOTFS" +XBPS_ARCH=$TARGET_ARCH $XBPS_INSTALL_CMD -r "$ROOTFS" ${XBPS_REPOSITORY} -S +copy_void_keys "$VOIDHOSTDIR" +XBPS_ARCH=$HOST_ARCH $XBPS_INSTALL_CMD -r "$VOIDHOSTDIR" ${XBPS_REPOSITORY} -S +copy_void_keys "$VOIDTARGETDIR" +XBPS_ARCH=$TARGET_ARCH $XBPS_INSTALL_CMD -r "$VOIDTARGETDIR" ${XBPS_REPOSITORY} -S + +# Get linux version for ISO +# If linux version option specified use +shopt -s extglob +case "$LINUX_VERSION" in + linux+([0-9.])) + IGNORE_PKGS+=(linux) + PACKAGE_LIST+=("$LINUX_VERSION" linux-base) + ;; + linux-@(mainline|lts)) + IGNORE_PKGS+=(linux) + PACKAGE_LIST+=("$LINUX_VERSION") + LINUX_VERSION="$(XBPS_ARCH=$TARGET_ARCH $XBPS_QUERY_CMD -r "$ROOTFS" ${XBPS_REPOSITORY:=-R} -x "$LINUX_VERSION" | grep 'linux[0-9._]\+')" + ;; + linux-asahi) + IGNORE_PKGS+=(linux) + PACKAGE_LIST+=(linux-asahi linux-base) + ;; + linux) + PACKAGE_LIST+=(linux) + LINUX_VERSION="$(XBPS_ARCH=$TARGET_ARCH $XBPS_QUERY_CMD -r "$ROOTFS" ${XBPS_REPOSITORY:=-R} -x linux | grep 'linux[0-9._]\+')" + ;; + *) + die "-v option must be in format linux or linux-" + ;; +esac +shopt -u extglob + +_kver="$(XBPS_ARCH=$TARGET_ARCH $XBPS_QUERY_CMD -r "$ROOTFS" ${XBPS_REPOSITORY:=-R} -p pkgver $LINUX_VERSION)" +KERNELVERSION=$($XBPS_UHELPER_CMD getpkgversion ${_kver}) + +if [ "$LINUX_VERSION" = linux-asahi ]; then + KERNELVERSION="${KERNELVERSION%%_*}-asahi_${KERNELVERSION##*_}" +fi + +if [ "$?" -ne "0" ]; then + die "Failed to find kernel package version" +fi + +mkdir -p output + +: ${OUTPUT_FILE="output/minceraftOS-$MOSVER-$(date '+%Y-%m-%d_%H:%M:%S').iso"} + +print_step "Installing software to generate the image: ${REQUIRED_PKGS[*]} ..." +install_prereqs "${REQUIRED_PKGS[@]}" + +print_step "Installing software to generate the image: ${TARGET_PKGS[*]} ..." +install_target_pkgs "${TARGET_PKGS[@]}" + +mkdir -p "$ROOTFS"/etc +[ -s data/motd ] && cp data/motd "$ROOTFS"/etc +[ -s data/issue ] && cp data/issue "$ROOTFS"/etc +# cp -r data/minceraft "$ROOTFS"/etc + +if [ "${#IGNORE_PKGS[@]}" -gt 0 ]; then + print_step "Ignoring packages in the rootfs: ${IGNORE_PKGS[*]} ..." + ignore_packages +fi + +print_step "Installing void pkgs into the rootfs: ${PACKAGE_LIST[*]} ..." +install_packages + +: ${DEFAULT_SERVICE_LIST:=agetty-tty1 agetty-tty2 agetty-tty3 agetty-tty4 agetty-tty5 agetty-tty6 udevd} +print_step "Enabling services: ${SERVICE_LIST} ..." +enable_services ${DEFAULT_SERVICE_LIST} ${SERVICE_LIST} + +if [ -n "$ROOT_SHELL" ]; then + print_step "Changing the root shell ..." + change_shell +fi + +if [ "${#INCLUDE_DIRS[@]}" -gt 0 ];then + print_step "Copying directory structures into the rootfs ..." + copy_include_directories +fi + +print_step "Generating initramfs image ($INITRAMFS_COMPRESSION)..." +generate_initramfs + +if [ "$IMAGE_TYPE" = hybrid ]; then + print_step "Generating isolinux support for PC-BIOS systems..." + generate_isolinux_boot +fi + +print_step "Generating GRUB support for EFI systems..." +generate_grub_efi_boot + +mkdir -p "$ROOTFS"/home +mkdir -p "$ROOTFS"/home/player +cp data/xinitrc "$ROOTFS"/home/player/.xinitrc +cp data/bash_profile "$ROOTFS"/home/player/.bash_profile +cp -r data/minceraft "$ROOTFS"/home/player/minceraft +touch "$ROOTFS"/home/player/.Xauthority +cp data/bash_profile "$ROOTFS"/home/player/.profile +cp data/bash_profile "$ROOTFS"/etc/profile +chmod 777 "$ROOTFS"/home/player -R + +mkdir -p "$ROOTFS"/usr +mkdir -p "$ROOTFS"/usr/share +mkdir -p "$ROOTFS"/usr/share/icons/ +mkdir -p "$ROOTFS"/usr/share/icons/default +cp -r data/cursors "$ROOTFS"/usr/share/icons/default/cursors +cp data/index.theme "$ROOTFS"/usr/share/icons/default/index.theme +chmod -R 755 "$ROOTFS"/usr/share/icons/default/cursors + +print_step "Cleaning up rootfs..." +cleanup_rootfs + +print_step "Generating squashfs image ($SQUASHFS_COMPRESSION) from rootfs..." +generate_squashfs + +print_step "Generating ISO image..." +generate_iso_image + +hsize=$(du -sh "$OUTPUT_FILE"|awk '{print $1}') +info_msg "Created $(readlink -f "$OUTPUT_FILE") ($hsize) successfully." diff --git a/packer/.gitignore b/packer/.gitignore new file mode 100644 index 0000000..9ff404c --- /dev/null +++ b/packer/.gitignore @@ -0,0 +1,6 @@ +output_* +packer_cache +crash.log +*.box +templates/ +cloud-generic diff --git a/packer/hcl2/build-cloud-generic.pkr.hcl b/packer/hcl2/build-cloud-generic.pkr.hcl new file mode 100644 index 0000000..e471b22 --- /dev/null +++ b/packer/hcl2/build-cloud-generic.pkr.hcl @@ -0,0 +1,37 @@ +build { + name = "cloud-generic-x86_64" + + source "source.qemu.x86_64" { + boot_command = [ + "", + "auto autourl=http://{{.HTTPIP}}:{{.HTTPPort}}/x86_64.cfg", + "" + ] + vm_name = "voidlinux-x86_64" + output_directory = "cloud-generic-x86_64" + } + + provisioner "shell" { + script = "scripts/cloud.sh" + execute_command = "echo 'void' | {{.Vars}} sudo -E -S bash '{{.Path}}'" + } +} + +build { + name = "cloud-generic-x86_64-musl" + + source "source.qemu.x86_64" { + boot_command = [ + "", + "auto autourl=http://{{.HTTPIP}}:{{.HTTPPort}}/x86_64-musl.cfg", + "" + ] + vm_name = "voidlinux-x86_64-musl" + output_directory = "cloud-generic-x86_64-musl" + } + + provisioner "shell" { + script = "scripts/cloud.sh" + execute_command = "echo 'void' | {{.Vars}} sudo -E -S bash '{{.Path}}'" + } +} diff --git a/packer/hcl2/build-vagrant.pkr.hcl b/packer/hcl2/build-vagrant.pkr.hcl new file mode 100644 index 0000000..db6e95c --- /dev/null +++ b/packer/hcl2/build-vagrant.pkr.hcl @@ -0,0 +1,45 @@ +build { + name = "vagrant-virtualbox-x86_64" + + source "source.virtualbox-iso.x86_64" { + boot_command = [ + "", + "auto autourl=http://{{.HTTPIP}}:{{.HTTPPort}}/x86_64.cfg", + "" + ] + vm_name = "voidlinux-x86_64" + output_directory = "vagrant-virtualbox-x86_64" + } + + provisioner "shell" { + script = "scripts/vagrant.sh" + execute_command = "echo 'void' | {{.Vars}} sudo -E -S bash '{{.Path}}'" + } + + post-processor "vagrant" { + output = "vagrant-virtualbox-x86_64.box" + } +} + +build { + name = "vagrant-virtualbox-x86_64-musl" + + source "source.virtualbox-iso.x86_64" { + boot_command = [ + "", + "auto autourl=http://{{.HTTPIP}}:{{.HTTPPort}}/x86_64-musl.cfg", + "" + ] + vm_name = "voidlinux-x86_64-musl" + output_directory = "vagrant-virtualbox-x86_64-musl" + } + + provisioner "shell" { + script = "scripts/vagrant.sh" + execute_command = "echo 'void' | {{.Vars}} sudo -E -S bash '{{.Path}}'" + } + + post-processor "vagrant" { + output = "vagrant-virtualbox-x86_64-musl.box" + } +} diff --git a/packer/hcl2/source-qemu.pkr.hcl b/packer/hcl2/source-qemu.pkr.hcl new file mode 100644 index 0000000..f1e8700 --- /dev/null +++ b/packer/hcl2/source-qemu.pkr.hcl @@ -0,0 +1,13 @@ +source "qemu" "x86_64" { + accelerator = "kvm" + boot_wait = "5s" + disk_interface = "virtio" + disk_size = "2000M" + format = "qcow2" + http_directory = "http" + iso_url = "https://repo-default.voidlinux.org/live/20240314/void-live-x86_64-20240314-base.iso" + iso_checksum = "sha256:c1a3c0aff363057132f8dab80287396df8a8b4d7cd7f7d8d3f0e2c3ee9e5be7d" + ssh_password = "void" + ssh_timeout = "20m" + ssh_username = "void" +} diff --git a/packer/hcl2/source-virtualbox-ose.pkr.hcl b/packer/hcl2/source-virtualbox-ose.pkr.hcl new file mode 100644 index 0000000..a01a227 --- /dev/null +++ b/packer/hcl2/source-virtualbox-ose.pkr.hcl @@ -0,0 +1,16 @@ +source "virtualbox-iso" "x86_64" { + guest_os_type = "Linux_64" + iso_url = "https://repo-default.voidlinux.org/live/20240314/void-live-x86_64-20240314-base.iso" + iso_checksum = "sha256:c1a3c0aff363057132f8dab80287396df8a8b4d7cd7f7d8d3f0e2c3ee9e5be7d" + ssh_username = "void" + ssh_password = "void" + http_directory = "http" + ssh_timeout = "20m" + guest_additions_mode = "disable" + + vboxmanage = [ + ["modifyvm", "{{.Name}}", "--nictype1", "virtio"], + ] + + boot_wait = "5s" +} diff --git a/packer/hcl2/vagrant/build-vagrant.pkr.hcl b/packer/hcl2/vagrant/build-vagrant.pkr.hcl new file mode 120000 index 0000000..d9fcd0c --- /dev/null +++ b/packer/hcl2/vagrant/build-vagrant.pkr.hcl @@ -0,0 +1 @@ +../build-vagrant.pkr.hcl \ No newline at end of file diff --git a/packer/hcl2/vagrant/source-virtualbox-ose.pkr.hcl b/packer/hcl2/vagrant/source-virtualbox-ose.pkr.hcl new file mode 120000 index 0000000..04de266 --- /dev/null +++ b/packer/hcl2/vagrant/source-virtualbox-ose.pkr.hcl @@ -0,0 +1 @@ +../source-virtualbox-ose.pkr.hcl \ No newline at end of file diff --git a/packer/http/cloud.cfg b/packer/http/cloud.cfg new file mode 100644 index 0000000..708f7be --- /dev/null +++ b/packer/http/cloud.cfg @@ -0,0 +1,39 @@ +#!/bin/sh +# Void Linux Automatic Install Configuration + +export username="void" +export password="void" + +export end_action=func +end_function() { + printf "Linking default services" + chroot "$target" ln -s /etc/sv/dhcpcd /etc/runit/runsvdir/default/dhcpcd + chroot "$target" ln -s /etc/sv/sshd /etc/runit/runsvdir/default/sshd + + sync + reboot -f +} + + +VAI_partition_disk() { + # Paritition Disk + sfdisk "${disk}" <> "${target}/etc/fstab" +} diff --git a/packer/http/x86_64-musl.cfg b/packer/http/x86_64-musl.cfg new file mode 100644 index 0000000..4d5639c --- /dev/null +++ b/packer/http/x86_64-musl.cfg @@ -0,0 +1,42 @@ +#!/bin/sh +# Void Linux Automatic Install Configuration + +export username="void" +export password="void" + +export XBPS_ARCH=x86_64-musl +export xbpsrepository=https://repo-default.voidlinux.org/current/musl + +export end_action=func +end_function() { + printf "Linking default services" + chroot "$target" ln -s /etc/sv/dhcpcd /etc/runit/runsvdir/default/dhcpcd + chroot "$target" ln -s /etc/sv/sshd /etc/runit/runsvdir/default/sshd + + sync + reboot -f +} + + +VAI_partition_disk() { + # Paritition Disk + sfdisk "${disk}" <> "${target}/etc/fstab" +} diff --git a/packer/http/x86_64.cfg b/packer/http/x86_64.cfg new file mode 100644 index 0000000..708f7be --- /dev/null +++ b/packer/http/x86_64.cfg @@ -0,0 +1,39 @@ +#!/bin/sh +# Void Linux Automatic Install Configuration + +export username="void" +export password="void" + +export end_action=func +end_function() { + printf "Linking default services" + chroot "$target" ln -s /etc/sv/dhcpcd /etc/runit/runsvdir/default/dhcpcd + chroot "$target" ln -s /etc/sv/sshd /etc/runit/runsvdir/default/sshd + + sync + reboot -f +} + + +VAI_partition_disk() { + # Paritition Disk + sfdisk "${disk}" <> "${target}/etc/fstab" +} diff --git a/packer/plugins.pkr.hcl b/packer/plugins.pkr.hcl new file mode 100644 index 0000000..7de2aaa --- /dev/null +++ b/packer/plugins.pkr.hcl @@ -0,0 +1,16 @@ +packer { + required_plugins { + qemu = { + version = "~> 1" + source = "github.com/hashicorp/qemu" + } + vagrant = { + version = "~> 1" + source = "github.com/hashicorp/vagrant" + } + virtualbox = { + version = "~> 1" + source = "github.com/hashicorp/virtualbox" + } + } +} diff --git a/packer/scripts/cloud.sh b/packer/scripts/cloud.sh new file mode 100644 index 0000000..328d194 --- /dev/null +++ b/packer/scripts/cloud.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +echo "void ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/99-void +echo "Defaults:void !requiretty" >> /etc/sudoers.d/99-void +chmod 0440 /etc/sudoers.d/99-void +mv /etc/sudoers.d/{,10-}wheel + +xbps-install -Sy util-linux coreutils sed shinit cloud-guest-utils +ln -s /etc/sv/shinit /var/service/ + +sed -i -e 's/#ENABLE/ENABLE/' /etc/default/growpart + +passwd -dl void +passwd -dl root + +rm -rf /var/cache/xbps +rm -f /etc/ssh/ssh_host* + +shutdown -P now diff --git a/packer/scripts/vagrant.sh b/packer/scripts/vagrant.sh new file mode 100644 index 0000000..a272e72 --- /dev/null +++ b/packer/scripts/vagrant.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +useradd -m -s /bin/bash vagrant + +# Set up sudo +echo '%vagrant ALL=(ALL:ALL) NOPASSWD:ALL' > /etc/sudoers.d/vagrant +echo 'Defaults:vagrant !requiretty' >> /etc/sudoers.d/vagrant +chmod 0440 /etc/sudoers.d/vagrant + +gpasswd -d vagrant wheel + +sudo xbps-install -Sy wget + +# Installing vagrant keys +mkdir /home/vagrant/.ssh +chmod 700 /home/vagrant/.ssh +cd /home/vagrant/.ssh +wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys +chmod 600 /home/vagrant/.ssh/authorized_keys +chown -R vagrant /home/vagrant/.ssh + +# Install NFS for Vagrant +xbps-install -Sy nfs-utils + +passwd -dl vagrant +passwd -dl void +passwd -dl root + +rm -rf /var/cache/xbps + +shutdown -P now diff --git a/platforms/README.md b/platforms/README.md new file mode 100644 index 0000000..aa8a8d1 --- /dev/null +++ b/platforms/README.md @@ -0,0 +1,22 @@ +## mklive platforms + +To allow for platform-specific customization (and platform-specific/generic +images all-in-one) on aarch64, `mklive.sh -P "platform1 platform2 ..."` can be +used. That will, in turn, source `platform1.sh` and `platform2.sh` from this +directory to do a few things: + +1. add packages to the image +2. add menu entries in GRUB + +### File format + +```bash +# an optional pretty name +PLATFORM_NAME="Thinkpad X13s" +# any additional packages to add (bash array) +PLATFORM_PKGS=(x13s-base) +# any special kernel cmdline arguments +PLATFORM_CMDLINE="rd.driver.blacklist=qcom_q6v5_pas arm64.nopauth clk_ignore_unused pd_ignore_unused" +# device tree (path relative to /boot/dtbs/dtbs-$version/) +PLATFORM_DTB="qcom/sc8280xp-lenovo-thinkpad-x13s.dtb" +``` diff --git a/platforms/pinebookpro.sh b/platforms/pinebookpro.sh new file mode 100644 index 0000000..ddca53e --- /dev/null +++ b/platforms/pinebookpro.sh @@ -0,0 +1,4 @@ +PLATFORM_NAME="Pinebook Pro" +PLATFORM_PKGS=(pinebookpro-base) +PLATFORM_CMDLINE="console=ttyS2,115200 video=eDP-1:1920x1080x60" +PLATFORM_DTB="rockchip/rk3399-pinebook-pro.dtb" diff --git a/platforms/x13s.sh b/platforms/x13s.sh new file mode 100644 index 0000000..081eb01 --- /dev/null +++ b/platforms/x13s.sh @@ -0,0 +1,4 @@ +PLATFORM_NAME="Thinkpad X13s" +PLATFORM_PKGS=(x13s-base) +PLATFORM_CMDLINE="rd.driver.blacklist=qcom_q6v5_pas arm64.nopauth clk_ignore_unused pd_ignore_unused" +PLATFORM_DTB="qcom/sc8280xp-lenovo-thinkpad-x13s.dtb" diff --git a/pxelinux.cfg/pxelinux.cfg.in b/pxelinux.cfg/pxelinux.cfg.in new file mode 100644 index 0000000..63456ae --- /dev/null +++ b/pxelinux.cfg/pxelinux.cfg.in @@ -0,0 +1,36 @@ +UI vesamenu.c32 +PROMPT 0 +TIMEOUT 100 +ONTIMEOUT c + +MENU TABMSG Press ENTER to boot or TAB to edit a menu entry +MENU AUTOBOOT BIOS default device boot in # second{,s}... +MENU BACKGROUND @@SPLASHIMAGE@@ +MENU WIDTH 78 +MENU MARGIN 1 +MENU ROWS 4 +MENU VSHIFT 2 +MENU TIMEOUTROW 8 +MENU TABMSGROW 2 +MENU CMDLINEROW 11 +MENU HELPMSGROW 16 +MENU HELPMSGENDROW 29 + +MENU COLOR title * #FF5255FF * +MENU COLOR border * #00000000 #00000000 none +MENU COLOR sel * #ffffffff #FF5255FF * + +LABEL menu +MENU LABEL Interactive Session [@@BOOT_TITLE@@] (@@KERNVER@@ @@ARCH@@) +KERNEL vmlinuz +APPEND initrd=initrd root=/dev/null loglevel=4 vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@ + +LABEL auto +MENU LABEL AutoInstall [@@BOOT_TITLE@@] (@@KERNVER@@ @@ARCH@@) +KERNEL vmlinuz +APPEND initrd=initrd root=/dev/null auto loglevel=4 vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@ + +LABEL c +MENU LABEL Boot first HD found by BIOS +COM32 chain.c32 +APPEND hd0 diff --git a/release.sh b/release.sh new file mode 100755 index 0000000..f10b418 --- /dev/null +++ b/release.sh @@ -0,0 +1,88 @@ +#!/bin/bash + +set -e + +usage() { + echo "release.sh start [-l LIVE_ARCHS] [-f LIVE_VARIANTS] [-a ROOTFS_ARCHS]" + echo " [-p PLATFORMS] [-i SBC_IMGS] [-d DATE] [-r REPOSITORY] -- [gh args...]" + echo "release.sh dl [run id] -- [gh args...]" + echo "release.sh sign DATE SHASUMFILE" + exit 1 +} + +check_programs() { + for prog; do + if ! type $prog &>/dev/null; then + echo "missing program: $prog" + exit 1 + fi + done +} + +start_build() { + check_programs gh + ARGS=() + while getopts "a:d:f:i:l:p:r:" opt; do + case $opt in + a) ARGS+=(-f rootfs="$OPTARG") ;; + d) ARGS+=(-f datecode="$OPTARG") ;; + f) ARGS+=(-f live_flavors="$OPTARG") ;; + i) ARGS+=(-f sbc_imgs="$OPTARG") ;; + l) ARGS+=(-f live_archs="$OPTARG") ;; + p) ARGS+=(-f platformfs="$OPTARG") ;; + r) ARGS+=(-f mirror="$OPTARG") ;; + ?) usage;; + esac + done + shift $((OPTIND - 1)) + gh workflow run gen-images.yml "${ARGS[@]}" "$@" +} + +# this assumes that the latest successful build is the one to download +# wish it could be better but alas: +# https://github.com/cli/cli/issues/4001 +download_build() { + local run + check_programs gh + if [ -n "$1" ] && [ "$1" != "--" ]; then + run="$1" + shift + else + run="$(gh run list -s success -w gen-images.yml --json databaseId -q '.[].databaseId' "$@" | sort -r | head -1)" + fi + if [ -n "$1" ] && [ "$1" != "--" ]; then + usage + elif [ "$1" == "--" ]; then + shift + fi + echo "Downloading artifacts from run ${run} [this may take a while] ..." + gh run download "$run" -p 'void-live*' "$@" + echo "Done." +} + +sign_build() { + check_programs pwgen minisign + DATECODE="$1" + SUMFILE="$2" + mkdir -p release + + echo "Creating key..." + pwgen -cny 25 1 > "release/void-release-$DATECODE.key" + minisign -G -p "release/void-release-$DATECODE.pub" \ + -s "release/void-release-$DATECODE.sec" \ + -c "This key is only valid for images with date $DATECODE." \ + < <(cat "release/void-release-$DATECODE.key" "release/void-release-$DATECODE.key") + + echo "Signing $SUMFILE..." + minisign -S -x "${SUMFILE//txt/sig}" -s "release/void-release-$DATECODE.sec" \ + -c "This key is only valid for images with date $DATECODE." \ + -t "This key is only valid for images with date $DATECODE." \ + -m "$SUMFILE" < "release/void-release-$DATECODE.key" +} + +case "$1" in + st*) shift; start_build "$@" ;; + d*) shift; download_build "$@" ;; + si*) shift; sign_build "$@" ;; + *) usage ;; +esac diff --git a/version b/version new file mode 100644 index 0000000..6e8bf73 --- /dev/null +++ b/version @@ -0,0 +1 @@ +0.1.0