From 75f9c6b0fb9244899cbee48297ff6dff1caa8e10 Mon Sep 17 00:00:00 2001 From: Aiden McClelland <3732071+dr-bonez@users.noreply.github.com> Date: Fri, 10 Mar 2023 17:11:06 -0700 Subject: [PATCH] fix raspi kernel upgrades (#2202) * fix build * use same node versions * lock kernel to 5.15.76 --- .github/workflows/debian.yaml | 2 +- Makefile | 4 +- backend/src/update/mod.rs | 4 +- build/raspberry-pi/initialization.sh | 11 ++++++ frontend/package-lock.json | 55 +++++++++++++++++----------- 5 files changed, 49 insertions(+), 27 deletions(-) diff --git a/.github/workflows/debian.yaml b/.github/workflows/debian.yaml index acb1804ce..4a114f7a0 100644 --- a/.github/workflows/debian.yaml +++ b/.github/workflows/debian.yaml @@ -5,7 +5,7 @@ on: workflow_dispatch: env: - NODEJS_VERSION: '16' + NODEJS_VERSION: '16.11.0' ENVIRONMENT: "dev" jobs: diff --git a/Makefile b/Makefile index 99dd0f4c9..7e111dc14 100644 --- a/Makefile +++ b/Makefile @@ -45,8 +45,8 @@ sudo: clean: rm -f 2022-01-28-raspios-bullseye-arm64-lite.zip rm -f raspios.img - rm -f embassyos-raspi.img - rm -f embassyos-raspi.tar.gz + rm -f eos_raspberrypi-uninit.img + rm -f eos_raspberrypi-uninit.tar.gz rm -f ubuntu.img rm -f product_key.txt rm -f system-images/**/*.tar diff --git a/backend/src/update/mod.rs b/backend/src/update/mod.rs index c6b69708a..c28ecf079 100644 --- a/backend/src/update/mod.rs +++ b/backend/src/update/mod.rs @@ -198,7 +198,7 @@ async fn maybe_do_update( async fn do_update(ctx: RpcContext, eos_url: EosUrl) -> Result<(), Error> { let mut rsync = Rsync::new( eos_url.rsync_path()?, - "/media/embassy/next", + "/media/embassy/next/", Default::default(), ) .await?; @@ -303,7 +303,7 @@ async fn sync_boot() -> Result<(), Error> { RsyncOptions { delete: false, force: false, - ignore_existing: true, + ignore_existing: false, exclude: Vec::new(), no_permissions: false, }, diff --git a/build/raspberry-pi/initialization.sh b/build/raspberry-pi/initialization.sh index 3f9f78a42..95608a24b 100755 --- a/build/raspberry-pi/initialization.sh +++ b/build/raspberry-pi/initialization.sh @@ -27,6 +27,17 @@ sed -i "s/http:/https:/g" /etc/apt/sources.list /etc/apt/sources.list.d/*.list KERN=$(dpkg -s raspberrypi-kernel | grep Version | awk '{print $2}') apt-get update + +# TODO remove in 0.4.0 +if [ "$KERN" != "1:1.20221104-1" ]; then + wget https://archive.raspberrypi.org/debian/pool/main/r/raspberrypi-firmware/raspberrypi-kernel_1.20221104-1_arm64.deb + sha256sum raspberrypi-kernel_1.20221104-1_arm64.deb | grep 9de9fe61e17eab351b6d4c8ee42d836c16b066f3593a4a9626283df6df718e42 + apt-get install -y --allow-change-held-packages --allow-downgrades ./raspberrypi-kernel_1.20221104-1_arm64.deb + rm ./raspberrypi-kernel_1.20221104-1_arm64.deb +fi +apt-mark hold raspberrypi-bootloader +apt-mark hold raspberrypi-kernel + apt-get upgrade -y if [ "$KERN" != "$(dpkg -s raspberrypi-kernel | grep Version | awk '{print $2}')" ]; then echo "Kernel updated, restarting..." diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 5d3635cdb..55f54adec 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -80,6 +80,28 @@ "webpack-bundle-analyzer": "^4.8.0" } }, + "../patch-db/client": { + "name": "patch-db", + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "sorted-btree": "1.5.0", + "uuid": "8.3.2" + }, + "devDependencies": { + "@types/node": "16.4.13", + "@types/uuid": "8.3.1", + "husky": "^4.3.8", + "lint-staged": "^12.3.7", + "prettier": "^2.6.1", + "ts-node": "10.2.0", + "tslint": "6.1.3", + "typescript": "4.3.5" + }, + "peerDependencies": { + "rxjs": ">=7.0.0" + } + }, "node_modules/@adobe/css-tools": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.0.1.tgz", @@ -10933,17 +10955,8 @@ } }, "node_modules/patch-db-client": { - "name": "patch-db", - "version": "1.0.0", - "resolved": "file:../patch-db/client", - "license": "MIT", - "dependencies": { - "sorted-btree": "1.5.0", - "uuid": "8.3.2" - }, - "peerDependencies": { - "rxjs": ">=7.0.0" - } + "resolved": "../patch-db/client", + "link": true }, "node_modules/path-browserify": { "version": "1.0.1", @@ -13254,11 +13267,6 @@ "node": ">= 10" } }, - "node_modules/sorted-btree": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/sorted-btree/-/sorted-btree-1.5.0.tgz", - "integrity": "sha512-1KzY80r3VpwGLGN/9oWjReUml3czxKfLz4iMV8Ro9KAHCg9xt0HwTkcb20JR+sHCiR5WUJ6uMAbe/HB3gy1qYA==" - }, "node_modules/source-map": { "version": "0.7.4", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", @@ -23201,9 +23209,17 @@ "dev": true }, "patch-db-client": { - "version": "npm:patch-db@1.0.0", + "version": "file:../patch-db/client", "requires": { + "@types/node": "16.4.13", + "@types/uuid": "8.3.1", + "husky": "^4.3.8", + "lint-staged": "^12.3.7", + "prettier": "^2.6.1", "sorted-btree": "1.5.0", + "ts-node": "10.2.0", + "tslint": "6.1.3", + "typescript": "4.3.5", "uuid": "8.3.2" } }, @@ -24832,11 +24848,6 @@ "socks": "^2.6.2" } }, - "sorted-btree": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/sorted-btree/-/sorted-btree-1.5.0.tgz", - "integrity": "sha512-1KzY80r3VpwGLGN/9oWjReUml3czxKfLz4iMV8Ro9KAHCg9xt0HwTkcb20JR+sHCiR5WUJ6uMAbe/HB3gy1qYA==" - }, "source-map": { "version": "0.7.4", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz",