diff --git a/.github/workflows/startos-iso.yaml b/.github/workflows/startos-iso.yaml index 72b80dc7b..72e37eb9f 100644 --- a/.github/workflows/startos-iso.yaml +++ b/.github/workflows/startos-iso.yaml @@ -125,9 +125,6 @@ jobs: - name: Set up docker QEMU uses: docker/setup-qemu-action@v3 - - name: Set up system dependencies - run: sudo apt-get update && sudo apt-get install -y qemu-user-static systemd-container squashfuse - - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -224,32 +221,13 @@ jobs: sudo rm -rf "$AGENT_TOOLSDIRECTORY" # Pre-cached tool cache (Go, Node, etc.) if: ${{ github.event.inputs.runner != 'fast' }} + - name: Set up docker QEMU + uses: docker/setup-qemu-action@v3 + - uses: actions/checkout@v4 with: submodules: recursive - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.x" - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y qemu-user-static - wget https://deb.debian.org/debian/pool/main/d/debspawn/debspawn_0.6.2-1_all.deb - sha256sum ./debspawn_0.6.2-1_all.deb | grep 37ef27458cb1e35e8bce4d4f639b06b4b3866fc0b9191ec6b9bd157afd06a817 - sudo apt-get install -y ./debspawn_0.6.2-1_all.deb - - - name: Configure debspawn - run: | - sudo mkdir -p /etc/debspawn/ - echo "AllowUnsafePermissions=true" | sudo tee /etc/debspawn/global.toml - sudo mkdir -p /var/tmp/debspawn - - - run: sudo mount -t tmpfs tmpfs /var/tmp/debspawn - if: ${{ github.event.inputs.runner == 'fast' && (matrix.platform == 'x86_64' || matrix.platform == 'x86_64-nonfree') }} - - name: Download compiled artifacts uses: actions/download-artifact@v4 with: @@ -262,12 +240,11 @@ jobs: run: | mkdir -p web/node_modules mkdir -p web/dist/raw - mkdir -p core/startos/bindings + mkdir -p core/bindings mkdir -p sdk/base/lib/osBindings mkdir -p container-runtime/node_modules mkdir -p container-runtime/dist mkdir -p container-runtime/dist/node_modules - mkdir -p core/startos/bindings mkdir -p sdk/dist mkdir -p sdk/baseDist mkdir -p patch-db/client/node_modules @@ -307,40 +284,3 @@ jobs: name: ${{ matrix.platform }}.img path: results/*.img if: ${{ matrix.platform == 'raspberrypi' }} - - - name: Upload OTA to registry - run: >- - PLATFORM=${{ matrix.platform }} make upload-ota TARGET="${{ - fromJson('{ - "alpha": "alpha-registry-x.start9.com", - "beta": "beta-registry.start9.com", - }')[github.event.inputs.deploy] - }}" KEY="${{ - fromJson( - format('{{ - "alpha": "{0}", - "beta": "{1}", - }}', secrets.ALPHA_INDEX_KEY, secrets.BETA_INDEX_KEY) - )[github.event.inputs.deploy] - }}" - if: ${{ github.event.inputs.deploy != '' && github.event.inputs.deploy != 'NONE' }} - - index: - if: ${{ github.event.inputs.deploy != '' && github.event.inputs.deploy != 'NONE' }} - needs: [image] - runs-on: ubuntu-latest - steps: - - run: >- - curl "https://${{ - fromJson('{ - "alpha": "alpha-registry-x.start9.com", - "beta": "beta-registry.start9.com", - }')[github.event.inputs.deploy] - }}:8443/resync.cgi?key=${{ - fromJson( - format('{{ - "alpha": "{0}", - "beta": "{1}", - }}', secrets.ALPHA_INDEX_KEY, secrets.BETA_INDEX_KEY) - )[github.event.inputs.deploy] - }}" diff --git a/.gitignore b/.gitignore index 616604555..227782023 100644 --- a/.gitignore +++ b/.gitignore @@ -1,28 +1,22 @@ .DS_Store .idea -/*.img -/*.img.gz -/*.img.xz -/*-raspios-bullseye-arm64-lite.img -/*-raspios-bullseye-arm64-lite.zip +*.img +*.img.gz +*.img.xz +*.zip /product_key.txt /*_product_key.txt .vscode/settings.json deploy_web.sh -deploy_web.sh secrets.db .vscode/ -/cargo-deps/**/* -/PLATFORM.txt -/ENVIRONMENT.txt -/GIT_HASH.txt -/VERSION.txt -/*.deb +/build/env/*.txt +*.deb /target -/*.squashfs +*.squashfs /results /dpkg-workdir /compiled.tar /compiled-*.tar -/firmware -/tmp \ No newline at end of file +/build/lib/firmware +tmp \ No newline at end of file diff --git a/Makefile b/Makefile index 61daa2f33..21b0bb049 100644 --- a/Makefile +++ b/Makefile @@ -1,23 +1,23 @@ ls-files = $(shell git ls-files --cached --others --exclude-standard $1) PROFILE = release -PLATFORM_FILE := $(shell ./check-platform.sh) -ENVIRONMENT_FILE := $(shell ./check-environment.sh) -GIT_HASH_FILE := $(shell ./check-git-hash.sh) -VERSION_FILE := $(shell ./check-version.sh) -BASENAME := $(shell PROJECT=startos ./basename.sh) -PLATFORM := $(shell if [ -f ./PLATFORM.txt ]; then cat ./PLATFORM.txt; else echo unknown; fi) +PLATFORM_FILE := $(shell ./build/env/check-platform.sh) +ENVIRONMENT_FILE := $(shell ./build/env/check-environment.sh) +GIT_HASH_FILE := $(shell ./build/env/check-git-hash.sh) +VERSION_FILE := $(shell ./build/env/check-version.sh) +BASENAME := $(shell PROJECT=startos ./build/env/basename.sh) +PLATFORM := $(shell if [ -f $(PLATFORM_FILE) ]; then cat $(PLATFORM_FILE); else echo unknown; fi) ARCH := $(shell if [ "$(PLATFORM)" = "raspberrypi" ]; then echo aarch64; else echo $(PLATFORM) | sed 's/-nonfree$$//g'; fi) RUST_ARCH := $(shell if [ "$(ARCH)" = "riscv64" ]; then echo riscv64gc; else echo $(ARCH); fi) -REGISTRY_BASENAME := $(shell PROJECT=start-registry PLATFORM=$(ARCH) ./basename.sh) -TUNNEL_BASENAME := $(shell PROJECT=start-tunnel PLATFORM=$(ARCH) ./basename.sh) +REGISTRY_BASENAME := $(shell PROJECT=start-registry PLATFORM=$(ARCH) ./build/env/basename.sh) +TUNNEL_BASENAME := $(shell PROJECT=start-tunnel PLATFORM=$(ARCH) ./build/env/basename.sh) IMAGE_TYPE=$(shell if [ "$(PLATFORM)" = raspberrypi ]; then echo img; else echo iso; fi) WEB_UIS := web/dist/raw/ui/index.html web/dist/raw/setup-wizard/index.html web/dist/raw/install-wizard/index.html COMPRESSED_WEB_UIS := web/dist/static/ui/index.html web/dist/static/setup-wizard/index.html web/dist/static/install-wizard/index.html -FIRMWARE_ROMS := ./firmware/$(PLATFORM) $(shell jq --raw-output '.[] | select(.platform[] | contains("$(PLATFORM)")) | "./firmware/$(PLATFORM)/" + .id + ".rom.gz"' build/lib/firmware.json) -BUILD_SRC := $(call ls-files, build) build/lib/depends build/lib/conflicts $(FIRMWARE_ROMS) -IMAGE_RECIPE_SRC := $(call ls-files, image-recipe/) -STARTD_SRC := core/startos/startd.service $(BUILD_SRC) +FIRMWARE_ROMS := build/lib/firmware/$(PLATFORM) $(shell jq --raw-output '.[] | select(.platform[] | contains("$(PLATFORM)")) | "./build/lib/firmware/$(PLATFORM)/" + .id + ".rom.gz"' build/lib/firmware.json) +BUILD_SRC := $(call ls-files, build/lib) build/lib/depends build/lib/conflicts $(FIRMWARE_ROMS) +IMAGE_RECIPE_SRC := $(call ls-files, build/image-recipe/) +STARTD_SRC := core/startd.service $(BUILD_SRC) CORE_SRC := $(call ls-files, core) $(shell git ls-files --recurse-submodules patch-db) $(GIT_HASH_FILE) WEB_SHARED_SRC := $(call ls-files, web/projects/shared) $(call ls-files, web/projects/marketplace) $(shell ls -p web/ | grep -v / | sed 's/^/web\//g') web/node_modules/.package-lock.json web/config.json patch-db/client/dist/index.js sdk/baseDist/package.json web/patchdb-ui-seed.json sdk/dist/package.json WEB_UI_SRC := $(call ls-files, web/projects/ui) @@ -28,18 +28,18 @@ PATCH_DB_CLIENT_SRC := $(shell git ls-files --recurse-submodules patch-db/client GZIP_BIN := $(shell which pigz || which gzip) TAR_BIN := $(shell which gtar || which tar) COMPILED_TARGETS := core/target/$(RUST_ARCH)-unknown-linux-musl/$(PROFILE)/startbox core/target/$(RUST_ARCH)-unknown-linux-musl/release/start-container container-runtime/rootfs.$(ARCH).squashfs -STARTOS_TARGETS := $(STARTD_SRC) $(ENVIRONMENT_FILE) $(GIT_HASH_FILE) $(VERSION_FILE) $(COMPILED_TARGETS) cargo-deps/$(RUST_ARCH)-unknown-linux-musl/release/startos-backup-fs $(PLATFORM_FILE) \ +STARTOS_TARGETS := $(STARTD_SRC) $(ENVIRONMENT_FILE) $(GIT_HASH_FILE) $(VERSION_FILE) $(COMPILED_TARGETS) target/$(RUST_ARCH)-unknown-linux-musl/release/startos-backup-fs $(PLATFORM_FILE) \ $(shell if [ "$(PLATFORM)" = "raspberrypi" ]; then \ - echo cargo-deps/aarch64-unknown-linux-musl/release/pi-beep; \ + echo target/aarch64-unknown-linux-musl/release/pi-beep; \ fi) \ $(shell /bin/bash -c 'if [[ "${ENVIRONMENT}" =~ (^|-)unstable($$|-) ]]; then \ - echo cargo-deps/$(RUST_ARCH)-unknown-linux-musl/release/flamegraph; \ + echo target/$(RUST_ARCH)-unknown-linux-musl/release/flamegraph; \ fi') \ $(shell /bin/bash -c 'if [[ "${ENVIRONMENT}" =~ (^|-)console($$|-) ]]; then \ - echo cargo-deps/$(RUST_ARCH)-unknown-linux-musl/release/tokio-console; \ + echo target/$(RUST_ARCH)-unknown-linux-musl/release/tokio-console; \ fi') -REGISTRY_TARGETS := core/target/$(RUST_ARCH)-unknown-linux-musl/$(PROFILE)/registrybox core/startos/start-registryd.service -TUNNEL_TARGETS := core/target/$(RUST_ARCH)-unknown-linux-musl/$(PROFILE)/tunnelbox core/startos/start-tunneld.service +REGISTRY_TARGETS := core/target/$(RUST_ARCH)-unknown-linux-musl/$(PROFILE)/registrybox core/start-registryd.service +TUNNEL_TARGETS := core/target/$(RUST_ARCH)-unknown-linux-musl/$(PROFILE)/tunnelbox core/start-tunneld.service ifeq ($(REMOTE),) mkdir = mkdir -p $1 @@ -73,7 +73,7 @@ metadata: $(VERSION_FILE) $(PLATFORM_FILE) $(ENVIRONMENT_FILE) $(GIT_HASH_FILE) clean: rm -rf core/target - rm -rf core/startos/bindings + rm -rf core/bindings rm -rf web/.angular rm -f web/config.json rm -rf web/node_modules @@ -81,7 +81,7 @@ clean: rm -rf patch-db/client/node_modules rm -rf patch-db/client/dist rm -rf patch-db/target - rm -rf cargo-deps + rm -rf target rm -rf dpkg-workdir rm -rf image-recipe/deb rm -rf results @@ -89,14 +89,8 @@ clean: rm -rf container-runtime/dist rm -rf container-runtime/node_modules rm -f container-runtime/*.squashfs - if [ -d container-runtime/tmp/combined ] && mountpoint container-runtime/tmp/combined; then sudo umount container-runtime/tmp/combined; fi - if [ -d container-runtime/tmp/lower ] && mountpoint container-runtime/tmp/lower; then sudo umount container-runtime/tmp/lower; fi - rm -rf container-runtime/tmp (cd sdk && make clean) - rm -f ENVIRONMENT.txt - rm -f PLATFORM.txt - rm -f GIT_HASH.txt - rm -f VERSION.txt + rm -f env/*.txt format: cd core && cargo +nightly fmt @@ -113,10 +107,10 @@ test-container-runtime: container-runtime/node_modules/.package-lock.json $(call cd container-runtime && npm test install-cli: $(GIT_HASH_FILE) - ./core/build-cli.sh --install + ./core/build/build-cli.sh --install cli: $(GIT_HASH_FILE) - ./core/build-cli.sh + ./core/build/build-cli.sh registry: core/target/$(RUST_ARCH)-unknown-linux-musl/$(PROFILE)/registrybox @@ -127,49 +121,49 @@ install-registry: $(REGISTRY_TARGETS) $(call ln,/usr/bin/start-registrybox,$(DESTDIR)/usr/bin/start-registry) $(call mkdir,$(DESTDIR)/lib/systemd/system) - $(call cp,core/startos/start-registryd.service,$(DESTDIR)/lib/systemd/system/start-registryd.service) + $(call cp,core/start-registryd.service,$(DESTDIR)/lib/systemd/system/start-registryd.service) core/target/$(RUST_ARCH)-unknown-linux-musl/$(PROFILE)/registrybox: $(CORE_SRC) $(ENVIRONMENT_FILE) - ARCH=$(ARCH) PROFILE=$(PROFILE) ./core/build-registrybox.sh + ARCH=$(ARCH) PROFILE=$(PROFILE) ./core/build/build-registrybox.sh tunnel: core/target/$(RUST_ARCH)-unknown-linux-musl/$(PROFILE)/tunnelbox -install-tunnel: core/target/$(RUST_ARCH)-unknown-linux-musl/$(PROFILE)/tunnelbox core/startos/start-tunneld.service +install-tunnel: core/target/$(RUST_ARCH)-unknown-linux-musl/$(PROFILE)/tunnelbox core/start-tunneld.service $(call mkdir,$(DESTDIR)/usr/bin) $(call cp,core/target/$(RUST_ARCH)-unknown-linux-musl/$(PROFILE)/tunnelbox,$(DESTDIR)/usr/bin/start-tunnelbox) $(call ln,/usr/bin/start-tunnelbox,$(DESTDIR)/usr/bin/start-tunneld) $(call ln,/usr/bin/start-tunnelbox,$(DESTDIR)/usr/bin/start-tunnel) $(call mkdir,$(DESTDIR)/lib/systemd/system) - $(call cp,core/startos/start-tunneld.service,$(DESTDIR)/lib/systemd/system/start-tunneld.service) + $(call cp,core/start-tunneld.service,$(DESTDIR)/lib/systemd/system/start-tunneld.service) $(call mkdir,$(DESTDIR)/usr/lib/startos/scripts) $(call cp,build/lib/scripts/forward-port,$(DESTDIR)/usr/lib/startos/scripts/forward-port) core/target/$(RUST_ARCH)-unknown-linux-musl/$(PROFILE)/tunnelbox: $(CORE_SRC) $(ENVIRONMENT_FILE) $(GIT_HASH_FILE) web/dist/static/start-tunnel/index.html - ARCH=$(ARCH) PROFILE=$(PROFILE) ./core/build-tunnelbox.sh + ARCH=$(ARCH) PROFILE=$(PROFILE) ./core/build/build-tunnelbox.sh deb: results/$(BASENAME).deb -results/$(BASENAME).deb: dpkg-build.sh $(call ls-files,debian/startos) $(STARTOS_TARGETS) - PLATFORM=$(PLATFORM) REQUIRES=debian ./build/os-compat/run-compat.sh ./dpkg-build.sh +results/$(BASENAME).deb: debian/dpkg-build.sh $(call ls-files,debian/startos) $(STARTOS_TARGETS) + PLATFORM=$(PLATFORM) REQUIRES=debian ./build/os-compat/run-compat.sh ./debian/dpkg-build.sh registry-deb: results/$(REGISTRY_BASENAME).deb -results/$(REGISTRY_BASENAME).deb: dpkg-build.sh $(call ls-files,debian/start-registry) $(REGISTRY_TARGETS) - PROJECT=start-registry PLATFORM=$(ARCH) REQUIRES=debian ./build/os-compat/run-compat.sh ./dpkg-build.sh +results/$(REGISTRY_BASENAME).deb: debian/dpkg-build.sh $(call ls-files,debian/start-registry) $(REGISTRY_TARGETS) + PROJECT=start-registry PLATFORM=$(ARCH) REQUIRES=debian ./build/os-compat/run-compat.sh ./debian/dpkg-build.sh tunnel-deb: results/$(TUNNEL_BASENAME).deb -results/$(TUNNEL_BASENAME).deb: dpkg-build.sh $(call ls-files,debian/start-tunnel) $(TUNNEL_TARGETS) build/lib/scripts/forward-port - PROJECT=start-tunnel PLATFORM=$(ARCH) REQUIRES=debian DEPENDS=wireguard-tools,iptables,conntrack ./build/os-compat/run-compat.sh ./dpkg-build.sh +results/$(TUNNEL_BASENAME).deb: debian/dpkg-build.sh $(call ls-files,debian/start-tunnel) $(TUNNEL_TARGETS) build/lib/scripts/forward-port + PROJECT=start-tunnel PLATFORM=$(ARCH) REQUIRES=debian DEPENDS=wireguard-tools,iptables,conntrack ./build/os-compat/run-compat.sh ./debian/dpkg-build.sh $(IMAGE_TYPE): results/$(BASENAME).$(IMAGE_TYPE) squashfs: results/$(BASENAME).squashfs results/$(BASENAME).$(IMAGE_TYPE) results/$(BASENAME).squashfs: $(IMAGE_RECIPE_SRC) results/$(BASENAME).deb - ./image-recipe/run-local-build.sh "results/$(BASENAME).deb" + ARCH=$(ARCH) ./build/image-recipe/run-local-build.sh "results/$(BASENAME).deb" # For creating os images. DO NOT USE install: $(STARTOS_TARGETS) @@ -178,18 +172,18 @@ install: $(STARTOS_TARGETS) $(call cp,core/target/$(RUST_ARCH)-unknown-linux-musl/$(PROFILE)/startbox,$(DESTDIR)/usr/bin/startbox) $(call ln,/usr/bin/startbox,$(DESTDIR)/usr/bin/startd) $(call ln,/usr/bin/startbox,$(DESTDIR)/usr/bin/start-cli) - if [ "$(PLATFORM)" = "raspberrypi" ]; then $(call cp,cargo-deps/aarch64-unknown-linux-musl/release/pi-beep,$(DESTDIR)/usr/bin/pi-beep); fi + if [ "$(PLATFORM)" = "raspberrypi" ]; then $(call cp,target/aarch64-unknown-linux-musl/release/pi-beep,$(DESTDIR)/usr/bin/pi-beep); fi if /bin/bash -c '[[ "${ENVIRONMENT}" =~ (^|-)unstable($$|-) ]]'; then \ - $(call cp,cargo-deps/$(RUST_ARCH)-unknown-linux-musl/release/flamegraph,$(DESTDIR)/usr/bin/flamegraph); \ + $(call cp,target/$(RUST_ARCH)-unknown-linux-musl/release/flamegraph,$(DESTDIR)/usr/bin/flamegraph); \ fi if /bin/bash -c '[[ "${ENVIRONMENT}" =~ (^|-)console($$|-) ]]'; then \ - $(call cp,cargo-deps/$(RUST_ARCH)-unknown-linux-musl/release/tokio-console,$(DESTDIR)/usr/bin/tokio-console); \ + $(call cp,target/$(RUST_ARCH)-unknown-linux-musl/release/tokio-console,$(DESTDIR)/usr/bin/tokio-console); \ fi - $(call cp,cargo-deps/$(RUST_ARCH)-unknown-linux-musl/release/startos-backup-fs,$(DESTDIR)/usr/bin/startos-backup-fs) + $(call cp,target/$(RUST_ARCH)-unknown-linux-musl/release/startos-backup-fs,$(DESTDIR)/usr/bin/startos-backup-fs) $(call ln,/usr/bin/startos-backup-fs,$(DESTDIR)/usr/sbin/mount.backup-fs) $(call mkdir,$(DESTDIR)/lib/systemd/system) - $(call cp,core/startos/startd.service,$(DESTDIR)/lib/systemd/system/startd.service) + $(call cp,core/startd.service,$(DESTDIR)/lib/systemd/system/startd.service) $(call mkdir,$(DESTDIR)/usr/lib) $(call rm,$(DESTDIR)/usr/lib/startos) @@ -197,18 +191,16 @@ install: $(STARTOS_TARGETS) $(call mkdir,$(DESTDIR)/usr/lib/startos/container-runtime) $(call cp,container-runtime/rootfs.$(ARCH).squashfs,$(DESTDIR)/usr/lib/startos/container-runtime/rootfs.squashfs) - $(call cp,PLATFORM.txt,$(DESTDIR)/usr/lib/startos/PLATFORM.txt) - $(call cp,ENVIRONMENT.txt,$(DESTDIR)/usr/lib/startos/ENVIRONMENT.txt) - $(call cp,GIT_HASH.txt,$(DESTDIR)/usr/lib/startos/GIT_HASH.txt) - $(call cp,VERSION.txt,$(DESTDIR)/usr/lib/startos/VERSION.txt) - - $(call cp,firmware/$(PLATFORM),$(DESTDIR)/usr/lib/startos/firmware) + $(call cp,build/env/PLATFORM.txt,$(DESTDIR)/usr/lib/startos/PLATFORM.txt) + $(call cp,build/env/ENVIRONMENT.txt,$(DESTDIR)/usr/lib/startos/ENVIRONMENT.txt) + $(call cp,build/env/GIT_HASH.txt,$(DESTDIR)/usr/lib/startos/GIT_HASH.txt) + $(call cp,build/env/VERSION.txt,$(DESTDIR)/usr/lib/startos/VERSION.txt) update-overlay: $(STARTOS_TARGETS) @echo "\033[33m!!! THIS WILL ONLY REFLASH YOUR DEVICE IN MEMORY !!!\033[0m" @echo "\033[33mALL CHANGES WILL BE REVERTED IF YOU RESTART THE DEVICE\033[0m" @if [ -z "$(REMOTE)" ]; then >&2 echo "Must specify REMOTE" && false; fi - @if [ "`ssh $(REMOTE) 'cat /usr/lib/startos/VERSION.txt'`" != "`cat ./VERSION.txt`" ]; then >&2 echo "StartOS requires migrations: update-overlay is unavailable." && false; fi + @if [ "`ssh $(REMOTE) 'cat /usr/lib/startos/VERSION.txt'`" != "`cat $(VERSION_FILE)`" ]; then >&2 echo "StartOS requires migrations: update-overlay is unavailable." && false; fi $(call ssh,"sudo systemctl stop startd") $(MAKE) install REMOTE=$(REMOTE) SSHPASS=$(SSHPASS) PLATFORM=$(PLATFORM) $(call ssh,"sudo systemctl start startd") @@ -266,7 +258,7 @@ emulate-reflash: $(STARTOS_TARGETS) $(call ssh,'sudo /media/startos/next/usr/lib/startos/scripts/chroot-and-upgrade --no-sync "apt-get install -y $(shell cat ./build/lib/depends)"') upload-ota: results/$(BASENAME).squashfs - TARGET=$(TARGET) KEY=$(KEY) ./upload-ota.sh + TARGET=$(TARGET) KEY=$(KEY) ./build/upload-ota.sh container-runtime/debian.$(ARCH).squashfs: ./container-runtime/download-base-image.sh ARCH=$(ARCH) ./container-runtime/download-base-image.sh @@ -279,16 +271,16 @@ container-runtime/node_modules/.package-lock.json: container-runtime/package-loc npm --prefix container-runtime ci touch container-runtime/node_modules/.package-lock.json -ts-bindings: core/startos/bindings/index.ts +ts-bindings: core/bindings/index.ts mkdir -p sdk/base/lib/osBindings - rsync -ac --delete core/startos/bindings/ sdk/base/lib/osBindings/ + rsync -ac --delete core/bindings/ sdk/base/lib/osBindings/ -core/startos/bindings/index.ts: $(call ls-files, core) $(ENVIRONMENT_FILE) - rm -rf core/startos/bindings - ./core/build-ts.sh - ls core/startos/bindings/*.ts | sed 's/core\/startos\/bindings\/\([^.]*\)\.ts/export { \1 } from ".\/\1";/g' | grep -v '"./index"' | tee core/startos/bindings/index.ts - npm --prefix sdk exec -- prettier --config ./sdk/base/package.json -w ./core/startos/bindings/*.ts - touch core/startos/bindings/index.ts +core/bindings/index.ts: $(call ls-files, core) $(ENVIRONMENT_FILE) + rm -rf core/bindings + ./core/build/build-ts.sh + ls core/bindings/*.ts | sed 's/core\/startos\/bindings\/\([^.]*\)\.ts/export { \1 } from ".\/\1";/g' | grep -v '"./index"' | tee core/bindings/index.ts + npm --prefix sdk exec -- prettier --config ./sdk/base/package.json -w ./core/bindings/*.ts + touch core/bindings/index.ts sdk/dist/package.json sdk/baseDist/package.json: $(call ls-files, sdk) sdk/base/lib/osBindings/index.ts (cd sdk && make bundle) @@ -303,21 +295,21 @@ container-runtime/dist/node_modules/.package-lock.json container-runtime/dist/pa ./container-runtime/install-dist-deps.sh touch container-runtime/dist/node_modules/.package-lock.json -container-runtime/rootfs.$(ARCH).squashfs: container-runtime/debian.$(ARCH).squashfs container-runtime/container-runtime.service container-runtime/update-image.sh container-runtime/deb-install.sh container-runtime/dist/index.js container-runtime/dist/node_modules/.package-lock.json core/target/$(RUST_ARCH)-unknown-linux-musl/release/start-container - ARCH=$(ARCH) REQUIRES=qemu ./build/os-compat/run-compat.sh ./container-runtime/update-image.sh +container-runtime/rootfs.$(ARCH).squashfs: container-runtime/debian.$(ARCH).squashfs container-runtime/container-runtime.service container-runtime/update-image.sh container-runtime/update-image-local.sh container-runtime/deb-install.sh container-runtime/dist/index.js container-runtime/dist/node_modules/.package-lock.json core/target/$(RUST_ARCH)-unknown-linux-musl/release/start-container + ARCH=$(ARCH) ./container-runtime/update-image-local.sh build/lib/depends build/lib/conflicts: $(ENVIRONMENT_FILE) $(PLATFORM_FILE) $(shell ls build/dpkg-deps/*) PLATFORM=$(PLATFORM) ARCH=$(ARCH) build/dpkg-deps/generate.sh -$(FIRMWARE_ROMS): build/lib/firmware.json download-firmware.sh $(PLATFORM_FILE) - ./download-firmware.sh $(PLATFORM) +$(FIRMWARE_ROMS): build/lib/firmware.json ./build/download-firmware.sh $(PLATFORM_FILE) + ./build/download-firmware.sh $(PLATFORM) core/target/$(RUST_ARCH)-unknown-linux-musl/$(PROFILE)/startbox: $(CORE_SRC) $(COMPRESSED_WEB_UIS) web/patchdb-ui-seed.json $(ENVIRONMENT_FILE) - ARCH=$(ARCH) PROFILE=$(PROFILE) ./core/build-startbox.sh + ARCH=$(ARCH) PROFILE=$(PROFILE) ./core/build/build-startbox.sh touch core/target/$(RUST_ARCH)-unknown-linux-musl/$(PROFILE)/startbox core/target/$(RUST_ARCH)-unknown-linux-musl/release/start-container: $(CORE_SRC) $(ENVIRONMENT_FILE) - ARCH=$(ARCH) ./core/build-start-container.sh + ARCH=$(ARCH) ./core/build/build-start-container.sh touch core/target/$(RUST_ARCH)-unknown-linux-musl/release/start-container web/package-lock.json: web/package.json sdk/baseDist/package.json @@ -350,10 +342,10 @@ web/dist/raw/start-tunnel/index.html: $(WEB_START_TUNNEL_SRC) $(WEB_SHARED_SRC) touch web/dist/raw/start-tunnel/index.html web/dist/static/%/index.html: web/dist/raw/%/index.html - ./compress-uis.sh $* + ./web/compress-uis.sh $* -web/config.json: $(GIT_HASH_FILE) web/config-sample.json - jq '.useMocks = false' web/config-sample.json | jq '.gitHash = "$(shell cat GIT_HASH.txt)"' > web/config.json +web/config.json: $(GIT_HASH_FILE) $(ENVIRONMENT_FILE) web/config-sample.json web/update-config.sh + ./web/update-config.sh patch-db/client/node_modules/.package-lock.json: patch-db/client/package.json npm --prefix patch-db/client ci @@ -374,17 +366,17 @@ uis: $(WEB_UIS) # this is a convenience step to build the UI ui: web/dist/raw/ui -cargo-deps/aarch64-unknown-linux-musl/release/pi-beep: ./build-cargo-dep.sh - ARCH=aarch64 ./build-cargo-dep.sh pi-beep +target/aarch64-unknown-linux-musl/release/pi-beep: ./build/build-cargo-dep.sh + ARCH=aarch64 ./build/build-cargo-dep.sh pi-beep -cargo-deps/$(RUST_ARCH)-unknown-linux-musl/release/tokio-console: ./build-cargo-dep.sh - ARCH=$(ARCH) ./build-cargo-dep.sh tokio-console +target/$(RUST_ARCH)-unknown-linux-musl/release/tokio-console: ./build/build-cargo-dep.sh + ARCH=$(ARCH) ./build/build-cargo-dep.sh tokio-console touch $@ -cargo-deps/$(RUST_ARCH)-unknown-linux-musl/release/startos-backup-fs: ./build-cargo-dep.sh - ARCH=$(ARCH) ./build-cargo-dep.sh --git https://github.com/Start9Labs/start-fs.git startos-backup-fs +target/$(RUST_ARCH)-unknown-linux-musl/release/startos-backup-fs: ./build/build-cargo-dep.sh + ARCH=$(ARCH) ./build/build-cargo-dep.sh --git https://github.com/Start9Labs/start-fs.git startos-backup-fs touch $@ -cargo-deps/$(RUST_ARCH)-unknown-linux-musl/release/flamegraph: ./build-cargo-dep.sh - ARCH=$(ARCH) ./build-cargo-dep.sh flamegraph +target/$(RUST_ARCH)-unknown-linux-musl/release/flamegraph: ./build/build-cargo-dep.sh + ARCH=$(ARCH) ./build/build-cargo-dep.sh flamegraph touch $@ diff --git a/agents/VERSION_BUMP.md b/agents/VERSION_BUMP.md index e7eda8812..b493bcf09 100644 --- a/agents/VERSION_BUMP.md +++ b/agents/VERSION_BUMP.md @@ -10,7 +10,7 @@ When bumping from version `X.Y.Z-alpha.N` to `X.Y.Z-alpha.N+1`, you need to upda ### 1. Core Rust Crate Version -**File: `core/startos/Cargo.toml`** +**File: `core/Cargo.toml`** Update the version string (line ~18): @@ -31,7 +31,7 @@ This will update the version in `Cargo.lock` automatically. ### 2. Create New Version Migration Module -**File: `core/startos/src/version/vX_Y_Z_alpha_N+1.rs`** +**File: `core/src/version/vX_Y_Z_alpha_N+1.rs`** Create a new version file by copying the previous version and updating: @@ -79,7 +79,7 @@ impl VersionT for Version { ### 3. Update Version Module Registry -**File: `core/startos/src/version/mod.rs`** +**File: `core/src/version/mod.rs`** Make changes in **5 locations**: @@ -176,9 +176,9 @@ This pattern helps you quickly find all the places that need updating in the nex ## Summary Checklist -- [ ] Update `core/startos/Cargo.toml` version -- [ ] Create new `core/startos/src/version/vX_Y_Z_alpha_N+1.rs` file -- [ ] Update `core/startos/src/version/mod.rs` in 5 locations +- [ ] Update `core/Cargo.toml` version +- [ ] Create new `core/src/version/vX_Y_Z_alpha_N+1.rs` file +- [ ] Update `core/src/version/mod.rs` in 5 locations - [ ] Run `cargo check` to update `core/Cargo.lock` - [ ] Update `sdk/package/lib/StartSdk.ts` OSVersion - [ ] Update `web/package.json` and `web/package-lock.json` version diff --git a/build-cargo-dep.sh b/build-cargo-dep.sh deleted file mode 100755 index 3ac4770ab..000000000 --- a/build-cargo-dep.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -set -e -shopt -s expand_aliases - -if [ "$0" != "./build-cargo-dep.sh" ]; then - >&2 echo "Must be run from start-os directory" - exit 1 -fi - -if [ -z "$ARCH" ]; then - ARCH=$(uname -m) -fi - -RUST_ARCH="$ARCH" -if [ "$ARCH" = "riscv64" ]; then - RUST_ARCH="riscv64gc" -fi - -mkdir -p cargo-deps - -source core/builder-alias.sh - -RUSTFLAGS="-C target-feature=+crt-static" - -rust-zig-builder cargo-zigbuild install $* --target-dir /workdir/cargo-deps/ --target=$RUST_ARCH-unknown-linux-musl -if [ "$(ls -nd "cargo-deps/$RUST_ARCH-unknown-linux-musl/release/${!#}" | awk '{ print $3 }')" != "$UID" ]; then - rust-zig-builder sh -c "chown -R $UID:$UID cargo-deps && chown -R $UID:$UID /usr/local/cargo" -fi diff --git a/build/build-cargo-dep.sh b/build/build-cargo-dep.sh new file mode 100755 index 000000000..69bd3ccd1 --- /dev/null +++ b/build/build-cargo-dep.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +cd "$(dirname "${BASH_SOURCE[0]}")/.." + +set -e +shopt -s expand_aliases + +if [ -z "$ARCH" ]; then + ARCH=$(uname -m) +fi + +RUST_ARCH="$ARCH" +if [ "$ARCH" = "riscv64" ]; then + RUST_ARCH="riscv64gc" +fi + +mkdir -p target + +source core/build/builder-alias.sh + +RUSTFLAGS="-C target-feature=+crt-static" + +rust-zig-builder cargo-zigbuild install $* --target-dir /workdir/target/ --target=$RUST_ARCH-unknown-linux-musl +if [ "$(ls -nd "target/$RUST_ARCH-unknown-linux-musl/release/${!#}" | awk '{ print $3 }')" != "$UID" ]; then + rust-zig-builder sh -c "chown -R $UID:$UID target && chown -R $UID:$UID /usr/local/cargo" +fi diff --git a/download-firmware.sh b/build/download-firmware.sh similarity index 76% rename from download-firmware.sh rename to build/download-firmware.sh index be72e6a6d..aaed39a5b 100755 --- a/download-firmware.sh +++ b/build/download-firmware.sh @@ -11,13 +11,13 @@ if [ -z "$PLATFORM" ]; then exit 1 fi -rm -rf ./firmware/$PLATFORM -mkdir -p ./firmware/$PLATFORM +rm -rf ./lib/firmware/$PLATFORM +mkdir -p ./lib/firmware/$PLATFORM -cd ./firmware/$PLATFORM +cd ./lib/firmware/$PLATFORM firmwares=() -while IFS= read -r line; do firmwares+=("$line"); done < <(jq -c ".[] | select(.platform[] | contains(\"$PLATFORM\"))" ../../build/lib/firmware.json) +while IFS= read -r line; do firmwares+=("$line"); done < <(jq -c ".[] | select(.platform[] | contains(\"$PLATFORM\"))" ../../firmware.json) for firmware in "${firmwares[@]}"; do if [ -n "$firmware" ]; then id=$(echo "$firmware" | jq --raw-output '.id') diff --git a/basename.sh b/build/env/basename.sh similarity index 100% rename from basename.sh rename to build/env/basename.sh diff --git a/check-environment.sh b/build/env/check-environment.sh similarity index 74% rename from check-environment.sh rename to build/env/check-environment.sh index 2a8a669cc..7e92e1304 100755 --- a/check-environment.sh +++ b/build/env/check-environment.sh @@ -1,8 +1,10 @@ #!/bin/bash +cd "$(dirname "${BASH_SOURCE[0]}")" + if ! [ -f ./ENVIRONMENT.txt ] || [ "$(cat ./ENVIRONMENT.txt)" != "$ENVIRONMENT" ]; then >&2 echo "Updating ENVIRONMENT.txt to \"$ENVIRONMENT\"" echo -n "$ENVIRONMENT" > ./ENVIRONMENT.txt fi -echo -n ./ENVIRONMENT.txt +echo -n ./build/env/ENVIRONMENT.txt diff --git a/check-git-hash.sh b/build/env/check-git-hash.sh similarity index 86% rename from check-git-hash.sh rename to build/env/check-git-hash.sh index 387d6f112..6f0b2abe1 100755 --- a/check-git-hash.sh +++ b/build/env/check-git-hash.sh @@ -1,5 +1,7 @@ #!/bin/bash +cd "$(dirname "${BASH_SOURCE[0]}")" + if [ "$GIT_BRANCH_AS_HASH" != 1 ]; then GIT_HASH="$(git rev-parse HEAD)$(if ! git diff-index --quiet HEAD --; then echo '-modified'; fi)" else @@ -11,4 +13,4 @@ if ! [ -f ./GIT_HASH.txt ] || [ "$(cat ./GIT_HASH.txt)" != "$GIT_HASH" ]; then echo -n "$GIT_HASH" > ./GIT_HASH.txt fi -echo -n ./GIT_HASH.txt \ No newline at end of file +echo -n ./build/env/GIT_HASH.txt \ No newline at end of file diff --git a/check-platform.sh b/build/env/check-platform.sh similarity index 75% rename from check-platform.sh rename to build/env/check-platform.sh index aebb0fc5f..402e1912a 100755 --- a/check-platform.sh +++ b/build/env/check-platform.sh @@ -1,8 +1,10 @@ #!/bin/bash +cd "$(dirname "${BASH_SOURCE[0]}")" + if ! [ -f ./PLATFORM.txt ] || [ "$(cat ./PLATFORM.txt)" != "$PLATFORM" ] && [ -n "$PLATFORM" ]; then >&2 echo "Updating PLATFORM.txt to \"$PLATFORM\"" echo -n "$PLATFORM" > ./PLATFORM.txt fi -echo -n ./PLATFORM.txt +echo -n ./build/env/PLATFORM.txt diff --git a/check-version.sh b/build/env/check-version.sh similarity index 57% rename from check-version.sh rename to build/env/check-version.sh index 3e0c9ddb2..414af5521 100755 --- a/check-version.sh +++ b/build/env/check-version.sh @@ -1,6 +1,8 @@ #!/bin/bash -FE_VERSION="$(cat web/package.json | grep '"version"' | sed 's/[ \t]*"version":[ \t]*"\([^"]*\)",/\1/')" +cd "$(dirname "${BASH_SOURCE[0]}")" + +FE_VERSION="$(cat ../../web/package.json | grep '"version"' | sed 's/[ \t]*"version":[ \t]*"\([^"]*\)",/\1/')" # TODO: Validate other version sources - backend/Cargo.toml, backend/src/version/mod.rs @@ -10,4 +12,4 @@ if ! [ -f ./VERSION.txt ] || [ "$(cat ./VERSION.txt)" != "$VERSION" ]; then echo -n "$VERSION" > ./VERSION.txt fi -echo -n ./VERSION.txt \ No newline at end of file +echo -n ./build/env/VERSION.txt \ No newline at end of file diff --git a/image-recipe/Dockerfile b/build/image-recipe/Dockerfile similarity index 100% rename from image-recipe/Dockerfile rename to build/image-recipe/Dockerfile diff --git a/image-recipe/README.md b/build/image-recipe/README.md similarity index 100% rename from image-recipe/README.md rename to build/image-recipe/README.md diff --git a/image-recipe/binary_grub-efi.patch b/build/image-recipe/binary_grub-efi.patch similarity index 100% rename from image-recipe/binary_grub-efi.patch rename to build/image-recipe/binary_grub-efi.patch diff --git a/image-recipe/build.sh b/build/image-recipe/build.sh similarity index 100% rename from image-recipe/build.sh rename to build/image-recipe/build.sh diff --git a/image-recipe/raspberrypi/img/etc/fstab b/build/image-recipe/raspberrypi/img/etc/fstab similarity index 100% rename from image-recipe/raspberrypi/img/etc/fstab rename to build/image-recipe/raspberrypi/img/etc/fstab diff --git a/image-recipe/raspberrypi/img/usr/lib/startos/scripts/init_resize.sh b/build/image-recipe/raspberrypi/img/usr/lib/startos/scripts/init_resize.sh similarity index 100% rename from image-recipe/raspberrypi/img/usr/lib/startos/scripts/init_resize.sh rename to build/image-recipe/raspberrypi/img/usr/lib/startos/scripts/init_resize.sh diff --git a/image-recipe/raspberrypi/squashfs/boot/cmdline.txt b/build/image-recipe/raspberrypi/squashfs/boot/cmdline.txt similarity index 100% rename from image-recipe/raspberrypi/squashfs/boot/cmdline.txt rename to build/image-recipe/raspberrypi/squashfs/boot/cmdline.txt diff --git a/image-recipe/raspberrypi/squashfs/boot/config.sh b/build/image-recipe/raspberrypi/squashfs/boot/config.sh similarity index 100% rename from image-recipe/raspberrypi/squashfs/boot/config.sh rename to build/image-recipe/raspberrypi/squashfs/boot/config.sh diff --git a/image-recipe/raspberrypi/squashfs/boot/config.txt b/build/image-recipe/raspberrypi/squashfs/boot/config.txt similarity index 100% rename from image-recipe/raspberrypi/squashfs/boot/config.txt rename to build/image-recipe/raspberrypi/squashfs/boot/config.txt diff --git a/image-recipe/raspberrypi/squashfs/etc/modprobe.d/cfg80211.conf b/build/image-recipe/raspberrypi/squashfs/etc/modprobe.d/cfg80211.conf similarity index 100% rename from image-recipe/raspberrypi/squashfs/etc/modprobe.d/cfg80211.conf rename to build/image-recipe/raspberrypi/squashfs/etc/modprobe.d/cfg80211.conf diff --git a/image-recipe/raspberrypi/squashfs/etc/startos/config.yaml b/build/image-recipe/raspberrypi/squashfs/etc/startos/config.yaml similarity index 100% rename from image-recipe/raspberrypi/squashfs/etc/startos/config.yaml rename to build/image-recipe/raspberrypi/squashfs/etc/startos/config.yaml diff --git a/image-recipe/raspberrypi/squashfs/usr/bin/extract-ikconfig b/build/image-recipe/raspberrypi/squashfs/usr/bin/extract-ikconfig similarity index 100% rename from image-recipe/raspberrypi/squashfs/usr/bin/extract-ikconfig rename to build/image-recipe/raspberrypi/squashfs/usr/bin/extract-ikconfig diff --git a/build/image-recipe/run-local-build.sh b/build/image-recipe/run-local-build.sh new file mode 100755 index 000000000..2f01dd564 --- /dev/null +++ b/build/image-recipe/run-local-build.sh @@ -0,0 +1,35 @@ +#!/bin/bash +set -e + +cd "$(dirname "${BASH_SOURCE[0]}")/../.." + +BASEDIR="$(pwd -P)" + +SUITE=trixie + +USE_TTY= +if tty -s; then + USE_TTY="-it" +fi + +dockerfile_hash=$(sha256sum ${BASEDIR}/build/image-recipe/Dockerfile | head -c 7) + +docker_img_name="start9/build-iso:${SUITE}-${dockerfile_hash}" + +platform=linux/${ARCH} +case $ARCH in + x86_64) + platform=linux/amd64;; + aarch64) + platform=linux/arm64;; +esac + +if ! docker run --rm --platform=$platform "${docker_img_name}" true 2> /dev/null; then + docker buildx build --load --platform=$platform --build-arg=SUITE=${SUITE} -t "${docker_img_name}" ./build/image-recipe +fi + +docker run $USE_TTY --rm --platform=$platform --privileged -v "$(pwd)/build/image-recipe:/root/image-recipe" -v "$(pwd)/results:/root/results" \ + -e IB_SUITE="$SUITE" \ + -e IB_UID="$UID" \ + -e IB_INCLUDE \ + "${docker_img_name}" /root/image-recipe/build.sh $@ diff --git a/image-recipe/splash.png b/build/image-recipe/splash.png similarity index 100% rename from image-recipe/splash.png rename to build/image-recipe/splash.png diff --git a/build/os-compat/buildenv.Dockerfile b/build/os-compat/buildenv.Dockerfile index 33c60a367..add6b8205 100644 --- a/build/os-compat/buildenv.Dockerfile +++ b/build/os-compat/buildenv.Dockerfile @@ -1,4 +1,4 @@ -FROM debian:forky +FROM debian:trixie RUN apt-get update && \ apt-get install -y \ @@ -12,35 +12,14 @@ RUN apt-get update && \ jq \ gzip \ brotli \ - qemu-user-static \ - binfmt-support \ squashfs-tools \ git \ - debspawn \ rsync \ b3sum \ - fuse-overlayfs \ sudo \ - systemd \ - systemd-container \ - systemd-sysv \ - dbus \ - dbus-user-session \ nodejs -RUN systemctl mask \ - systemd-firstboot.service \ - systemd-udevd.service \ - getty@tty1.service \ - console-getty.service - RUN git config --global --add safe.directory /root/start-os -RUN mkdir -p /etc/debspawn && \ - echo "AllowUnsafePermissions=true" > /etc/debspawn/global.toml - RUN mkdir -p /root/start-os WORKDIR /root/start-os - -COPY docker-entrypoint.sh /docker-entrypoint.sh -ENTRYPOINT [ "/docker-entrypoint.sh" ] \ No newline at end of file diff --git a/build/os-compat/docker-entrypoint.sh b/build/os-compat/docker-entrypoint.sh deleted file mode 100755 index fbcae99d9..000000000 --- a/build/os-compat/docker-entrypoint.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -exec /lib/systemd/systemd --unit=multi-user.target --show-status=false --log-target=journal diff --git a/build/os-compat/run-compat.sh b/build/os-compat/run-compat.sh index 8d8ee6ce2..4ec3d8da5 100755 --- a/build/os-compat/run-compat.sh +++ b/build/os-compat/run-compat.sh @@ -1,27 +1,30 @@ #!/bin/bash -if [ "$FORCE_COMPAT" = 1 ] || ( [ "$REQUIRES" = "linux" ] && [ "$(uname -s)" != "Linux" ] ) || ( [ "$REQUIRES" = "debian" ] && ! which dpkg > /dev/null ) || ( [ "$REQUIRES" = "qemu" ] && ! which qemu-$ARCH > /dev/null ); then - project_pwd="$(cd "$(dirname "${BASH_SOURCE[0]}")"/../.. && pwd)/" - pwd="$(pwd)/" - if ! [[ "$pwd" = "$project_pwd"* ]]; then - >&2 echo "Must be run from start-os project dir" - exit 1 - fi - rel_pwd="${pwd#"$project_pwd"}" +pwd=$(pwd) - SYSTEMD_TTY="-P" - USE_TTY= +cd "$(dirname "${BASH_SOURCE[0]}")/../.." + +set -e + +rel_pwd="${pwd#"$(pwd)"}" + +COMPAT_ARCH=$(uname -m) + +platform=linux/$COMPAT_ARCH + +case $COMPAT_ARCH in + x86_64) + platform=linux/amd64;; + aarch64) + platform=linux/arm64;; +esac + +if [ "$FORCE_COMPAT" = 1 ] || ( [ "$REQUIRES" = "linux" ] && [ "$(uname -s)" != "Linux" ] ) || ( [ "$REQUIRES" = "debian" ] && ! which dpkg > /dev/null ); then if tty -s; then USE_TTY="-it" - SYSTEMD_TTY="-t" fi - docker run -d --rm --name os-compat --privileged --security-opt apparmor=unconfined -v "${project_pwd}:/root/start-os" -v /lib/modules:/lib/modules:ro start9/build-env - while ! docker exec os-compat systemctl is-active --quiet multi-user.target 2> /dev/null; do sleep .5; done - docker exec -eARCH -eENVIRONMENT -ePLATFORM -eGIT_BRANCH_AS_HASH -ePROJECT -eDEPENDS -eCONFLICTS $USE_TTY -w "/root/start-os${rel_pwd}" os-compat $@ - code=$? - docker stop os-compat > /dev/null - exit $code + docker run $USE_TTY --platform=$platform -eARCH -eENVIRONMENT -ePLATFORM -eGIT_BRANCH_AS_HASH -ePROJECT -eDEPENDS -eCONFLICTS -w "/root/start-os${rel_pwd}" --rm -v "$(pwd):/root/start-os" start9/build-env $@ else exec $@ -fi \ No newline at end of file +fi diff --git a/build/upload-ota.sh b/build/upload-ota.sh new file mode 100755 index 000000000..24ee5ae6f --- /dev/null +++ b/build/upload-ota.sh @@ -0,0 +1,143 @@ +#!/bin/bash + +if [ -z "$VERSION" ]; then + >&2 echo '$VERSION required' + exit 2 +fi + +if [ -z "$RUN_ID" ]; then + >&2 echo '$RUN_ID required' + exit 2 +fi + +set -e + +if [ "$SKIP_DL" != "1" ]; then + rm -rf ~/Downloads/v$VERSION + mkdir ~/Downloads/v$VERSION + cd ~/Downloads/v$VERSION + + for arch in aarch64 aarch64-nonfree riscv64 x86_64 x86_64-nonfree raspberrypi; do + while ! gh run download -R Start9Labs/start-os $RUN_ID -n $arch.squashfs -D $(pwd); do sleep 1; done + done + for arch in aarch64 aarch64-nonfree riscv64 x86_64 x86_64-nonfree; do + while ! gh run download -R Start9Labs/start-os $RUN_ID -n $arch.iso -D $(pwd); do sleep 1; done + done + while ! gh run download -R Start9Labs/start-os $RUN_ID -n raspberrypi.img -D $(pwd); do sleep 1; done + + if [ -n "$ST_RUN_ID" ]; then + for arch in aarch64 riscv64 x86_64; do + while ! gh run download -R Start9Labs/start-os $ST_RUN_ID -n start-tunnel_$arch.deb -D $(pwd); do sleep 1; done + done + fi + + if [ -n "$CLI_RUN_ID" ]; then + for arch in aarch64 riscv64 x86_64; do + for os in linux macos; do + pair=${arch}-${os} + if [ "${pair}" = "riscv64-linux" ]; then + target=riscv64gc-unknown-linux-musl + elif [ "${pair}" = "riscv64-macos" ]; then + continue + elif [ "${os}" = "linux" ]; then + target="${arch}-unknown-linux-musl" + elif [ "${os}" = "macos" ]; then + target="${arch}-apple-darwin" + fi + while ! gh run download -R Start9Labs/start-os $CLI_RUN_ID -n start-cli_$target -D $(pwd); do sleep 1; done + mv start-cli "start-cli_${pair}" + done + done + fi +else + cd ~/Downloads/v$VERSION +fi + +start-cli --registry=https://alpha-registry-x.start9.com registry os version add $VERSION "v$VERSION" '' ">=0.3.5 <=$VERSION" + +if [ "$SKIP_UL" = "2" ]; then + exit 2 +elif [ "$SKIP_UL" != "1" ]; then + for file in *.squashfs *.iso *.deb start-cli_*; do + gh release upload -R Start9Labs/start-os v$VERSION $file + done + for file in *.img; do + if ! [ -f $file.gz ]; then + cat $file | pigz > $file.gz + fi + gh release upload -R Start9Labs/start-os v$VERSION $file.gz + done +fi + +if [ "$SKIP_INDEX" != "1" ]; then + for arch in aarch64 aarch64-nonfree x86_64 x86_64-nonfree; do + for file in *_$arch.squashfs *_$arch.iso; do + start-cli --registry=https://alpha-registry-x.start9.com registry os asset add --platform=$arch --version=$VERSION $file https://github.com/Start9Labs/start-os/releases/download/v$VERSION/$(echo -n "$file" | sed 's/~/./g') + done + done + for arch in raspberrypi; do + for file in *_$arch.squashfs; do + start-cli --registry=https://alpha-registry-x.start9.com registry os asset add --platform=$arch --version=$VERSION $file https://github.com/Start9Labs/start-os/releases/download/v$VERSION/$(echo -n "$file" | sed 's/~/./g') + done + done +fi + +for file in *.iso *.img *.img.gz *.squashfs *.deb start-cli_*; do + gpg -u 7CFFDA41CA66056A --detach-sign --armor -o "${file}.asc" "$file" +done + +gpg --export -a 7CFFDA41CA66056A > dr-bonez.key.asc +tar -czvf signatures.tar.gz *.asc + +gh release upload -R Start9Labs/start-os v$VERSION signatures.tar.gz + +cat << 'EOF' +# StartOS Checksums + +## SHA-256 +``` +EOF +sha256sum *.iso *.img *img.gz *.squashfs +cat << 'EOF' +``` + +## BLAKE-3 +``` +EOF +b3sum *.iso *.img *.img.gz *.squashfs +cat << 'EOF' +``` + +# Start-Tunnel Checksums + +## SHA-256 +``` +EOF +sha256sum start-tunnel*.deb +cat << 'EOF' +``` + +## BLAKE-3 +``` +EOF +b3sum start-tunnel*.deb +cat << 'EOF' +``` + +# start-cli Checksums + +## SHA-256 +``` +EOF +sha256sum start-cli_* +cat << 'EOF' +``` + +## BLAKE-3 +``` +EOF +b3sum start-cli_* +cat << 'EOF' +``` +EOF + diff --git a/container-runtime/deb-install.sh b/container-runtime/deb-install.sh index 0668b0c22..3cffdbca2 100644 --- a/container-runtime/deb-install.sh +++ b/container-runtime/deb-install.sh @@ -2,9 +2,6 @@ set -e -mkdir -p /run/systemd/resolve -echo "nameserver 8.8.8.8" > /run/systemd/resolve/stub-resolv.conf - apt-get update apt-get install -y curl rsync qemu-user-static nodejs @@ -16,7 +13,4 @@ sed -i '/\(^\|#\)ForwardToSyslog=/c\ForwardToSyslog=no' /etc/systemd/journald.co systemctl enable container-runtime.service -rm -rf /run/systemd - -rm -f /etc/resolv.conf echo "nameserver 10.0.3.1" > /etc/resolv.conf \ No newline at end of file diff --git a/container-runtime/mkcontainer.sh b/container-runtime/mkcontainer.sh deleted file mode 100644 index 90de54671..000000000 --- a/container-runtime/mkcontainer.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -set -e - -IMAGE=$1 - -if [ -z "$IMAGE" ]; then - >&2 echo "usage: $0 " - exit 1 -fi - -if ! [ -d "/media/images/$IMAGE" ]; then - >&2 echo "image does not exist" - exit 1 -fi - -container=$(mktemp -d) -mkdir -p $container/rootfs $container/upper $container/work -mount -t overlay -olowerdir=/media/images/$IMAGE,upperdir=$container/upper,workdir=$container/work overlay $container/rootfs - -rootfs=$container/rootfs - -for special in dev sys proc run; do - mkdir -p $rootfs/$special - mount --bind /$special $rootfs/$special -done - -echo $rootfs \ No newline at end of file diff --git a/container-runtime/rmcontainer.sh b/container-runtime/rmcontainer.sh deleted file mode 100644 index 69912eeba..000000000 --- a/container-runtime/rmcontainer.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -set -e - -rootfs=$1 -if [ -z "$rootfs" ]; then - >&2 echo "usage: $0 " - exit 1 -fi - -umount --recursive $rootfs -rm -rf $rootfs/.. \ No newline at end of file diff --git a/container-runtime/src/Adapters/Systems/SystemForEmbassy/index.ts b/container-runtime/src/Adapters/Systems/SystemForEmbassy/index.ts index 98b737cef..37af6b370 100644 --- a/container-runtime/src/Adapters/Systems/SystemForEmbassy/index.ts +++ b/container-runtime/src/Adapters/Systems/SystemForEmbassy/index.ts @@ -287,7 +287,6 @@ function convertProperties( } } -const DEFAULT_REGISTRY = "https://registry.start9.com" export class SystemForEmbassy implements System { private version: ExtendedVersion currentRunning: MainLoop | undefined diff --git a/container-runtime/update-image-local.sh b/container-runtime/update-image-local.sh new file mode 100755 index 000000000..0e790c655 --- /dev/null +++ b/container-runtime/update-image-local.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +cd "$(dirname "${BASH_SOURCE[0]}")/.." + +USE_TTY= +if tty -s; then + USE_TTY="-it" +fi + +DOCKER_PLATFORM=linux/${ARCH} +case $ARCH in + x86_64) + DOCKER_PLATFORM=linux/amd64;; + aarch64) + DOCKER_PLATFORM=linux/arm64;; +esac + +docker run --rm $USE_TTY --platform=$DOCKER_PLATFORM -eARCH --privileged -v "$(pwd):/root/start-os" start9/build-env /root/start-os/container-runtime/update-image.sh \ No newline at end of file diff --git a/container-runtime/update-image.sh b/container-runtime/update-image.sh index a5b8a0d59..0beb90f54 100755 --- a/container-runtime/update-image.sh +++ b/container-runtime/update-image.sh @@ -9,56 +9,34 @@ 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 +mount -t tmpfs tmpfs /tmp +mkdir -p /tmp/lower /tmp/upper /tmp/work /tmp/combined +mount -o loop debian.${ARCH}.squashfs /tmp/lower +mount -t overlay -olowerdir=/tmp/lower,upperdir=/tmp/upper,workdir=/tmp/work overlay /tmp/combined -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 +mkdir -p /tmp/combined/usr/lib/startos/ +rsync -a --copy-unsafe-links --info=progress2 dist/ /tmp/combined/usr/lib/startos/init/ +chown -R 0:0 /tmp/combined/usr/lib/startos/ +cp container-runtime.service /tmp/combined/lib/systemd/system/container-runtime.service +chown 0:0 /tmp/combined/lib/systemd/system/container-runtime.service +cp container-runtime-failure.service /tmp/combined/lib/systemd/system/container-runtime-failure.service +chown 0:0 /tmp/combined/lib/systemd/system/container-runtime-failure.service +cp ../core/target/${RUST_ARCH}-unknown-linux-musl/release/start-container /tmp/combined/usr/bin/start-container +echo -e '#!/bin/bash\nexec start-container "$@"' > /tmp/combined/usr/bin/start-cli # TODO: remove +chmod +x /tmp/combined/usr/bin/start-cli +chown 0:0 /tmp/combined/usr/bin/start-container +echo container-runtime | sha256sum | head -c 32 | cat - <(echo) > /tmp/combined/etc/machine-id +rm -f /tmp/combined/etc/resolv.conf +cp /etc/resolv.conf /tmp/combined/etc/resolv.conf +for fs in proc sys dev; do + mount --bind /$fs /tmp/combined/$fs +done +cat deb-install.sh | chroot /tmp/combined /bin/bash +for fs in proc sys dev; do + umount /tmp/combined/$fs +done +truncate -s 0 /tmp/combined/etc/machine-id 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 \ No newline at end of file +mksquashfs /tmp/combined rootfs.${ARCH}.squashfs \ No newline at end of file diff --git a/core/startos/.sqlx/query-bc9382d34bf93f468c64d0d02613452e7a69768da179e78479cd35ee42b493ae.json b/core/.sqlx/query-bc9382d34bf93f468c64d0d02613452e7a69768da179e78479cd35ee42b493ae.json similarity index 100% rename from core/startos/.sqlx/query-bc9382d34bf93f468c64d0d02613452e7a69768da179e78479cd35ee42b493ae.json rename to core/.sqlx/query-bc9382d34bf93f468c64d0d02613452e7a69768da179e78479cd35ee42b493ae.json diff --git a/core/Cargo.toml b/core/Cargo.toml index f03252ecc..ed539f9a0 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -1,3 +1,290 @@ -[workspace] +[package] +authors = ["Aiden McClelland "] +description = "The core of StartOS" +documentation = "https://docs.rs/start-os" +edition = "2024" +keywords = [ + "bitcoin", + "full-node", + "lightning", + "privacy", + "raspberry-pi", + "self-hosted", +] +license = "MIT" +name = "start-os" +readme = "README.md" +repository = "https://github.com/Start9Labs/start-os" +version = "0.4.0-alpha.16" # VERSION_BUMP -members = ["startos"] +[lib] +name = "startos" +path = "src/lib.rs" + +[[bin]] +name = "startbox" +path = "src/main/startbox.rs" + +[[bin]] +name = "start-cli" +path = "src/main/start-cli.rs" + +[[bin]] +name = "start-container" +path = "src/main/start-container.rs" + +[[bin]] +name = "registrybox" +path = "src/main/registrybox.rs" + +[[bin]] +name = "tunnelbox" +path = "src/main/tunnelbox.rs" + +[features] +arti = [ + "arti-client", + "safelog", + "tor-cell", + "tor-hscrypto", + "tor-hsservice", + "tor-keymgr", + "tor-llcrypto", + "tor-proto", + "tor-rtcompat", +] +beta = [] +console = ["console-subscriber", "tokio/tracing"] +default = [] +dev = [] +test = [] +unstable = ["backtrace-on-stack-overflow"] + +[dependencies] +aes = { version = "0.7.5", features = ["ctr"] } +arti-client = { version = "0.33", features = [ + "compression", + "ephemeral-keystore", + "experimental-api", + "onion-service-client", + "onion-service-service", + "rustls", + "static", + "tokio", +], default-features = false, git = "https://github.com/Start9Labs/arti.git", branch = "patch/disable-exit", optional = true } +async-acme = { version = "0.6.0", git = "https://github.com/dr-bonez/async-acme.git", features = [ + "use_rustls", + "use_tokio", +] } +async-compression = { version = "0.4.32", features = [ + "brotli", + "gzip", + "tokio", + "zstd", +] } +async-stream = "0.3.5" +async-trait = "0.1.74" +axum = { version = "0.8.4", features = ["ws", "http2"] } +backtrace-on-stack-overflow = { version = "0.3.0", optional = true } +base32 = "0.5.0" +base64 = "0.22.1" +base64ct = "1.6.0" +basic-cookies = "0.1.4" +blake3 = { version = "1.5.0", features = ["mmap", "rayon"] } +bytes = "1" +chrono = { version = "0.4.31", features = ["serde"] } +clap = { version = "4.4.12", features = ["string"] } +color-eyre = "0.6.2" +console = "0.16.2" +console-subscriber = { version = "0.5.0", optional = true } +const_format = "0.2.34" +cookie = "0.18.0" +cookie_store = "0.22.0" +curve25519-dalek = "4.1.3" +der = { version = "0.7.9", features = ["derive", "pem"] } +digest = "0.10.7" +divrem = "1.0.0" +dns-lookup = "3.0.1" +ed25519 = { version = "2.2.3", features = ["alloc", "pem", "pkcs8"] } +ed25519-dalek = { version = "2.2.0", features = [ + "digest", + "hazmat", + "pkcs8", + "rand_core", + "serde", + "zeroize", +] } +ed25519-dalek-v1 = { package = "ed25519-dalek", version = "1" } +exver = { version = "0.2.0", git = "https://github.com/Start9Labs/exver-rs.git", features = [ + "serde", +] } +fd-lock-rs = "0.1.4" +form_urlencoded = "1.2.1" +futures = "0.3.28" +gpt = "4.1.0" +hex = "0.4.3" +hickory-server = { version = "0.25.2", features = ["resolver"] } +hmac = "0.12.1" +http = "1.0.0" +http-body-util = "0.1" +hyper = { version = "1.5", features = ["http1", "http2", "server"] } +hyper-util = { version = "0.1.10", features = [ + "http1", + "http2", + "server", + "server-auto", + "server-graceful", + "service", + "tokio", +] } +id-pool = { version = "0.2.2", default-features = false, features = [ + "serde", + "u16", +] } +iddqd = "0.3.14" +imbl = { version = "6", features = ["serde", "small-chunks"] } +imbl-value = { version = "0.4.3", features = ["ts-rs"] } +include_dir = { version = "0.7.3", features = ["metadata"] } +indexmap = { version = "2.0.2", features = ["serde"] } +indicatif = { version = "0.18.3", features = ["tokio"] } +inotify = "0.11.0" +integer-encoding = { version = "4.0.0", features = ["tokio_async"] } +ipnet = { version = "2.8.0", features = ["serde"] } +isocountry = "0.3.2" +itertools = "0.14.0" +jaq-core = "0.10.1" +jaq-std = "0.10.0" +josekit = "0.10.3" +jsonpath_lib = { git = "https://github.com/Start9Labs/jsonpath.git" } +lazy_async_pool = "0.3.3" +lazy_format = "2.0" +lazy_static = "1.4.0" +lettre = { version = "0.11.18", default-features = false, features = [ + "aws-lc-rs", + "builder", + "hostname", + "pool", + "rustls-platform-verifier", + "smtp-transport", + "tokio1-rustls", +] } +libc = "0.2.149" +log = "0.4.20" +mbrman = "0.6.0" +miette = { version = "7.6.0", features = ["fancy"] } +mio = "1" +new_mime_guess = "4" +nix = { version = "0.30.1", features = [ + "fs", + "mount", + "net", + "process", + "sched", + "signal", + "user", +] } +nom = "8.0.0" +num = "0.4.1" +num_cpus = "1.16.0" +num_enum = "0.7.0" +once_cell = "1.19.0" +openssh-keys = "0.6.2" +openssl = { version = "0.10.57", features = ["vendored"] } +p256 = { version = "0.13.2", features = ["pem"] } +patch-db = { version = "*", path = "../patch-db/patch-db", features = [ + "trace", +] } +pbkdf2 = "0.12.2" +pin-project = "1.1.3" +pkcs8 = { version = "0.10.2", features = ["std"] } +prettytable-rs = "0.10.0" +proptest = "1.3.1" +proptest-derive = "0.7.0" +qrcode = "0.14.1" +r3bl_tui = "0.7.6" +rand = "0.9.2" +regex = "1.10.2" +reqwest = { version = "0.12.25", features = [ + "json", + "socks", + "stream", + "http2", +] } +reqwest_cookie_store = "0.9.0" +rpassword = "7.2.0" +rust-argon2 = "3.0.0" +rpc-toolkit = { git = "https://github.com/Start9Labs/rpc-toolkit.git" } +safelog = { version = "0.4.8", git = "https://github.com/Start9Labs/arti.git", branch = "patch/disable-exit", optional = true } +semver = { version = "1.0.20", features = ["serde"] } +serde = { version = "1.0", features = ["derive", "rc"] } +serde_cbor = { package = "ciborium", version = "0.2.1" } +serde_json = "1.0" +serde_toml = { package = "toml", version = "0.9.9+spec-1.0.0" } +serde_yaml = { package = "serde_yml", version = "0.0.12" } +sha-crypt = "0.5.0" +sha2 = "0.10.2" +signal-hook = "0.3.17" +socket2 = { version = "0.6.0", features = ["all"] } +socks5-impl = { version = "0.7.2", features = ["client", "server"] } +sqlx = { version = "0.8.6", features = [ + "postgres", + "runtime-tokio-rustls", +], default-features = false } +sscanf = "0.4.1" +ssh-key = { version = "0.6.2", features = ["ed25519"] } +tar = "0.4.40" +termion = "4.0.5" +textwrap = "0.16.1" +thiserror = "2.0.12" +tokio = { version = "1.38.1", features = ["full"] } +tokio-rustls = "0.26.4" +tokio-stream = { version = "0.1.14", features = ["io-util", "net", "sync"] } +tokio-tar = { git = "https://github.com/dr-bonez/tokio-tar.git" } +tokio-tungstenite = { version = "0.26.2", features = ["native-tls", "url"] } +tokio-util = { version = "0.7.9", features = ["io"] } +tor-cell = { version = "0.33", git = "https://github.com/Start9Labs/arti.git", branch = "patch/disable-exit", optional = true } +tor-hscrypto = { version = "0.33", features = [ + "full", +], git = "https://github.com/Start9Labs/arti.git", branch = "patch/disable-exit", optional = true } +tor-hsservice = { version = "0.33", git = "https://github.com/Start9Labs/arti.git", branch = "patch/disable-exit", optional = true } +tor-keymgr = { version = "0.33", features = [ + "ephemeral-keystore", +], git = "https://github.com/Start9Labs/arti.git", branch = "patch/disable-exit", optional = true } +tor-llcrypto = { version = "0.33", features = [ + "full", +], git = "https://github.com/Start9Labs/arti.git", branch = "patch/disable-exit", optional = true } +tor-proto = { version = "0.33", git = "https://github.com/Start9Labs/arti.git", branch = "patch/disable-exit", optional = true } +tor-rtcompat = { version = "0.33", features = [ + "rustls", + "tokio", +], git = "https://github.com/Start9Labs/arti.git", branch = "patch/disable-exit", optional = true } +torut = "0.2.1" +tower-service = "0.3.3" +tracing = "0.1.39" +tracing-error = "0.2.0" +tracing-journald = "0.3.0" +tracing-subscriber = { version = "0.3.17", features = ["env-filter"] } +ts-rs = "9.0.1" +typed-builder = "0.23.2" +url = { version = "2.4.1", features = ["serde"] } +uuid = { version = "1.4.1", features = ["v4"] } +visit-rs = "0.1.1" +x25519-dalek = { version = "2.0.1", features = ["static_secrets"] } +zbus = "5.1.1" +hashing-serializer = "0.1.1" + +[target.'cfg(target_os = "linux")'.dependencies] +procfs = "0.18.0" +pty-process = "0.5.1" + +[profile.test] +opt-level = 3 + +[profile.dev] +opt-level = 3 + +[profile.dev.package.backtrace] +opt-level = 3 + +[profile.dev.package.sqlx-macros] +opt-level = 3 diff --git a/core/build-cli.sh b/core/build/build-cli.sh similarity index 99% rename from core/build-cli.sh rename to core/build/build-cli.sh index 22bdb79e3..3d6f0aede 100755 --- a/core/build-cli.sh +++ b/core/build/build-cli.sh @@ -60,7 +60,7 @@ if [ -z "${TARGET:-}" ]; then fi fi -cd .. +cd ../.. FEATURES="$(echo "${ENVIRONMENT:-}" | sed 's/-/,/g')" RUSTFLAGS="" if [[ "${ENVIRONMENT:-}" =~ (^|-)console($|-) ]]; then diff --git a/core/build-registrybox.sh b/core/build/build-registrybox.sh similarity index 99% rename from core/build-registrybox.sh rename to core/build/build-registrybox.sh index d13d8659c..263a3ae6d 100755 --- a/core/build-registrybox.sh +++ b/core/build/build-registrybox.sh @@ -30,7 +30,7 @@ if [ "$ARCH" = "riscv64" ]; then RUST_ARCH="riscv64gc" fi -cd .. +cd ../.. FEATURES="$(echo $ENVIRONMENT | sed 's/-/,/g')" RUSTFLAGS="" diff --git a/core/build-start-container.sh b/core/build/build-start-container.sh similarity index 99% rename from core/build-start-container.sh rename to core/build/build-start-container.sh index dcd7dc194..d5a56549e 100755 --- a/core/build-start-container.sh +++ b/core/build/build-start-container.sh @@ -30,7 +30,7 @@ if [ "$ARCH" = "riscv64" ]; then RUST_ARCH="riscv64gc" fi -cd .. +cd ../.. FEATURES="$(echo $ENVIRONMENT | sed 's/-/,/g')" RUSTFLAGS="" diff --git a/core/build-startbox.sh b/core/build/build-startbox.sh similarity index 99% rename from core/build-startbox.sh rename to core/build/build-startbox.sh index a2c919ab2..5a6df1771 100755 --- a/core/build-startbox.sh +++ b/core/build/build-startbox.sh @@ -30,7 +30,7 @@ if [ "$ARCH" = "riscv64" ]; then RUST_ARCH="riscv64gc" fi -cd .. +cd ../.. FEATURES="$(echo $ENVIRONMENT | sed 's/-/,/g')" RUSTFLAGS="" diff --git a/core/build-ts.sh b/core/build/build-ts.sh similarity index 84% rename from core/build-ts.sh rename to core/build/build-ts.sh index 755aaaff6..ad808310a 100755 --- a/core/build-ts.sh +++ b/core/build/build-ts.sh @@ -30,7 +30,7 @@ if [ "$ARCH" = "riscv64" ]; then RUST_ARCH="riscv64gc" fi -cd .. +cd ../.. FEATURES="$(echo $ENVIRONMENT | sed 's/-/,/g')" RUSTFLAGS="" if [[ "${ENVIRONMENT}" =~ (^|-)console($|-) ]]; then @@ -39,6 +39,6 @@ fi echo "FEATURES=\"$FEATURES\"" echo "RUSTFLAGS=\"$RUSTFLAGS\"" rust-zig-builder cargo test --manifest-path=./core/Cargo.toml $BUILD_FLAGS --features test,$FEATURES --locked 'export_bindings_' -if [ "$(ls -nd "core/startos/bindings" | awk '{ print $3 }')" != "$UID" ]; then - rust-zig-builder sh -c "chown -R $UID:$UID core/target && chown -R $UID:$UID core/startos/bindings && chown -R $UID:$UID /usr/local/cargo" +if [ "$(ls -nd "core/bindings" | awk '{ print $3 }')" != "$UID" ]; then + rust-zig-builder sh -c "chown -R $UID:$UID core/target && chown -R $UID:$UID core/bindings && chown -R $UID:$UID /usr/local/cargo" fi \ No newline at end of file diff --git a/core/build-tunnelbox.sh b/core/build/build-tunnelbox.sh similarity index 99% rename from core/build-tunnelbox.sh rename to core/build/build-tunnelbox.sh index 1a01ac85c..181af3644 100755 --- a/core/build-tunnelbox.sh +++ b/core/build/build-tunnelbox.sh @@ -30,7 +30,7 @@ if [ "$ARCH" = "riscv64" ]; then RUST_ARCH="riscv64gc" fi -cd .. +cd ../.. FEATURES="$(echo $ENVIRONMENT | sed 's/-/,/g')" RUSTFLAGS="" diff --git a/core/builder-alias.sh b/core/build/builder-alias.sh similarity index 100% rename from core/builder-alias.sh rename to core/build/builder-alias.sh diff --git a/core/startos/deny.toml b/core/deny.toml similarity index 100% rename from core/startos/deny.toml rename to core/deny.toml diff --git a/core/startos/migrations/20210629193146_Init.sql b/core/migrations/20210629193146_Init.sql similarity index 100% rename from core/startos/migrations/20210629193146_Init.sql rename to core/migrations/20210629193146_Init.sql diff --git a/core/startos/migrations/20230118185232_NetworkKeys.sql b/core/migrations/20230118185232_NetworkKeys.sql similarity index 100% rename from core/startos/migrations/20230118185232_NetworkKeys.sql rename to core/migrations/20230118185232_NetworkKeys.sql diff --git a/core/run-tests.sh b/core/run-tests.sh index 5e817e54b..f7e4de3df 100755 --- a/core/run-tests.sh +++ b/core/run-tests.sh @@ -2,7 +2,7 @@ cd "$(dirname "${BASH_SOURCE[0]}")" -source ./builder-alias.sh +source ./build/builder-alias.sh set -ea shopt -s expand_aliases diff --git a/core/startos/src/account.rs b/core/src/account.rs similarity index 100% rename from core/startos/src/account.rs rename to core/src/account.rs diff --git a/core/startos/src/action.rs b/core/src/action.rs similarity index 100% rename from core/startos/src/action.rs rename to core/src/action.rs diff --git a/core/startos/src/assets/adjectives.txt b/core/src/assets/adjectives.txt similarity index 100% rename from core/startos/src/assets/adjectives.txt rename to core/src/assets/adjectives.txt diff --git a/core/startos/src/assets/nouns.txt b/core/src/assets/nouns.txt similarity index 100% rename from core/startos/src/assets/nouns.txt rename to core/src/assets/nouns.txt diff --git a/core/startos/src/auth.rs b/core/src/auth.rs similarity index 100% rename from core/startos/src/auth.rs rename to core/src/auth.rs diff --git a/core/startos/src/backup/backup_bulk.rs b/core/src/backup/backup_bulk.rs similarity index 100% rename from core/startos/src/backup/backup_bulk.rs rename to core/src/backup/backup_bulk.rs diff --git a/core/startos/src/backup/mod.rs b/core/src/backup/mod.rs similarity index 100% rename from core/startos/src/backup/mod.rs rename to core/src/backup/mod.rs diff --git a/core/startos/src/backup/os.rs b/core/src/backup/os.rs similarity index 100% rename from core/startos/src/backup/os.rs rename to core/src/backup/os.rs diff --git a/core/startos/src/backup/restore.rs b/core/src/backup/restore.rs similarity index 100% rename from core/startos/src/backup/restore.rs rename to core/src/backup/restore.rs diff --git a/core/startos/src/backup/target/cifs.rs b/core/src/backup/target/cifs.rs similarity index 100% rename from core/startos/src/backup/target/cifs.rs rename to core/src/backup/target/cifs.rs diff --git a/core/startos/src/backup/target/mod.rs b/core/src/backup/target/mod.rs similarity index 100% rename from core/startos/src/backup/target/mod.rs rename to core/src/backup/target/mod.rs diff --git a/core/startos/src/bins/container_cli.rs b/core/src/bins/container_cli.rs similarity index 100% rename from core/startos/src/bins/container_cli.rs rename to core/src/bins/container_cli.rs diff --git a/core/startos/src/bins/deprecated.rs b/core/src/bins/deprecated.rs similarity index 100% rename from core/startos/src/bins/deprecated.rs rename to core/src/bins/deprecated.rs diff --git a/core/startos/src/bins/mod.rs b/core/src/bins/mod.rs similarity index 100% rename from core/startos/src/bins/mod.rs rename to core/src/bins/mod.rs diff --git a/core/startos/src/bins/registry.rs b/core/src/bins/registry.rs similarity index 100% rename from core/startos/src/bins/registry.rs rename to core/src/bins/registry.rs diff --git a/core/startos/src/bins/start_cli.rs b/core/src/bins/start_cli.rs similarity index 100% rename from core/startos/src/bins/start_cli.rs rename to core/src/bins/start_cli.rs diff --git a/core/startos/src/bins/start_init.rs b/core/src/bins/start_init.rs similarity index 100% rename from core/startos/src/bins/start_init.rs rename to core/src/bins/start_init.rs diff --git a/core/startos/src/bins/startd.rs b/core/src/bins/startd.rs similarity index 100% rename from core/startos/src/bins/startd.rs rename to core/src/bins/startd.rs diff --git a/core/startos/src/bins/tunnel.rs b/core/src/bins/tunnel.rs similarity index 100% rename from core/startos/src/bins/tunnel.rs rename to core/src/bins/tunnel.rs diff --git a/core/startos/src/config/hook.rs b/core/src/config/hook.rs similarity index 100% rename from core/startos/src/config/hook.rs rename to core/src/config/hook.rs diff --git a/core/startos/src/context/cli.rs b/core/src/context/cli.rs similarity index 100% rename from core/startos/src/context/cli.rs rename to core/src/context/cli.rs diff --git a/core/startos/src/context/config.rs b/core/src/context/config.rs similarity index 100% rename from core/startos/src/context/config.rs rename to core/src/context/config.rs diff --git a/core/startos/src/context/diagnostic.rs b/core/src/context/diagnostic.rs similarity index 100% rename from core/startos/src/context/diagnostic.rs rename to core/src/context/diagnostic.rs diff --git a/core/startos/src/context/init.rs b/core/src/context/init.rs similarity index 100% rename from core/startos/src/context/init.rs rename to core/src/context/init.rs diff --git a/core/startos/src/context/install.rs b/core/src/context/install.rs similarity index 100% rename from core/startos/src/context/install.rs rename to core/src/context/install.rs diff --git a/core/startos/src/context/mod.rs b/core/src/context/mod.rs similarity index 100% rename from core/startos/src/context/mod.rs rename to core/src/context/mod.rs diff --git a/core/startos/src/context/rpc.rs b/core/src/context/rpc.rs similarity index 100% rename from core/startos/src/context/rpc.rs rename to core/src/context/rpc.rs diff --git a/core/startos/src/context/sdk.rs b/core/src/context/sdk.rs similarity index 100% rename from core/startos/src/context/sdk.rs rename to core/src/context/sdk.rs diff --git a/core/startos/src/context/setup.rs b/core/src/context/setup.rs similarity index 100% rename from core/startos/src/context/setup.rs rename to core/src/context/setup.rs diff --git a/core/startos/src/control.rs b/core/src/control.rs similarity index 100% rename from core/startos/src/control.rs rename to core/src/control.rs diff --git a/core/startos/src/db/mod.rs b/core/src/db/mod.rs similarity index 100% rename from core/startos/src/db/mod.rs rename to core/src/db/mod.rs diff --git a/core/startos/src/db/model/mod.rs b/core/src/db/model/mod.rs similarity index 100% rename from core/startos/src/db/model/mod.rs rename to core/src/db/model/mod.rs diff --git a/core/startos/src/db/model/package.rs b/core/src/db/model/package.rs similarity index 100% rename from core/startos/src/db/model/package.rs rename to core/src/db/model/package.rs diff --git a/core/startos/src/db/model/private.rs b/core/src/db/model/private.rs similarity index 100% rename from core/startos/src/db/model/private.rs rename to core/src/db/model/private.rs diff --git a/core/startos/src/db/model/public.rs b/core/src/db/model/public.rs similarity index 100% rename from core/startos/src/db/model/public.rs rename to core/src/db/model/public.rs diff --git a/core/startos/src/db/prelude.rs b/core/src/db/prelude.rs similarity index 100% rename from core/startos/src/db/prelude.rs rename to core/src/db/prelude.rs diff --git a/core/startos/src/dependencies.rs b/core/src/dependencies.rs similarity index 100% rename from core/startos/src/dependencies.rs rename to core/src/dependencies.rs diff --git a/core/startos/src/developer/mod.rs b/core/src/developer/mod.rs similarity index 100% rename from core/startos/src/developer/mod.rs rename to core/src/developer/mod.rs diff --git a/core/startos/src/diagnostic.rs b/core/src/diagnostic.rs similarity index 100% rename from core/startos/src/diagnostic.rs rename to core/src/diagnostic.rs diff --git a/core/startos/src/disk/fsck/btrfs.rs b/core/src/disk/fsck/btrfs.rs similarity index 100% rename from core/startos/src/disk/fsck/btrfs.rs rename to core/src/disk/fsck/btrfs.rs diff --git a/core/startos/src/disk/fsck/ext4.rs b/core/src/disk/fsck/ext4.rs similarity index 100% rename from core/startos/src/disk/fsck/ext4.rs rename to core/src/disk/fsck/ext4.rs diff --git a/core/startos/src/disk/fsck/mod.rs b/core/src/disk/fsck/mod.rs similarity index 100% rename from core/startos/src/disk/fsck/mod.rs rename to core/src/disk/fsck/mod.rs diff --git a/core/startos/src/disk/main.rs b/core/src/disk/main.rs similarity index 100% rename from core/startos/src/disk/main.rs rename to core/src/disk/main.rs diff --git a/core/startos/src/disk/mod.rs b/core/src/disk/mod.rs similarity index 100% rename from core/startos/src/disk/mod.rs rename to core/src/disk/mod.rs diff --git a/core/startos/src/disk/mount/backup.rs b/core/src/disk/mount/backup.rs similarity index 100% rename from core/startos/src/disk/mount/backup.rs rename to core/src/disk/mount/backup.rs diff --git a/core/startos/src/disk/mount/filesystem/backupfs.rs b/core/src/disk/mount/filesystem/backupfs.rs similarity index 100% rename from core/startos/src/disk/mount/filesystem/backupfs.rs rename to core/src/disk/mount/filesystem/backupfs.rs diff --git a/core/startos/src/disk/mount/filesystem/bind.rs b/core/src/disk/mount/filesystem/bind.rs similarity index 100% rename from core/startos/src/disk/mount/filesystem/bind.rs rename to core/src/disk/mount/filesystem/bind.rs diff --git a/core/startos/src/disk/mount/filesystem/block_dev.rs b/core/src/disk/mount/filesystem/block_dev.rs similarity index 100% rename from core/startos/src/disk/mount/filesystem/block_dev.rs rename to core/src/disk/mount/filesystem/block_dev.rs diff --git a/core/startos/src/disk/mount/filesystem/cifs.rs b/core/src/disk/mount/filesystem/cifs.rs similarity index 100% rename from core/startos/src/disk/mount/filesystem/cifs.rs rename to core/src/disk/mount/filesystem/cifs.rs diff --git a/core/startos/src/disk/mount/filesystem/ecryptfs.rs b/core/src/disk/mount/filesystem/ecryptfs.rs similarity index 100% rename from core/startos/src/disk/mount/filesystem/ecryptfs.rs rename to core/src/disk/mount/filesystem/ecryptfs.rs diff --git a/core/startos/src/disk/mount/filesystem/efivarfs.rs b/core/src/disk/mount/filesystem/efivarfs.rs similarity index 100% rename from core/startos/src/disk/mount/filesystem/efivarfs.rs rename to core/src/disk/mount/filesystem/efivarfs.rs diff --git a/core/startos/src/disk/mount/filesystem/httpdirfs.rs b/core/src/disk/mount/filesystem/httpdirfs.rs similarity index 100% rename from core/startos/src/disk/mount/filesystem/httpdirfs.rs rename to core/src/disk/mount/filesystem/httpdirfs.rs diff --git a/core/startos/src/disk/mount/filesystem/idmapped.rs b/core/src/disk/mount/filesystem/idmapped.rs similarity index 100% rename from core/startos/src/disk/mount/filesystem/idmapped.rs rename to core/src/disk/mount/filesystem/idmapped.rs diff --git a/core/startos/src/disk/mount/filesystem/label.rs b/core/src/disk/mount/filesystem/label.rs similarity index 100% rename from core/startos/src/disk/mount/filesystem/label.rs rename to core/src/disk/mount/filesystem/label.rs diff --git a/core/startos/src/disk/mount/filesystem/loop_dev.rs b/core/src/disk/mount/filesystem/loop_dev.rs similarity index 100% rename from core/startos/src/disk/mount/filesystem/loop_dev.rs rename to core/src/disk/mount/filesystem/loop_dev.rs diff --git a/core/startos/src/disk/mount/filesystem/mod.rs b/core/src/disk/mount/filesystem/mod.rs similarity index 100% rename from core/startos/src/disk/mount/filesystem/mod.rs rename to core/src/disk/mount/filesystem/mod.rs diff --git a/core/startos/src/disk/mount/filesystem/overlayfs.rs b/core/src/disk/mount/filesystem/overlayfs.rs similarity index 100% rename from core/startos/src/disk/mount/filesystem/overlayfs.rs rename to core/src/disk/mount/filesystem/overlayfs.rs diff --git a/core/startos/src/disk/mount/guard.rs b/core/src/disk/mount/guard.rs similarity index 100% rename from core/startos/src/disk/mount/guard.rs rename to core/src/disk/mount/guard.rs diff --git a/core/startos/src/disk/mount/mod.rs b/core/src/disk/mount/mod.rs similarity index 100% rename from core/startos/src/disk/mount/mod.rs rename to core/src/disk/mount/mod.rs diff --git a/core/startos/src/disk/mount/util.rs b/core/src/disk/mount/util.rs similarity index 100% rename from core/startos/src/disk/mount/util.rs rename to core/src/disk/mount/util.rs diff --git a/core/startos/src/disk/util.rs b/core/src/disk/util.rs similarity index 100% rename from core/startos/src/disk/util.rs rename to core/src/disk/util.rs diff --git a/core/startos/src/error.rs b/core/src/error.rs similarity index 100% rename from core/startos/src/error.rs rename to core/src/error.rs diff --git a/core/startos/src/firmware.rs b/core/src/firmware.rs similarity index 100% rename from core/startos/src/firmware.rs rename to core/src/firmware.rs diff --git a/core/startos/src/hostname.rs b/core/src/hostname.rs similarity index 100% rename from core/startos/src/hostname.rs rename to core/src/hostname.rs diff --git a/core/startos/src/id/action.rs b/core/src/id/action.rs similarity index 100% rename from core/startos/src/id/action.rs rename to core/src/id/action.rs diff --git a/core/startos/src/id/gateway.rs b/core/src/id/gateway.rs similarity index 100% rename from core/startos/src/id/gateway.rs rename to core/src/id/gateway.rs diff --git a/core/startos/src/id/health_check.rs b/core/src/id/health_check.rs similarity index 100% rename from core/startos/src/id/health_check.rs rename to core/src/id/health_check.rs diff --git a/core/startos/src/id/host.rs b/core/src/id/host.rs similarity index 100% rename from core/startos/src/id/host.rs rename to core/src/id/host.rs diff --git a/core/startos/src/id/image.rs b/core/src/id/image.rs similarity index 100% rename from core/startos/src/id/image.rs rename to core/src/id/image.rs diff --git a/core/startos/src/id/invalid_id.rs b/core/src/id/invalid_id.rs similarity index 100% rename from core/startos/src/id/invalid_id.rs rename to core/src/id/invalid_id.rs diff --git a/core/startos/src/id/mod.rs b/core/src/id/mod.rs similarity index 100% rename from core/startos/src/id/mod.rs rename to core/src/id/mod.rs diff --git a/core/startos/src/id/package.rs b/core/src/id/package.rs similarity index 100% rename from core/startos/src/id/package.rs rename to core/src/id/package.rs diff --git a/core/startos/src/id/replay.rs b/core/src/id/replay.rs similarity index 100% rename from core/startos/src/id/replay.rs rename to core/src/id/replay.rs diff --git a/core/startos/src/id/service_interface.rs b/core/src/id/service_interface.rs similarity index 100% rename from core/startos/src/id/service_interface.rs rename to core/src/id/service_interface.rs diff --git a/core/startos/src/id/volume.rs b/core/src/id/volume.rs similarity index 100% rename from core/startos/src/id/volume.rs rename to core/src/id/volume.rs diff --git a/core/startos/src/init.rs b/core/src/init.rs similarity index 100% rename from core/startos/src/init.rs rename to core/src/init.rs diff --git a/core/startos/src/install/mod.rs b/core/src/install/mod.rs similarity index 100% rename from core/startos/src/install/mod.rs rename to core/src/install/mod.rs diff --git a/core/startos/src/install/package-icon.png b/core/src/install/package-icon.png similarity index 100% rename from core/startos/src/install/package-icon.png rename to core/src/install/package-icon.png diff --git a/core/startos/src/lib.rs b/core/src/lib.rs similarity index 99% rename from core/startos/src/lib.rs rename to core/src/lib.rs index e15198c0e..a371fb49f 100644 --- a/core/startos/src/lib.rs +++ b/core/src/lib.rs @@ -3,8 +3,6 @@ use const_format::formatcp; pub const DATA_DIR: &str = "/media/startos/data"; pub const MAIN_DATA: &str = formatcp!("{DATA_DIR}/main"); pub const PACKAGE_DATA: &str = formatcp!("{DATA_DIR}/package-data"); -pub const DEFAULT_REGISTRY: &str = "https://registry.start9.com"; -// pub const COMMUNITY_MARKETPLACE: &str = "https://community-registry.start9.com"; pub const HOST_IP: [u8; 4] = [10, 0, 3, 1]; pub use std::env::consts::ARCH; lazy_static::lazy_static! { diff --git a/core/startos/src/logs.rs b/core/src/logs.rs similarity index 100% rename from core/startos/src/logs.rs rename to core/src/logs.rs diff --git a/core/startos/src/lxc/config.template b/core/src/lxc/config.template similarity index 100% rename from core/startos/src/lxc/config.template rename to core/src/lxc/config.template diff --git a/core/startos/src/lxc/mod.rs b/core/src/lxc/mod.rs similarity index 100% rename from core/startos/src/lxc/mod.rs rename to core/src/lxc/mod.rs diff --git a/core/startos/src/main/registrybox.rs b/core/src/main/registrybox.rs similarity index 100% rename from core/startos/src/main/registrybox.rs rename to core/src/main/registrybox.rs diff --git a/core/startos/src/main/start-cli.rs b/core/src/main/start-cli.rs similarity index 100% rename from core/startos/src/main/start-cli.rs rename to core/src/main/start-cli.rs diff --git a/core/startos/src/main/start-container.rs b/core/src/main/start-container.rs similarity index 100% rename from core/startos/src/main/start-container.rs rename to core/src/main/start-container.rs diff --git a/core/startos/src/main/startbox.rs b/core/src/main/startbox.rs similarity index 56% rename from core/startos/src/main/startbox.rs rename to core/src/main/startbox.rs index b042b4a05..d322aaeb7 100644 --- a/core/startos/src/main/startbox.rs +++ b/core/src/main/startbox.rs @@ -3,23 +3,31 @@ use startos::bins::MultiExecutable; fn main() { startos::net::static_server::UI_CELL .set(include_dir::include_dir!( - "$CARGO_MANIFEST_DIR/../../web/dist/static/ui" + "$CARGO_MANIFEST_DIR/../web/dist/static/ui" )) .ok(); startos::net::static_server::SETUP_WIZARD_CELL .set(include_dir::include_dir!( - "$CARGO_MANIFEST_DIR/../../web/dist/static/setup-wizard" + "$CARGO_MANIFEST_DIR/../web/dist/static/setup-wizard" )) .ok(); startos::net::static_server::INSTALL_WIZARD_CELL .set(include_dir::include_dir!( - "$CARGO_MANIFEST_DIR/../../web/dist/static/install-wizard" + "$CARGO_MANIFEST_DIR/../web/dist/static/install-wizard" )) .ok(); + #[cfg(not(feature = "beta"))] startos::db::model::public::DB_UI_SEED_CELL .set(include_str!(concat!( env!("CARGO_MANIFEST_DIR"), - "/../../web/patchdb-ui-seed.json" + "/../web/patchdb-ui-seed.json" + ))) + .ok(); + #[cfg(feature = "beta")] + startos::db::model::public::DB_UI_SEED_CELL + .set(include_str!(concat!( + env!("CARGO_MANIFEST_DIR"), + "/../web/patchdb-ui-seed.beta.json" ))) .ok(); MultiExecutable::default() diff --git a/core/startos/src/main/tunnelbox.rs b/core/src/main/tunnelbox.rs similarity index 79% rename from core/startos/src/main/tunnelbox.rs rename to core/src/main/tunnelbox.rs index 0952065a8..75bf3d69e 100644 --- a/core/startos/src/main/tunnelbox.rs +++ b/core/src/main/tunnelbox.rs @@ -3,7 +3,7 @@ use startos::bins::MultiExecutable; fn main() { startos::tunnel::context::TUNNEL_UI_CELL .set(include_dir::include_dir!( - "$CARGO_MANIFEST_DIR/../../web/dist/static/start-tunnel" + "$CARGO_MANIFEST_DIR/../web/dist/static/start-tunnel" )) .ok(); MultiExecutable::default() diff --git a/core/startos/src/middleware/auth/local.rs b/core/src/middleware/auth/local.rs similarity index 100% rename from core/startos/src/middleware/auth/local.rs rename to core/src/middleware/auth/local.rs diff --git a/core/startos/src/middleware/auth/mod.rs b/core/src/middleware/auth/mod.rs similarity index 100% rename from core/startos/src/middleware/auth/mod.rs rename to core/src/middleware/auth/mod.rs diff --git a/core/startos/src/middleware/auth/session.rs b/core/src/middleware/auth/session.rs similarity index 100% rename from core/startos/src/middleware/auth/session.rs rename to core/src/middleware/auth/session.rs diff --git a/core/startos/src/middleware/auth/signature.rs b/core/src/middleware/auth/signature.rs similarity index 100% rename from core/startos/src/middleware/auth/signature.rs rename to core/src/middleware/auth/signature.rs diff --git a/core/startos/src/middleware/connect_info.rs b/core/src/middleware/connect_info.rs similarity index 100% rename from core/startos/src/middleware/connect_info.rs rename to core/src/middleware/connect_info.rs diff --git a/core/startos/src/middleware/cors.rs b/core/src/middleware/cors.rs similarity index 100% rename from core/startos/src/middleware/cors.rs rename to core/src/middleware/cors.rs diff --git a/core/startos/src/middleware/db.rs b/core/src/middleware/db.rs similarity index 100% rename from core/startos/src/middleware/db.rs rename to core/src/middleware/db.rs diff --git a/core/startos/src/middleware/mod.rs b/core/src/middleware/mod.rs similarity index 100% rename from core/startos/src/middleware/mod.rs rename to core/src/middleware/mod.rs diff --git a/core/startos/src/migrate.load b/core/src/migrate.load similarity index 100% rename from core/startos/src/migrate.load rename to core/src/migrate.load diff --git a/core/startos/src/net/acme.rs b/core/src/net/acme.rs similarity index 100% rename from core/startos/src/net/acme.rs rename to core/src/net/acme.rs diff --git a/core/startos/src/net/cert-local.csr.conf.template b/core/src/net/cert-local.csr.conf.template similarity index 100% rename from core/startos/src/net/cert-local.csr.conf.template rename to core/src/net/cert-local.csr.conf.template diff --git a/core/startos/src/net/dns.rs b/core/src/net/dns.rs similarity index 100% rename from core/startos/src/net/dns.rs rename to core/src/net/dns.rs diff --git a/core/startos/src/net/forward.rs b/core/src/net/forward.rs similarity index 100% rename from core/startos/src/net/forward.rs rename to core/src/net/forward.rs diff --git a/core/startos/src/net/gateway.rs b/core/src/net/gateway.rs similarity index 100% rename from core/startos/src/net/gateway.rs rename to core/src/net/gateway.rs diff --git a/core/startos/src/net/host/address.rs b/core/src/net/host/address.rs similarity index 100% rename from core/startos/src/net/host/address.rs rename to core/src/net/host/address.rs diff --git a/core/startos/src/net/host/binding.rs b/core/src/net/host/binding.rs similarity index 100% rename from core/startos/src/net/host/binding.rs rename to core/src/net/host/binding.rs diff --git a/core/startos/src/net/host/mod.rs b/core/src/net/host/mod.rs similarity index 100% rename from core/startos/src/net/host/mod.rs rename to core/src/net/host/mod.rs diff --git a/core/startos/src/net/http.rs b/core/src/net/http.rs similarity index 100% rename from core/startos/src/net/http.rs rename to core/src/net/http.rs diff --git a/core/startos/src/net/keys.rs b/core/src/net/keys.rs similarity index 100% rename from core/startos/src/net/keys.rs rename to core/src/net/keys.rs diff --git a/core/startos/src/net/mdns.rs b/core/src/net/mdns.rs similarity index 100% rename from core/startos/src/net/mdns.rs rename to core/src/net/mdns.rs diff --git a/core/startos/src/net/mod.rs b/core/src/net/mod.rs similarity index 100% rename from core/startos/src/net/mod.rs rename to core/src/net/mod.rs diff --git a/core/startos/src/net/net_controller.rs b/core/src/net/net_controller.rs similarity index 100% rename from core/startos/src/net/net_controller.rs rename to core/src/net/net_controller.rs diff --git a/core/startos/src/net/refresher.html b/core/src/net/refresher.html similarity index 100% rename from core/startos/src/net/refresher.html rename to core/src/net/refresher.html diff --git a/core/startos/src/net/service_interface.rs b/core/src/net/service_interface.rs similarity index 100% rename from core/startos/src/net/service_interface.rs rename to core/src/net/service_interface.rs diff --git a/core/startos/src/net/socks.rs b/core/src/net/socks.rs similarity index 100% rename from core/startos/src/net/socks.rs rename to core/src/net/socks.rs diff --git a/core/startos/src/net/ssl.rs b/core/src/net/ssl.rs similarity index 100% rename from core/startos/src/net/ssl.rs rename to core/src/net/ssl.rs diff --git a/core/startos/src/net/static_server.rs b/core/src/net/static_server.rs similarity index 100% rename from core/startos/src/net/static_server.rs rename to core/src/net/static_server.rs diff --git a/core/startos/src/net/tls.rs b/core/src/net/tls.rs similarity index 100% rename from core/startos/src/net/tls.rs rename to core/src/net/tls.rs diff --git a/core/startos/src/net/tor/arti.rs b/core/src/net/tor/arti.rs similarity index 100% rename from core/startos/src/net/tor/arti.rs rename to core/src/net/tor/arti.rs diff --git a/core/startos/src/net/tor/ctor.rs b/core/src/net/tor/ctor.rs similarity index 100% rename from core/startos/src/net/tor/ctor.rs rename to core/src/net/tor/ctor.rs diff --git a/core/startos/src/net/tor/mod.rs b/core/src/net/tor/mod.rs similarity index 100% rename from core/startos/src/net/tor/mod.rs rename to core/src/net/tor/mod.rs diff --git a/core/startos/src/net/tunnel.rs b/core/src/net/tunnel.rs similarity index 100% rename from core/startos/src/net/tunnel.rs rename to core/src/net/tunnel.rs diff --git a/core/startos/src/net/utils.rs b/core/src/net/utils.rs similarity index 100% rename from core/startos/src/net/utils.rs rename to core/src/net/utils.rs diff --git a/core/startos/src/net/vhost.rs b/core/src/net/vhost.rs similarity index 100% rename from core/startos/src/net/vhost.rs rename to core/src/net/vhost.rs diff --git a/core/startos/src/net/web_server.rs b/core/src/net/web_server.rs similarity index 100% rename from core/startos/src/net/web_server.rs rename to core/src/net/web_server.rs diff --git a/core/startos/src/net/wifi.rs b/core/src/net/wifi.rs similarity index 100% rename from core/startos/src/net/wifi.rs rename to core/src/net/wifi.rs diff --git a/core/startos/src/net/wpa_supplicant.conf.base b/core/src/net/wpa_supplicant.conf.base similarity index 100% rename from core/startos/src/net/wpa_supplicant.conf.base rename to core/src/net/wpa_supplicant.conf.base diff --git a/core/startos/src/notifications.rs b/core/src/notifications.rs similarity index 100% rename from core/startos/src/notifications.rs rename to core/src/notifications.rs diff --git a/core/startos/src/os_install/fstab.template b/core/src/os_install/fstab.template similarity index 100% rename from core/startos/src/os_install/fstab.template rename to core/src/os_install/fstab.template diff --git a/core/startos/src/os_install/gpt.rs b/core/src/os_install/gpt.rs similarity index 100% rename from core/startos/src/os_install/gpt.rs rename to core/src/os_install/gpt.rs diff --git a/core/startos/src/os_install/mbr.rs b/core/src/os_install/mbr.rs similarity index 100% rename from core/startos/src/os_install/mbr.rs rename to core/src/os_install/mbr.rs diff --git a/core/startos/src/os_install/mod.rs b/core/src/os_install/mod.rs similarity index 100% rename from core/startos/src/os_install/mod.rs rename to core/src/os_install/mod.rs diff --git a/core/startos/src/prelude.rs b/core/src/prelude.rs similarity index 100% rename from core/startos/src/prelude.rs rename to core/src/prelude.rs diff --git a/core/startos/src/progress.rs b/core/src/progress.rs similarity index 100% rename from core/startos/src/progress.rs rename to core/src/progress.rs diff --git a/core/startos/src/registry/admin.rs b/core/src/registry/admin.rs similarity index 100% rename from core/startos/src/registry/admin.rs rename to core/src/registry/admin.rs diff --git a/core/startos/src/registry/asset.rs b/core/src/registry/asset.rs similarity index 100% rename from core/startos/src/registry/asset.rs rename to core/src/registry/asset.rs diff --git a/core/startos/src/registry/context.rs b/core/src/registry/context.rs similarity index 100% rename from core/startos/src/registry/context.rs rename to core/src/registry/context.rs diff --git a/core/startos/src/registry/db.rs b/core/src/registry/db.rs similarity index 100% rename from core/startos/src/registry/db.rs rename to core/src/registry/db.rs diff --git a/core/startos/src/registry/device_info.rs b/core/src/registry/device_info.rs similarity index 100% rename from core/startos/src/registry/device_info.rs rename to core/src/registry/device_info.rs diff --git a/core/startos/src/registry/info.rs b/core/src/registry/info.rs similarity index 100% rename from core/startos/src/registry/info.rs rename to core/src/registry/info.rs diff --git a/core/startos/src/registry/metrics-db/registry-sqlx-data.sh b/core/src/registry/metrics-db/registry-sqlx-data.sh similarity index 100% rename from core/startos/src/registry/metrics-db/registry-sqlx-data.sh rename to core/src/registry/metrics-db/registry-sqlx-data.sh diff --git a/core/startos/src/registry/metrics-db/registry_schema.sql b/core/src/registry/metrics-db/registry_schema.sql similarity index 100% rename from core/startos/src/registry/metrics-db/registry_schema.sql rename to core/src/registry/metrics-db/registry_schema.sql diff --git a/core/startos/src/registry/migrations/m_00_package_signer_scope.rs b/core/src/registry/migrations/m_00_package_signer_scope.rs similarity index 100% rename from core/startos/src/registry/migrations/m_00_package_signer_scope.rs rename to core/src/registry/migrations/m_00_package_signer_scope.rs diff --git a/core/startos/src/registry/migrations/mod.rs b/core/src/registry/migrations/mod.rs similarity index 100% rename from core/startos/src/registry/migrations/mod.rs rename to core/src/registry/migrations/mod.rs diff --git a/core/startos/src/registry/mod.rs b/core/src/registry/mod.rs similarity index 100% rename from core/startos/src/registry/mod.rs rename to core/src/registry/mod.rs diff --git a/core/startos/src/registry/os/asset/add.rs b/core/src/registry/os/asset/add.rs similarity index 100% rename from core/startos/src/registry/os/asset/add.rs rename to core/src/registry/os/asset/add.rs diff --git a/core/startos/src/registry/os/asset/get.rs b/core/src/registry/os/asset/get.rs similarity index 100% rename from core/startos/src/registry/os/asset/get.rs rename to core/src/registry/os/asset/get.rs diff --git a/core/startos/src/registry/os/asset/mod.rs b/core/src/registry/os/asset/mod.rs similarity index 100% rename from core/startos/src/registry/os/asset/mod.rs rename to core/src/registry/os/asset/mod.rs diff --git a/core/startos/src/registry/os/asset/sign.rs b/core/src/registry/os/asset/sign.rs similarity index 100% rename from core/startos/src/registry/os/asset/sign.rs rename to core/src/registry/os/asset/sign.rs diff --git a/core/startos/src/registry/os/index.rs b/core/src/registry/os/index.rs similarity index 100% rename from core/startos/src/registry/os/index.rs rename to core/src/registry/os/index.rs diff --git a/core/startos/src/registry/os/mod.rs b/core/src/registry/os/mod.rs similarity index 100% rename from core/startos/src/registry/os/mod.rs rename to core/src/registry/os/mod.rs diff --git a/core/startos/src/registry/os/version/mod.rs b/core/src/registry/os/version/mod.rs similarity index 100% rename from core/startos/src/registry/os/version/mod.rs rename to core/src/registry/os/version/mod.rs diff --git a/core/startos/src/registry/os/version/signer.rs b/core/src/registry/os/version/signer.rs similarity index 100% rename from core/startos/src/registry/os/version/signer.rs rename to core/src/registry/os/version/signer.rs diff --git a/core/startos/src/registry/package/add.rs b/core/src/registry/package/add.rs similarity index 100% rename from core/startos/src/registry/package/add.rs rename to core/src/registry/package/add.rs diff --git a/core/startos/src/registry/package/category.rs b/core/src/registry/package/category.rs similarity index 100% rename from core/startos/src/registry/package/category.rs rename to core/src/registry/package/category.rs diff --git a/core/startos/src/registry/package/get.rs b/core/src/registry/package/get.rs similarity index 100% rename from core/startos/src/registry/package/get.rs rename to core/src/registry/package/get.rs diff --git a/core/startos/src/registry/package/index.rs b/core/src/registry/package/index.rs similarity index 100% rename from core/startos/src/registry/package/index.rs rename to core/src/registry/package/index.rs diff --git a/core/startos/src/registry/package/mod.rs b/core/src/registry/package/mod.rs similarity index 100% rename from core/startos/src/registry/package/mod.rs rename to core/src/registry/package/mod.rs diff --git a/core/startos/src/registry/package/signer.rs b/core/src/registry/package/signer.rs similarity index 100% rename from core/startos/src/registry/package/signer.rs rename to core/src/registry/package/signer.rs diff --git a/core/startos/src/registry/signer.rs b/core/src/registry/signer.rs similarity index 100% rename from core/startos/src/registry/signer.rs rename to core/src/registry/signer.rs diff --git a/core/startos/src/rpc_continuations.rs b/core/src/rpc_continuations.rs similarity index 100% rename from core/startos/src/rpc_continuations.rs rename to core/src/rpc_continuations.rs diff --git a/core/startos/src/s9pk/git_hash.rs b/core/src/s9pk/git_hash.rs similarity index 100% rename from core/startos/src/s9pk/git_hash.rs rename to core/src/s9pk/git_hash.rs diff --git a/core/startos/src/s9pk/merkle_archive/directory_contents.rs b/core/src/s9pk/merkle_archive/directory_contents.rs similarity index 100% rename from core/startos/src/s9pk/merkle_archive/directory_contents.rs rename to core/src/s9pk/merkle_archive/directory_contents.rs diff --git a/core/startos/src/s9pk/merkle_archive/expected.rs b/core/src/s9pk/merkle_archive/expected.rs similarity index 100% rename from core/startos/src/s9pk/merkle_archive/expected.rs rename to core/src/s9pk/merkle_archive/expected.rs diff --git a/core/startos/src/s9pk/merkle_archive/file_contents.rs b/core/src/s9pk/merkle_archive/file_contents.rs similarity index 100% rename from core/startos/src/s9pk/merkle_archive/file_contents.rs rename to core/src/s9pk/merkle_archive/file_contents.rs diff --git a/core/startos/src/s9pk/merkle_archive/hash.rs b/core/src/s9pk/merkle_archive/hash.rs similarity index 100% rename from core/startos/src/s9pk/merkle_archive/hash.rs rename to core/src/s9pk/merkle_archive/hash.rs diff --git a/core/startos/src/s9pk/merkle_archive/mod.rs b/core/src/s9pk/merkle_archive/mod.rs similarity index 100% rename from core/startos/src/s9pk/merkle_archive/mod.rs rename to core/src/s9pk/merkle_archive/mod.rs diff --git a/core/startos/src/s9pk/merkle_archive/sink.rs b/core/src/s9pk/merkle_archive/sink.rs similarity index 100% rename from core/startos/src/s9pk/merkle_archive/sink.rs rename to core/src/s9pk/merkle_archive/sink.rs diff --git a/core/startos/src/s9pk/merkle_archive/source/http.rs b/core/src/s9pk/merkle_archive/source/http.rs similarity index 100% rename from core/startos/src/s9pk/merkle_archive/source/http.rs rename to core/src/s9pk/merkle_archive/source/http.rs diff --git a/core/startos/src/s9pk/merkle_archive/source/mod.rs b/core/src/s9pk/merkle_archive/source/mod.rs similarity index 100% rename from core/startos/src/s9pk/merkle_archive/source/mod.rs rename to core/src/s9pk/merkle_archive/source/mod.rs diff --git a/core/startos/src/s9pk/merkle_archive/source/multi_cursor_file.rs b/core/src/s9pk/merkle_archive/source/multi_cursor_file.rs similarity index 100% rename from core/startos/src/s9pk/merkle_archive/source/multi_cursor_file.rs rename to core/src/s9pk/merkle_archive/source/multi_cursor_file.rs diff --git a/core/startos/src/s9pk/merkle_archive/test.rs b/core/src/s9pk/merkle_archive/test.rs similarity index 100% rename from core/startos/src/s9pk/merkle_archive/test.rs rename to core/src/s9pk/merkle_archive/test.rs diff --git a/core/startos/src/s9pk/merkle_archive/varint.rs b/core/src/s9pk/merkle_archive/varint.rs similarity index 100% rename from core/startos/src/s9pk/merkle_archive/varint.rs rename to core/src/s9pk/merkle_archive/varint.rs diff --git a/core/startos/src/s9pk/merkle_archive/write_queue.rs b/core/src/s9pk/merkle_archive/write_queue.rs similarity index 100% rename from core/startos/src/s9pk/merkle_archive/write_queue.rs rename to core/src/s9pk/merkle_archive/write_queue.rs diff --git a/core/startos/src/s9pk/mod.rs b/core/src/s9pk/mod.rs similarity index 100% rename from core/startos/src/s9pk/mod.rs rename to core/src/s9pk/mod.rs diff --git a/core/startos/src/s9pk/rpc.rs b/core/src/s9pk/rpc.rs similarity index 100% rename from core/startos/src/s9pk/rpc.rs rename to core/src/s9pk/rpc.rs diff --git a/core/startos/src/s9pk/v1/builder.rs b/core/src/s9pk/v1/builder.rs similarity index 100% rename from core/startos/src/s9pk/v1/builder.rs rename to core/src/s9pk/v1/builder.rs diff --git a/core/startos/src/s9pk/v1/docker.rs b/core/src/s9pk/v1/docker.rs similarity index 100% rename from core/startos/src/s9pk/v1/docker.rs rename to core/src/s9pk/v1/docker.rs diff --git a/core/startos/src/s9pk/v1/header.rs b/core/src/s9pk/v1/header.rs similarity index 100% rename from core/startos/src/s9pk/v1/header.rs rename to core/src/s9pk/v1/header.rs diff --git a/core/startos/src/s9pk/v1/manifest.rs b/core/src/s9pk/v1/manifest.rs similarity index 100% rename from core/startos/src/s9pk/v1/manifest.rs rename to core/src/s9pk/v1/manifest.rs diff --git a/core/startos/src/s9pk/v1/mod.rs b/core/src/s9pk/v1/mod.rs similarity index 100% rename from core/startos/src/s9pk/v1/mod.rs rename to core/src/s9pk/v1/mod.rs diff --git a/core/startos/src/s9pk/v1/reader.rs b/core/src/s9pk/v1/reader.rs similarity index 100% rename from core/startos/src/s9pk/v1/reader.rs rename to core/src/s9pk/v1/reader.rs diff --git a/core/startos/src/s9pk/v2/compat.rs b/core/src/s9pk/v2/compat.rs similarity index 100% rename from core/startos/src/s9pk/v2/compat.rs rename to core/src/s9pk/v2/compat.rs diff --git a/core/startos/src/s9pk/v2/manifest.rs b/core/src/s9pk/v2/manifest.rs similarity index 100% rename from core/startos/src/s9pk/v2/manifest.rs rename to core/src/s9pk/v2/manifest.rs diff --git a/core/startos/src/s9pk/v2/mod.rs b/core/src/s9pk/v2/mod.rs similarity index 100% rename from core/startos/src/s9pk/v2/mod.rs rename to core/src/s9pk/v2/mod.rs diff --git a/core/startos/src/s9pk/v2/pack.rs b/core/src/s9pk/v2/pack.rs similarity index 100% rename from core/startos/src/s9pk/v2/pack.rs rename to core/src/s9pk/v2/pack.rs diff --git a/core/startos/src/s9pk/v2/recipe.rs b/core/src/s9pk/v2/recipe.rs similarity index 100% rename from core/startos/src/s9pk/v2/recipe.rs rename to core/src/s9pk/v2/recipe.rs diff --git a/core/startos/src/s9pk/v2/specv2.md b/core/src/s9pk/v2/specv2.md similarity index 100% rename from core/startos/src/s9pk/v2/specv2.md rename to core/src/s9pk/v2/specv2.md diff --git a/core/startos/src/service/action.rs b/core/src/service/action.rs similarity index 100% rename from core/startos/src/service/action.rs rename to core/src/service/action.rs diff --git a/core/startos/src/service/cli.rs b/core/src/service/cli.rs similarity index 100% rename from core/startos/src/service/cli.rs rename to core/src/service/cli.rs diff --git a/core/startos/src/service/effects/action.rs b/core/src/service/effects/action.rs similarity index 100% rename from core/startos/src/service/effects/action.rs rename to core/src/service/effects/action.rs diff --git a/core/startos/src/service/effects/callbacks.rs b/core/src/service/effects/callbacks.rs similarity index 100% rename from core/startos/src/service/effects/callbacks.rs rename to core/src/service/effects/callbacks.rs diff --git a/core/startos/src/service/effects/context.rs b/core/src/service/effects/context.rs similarity index 100% rename from core/startos/src/service/effects/context.rs rename to core/src/service/effects/context.rs diff --git a/core/startos/src/service/effects/control.rs b/core/src/service/effects/control.rs similarity index 100% rename from core/startos/src/service/effects/control.rs rename to core/src/service/effects/control.rs diff --git a/core/startos/src/service/effects/dependency.rs b/core/src/service/effects/dependency.rs similarity index 100% rename from core/startos/src/service/effects/dependency.rs rename to core/src/service/effects/dependency.rs diff --git a/core/startos/src/service/effects/health.rs b/core/src/service/effects/health.rs similarity index 100% rename from core/startos/src/service/effects/health.rs rename to core/src/service/effects/health.rs diff --git a/core/startos/src/service/effects/mod.rs b/core/src/service/effects/mod.rs similarity index 100% rename from core/startos/src/service/effects/mod.rs rename to core/src/service/effects/mod.rs diff --git a/core/startos/src/service/effects/net/bind.rs b/core/src/service/effects/net/bind.rs similarity index 100% rename from core/startos/src/service/effects/net/bind.rs rename to core/src/service/effects/net/bind.rs diff --git a/core/startos/src/service/effects/net/host.rs b/core/src/service/effects/net/host.rs similarity index 100% rename from core/startos/src/service/effects/net/host.rs rename to core/src/service/effects/net/host.rs diff --git a/core/startos/src/service/effects/net/info.rs b/core/src/service/effects/net/info.rs similarity index 100% rename from core/startos/src/service/effects/net/info.rs rename to core/src/service/effects/net/info.rs diff --git a/core/startos/src/service/effects/net/interface.rs b/core/src/service/effects/net/interface.rs similarity index 100% rename from core/startos/src/service/effects/net/interface.rs rename to core/src/service/effects/net/interface.rs diff --git a/core/startos/src/service/effects/net/mod.rs b/core/src/service/effects/net/mod.rs similarity index 100% rename from core/startos/src/service/effects/net/mod.rs rename to core/src/service/effects/net/mod.rs diff --git a/core/startos/src/service/effects/net/ssl.rs b/core/src/service/effects/net/ssl.rs similarity index 100% rename from core/startos/src/service/effects/net/ssl.rs rename to core/src/service/effects/net/ssl.rs diff --git a/core/startos/src/service/effects/prelude.rs b/core/src/service/effects/prelude.rs similarity index 100% rename from core/startos/src/service/effects/prelude.rs rename to core/src/service/effects/prelude.rs diff --git a/core/startos/src/service/effects/subcontainer/mod.rs b/core/src/service/effects/subcontainer/mod.rs similarity index 100% rename from core/startos/src/service/effects/subcontainer/mod.rs rename to core/src/service/effects/subcontainer/mod.rs diff --git a/core/startos/src/service/effects/subcontainer/sync.rs b/core/src/service/effects/subcontainer/sync.rs similarity index 100% rename from core/startos/src/service/effects/subcontainer/sync.rs rename to core/src/service/effects/subcontainer/sync.rs diff --git a/core/startos/src/service/effects/subcontainer/sync_dummy.rs b/core/src/service/effects/subcontainer/sync_dummy.rs similarity index 100% rename from core/startos/src/service/effects/subcontainer/sync_dummy.rs rename to core/src/service/effects/subcontainer/sync_dummy.rs diff --git a/core/startos/src/service/effects/system.rs b/core/src/service/effects/system.rs similarity index 100% rename from core/startos/src/service/effects/system.rs rename to core/src/service/effects/system.rs diff --git a/core/startos/src/service/effects/version.rs b/core/src/service/effects/version.rs similarity index 100% rename from core/startos/src/service/effects/version.rs rename to core/src/service/effects/version.rs diff --git a/core/startos/src/service/mod.rs b/core/src/service/mod.rs similarity index 100% rename from core/startos/src/service/mod.rs rename to core/src/service/mod.rs diff --git a/core/startos/src/service/persistent_container.rs b/core/src/service/persistent_container.rs similarity index 100% rename from core/startos/src/service/persistent_container.rs rename to core/src/service/persistent_container.rs diff --git a/core/startos/src/service/procedure_name.rs b/core/src/service/procedure_name.rs similarity index 100% rename from core/startos/src/service/procedure_name.rs rename to core/src/service/procedure_name.rs diff --git a/core/startos/src/service/rpc.rs b/core/src/service/rpc.rs similarity index 100% rename from core/startos/src/service/rpc.rs rename to core/src/service/rpc.rs diff --git a/core/startos/src/service/service_actor.rs b/core/src/service/service_actor.rs similarity index 100% rename from core/startos/src/service/service_actor.rs rename to core/src/service/service_actor.rs diff --git a/core/startos/src/service/service_map.rs b/core/src/service/service_map.rs similarity index 100% rename from core/startos/src/service/service_map.rs rename to core/src/service/service_map.rs diff --git a/core/startos/src/service/start_stop.rs b/core/src/service/start_stop.rs similarity index 100% rename from core/startos/src/service/start_stop.rs rename to core/src/service/start_stop.rs diff --git a/core/startos/src/service/transition/backup.rs b/core/src/service/transition/backup.rs similarity index 100% rename from core/startos/src/service/transition/backup.rs rename to core/src/service/transition/backup.rs diff --git a/core/startos/src/service/transition/mod.rs b/core/src/service/transition/mod.rs similarity index 100% rename from core/startos/src/service/transition/mod.rs rename to core/src/service/transition/mod.rs diff --git a/core/startos/src/service/uninstall.rs b/core/src/service/uninstall.rs similarity index 100% rename from core/startos/src/service/uninstall.rs rename to core/src/service/uninstall.rs diff --git a/core/startos/src/setup.rs b/core/src/setup.rs similarity index 100% rename from core/startos/src/setup.rs rename to core/src/setup.rs diff --git a/core/startos/src/shutdown.rs b/core/src/shutdown.rs similarity index 100% rename from core/startos/src/shutdown.rs rename to core/src/shutdown.rs diff --git a/core/startos/src/sign/commitment/blake3.rs b/core/src/sign/commitment/blake3.rs similarity index 100% rename from core/startos/src/sign/commitment/blake3.rs rename to core/src/sign/commitment/blake3.rs diff --git a/core/startos/src/sign/commitment/merkle_archive.rs b/core/src/sign/commitment/merkle_archive.rs similarity index 100% rename from core/startos/src/sign/commitment/merkle_archive.rs rename to core/src/sign/commitment/merkle_archive.rs diff --git a/core/startos/src/sign/commitment/mod.rs b/core/src/sign/commitment/mod.rs similarity index 100% rename from core/startos/src/sign/commitment/mod.rs rename to core/src/sign/commitment/mod.rs diff --git a/core/startos/src/sign/commitment/request.rs b/core/src/sign/commitment/request.rs similarity index 100% rename from core/startos/src/sign/commitment/request.rs rename to core/src/sign/commitment/request.rs diff --git a/core/startos/src/sign/ed25519.rs b/core/src/sign/ed25519.rs similarity index 100% rename from core/startos/src/sign/ed25519.rs rename to core/src/sign/ed25519.rs diff --git a/core/startos/src/sign/mod.rs b/core/src/sign/mod.rs similarity index 100% rename from core/startos/src/sign/mod.rs rename to core/src/sign/mod.rs diff --git a/core/startos/src/sound.rs b/core/src/sound.rs similarity index 100% rename from core/startos/src/sound.rs rename to core/src/sound.rs diff --git a/core/startos/src/ssh.rs b/core/src/ssh.rs similarity index 100% rename from core/startos/src/ssh.rs rename to core/src/ssh.rs diff --git a/core/startos/src/status/health_check.rs b/core/src/status/health_check.rs similarity index 100% rename from core/startos/src/status/health_check.rs rename to core/src/status/health_check.rs diff --git a/core/startos/src/status/mod.rs b/core/src/status/mod.rs similarity index 100% rename from core/startos/src/status/mod.rs rename to core/src/status/mod.rs diff --git a/core/startos/src/system.rs b/core/src/system.rs similarity index 100% rename from core/startos/src/system.rs rename to core/src/system.rs diff --git a/core/startos/src/tunnel/api.rs b/core/src/tunnel/api.rs similarity index 100% rename from core/startos/src/tunnel/api.rs rename to core/src/tunnel/api.rs diff --git a/core/startos/src/tunnel/auth.rs b/core/src/tunnel/auth.rs similarity index 100% rename from core/startos/src/tunnel/auth.rs rename to core/src/tunnel/auth.rs diff --git a/core/startos/src/tunnel/client.conf.template b/core/src/tunnel/client.conf.template similarity index 100% rename from core/startos/src/tunnel/client.conf.template rename to core/src/tunnel/client.conf.template diff --git a/core/startos/src/tunnel/context.rs b/core/src/tunnel/context.rs similarity index 100% rename from core/startos/src/tunnel/context.rs rename to core/src/tunnel/context.rs diff --git a/core/startos/src/tunnel/db.rs b/core/src/tunnel/db.rs similarity index 100% rename from core/startos/src/tunnel/db.rs rename to core/src/tunnel/db.rs diff --git a/core/startos/src/tunnel/mod.rs b/core/src/tunnel/mod.rs similarity index 100% rename from core/startos/src/tunnel/mod.rs rename to core/src/tunnel/mod.rs diff --git a/core/startos/src/tunnel/server-peer.conf.template b/core/src/tunnel/server-peer.conf.template similarity index 100% rename from core/startos/src/tunnel/server-peer.conf.template rename to core/src/tunnel/server-peer.conf.template diff --git a/core/startos/src/tunnel/server.conf.template b/core/src/tunnel/server.conf.template similarity index 100% rename from core/startos/src/tunnel/server.conf.template rename to core/src/tunnel/server.conf.template diff --git a/core/startos/src/tunnel/web.rs b/core/src/tunnel/web.rs similarity index 100% rename from core/startos/src/tunnel/web.rs rename to core/src/tunnel/web.rs diff --git a/core/startos/src/tunnel/wg.rs b/core/src/tunnel/wg.rs similarity index 100% rename from core/startos/src/tunnel/wg.rs rename to core/src/tunnel/wg.rs diff --git a/core/startos/src/update/mod.rs b/core/src/update/mod.rs similarity index 100% rename from core/startos/src/update/mod.rs rename to core/src/update/mod.rs diff --git a/core/startos/src/upload.rs b/core/src/upload.rs similarity index 100% rename from core/startos/src/upload.rs rename to core/src/upload.rs diff --git a/core/startos/src/util/actor/background.rs b/core/src/util/actor/background.rs similarity index 100% rename from core/startos/src/util/actor/background.rs rename to core/src/util/actor/background.rs diff --git a/core/startos/src/util/actor/concurrent.rs b/core/src/util/actor/concurrent.rs similarity index 100% rename from core/startos/src/util/actor/concurrent.rs rename to core/src/util/actor/concurrent.rs diff --git a/core/startos/src/util/actor/mod.rs b/core/src/util/actor/mod.rs similarity index 100% rename from core/startos/src/util/actor/mod.rs rename to core/src/util/actor/mod.rs diff --git a/core/startos/src/util/actor/simple.rs b/core/src/util/actor/simple.rs similarity index 100% rename from core/startos/src/util/actor/simple.rs rename to core/src/util/actor/simple.rs diff --git a/core/startos/src/util/clap.rs b/core/src/util/clap.rs similarity index 100% rename from core/startos/src/util/clap.rs rename to core/src/util/clap.rs diff --git a/core/startos/src/util/collections/eq_map.rs b/core/src/util/collections/eq_map.rs similarity index 100% rename from core/startos/src/util/collections/eq_map.rs rename to core/src/util/collections/eq_map.rs diff --git a/core/startos/src/util/collections/eq_set.rs b/core/src/util/collections/eq_set.rs similarity index 100% rename from core/startos/src/util/collections/eq_set.rs rename to core/src/util/collections/eq_set.rs diff --git a/core/startos/src/util/collections/mod.rs b/core/src/util/collections/mod.rs similarity index 100% rename from core/startos/src/util/collections/mod.rs rename to core/src/util/collections/mod.rs diff --git a/core/startos/src/util/cpupower.rs b/core/src/util/cpupower.rs similarity index 100% rename from core/startos/src/util/cpupower.rs rename to core/src/util/cpupower.rs diff --git a/core/startos/src/util/crypto.rs b/core/src/util/crypto.rs similarity index 100% rename from core/startos/src/util/crypto.rs rename to core/src/util/crypto.rs diff --git a/core/startos/src/util/data_url.rs b/core/src/util/data_url.rs similarity index 100% rename from core/startos/src/util/data_url.rs rename to core/src/util/data_url.rs diff --git a/core/startos/src/util/future.rs b/core/src/util/future.rs similarity index 100% rename from core/startos/src/util/future.rs rename to core/src/util/future.rs diff --git a/core/startos/src/util/http_reader.rs b/core/src/util/http_reader.rs similarity index 100% rename from core/startos/src/util/http_reader.rs rename to core/src/util/http_reader.rs diff --git a/core/startos/src/util/io.rs b/core/src/util/io.rs similarity index 100% rename from core/startos/src/util/io.rs rename to core/src/util/io.rs diff --git a/core/startos/src/util/iter.rs b/core/src/util/iter.rs similarity index 100% rename from core/startos/src/util/iter.rs rename to core/src/util/iter.rs diff --git a/core/startos/src/util/logger.rs b/core/src/util/logger.rs similarity index 100% rename from core/startos/src/util/logger.rs rename to core/src/util/logger.rs diff --git a/core/startos/src/util/lshw.rs b/core/src/util/lshw.rs similarity index 100% rename from core/startos/src/util/lshw.rs rename to core/src/util/lshw.rs diff --git a/core/startos/src/util/mime.rs b/core/src/util/mime.rs similarity index 100% rename from core/startos/src/util/mime.rs rename to core/src/util/mime.rs diff --git a/core/startos/src/util/mod.rs b/core/src/util/mod.rs similarity index 100% rename from core/startos/src/util/mod.rs rename to core/src/util/mod.rs diff --git a/core/startos/src/util/net.rs b/core/src/util/net.rs similarity index 100% rename from core/startos/src/util/net.rs rename to core/src/util/net.rs diff --git a/core/startos/src/util/rpc.rs b/core/src/util/rpc.rs similarity index 100% rename from core/startos/src/util/rpc.rs rename to core/src/util/rpc.rs diff --git a/core/startos/src/util/rpc_client.rs b/core/src/util/rpc_client.rs similarity index 100% rename from core/startos/src/util/rpc_client.rs rename to core/src/util/rpc_client.rs diff --git a/core/startos/src/util/rsync.rs b/core/src/util/rsync.rs similarity index 100% rename from core/startos/src/util/rsync.rs rename to core/src/util/rsync.rs diff --git a/core/startos/src/util/serde.rs b/core/src/util/serde.rs similarity index 100% rename from core/startos/src/util/serde.rs rename to core/src/util/serde.rs diff --git a/core/startos/src/util/squashfs.rs b/core/src/util/squashfs.rs similarity index 100% rename from core/startos/src/util/squashfs.rs rename to core/src/util/squashfs.rs diff --git a/core/startos/src/util/sync.rs b/core/src/util/sync.rs similarity index 100% rename from core/startos/src/util/sync.rs rename to core/src/util/sync.rs diff --git a/core/startos/src/util/tui.rs b/core/src/util/tui.rs similarity index 100% rename from core/startos/src/util/tui.rs rename to core/src/util/tui.rs diff --git a/core/startos/src/util/version.rs b/core/src/util/version.rs similarity index 100% rename from core/startos/src/util/version.rs rename to core/src/util/version.rs diff --git a/core/startos/src/version/mod.rs b/core/src/version/mod.rs similarity index 99% rename from core/startos/src/version/mod.rs rename to core/src/version/mod.rs index 551de11b8..c2cee2627 100644 --- a/core/startos/src/version/mod.rs +++ b/core/src/version/mod.rs @@ -608,8 +608,10 @@ where } } -pub const COMMIT_HASH: &str = - include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../../GIT_HASH.txt")); +pub const COMMIT_HASH: &str = include_str!(concat!( + env!("CARGO_MANIFEST_DIR"), + "/../build/env/GIT_HASH.txt" +)); pub fn git_info() -> Result { Ok(InternedString::intern(COMMIT_HASH)) diff --git a/core/startos/src/version/update_details/v0_4_0.md b/core/src/version/update_details/v0_4_0.md similarity index 100% rename from core/startos/src/version/update_details/v0_4_0.md rename to core/src/version/update_details/v0_4_0.md diff --git a/core/startos/src/version/v0_3_5.rs b/core/src/version/v0_3_5.rs similarity index 100% rename from core/startos/src/version/v0_3_5.rs rename to core/src/version/v0_3_5.rs diff --git a/core/startos/src/version/v0_3_5_1.rs b/core/src/version/v0_3_5_1.rs similarity index 100% rename from core/startos/src/version/v0_3_5_1.rs rename to core/src/version/v0_3_5_1.rs diff --git a/core/startos/src/version/v0_3_5_2.rs b/core/src/version/v0_3_5_2.rs similarity index 100% rename from core/startos/src/version/v0_3_5_2.rs rename to core/src/version/v0_3_5_2.rs diff --git a/core/startos/src/version/v0_3_6_alpha_0.rs b/core/src/version/v0_3_6_alpha_0.rs similarity index 100% rename from core/startos/src/version/v0_3_6_alpha_0.rs rename to core/src/version/v0_3_6_alpha_0.rs diff --git a/core/startos/src/version/v0_3_6_alpha_1.rs b/core/src/version/v0_3_6_alpha_1.rs similarity index 100% rename from core/startos/src/version/v0_3_6_alpha_1.rs rename to core/src/version/v0_3_6_alpha_1.rs diff --git a/core/startos/src/version/v0_3_6_alpha_10.rs b/core/src/version/v0_3_6_alpha_10.rs similarity index 100% rename from core/startos/src/version/v0_3_6_alpha_10.rs rename to core/src/version/v0_3_6_alpha_10.rs diff --git a/core/startos/src/version/v0_3_6_alpha_11.rs b/core/src/version/v0_3_6_alpha_11.rs similarity index 100% rename from core/startos/src/version/v0_3_6_alpha_11.rs rename to core/src/version/v0_3_6_alpha_11.rs diff --git a/core/startos/src/version/v0_3_6_alpha_12.rs b/core/src/version/v0_3_6_alpha_12.rs similarity index 100% rename from core/startos/src/version/v0_3_6_alpha_12.rs rename to core/src/version/v0_3_6_alpha_12.rs diff --git a/core/startos/src/version/v0_3_6_alpha_13.rs b/core/src/version/v0_3_6_alpha_13.rs similarity index 100% rename from core/startos/src/version/v0_3_6_alpha_13.rs rename to core/src/version/v0_3_6_alpha_13.rs diff --git a/core/startos/src/version/v0_3_6_alpha_14.rs b/core/src/version/v0_3_6_alpha_14.rs similarity index 100% rename from core/startos/src/version/v0_3_6_alpha_14.rs rename to core/src/version/v0_3_6_alpha_14.rs diff --git a/core/startos/src/version/v0_3_6_alpha_15.rs b/core/src/version/v0_3_6_alpha_15.rs similarity index 100% rename from core/startos/src/version/v0_3_6_alpha_15.rs rename to core/src/version/v0_3_6_alpha_15.rs diff --git a/core/startos/src/version/v0_3_6_alpha_16.rs b/core/src/version/v0_3_6_alpha_16.rs similarity index 100% rename from core/startos/src/version/v0_3_6_alpha_16.rs rename to core/src/version/v0_3_6_alpha_16.rs diff --git a/core/startos/src/version/v0_3_6_alpha_17.rs b/core/src/version/v0_3_6_alpha_17.rs similarity index 100% rename from core/startos/src/version/v0_3_6_alpha_17.rs rename to core/src/version/v0_3_6_alpha_17.rs diff --git a/core/startos/src/version/v0_3_6_alpha_18.rs b/core/src/version/v0_3_6_alpha_18.rs similarity index 100% rename from core/startos/src/version/v0_3_6_alpha_18.rs rename to core/src/version/v0_3_6_alpha_18.rs diff --git a/core/startos/src/version/v0_3_6_alpha_2.rs b/core/src/version/v0_3_6_alpha_2.rs similarity index 100% rename from core/startos/src/version/v0_3_6_alpha_2.rs rename to core/src/version/v0_3_6_alpha_2.rs diff --git a/core/startos/src/version/v0_3_6_alpha_3.rs b/core/src/version/v0_3_6_alpha_3.rs similarity index 100% rename from core/startos/src/version/v0_3_6_alpha_3.rs rename to core/src/version/v0_3_6_alpha_3.rs diff --git a/core/startos/src/version/v0_3_6_alpha_4.rs b/core/src/version/v0_3_6_alpha_4.rs similarity index 100% rename from core/startos/src/version/v0_3_6_alpha_4.rs rename to core/src/version/v0_3_6_alpha_4.rs diff --git a/core/startos/src/version/v0_3_6_alpha_5.rs b/core/src/version/v0_3_6_alpha_5.rs similarity index 100% rename from core/startos/src/version/v0_3_6_alpha_5.rs rename to core/src/version/v0_3_6_alpha_5.rs diff --git a/core/startos/src/version/v0_3_6_alpha_6.rs b/core/src/version/v0_3_6_alpha_6.rs similarity index 100% rename from core/startos/src/version/v0_3_6_alpha_6.rs rename to core/src/version/v0_3_6_alpha_6.rs diff --git a/core/startos/src/version/v0_3_6_alpha_7.rs b/core/src/version/v0_3_6_alpha_7.rs similarity index 100% rename from core/startos/src/version/v0_3_6_alpha_7.rs rename to core/src/version/v0_3_6_alpha_7.rs diff --git a/core/startos/src/version/v0_3_6_alpha_8.rs b/core/src/version/v0_3_6_alpha_8.rs similarity index 100% rename from core/startos/src/version/v0_3_6_alpha_8.rs rename to core/src/version/v0_3_6_alpha_8.rs diff --git a/core/startos/src/version/v0_3_6_alpha_9.rs b/core/src/version/v0_3_6_alpha_9.rs similarity index 100% rename from core/startos/src/version/v0_3_6_alpha_9.rs rename to core/src/version/v0_3_6_alpha_9.rs diff --git a/core/startos/src/version/v0_4_0_alpha_0.rs b/core/src/version/v0_4_0_alpha_0.rs similarity index 100% rename from core/startos/src/version/v0_4_0_alpha_0.rs rename to core/src/version/v0_4_0_alpha_0.rs diff --git a/core/startos/src/version/v0_4_0_alpha_1.rs b/core/src/version/v0_4_0_alpha_1.rs similarity index 100% rename from core/startos/src/version/v0_4_0_alpha_1.rs rename to core/src/version/v0_4_0_alpha_1.rs diff --git a/core/startos/src/version/v0_4_0_alpha_10.rs b/core/src/version/v0_4_0_alpha_10.rs similarity index 100% rename from core/startos/src/version/v0_4_0_alpha_10.rs rename to core/src/version/v0_4_0_alpha_10.rs diff --git a/core/startos/src/version/v0_4_0_alpha_11.rs b/core/src/version/v0_4_0_alpha_11.rs similarity index 100% rename from core/startos/src/version/v0_4_0_alpha_11.rs rename to core/src/version/v0_4_0_alpha_11.rs diff --git a/core/startos/src/version/v0_4_0_alpha_12.rs b/core/src/version/v0_4_0_alpha_12.rs similarity index 100% rename from core/startos/src/version/v0_4_0_alpha_12.rs rename to core/src/version/v0_4_0_alpha_12.rs diff --git a/core/startos/src/version/v0_4_0_alpha_13.rs b/core/src/version/v0_4_0_alpha_13.rs similarity index 100% rename from core/startos/src/version/v0_4_0_alpha_13.rs rename to core/src/version/v0_4_0_alpha_13.rs diff --git a/core/startos/src/version/v0_4_0_alpha_14.rs b/core/src/version/v0_4_0_alpha_14.rs similarity index 100% rename from core/startos/src/version/v0_4_0_alpha_14.rs rename to core/src/version/v0_4_0_alpha_14.rs diff --git a/core/startos/src/version/v0_4_0_alpha_15.rs b/core/src/version/v0_4_0_alpha_15.rs similarity index 100% rename from core/startos/src/version/v0_4_0_alpha_15.rs rename to core/src/version/v0_4_0_alpha_15.rs diff --git a/core/startos/src/version/v0_4_0_alpha_16.rs b/core/src/version/v0_4_0_alpha_16.rs similarity index 100% rename from core/startos/src/version/v0_4_0_alpha_16.rs rename to core/src/version/v0_4_0_alpha_16.rs diff --git a/core/startos/src/version/v0_4_0_alpha_2.rs b/core/src/version/v0_4_0_alpha_2.rs similarity index 100% rename from core/startos/src/version/v0_4_0_alpha_2.rs rename to core/src/version/v0_4_0_alpha_2.rs diff --git a/core/startos/src/version/v0_4_0_alpha_3.rs b/core/src/version/v0_4_0_alpha_3.rs similarity index 100% rename from core/startos/src/version/v0_4_0_alpha_3.rs rename to core/src/version/v0_4_0_alpha_3.rs diff --git a/core/startos/src/version/v0_4_0_alpha_4.rs b/core/src/version/v0_4_0_alpha_4.rs similarity index 100% rename from core/startos/src/version/v0_4_0_alpha_4.rs rename to core/src/version/v0_4_0_alpha_4.rs diff --git a/core/startos/src/version/v0_4_0_alpha_5.rs b/core/src/version/v0_4_0_alpha_5.rs similarity index 100% rename from core/startos/src/version/v0_4_0_alpha_5.rs rename to core/src/version/v0_4_0_alpha_5.rs diff --git a/core/startos/src/version/v0_4_0_alpha_6.rs b/core/src/version/v0_4_0_alpha_6.rs similarity index 100% rename from core/startos/src/version/v0_4_0_alpha_6.rs rename to core/src/version/v0_4_0_alpha_6.rs diff --git a/core/startos/src/version/v0_4_0_alpha_7.rs b/core/src/version/v0_4_0_alpha_7.rs similarity index 100% rename from core/startos/src/version/v0_4_0_alpha_7.rs rename to core/src/version/v0_4_0_alpha_7.rs diff --git a/core/startos/src/version/v0_4_0_alpha_8.rs b/core/src/version/v0_4_0_alpha_8.rs similarity index 100% rename from core/startos/src/version/v0_4_0_alpha_8.rs rename to core/src/version/v0_4_0_alpha_8.rs diff --git a/core/startos/src/version/v0_4_0_alpha_9.rs b/core/src/version/v0_4_0_alpha_9.rs similarity index 100% rename from core/startos/src/version/v0_4_0_alpha_9.rs rename to core/src/version/v0_4_0_alpha_9.rs diff --git a/core/startos/src/volume.rs b/core/src/volume.rs similarity index 100% rename from core/startos/src/volume.rs rename to core/src/volume.rs diff --git a/core/startos/start-registryd.service b/core/start-registryd.service similarity index 100% rename from core/startos/start-registryd.service rename to core/start-registryd.service diff --git a/core/startos/start-tunneld.service b/core/start-tunneld.service similarity index 100% rename from core/startos/start-tunneld.service rename to core/start-tunneld.service diff --git a/core/startos/startd.service b/core/startd.service similarity index 100% rename from core/startos/startd.service rename to core/startd.service diff --git a/core/startos/Cargo.toml b/core/startos/Cargo.toml deleted file mode 100644 index 335865c96..000000000 --- a/core/startos/Cargo.toml +++ /dev/null @@ -1,289 +0,0 @@ -[package] -authors = ["Aiden McClelland "] -description = "The core of StartOS" -documentation = "https://docs.rs/start-os" -edition = "2024" -keywords = [ - "bitcoin", - "full-node", - "lightning", - "privacy", - "raspberry-pi", - "self-hosted", -] -license = "MIT" -name = "start-os" -readme = "README.md" -repository = "https://github.com/Start9Labs/start-os" -version = "0.4.0-alpha.16" # VERSION_BUMP - -[lib] -name = "startos" -path = "src/lib.rs" - -[[bin]] -name = "startbox" -path = "src/main/startbox.rs" - -[[bin]] -name = "start-cli" -path = "src/main/start-cli.rs" - -[[bin]] -name = "start-container" -path = "src/main/start-container.rs" - -[[bin]] -name = "registrybox" -path = "src/main/registrybox.rs" - -[[bin]] -name = "tunnelbox" -path = "src/main/tunnelbox.rs" - -[features] -arti = [ - "arti-client", - "safelog", - "tor-cell", - "tor-hscrypto", - "tor-hsservice", - "tor-keymgr", - "tor-llcrypto", - "tor-proto", - "tor-rtcompat", -] -console = ["console-subscriber", "tokio/tracing"] -default = [] -dev = [] -test = [] -unstable = ["backtrace-on-stack-overflow"] - -[dependencies] -aes = { version = "0.7.5", features = ["ctr"] } -arti-client = { version = "0.33", features = [ - "compression", - "ephemeral-keystore", - "experimental-api", - "onion-service-client", - "onion-service-service", - "rustls", - "static", - "tokio", -], default-features = false, git = "https://github.com/Start9Labs/arti.git", branch = "patch/disable-exit", optional = true } -async-acme = { version = "0.6.0", git = "https://github.com/dr-bonez/async-acme.git", features = [ - "use_rustls", - "use_tokio", -] } -async-compression = { version = "0.4.32", features = [ - "brotli", - "gzip", - "tokio", - "zstd", -] } -async-stream = "0.3.5" -async-trait = "0.1.74" -axum = { version = "0.8.4", features = ["ws", "http2"] } -backtrace-on-stack-overflow = { version = "0.3.0", optional = true } -base32 = "0.5.0" -base64 = "0.22.1" -base64ct = "1.6.0" -basic-cookies = "0.1.4" -blake3 = { version = "1.5.0", features = ["mmap", "rayon"] } -bytes = "1" -chrono = { version = "0.4.31", features = ["serde"] } -clap = { version = "4.4.12", features = ["string"] } -color-eyre = "0.6.2" -console = "0.16.2" -console-subscriber = { version = "0.5.0", optional = true } -const_format = "0.2.34" -cookie = "0.18.0" -cookie_store = "0.22.0" -curve25519-dalek = "4.1.3" -der = { version = "0.7.9", features = ["derive", "pem"] } -digest = "0.10.7" -divrem = "1.0.0" -dns-lookup = "3.0.1" -ed25519 = { version = "2.2.3", features = ["alloc", "pem", "pkcs8"] } -ed25519-dalek = { version = "2.2.0", features = [ - "digest", - "hazmat", - "pkcs8", - "rand_core", - "serde", - "zeroize", -] } -ed25519-dalek-v1 = { package = "ed25519-dalek", version = "1" } -exver = { version = "0.2.0", git = "https://github.com/Start9Labs/exver-rs.git", features = [ - "serde", -] } -fd-lock-rs = "0.1.4" -form_urlencoded = "1.2.1" -futures = "0.3.28" -gpt = "4.1.0" -hex = "0.4.3" -hickory-server = { version = "0.25.2", features = ["resolver"] } -hmac = "0.12.1" -http = "1.0.0" -http-body-util = "0.1" -hyper = { version = "1.5", features = ["http1", "http2", "server"] } -hyper-util = { version = "0.1.10", features = [ - "http1", - "http2", - "server", - "server-auto", - "server-graceful", - "service", - "tokio", -] } -id-pool = { version = "0.2.2", default-features = false, features = [ - "serde", - "u16", -] } -iddqd = "0.3.14" -imbl = { version = "6", features = ["serde", "small-chunks"] } -imbl-value = { version = "0.4.3", features = ["ts-rs"] } -include_dir = { version = "0.7.3", features = ["metadata"] } -indexmap = { version = "2.0.2", features = ["serde"] } -indicatif = { version = "0.18.3", features = ["tokio"] } -inotify = "0.11.0" -integer-encoding = { version = "4.0.0", features = ["tokio_async"] } -ipnet = { version = "2.8.0", features = ["serde"] } -isocountry = "0.3.2" -itertools = "0.14.0" -jaq-core = "0.10.1" -jaq-std = "0.10.0" -josekit = "0.10.3" -jsonpath_lib = { git = "https://github.com/Start9Labs/jsonpath.git" } -lazy_async_pool = "0.3.3" -lazy_format = "2.0" -lazy_static = "1.4.0" -lettre = { version = "0.11.18", default-features = false, features = [ - "aws-lc-rs", - "builder", - "hostname", - "pool", - "rustls-platform-verifier", - "smtp-transport", - "tokio1-rustls", -] } -libc = "0.2.149" -log = "0.4.20" -mbrman = "0.6.0" -miette = { version = "7.6.0", features = ["fancy"] } -mio = "1" -new_mime_guess = "4" -nix = { version = "0.30.1", features = [ - "fs", - "mount", - "net", - "process", - "sched", - "signal", - "user", -] } -nom = "8.0.0" -num = "0.4.1" -num_cpus = "1.16.0" -num_enum = "0.7.0" -once_cell = "1.19.0" -openssh-keys = "0.6.2" -openssl = { version = "0.10.57", features = ["vendored"] } -p256 = { version = "0.13.2", features = ["pem"] } -patch-db = { version = "*", path = "../../patch-db/patch-db", features = [ - "trace", -] } -pbkdf2 = "0.12.2" -pin-project = "1.1.3" -pkcs8 = { version = "0.10.2", features = ["std"] } -prettytable-rs = "0.10.0" -proptest = "1.3.1" -proptest-derive = "0.7.0" -qrcode = "0.14.1" -r3bl_tui = "0.7.6" -rand = "0.9.2" -regex = "1.10.2" -reqwest = { version = "0.12.25", features = [ - "json", - "socks", - "stream", - "http2", -] } -reqwest_cookie_store = "0.9.0" -rpassword = "7.2.0" -rust-argon2 = "3.0.0" -rpc-toolkit = { git = "https://github.com/Start9Labs/rpc-toolkit.git" } -safelog = { version = "0.4.8", git = "https://github.com/Start9Labs/arti.git", branch = "patch/disable-exit", optional = true } -semver = { version = "1.0.20", features = ["serde"] } -serde = { version = "1.0", features = ["derive", "rc"] } -serde_cbor = { package = "ciborium", version = "0.2.1" } -serde_json = "1.0" -serde_toml = { package = "toml", version = "0.9.9+spec-1.0.0" } -serde_yaml = { package = "serde_yml", version = "0.0.12" } -sha-crypt = "0.5.0" -sha2 = "0.10.2" -signal-hook = "0.3.17" -socket2 = { version = "0.6.0", features = ["all"] } -socks5-impl = { version = "0.7.2", features = ["client", "server"] } -sqlx = { version = "0.8.6", features = [ - "postgres", - "runtime-tokio-rustls", -], default-features = false } -sscanf = "0.4.1" -ssh-key = { version = "0.6.2", features = ["ed25519"] } -tar = "0.4.40" -termion = "4.0.5" -textwrap = "0.16.1" -thiserror = "2.0.12" -tokio = { version = "1.38.1", features = ["full"] } -tokio-rustls = "0.26.4" -tokio-stream = { version = "0.1.14", features = ["io-util", "net", "sync"] } -tokio-tar = { git = "https://github.com/dr-bonez/tokio-tar.git" } -tokio-tungstenite = { version = "0.26.2", features = ["native-tls", "url"] } -tokio-util = { version = "0.7.9", features = ["io"] } -tor-cell = { version = "0.33", git = "https://github.com/Start9Labs/arti.git", branch = "patch/disable-exit", optional = true } -tor-hscrypto = { version = "0.33", features = [ - "full", -], git = "https://github.com/Start9Labs/arti.git", branch = "patch/disable-exit", optional = true } -tor-hsservice = { version = "0.33", git = "https://github.com/Start9Labs/arti.git", branch = "patch/disable-exit", optional = true } -tor-keymgr = { version = "0.33", features = [ - "ephemeral-keystore", -], git = "https://github.com/Start9Labs/arti.git", branch = "patch/disable-exit", optional = true } -tor-llcrypto = { version = "0.33", features = [ - "full", -], git = "https://github.com/Start9Labs/arti.git", branch = "patch/disable-exit", optional = true } -tor-proto = { version = "0.33", git = "https://github.com/Start9Labs/arti.git", branch = "patch/disable-exit", optional = true } -tor-rtcompat = { version = "0.33", features = [ - "rustls", - "tokio", -], git = "https://github.com/Start9Labs/arti.git", branch = "patch/disable-exit", optional = true } -torut = "0.2.1" -tower-service = "0.3.3" -tracing = "0.1.39" -tracing-error = "0.2.0" -tracing-journald = "0.3.0" -tracing-subscriber = { version = "0.3.17", features = ["env-filter"] } -ts-rs = "9.0.1" -typed-builder = "0.23.2" -url = { version = "2.4.1", features = ["serde"] } -uuid = { version = "1.4.1", features = ["v4"] } -visit-rs = "0.1.1" -x25519-dalek = { version = "2.0.1", features = ["static_secrets"] } -zbus = "5.1.1" -hashing-serializer = "0.1.1" - -[target.'cfg(target_os = "linux")'.dependencies] -procfs = "0.18.0" -pty-process = "0.5.1" - -[profile.test] -opt-level = 3 - -[profile.dev] -opt-level = 3 - -[profile.dev.package.backtrace] -opt-level = 3 - -[profile.dev.package.sqlx-macros] -opt-level = 3 diff --git a/core/startos/Effects.ts b/core/startos/Effects.ts deleted file mode 100644 index 9be56724e..000000000 --- a/core/startos/Effects.ts +++ /dev/null @@ -1,3 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export interface SetStoreParams { value: any, path: string, } \ No newline at end of file diff --git a/core/startos/proptest-regressions/s9pk/merkle_archive/test.txt b/core/startos/proptest-regressions/s9pk/merkle_archive/test.txt deleted file mode 100644 index 116de6aba..000000000 --- a/core/startos/proptest-regressions/s9pk/merkle_archive/test.txt +++ /dev/null @@ -1,7 +0,0 @@ -# Seeds for failure cases proptest has generated in the past. It is -# automatically read and these particular cases re-run before any -# novel cases are generated. -# -# It is recommended to check this file in to source control so that -# everyone who runs the test benefits from these saved cases. -cc dbb4790c31f9e400ed29a9ba2dbd61e3c55ce8a3fbae16601ca3512e803020ed # shrinks to files = [] diff --git a/core/startos/test/config-spec/lnd-correct.yaml b/core/startos/test/config-spec/lnd-correct.yaml deleted file mode 100644 index d9acba2e7..000000000 --- a/core/startos/test/config-spec/lnd-correct.yaml +++ /dev/null @@ -1,547 +0,0 @@ -control-tor-address: - name: Control Tor Address - description: The Tor address for the control interface. - type: pointer - subtype: package - package-id: lnd - target: tor-address - interface: control -peer-tor-address: - name: Peer Tor Address - description: The Tor address for the peer interface. - type: pointer - subtype: package - package-id: lnd - target: tor-address - interface: peer -watchtower-tor-address: - name: Watchtower Tor Address - description: The Tor address for the watchtower interface. - type: pointer - subtype: package - package-id: lnd - target: tor-address - interface: watchtower -alias: - type: string - name: Alias - description: The public, human-readable name of your Lightning node - nullable: true - placeholder: Enter a value - pattern: ".{1,32}" - pattern-description: Must be at least 1 character and no more than 32 characters -color: - type: string - name: Color - description: The public color dot of your Lightning node - nullable: false - pattern: "[0-9a-fA-F]{6}" - pattern-description: | - Must be a valid 6 digit hexadecimal RGB value. The first two digits are red, middle two are green, and final two are - blue - default: - charset: "a-f,0-9" - len: 6 -accept-keysend: - type: boolean - name: Accept Keysend - description: | - Allow others to send payments directly to your public key through keysend instead of having to get a new invoice - default: false -accept-amp: - type: boolean - name: Accept Spontaneous AMPs - description: | - If enabled, spontaneous payments through AMP will be accepted. Payments to AMP - invoices will be accepted regardless of this setting. - default: false -reject-htlc: - type: boolean - name: Reject Routing Requests - description: | - If true, LND will not forward any HTLCs that are meant as onward payments. This option will still allow LND to send - HTLCs and receive HTLCs but lnd won't be used as a hop. - default: false -min-chan-size: - type: number - name: Minimum Channel Size - description: | - The smallest channel size that we should accept. Incoming channels smaller than this will be rejected. - nullable: true - range: "[1,16777215]" - integral: true - units: satoshis -max-chan-size: - type: number - name: Maximum Channel Size - description: | - The largest channel size that we should accept. Incoming channels larger than this will be rejected. - For non-Wumbo channels this limit remains 16777215 satoshis by default as specified in BOLT-0002. For wumbo - channels this limit is 1,000,000,000 satoshis (10 BTC). Set this config option explicitly to restrict your maximum - channel size to better align with your risk tolerance. Don't forget to enable Wumbo channels under 'Advanced,' if desired. - nullable: true - range: "[1,1000000000]" - integral: true - units: satoshis -tor: - type: object - name: Tor Config - nullable: false - spec: - use-tor-only: - type: boolean - name: Use Tor for all traffic - description: >- - Use the tor proxy even for connections that are reachable on clearnet. This will hide your node's public IP - address, but will slow down your node's performance - nullable: false - default: false - stream-isolation: - type: boolean - name: Stream Isolation - description: >- - Enable Tor stream isolation by randomizing user credentials for each - connection. With this mode active, each connection will use a new circuit. - This means that multiple applications (other than lnd) using Tor won't be mixed - in with lnd's traffic. - - This option may not be used when 'Use Tor for all traffic' is disabled, since direct - connections compromise source IP privacy by default. - nullable: false - default: false -bitcoind: - type: union - name: Bitcoin Core - description: | - The Bitcoin Core node to connect to: - - internal: The Bitcoin Core and Proxy services installed to your Embassy - - external: An unpruned Bitcoin Core node running on a different device - tag: - id: type - name: Type - variant-names: - internal: Internal (Bitcoin Core) - internal-proxy: Internal (Bitcoin Proxy) - external: External - description: | - The Bitcoin Core node to connect to: - - internal: The Bitcoin Core and Proxy services installed to your Embassy - - external: An unpruned Bitcoin Core node running on a different device - default: internal - variants: - internal: - user: - type: pointer - name: RPC Username - description: The username for Bitcoin Core's RPC interface - subtype: package - package-id: bitcoind - target: config - multi: false - selector: "$.rpc.username" - password: - type: pointer - name: RPC Password - description: The password for Bitcoin Core's RPC interface - subtype: package - package-id: bitcoind - target: config - multi: false - selector: "$.rpc.password" - internal-proxy: - user: - type: pointer - name: RPC Username - description: The username for the RPC user allocated to lnd - subtype: package - package-id: btc-rpc-proxy - target: config - multi: false - selector: '$.users[?(@.name == "lnd")].name' - # index: 'users.[first(item => ''item.name = "lnd")].name' - password: - type: pointer - name: RPC Password - description: The password for the RPC user allocated to lnd - subtype: package - package-id: btc-rpc-proxy - target: config - multi: false - selector: '$.users[?(@.name == "lnd")].password' - # index: 'users.[first(item => ''item.name = "lnd")].password' - external: - connection-settings: - type: union - name: Connection Settings - description: Information to connect to an external unpruned Bitcoin Core node - tag: - id: type - name: Type - description: | - - Manual: Raw information for finding a Bitcoin Core node - - Quick Connect: A Quick Connect URL for a Bitcoin Core node - variant-names: - manual: Manual - quick-connect: Quick Connect - default: quick-connect - variants: - manual: - host: - type: string - name: Public Address - description: The public address of your Bitcoin Core server - nullable: false - rpc-user: - type: string - name: RPC Username - description: The username for the RPC user on your Bitcoin Core RPC server - nullable: false - rpc-password: - type: string - name: RPC Password - description: The password for the RPC user on your Bitcoin Core RPC server - nullable: false - rpc-port: - type: number - name: RPC Port - description: The port that your Bitcoin Core RPC server is bound to - nullable: false - range: "[0,65535]" - integral: true - default: 8332 - zmq-block-port: - type: number - name: ZeroMQ Block Port - description: The port that your Bitcoin Core ZeroMQ server is bound to for raw blocks - nullable: false - range: "[0,65535]" - integral: true - default: 28332 - zmq-tx-port: - type: number - name: ZeroMQ Transaction Port - description: The port that your Bitcoin Core ZeroMQ server is bound to for raw transactions - nullable: false - range: "[0,65535]" - integral: true - default: 28333 - quick-connect: - quick-connect-url: - type: string - name: Quick Connect URL - description: | - The Quick Connect URL for your Bitcoin Core RPC server - NOTE: LND will not accept a .onion url for this option - nullable: false - pattern: 'btcstandup://[^:]*:[^@]*@[a-zA-Z0-9.-]+:[0-9]+(/(\?(label=.+)?)?)?' - pattern-description: Must be a valid Quick Connect URL. For help, check out https://github.com/BlockchainCommons/Gordian/blob/master/Docs/Quick-Connect-API.md - zmq-block-port: - type: number - name: ZeroMQ Block Port - description: The port that your Bitcoin Core ZeroMQ server is bound to for raw blocks - nullable: false - range: "[0,65535]" - integral: true - default: 28332 - zmq-tx-port: - type: number - name: ZeroMQ Transaction Port - description: The port that your Bitcoin Core ZeroMQ server is bound to for raw transactions - nullable: false - range: "[0,65535]" - integral: true - default: 28333 -autopilot: - type: object - name: Autopilot - description: Autopilot Settings - nullable: false - spec: - enabled: - type: boolean - name: Enabled - description: | - If the autopilot agent should be active or not. The autopilot agent will - attempt to AUTOMATICALLY OPEN CHANNELS to put your node in an advantageous - position within the network graph. DO NOT ENABLE THIS IF YOU WANT TO MANAGE - CHANNELS MANUALLY OR DO NOT UNDERSTAND IT. - default: false - private: - type: boolean - name: Private - description: | - Whether the channels created by the autopilot agent should be private or not. - Private channels won't be announced to the network. - default: false - maxchannels: - type: number - name: Maximum Channels - description: The maximum number of channels that should be created. - nullable: false - range: "[1,*)" - integral: true - default: 5 - allocation: - type: number - name: Allocation - description: | - The fraction of total funds that should be committed to automatic channel - establishment. For example 60% means that 60% of the total funds available - within the wallet should be used to automatically establish channels. The total - amount of attempted channels will still respect the "Maximum Channels" parameter. - nullable: false - range: "[0,100]" - integral: false - default: 60 - units: "%" - min-channel-size: - type: number - name: Minimum Channel Size - description: The smallest channel that the autopilot agent should create. - nullable: false - range: "[0,*)" - integral: true - default: 20000 - units: "satoshis" - max-channel-size: - type: number - name: Maximum Channel Size - description: The largest channel that the autopilot agent should create. - nullable: false - range: "[0,*)" - integral: true - default: 16777215 - units: "satoshis" - advanced: - type: object - name: Advanced - description: Advanced Options - nullable: false - spec: - min-confirmations: - type: number - name: Minimum Confirmations - description: | - The minimum number of confirmations each of your inputs in funding transactions - created by the autopilot agent must have. - nullable: false - range: "[0,*)" - integral: true - default: 1 - units: blocks - confirmation-target: - type: number - name: Confirmation Target - description: The confirmation target (in blocks) for channels opened by autopilot. - nullable: false - range: "[0,*)" - integral: true - default: 1 - units: blocks -advanced: - type: object - name: Advanced - description: Advanced Options - nullable: false - spec: - debug-level: - type: enum - name: Log Verbosity - values: - - trace - - debug - - info - - warn - - error - - critical - description: | - Sets the level of log filtration. Trace is the most verbose, Critical is the least. - default: info - db-bolt-no-freelist-sync: - type: boolean - name: Disallow Bolt DB Freelist Sync - description: | - If true, prevents the database from syncing its freelist to disk. - default: false - db-bolt-auto-compact: - type: boolean - name: Compact Database on Startup - description: | - Performs database compaction on startup. This is necessary to keep disk usage down over time at the cost of - having longer startup times. - default: true - db-bolt-auto-compact-min-age: - type: number - name: Minimum Autocompaction Age for Bolt DB - description: | - How long ago (in hours) the last compaction of a database file must be for it to be considered for auto - compaction again. Can be set to 0 to compact on every startup. - nullable: false - range: "[0, *)" - integral: true - default: 168 - units: hours - db-bolt-db-timeout: - type: number - name: Bolt DB Timeout - description: How long should LND try to open the database before giving up? - nullable: false - range: "[1, 86400]" - integral: true - default: 60 - units: seconds - recovery-window: - type: number - name: Recovery Window - description: Number of blocks in the past that LND should scan for unknown transactions - nullable: true - range: "[1,*)" - integral: true - units: "blocks" - payments-expiration-grace-period: - type: number - name: Payments Expiration Grace Period - description: | - A period to wait before for closing channels with outgoing htlcs that have timed out and are a result of this - nodes instead payment. In addition to our current block based deadline, is specified this grace period will - also be taken into account. - nullable: false - range: "[1,*)" - integral: true - default: 30 - units: "seconds" - default-remote-max-htlcs: - type: number - name: Maximum Remote HTLCs - description: | - The default max_htlc applied when opening or accepting channels. This value limits the number of concurrent - HTLCs that the remote party can add to the commitment. The maximum possible value is 483. - nullable: false - range: "[1,483]" - integral: true - default: 483 - units: htlcs - max-channel-fee-allocation: - type: number - name: Maximum Channel Fee Allocation - description: | - The maximum percentage of total funds that can be allocated to a channel's commitment fee. This only applies for - the initiator of the channel. - nullable: false - range: "[0.1, 1]" - integral: false - default: 0.5 - max-commit-fee-rate-anchors: - type: number - name: Maximum Commitment Fee for Anchor Channels - description: | - The maximum fee rate in sat/vbyte that will be used for commitments of channels of the anchors type. Must be - large enough to ensure transaction propagation. - nullable: false - range: "[1,*)" - integral: true - default: 10 - protocol-wumbo-channels: - type: boolean - name: Enable Wumbo Channels - description: | - If set, then lnd will create and accept requests for channels larger than 0.16 BTC - nullable: false - default: false - protocol-no-anchors: - type: boolean - name: Disable Anchor Channels - description: | - Set to disable support for anchor commitments. Anchor channels allow you to determine your fees at close time by - using a Child Pays For Parent transaction. - nullable: false - default: false - protocol-disable-script-enforced-lease: - type: boolean - name: Disable Script Enforced Channel Leases - description: >- - Set to disable support for script enforced lease channel commitments. If not - set, lnd will accept these channels by default if the remote channel party - proposes them. Note that lnd will require 1 UTXO to be reserved for this - channel type if it is enabled. - - Note: This may cause you to be unable to close a channel and your wallets may not understand why - nullable: false - default: false - gc-canceled-invoices-on-startup: - type: boolean - name: Cleanup Canceled Invoices on Startup - description: | - If true, LND will attempt to garbage collect canceled invoices upon start. - nullable: false - default: false - bitcoin: - type: object - name: Bitcoin Channel Configuration - description: Configuration options for lightning network channel management operating over the Bitcoin network - nullable: false - spec: - default-channel-confirmations: - type: number - name: Default Channel Confirmations - description: | - The default number of confirmations a channel must have before it's considered - open. LND will require any incoming channel requests to wait this many - confirmations before it considers the channel active. - nullable: false - range: "[1,6]" - integral: true - default: 3 - units: "blocks" - min-htlc: - type: number - name: Minimum Incoming HTLC Size - description: | - The smallest HTLC LND will to accept on your channels, in millisatoshis. - nullable: false - range: "[1,*)" - integral: true - default: 1 - units: "millisatoshis" - min-htlc-out: - type: number - name: Minimum Outgoing HTLC Size - description: | - The smallest HTLC LND will send out on your channels, in millisatoshis. - nullable: false - range: "[1,*)" - integral: true - default: 1000 - units: "millisatoshis" - base-fee: - type: number - name: Routing Base Fee - description: | - The base fee in millisatoshi you will charge for forwarding payments on your - channels. - nullable: false - range: "[0,*)" - integral: true - default: 1000 - units: "millisatoshi" - fee-rate: - type: number - name: Routing Fee Rate - description: | - The fee rate used when forwarding payments on your channels. The total fee - charged is the Base Fee + (amount * Fee Rate / 1000000), where amount is the - forwarded amount. Measured in sats per million - nullable: false - range: "[1,1000000)" - integral: true - default: 1 - units: "sats per million" - time-lock-delta: - type: number - name: Time Lock Delta - description: The CLTV delta we will subtract from a forwarded HTLC's timelock value. - nullable: false - range: "[6, 144]" - integral: true - default: 40 - units: "blocks" diff --git a/core/startos/test/config-spec/lnd-invalid-regex.yaml b/core/startos/test/config-spec/lnd-invalid-regex.yaml deleted file mode 100644 index 7bd6d677d..000000000 --- a/core/startos/test/config-spec/lnd-invalid-regex.yaml +++ /dev/null @@ -1,546 +0,0 @@ -control-tor-address: - name: Control Tor Address - description: The Tor address for the control interface. - type: pointer - subtype: package - package-id: lnd - target: tor-address - interface: control -peer-tor-address: - name: Peer Tor Address - description: The Tor address for the peer interface. - type: pointer - subtype: package - package-id: lnd - target: tor-address - interface: peer -watchtower-tor-address: - name: Watchtower Tor Address - description: The Tor address for the watchtower interface. - type: pointer - subtype: package - package-id: lnd - target: tor-address - interface: watchtower -alias: - type: string - name: Alias - description: The public, human-readable name of your Lightning node - nullable: true - pattern: ".{1,32}" - pattern-description: Must be at least 1 character and no more than 32 characters -color: - type: string - name: Color - description: The public color dot of your Lightning node - nullable: false - pattern: "[0-9a-fA-F]{6" - pattern-description: | - Must be a valid 6 digit hexadecimal RGB value. The first two digits are red, middle two are green, and final two are - blue - default: - charset: "a-f,0-9" - len: 6 -accept-keysend: - type: boolean - name: Accept Keysend - description: | - Allow others to send payments directly to your public key through keysend instead of having to get a new invoice - default: false -accept-amp: - type: boolean - name: Accept Spontaneous AMPs - description: | - If enabled, spontaneous payments through AMP will be accepted. Payments to AMP - invoices will be accepted regardless of this setting. - default: false -reject-htlc: - type: boolean - name: Reject Routing Requests - description: | - If true, LND will not forward any HTLCs that are meant as onward payments. This option will still allow LND to send - HTLCs and receive HTLCs but lnd won't be used as a hop. - default: false -min-chan-size: - type: number - name: Minimum Channel Size - description: | - The smallest channel size that we should accept. Incoming channels smaller than this will be rejected. - nullable: true - range: "[1,16777215]" - integral: true - units: satoshis -max-chan-size: - type: number - name: Maximum Channel Size - description: | - The largest channel size that we should accept. Incoming channels larger than this will be rejected. - For non-Wumbo channels this limit remains 16777215 satoshis by default as specified in BOLT-0002. For wumbo - channels this limit is 1,000,000,000 satoshis (10 BTC). Set this config option explicitly to restrict your maximum - channel size to better align with your risk tolerance. Don't forget to enable Wumbo channels under 'Advanced,' if desired. - nullable: true - range: "[1,1000000000]" - integral: true - units: satoshis -tor: - type: object - name: Tor Config - nullable: false - spec: - use-tor-only: - type: boolean - name: Use Tor for all traffic - description: >- - Use the tor proxy even for connections that are reachable on clearnet. This will hide your node's public IP - address, but will slow down your node's performance - nullable: false - default: false - stream-isolation: - type: boolean - name: Stream Isolation - description: >- - Enable Tor stream isolation by randomizing user credentials for each - connection. With this mode active, each connection will use a new circuit. - This means that multiple applications (other than lnd) using Tor won't be mixed - in with lnd's traffic. - - This option may not be used when 'Use Tor for all traffic' is disabled, since direct - connections compromise source IP privacy by default. - nullable: false - default: false -bitcoind: - type: union - name: Bitcoin Core - description: | - The Bitcoin Core node to connect to: - - internal: The Bitcoin Core and Proxy services installed to your Embassy - - external: An unpruned Bitcoin Core node running on a different device - tag: - id: type - name: Type - variant-names: - internal: Internal (Bitcoin Core) - internal-proxy: Internal (Bitcoin Proxy) - external: External - description: | - The Bitcoin Core node to connect to: - - internal: The Bitcoin Core and Proxy services installed to your Embassy - - external: An unpruned Bitcoin Core node running on a different device - default: internal - variants: - internal: - user: - type: pointer - name: RPC Username - description: The username for Bitcoin Core's RPC interface - subtype: package - package-id: bitcoind - target: config - multi: false - selector: "$.rpc.username" - password: - type: pointer - name: RPC Password - description: The password for Bitcoin Core's RPC interface - subtype: package - package-id: bitcoind - target: config - multi: false - selector: "$.rpc.password" - internal-proxy: - user: - type: pointer - name: RPC Username - description: The username for the RPC user allocated to lnd - subtype: package - package-id: btc-rpc-proxy - target: config - multi: false - selector: '$.users[?(@.name == "lnd")].name' - # index: 'users.[first(item => ''item.name = "lnd")].name' - password: - type: pointer - name: RPC Password - description: The password for the RPC user allocated to lnd - subtype: package - package-id: btc-rpc-proxy - target: config - multi: false - selector: '$.users[?(@.name == "lnd")].password' - # index: 'users.[first(item => ''item.name = "lnd")].password' - external: - connection-settings: - type: union - name: Connection Settings - description: Information to connect to an external unpruned Bitcoin Core node - tag: - id: type - name: Type - description: | - - Manual: Raw information for finding a Bitcoin Core node - - Quick Connect: A Quick Connect URL for a Bitcoin Core node - variant-names: - manual: Manual - quick-connect: Quick Connect - default: quick-connect - variants: - manual: - host: - type: string - name: Public Address - description: The public address of your Bitcoin Core server - nullable: false - rpc-user: - type: string - name: RPC Username - description: The username for the RPC user on your Bitcoin Core RPC server - nullable: false - rpc-password: - type: string - name: RPC Password - description: The password for the RPC user on your Bitcoin Core RPC server - nullable: false - rpc-port: - type: number - name: RPC Port - description: The port that your Bitcoin Core RPC server is bound to - nullable: false - range: "[0,65535]" - integral: true - default: 8332 - zmq-block-port: - type: number - name: ZeroMQ Block Port - description: The port that your Bitcoin Core ZeroMQ server is bound to for raw blocks - nullable: false - range: "[0,65535]" - integral: true - default: 28332 - zmq-tx-port: - type: number - name: ZeroMQ Transaction Port - description: The port that your Bitcoin Core ZeroMQ server is bound to for raw transactions - nullable: false - range: "[0,65535]" - integral: true - default: 28333 - quick-connect: - quick-connect-url: - type: string - name: Quick Connect URL - description: | - The Quick Connect URL for your Bitcoin Core RPC server - NOTE: LND will not accept a .onion url for this option - nullable: false - pattern: 'btcstandup://[^:]*:[^@]*@[a-zA-Z0-9.-]+:[0-9]+(/(\?(label=.+)?)?)?' - pattern-description: Must be a valid Quick Connect URL. For help, check out https://github.com/BlockchainCommons/Gordian/blob/master/Docs/Quick-Connect-API.md - zmq-block-port: - type: number - name: ZeroMQ Block Port - description: The port that your Bitcoin Core ZeroMQ server is bound to for raw blocks - nullable: false - range: "[0,65535]" - integral: true - default: 28332 - zmq-tx-port: - type: number - name: ZeroMQ Transaction Port - description: The port that your Bitcoin Core ZeroMQ server is bound to for raw transactions - nullable: false - range: "[0,65535]" - integral: true - default: 28333 -autopilot: - type: object - name: Autopilot - description: Autopilot Settings - nullable: false - spec: - enabled: - type: boolean - name: Enabled - description: | - If the autopilot agent should be active or not. The autopilot agent will - attempt to AUTOMATICALLY OPEN CHANNELS to put your node in an advantageous - position within the network graph. DO NOT ENABLE THIS IF YOU WANT TO MANAGE - CHANNELS MANUALLY OR DO NOT UNDERSTAND IT. - default: false - private: - type: boolean - name: Private - description: | - Whether the channels created by the autopilot agent should be private or not. - Private channels won't be announced to the network. - default: false - maxchannels: - type: number - name: Maximum Channels - description: The maximum number of channels that should be created. - nullable: false - range: "[1,*)" - integral: true - default: 5 - allocation: - type: number - name: Allocation - description: | - The fraction of total funds that should be committed to automatic channel - establishment. For example 60% means that 60% of the total funds available - within the wallet should be used to automatically establish channels. The total - amount of attempted channels will still respect the "Maximum Channels" parameter. - nullable: false - range: "[0,100]" - integral: false - default: 60 - units: "%" - min-channel-size: - type: number - name: Minimum Channel Size - description: The smallest channel that the autopilot agent should create. - nullable: false - range: "[0,*)" - integral: true - default: 20000 - units: "satoshis" - max-channel-size: - type: number - name: Maximum Channel Size - description: The largest channel that the autopilot agent should create. - nullable: false - range: "[0,*)" - integral: true - default: 16777215 - units: "satoshis" - advanced: - type: object - name: Advanced - description: Advanced Options - nullable: false - spec: - min-confirmations: - type: number - name: Minimum Confirmations - description: | - The minimum number of confirmations each of your inputs in funding transactions - created by the autopilot agent must have. - nullable: false - range: "[0,*)" - integral: true - default: 1 - units: blocks - confirmation-target: - type: number - name: Confirmation Target - description: The confirmation target (in blocks) for channels opened by autopilot. - nullable: false - range: "[0,*)" - integral: true - default: 1 - units: blocks -advanced: - type: object - name: Advanced - description: Advanced Options - nullable: false - spec: - debug-level: - type: enum - name: Log Verbosity - values: - - trace - - debug - - info - - warn - - error - - critical - description: | - Sets the level of log filtration. Trace is the most verbose, Critical is the least. - default: info - db-bolt-no-freelist-sync: - type: boolean - name: Disallow Bolt DB Freelist Sync - description: | - If true, prevents the database from syncing its freelist to disk. - default: false - db-bolt-auto-compact: - type: boolean - name: Compact Database on Startup - description: | - Performs database compaction on startup. This is necessary to keep disk usage down over time at the cost of - having longer startup times. - default: true - db-bolt-auto-compact-min-age: - type: number - name: Minimum Autocompaction Age for Bolt DB - description: | - How long ago (in hours) the last compaction of a database file must be for it to be considered for auto - compaction again. Can be set to 0 to compact on every startup. - nullable: false - range: "[0, *)" - integral: true - default: 168 - units: hours - db-bolt-db-timeout: - type: number - name: Bolt DB Timeout - description: How long should LND try to open the database before giving up? - nullable: false - range: "[1, 86400]" - integral: true - default: 60 - units: seconds - recovery-window: - type: number - name: Recovery Window - description: Number of blocks in the past that LND should scan for unknown transactions - nullable: true - range: "[1,*)" - integral: true - units: "blocks" - payments-expiration-grace-period: - type: number - name: Payments Expiration Grace Period - description: | - A period to wait before for closing channels with outgoing htlcs that have timed out and are a result of this - nodes instead payment. In addition to our current block based deadline, is specified this grace period will - also be taken into account. - nullable: false - range: "[1,*)" - integral: true - default: 30 - units: "seconds" - default-remote-max-htlcs: - type: number - name: Maximum Remote HTLCs - description: | - The default max_htlc applied when opening or accepting channels. This value limits the number of concurrent - HTLCs that the remote party can add to the commitment. The maximum possible value is 483. - nullable: false - range: "[1,483]" - integral: true - default: 483 - units: htlcs - max-channel-fee-allocation: - type: number - name: Maximum Channel Fee Allocation - description: | - The maximum percentage of total funds that can be allocated to a channel's commitment fee. This only applies for - the initiator of the channel. - nullable: false - range: "[0.1, 1]" - integral: false - default: 0.5 - max-commit-fee-rate-anchors: - type: number - name: Maximum Commitment Fee for Anchor Channels - description: | - The maximum fee rate in sat/vbyte that will be used for commitments of channels of the anchors type. Must be - large enough to ensure transaction propagation. - nullable: false - range: "[1,*)" - integral: true - default: 10 - protocol-wumbo-channels: - type: boolean - name: Enable Wumbo Channels - description: | - If set, then lnd will create and accept requests for channels larger than 0.16 BTC - nullable: false - default: false - protocol-no-anchors: - type: boolean - name: Disable Anchor Channels - description: | - Set to disable support for anchor commitments. Anchor channels allow you to determine your fees at close time by - using a Child Pays For Parent transaction. - nullable: false - default: false - protocol-disable-script-enforced-lease: - type: boolean - name: Disable Script Enforced Channel Leases - description: >- - Set to disable support for script enforced lease channel commitments. If not - set, lnd will accept these channels by default if the remote channel party - proposes them. Note that lnd will require 1 UTXO to be reserved for this - channel type if it is enabled. - - Note: This may cause you to be unable to close a channel and your wallets may not understand why - nullable: false - default: false - gc-canceled-invoices-on-startup: - type: boolean - name: Cleanup Canceled Invoices on Startup - description: | - If true, LND will attempt to garbage collect canceled invoices upon start. - nullable: false - default: false - bitcoin: - type: object - name: Bitcoin Channel Configuration - description: Configuration options for lightning network channel management operating over the Bitcoin network - nullable: false - spec: - default-channel-confirmations: - type: number - name: Default Channel Confirmations - description: | - The default number of confirmations a channel must have before it's considered - open. LND will require any incoming channel requests to wait this many - confirmations before it considers the channel active. - nullable: false - range: "[1,6]" - integral: true - default: 3 - units: "blocks" - min-htlc: - type: number - name: Minimum Incoming HTLC Size - description: | - The smallest HTLC LND will to accept on your channels, in millisatoshis. - nullable: false - range: "[1,*)" - integral: true - default: 1 - units: "millisatoshis" - min-htlc-out: - type: number - name: Minimum Outgoing HTLC Size - description: | - The smallest HTLC LND will send out on your channels, in millisatoshis. - nullable: false - range: "[1,*)" - integral: true - default: 1000 - units: "millisatoshis" - base-fee: - type: number - name: Routing Base Fee - description: | - The base fee in millisatoshi you will charge for forwarding payments on your - channels. - nullable: false - range: "[0,*)" - integral: true - default: 1000 - units: "millisatoshi" - fee-rate: - type: number - name: Routing Fee Rate - description: | - The fee rate used when forwarding payments on your channels. The total fee - charged is the Base Fee + (amount * Fee Rate / 1000000), where amount is the - forwarded amount. Measured in sats per million - nullable: false - range: "[1,1000000)" - integral: true - default: 1 - units: "sats per million" - time-lock-delta: - type: number - name: Time Lock Delta - description: The CLTV delta we will subtract from a forwarded HTLC's timelock value. - nullable: false - range: "[6, 144]" - integral: true - default: 40 - units: "blocks" diff --git a/core/startos/test/config-spec/lnd-missing-pattern-description.yaml b/core/startos/test/config-spec/lnd-missing-pattern-description.yaml deleted file mode 100644 index 50e8b9d01..000000000 --- a/core/startos/test/config-spec/lnd-missing-pattern-description.yaml +++ /dev/null @@ -1,545 +0,0 @@ -control-tor-address: - name: Control Tor Address - description: The Tor address for the control interface. - type: pointer - subtype: package - package-id: lnd - target: tor-address - interface: control -peer-tor-address: - name: Peer Tor Address - description: The Tor address for the peer interface. - type: pointer - subtype: package - package-id: lnd - target: tor-address - interface: peer -watchtower-tor-address: - name: Watchtower Tor Address - description: The Tor address for the watchtower interface. - type: pointer - subtype: package - package-id: lnd - target: tor-address - interface: watchtower -alias: - type: string - name: Alias - description: The public, human-readable name of your Lightning node - nullable: true - pattern: ".{1,32}" - pattern-description: Must be at least 1 character and no more than 32 characters -color: - type: string - name: Color - description: The public color dot of your Lightning node - nullable: false - pattern: "[0-9a-fA-F]{6" - pattern-description: | - Must be a valid 6 digit hexadecimal RGB value. The first two digits are red, middle two are green, and final two are - blue - default: - charset: "a-f,0-9" - len: 6 -accept-keysend: - type: boolean - name: Accept Keysend - description: | - Allow others to send payments directly to your public key through keysend instead of having to get a new invoice - default: false -accept-amp: - type: boolean - name: Accept Spontaneous AMPs - description: | - If enabled, spontaneous payments through AMP will be accepted. Payments to AMP - invoices will be accepted regardless of this setting. - default: false -reject-htlc: - type: boolean - name: Reject Routing Requests - description: | - If true, LND will not forward any HTLCs that are meant as onward payments. This option will still allow LND to send - HTLCs and receive HTLCs but lnd won't be used as a hop. - default: false -min-chan-size: - type: number - name: Minimum Channel Size - description: | - The smallest channel size that we should accept. Incoming channels smaller than this will be rejected. - nullable: true - range: "[1,16777215]" - integral: true - units: satoshis -max-chan-size: - type: number - name: Maximum Channel Size - description: | - The largest channel size that we should accept. Incoming channels larger than this will be rejected. - For non-Wumbo channels this limit remains 16777215 satoshis by default as specified in BOLT-0002. For wumbo - channels this limit is 1,000,000,000 satoshis (10 BTC). Set this config option explicitly to restrict your maximum - channel size to better align with your risk tolerance. Don't forget to enable Wumbo channels under 'Advanced,' if desired. - nullable: true - range: "[1,1000000000]" - integral: true - units: satoshis -tor: - type: object - name: Tor Config - nullable: false - spec: - use-tor-only: - type: boolean - name: Use Tor for all traffic - description: >- - Use the tor proxy even for connections that are reachable on clearnet. This will hide your node's public IP - address, but will slow down your node's performance - nullable: false - default: false - stream-isolation: - type: boolean - name: Stream Isolation - description: >- - Enable Tor stream isolation by randomizing user credentials for each - connection. With this mode active, each connection will use a new circuit. - This means that multiple applications (other than lnd) using Tor won't be mixed - in with lnd's traffic. - - This option may not be used when 'Use Tor for all traffic' is disabled, since direct - connections compromise source IP privacy by default. - nullable: false - default: false -bitcoind: - type: union - name: Bitcoin Core - description: | - The Bitcoin Core node to connect to: - - internal: The Bitcoin Core and Proxy services installed to your Embassy - - external: An unpruned Bitcoin Core node running on a different device - tag: - id: type - name: Type - variant-names: - internal: Internal (Bitcoin Core) - internal-proxy: Internal (Bitcoin Proxy) - external: External - description: | - The Bitcoin Core node to connect to: - - internal: The Bitcoin Core and Proxy services installed to your Embassy - - external: An unpruned Bitcoin Core node running on a different device - default: internal - variants: - internal: - user: - type: pointer - name: RPC Username - description: The username for Bitcoin Core's RPC interface - subtype: package - package-id: bitcoind - target: config - multi: false - selector: "$.rpc.username" - password: - type: pointer - name: RPC Password - description: The password for Bitcoin Core's RPC interface - subtype: package - package-id: bitcoind - target: config - multi: false - selector: "$.rpc.password" - internal-proxy: - user: - type: pointer - name: RPC Username - description: The username for the RPC user allocated to lnd - subtype: package - package-id: btc-rpc-proxy - target: config - multi: false - selector: '$.users[?(@.name == "lnd")].name' - # index: 'users.[first(item => ''item.name = "lnd")].name' - password: - type: pointer - name: RPC Password - description: The password for the RPC user allocated to lnd - subtype: package - package-id: btc-rpc-proxy - target: config - multi: false - selector: '$.users[?(@.name == "lnd")].password' - # index: 'users.[first(item => ''item.name = "lnd")].password' - external: - connection-settings: - type: union - name: Connection Settings - description: Information to connect to an external unpruned Bitcoin Core node - tag: - id: type - name: Type - description: | - - Manual: Raw information for finding a Bitcoin Core node - - Quick Connect: A Quick Connect URL for a Bitcoin Core node - variant-names: - manual: Manual - quick-connect: Quick Connect - default: quick-connect - variants: - manual: - host: - type: string - name: Public Address - description: The public address of your Bitcoin Core server - nullable: false - rpc-user: - type: string - name: RPC Username - description: The username for the RPC user on your Bitcoin Core RPC server - nullable: false - rpc-password: - type: string - name: RPC Password - description: The password for the RPC user on your Bitcoin Core RPC server - nullable: false - rpc-port: - type: number - name: RPC Port - description: The port that your Bitcoin Core RPC server is bound to - nullable: false - range: "[0,65535]" - integral: true - default: 8332 - zmq-block-port: - type: number - name: ZeroMQ Block Port - description: The port that your Bitcoin Core ZeroMQ server is bound to for raw blocks - nullable: false - range: "[0,65535]" - integral: true - default: 28332 - zmq-tx-port: - type: number - name: ZeroMQ Transaction Port - description: The port that your Bitcoin Core ZeroMQ server is bound to for raw transactions - nullable: false - range: "[0,65535]" - integral: true - default: 28333 - quick-connect: - quick-connect-url: - type: string - name: Quick Connect URL - description: | - The Quick Connect URL for your Bitcoin Core RPC server - NOTE: LND will not accept a .onion url for this option - nullable: false - pattern: 'btcstandup://[^:]*:[^@]*@[a-zA-Z0-9.-]+:[0-9]+(/(\?(label=.+)?)?)?' - zmq-block-port: - type: number - name: ZeroMQ Block Port - description: The port that your Bitcoin Core ZeroMQ server is bound to for raw blocks - nullable: false - range: "[0,65535]" - integral: true - default: 28332 - zmq-tx-port: - type: number - name: ZeroMQ Transaction Port - description: The port that your Bitcoin Core ZeroMQ server is bound to for raw transactions - nullable: false - range: "[0,65535]" - integral: true - default: 28333 -autopilot: - type: object - name: Autopilot - description: Autopilot Settings - nullable: false - spec: - enabled: - type: boolean - name: Enabled - description: | - If the autopilot agent should be active or not. The autopilot agent will - attempt to AUTOMATICALLY OPEN CHANNELS to put your node in an advantageous - position within the network graph. DO NOT ENABLE THIS IF YOU WANT TO MANAGE - CHANNELS MANUALLY OR DO NOT UNDERSTAND IT. - default: false - private: - type: boolean - name: Private - description: | - Whether the channels created by the autopilot agent should be private or not. - Private channels won't be announced to the network. - default: false - maxchannels: - type: number - name: Maximum Channels - description: The maximum number of channels that should be created. - nullable: false - range: "[1,*)" - integral: true - default: 5 - allocation: - type: number - name: Allocation - description: | - The fraction of total funds that should be committed to automatic channel - establishment. For example 60% means that 60% of the total funds available - within the wallet should be used to automatically establish channels. The total - amount of attempted channels will still respect the "Maximum Channels" parameter. - nullable: false - range: "[0,100]" - integral: false - default: 60 - units: "%" - min-channel-size: - type: number - name: Minimum Channel Size - description: The smallest channel that the autopilot agent should create. - nullable: false - range: "[0,*)" - integral: true - default: 20000 - units: "satoshis" - max-channel-size: - type: number - name: Maximum Channel Size - description: The largest channel that the autopilot agent should create. - nullable: false - range: "[0,*)" - integral: true - default: 16777215 - units: "satoshis" - advanced: - type: object - name: Advanced - description: Advanced Options - nullable: false - spec: - min-confirmations: - type: number - name: Minimum Confirmations - description: | - The minimum number of confirmations each of your inputs in funding transactions - created by the autopilot agent must have. - nullable: false - range: "[0,*)" - integral: true - default: 1 - units: blocks - confirmation-target: - type: number - name: Confirmation Target - description: The confirmation target (in blocks) for channels opened by autopilot. - nullable: false - range: "[0,*)" - integral: true - default: 1 - units: blocks -advanced: - type: object - name: Advanced - description: Advanced Options - nullable: false - spec: - debug-level: - type: enum - name: Log Verbosity - values: - - trace - - debug - - info - - warn - - error - - critical - description: | - Sets the level of log filtration. Trace is the most verbose, Critical is the least. - default: info - db-bolt-no-freelist-sync: - type: boolean - name: Disallow Bolt DB Freelist Sync - description: | - If true, prevents the database from syncing its freelist to disk. - default: false - db-bolt-auto-compact: - type: boolean - name: Compact Database on Startup - description: | - Performs database compaction on startup. This is necessary to keep disk usage down over time at the cost of - having longer startup times. - default: true - db-bolt-auto-compact-min-age: - type: number - name: Minimum Autocompaction Age for Bolt DB - description: | - How long ago (in hours) the last compaction of a database file must be for it to be considered for auto - compaction again. Can be set to 0 to compact on every startup. - nullable: false - range: "[0, *)" - integral: true - default: 168 - units: hours - db-bolt-db-timeout: - type: number - name: Bolt DB Timeout - description: How long should LND try to open the database before giving up? - nullable: false - range: "[1, 86400]" - integral: true - default: 60 - units: seconds - recovery-window: - type: number - name: Recovery Window - description: Number of blocks in the past that LND should scan for unknown transactions - nullable: true - range: "[1,*)" - integral: true - units: "blocks" - payments-expiration-grace-period: - type: number - name: Payments Expiration Grace Period - description: | - A period to wait before for closing channels with outgoing htlcs that have timed out and are a result of this - nodes instead payment. In addition to our current block based deadline, is specified this grace period will - also be taken into account. - nullable: false - range: "[1,*)" - integral: true - default: 30 - units: "seconds" - default-remote-max-htlcs: - type: number - name: Maximum Remote HTLCs - description: | - The default max_htlc applied when opening or accepting channels. This value limits the number of concurrent - HTLCs that the remote party can add to the commitment. The maximum possible value is 483. - nullable: false - range: "[1,483]" - integral: true - default: 483 - units: htlcs - max-channel-fee-allocation: - type: number - name: Maximum Channel Fee Allocation - description: | - The maximum percentage of total funds that can be allocated to a channel's commitment fee. This only applies for - the initiator of the channel. - nullable: false - range: "[0.1, 1]" - integral: false - default: 0.5 - max-commit-fee-rate-anchors: - type: number - name: Maximum Commitment Fee for Anchor Channels - description: | - The maximum fee rate in sat/vbyte that will be used for commitments of channels of the anchors type. Must be - large enough to ensure transaction propagation. - nullable: false - range: "[1,*)" - integral: true - default: 10 - protocol-wumbo-channels: - type: boolean - name: Enable Wumbo Channels - description: | - If set, then lnd will create and accept requests for channels larger than 0.16 BTC - nullable: false - default: false - protocol-no-anchors: - type: boolean - name: Disable Anchor Channels - description: | - Set to disable support for anchor commitments. Anchor channels allow you to determine your fees at close time by - using a Child Pays For Parent transaction. - nullable: false - default: false - protocol-disable-script-enforced-lease: - type: boolean - name: Disable Script Enforced Channel Leases - description: >- - Set to disable support for script enforced lease channel commitments. If not - set, lnd will accept these channels by default if the remote channel party - proposes them. Note that lnd will require 1 UTXO to be reserved for this - channel type if it is enabled. - - Note: This may cause you to be unable to close a channel and your wallets may not understand why - nullable: false - default: false - gc-canceled-invoices-on-startup: - type: boolean - name: Cleanup Canceled Invoices on Startup - description: | - If true, LND will attempt to garbage collect canceled invoices upon start. - nullable: false - default: false - bitcoin: - type: object - name: Bitcoin Channel Configuration - description: Configuration options for lightning network channel management operating over the Bitcoin network - nullable: false - spec: - default-channel-confirmations: - type: number - name: Default Channel Confirmations - description: | - The default number of confirmations a channel must have before it's considered - open. LND will require any incoming channel requests to wait this many - confirmations before it considers the channel active. - nullable: false - range: "[1,6]" - integral: true - default: 3 - units: "blocks" - min-htlc: - type: number - name: Minimum Incoming HTLC Size - description: | - The smallest HTLC LND will to accept on your channels, in millisatoshis. - nullable: false - range: "[1,*)" - integral: true - default: 1 - units: "millisatoshis" - min-htlc-out: - type: number - name: Minimum Outgoing HTLC Size - description: | - The smallest HTLC LND will send out on your channels, in millisatoshis. - nullable: false - range: "[1,*)" - integral: true - default: 1000 - units: "millisatoshis" - base-fee: - type: number - name: Routing Base Fee - description: | - The base fee in millisatoshi you will charge for forwarding payments on your - channels. - nullable: false - range: "[0,*)" - integral: true - default: 1000 - units: "millisatoshi" - fee-rate: - type: number - name: Routing Fee Rate - description: | - The fee rate used when forwarding payments on your channels. The total fee - charged is the Base Fee + (amount * Fee Rate / 1000000), where amount is the - forwarded amount. Measured in sats per million - nullable: false - range: "[1,1000000)" - integral: true - default: 1 - units: "sats per million" - time-lock-delta: - type: number - name: Time Lock Delta - description: The CLTV delta we will subtract from a forwarded HTLC's timelock value. - nullable: false - range: "[6, 144]" - integral: true - default: 40 - units: "blocks" diff --git a/core/startos/test/config-spec/lnd-missing-pattern.yaml b/core/startos/test/config-spec/lnd-missing-pattern.yaml deleted file mode 100644 index dce276b0c..000000000 --- a/core/startos/test/config-spec/lnd-missing-pattern.yaml +++ /dev/null @@ -1,545 +0,0 @@ -control-tor-address: - name: Control Tor Address - description: The Tor address for the control interface. - type: pointer - subtype: package - package-id: lnd - target: tor-address - interface: control -peer-tor-address: - name: Peer Tor Address - description: The Tor address for the peer interface. - type: pointer - subtype: package - package-id: lnd - target: tor-address - interface: peer -watchtower-tor-address: - name: Watchtower Tor Address - description: The Tor address for the watchtower interface. - type: pointer - subtype: package - package-id: lnd - target: tor-address - interface: watchtower -alias: - type: string - name: Alias - description: The public, human-readable name of your Lightning node - nullable: true - pattern: ".{1,32}" - pattern-description: Must be at least 1 character and no more than 32 characters -color: - type: string - name: Color - description: The public color dot of your Lightning node - nullable: false - pattern: "[0-9a-fA-F]{6" - pattern-description: | - Must be a valid 6 digit hexadecimal RGB value. The first two digits are red, middle two are green, and final two are - blue - default: - charset: "a-f,0-9" - len: 6 -accept-keysend: - type: boolean - name: Accept Keysend - description: | - Allow others to send payments directly to your public key through keysend instead of having to get a new invoice - default: false -accept-amp: - type: boolean - name: Accept Spontaneous AMPs - description: | - If enabled, spontaneous payments through AMP will be accepted. Payments to AMP - invoices will be accepted regardless of this setting. - default: false -reject-htlc: - type: boolean - name: Reject Routing Requests - description: | - If true, LND will not forward any HTLCs that are meant as onward payments. This option will still allow LND to send - HTLCs and receive HTLCs but lnd won't be used as a hop. - default: false -min-chan-size: - type: number - name: Minimum Channel Size - description: | - The smallest channel size that we should accept. Incoming channels smaller than this will be rejected. - nullable: true - range: "[1,16777215]" - integral: true - units: satoshis -max-chan-size: - type: number - name: Maximum Channel Size - description: | - The largest channel size that we should accept. Incoming channels larger than this will be rejected. - For non-Wumbo channels this limit remains 16777215 satoshis by default as specified in BOLT-0002. For wumbo - channels this limit is 1,000,000,000 satoshis (10 BTC). Set this config option explicitly to restrict your maximum - channel size to better align with your risk tolerance. Don't forget to enable Wumbo channels under 'Advanced,' if desired. - nullable: true - range: "[1,1000000000]" - integral: true - units: satoshis -tor: - type: object - name: Tor Config - nullable: false - spec: - use-tor-only: - type: boolean - name: Use Tor for all traffic - description: >- - Use the tor proxy even for connections that are reachable on clearnet. This will hide your node's public IP - address, but will slow down your node's performance - nullable: false - default: false - stream-isolation: - type: boolean - name: Stream Isolation - description: >- - Enable Tor stream isolation by randomizing user credentials for each - connection. With this mode active, each connection will use a new circuit. - This means that multiple applications (other than lnd) using Tor won't be mixed - in with lnd's traffic. - - This option may not be used when 'Use Tor for all traffic' is disabled, since direct - connections compromise source IP privacy by default. - nullable: false - default: false -bitcoind: - type: union - name: Bitcoin Core - description: | - The Bitcoin Core node to connect to: - - internal: The Bitcoin Core and Proxy services installed to your Embassy - - external: An unpruned Bitcoin Core node running on a different device - tag: - id: type - name: Type - variant-names: - internal: Internal (Bitcoin Core) - internal-proxy: Internal (Bitcoin Proxy) - external: External - description: | - The Bitcoin Core node to connect to: - - internal: The Bitcoin Core and Proxy services installed to your Embassy - - external: An unpruned Bitcoin Core node running on a different device - default: internal - variants: - internal: - user: - type: pointer - name: RPC Username - description: The username for Bitcoin Core's RPC interface - subtype: package - package-id: bitcoind - target: config - multi: false - selector: "$.rpc.username" - password: - type: pointer - name: RPC Password - description: The password for Bitcoin Core's RPC interface - subtype: package - package-id: bitcoind - target: config - multi: false - selector: "$.rpc.password" - internal-proxy: - user: - type: pointer - name: RPC Username - description: The username for the RPC user allocated to lnd - subtype: package - package-id: btc-rpc-proxy - target: config - multi: false - selector: '$.users[?(@.name == "lnd")].name' - # index: 'users.[first(item => ''item.name = "lnd")].name' - password: - type: pointer - name: RPC Password - description: The password for the RPC user allocated to lnd - subtype: package - package-id: btc-rpc-proxy - target: config - multi: false - selector: '$.users[?(@.name == "lnd")].password' - # index: 'users.[first(item => ''item.name = "lnd")].password' - external: - connection-settings: - type: union - name: Connection Settings - description: Information to connect to an external unpruned Bitcoin Core node - tag: - id: type - name: Type - description: | - - Manual: Raw information for finding a Bitcoin Core node - - Quick Connect: A Quick Connect URL for a Bitcoin Core node - variant-names: - manual: Manual - quick-connect: Quick Connect - default: quick-connect - variants: - manual: - host: - type: string - name: Public Address - description: The public address of your Bitcoin Core server - nullable: false - rpc-user: - type: string - name: RPC Username - description: The username for the RPC user on your Bitcoin Core RPC server - nullable: false - rpc-password: - type: string - name: RPC Password - description: The password for the RPC user on your Bitcoin Core RPC server - nullable: false - rpc-port: - type: number - name: RPC Port - description: The port that your Bitcoin Core RPC server is bound to - nullable: false - range: "[0,65535]" - integral: true - default: 8332 - zmq-block-port: - type: number - name: ZeroMQ Block Port - description: The port that your Bitcoin Core ZeroMQ server is bound to for raw blocks - nullable: false - range: "[0,65535]" - integral: true - default: 28332 - zmq-tx-port: - type: number - name: ZeroMQ Transaction Port - description: The port that your Bitcoin Core ZeroMQ server is bound to for raw transactions - nullable: false - range: "[0,65535]" - integral: true - default: 28333 - quick-connect: - quick-connect-url: - type: string - name: Quick Connect URL - description: | - The Quick Connect URL for your Bitcoin Core RPC server - NOTE: LND will not accept a .onion url for this option - nullable: false - pattern-description: Must be a valid Quick Connect URL. For help, check out https://github.com/BlockchainCommons/Gordian/blob/master/Docs/Quick-Connect-API.md - zmq-block-port: - type: number - name: ZeroMQ Block Port - description: The port that your Bitcoin Core ZeroMQ server is bound to for raw blocks - nullable: false - range: "[0,65535]" - integral: true - default: 28332 - zmq-tx-port: - type: number - name: ZeroMQ Transaction Port - description: The port that your Bitcoin Core ZeroMQ server is bound to for raw transactions - nullable: false - range: "[0,65535]" - integral: true - default: 28333 -autopilot: - type: object - name: Autopilot - description: Autopilot Settings - nullable: false - spec: - enabled: - type: boolean - name: Enabled - description: | - If the autopilot agent should be active or not. The autopilot agent will - attempt to AUTOMATICALLY OPEN CHANNELS to put your node in an advantageous - position within the network graph. DO NOT ENABLE THIS IF YOU WANT TO MANAGE - CHANNELS MANUALLY OR DO NOT UNDERSTAND IT. - default: false - private: - type: boolean - name: Private - description: | - Whether the channels created by the autopilot agent should be private or not. - Private channels won't be announced to the network. - default: false - maxchannels: - type: number - name: Maximum Channels - description: The maximum number of channels that should be created. - nullable: false - range: "[1,*)" - integral: true - default: 5 - allocation: - type: number - name: Allocation - description: | - The fraction of total funds that should be committed to automatic channel - establishment. For example 60% means that 60% of the total funds available - within the wallet should be used to automatically establish channels. The total - amount of attempted channels will still respect the "Maximum Channels" parameter. - nullable: false - range: "[0,100]" - integral: false - default: 60 - units: "%" - min-channel-size: - type: number - name: Minimum Channel Size - description: The smallest channel that the autopilot agent should create. - nullable: false - range: "[0,*)" - integral: true - default: 20000 - units: "satoshis" - max-channel-size: - type: number - name: Maximum Channel Size - description: The largest channel that the autopilot agent should create. - nullable: false - range: "[0,*)" - integral: true - default: 16777215 - units: "satoshis" - advanced: - type: object - name: Advanced - description: Advanced Options - nullable: false - spec: - min-confirmations: - type: number - name: Minimum Confirmations - description: | - The minimum number of confirmations each of your inputs in funding transactions - created by the autopilot agent must have. - nullable: false - range: "[0,*)" - integral: true - default: 1 - units: blocks - confirmation-target: - type: number - name: Confirmation Target - description: The confirmation target (in blocks) for channels opened by autopilot. - nullable: false - range: "[0,*)" - integral: true - default: 1 - units: blocks -advanced: - type: object - name: Advanced - description: Advanced Options - nullable: false - spec: - debug-level: - type: enum - name: Log Verbosity - values: - - trace - - debug - - info - - warn - - error - - critical - description: | - Sets the level of log filtration. Trace is the most verbose, Critical is the least. - default: info - db-bolt-no-freelist-sync: - type: boolean - name: Disallow Bolt DB Freelist Sync - description: | - If true, prevents the database from syncing its freelist to disk. - default: false - db-bolt-auto-compact: - type: boolean - name: Compact Database on Startup - description: | - Performs database compaction on startup. This is necessary to keep disk usage down over time at the cost of - having longer startup times. - default: true - db-bolt-auto-compact-min-age: - type: number - name: Minimum Autocompaction Age for Bolt DB - description: | - How long ago (in hours) the last compaction of a database file must be for it to be considered for auto - compaction again. Can be set to 0 to compact on every startup. - nullable: false - range: "[0, *)" - integral: true - default: 168 - units: hours - db-bolt-db-timeout: - type: number - name: Bolt DB Timeout - description: How long should LND try to open the database before giving up? - nullable: false - range: "[1, 86400]" - integral: true - default: 60 - units: seconds - recovery-window: - type: number - name: Recovery Window - description: Number of blocks in the past that LND should scan for unknown transactions - nullable: true - range: "[1,*)" - integral: true - units: "blocks" - payments-expiration-grace-period: - type: number - name: Payments Expiration Grace Period - description: | - A period to wait before for closing channels with outgoing htlcs that have timed out and are a result of this - nodes instead payment. In addition to our current block based deadline, is specified this grace period will - also be taken into account. - nullable: false - range: "[1,*)" - integral: true - default: 30 - units: "seconds" - default-remote-max-htlcs: - type: number - name: Maximum Remote HTLCs - description: | - The default max_htlc applied when opening or accepting channels. This value limits the number of concurrent - HTLCs that the remote party can add to the commitment. The maximum possible value is 483. - nullable: false - range: "[1,483]" - integral: true - default: 483 - units: htlcs - max-channel-fee-allocation: - type: number - name: Maximum Channel Fee Allocation - description: | - The maximum percentage of total funds that can be allocated to a channel's commitment fee. This only applies for - the initiator of the channel. - nullable: false - range: "[0.1, 1]" - integral: false - default: 0.5 - max-commit-fee-rate-anchors: - type: number - name: Maximum Commitment Fee for Anchor Channels - description: | - The maximum fee rate in sat/vbyte that will be used for commitments of channels of the anchors type. Must be - large enough to ensure transaction propagation. - nullable: false - range: "[1,*)" - integral: true - default: 10 - protocol-wumbo-channels: - type: boolean - name: Enable Wumbo Channels - description: | - If set, then lnd will create and accept requests for channels larger than 0.16 BTC - nullable: false - default: false - protocol-no-anchors: - type: boolean - name: Disable Anchor Channels - description: | - Set to disable support for anchor commitments. Anchor channels allow you to determine your fees at close time by - using a Child Pays For Parent transaction. - nullable: false - default: false - protocol-disable-script-enforced-lease: - type: boolean - name: Disable Script Enforced Channel Leases - description: >- - Set to disable support for script enforced lease channel commitments. If not - set, lnd will accept these channels by default if the remote channel party - proposes them. Note that lnd will require 1 UTXO to be reserved for this - channel type if it is enabled. - - Note: This may cause you to be unable to close a channel and your wallets may not understand why - nullable: false - default: false - gc-canceled-invoices-on-startup: - type: boolean - name: Cleanup Canceled Invoices on Startup - description: | - If true, LND will attempt to garbage collect canceled invoices upon start. - nullable: false - default: false - bitcoin: - type: object - name: Bitcoin Channel Configuration - description: Configuration options for lightning network channel management operating over the Bitcoin network - nullable: false - spec: - default-channel-confirmations: - type: number - name: Default Channel Confirmations - description: | - The default number of confirmations a channel must have before it's considered - open. LND will require any incoming channel requests to wait this many - confirmations before it considers the channel active. - nullable: false - range: "[1,6]" - integral: true - default: 3 - units: "blocks" - min-htlc: - type: number - name: Minimum Incoming HTLC Size - description: | - The smallest HTLC LND will to accept on your channels, in millisatoshis. - nullable: false - range: "[1,*)" - integral: true - default: 1 - units: "millisatoshis" - min-htlc-out: - type: number - name: Minimum Outgoing HTLC Size - description: | - The smallest HTLC LND will send out on your channels, in millisatoshis. - nullable: false - range: "[1,*)" - integral: true - default: 1000 - units: "millisatoshis" - base-fee: - type: number - name: Routing Base Fee - description: | - The base fee in millisatoshi you will charge for forwarding payments on your - channels. - nullable: false - range: "[0,*)" - integral: true - default: 1000 - units: "millisatoshi" - fee-rate: - type: number - name: Routing Fee Rate - description: | - The fee rate used when forwarding payments on your channels. The total fee - charged is the Base Fee + (amount * Fee Rate / 1000000), where amount is the - forwarded amount. Measured in sats per million - nullable: false - range: "[1,1000000)" - integral: true - default: 1 - units: "sats per million" - time-lock-delta: - type: number - name: Time Lock Delta - description: The CLTV delta we will subtract from a forwarded HTLC's timelock value. - nullable: false - range: "[6, 144]" - integral: true - default: 40 - units: "blocks" diff --git a/core/startos/test/js_action_execute/package-data/scripts/test-package/0.3.0.3/embassy.js b/core/startos/test/js_action_execute/package-data/scripts/test-package/0.3.0.3/embassy.js deleted file mode 100644 index 86565053e..000000000 --- a/core/startos/test/js_action_execute/package-data/scripts/test-package/0.3.0.3/embassy.js +++ /dev/null @@ -1,1054 +0,0 @@ -export function properties() { - return "Anything here"; -} - -export async function getConfig(effects) { - try { - await effects.writeFile({ - path: "../test.log", - toWrite: "This is a test", - volumeId: "main", - }); - throw new Error( - "Expecting that the ../test.log should not be a valid path since we are breaking out of the parent" - ); - } catch (e) {} - try { - await effects.writeFile({ - path: "./hack_back/broken.log", - toWrite: "This is a test", - volumeId: "main", - }); - throw new Error( - "Expecting that using a symlink to break out of parent still fails for writing" - ); - } catch (e) {} - try { - await effects.createDir({ - path: "./hack_back/broken_dir", - volumeId: "main", - }); - throw new Error( - "Expecting that using a symlink to break out of parent still fails for writing dir" - ); - } catch (e) {} - try { - await effects.readFile({ - path: "./hack_back/data/bad_file.txt", - volumeId: "main", - }); - throw new Error( - "Expecting that using a symlink to break out of parent still fails for reading" - ); - } catch (e) {} - - // Testing dir, create + delete - await effects.createDir({ - path: "./testing", - volumeId: "main", - }); - await effects.writeJsonFile({ - path: "./testing/test2.log", - toWrite: { value: "This is a test" }, - volumeId: "main", - }); - - ( - await effects.readJsonFile({ - path: "./testing/test2.log", - volumeId: "main", - // @ts-ignore - }) - ).value; - - await effects.removeFile({ - path: "./testing/test2.log", - volumeId: "main", - }); - await effects.removeDir({ - path: "./testing", - volumeId: "main", - }); - - // Testing reading + writing - await effects.writeFile({ - path: "./test.log", - toWrite: "This is a test", - volumeId: "main", - }); - - effects.debug( - `Read results are ${await effects.readFile({ - path: "./test.log", - volumeId: "main", - })}` - ); - // Testing loging - effects.trace("trace"); - effects.debug("debug"); - effects.warn("warn"); - effects.error("error"); - effects.info("info"); - - { - const metadata = await effects.metadata({ - path: "./test.log", - volumeId: "main", - }); - - if (typeof metadata.fileType !== "string") { - throw new TypeError("File type is not a string"); - } - if (typeof metadata.isDir !== "boolean") { - throw new TypeError("isDir is not a boolean"); - } - if (typeof metadata.isFile !== "boolean") { - throw new TypeError("isFile is not a boolean"); - } - if (typeof metadata.isSymlink !== "boolean") { - throw new TypeError("isSymlink is not a boolean"); - } - if (typeof metadata.len !== "number") { - throw new TypeError("len is not a number"); - } - if (typeof metadata.gid !== "number") { - throw new TypeError("gid is not a number"); - } - if (typeof metadata.uid !== "number") { - throw new TypeError("uid is not a number"); - } - if (typeof metadata.mode !== "number") { - throw new TypeError("mode is not a number"); - } - if (!(metadata.modified instanceof Date)) { - throw new TypeError("modified is not a Date"); - } - if (!(metadata.accessed instanceof Date)) { - throw new TypeError("accessed is not a Date"); - } - if (!(metadata.created instanceof Date)) { - throw new TypeError("created is not a Date"); - } - if (typeof metadata.readonly !== "boolean") { - throw new TypeError("readonly is not a boolean"); - } - effects.error(JSON.stringify(metadata)); - } - return { - result: { - spec: { - "control-tor-address": { - name: "Control Tor Address", - description: "The Tor address for the control interface.", - type: "pointer", - subtype: "package", - "package-id": "lnd", - target: "tor-address", - interface: "control", - }, - "peer-tor-address": { - name: "Peer Tor Address", - description: "The Tor address for the peer interface.", - type: "pointer", - subtype: "package", - "package-id": "lnd", - target: "tor-address", - interface: "peer", - }, - "watchtower-tor-address": { - name: "Watchtower Tor Address", - description: "The Tor address for the watchtower interface.", - type: "pointer", - subtype: "package", - "package-id": "lnd", - target: "tor-address", - interface: "watchtower", - }, - alias: { - type: "string", - name: "Alias", - description: "The public, human-readable name of your Lightning node", - nullable: true, - pattern: ".{1,32}", - "pattern-description": - "Must be at least 1 character and no more than 32 characters", - }, - color: { - type: "string", - name: "Color", - description: "The public color dot of your Lightning node", - nullable: false, - pattern: "[0-9a-fA-F]{6}", - "pattern-description": - "Must be a valid 6 digit hexadecimal RGB value. The first two digits are red, middle two are green, and final two are\nblue\n", - default: { - charset: "a-f,0-9", - len: 6, - }, - }, - "accept-keysend": { - type: "boolean", - name: "Accept Keysend", - description: - "Allow others to send payments directly to your public key through keysend instead of having to get a new invoice\n", - default: false, - }, - "accept-amp": { - type: "boolean", - name: "Accept Spontaneous AMPs", - description: - "If enabled, spontaneous payments through AMP will be accepted. Payments to AMP\ninvoices will be accepted regardless of this setting.\n", - default: false, - }, - "reject-htlc": { - type: "boolean", - name: "Reject Routing Requests", - description: - "If true, LND will not forward any HTLCs that are meant as onward payments. This option will still allow LND to send\nHTLCs and receive HTLCs but lnd won't be used as a hop.\n", - default: false, - }, - "min-chan-size": { - type: "number", - name: "Minimum Channel Size", - description: - "The smallest channel size that we should accept. Incoming channels smaller than this will be rejected.\n", - nullable: true, - range: "[1,16777215]", - integral: true, - units: "satoshis", - }, - "max-chan-size": { - type: "number", - name: "Maximum Channel Size", - description: - "The largest channel size that we should accept. Incoming channels larger than this will be rejected.\nFor non-Wumbo channels this limit remains 16777215 satoshis by default as specified in BOLT-0002. For wumbo\nchannels this limit is 1,000,000,000 satoshis (10 BTC). Set this config option explicitly to restrict your maximum\nchannel size to better align with your risk tolerance. Don't forget to enable Wumbo channels under 'Advanced,' if desired.\n", - nullable: true, - range: "[1,1000000000]", - integral: true, - units: "satoshis", - }, - tor: { - type: "object", - name: "Tor Config", - spec: { - "use-tor-only": { - type: "boolean", - name: "Use Tor for all traffic", - description: - "Use the tor proxy even for connections that are reachable on clearnet. This will hide your node's public IP address, but will slow down your node's performance", - default: false, - }, - "stream-isolation": { - type: "boolean", - name: "Stream Isolation", - description: - "Enable Tor stream isolation by randomizing user credentials for each connection. With this mode active, each connection will use a new circuit. This means that multiple applications (other than lnd) using Tor won't be mixed in with lnd's traffic.\nThis option may not be used when 'Use Tor for all traffic' is disabled, since direct connections compromise source IP privacy by default.", - default: false, - }, - }, - }, - bitcoind: { - type: "union", - name: "Bitcoin Core", - description: - "The Bitcoin Core node to connect to:\n - internal: The Bitcoin Core and Proxy services installed to your Embassy\n - external: An unpruned Bitcoin Core node running on a different device\n", - tag: { - id: "type", - name: "Type", - "variant-names": { - internal: "Internal (Bitcoin Core)", - "internal-proxy": "Internal (Bitcoin Proxy)", - external: "External", - }, - description: - "The Bitcoin Core node to connect to:\n - internal: The Bitcoin Core and Proxy services installed to your Embassy\n - external: An unpruned Bitcoin Core node running on a different device\n", - }, - default: "internal", - variants: { - internal: { - user: { - type: "pointer", - name: "RPC Username", - description: "The username for Bitcoin Core's RPC interface", - subtype: "package", - "package-id": "bitcoind", - target: "config", - multi: false, - selector: "$.rpc.username", - }, - password: { - type: "pointer", - name: "RPC Password", - description: "The password for Bitcoin Core's RPC interface", - subtype: "package", - "package-id": "bitcoind", - target: "config", - multi: false, - selector: "$.rpc.password", - }, - }, - "internal-proxy": { - user: { - type: "pointer", - name: "RPC Username", - description: "The username for the RPC user allocated to lnd", - subtype: "package", - "package-id": "btc-rpc-proxy", - target: "config", - multi: false, - selector: '$.users[?(@.name == "lnd")].name', - }, - password: { - type: "pointer", - name: "RPC Password", - description: "The password for the RPC user allocated to lnd", - subtype: "package", - "package-id": "btc-rpc-proxy", - target: "config", - multi: false, - selector: '$.users[?(@.name == "lnd")].password', - }, - }, - external: { - "connection-settings": { - type: "union", - name: "Connection Settings", - description: - "Information to connect to an external unpruned Bitcoin Core node", - tag: { - id: "type", - name: "Type", - description: - "- Manual: Raw information for finding a Bitcoin Core node\n- Quick Connect: A Quick Connect URL for a Bitcoin Core node\n", - "variant-names": { - manual: "Manual", - "quick-connect": "Quick Connect", - }, - }, - default: "quick-connect", - variants: { - manual: { - host: { - type: "string", - name: "Public Address", - description: - "The public address of your Bitcoin Core server", - nullable: false, - }, - "rpc-user": { - type: "string", - name: "RPC Username", - description: - "The username for the RPC user on your Bitcoin Core RPC server", - nullable: false, - }, - "rpc-password": { - type: "string", - name: "RPC Password", - description: - "The password for the RPC user on your Bitcoin Core RPC server", - nullable: false, - }, - "rpc-port": { - type: "number", - name: "RPC Port", - description: - "The port that your Bitcoin Core RPC server is bound to", - nullable: false, - range: "[0,65535]", - integral: true, - default: 8332, - }, - "zmq-block-port": { - type: "number", - name: "ZeroMQ Block Port", - description: - "The port that your Bitcoin Core ZeroMQ server is bound to for raw blocks", - nullable: false, - range: "[0,65535]", - integral: true, - default: 28332, - }, - "zmq-tx-port": { - type: "number", - name: "ZeroMQ Transaction Port", - description: - "The port that your Bitcoin Core ZeroMQ server is bound to for raw transactions", - nullable: false, - range: "[0,65535]", - integral: true, - default: 28333, - }, - }, - "quick-connect": { - "quick-connect-url": { - type: "string", - name: "Quick Connect URL", - description: - "The Quick Connect URL for your Bitcoin Core RPC server\nNOTE: LND will not accept a .onion url for this option\n", - nullable: false, - pattern: - "btcstandup://[^:]*:[^@]*@[a-zA-Z0-9.-]+:[0-9]+(/(\\?(label=.+)?)?)?", - "pattern-description": - "Must be a valid Quick Connect URL. For help, check out https://github.com/BlockchainCommons/Gordian/blob/master/Docs/Quick-Connect-API.md", - }, - "zmq-block-port": { - type: "number", - name: "ZeroMQ Block Port", - description: - "The port that your Bitcoin Core ZeroMQ server is bound to for raw blocks", - nullable: false, - range: "[0,65535]", - integral: true, - default: 28332, - }, - "zmq-tx-port": { - type: "number", - name: "ZeroMQ Transaction Port", - description: - "The port that your Bitcoin Core ZeroMQ server is bound to for raw transactions", - nullable: false, - range: "[0,65535]", - integral: true, - default: 28333, - }, - }, - }, - }, - }, - }, - }, - autopilot: { - type: "object", - name: "Autopilot", - description: "Autopilot Settings", - spec: { - enabled: { - type: "boolean", - name: "Enabled", - description: - "If the autopilot agent should be active or not. The autopilot agent will\nattempt to AUTOMATICALLY OPEN CHANNELS to put your node in an advantageous\nposition within the network graph. DO NOT ENABLE THIS IF YOU WANT TO MANAGE \nCHANNELS MANUALLY OR DO NOT UNDERSTAND IT.\n", - default: false, - }, - private: { - type: "boolean", - name: "Private", - description: - "Whether the channels created by the autopilot agent should be private or not.\nPrivate channels won't be announced to the network.\n", - default: false, - }, - maxchannels: { - type: "number", - name: "Maximum Channels", - description: - "The maximum number of channels that should be created.", - nullable: false, - range: "[1,*)", - integral: true, - default: 5, - }, - allocation: { - type: "number", - name: "Allocation", - description: - 'The fraction of total funds that should be committed to automatic channel\nestablishment. For example 60% means that 60% of the total funds available\nwithin the wallet should be used to automatically establish channels. The total\namount of attempted channels will still respect the "Maximum Channels" parameter.\n', - nullable: false, - range: "[0,100]", - integral: false, - default: 60, - units: "%", - }, - "min-channel-size": { - type: "number", - name: "Minimum Channel Size", - description: - "The smallest channel that the autopilot agent should create.", - nullable: false, - range: "[0,*)", - integral: true, - default: 20000, - units: "satoshis", - }, - "max-channel-size": { - type: "number", - name: "Maximum Channel Size", - description: - "The largest channel that the autopilot agent should create.", - nullable: false, - range: "[0,*)", - integral: true, - default: 16777215, - units: "satoshis", - }, - advanced: { - type: "object", - name: "Advanced", - description: "Advanced Options", - spec: { - "min-confirmations": { - type: "number", - name: "Minimum Confirmations", - description: - "The minimum number of confirmations each of your inputs in funding transactions\ncreated by the autopilot agent must have.\n", - nullable: false, - range: "[0,*)", - integral: true, - default: 1, - units: "blocks", - }, - "confirmation-target": { - type: "number", - name: "Confirmation Target", - description: - "The confirmation target (in blocks) for channels opened by autopilot.", - nullable: false, - range: "[0,*)", - integral: true, - default: 1, - units: "blocks", - }, - }, - }, - }, - }, - advanced: { - type: "object", - name: "Advanced", - description: "Advanced Options", - spec: { - "debug-level": { - type: "enum", - name: "Log Verbosity", - values: ["trace", "debug", "info", "warn", "error", "critical"], - description: - "Sets the level of log filtration. Trace is the most verbose, Critical is the least.\n", - default: "info", - "value-names": {}, - }, - "db-bolt-no-freelist-sync": { - type: "boolean", - name: "Disallow Bolt DB Freelist Sync", - description: - "If true, prevents the database from syncing its freelist to disk.\n", - default: false, - }, - "db-bolt-auto-compact": { - type: "boolean", - name: "Compact Database on Startup", - description: - "Performs database compaction on startup. This is necessary to keep disk usage down over time at the cost of\nhaving longer startup times.\n", - default: true, - }, - "db-bolt-auto-compact-min-age": { - type: "number", - name: "Minimum Autocompaction Age for Bolt DB", - description: - "How long ago (in hours) the last compaction of a database file must be for it to be considered for auto\ncompaction again. Can be set to 0 to compact on every startup.\n", - nullable: false, - range: "[0, *)", - integral: true, - default: 168, - units: "hours", - }, - "db-bolt-db-timeout": { - type: "number", - name: "Bolt DB Timeout", - description: - "How long should LND try to open the database before giving up?", - nullable: false, - range: "[1, 86400]", - integral: true, - default: 60, - units: "seconds", - }, - "recovery-window": { - type: "number", - name: "Recovery Window", - description: - "Number of blocks in the past that LND should scan for unknown transactions", - nullable: true, - range: "[1,*)", - integral: true, - units: "blocks", - }, - "payments-expiration-grace-period": { - type: "number", - name: "Payments Expiration Grace Period", - description: - "A period to wait before for closing channels with outgoing htlcs that have timed out and are a result of this\nnodes instead payment. In addition to our current block based deadline, is specified this grace period will\nalso be taken into account.\n", - nullable: false, - range: "[1,*)", - integral: true, - default: 30, - units: "seconds", - }, - "default-remote-max-htlcs": { - type: "number", - name: "Maximum Remote HTLCs", - description: - "The default max_htlc applied when opening or accepting channels. This value limits the number of concurrent\nHTLCs that the remote party can add to the commitment. The maximum possible value is 483.\n", - nullable: false, - range: "[1,483]", - integral: true, - default: 483, - units: "htlcs", - }, - "max-channel-fee-allocation": { - type: "number", - name: "Maximum Channel Fee Allocation", - description: - "The maximum percentage of total funds that can be allocated to a channel's commitment fee. This only applies for\nthe initiator of the channel.\n", - nullable: false, - range: "[0.1, 1]", - integral: false, - default: 0.5, - }, - "max-commit-fee-rate-anchors": { - type: "number", - name: "Maximum Commitment Fee for Anchor Channels", - description: - "The maximum fee rate in sat/vbyte that will be used for commitments of channels of the anchors type. Must be\nlarge enough to ensure transaction propagation.\n", - nullable: false, - range: "[1,*)", - integral: true, - default: 10, - }, - "protocol-wumbo-channels": { - type: "boolean", - name: "Enable Wumbo Channels", - description: - "If set, then lnd will create and accept requests for channels larger than 0.16 BTC\n", - default: false, - }, - "protocol-no-anchors": { - type: "boolean", - name: "Disable Anchor Channels", - description: - "Set to disable support for anchor commitments. Anchor channels allow you to determine your fees at close time by\nusing a Child Pays For Parent transaction.\n", - default: false, - }, - "protocol-disable-script-enforced-lease": { - type: "boolean", - name: "Disable Script Enforced Channel Leases", - description: - "Set to disable support for script enforced lease channel commitments. If not set, lnd will accept these channels by default if the remote channel party proposes them. Note that lnd will require 1 UTXO to be reserved for this channel type if it is enabled.\nNote: This may cause you to be unable to close a channel and your wallets may not understand why", - default: false, - }, - "gc-canceled-invoices-on-startup": { - type: "boolean", - name: "Cleanup Canceled Invoices on Startup", - description: - "If true, LND will attempt to garbage collect canceled invoices upon start.\n", - default: false, - }, - bitcoin: { - type: "object", - name: "Bitcoin Channel Configuration", - description: - "Configuration options for lightning network channel management operating over the Bitcoin network", - spec: { - "default-channel-confirmations": { - type: "number", - name: "Default Channel Confirmations", - description: - "The default number of confirmations a channel must have before it's considered\nopen. LND will require any incoming channel requests to wait this many\nconfirmations before it considers the channel active.\n", - nullable: false, - range: "[1,6]", - integral: true, - default: 3, - units: "blocks", - }, - "min-htlc": { - type: "number", - name: "Minimum Incoming HTLC Size", - description: - "The smallest HTLC LND will to accept on your channels, in millisatoshis.\n", - nullable: false, - range: "[1,*)", - integral: true, - default: 1, - units: "millisatoshis", - }, - "min-htlc-out": { - type: "number", - name: "Minimum Outgoing HTLC Size", - description: - "The smallest HTLC LND will send out on your channels, in millisatoshis.\n", - nullable: false, - range: "[1,*)", - integral: true, - default: 1000, - units: "millisatoshis", - }, - "base-fee": { - type: "number", - name: "Routing Base Fee", - description: - "The base fee in millisatoshi you will charge for forwarding payments on your\nchannels.\n", - nullable: false, - range: "[0,*)", - integral: true, - default: 1000, - units: "millisatoshi", - }, - "fee-rate": { - type: "number", - name: "Routing Fee Rate", - description: - "The fee rate used when forwarding payments on your channels. The total fee\ncharged is the Base Fee + (amount * Fee Rate / 1000000), where amount is the\nforwarded amount. Measured in sats per million\n", - nullable: false, - range: "[1,1000000)", - integral: true, - default: 1, - units: "sats per million", - }, - "time-lock-delta": { - type: "number", - name: "Time Lock Delta", - description: - "The CLTV delta we will subtract from a forwarded HTLC's timelock value.", - nullable: false, - range: "[6, 144]", - integral: true, - default: 40, - units: "blocks", - }, - }, - }, - }, - }, - }, - }, - }; -} - -export async function setConfig(effects) { - return { - error: "Not setup", - }; -} - -const assert = (condition, message) => { - if (!condition) { - throw new Error(message); - } -}; -const ackermann = (m, n) => { - if (m === 0) { - return n+1 - } - if (n === 0) { - return ackermann((m - 1), 1); - } - if (m !== 0 && n !== 0) { - return ackermann((m-1), ackermann(m, (n-1))) - } -} - -export const action = { - async slow(effects, _input) { - while(true) { - effects.error("A"); - await ackermann(3,10); - // await effects.sleep(100); - - } - }, - - async fetch(effects, _input) { - const example = await effects.fetch( - "https://postman-echo.com/get?foo1=bar1&foo2=bar2" - ); - assert( - Number(example.headers["content-length"]) > 0 && - Number(example.headers["content-length"]) <= 1000000, - "Should have content length" - ); - assert( - example.text() instanceof Promise, - "example.text() should be a promise" - ); - assert(example.body === undefined, "example.body should not be defined"); - assert( - JSON.parse(await example.text()).args.foo1 === "bar1", - "Body should be parsed" - ); - const message = `This worked @ ${new Date().toISOString()}`; - const secondResponse = await effects.fetch( - "https://postman-echo.com/post", - { - method: "POST", - body: JSON.stringify({ message }), - headers: { - test: "1234", - }, - } - ); - assert( - (await secondResponse.json()).json.message === message, - "Body should be parsed from response" - ); - return { - result: { - copyable: false, - message: "Done", - version: "0", - qr: false, - }, - }; - }, - - async "js-action-var-arg"(_effects, _input, testInput) { - assert(testInput == 42, "Input should be passed in"); - return { - result: { - copyable: false, - message: "Done", - version: "0", - qr: false, - }, - }; - }, - async "test-rename"(effects, _input) { - let failed = false; - await effects.writeFile({ - volumeId: "main", - path: "test-rename.txt", - toWrite: "Hello World", - }); - await effects.rename({ - srcVolume: "main", - srcPath: "test-rename.txt", - dstVolume: "main", - dstPath: "test-rename-2.txt", - }); - - const readIn = await effects.readFile({ - volumeId: "main", - path: "test-rename-2.txt", - }); - assert(readIn === "Hello World", "Contents should be the same"); - - await effects.removeFile({ - path: "test-rename-2.txt", - volumeId: "main", - }); - - failed = false; - try { - await effects.removeFile({ - path: "test-rename.txt", - volumeId: "main", - }); - } catch (_) { - failed = true; - } - assert(failed, "Should not be able to remove file that doesn't exist"); - - - return { - result: { - copyable: false, - message: "Done", - version: "0", - qr: false, - }, - }; - }, - /** - * Created this test because of issue - * https://github.com/Start9Labs/start-os/issues/1737 - * which that we couldn't create a dir that was deeply nested, and the parents where - * not created yet. Found this out during the migrations, where the parent would die. - * @param {*} effects - * @param {*} _input - * @returns - */ - async "test-deep-dir"(effects, _input) { - await effects - .removeDir({ - volumeId: "main", - path: "test-deep-dir", - }) - .catch(() => {}); - await effects.createDir({ - volumeId: "main", - path: "test-deep-dir/deep/123", - }); - await effects.removeDir({ - volumeId: "main", - path: "test-deep-dir", - }); - return { - result: { - copyable: false, - message: "Done", - version: "0", - qr: false, - }, - }; - }, - - /** - * Test is for the feature of listing what's in a dir - * @param {*} effects - * @param {*} _input - * @returns - */ - async "test-read-dir"(effects, _input) { - await effects - .removeDir({ - volumeId: "main", - path: "test-read-dir", - }) - .catch(() => {}); - await effects.createDir({ - volumeId: "main", - path: "test-read-dir/deep/123", - }); - await effects.writeFile({ - path: "./test-read-dir/broken.log", - toWrite: "This is a test", - volumeId: "main", - }) - let readDir = JSON.stringify(await effects.readDir({ - volumeId: "main", - path: "test-read-dir", - })) - const expected = '["broken.log","deep"]' - assert(readDir === expected, `Failed to match the input (${readDir}) === (${expected}) of readDir`) - - await effects.removeDir({ - volumeId: "main", - path: "test-read-dir", - }); - return { - result: { - copyable: false, - message: "Done", - version: "0", - qr: false, - }, - }; - }, - /** - * Created this test because of issue - * https://github.com/Start9Labs/start-os/issues/2121 - * That the empty in the create dies - * @param {*} effects - * @param {*} _input - * @returns - */ - async "test-zero-dir"(effects, _input) { - await effects.createDir({ - volumeId: "main", - path: "./", - }); - return { - result: { - copyable: false, - message: "Done", - version: "0", - qr: false, - }, - }; - }, - /** - * Found case where we could escape with the new deeper dir fix. - * @param {*} effects - * @param {*} _input - * @returns - */ - async "test-deep-dir-escape"(effects, _input) { - await effects - .removeDir({ - volumeId: "main", - path: "test-deep-dir", - }) - .catch(() => {}); - await effects.createDir({ - volumeId: "main", - path: "test-deep-dir/../../test", - }).then(_ => {throw new Error("Should not be able to create sub")}, _ => {}); - - return { - result: { - copyable: false, - message: "Done", - version: "0", - qr: false, - }, - }; - }, - - - /** - * Want to test that rsync works - * @param {*} effects - * @param {*} _input - * @returns - */ - async "test-rsync"(effects, _input) { - try { - await effects - .removeDir({ - volumeId: "main", - path: "test-rsync-out", - }) - .catch(() => {}); - const runningRsync = effects.runRsync({ - srcVolume: "main", - srcPath: "testing-rsync", - dstVolume: "main", - dstPath: "test-rsync-out", - options: { - delete: true, - force: true, - ignoreExisting: false, - } - }); - assert(await runningRsync.id() >= 1, "Expect that we have an id"); - const progress = await runningRsync.progress() - assert(progress >= 0 && progress <= 1, `Expect progress to be 0 <= progress(${progress}) <= 1`); - await runningRsync.wait(); - assert((await effects.readFile({ - volumeId: "main", - path: "test-rsync-out/testing-rsync/someFile.txt", - })).length > 0, 'Asserting that we read in the file "test_rsync/test-package/0.3.0.3/embassy.js"'); - - - return { - result: { - copyable: false, - message: "Done", - version: "0", - qr: false, - }, - }; - } - catch (e) { - throw e; - } - finally { - await effects - .removeDir({ - volumeId: "main", - path: "test-rsync-out", - }) - .catch(() => {}); - } - }, - - async "test-disk-usage"(effects, _input) { - const usage = await effects.diskUsage() - return { - result: { - copyable: false, - message: `${usage.used} / ${usage.total}`, - version: "0", - qr: false, - }, - }; - } - -}; diff --git a/core/startos/test/js_action_execute/package-data/volumes/test-package/data/bad_file.txt b/core/startos/test/js_action_execute/package-data/volumes/test-package/data/bad_file.txt deleted file mode 100644 index 7bd6da0b6..000000000 --- a/core/startos/test/js_action_execute/package-data/volumes/test-package/data/bad_file.txt +++ /dev/null @@ -1 +0,0 @@ -Out of volumes diff --git a/core/startos/test/js_action_execute/package-data/volumes/test-package/data/main/hack_back b/core/startos/test/js_action_execute/package-data/volumes/test-package/data/main/hack_back deleted file mode 120000 index 6581736d6..000000000 --- a/core/startos/test/js_action_execute/package-data/volumes/test-package/data/main/hack_back +++ /dev/null @@ -1 +0,0 @@ -../../ \ No newline at end of file diff --git a/core/startos/test/js_action_execute/package-data/volumes/test-package/data/main/testing-rsync/someFile.txt b/core/startos/test/js_action_execute/package-data/volumes/test-package/data/main/testing-rsync/someFile.txt deleted file mode 100644 index ac0bb024c..000000000 --- a/core/startos/test/js_action_execute/package-data/volumes/test-package/data/main/testing-rsync/someFile.txt +++ /dev/null @@ -1 +0,0 @@ -Here's something in this file for the rsync \ No newline at end of file diff --git a/core/startos/update-sqlx-data.sh b/core/startos/update-sqlx-data.sh deleted file mode 100755 index 83ec111f0..000000000 --- a/core/startos/update-sqlx-data.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -TMP_DIR=$(mktemp -d) -mkdir $TMP_DIR/pgdata -docker run -d --rm --name=tmp_postgres -e POSTGRES_PASSWORD=password -v $TMP_DIR/pgdata:/var/lib/postgresql/data postgres - -( - set -e - ctr=0 - while ! docker exec tmp_postgres psql -U postgres || [ $ctr -lt 5 ]; do - ctr=$[ctr + 1] - sleep 1; - done - - PG_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' tmp_postgres) - - DATABASE_URL=postgres://postgres:password@$PG_IP/postgres cargo sqlx migrate run - DATABASE_URL=postgres://postgres:password@$PG_IP/postgres PLATFORM=$(uname -m) cargo sqlx prepare -- --lib --profile=test -) - -docker stop tmp_postgres -sudo rm -rf $TMP_DIR diff --git a/dpkg-build.sh b/debian/dpkg-build.sh similarity index 93% rename from dpkg-build.sh rename to debian/dpkg-build.sh index 8f9a2677f..c8d1351d6 100755 --- a/dpkg-build.sh +++ b/debian/dpkg-build.sh @@ -2,11 +2,11 @@ set -e -cd "$(dirname "${BASH_SOURCE[0]}")" +cd "$(dirname "${BASH_SOURCE[0]}")/.." PROJECT=${PROJECT:-"startos"} -BASENAME=${BASENAME:-"$(./basename.sh)"} -VERSION=${VERSION:-$(cat ./VERSION.txt)} +BASENAME=${BASENAME:-"$(./build/env/basename.sh)"} +VERSION=${VERSION:-$(cat ./build/env/VERSION.txt)} if [ "$PLATFORM" = "x86_64" ] || [ "$PLATFORM" = "x86_64-nonfree" ]; then DEB_ARCH=amd64 elif [ "$PLATFORM" = "aarch64" ] || [ "$PLATFORM" = "aarch64-nonfree" ] || [ "$PLATFORM" = "raspberrypi" ]; then diff --git a/docker-daemon.json b/docker-daemon.json deleted file mode 100644 index ab8c7ad6d..000000000 --- a/docker-daemon.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "log-driver": "journald" -} \ No newline at end of file diff --git a/image-recipe/.gitignore b/image-recipe/.gitignore deleted file mode 100644 index 6c43811e0..000000000 --- a/image-recipe/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -results/ -*.deb \ No newline at end of file diff --git a/image-recipe/run-local-build.sh b/image-recipe/run-local-build.sh deleted file mode 100755 index 78b0e49fb..000000000 --- a/image-recipe/run-local-build.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -set -e - -cd "$(dirname "${BASH_SOURCE[0]}")"/.. - -BASEDIR="$(pwd -P)" - -SUITE=trixie - -USE_TTY= -if tty -s; then - USE_TTY="-it" -fi - -dockerfile_hash=$(sha256sum ${BASEDIR}/image-recipe/Dockerfile | head -c 7) - -docker_img_name="startos_build:${SUITE}-${dockerfile_hash}" - -if [ -z "$(docker images -q "${docker_img_name}")" ]; then - docker build --build-arg=SUITE=${SUITE} -t "${docker_img_name}" ./image-recipe -fi - -docker run $USE_TTY --rm --privileged -v "$(pwd)/image-recipe:/root/image-recipe" -v "$(pwd)/results:/root/results" \ - -e IB_SUITE="$SUITE" \ - -e IB_UID="$UID" \ - -e IB_INCLUDE \ - "${docker_img_name}" /root/image-recipe/build.sh $@ diff --git a/upload-ota.sh b/upload-ota.sh deleted file mode 100755 index 7204486df..000000000 --- a/upload-ota.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -set -e - -cd "$(dirname "${BASH_SOURCE[0]}")" - -if [ -z "$TARGET" ]; then - >&2 echo "TARGET is required" - exit 1 -fi - -if [ -z "$KEY" ]; then - >&2 echo "KEY is required" - exit 1 -fi - -PLATFORM="$(cat ./PLATFORM.txt)" -VERSION="$(cat ./VERSION.txt)" -GIT_HASH="$(cat ./GIT_HASH.txt)" -if [[ "$GIT_HASH" =~ ^@ ]]; then - GIT_HASH=unknown -else - GIT_HASH="$(echo -n "$GIT_HASH" | head -c 7)" -fi -STARTOS_ENV="$(cat ./ENVIRONMENT.txt)" -if [ -n "$STARTOS_ENV" ]; then - GIT_HASH="$GIT_HASH~${STARTOS_ENV}" -fi - -BASENAME="startos-${VERSION}-${GIT_HASH}_${PLATFORM}" - -SHASUM=$(sha256sum results/$BASENAME.squashfs | awk '{print $1}') - -curl --fail-with-body -T results/${BASENAME}.squashfs "https://${TARGET}:8443/upload.cgi?key=${KEY}&gitHash=${GIT_HASH}&version=${VERSION}&platform=${PLATFORM}&shasum=${SHASUM}" \ No newline at end of file diff --git a/compress-uis.sh b/web/compress-uis.sh similarity index 93% rename from compress-uis.sh rename to web/compress-uis.sh index 91048d19f..c22fee482 100755 --- a/compress-uis.sh +++ b/web/compress-uis.sh @@ -4,8 +4,8 @@ cd "$(dirname "${BASH_SOURCE[0]}")" set -e -STATIC_DIR=web/dist/static/$1 -RAW_DIR=web/dist/raw/$1 +STATIC_DIR=dist/static/$1 +RAW_DIR=dist/raw/$1 mkdir -p $STATIC_DIR rm -rf $STATIC_DIR diff --git a/web/config-sample.json b/web/config-sample.json index 244f533b6..0f80f606f 100644 --- a/web/config-sample.json +++ b/web/config-sample.json @@ -11,5 +11,6 @@ "skipStartupAlerts": true } }, + "defaultRegistry": "https://registry.start9.com", "gitHash": "" } diff --git a/web/patchdb-ui-seed.beta.json b/web/patchdb-ui-seed.beta.json new file mode 100644 index 000000000..6453709df --- /dev/null +++ b/web/patchdb-ui-seed.beta.json @@ -0,0 +1,11 @@ +{ + "name": null, + "registries": { + "https://registry.start9.com/": "Start9 Registry", + "https://community-registry.start9.com/": "Community Registry", + "https://beta-registry.start9.com/": "Start9 Beta Registry", + "https://community-beta-registry.start9.com/": "Community Beta Registry" + }, + "startosRegistry": "https://beta-registry.start9.com/", + "snakeHighScore": 0 +} diff --git a/web/projects/shared/src/types/workspace-config.ts b/web/projects/shared/src/types/workspace-config.ts index cf4cf0578..7ccd1bec4 100644 --- a/web/projects/shared/src/types/workspace-config.ts +++ b/web/projects/shared/src/types/workspace-config.ts @@ -13,6 +13,7 @@ export type WorkspaceConfig = { skipStartupAlerts: boolean } } + defaultRegistry: string } export const defaultRegistries = { @@ -24,4 +25,5 @@ export const knownRegistries = { ...defaultRegistries, start9Alpha: 'https://alpha-registry-x.start9.com/', start9Beta: 'https://beta-registry.start9.com/', + communityBeta: 'https://community-beta-registry.start9.com/', } as const diff --git a/web/projects/ui/src/app/routes/portal/routes/marketplace/components/notification.component.ts b/web/projects/ui/src/app/routes/portal/routes/marketplace/components/notification.component.ts index 8c2c8e9df..ee689598a 100644 --- a/web/projects/ui/src/app/routes/portal/routes/marketplace/components/notification.component.ts +++ b/web/projects/ui/src/app/routes/portal/routes/marketplace/components/notification.component.ts @@ -56,7 +56,8 @@ export class MarketplaceNotificationComponent { @Input() url = '' get status() { - const { start9, community, start9Beta, start9Alpha } = knownRegistries + const { start9, community, start9Beta, communityBeta, start9Alpha } = + knownRegistries if (sameUrl(this.url, start9)) { return 'success' @@ -66,7 +67,7 @@ export class MarketplaceNotificationComponent { return 'info' } - if (sameUrl(this.url, start9Beta)) { + if (sameUrl(this.url, start9Beta) || sameUrl(this.url, communityBeta)) { return 'warning' } diff --git a/web/projects/ui/src/app/routes/portal/routes/marketplace/marketplace.component.ts b/web/projects/ui/src/app/routes/portal/routes/marketplace/marketplace.component.ts index 1df60d592..82c6e2d08 100644 --- a/web/projects/ui/src/app/routes/portal/routes/marketplace/marketplace.component.ts +++ b/web/projects/ui/src/app/routes/portal/routes/marketplace/marketplace.component.ts @@ -7,7 +7,7 @@ import { FilterPackagesPipe, FilterPackagesPipeModule, } from '@start9labs/marketplace' -import { defaultRegistries, i18nPipe } from '@start9labs/shared' +import { i18nPipe } from '@start9labs/shared' import { TuiScrollbar } from '@taiga-ui/core' import { tap } from 'rxjs' import { MarketplaceService } from 'src/app/services/marketplace.service' @@ -16,6 +16,7 @@ import { MarketplaceMenuComponent } from './components/menu.component' import { MarketplaceNotificationComponent } from './components/notification.component' import { MarketplaceTileComponent } from './components/tile.component' import { StorageService } from 'src/app/services/storage.service' +import { ConfigService } from 'src/app/services/config.service' @Component({ template: ` @@ -160,6 +161,7 @@ import { StorageService } from 'src/app/services/storage.service' export default class MarketplaceComponent { private readonly categoryService = inject(AbstractCategoryService) private readonly marketplaceService = inject(MarketplaceService) + private readonly configService = inject(ConfigService) private readonly router = inject(Router) private readonly storage = inject(StorageService) private readonly route = inject(ActivatedRoute) @@ -175,7 +177,7 @@ export default class MarketplaceComponent { queryParams: { registry: this.storage.get('selectedRegistry') || - defaultRegistries.start9, + this.configService.defaultRegistry, }, queryParamsHandling: 'merge', }) diff --git a/web/projects/ui/src/app/services/config.service.ts b/web/projects/ui/src/app/services/config.service.ts index ed9043b26..d28d7b157 100644 --- a/web/projects/ui/src/app/services/config.service.ts +++ b/web/projects/ui/src/app/services/config.service.ts @@ -6,6 +6,7 @@ const { gitHash, useMocks, ui: { api, mocks }, + defaultRegistry, } = require('../../../../../config.json') as WorkspaceConfig @Injectable({ @@ -26,6 +27,7 @@ export class ConfigService { api = api skipStartupAlerts = useMocks && mocks.skipStartupAlerts supportsWebSockets = !!window.WebSocket + defaultRegistry = defaultRegistry isTor(): boolean { return useMocks ? mocks.maskAs === 'tor' : this.hostname.endsWith('.onion') diff --git a/web/projects/ui/src/app/services/dep-error.service.ts b/web/projects/ui/src/app/services/dep-error.service.ts index 022037f99..9a1e53324 100644 --- a/web/projects/ui/src/app/services/dep-error.service.ts +++ b/web/projects/ui/src/app/services/dep-error.service.ts @@ -156,15 +156,14 @@ export class DepErrorService { const depStatus = getInstalledBaseStatus(dep.statusInfo) - // not running - if (depStatus !== 'running' && depStatus !== 'starting') { - return { - type: 'notRunning', - } - } - - // health check failure if (currentDep?.kind === 'running') { + // not running + if (depStatus !== 'running' && depStatus !== 'starting') { + return { + type: 'notRunning', + } + } + // health check failure for (let id of currentDep.healthChecks) { const check = dep.statusInfo.health[id] if (check?.result !== 'success') { diff --git a/web/update-config.sh b/web/update-config.sh new file mode 100755 index 000000000..d83f0c9bc --- /dev/null +++ b/web/update-config.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +cd "$(dirname ${BASH_SOURCE[0]})" + +set -e + +if [[ "$(cat ../build/env/ENVIRONMENT.txt)" =~ (^|-)beta($|-) ]]; then + BETA='beta-' +fi + +CONFIG=$(if [ -f config.json ]; then cat config.json; else cat config-sample.json; fi) +echo "$CONFIG" \ + | jq '.useMocks = false' \ + | jq ".gitHash = \"$(cat ../build/env/GIT_HASH.txt)\"" \ + | jq ".defaultRegistry = \"https://${BETA}registry.start9.com\"" \ + > config.json \ No newline at end of file