From 5ca1937eef096857b01435cf9fff58bcaeb1709e Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 2 Nov 2023 22:53:25 +0100 Subject: [PATCH 1/3] Live patch 1 v8.23 (#6723) - Live patch 1 | Fix NFS Server install: https://github.com/MichaIng/DietPi/issues/6722 --- .build/software/dietpi-software-build.bash | 2 +- .update/version | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.build/software/dietpi-software-build.bash b/.build/software/dietpi-software-build.bash index 5c551dfe2f..f7165676dc 100644 --- a/.build/software/dietpi-software-build.bash +++ b/.build/software/dietpi-software-build.bash @@ -116,5 +116,5 @@ _EOF_ # Boot container ########################################## systemd-nspawn -bD rootfs -[[ -f rootfs/$NAME_$ARCH.deb ]] || Error_Exit "Failed to build package: $NAME_$ARCH.deb" +[[ -f rootfs/${NAME}_$ARCH.deb ]] || Error_Exit "Failed to build package: ${NAME}_$ARCH.deb" } diff --git a/.update/version b/.update/version index f02c4c9d03..add43615c3 100644 --- a/.update/version +++ b/.update/version @@ -14,7 +14,16 @@ G_MIN_DEBIAN=5 # Alternative Git branch to automatically migrate to when Debian version is too low G_OLD_DEBIAN_BRANCH='stretch' # Live patches -G_LIVE_PATCH_DESC=('Fix Sonarr install: https://github.com/MichaIng/DietPi/issues/6699') +G_LIVE_PATCH_DESC=( + [0]='Fix Sonarr install: https://github.com/MichaIng/DietPi/issues/6699' + [1]='Fix NFS Server install: https://github.com/MichaIng/DietPi/issues/6722' +) # shellcheck disable=SC2016 -G_LIVE_PATCH_COND=('[[ $(mawk '\''NR==9648 && /G_CHECK_URL/'\'' /boot/dietpi/dietpi-software) ]]') -G_LIVE_PATCH=('sed -i 9648d /boot/dietpi/dietpi-software') +G_LIVE_PATCH_COND=( + [0]='[[ $(mawk '\''NR==9648 && /G_CHECK_URL/'\'' /boot/dietpi/dietpi-software) ]]' + [1]='grep -q '\''dietpi.exports.* G_EXEC .echo'\'' /boot/dietpi/dietpi-software' +) +G_LIVE_PATCH=( + [0]='sed -i 9648d /boot/dietpi/dietpi-software' + [1]="sed -i 's/G_EXEC '\''echo/G_EXEC eval '\''echo/' /boot/dietpi/dietpi-software" +) From ea17e6e1225e9a435dee77eb0f0e3764d00c7272 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 16 Nov 2023 01:05:09 +0100 Subject: [PATCH 2/3] Live patch 2 v8.23 (#6754) - Live patch 2 | Prevent installion of conflicting rpi-eeprom package on RPi 4 Bookworm systems --- .update/pre-patches | 7 +++++++ .update/version | 3 +++ 2 files changed, 10 insertions(+) diff --git a/.update/pre-patches b/.update/pre-patches index b5317d83c2..c432ebb17b 100755 --- a/.update/pre-patches +++ b/.update/pre-patches @@ -332,6 +332,13 @@ then fi # Workaround for Beta v8.23.1 users as previous gpg method installed a 0600 file [[ -f '/etc/apt/trusted.gpg.d/dietpi-sonarr.gpg' ]] && G_EXEC chmod 0644 /etc/apt/trusted.gpg.d/dietpi-sonarr.gpg + + # Backport: https://github.com/MichaIng/DietPi/issues/6747 + if (( $G_HW_MODEL == 4 && $G_DISTRO > 6 )) && dpkg-query -s rpi-eeprom &> /dev/null + then + G_DIETPI-NOTIFY 2 'Setting rpi-eeprom package on hold to prevent conflicting upgrade attempt' + G_EXEC apt-mark hold rpi-eeprom + fi fi exit 0 diff --git a/.update/version b/.update/version index add43615c3..d7d9b2d964 100644 --- a/.update/version +++ b/.update/version @@ -17,13 +17,16 @@ G_OLD_DEBIAN_BRANCH='stretch' G_LIVE_PATCH_DESC=( [0]='Fix Sonarr install: https://github.com/MichaIng/DietPi/issues/6699' [1]='Fix NFS Server install: https://github.com/MichaIng/DietPi/issues/6722' + [2]='Prevent installion of conflicting rpi-eeprom package on RPi 4 Bookworm systems' ) # shellcheck disable=SC2016 G_LIVE_PATCH_COND=( [0]='[[ $(mawk '\''NR==9648 && /G_CHECK_URL/'\'' /boot/dietpi/dietpi-software) ]]' [1]='grep -q '\''dietpi.exports.* G_EXEC .echo'\'' /boot/dietpi/dietpi-software' + [2]='(( $G_HW_MODEL == 4 && $G_DISTRO > 6 )) && ! grep -q '\''https://dietpi.com/downloads/binaries/rpi/rpi-eeprom.deb'\'' /boot/dietpi/func/dietpi-set_hardware' ) G_LIVE_PATCH=( [0]='sed -i 9648d /boot/dietpi/dietpi-software' [1]="sed -i 's/G_EXEC '\''echo/G_EXEC eval '\''echo/' /boot/dietpi/dietpi-software" + [2]="dpkg-query -s rpi-eeprom &> /dev/null && apt-mark hold rpi-eeprom; sed -i 's|G_AG_CHECK_INSTALL_PREREQ rpi-eeprom|G_EXEC_OUTPUT=1 G_EXEC curl -fO https://dietpi.com/downloads/binaries/rpi/rpi-eeprom.deb; G_AGI ./rpi-eeprom.deb; G_EXEC rm rpi-eeprom.deb; G_EXEC apt-mark hold rpi-eeprom|' /boot/dietpi/func/dietpi-set_hardware" ) From ab75b1bb671b3ee8ff1ec6413beba4582ce11e9f Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 18 Nov 2023 00:31:19 +0100 Subject: [PATCH 3/3] v8.23 - Backport workflow from dev, required so that it can be triggered --- .github/workflows/armbian.yml | 72 +++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 .github/workflows/armbian.yml diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml new file mode 100644 index 0000000000..29e55c06c5 --- /dev/null +++ b/.github/workflows/armbian.yml @@ -0,0 +1,72 @@ +name: Armbian +on: + workflow_dispatch: + inputs: + asset: + description: 'Asset' + type: choice + options: [kernel, uboot, firmware] + default: kernel + required: true + branch: + description: 'Branch' + type: choice + options: [legacy, current, edge] + default: current + required: true + board: + description: 'Board' + required: true + gitowner: + description: 'Override Git owner of Armbian repo' + gitbranch: + description: 'Override Git branch of Armbian repo' +concurrency: + group: ${{ github.workflow }}-${{ github.event.inputs.asset }}-${{ github.event.inputs.branch }}-${{ github.event.inputs.board }} + cancel-in-progress: true +permissions: {} +defaults: + run: + shell: sh + working-directory: /dev/shm +jobs: + build: + name: "${{ github.event.inputs.asset }} - ${{ github.event.inputs.branch }} - ${{ github.event.inputs.board }}" + runs-on: ubuntu-22.04 + steps: + - name: Clone Armbian repo + run: | + owner='${{ github.event.inputs.gitowner }}' + [ "$owner" ] || owner='armbian' + branch='${{ github.event.inputs.gitbranch }}' + [ "$branch" ] || branch='main' + git clone -b "$branch" --depth=1 "https://github.com/$owner/build" + cd build + - name: Build asset + run: | + ./compile.sh '${{ github.event.inputs.asset }}' BRANCH='${{ github.event.inputs.branch }}' BOARD='${{ github.event.inputs.board }}' + - name: Upload + run: | + # SSH server and client keys + mkdir ~/.ssh + umask 377 + echo '${{ secrets.KNOWN_HOSTS }}' > ~/.ssh/known_hosts + echo '${{ secrets.SSH_KEY }}' > ~/.ssh/id_ed25519 + + # Generate file lists + files= + urls='"https://dietpi.com/downloads/binaries/testing/"' + cd output/debs + for i in * + do + mv -v "$i" "${i%%_*}.deb" + i="${i%%_*}.deb" + files="$files,$i" + urls="$urls,\"https://dietpi.com/downloads/binaries/testing/$i\"" + done + files=${files#,} + echo "Uploading file(s) $files to URL(s) $urls ..." + + # Upload + curl -T "{$files}" --key ~/.ssh/id_ed25519 '${{ secrets.UPLOAD_URL }}${{ matrix.dist }}/' + curl 'https://api.cloudflare.com/client/v4/zones/${{ secrets.CF_ZONE }}/purge_cache' -H 'Authorization: Bearer ${{ secrets.CF_TOKEN }}' -H 'Content-Type: application/json' --data "{\"files\":[$urls]}"