openSUSE / migration-tool

openSUSE migration tool
Apache License 2.0
0 stars 1 forks source link

failure: Leap 15.6 -> SLE 15 SP6 #1

Closed mmaslano closed 6 days ago

mmaslano commented 1 week ago

1) zypper in suseconnect-ng 2) suseconnect -r YOUR_CODE 3) suseconnect -p sle-module-basesystem/15.6/x86_64 It complains: Error: Registration server returned 'The product you are attempting to activate (Server Applications Module 15 SP6 x86_64) requires one of these products to be activated first: Server 4) suseconnect -p sle-module-server-applications/15.6/x86_64 It complains : Error: Registration server returned 'The product you are attempting to activate (Server Applications Module 15 SP6 x86_64) requires one of these products to be activated first: Basesystem Module 15 SP6 x86_64' (422)

Only one product can be activated at the time. In registered SLE it does work automatically, one product will activate other necessary.

Also suseconnect --list-extensions doesn't list any products, so something else need to be done first. Adjusting /etc/os-release didn't help.

yast2-migration module is doing that without issues (tested on the same virtual machine).

lkocman commented 1 week ago

The trick is to install sles-release (or rewrite /etc/os-release) first, otherwise suseconnect will register system as Leap and not SLES. Registration itself will enable initial set of modules including Basystem.

localhost:/home/test # cat /etc/os-release 
NAME="SLES"
VERSION="15-SP6"
VERSION_ID="15.6"
PRETTY_NAME="SUSE Linux Enterprise Server 15 SP6"
ID="sles"
ID_LIKE="suse"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sles:15:sp6"
DOCUMENTATION_URL="https://documentation.suse.com/"

You can also get rid of leap repos in a similar fashion that we do in openSUSE-repos https://build.opensuse.org/projects/Base:System/packages/openSUSE-repos/files/openSUSE-repos.spec?expand=1

for repo_file in \
repo-backports-debug-update.repo repo-oss.repo repo-backports-update.repo \
repo-sle-debug-update.repo repo-debug-non-oss.repo repo-sle-update.repo \
repo-debug.repo repo-source.repo repo-debug-update.repo repo-update.repo \
repo-debug-update-non-oss.repo repo-update-non-oss.repo repo-non-oss.repo \
download.opensuse.org-oss.repo download.opensuse.org-non-oss.repo download.opensuse.org-tumbleweed.repo \
repo-openh264.repo openSUSE-*-0.repo repo-main.repo; do
  if [ -f %{_sysconfdir}/zypp/repos.d/$repo_file ]; then
    echo "Content of $repo_file will be newly managed by zypp-services."
    echo "Storing old copy as %{_sysconfdir}/zypp/repos.d/$repo_file.rpmsave"
    mv %{_sysconfdir}/zypp/repos.d/$repo_file %{_sysconfdir}/zypp/repos.d/$repo_file.rpmsave
  fi

I did use zypper dup --allow-vendor-change --force-resolution -yto do migration.

The branding did not get exchanged, so you might need to ensure that these packages are reinstalled manually.

I'd also enable PackageHUB module after each migration to SLES.

mmaslano commented 1 week ago

Installation of the release package worked. Changing only the /etc/os-release didn't. Maybe more files or directories need to be created. Thanks for tip.

mmaslano commented 6 days ago

Last issue is branding: rpm -qa | grep brand PackageKit-branding-openSUSE-42.1-lp156.4.2.noarch libsocialweb-branding-openSUSE-42.1-bp156.3.1.noarch NetworkManager-branding-openSUSE-42.1-lp156.4.2.noarch plymouth-branding-SLE-15-150600.43.4.noarch gtk3-branding-openSUSE-15.0-lp156.3.3.noarch gtk2-branding-SLE-15.0-150400.13.7.noarch MozillaFirefox-branding-openSUSE-68-lp156.9.2.x86_64 branding-SLE-15-150600.43.4.noarch gdm-branding-openSUSE-15.1-lp156.3.2.noarch hicolor-icon-theme-branding-openSUSE-42.1-bp156.3.1.noarch libreoffice-branding-openSUSE-15.6.20240408-lp156.1.2.noarch systemd-presets-branding-SLE-15.1-150600.33.1.noarch systemd-default-settings-branding-SLE-0.10-150300.3.7.1.noarch gio-branding-SLE-15-150600.35.2.1.noarch icewm-theme-branding-1.2.5-150300.5.6.2.noarch gnome-menus-branding-openSUSE-42.1-lp156.3.2.noarch gtk4-branding-openSUSE-15.0-lp156.3.4.noarch grub2-branding-SLE-15-150600.43.4.noarch wallpaper-branding-SLE-15-150600.43.4.noarch

I used zypper install --force-resolution --allow-vendor-change rpm -qa | grep branding-openSUSE | sed "s/-openSUSE.*/-SLE/" | tr '\n' ' ' but it does't replace openSUSE branding and some are unavailable in SLE.

The good thing is that wallpaper and grub contains SLE branding, so it's not confusing for user.

mmaslano commented 6 days ago

Resolved branding best as could. Some openSUSE branding can't be removed because it's not sure what channels would user use.