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 2025-07-30 11:45:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/opensuse-migration-tool (Old)
 and      /work/SRC/openSUSE:Factory/.opensuse-migration-tool.new.13279 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "opensuse-migration-tool"

Wed Jul 30 11:45:19 2025 rev:7 rq:1296382 version:20250729.4ed6ec5

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/opensuse-migration-tool/opensuse-migration-tool.changes
  2025-05-22 16:57:36.159784478 +0200
+++ 
/work/SRC/openSUSE:Factory/.opensuse-migration-tool.new.13279/opensuse-migration-tool.changes
       2025-07-30 11:46:28.649454926 +0200
@@ -1,0 +2,8 @@
+Tue Jul 29 13:04:12 UTC 2025 - opensuse-releaset...@opensuse.org
+
+- Update to version 20250729.4ed6ec5:
+  * Add a screen to disable 3rd party repos
+  * Add post-migration script support #30
+  * Drop --pre-release flag completely
+
+-------------------------------------------------------------------

Old:
----
  opensuse-migration-tool-20250521.ab8700a.obscpio

New:
----
  opensuse-migration-tool-20250729.4ed6ec5.obscpio

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ opensuse-migration-tool.spec ++++++
--- /var/tmp/diff_new_pack.4NOhL5/_old  2025-07-30 11:46:29.325482890 +0200
+++ /var/tmp/diff_new_pack.4NOhL5/_new  2025-07-30 11:46:29.325482890 +0200
@@ -19,7 +19,7 @@
 
 
 Name:           opensuse-migration-tool
-Version:        20250521.ab8700a
+Version:        20250729.4ed6ec5
 Release:        0
 Summary:        Migration and Upgrade tool for openSUSE
 License:        Apache-2.0
@@ -50,12 +50,19 @@
 mkdir -p %{buildroot}/%{_datadir}/%{name}
 cp SLES.prod %{buildroot}/%{_datadir}/%{name}/SLES.prod
 
+# Install scripts directory
+cp -a scripts %{buildroot}/%{_datadir}/%{name}/
+
 %check
 
 %files
 %defattr(644,root,root,755)
 %attr(0755, root, root) %{_sbindir}/%{name}
 %{_datadir}/%{name}
+%{_datadir}/%{name}/scripts
+%dir %{_datadir}/%{name}
+%dir %{_datadir}/%{name}/scripts
+%attr(0755, root, root) %{_datadir}/%{name}/scripts/*
 %attr(0644, root, root) %{_datadir}/%{name}/SLES.prod
 
 %license LICENSE

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.4NOhL5/_old  2025-07-30 11:46:29.365484545 +0200
+++ /var/tmp/diff_new_pack.4NOhL5/_new  2025-07-30 11:46:29.369484711 +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">ab8700ab2ffe64b80bc21f20ff554b74e91ed8b0</param></service></servicedata>
+              <param 
name="changesrevision">4ed6ec561640b43eadfdcf2fb6b0474816a97b65</param></service></servicedata>
 (No newline at EOF)
 

++++++ opensuse-migration-tool-20250521.ab8700a.obscpio -> 
opensuse-migration-tool-20250729.4ed6ec5.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/opensuse-migration-tool-20250521.ab8700a/opensuse-migration-tool 
new/opensuse-migration-tool-20250729.4ed6ec5/opensuse-migration-tool
--- old/opensuse-migration-tool-20250521.ab8700a/opensuse-migration-tool        
2025-05-21 12:29:53.000000000 +0200
+++ new/opensuse-migration-tool-20250729.4ed6ec5/opensuse-migration-tool        
2025-07-29 15:01:42.000000000 +0200
@@ -19,6 +19,30 @@
 # For accessing files from git checkout
 SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
 
+# Script dir for git-based execution
+POST_MIGRATION_DIR="$SCRIPT_DIR/scripts"
+
+# Migration scripts naming convention:
+# Prefix numbers define execution order. Inspired by /etc/grub.d
+# Use multiples of 5 or 10 for flexibility, e.g.:
+#   05_ for very core low-level tasks,
+#   20_ for pulse2pipewire migration,
+#   30_ and above for desktop environment or user session tweaks.
+#
+# Example:
+#   20_pulse2pipewire.sh  # Switch PulseAudio to PipeWire early but after core 
system tasks.
+
+# Fallback to installed location if not found
+if [[ ! -d "$POST_MIGRATION_DIR" ]]; then
+    POST_MIGRATION_DIR="/usr/share/opensuse-migration-tool/scripts"
+fi
+
+# Warn if not found at all
+if [[ ! -d "$POST_MIGRATION_DIR" ]]; then
+    echo "[ERROR] Post-migration script directory not found: 
$POST_MIGRATION_DIR"
+    exit 1
+fi
+
 # Set nice green instead of default blue
 
 if [[ $COLORTERM =~ ^(truecolor|24bit)$ ]]; then
@@ -30,7 +54,8 @@
 fi
 
 # Ensure required tools are installed
-REQUIRED_TOOLS=("bc" "jq" "curl" "dialog" "sed" "gawk")
+# Double check for zypper in case we're on dnf-based system
+REQUIRED_TOOLS=("bc" "jq" "curl" "dialog" "sed" "gawk" "zypper")
 for tool in "${REQUIRED_TOOLS[@]}"; do
     if ! command -v "$tool" &>/dev/null; then
         echo "$tool is required but not installed."
@@ -61,22 +86,23 @@
     exit 3
 fi
 DRYRUN=""
-PRERELEASE=""
 TMP_REPO_NAME="tmp-migration-tool-repo" # tmp repo to get sles-release or 
openSUSE-repos-*
 # Initialize MIGRATION_OPTIONS as an empty associative array
 declare -A MIGRATION_OPTIONS=()
+declare -A AVAILABLE_TASKS=()
+
 CURRENT_INDEX=1
 # Parse command-line arguments
 function print_help() {
-    echo "Usage: opensuse-migration-tool [--pre-release] [--dry-run] [--help]"
-    echo "  --pre-release  Include pre-release versions in the migration 
options."
+    echo "Usage: opensuse-migration-tool [--dry-run] [--help]"
     echo "  --dry-run      Show commands without executing them."
     echo "  --help         Show this help message and exit."
+    echo
+    echo "Report issues: https://github.com/openSUSE/opensuse-migration-tool";
     exit 0
 }
 while [[ $# -gt 0 ]]; do
     case $1 in
-        --pre-release) PRERELEASE="YES"; shift ;;
         --dry-run) DRYRUN="echo Would execute: "; shift ;;
         --help) print_help ;;
         *) echo "Unknown option: $1"; exit 1 ;;
@@ -139,11 +165,7 @@
 if [[ "$NAME" == "openSUSE Leap Micro" ]]; then
     MIGRATION_OPTIONS["$CURRENT_INDEX"]="MicroOS"
     ((CURRENT_INDEX++))
-    if [[ $PRERELEASE ]]; then
-        populate_options "LeapMicro" "$VERSION" '.state!="EOL"'
-    else
-        populate_options "LeapMicro" "$VERSION" '.state=="Stable"'
-    fi
+    populate_options "LeapMicro" "$VERSION" '.state!="EOL"'
 elif [[ "$NAME" == "openSUSE Leap" ]]; then
     MIGRATION_OPTIONS["$CURRENT_INDEX"]="SUSE Linux Enterprise $(sed 's/\./ 
SP/' <<<"$VERSION")"
     ((CURRENT_INDEX++))
@@ -151,11 +173,7 @@
     ((CURRENT_INDEX++))
     MIGRATION_OPTIONS["$CURRENT_INDEX"]="openSUSE Tumbleweed-Slowroll"
     ((CURRENT_INDEX++))
-    if [[ $PRERELEASE ]]; then
-        populate_options "Leap" "$VERSION" '.state!="EOL"'
-    else
-        populate_options "Leap" "$VERSION" '.state=="Stable"'
-    fi
+    populate_options "Leap" "$VERSION" '.state!="EOL"'
 elif [[ "$NAME" == "openSUSE Tumbleweed" ]]; then
    MIGRATION_OPTIONS["$CURRENT_INDEX"]="openSUSE Tumbleweed-Slowroll"
    ((CURRENT_INDEX++))
@@ -178,8 +196,6 @@
        --msgbox "\nNo migration options available from $NAME.\n\nPlease report 
issue at https://github.com/openSUSE/opensuse-migration-tool."; \
     10 60
     reset; exit 1
-    echo "."
-
 fi
 # Prepare dialog items
 DIALOG_ITEMS=()
@@ -227,8 +243,57 @@
     fi
 done
 }
-# Clear the screen and handle the user choice
-clear
+
+# Step: Detect and offer to disable 3rd-party repositories
+# This is the #1 reason for failed migration
+REPO_LIST=()
+
+# Known 3rd party repos with no $releasever or hardcoded version
+exceptions=("google-chrome" )
+
+while IFS="|" read -r num alias name enabled rest; do
+    alias=$(echo "$alias" | xargs)  # trim
+    name=$(echo "$name" | xargs)
+    enabled=$(echo "$enabled" | xargs)
+
+    if [[ "$enabled" == "Yes" ]] && \
+       [[ ! "$alias" =~ ^(openSUSE:|NVIDIA:) ]]; then
+        if [[ " ${exceptions[*]} " == *" $alias "* ]]; then
+            REPO_LIST+=("$alias" "$name" "off")
+        else
+            REPO_LIST+=("$alias" "$name" "on")
+        fi
+    fi
+done < <(zypper lr -E -d --uri | tail -n +3 | awk -F '|' '{print $1 "|" $2 "|" 
$3 "|" $4}')
+
+if [[ ${#REPO_LIST[@]} -eq 0 ]]; then
+    echo "[INFO] No third-party repositories to disable."
+else
+    checklist_msg=$(
+cat <<EOF
+The following enabled repositories are not recognized.
+It is strongly recommended to disable them before proceeding with the 
migration.
+
+Such repositories often have hardcoded URLs or may not yet offer packages
+for the target release. This can cause \`zypper dup\` to fail if a repository
+is unreachable or incompatible.
+
+You can deselect any repositories you prefer to keep enabled:
+EOF
+)
+    SELECTED_REPOS=$(dialog --clear \
+        --title "Disable Third-Party Repositories" \
+        --checklist "$checklist_msg" \
+        20 80 10 \
+        "${REPO_LIST[@]}" \
+        2>&1 >/dev/tty)
+
+    for repo in $SELECTED_REPOS; do
+        echo "[INFO] Disabling repository: $repo"
+        $DRYRUN zypper --non-interactive modifyrepo -d "$repo"
+    done
+fi
+
 if [[ -n $CHOICE ]]; then
     echo "Selected option: ${MIGRATION_OPTIONS[$CHOICE]}"
     case "${MIGRATION_OPTIONS[$CHOICE]}" in
@@ -291,9 +356,6 @@
             $DRYRUN cp /etc/os-release /etc/os-release.backup
             $DRYRUN rpm -e --nodeps openSUSE-release
             $DRYRUN rpm -e --nodeps openSUSE-repos
-             # Backup the release
-            echo "Backing up /etc/os-release as /etc/os-release.backup"
-            $DRYRUN cp /etc/os-release /etc/os-release.backup
             if [ -z "$DRYRUN" ]; then
                 cat > /etc/os-release  << EOL
 NAME="SLES" 
@@ -311,11 +373,10 @@
             fi
 
                        if [ -f  "$SCRIPT_DIR/SLES.prod" ]; then
-                               $DRYRUN cp $SCRIPT_DIR/SLES.prod /etc/products.d
+                               $DRYRUN cp "$SCRIPT_DIR/SLES.prod" 
/etc/products.d
                        else
                                $DRYRUN cp 
/usr/share/opensuse-migration-tool/SLES.prod /etc/products.d
                        fi
-               $DRYRUN cp SLES.prod /etc/products.d/
             $DRYRUN rm -r /etc/products.d/baseproduct
             $DRYRUN ln -s /etc/products.d/SLES.prod /etc/products.d/baseproduct
             if [ -z "$DRYRUN" ]; then
@@ -443,6 +504,43 @@
     exit 1
 fi
 
+# Migration scripts, keep the desc short
+
+for script in "$POST_MIGRATION_DIR"/*.sh; do
+    name=$(basename "$script" .sh)
+    if "$script" --check; then
+        case "$name" in
+            "20_pulse2pipewire") desc="Switch to PipeWire" ;;
+            *)                   desc="Run $name" ;;
+        esac
+        AVAILABLE_TASKS["$name"]="$desc"
+    fi
+done
+
+if [[ ${#AVAILABLE_TASKS[@]} -gt 0 ]]; then
+    CHECKLIST_ITEMS=()
+    for key in "${!AVAILABLE_TASKS[@]}"; do
+        CHECKLIST_ITEMS+=("$key" "${AVAILABLE_TASKS[$key]}" "on")
+    done
+    SELECTED_TASKS=$(dialog --clear \
+        --title "Post-Migration Optional Tasks" \
+        --checklist "Select tasks to run after system upgrade:" \
+        20 70 10 \
+        "${CHECKLIST_ITEMS[@]}" \
+        2>&1 >/dev/tty)
+else
+    echo "[INFO] No available post-migration tasks."
+fi
+
+# 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)
+for task in $sorted_selected_tasks; do
+    SCRIPT="$POST_MIGRATION_DIR/$task.sh"
+    echo "[INFO] Running post-migration task: $task"
+    $DRYRUN $SCRIPT
+done
+
 #dialog --clear \
 #    --backtitle "[EXPERIMENTAL] Migration tool" \
 #    --title "Migration process completed" \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/opensuse-migration-tool-20250521.ab8700a/scripts/20_pulse2pipewire.sh 
new/opensuse-migration-tool-20250729.4ed6ec5/scripts/20_pulse2pipewire.sh
--- old/opensuse-migration-tool-20250521.ab8700a/scripts/20_pulse2pipewire.sh   
1970-01-01 01:00:00.000000000 +0100
+++ new/opensuse-migration-tool-20250729.4ed6ec5/scripts/20_pulse2pipewire.sh   
2025-07-29 15:01:42.000000000 +0200
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+# Pipewire is the new default in Leap 16.0+
+# https://code.opensuse.org/leap/features/issue/140
+# https://en.opensuse.org/openSUSE:Pipewire#Installation
+
+set -euo pipefail
+
+log() {
+    echo "[MIGRATION] $1"
+}
+
+error_exit() {
+    echo "[MIGRATION][ERROR] $1" >&2
+    exit 1
+}
+
+# This is used to generate dynamic list of tasks
+if [[ "${1:-}" == "--check" ]]; then
+    if rpm -q pulseaudio &>/dev/null && zypper se -x pipewire-pulseaudio 
&>/dev/null; then
+        exit 0
+    else
+        exit 1
+    fi
+fi
+
+log "Starting PulseAudio to PipeWire migration..."
+
+# Check if pipewire-pulseaudio is already installed
+if rpm -q pipewire-pulseaudio >/dev/null 2>&1; then
+    log "Package pipewire-pulseaudio is already installed. Skipping."
+    exit 0
+fi
+
+# Check if pulseaudio was ever installed
+if ! rpm -q pulseaudio >/dev/null 2>&1; then
+    log "Package pulseaudio is not installed. Assuming minimal system. 
Skipping."
+    exit 0
+fi
+
+log "Installing packages: pipewire-pulseaudio and ensure 
wireplumber-video-only-profile is removed"
+if sudo zypper --non-interactive install --force-resolution 
pipewire-pulseaudio -wireplumber-video-only-profile; then
+    log "Migration completed successfully."
+else
+    error_exit "Package installation failed. Please check zypper logs or try 
again manually."
+fi

++++++ opensuse-migration-tool.obsinfo ++++++
--- /var/tmp/diff_new_pack.4NOhL5/_old  2025-07-30 11:46:29.485489509 +0200
+++ /var/tmp/diff_new_pack.4NOhL5/_new  2025-07-30 11:46:29.489489675 +0200
@@ -1,5 +1,5 @@
 name: opensuse-migration-tool
-version: 20250521.ab8700a
-mtime: 1747823393
-commit: ab8700ab2ffe64b80bc21f20ff554b74e91ed8b0
+version: 20250729.4ed6ec5
+mtime: 1753794102
+commit: 4ed6ec561640b43eadfdcf2fb6b0474816a97b65
 

Reply via email to