Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package opensuse-migration-tool for
openSUSE:Factory checked in at 2026-05-19 17:50:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/opensuse-migration-tool (Old)
and /work/SRC/openSUSE:Factory/.opensuse-migration-tool.new.1966 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "opensuse-migration-tool"
Tue May 19 17:50:19 2026 rev:18 rq:1353948 version:20260517.df4e731
Changes:
--------
---
/work/SRC/openSUSE:Factory/opensuse-migration-tool/opensuse-migration-tool.changes
2026-04-21 12:48:05.206553043 +0200
+++
/work/SRC/openSUSE:Factory/.opensuse-migration-tool.new.1966/opensuse-migration-tool.changes
2026-05-19 17:50:47.225671731 +0200
@@ -1,0 +2,20 @@
+Sun May 17 16:56:14 UTC 2026 - [email protected]
+
+- Update to version 20260517.df4e731:
+ * Update README.md
+ * ci: set minimal token permissions for shellcheck workflow
+ * fix: avoid shellcheck false positives for os-release vars
+ * Initial plan
+ * Potential fix for pull request finding
+ * Run shellcheck also on post scripts
+ * Initial addressing of shellcheck issues
+ * Add shellcheck workflow
+ * Use consistently command -v for toolcheck
+ * Ensure that we pass DIALOGCMD to sudo
+ * Update screenshot with susedialog
+ * Use susedialog if available
+ * Potential fix for pull request finding
+ * Handle prerelease states local distro.json fallback
+ * Remove leftover debug print and add a little bit of quoting
+
+-------------------------------------------------------------------
Old:
----
opensuse-migration-tool-20260421.e72b645.tar.xz
New:
----
opensuse-migration-tool-20260517.df4e731.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ opensuse-migration-tool.spec ++++++
--- /var/tmp/diff_new_pack.FGIwvH/_old 2026-05-19 17:50:48.205712226 +0200
+++ /var/tmp/diff_new_pack.FGIwvH/_new 2026-05-19 17:50:48.209712392 +0200
@@ -19,7 +19,7 @@
Name: opensuse-migration-tool
-Version: 20260421.e72b645
+Version: 20260517.df4e731
Release: 0
Summary: Migration and Upgrade tool for openSUSE
License: Apache-2.0
++++++ _scmsync.obsinfo ++++++
--- /var/tmp/diff_new_pack.FGIwvH/_old 2026-05-19 17:50:48.253714210 +0200
+++ /var/tmp/diff_new_pack.FGIwvH/_new 2026-05-19 17:50:48.257714375 +0200
@@ -1,5 +1,5 @@
-mtime: 1776757258
-commit: 2d2688ca1435386b66f9d070ffd209fc4955955472433243d9ba6db3db5d14fa
+mtime: 1779037478
+commit: 195143627e59c3af9f77a092e7ae27c534cca1d21241c499e86cba002dca5aa9
url: https://src.opensuse.org/lkocman/opensuse-migration-tool.git
revision: main
++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.FGIwvH/_old 2026-05-19 17:50:48.297716028 +0200
+++ /var/tmp/diff_new_pack.FGIwvH/_new 2026-05-19 17:50:48.301716193 +0200
@@ -1,6 +1,6 @@
<servicedata>
<service name="tar_scm">
<param
name="url">https://github.com/openSUSE/opensuse-migration-tool.git</param>
- <param
name="changesrevision">e72b6454dc1c79575ba5961e382249eec9135b3f</param></service></servicedata>
+ <param
name="changesrevision">df4e731200894571a9e30334c7765243e3fd6a4e</param></service></servicedata>
(No newline at EOF)
++++++ build.specials.obscpio ++++++
++++++ build.specials.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/.gitignore new/.gitignore
--- old/.gitignore 1970-01-01 01:00:00.000000000 +0100
+++ new/.gitignore 2026-05-17 19:04:38.000000000 +0200
@@ -0,0 +1,3 @@
+.osc
+opensuse-migration-tool
+.obscpio
++++++ opensuse-migration-tool-20260421.e72b645.tar.xz ->
opensuse-migration-tool-20260517.df4e731.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/opensuse-migration-tool-20260421.e72b645/.github/workflows/check-distributions-json.yml
new/opensuse-migration-tool-20260517.df4e731/.github/workflows/check-distributions-json.yml
---
old/opensuse-migration-tool-20260421.e72b645/.github/workflows/check-distributions-json.yml
1970-01-01 01:00:00.000000000 +0100
+++
new/opensuse-migration-tool-20260517.df4e731/.github/workflows/check-distributions-json.yml
2026-05-17 16:34:57.000000000 +0200
@@ -0,0 +1,29 @@
+name: Check distributions.json is up to date
+
+on:
+ pull_request:
+
+jobs:
+ check:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Fetch live distributions.json
+ shell: bash
+ run: |
+ set -euo pipefail
+ curl -sf https://get.opensuse.org/api/v0/distributions.json | jq
--sort-keys . > /tmp/live.json
+
+ - name: Normalize local distributions.json
+ run: jq --sort-keys . distributions.json > /tmp/local.json
+
+ - name: Diff local vs live
+ run: |
+ if ! diff -u /tmp/local.json /tmp/live.json; then
+ echo ""
+ echo "::error::distributions.json is out of date."
+ echo "Run: curl -s
https://get.opensuse.org/api/v0/distributions.json | jq . > distributions.json"
+ exit 1
+ fi
+ echo "distributions.json is up to date."
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/opensuse-migration-tool-20260421.e72b645/.github/workflows/shellcheck.yml
new/opensuse-migration-tool-20260517.df4e731/.github/workflows/shellcheck.yml
---
old/opensuse-migration-tool-20260421.e72b645/.github/workflows/shellcheck.yml
1970-01-01 01:00:00.000000000 +0100
+++
new/opensuse-migration-tool-20260517.df4e731/.github/workflows/shellcheck.yml
2026-05-17 16:34:57.000000000 +0200
@@ -0,0 +1,19 @@
+name: ShellCheck
+
+on:
+ pull_request:
+
+permissions:
+ contents: read
+
+jobs:
+ shellcheck:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Install ShellCheck
+ run: sudo apt-get update && sudo apt-get install -y shellcheck
+
+ - name: Run ShellCheck
+ run: shellcheck -e SC2086 opensuse-migration-tool scripts/*.sh
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/opensuse-migration-tool-20260421.e72b645/README.md
new/opensuse-migration-tool-20260517.df4e731/README.md
--- old/opensuse-migration-tool-20260421.e72b645/README.md 2026-04-21
09:34:07.000000000 +0200
+++ new/opensuse-migration-tool-20260517.df4e731/README.md 2026-05-17
16:34:57.000000000 +0200
@@ -9,7 +9,9 @@
General documentation about openSUSE Leap upgrade or Migration can be found at
[SDB:System_upgrade](https://en.opensuse.org/SDB:System_upgrade) wiki.
---
-<img width="1443" height="910" alt="image"
src="https://github.com/user-attachments/assets/e7a37163-88a5-4de0-8e05-d8f543a3f61b"
/>
+<img width="1334" height="838" alt="opensuse-migration-tool"
src="https://github.com/user-attachments/assets/76a55810-5080-461a-88ec-b92dc405324b"
/>
+
+
## 🌟 Key Features
@@ -56,7 +58,7 @@
Or generally for systems which no longer receive updates.
```bash
-sudo zypper in bc jq curl dialog sed gawk git # to install dependencies
+sudo zypper in bc jq curl susedialog sed gawk git # to install dependencies
git clone https://github.com/openSUSE/opensuse-migration-tool.git
cd opensuse-migration-tool
./opensuse-migration-tool --dry-run # optionally to test the tool execution
@@ -89,19 +91,6 @@
---
-### 🚧 Upgrading to Alpha/Beta/RC Releases
-
-By default, **pre-release versions are hidden** to avoid accidental installs.
-
-Use `--pre-release` to opt-in:
-
-```bash
-./opensuse-migration-tool --pre-release --dry-run
-sudo ./opensuse-migration-tool --pre-release
-```
-
----
-
## 🐳 Development & Testing in Distrobox (Recommended)
### Leap Micro inside Toolbox container
@@ -118,11 +107,11 @@
sudo ./opensuse-migration-tool
```
-### Leap 15.5 container
+### Leap 15.6 container
```bash
-distrobox create --image opensuse/leap:15.5 --name leap155
-distrobox enter leap155
+distrobox create --image opensuse/leap:15.6 --name leap156
+distrobox enter leap156
sudo zypper in bc jq curl dialog sed gawk
./opensuse-migration-tool --dry-run
@@ -147,18 +136,23 @@
### Working on the package (Base\:System)
+Fork https://src.opensuse.org/lkocman/opensuse-migration-tool/src/branch/main/
+and make
+
```bash
-osc bco Base:System opensuse-migration-tool
-cd Base:System/opensuse-migration-tool
+git clone [email protected]:$USER/opensuse-migration-tool.git
+cd opensuse-migration-tool
+git checkout -b update
osc service runall
-osc addremove
-vim *.changes # Review changelog
-osc build # Test build locally
-osc commit
-osc sr # Submit to Base:System
+git rm -f *obscpio # Please do not add autogenerated cpio archives
+git add *
+vim *.changes # Review autogenerated changelog
+git push
```
+Make a pull request against develproject
https://src.opensuse.org/lkocman/opensuse-migration-tool/src/branch/main/
+
### Forwarding to openSUSE\:Factory
If not done by the maintainer:
@@ -173,10 +167,32 @@
```bash
osc sr openSUSE:Factory opensuse-migration-tool openSUSE:Leap:Micro:6.1
-osc sr openSUSE:Factory opensuse-migration-tool openSUSE:Leap:16.0
-osc sr openSUSE:Factory opensuse-migration-tool openSUSE:Leap:15.6:Update
+osc sr openSUSE:Factory opensuse-migration-tool openSUSE:Leap:Micro:6.2
```
+Leap part is handled in src.opensuse.org
+
+After the factory part is completed make a pull request against `leap-16.0`
and `leap-16.1` branches in
https://src.opensuse.org/pool/opensuse-migration-tool
+idally from the factory branch once the change is accepted in
Factory/Tumbleweed.
+
+
+
+---
+
+## 🗂️ Keeping `distributions.json` Up to Date
+
+The `distributions.json` file in the repository root is a local fallback used
when `get.opensuse.org` is unreachable (e.g. offline development, network
outage). It mirrors the data served by the [get.opensuse.org
API](https://get.opensuse.org/api/v0/distributions.json).
+
+**This file must be updated whenever a Leap milestone changes state** — for
example when Leap 16.1 moves from Alpha → Beta → RC → Stable, or when a new
version is added or reaches EOL.
+
+To update it:
+
+```bash
+curl -s https://get.opensuse.org/api/v0/distributions.json | jq . >
distributions.json
+```
+
+Commit the updated file alongside any release-related changes.
+
---
## 🤝 Contributions Welcome!
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/opensuse-migration-tool-20260421.e72b645/distributions.json
new/opensuse-migration-tool-20260517.df4e731/distributions.json
--- old/opensuse-migration-tool-20260421.e72b645/distributions.json
1970-01-01 01:00:00.000000000 +0100
+++ new/opensuse-migration-tool-20260517.df4e731/distributions.json
2026-05-17 16:34:57.000000000 +0200
@@ -0,0 +1,222 @@
+{
+ "Leap": [
+ {
+ "name": "openSUSE Leap",
+ "version": "16.1",
+ "state": "Alpha",
+ "upgrade-weight": 11
+ },
+ {
+ "name": "openSUSE Leap",
+ "version": "16.0",
+ "state": "Stable",
+ "upgrade-weight": 10
+ },
+ {
+ "name": "openSUSE Leap",
+ "version": "15.6",
+ "state": "Stable",
+ "upgrade-weight": 9
+ },
+ {
+ "name": "openSUSE Leap",
+ "version": "15.5",
+ "state": "EOL",
+ "upgrade-weight": 8
+ },
+ {
+ "name": "openSUSE Leap",
+ "version": "15.4",
+ "state": "EOL",
+ "upgrade-weight": 7
+ },
+ {
+ "name": "openSUSE Leap",
+ "version": "15.3",
+ "state": "EOL",
+ "upgrade-weight": 6
+ },
+ {
+ "name": "openSUSE Leap",
+ "version": "15.2",
+ "state": "EOL",
+ "upgrade-weight": 5
+ },
+ {
+ "name": "openSUSE Leap",
+ "version": "15.1",
+ "state": "EOL",
+ "upgrade-weight": 4
+ },
+ {
+ "name": "openSUSE Leap",
+ "version": "15.0",
+ "state": "EOL",
+ "upgrade-weight": 3
+ },
+ {
+ "name": "openSUSE Leap",
+ "version": "42.3",
+ "state": "EOL",
+ "upgrade-weight": 2
+ },
+ {
+ "name": "openSUSE Leap",
+ "version": "42.2",
+ "state": "EOL",
+ "upgrade-weight": 1
+ },
+ {
+ "name": "openSUSE Leap",
+ "version": "42.1",
+ "state": "EOL",
+ "upgrade-weight": 0
+ }
+ ],
+ "LeapMicro": [
+ {
+ "name": "openSUSE Leap Micro",
+ "version": "6.2",
+ "state": "Stable",
+ "upgrade-weight": 6
+ },
+ {
+ "name": "openSUSE Leap Micro",
+ "version": "6.1",
+ "state": "Stable",
+ "upgrade-weight": 6
+ },
+ {
+ "name": "openSUSE Leap Micro",
+ "version": "6.0",
+ "state": "EOL",
+ "upgrade-weight": 5
+ },
+ {
+ "name": "openSUSE Leap Micro",
+ "version": "5.5",
+ "state": "EOL",
+ "upgrade-weight": 4
+ },
+ {
+ "name": "openSUSE Leap Micro",
+ "version": "5.4",
+ "state": "EOL",
+ "upgrade-weight": 3
+ },
+ {
+ "name": "openSUSE Leap Micro",
+ "version": "5.3",
+ "state": "EOL",
+ "upgrade-weight": 2
+ },
+ {
+ "name": "openSUSE Leap Micro",
+ "version": "5.2",
+ "state": "EOL",
+ "upgrade-weight": 1
+ }
+ ],
+ "Tumbleweed": [
+ {
+ "name": "openSUSE Tumbleweed",
+ "version": "20260515",
+ "upgrade-weight": 20260515
+ },
+ {
+ "name": "openSUSE Tumbleweed",
+ "version": "20260514",
+ "upgrade-weight": 20260514
+ },
+ {
+ "name": "openSUSE Tumbleweed",
+ "version": "20260512",
+ "upgrade-weight": 20260512
+ },
+ {
+ "name": "openSUSE Tumbleweed",
+ "version": "20260511",
+ "upgrade-weight": 20260511
+ },
+ {
+ "name": "openSUSE Tumbleweed",
+ "version": "20260510",
+ "upgrade-weight": 20260510
+ },
+ {
+ "name": "openSUSE Tumbleweed",
+ "version": "20260509",
+ "upgrade-weight": 20260509
+ },
+ {
+ "name": "openSUSE Tumbleweed",
+ "version": "20260507",
+ "upgrade-weight": 20260507
+ },
+ {
+ "name": "openSUSE Tumbleweed",
+ "version": "20260506",
+ "upgrade-weight": 20260506
+ },
+ {
+ "name": "openSUSE Tumbleweed",
+ "version": "20260505",
+ "upgrade-weight": 20260505
+ },
+ {
+ "name": "openSUSE Tumbleweed",
+ "version": "20260504",
+ "upgrade-weight": 20260504
+ },
+ {
+ "name": "openSUSE Tumbleweed",
+ "version": "20260430",
+ "upgrade-weight": 20260430
+ },
+ {
+ "name": "openSUSE Tumbleweed",
+ "version": "20260429",
+ "upgrade-weight": 20260429
+ },
+ {
+ "name": "openSUSE Tumbleweed",
+ "version": "20260428",
+ "upgrade-weight": 20260428
+ },
+ {
+ "name": "openSUSE Tumbleweed",
+ "version": "20260426",
+ "upgrade-weight": 20260426
+ },
+ {
+ "name": "openSUSE Tumbleweed",
+ "version": "20260425",
+ "upgrade-weight": 20260425
+ },
+ {
+ "name": "openSUSE Tumbleweed",
+ "version": "20260423",
+ "upgrade-weight": 20260423
+ },
+ {
+ "name": "openSUSE Tumbleweed",
+ "version": "20260422",
+ "upgrade-weight": 20260422
+ },
+ {
+ "name": "openSUSE Tumbleweed",
+ "version": "20260420",
+ "upgrade-weight": 20260420
+ },
+ {
+ "name": "openSUSE Tumbleweed",
+ "version": "20260419",
+ "upgrade-weight": 20260419
+ },
+ {
+ "name": "openSUSE Tumbleweed",
+ "version": "20260418",
+ "upgrade-weight": 20260418
+ }
+ ]
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/opensuse-migration-tool-20260421.e72b645/opensuse-migration-tool
new/opensuse-migration-tool-20260517.df4e731/opensuse-migration-tool
--- old/opensuse-migration-tool-20260421.e72b645/opensuse-migration-tool
2026-04-21 09:34:07.000000000 +0200
+++ new/opensuse-migration-tool-20260517.df4e731/opensuse-migration-tool
2026-05-17 16:34:57.000000000 +0200
@@ -54,7 +54,7 @@
# Ensure required tools are installed
# Double check for zypper in case we're on dnf-based system
-REQUIRED_TOOLS=("bc" "jq" "curl" "dialog" "sed" "gawk" "zypper")
+REQUIRED_TOOLS=("bc" "jq" "curl" "sed" "gawk" "zypper")
for tool in "${REQUIRED_TOOLS[@]}"; do
if ! command -v "$tool" &>/dev/null; then
echo "$tool is required but not installed."
@@ -62,6 +62,19 @@
exit 1
fi
done
+
+if [[ -n "${DIALOGCMD:-}" ]] && command -v "$DIALOGCMD" >/dev/null 2>&1; then
+ DIALOGCMD=$(command -v "$DIALOGCMD")
+elif DIALOGCMD=$(command -v susedialog 2>/dev/null); then
+ :
+elif DIALOGCMD=$(command -v dialog 2>/dev/null); then
+ :
+else
+ echo "Neither susedialog nor dialog is installed."
+ echo "Please run: sudo zypper install susedialog"
+ exit 1
+fi
+
# Ensure Bash version is 4.0+
if ((BASH_VERSINFO[0] < 4)); then
echo "This script requires Bash 4.0 or higher." >&2
@@ -73,16 +86,29 @@
exit 2
fi
# Source OS release info
+# shellcheck disable=SC1091
+# shellcheck source=/etc/os-release
source /etc/os-release
+NAME=${NAME:-}
+VERSION=${VERSION:-}
ARCH=$(uname -i) # x86_64 XXX: check for other arches
# Fetch distribution data from API
API_URL="https://get.opensuse.org/api/v0/distributions.json"
-API_DATA=$(curl -s "$API_URL")
-if [ $? != 0 ]; then
- echo "Network error: Unable to fetch release data from
https://get.opensuse.org/api/v0/distributions.json"
+if ! API_DATA=$(curl -s --fail "$API_URL"); then
+ echo "Network error: Unable to fetch release data from $API_URL"
echo "Ensure that you have working network connectivity and
get.opensuse.org is accessible."
- exit 3
+ echo "Trying local fallback distributions.json ..."
+ if [ -f "$SCRIPT_DIR/distributions.json" ]; then
+ echo "[INFO] Using $SCRIPT_DIR/distributions.json"
+ API_DATA=$(cat "$SCRIPT_DIR/distributions.json")
+ elif [ -f "/usr/share/opensuse-migration-tool/distributions.json" ]; then
+ echo "[INFO] Using
/usr/share/opensuse-migration-tool/distributions.json"
+ API_DATA=$(cat "/usr/share/opensuse-migration-tool/distributions.json")
+ else
+ echo "No local distributions.json found. Cannot continue."
+ exit 3
+ fi
fi
DRYRUN=""
TMP_REPO_NAME="tmp-migration-tool-repo" # tmp repo to get sles-release or
openSUSE-repos-*
@@ -101,6 +127,7 @@
echo "Report issues: https://github.com/openSUSE/opensuse-migration-tool"
exit 0
}
+
while [[ $# -gt 0 ]]; do
case $1 in
--dry-run) DRYRUN="echo Would execute: "; shift ;;
@@ -113,7 +140,7 @@
function fetch_versions() {
local filter="$1"
local key="$2"
- jq -r ".${key}[] | select(${filter}) | .version" <<<"$API_DATA"
+ jq -r ".${key}[] | select(${filter}) | .version + \"|\" + .state"
<<<"$API_DATA"
}
function populate_options() {
local key="$1"
@@ -124,10 +151,14 @@
local versions
versions=$(fetch_versions "$filter" "$key")
- while IFS= read -r version; do
+ while IFS="|" read -r version state; do
if (( $(bc <<<"$current_version < $version") )); then
if [[ -z "$min_version" ]] || (( $(bc <<<"$version >=
$min_version") )); then
- MIGRATION_OPTIONS["$CURRENT_INDEX"]="openSUSE $key
$version$suffix"
+ local state_suffix=""
+ if [[ "$state" != "Stable" ]]; then
+ state_suffix=" [$state]"
+ fi
+ MIGRATION_OPTIONS["$CURRENT_INDEX"]="openSUSE $key
$version${state_suffix}$suffix"
MIGRATION_RAW["$CURRENT_INDEX"]="$version"
((CURRENT_INDEX++))
fi
@@ -160,7 +191,7 @@
# Elevated permissions check unless DRYRUN is set
if [ -z "${DRYRUN:-}" ]; then
if [ "$EUID" -ne 0 ]; then
- exec sudo "$0" "$@"
+ exec sudo DIALOGCMD="$DIALOGCMD" "$0" "$@"
fi
# Requires elevated permissions or test will always fail
@@ -184,7 +215,7 @@
MIGRATION_OPTIONS["$CURRENT_INDEX"]="MicroOS"
((CURRENT_INDEX++))
elif [[ "$NAME" == "openSUSE Leap" ]]; then
- MIGRATION_OPTIONS["$CURRENT_INDEX"]="SUSE Linux Enterprise $(sed 's/\./
SP/' <<<"$VERSION")"
+ MIGRATION_OPTIONS["$CURRENT_INDEX"]="SUSE Linux Enterprise ${VERSION/./
SP}"
((CURRENT_INDEX++))
MIGRATION_OPTIONS["$CURRENT_INDEX"]="openSUSE Tumbleweed"
((CURRENT_INDEX++))
@@ -199,7 +230,7 @@
MIGRATION_OPTIONS["$CURRENT_INDEX"]="openSUSE Tumbleweed"
((CURRENT_INDEX++))
else
- dialog --clear \
+ $DIALOGCMD --clear \
--title "[EXPERIMENTAL] System Migration" \
--msgbox "\nMigration from $NAME is currently not supported.\n\nPlease
report issue at https://github.com/openSUSE/opensuse-migration-tool" \
10 60
@@ -208,7 +239,7 @@
# Display migration options
if [[ ${#MIGRATION_OPTIONS[@]} -eq 0 ]]; then
- dialog --clear \
+ $DIALOGCMD --clear \
--title "[EXPERIMENTAL] System Migration" \
--msgbox "\nNo migration options available from $NAME.\n\nPlease report
issue at https://github.com/openSUSE/opensuse-migration-tool." \
10 60
@@ -220,7 +251,7 @@
DIALOG_ITEMS+=("$key" "${MIGRATION_OPTIONS[$key]}")
done
# Display dialog and get choice
-CHOICE=$(dialog --clear \
+CHOICE=$($DIALOGCMD --clear \
--title "[EXPERIMENTAL] System Migration" \
--menu "Select the migration target from $NAME:" \
20 60 10 \
@@ -239,7 +270,7 @@
# Known 3rd party repos with no $releasever or hardcoded version
exceptions=("google-chrome" )
-while IFS="|" read -r num alias name enabled rest; do
+while IFS="|" read -r _ alias name enabled rest; do
alias=$(echo "$alias" | xargs) # trim
name=$(echo "$name" | xargs)
enabled=$(echo "$enabled" | xargs)
@@ -269,7 +300,7 @@
You can deselect any repositories you prefer to keep enabled:
EOF
)
- SELECTED_REPOS=$(dialog --clear \
+ SELECTED_REPOS=$($DIALOGCMD --clear \
--title "Disable Third-Party Repositories" \
--checklist "$checklist_msg" \
20 80 10 \
@@ -288,11 +319,11 @@
*"SUSE Linux Enterprise"*|"SLE")
$DRYRUN echo "Upgrading to ${MIGRATION_OPTIONS[$CHOICE]}"
- SP=$(sed 's/\./-SP/' <<<"$VERSION") # VERSION from /etc/os-release
15.6 -> 15-SP6
+ SP=${VERSION/./-SP} # VERSION from /etc/os-release 15.6 -> 15-SP6
while true; do
# Capture output and return code
- OUTPUT=$(dialog --clear \
+ OUTPUT=$($DIALOGCMD --clear \
--backtitle "SCC - Registration code" \
--title "SCC - Registration code" \
--form "\nPlease enter valid email and registration code."
25 60 16 \
@@ -306,7 +337,7 @@
# Handle cancel or escape
if [[ $RETCODE -ne 0 ]]; then
- dialog --clear \
+ $DIALOGCMD --clear \
--backtitle "SCC - Registration code" \
--title "Operation Cancelled" \
--msgbox "You have cancelled the registration
process." 10 40
@@ -322,7 +353,7 @@
if [[ -n "$EMAIL" && -n "$REGCODE" ]]; then
break
else
- dialog --clear \
+ $DIALOGCMD --clear \
--backtitle "SCC - Registration code" \
--title "Input Error" \
--msgbox "Both email and registration code are
required. Please try again." 10 40
@@ -335,9 +366,8 @@
#$DRYRUN zypper install --force-resolution -y suseconnect-ng
#$DRYRUN zypper install --force-resolution -y
unified-installer-release SLE_BCI-release # sles-release is not in BCI
- MAJVER=$(echo $VERSION| awk -F"." '{ print $1 }') # 15
- MINVER=$(echo $VERSION| awk -F"." '{ print $2 }') # 6
- echo $REGCODE
+ MAJVER=${VERSION%%.*} # 15
+ MINVER=${VERSION#*.} # 6
$DRYRUN zypper install -y suseconnect-ng snapper
grub2-snapper-plugin
# Backup /etc/os-release before release package removal
echo "Backing up /etc/os-release as /etc/os-release.backup"
@@ -368,11 +398,10 @@
$DRYRUN rm -r /etc/products.d/baseproduct
$DRYRUN ln -s /etc/products.d/SLES.prod /etc/products.d/baseproduct
- $DRYRUN suseconnect -e $EMAIL -r $REGCODE
- $DRYRUN SUSEConnect -p PackageHub/$VERSION/$ARCH
+ $DRYRUN suseconnect -e "$EMAIL" -r "$REGCODE"
+ $DRYRUN SUSEConnect -p "PackageHub/$VERSION/$ARCH"
- $DRYRUN zypper dup -y --force-resolution --allow-vendor-change
--download in-advance
- if [ $? -ne 0 ]; then # re-run zypper dup as interactive in case
of failure in non-interactive mode
+ if ! $DRYRUN zypper dup -y --force-resolution
--allow-vendor-change --download in-advance; then # re-run zypper dup as
interactive in case of failure in non-interactive mode
$DRYRUN zypper dup --force-resolution --allow-vendor-change
--download in-advance
fi
@@ -395,13 +424,12 @@
exit 1
fi
fi
- $DRYRUN zypper addrepo -f $REPOURL $TMP_REPO_NAME
+ $DRYRUN zypper addrepo -f "$REPOURL" $TMP_REPO_NAME
$DRYRUN zypper install --repo $TMP_REPO_NAME -y --force-resolution
--from $TMP_REPO_NAME openSUSE-repos-Tumbleweed # install repos from the
nextrelease
$DRYRUN zypper removerepo $TMP_REPO_NAME # drop the temp repo, we
have now definitions of all repos we need
$DRYRUN zypper refresh-services # !Important! make sure that all
repo files under index service were regenerated
- $DRYRUN zypper dup -y --force-resolution --allow-vendor-change
--download in-advance
- if [ $? -ne 0 ]; then # re-run zypper dup as interactive in case
of failure in non-interactive mode
+ if ! $DRYRUN zypper dup -y --force-resolution
--allow-vendor-change --download in-advance; then # re-run zypper dup as
interactive in case of failure in non-interactive mode
$DRYRUN zypper dup --force-resolution --allow-vendor-change
--download in-advance
fi
@@ -419,8 +447,7 @@
$DRYRUN zypper refresh-services # !Important! make sure that all
repo files under index service were regenerated
# --allow-downgrade is important in case that you choose Tumblweed
-> Slowroll migration
- $DRYRUN zypper dup -y --force-resolution --allow-downgrade
--allow-vendor-change --download in-advance
- if [ $? -ne 0 ]; then # re-run zypper dup as interactive in case
of failure in non-interactive mode
+ if ! $DRYRUN zypper dup -y --force-resolution --allow-downgrade
--allow-vendor-change --download in-advance; then # re-run zypper dup as
interactive in case of failure in non-interactive mode
$DRYRUN zypper dup --force-resolution --allow-downgrade
--allow-vendor-change --download in-advance
fi
;;
@@ -428,37 +455,35 @@
# Has to be before Leap*
$DRYRUN echo "Upgrading to ${MIGRATION_OPTIONS[$CHOICE]}"
# !Important to use MIGRATION_RAW as otherwise MIGRATION_OPTIONS
have tips and other decorations
- TARGET_VER=`echo ${MIGRATION_RAW[$CHOICE]} | awk '{ print $NF }'`
- $DRYRUN zypper addrepo -f
https://download.opensuse.org/distribution/leap-micro/$TARGET_VER/product/repo/openSUSE-Leap-Micro-$TARGET_VER-$ARCH/
$TMP_REPO_NAME
+ TARGET_VER="${MIGRATION_RAW[$CHOICE]}"
+ $DRYRUN zypper addrepo -f
"https://download.opensuse.org/distribution/leap-micro/$TARGET_VER/product/repo/openSUSE-Leap-Micro-$TARGET_VER-$ARCH/"
$TMP_REPO_NAME
$DRYRUN zypper install --repo $TMP_REPO_NAME -y --force-resolution
--from $TMP_REPO_NAME openSUSE-repos-LeapMicro # install repos from the
nextrelease
$DRYRUN zypper removerepo $TMP_REPO_NAME # drop the temp repo, we
have now definitions of all repos we need
$DRYRUN zypper refresh-services # !Important! make sure that all
repo files under index service were regenerated
- $DRYRUN zypper --releasever $TARGET_VER dup -y --force-resolution
--allow-vendor-change --download in-advance
- if [ $? -ne 0 ]; then # re-run zypper dup as interactive in case
of failure in non-interactive mode
- $DRYRUN zypper --releasever $TARGET_VER dup --force-resolution
--allow-vendor-change --download in-advance
+ if ! $DRYRUN zypper --releasever "$TARGET_VER" dup -y
--force-resolution --allow-vendor-change --download in-advance; then # re-run
zypper dup as interactive in case of failure in non-interactive mode
+ $DRYRUN zypper --releasever "$TARGET_VER" dup
--force-resolution --allow-vendor-change --download in-advance
fi
;;
*"openSUSE Leap"*)
$DRYRUN echo "Upgrading to ${MIGRATION_OPTIONS[$CHOICE]}"
- TARGET_VER=`echo ${MIGRATION_RAW[$CHOICE]} | awk '{ print $NF }'`
+ TARGET_VER="${MIGRATION_RAW[$CHOICE]}"
if [ "$ARCH" == "x86_64" ] && [[ ${TARGET_VER%.*} -ge 16 ]] && !
check_x86_64_v2_support; then
#echo "Unsupported CPU for openSUSE Leap $TARGET_VER"
- dialog --clear \
+ $DIALOGCMD --clear \
--title "System Migration - Unsupported architecture" \
--msgbox "\n${MIGRATION_OPTIONS[$CHOICE]} does not support your CPU
architecture. The minimum baseline is x86_64-v2.\n\nSee
https://en.opensuse.org/openSUSE:X86-64-Architecture-Levels" \
10 60
reset; exit 1
fi
- $DRYRUN zypper addrepo -f
https://download.opensuse.org/distribution/leap/$TARGET_VER/repo/oss
$TMP_REPO_NAME
+ $DRYRUN zypper addrepo -f
"https://download.opensuse.org/distribution/leap/$TARGET_VER/repo/oss"
$TMP_REPO_NAME
$DRYRUN zypper install --repo $TMP_REPO_NAME -y --force-resolution
--from $TMP_REPO_NAME openSUSE-repos-Leap # install repos from the nextrelease
$DRYRUN zypper removerepo $TMP_REPO_NAME # drop the temp repo, we
have now definitions of all repos we need
$DRYRUN zypper refresh-services # !Important! make sure that all
repo files under index service were regenerated
- $DRYRUN zypper --releasever $TARGET_VER dup -y --force-resolution
--allow-vendor-change --download-in-advance
- if [ $? -ne 0 ]; then # re-run zypper dup as interactive in case
of failure in non-interactive mode
- $DRYRUN zypper --releasever $TARGET_VER dup --force-resolution
--allow-vendor-change --download-in-advance
+ if ! $DRYRUN zypper --releasever "$TARGET_VER" dup -y
--force-resolution --allow-vendor-change --download-in-advance; then # re-run
zypper dup as interactive in case of failure in non-interactive mode
+ $DRYRUN zypper --releasever "$TARGET_VER" dup
--force-resolution --allow-vendor-change --download-in-advance
fi
;;
*"MicroOS-Slowroll"*)
@@ -478,8 +503,7 @@
$DRYRUN zypper refresh-services # !Important! make sure that all
repo files under index service were regenerated
# --allow-downgrade is important in case that you choose MicroOS
-> MicroOS-Slowroll migration
- $DRYRUN zypper dup -y --force-resolution --allow-downgrade
--allow-vendor-change --download in-advance
- if [ $? -ne 0 ]; then # re-run zypper dup as interactive in case
of failure in non-interactive mode
+ if ! $DRYRUN zypper dup -y --force-resolution --allow-downgrade
--allow-vendor-change --download in-advance; then # re-run zypper dup as
interactive in case of failure in non-interactive mode
$DRYRUN zypper dup --force-resolution --allow-downgrade
--allow-vendor-change --download in-advance
fi
;;
@@ -487,7 +511,7 @@
$DRYRUN echo "Upgrading to ${MIGRATION_OPTIONS[$CHOICE]}"
REPOURL="https://download.opensuse.org/tumbleweed/repo/oss/"
if [ "$ARCH" != "x86_64" ]; then
-
REPOURL=https://download.opensuse.org/ports/$ARCH/tumbleweed/repo/oss # XXX
this will likely work only for aarch64
+
REPOURL="https://download.opensuse.org/ports/$ARCH/tumbleweed/repo/oss" # XXX
this will likely work only for aarch64
if [ "$ARCH" != "aarch64" ]; then
# Let's not messup any systems and make sure this is
properly implemented first
echo "Unsupported arch '$ARCH'."
@@ -496,13 +520,12 @@
exit 1
fi
fi
- $DRYRUN zypper addrepo -f $REPOURL $TMP_REPO_NAME
+ $DRYRUN zypper addrepo -f "$REPOURL" $TMP_REPO_NAME
$DRYRUN zypper install --repo $TMP_REPO_NAME -y
--force-resolution --from $TMP_REPO_NAME openSUSE-repos-MicroOS # install repos
from the nextrelease
$DRYRUN zypper removerepo $TMP_REPO_NAME # drop the temp repo, we
have now definitions of all repos we need
$DRYRUN zypper refresh-services # !Important! make sure that all
repo files under index service were regenerated
- $DRYRUN zypper dup -y --force-resolution --allow-vendor-change
--download in-advance
- if [ $? -ne 0 ]; then # re-run zypper dup as interactive in case
of failure in non-interactive mode
+ if ! $DRYRUN zypper dup -y --force-resolution
--allow-vendor-change --download in-advance; then # re-run zypper dup as
interactive in case of failure in non-interactive mode
$DRYRUN zypper dup --force-resolution --allow-vendor-change
--download in-advance
fi
;;
@@ -533,7 +556,7 @@
for key in "${!AVAILABLE_TASKS[@]}"; do
CHECKLIST_ITEMS+=("$key" "${AVAILABLE_TASKS[$key]}" "off")
done
- SELECTED_TASKS=$(dialog --clear \
+ SELECTED_TASKS=$($DIALOGCMD --clear \
--title "Post-Migration Optional Tasks" \
--checklist "Select tasks to run after system upgrade:" \
20 70 10 \
@@ -545,17 +568,17 @@
# Basic ordering of execution
# We use prefixes and simple string comparison e.g. scripts/05_script.sh ...
-sorted_selected_tasks=$(echo $SELECTED_TASKS | tr ' ' '\n' | sort)
+sorted_selected_tasks=$(echo "$SELECTED_TASKS" | tr ' ' '\n' | sort)
for task in $sorted_selected_tasks; do
SCRIPT="$POST_MIGRATION_DIR/$task.sh"
echo "[INFO] Running post-migration task: $task"
- $DRYRUN $SCRIPT
+ $DRYRUN "$SCRIPT"
done
if [[ -n "$DRYRUN" ]] ; then
echo "Dry run completed, feel free to continue. "
else
-#dialog --clear \
+#$DIALOGCMD --clear \
# --backtitle "[EXPERIMENTAL] Migration tool" \
# --title "Migration process completed" \
# --msgbox "\nMigration process completed.\nA reboot is recommended." 10 40
++++++ opensuse-migration-tool.obsinfo ++++++
--- /var/tmp/diff_new_pack.FGIwvH/_old 2026-05-19 17:50:48.689732226 +0200
+++ /var/tmp/diff_new_pack.FGIwvH/_new 2026-05-19 17:50:48.693732391 +0200
@@ -1,5 +1,5 @@
name: opensuse-migration-tool
-version: 20260421.e72b645
-mtime: 1776756847
-commit: e72b6454dc1c79575ba5961e382249eec9135b3f
+version: 20260517.df4e731
+mtime: 1779028497
+commit: df4e731200894571a9e30334c7765243e3fd6a4e