mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 18:31:52 +00:00
* add support for idmapped mounts to start-sdk * misc fixes * misc fixes * add default to textarea * fix iptables masquerade rule * fix textarea types * more fixes * better logging for rsync * fix tty size * fix wg conf generation for android * disable file mounts on dependencies * mostly there, some styling issues (#3069) * mostly there, some styling issues * fix: address comments (#3070) * fix: address comments * fix: fix * show SSL for any address with secure protocol and ssl added * better sorting and messaging --------- Co-authored-by: Alex Inkin <alexander@inkin.ru> * fixes for nextcloud * allow sidebar navigation during service state traansitions * wip: x-forwarded headers * implement x-forwarded-for proxy * lowercase domain names and fix warning popover bug * fix http2 websockets * fix websocket retry behavior * add arch filters to s9pk pack * use docker for start-cli install * add version range to package signer on registry * fix rcs < 0 * fix user information parsing * refactor service interface getters * disable idmaps * build fixes * update docker login action * streamline build * add start-cli workflow * rename * riscv64gc * fix ui packing * no default features on cli * make cli depend on GIT_HASH * more build fixes * more build fixes * interpolate arch within dockerfile * fix tests * add launch ui to service page plus other small improvements (#3075) * add launch ui to service page plus other small improvements * revert translation disable * add spinner to service list if service is health and loading * chore: some visual tune up * chore: update Taiga UI --------- Co-authored-by: waterplea <alexander@inkin.ru> * fix backups * feat: use arm hosted runners and don't fail when apt package does not exist (#3076) --------- Co-authored-by: Matt Hill <mattnine@protonmail.com> Co-authored-by: Shadowy Super Coder <musashidisciple@proton.me> Co-authored-by: Matt Hill <MattDHill@users.noreply.github.com> Co-authored-by: Alex Inkin <alexander@inkin.ru> Co-authored-by: Remco Ros <remcoros@live.nl>
64 lines
2.4 KiB
Bash
Executable File
64 lines
2.4 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
cd "$(dirname "${BASH_SOURCE[0]}")"
|
|
|
|
set -e
|
|
|
|
RUST_ARCH="$ARCH"
|
|
if [ "$ARCH" = "riscv64" ]; then
|
|
RUST_ARCH="riscv64gc"
|
|
fi
|
|
|
|
if mountpoint -q tmp/combined; then sudo umount -l tmp/combined; fi
|
|
if mountpoint -q tmp/lower; then sudo umount tmp/lower; fi
|
|
sudo rm -rf tmp
|
|
mkdir -p tmp/lower tmp/upper tmp/work tmp/combined
|
|
if which squashfuse > /dev/null; then
|
|
sudo squashfuse debian.${ARCH}.squashfs tmp/lower
|
|
else
|
|
sudo mount debian.${ARCH}.squashfs tmp/lower
|
|
fi
|
|
if which fuse-overlayfs > /dev/null; then
|
|
sudo fuse-overlayfs -olowerdir=tmp/lower,upperdir=tmp/upper,workdir=tmp/work overlay tmp/combined
|
|
else
|
|
sudo mount -t overlay -olowerdir=tmp/lower,upperdir=tmp/upper,workdir=tmp/work overlay tmp/combined
|
|
fi
|
|
|
|
QEMU=
|
|
if [ "$ARCH" != "$(uname -m)" ]; then
|
|
QEMU=/usr/bin/qemu-${ARCH}
|
|
if ! which qemu-$ARCH > /dev/null; then
|
|
>&2 echo qemu-user is required for cross-platform builds
|
|
sudo umount tmp/combined
|
|
sudo umount tmp/lower
|
|
sudo rm -rf tmp
|
|
exit 1
|
|
fi
|
|
sudo cp $(which qemu-$ARCH) tmp/combined${QEMU}
|
|
fi
|
|
|
|
sudo mkdir -p tmp/combined/usr/lib/startos/
|
|
sudo rsync -a --copy-unsafe-links dist/ tmp/combined/usr/lib/startos/init/
|
|
sudo chown -R 0:0 tmp/combined/usr/lib/startos/
|
|
sudo cp container-runtime.service tmp/combined/lib/systemd/system/container-runtime.service
|
|
sudo chown 0:0 tmp/combined/lib/systemd/system/container-runtime.service
|
|
sudo cp container-runtime-failure.service tmp/combined/lib/systemd/system/container-runtime-failure.service
|
|
sudo chown 0:0 tmp/combined/lib/systemd/system/container-runtime-failure.service
|
|
sudo cp ../core/target/${RUST_ARCH}-unknown-linux-musl/release/start-container tmp/combined/usr/bin/start-container
|
|
echo -e '#!/bin/bash\nexec start-container "$@"' | sudo tee tmp/combined/usr/bin/start-cli # TODO: remove
|
|
sudo chmod +x tmp/combined/usr/bin/start-cli
|
|
sudo chown 0:0 tmp/combined/usr/bin/start-container
|
|
echo container-runtime | sha256sum | head -c 32 | cat - <(echo) | sudo tee tmp/combined/etc/machine-id
|
|
cat deb-install.sh | sudo systemd-nspawn --console=pipe -D tmp/combined $QEMU /bin/bash
|
|
sudo truncate -s 0 tmp/combined/etc/machine-id
|
|
|
|
if [ -n "$QEMU" ]; then
|
|
sudo rm tmp/combined${QEMU}
|
|
fi
|
|
|
|
rm -f rootfs.${ARCH}.squashfs
|
|
mkdir -p ../build/lib/container-runtime
|
|
sudo mksquashfs tmp/combined rootfs.${ARCH}.squashfs
|
|
sudo umount tmp/combined
|
|
sudo umount tmp/lower
|
|
sudo rm -rf tmp |