diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 655107b5a38..bc1af180b46 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -7,36 +7,56 @@ FROM mcr.microsoft.com/devcontainers/rust:1-${VARIANT} RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ && apt-get -y install --no-install-recommends \ # apt dependencies - apt-transport-https ca-certificates curl gnupg-agent software-properties-common lsb-release \ + apt-transport-https ca-certificates gnupg-agent software-properties-common lsb-release \ # Debian packaging utilities equivs \ dpkg-dev \ fakeroot \ # Utilities + ssh \ + sudo \ + gnupg2 \ + curl \ + wget \ vim \ bash-completion \ + netcat-openbsd \ iputils-ping \ + net-tools \ # Enable systemd systemd \ + systemd-sysv \ + dbus \ # Testing dependencies docker \ python3 \ python3-pip \ - python3-venv + python3-venv \ + nginx \ + # JSON tools + jq \ + jo # tedge dependencies -# Install more recent version of mosquitto >= 2.0.18 from debian sid to avoid mosquitto following bugs: +# Install more recent version of mosquitto >= 2.0.18 from debian backports to avoid mosquitto following bugs: # The mosquitto repo can't be used as it does not included builds for arm64/aarch64 (only amd64 and armhf) # * https://github.com/eclipse/mosquitto/issues/2604 (2.0.11) # * https://github.com/eclipse/mosquitto/issues/2634 (2.0.15) -RUN sh -c "echo 'deb [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] http://deb.debian.org/debian sid main' > /etc/apt/sources.list.d/debian-sid.list" \ +RUN sh -c "echo 'deb [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] http://deb.debian.org/debian bookworm-backports main' > /etc/apt/sources.list.d/debian-bookworm-backports.list" \ && apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \ + && DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install -t bookworm-backports \ mosquitto \ - mosquitto-clients \ - # Remove sid afterwards to prevent unexpected packages from being installed - && rm -f /etc/apt/sources.list.d/debian-sid.list \ - && apt-get update + mosquitto-clients + +# Remove unnecessary systemd services +RUN rm -f /lib/systemd/system/multi-user.target.wants/* \ + /etc/systemd/system/*.wants/* \ + /lib/systemd/system/local-fs.target.wants/* \ + /lib/systemd/system/sockets.target.wants/*udev* \ + /lib/systemd/system/sockets.target.wants/*initctl* \ + /lib/systemd/system/systemd-update-utmp* \ + # Remove policy-rc.d file which prevents services from starting + && rm -f /usr/sbin/policy-rc.d # Install gh utility RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \ @@ -58,7 +78,7 @@ RUN mkdir -p /etc/apt/keyrings \ && apt-get install -y docker-ce-cli docker-compose-plugin # Node js (for browser based tests and documentation using docusaurus) -RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \ +RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \ && apt-get install -y nodejs \ && npm install -g yarn diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index f9965ba44a1..4aaa28f74cf 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -51,7 +51,7 @@ "mutantdino.resourcemonitor", "rust-lang.rust-analyzer", "tamasfe.even-better-toml", - "serayuzgur.crates", + "fill-labs.dependi", "usernamehw.errorlens", "streetsidesoftware.code-spell-checker", // Shell script validation diff --git a/ci/build_scripts/build.sh b/ci/build_scripts/build.sh index c597b95398f..b70e7b237c5 100755 --- a/ci/build_scripts/build.sh +++ b/ci/build_scripts/build.sh @@ -159,6 +159,10 @@ source ./ci/package_list.sh # build release for target # GIT_SEMVER should be referenced in the build.rs scripts if [ "$BUILD" = 1 ]; then + # Install stable toolchain if missing + if command -V rustup >/dev/null 2>&1; then + rustup toolchain install stable --no-self-update + fi # Use zig to build as it is provides better cross compiling support cargo +stable install cargo-zigbuild --version ">=0.17.3"