From 63be61dd98abb7bd4e33b83902d4ead28a86f31c Mon Sep 17 00:00:00 2001 From: Igor Pecovnik Date: Thu, 26 Sep 2024 19:42:10 +0200 Subject: [PATCH 1/2] BSP: Expand distribution status with possible upgrade information --- config/distributions/bookworm/upgrade | 1 + config/distributions/bullseye/upgrade | 1 + config/distributions/buster/upgrade | 1 + config/distributions/focal/upgrade | 1 + config/distributions/jammy/upgrade | 1 + config/distributions/noble/upgrade | 1 + config/distributions/oracular/upgrade | 1 + config/distributions/sid/upgrade | 1 + config/distributions/trixie/upgrade | 1 + lib/functions/bsp/armbian-bsp-cli-deb.sh | 5 +++-- 10 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 config/distributions/bookworm/upgrade create mode 100644 config/distributions/bullseye/upgrade create mode 100644 config/distributions/buster/upgrade create mode 100644 config/distributions/focal/upgrade create mode 100644 config/distributions/jammy/upgrade create mode 100644 config/distributions/noble/upgrade create mode 100644 config/distributions/oracular/upgrade create mode 100644 config/distributions/sid/upgrade create mode 100644 config/distributions/trixie/upgrade diff --git a/config/distributions/bookworm/upgrade b/config/distributions/bookworm/upgrade new file mode 100644 index 000000000000..53227bcc4fe5 --- /dev/null +++ b/config/distributions/bookworm/upgrade @@ -0,0 +1 @@ +trixie,testing diff --git a/config/distributions/bullseye/upgrade b/config/distributions/bullseye/upgrade new file mode 100644 index 000000000000..31a1833deb90 --- /dev/null +++ b/config/distributions/bullseye/upgrade @@ -0,0 +1 @@ +bookworm,trixie,testing diff --git a/config/distributions/buster/upgrade b/config/distributions/buster/upgrade new file mode 100644 index 000000000000..4892cc468994 --- /dev/null +++ b/config/distributions/buster/upgrade @@ -0,0 +1 @@ +bullseye,bookworm,trixie,testing diff --git a/config/distributions/focal/upgrade b/config/distributions/focal/upgrade new file mode 100644 index 000000000000..1451702e627a --- /dev/null +++ b/config/distributions/focal/upgrade @@ -0,0 +1 @@ +jammy,noble,oracular diff --git a/config/distributions/jammy/upgrade b/config/distributions/jammy/upgrade new file mode 100644 index 000000000000..d4f7f8757049 --- /dev/null +++ b/config/distributions/jammy/upgrade @@ -0,0 +1 @@ +noble,oracular diff --git a/config/distributions/noble/upgrade b/config/distributions/noble/upgrade new file mode 100644 index 000000000000..5e278f3fb930 --- /dev/null +++ b/config/distributions/noble/upgrade @@ -0,0 +1 @@ +oracular diff --git a/config/distributions/oracular/upgrade b/config/distributions/oracular/upgrade new file mode 100644 index 000000000000..621e94f0ec95 --- /dev/null +++ b/config/distributions/oracular/upgrade @@ -0,0 +1 @@ +none diff --git a/config/distributions/sid/upgrade b/config/distributions/sid/upgrade new file mode 100644 index 000000000000..621e94f0ec95 --- /dev/null +++ b/config/distributions/sid/upgrade @@ -0,0 +1 @@ +none diff --git a/config/distributions/trixie/upgrade b/config/distributions/trixie/upgrade new file mode 100644 index 000000000000..038d718da6a1 --- /dev/null +++ b/config/distributions/trixie/upgrade @@ -0,0 +1 @@ +testing diff --git a/lib/functions/bsp/armbian-bsp-cli-deb.sh b/lib/functions/bsp/armbian-bsp-cli-deb.sh index 1b90051ee488..77d70031afbf 100644 --- a/lib/functions/bsp/armbian-bsp-cli-deb.sh +++ b/lib/functions/bsp/armbian-bsp-cli-deb.sh @@ -172,10 +172,11 @@ function compile_armbian-bsp-cli() { activate update-initramfs EOF - # copy distribution support status # @TODO: why? this changes over time and will be out of date + # copy distribution support and upgrade status + # this information is used in motd to show status and within armbian-config to perform upgrades local releases=($(find ${SRC}/config/distributions -mindepth 1 -maxdepth 1 -type d)) for i in "${releases[@]}"; do - echo "$(echo $i | sed 's/.*\///')=$(cat $i/support)" >> "${destination}"/etc/armbian-distribution-status + echo "$(echo $i | sed 's/.*\///')=$(cat $i/support)$(echo ";upgrade" | sed 's/.*\///')=$(cat $i/upgrade)" >> "${destination}"/etc/armbian-distribution-status done # execute $LINUXFAMILY-specific tweaks From e22c36da64594763a3ecda94672160f2d23ed7b6 Mon Sep 17 00:00:00 2001 From: Igor Pecovnik Date: Fri, 27 Sep 2024 13:36:10 +0200 Subject: [PATCH 2/2] Add property order which we use to sort releases historically --- config/distributions/bookworm/order | 1 + config/distributions/bullseye/order | 1 + config/distributions/buster/order | 1 + config/distributions/focal/order | 1 + config/distributions/jammy/order | 1 + config/distributions/noble/order | 1 + config/distributions/oracular/order | 1 + config/distributions/sid/order | 1 + config/distributions/trixie/order | 1 + lib/functions/bsp/armbian-bsp-cli-deb.sh | 2 +- 10 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 config/distributions/bookworm/order create mode 100644 config/distributions/bullseye/order create mode 100644 config/distributions/buster/order create mode 100644 config/distributions/focal/order create mode 100644 config/distributions/jammy/order create mode 100644 config/distributions/noble/order create mode 100644 config/distributions/oracular/order create mode 100644 config/distributions/sid/order create mode 100644 config/distributions/trixie/order diff --git a/config/distributions/bookworm/order b/config/distributions/bookworm/order new file mode 100644 index 000000000000..b8626c4cff28 --- /dev/null +++ b/config/distributions/bookworm/order @@ -0,0 +1 @@ +4 diff --git a/config/distributions/bullseye/order b/config/distributions/bullseye/order new file mode 100644 index 000000000000..00750edc07d6 --- /dev/null +++ b/config/distributions/bullseye/order @@ -0,0 +1 @@ +3 diff --git a/config/distributions/buster/order b/config/distributions/buster/order new file mode 100644 index 000000000000..d00491fd7e5b --- /dev/null +++ b/config/distributions/buster/order @@ -0,0 +1 @@ +1 diff --git a/config/distributions/focal/order b/config/distributions/focal/order new file mode 100644 index 000000000000..0cfbf08886fc --- /dev/null +++ b/config/distributions/focal/order @@ -0,0 +1 @@ +2 diff --git a/config/distributions/jammy/order b/config/distributions/jammy/order new file mode 100644 index 000000000000..7ed6ff82de6b --- /dev/null +++ b/config/distributions/jammy/order @@ -0,0 +1 @@ +5 diff --git a/config/distributions/noble/order b/config/distributions/noble/order new file mode 100644 index 000000000000..1e8b31496214 --- /dev/null +++ b/config/distributions/noble/order @@ -0,0 +1 @@ +6 diff --git a/config/distributions/oracular/order b/config/distributions/oracular/order new file mode 100644 index 000000000000..45a4fb75db86 --- /dev/null +++ b/config/distributions/oracular/order @@ -0,0 +1 @@ +8 diff --git a/config/distributions/sid/order b/config/distributions/sid/order new file mode 100644 index 000000000000..ec635144f600 --- /dev/null +++ b/config/distributions/sid/order @@ -0,0 +1 @@ +9 diff --git a/config/distributions/trixie/order b/config/distributions/trixie/order new file mode 100644 index 000000000000..7f8f011eb73d --- /dev/null +++ b/config/distributions/trixie/order @@ -0,0 +1 @@ +7 diff --git a/lib/functions/bsp/armbian-bsp-cli-deb.sh b/lib/functions/bsp/armbian-bsp-cli-deb.sh index 77d70031afbf..e99d6b7da7f9 100644 --- a/lib/functions/bsp/armbian-bsp-cli-deb.sh +++ b/lib/functions/bsp/armbian-bsp-cli-deb.sh @@ -174,7 +174,7 @@ function compile_armbian-bsp-cli() { # copy distribution support and upgrade status # this information is used in motd to show status and within armbian-config to perform upgrades - local releases=($(find ${SRC}/config/distributions -mindepth 1 -maxdepth 1 -type d)) + local releases=($(find ${SRC}/config/distributions -iname '*order*' -exec echo {} \; -exec cat {} \; | xargs -n2 -d'\n' | sort -nk2 | sed "s/\/order.*//g")) for i in "${releases[@]}"; do echo "$(echo $i | sed 's/.*\///')=$(cat $i/support)$(echo ";upgrade" | sed 's/.*\///')=$(cat $i/upgrade)" >> "${destination}"/etc/armbian-distribution-status done