Skip to content

Instantly share code, notes, and snippets.

@oleksis
Last active June 25, 2023 01:53
Show Gist options
  • Save oleksis/8cb48edd682c8adf818da2d097ae2979 to your computer and use it in GitHub Desktop.
Save oleksis/8cb48edd682c8adf818da2d097ae2979 to your computer and use it in GitHub Desktop.
Update openSUSE 15.3 to 15.4

Update openSUSE 15.3 to 15.4

Check current version

$ cat /etc/os-release
NAME="openSUSE Leap"
VERSION="15.3"
ID="opensuse-leap"
ID_LIKE="suse opensuse"
VERSION_ID="15.3"
PRETTY_NAME="openSUSE Leap 15.3"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:leap:15.3"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"

Refresh repository

$ sudo zypper ref -b

Update repository

$ sudo zypper up -y

List repos

$ sudo zypper repos --uri

Verify that we can get 15.4 version

Show enabled only

$ sudo zypper --releasever=15.4 lr -uE

Note Check the repo file contain the $releasever variable.

$ sudo cat /etc/zypp/repos.d/repo-oss.repo
[repo-oss]
name=Main Repository
enabled=1
autorefresh=1
baseurl=http://download.opensuse.org/distribution/leap/$releasever/repo/oss/
type=rpm-md
[sudo] password for root:
Warning: Enforced setting: $releasever=15.4
Repository priorities are without effect. All enabled repositories share the same priority.

#  | Alias                 | Name                                                         | Enabled | GPG Check | Refresh | URI
---+-----------------------+--------------------------------------------------------------+---------+-----------+---------+------------------------------------------------------------------
 3 | repo-backports-update | Update repository of openSUSE Backports                      | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/update/leap/15.4/backports/
 8 | repo-non-oss          | Non-OSS Repository                                           | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/distribution/leap/15.4/repo/non-oss/
 9 | repo-oss              | Main Repository                                              | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/distribution/leap/15.4/repo/oss/
11 | repo-sle-update       | Update repository with updates from SUSE Linux Enterprise 15 | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/update/leap/15.4/sle/
13 | repo-update           | Main Update Repository                                       | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/update/leap/15.4/oss/
14 | repo-update-non-oss   | Update Repository (Non-Oss)                                  | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/update/leap/15.4/non-oss/

Refresh all repositories to 15.4

$ sudo zypper --releasever=15.4 ref

Update the distro to 15.4

$ sudo zypper --releasever=15.4 dup -y

Check

$ cat /etc/os-release
NAME="openSUSE Leap"
VERSION="15.4 Alpha"
ID="opensuse-leap"
ID_LIKE="suse opensuse"
VERSION_ID="15.4"
PRETTY_NAME="openSUSE Leap 15.4 Alpha"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:leap:15.4"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"

Note

If you get errors from the above command, the upstream repo has a different name than what you defined in our .repo file. Visit the OBS repository to find the correct name and add it to the .repo file.

Replace old release string with release variable

$ sudo sed -i 's/15.4/\$releasever/g' /etc/zypp/repos.d/*
@ulfmichel
Copy link

I do not know if I am in the right place here, but I have a problem after upgrading from 15.3 to 15.4 (live upgrade).
Instead of the login screen I see a black screen with the mouse arrow.
After opening a new window with ctrl+alt+F1 I can login to a text window and after entering
startx
I can work (probably almost) normal.
What might be wrong in my installation?

@radoeka
Copy link

radoeka commented Jul 24, 2022

Did anyone run into the same as I do: the upgrade from 15.3 to 15.4 proposes to install 2744(!) texlive related package. Does anyone know how I can prevent this? Or what causes this influx of texlive related packages?

@oleksis
Copy link
Author

oleksis commented Jul 24, 2022

@ulfmichel you can share more info like Desktop environment (Gnome or KDE), Graphic card, Xorg or Wayland ?

@ulfmichel
Copy link

KDE, CPU integrated graphics chip Intel UHD Graphics 620, Xorg.

@Yomexidine1
Copy link

Nice project update

@ulfmichel
Copy link

ulfmichel commented Sep 1, 2022

@tomschr
Copy link

tomschr commented Feb 16, 2023

This is a nice summary. However, you assume those repos contain the $releasever variable. Unfortunately, this is not always the case. If you have a baseurl which doesn't contain this variable, a zypper --releasever=15.4 dup -y won't affect this.

Maybe add another step to ensure any literal "15.x" is replaced by $releasever?

@oleksis
Copy link
Author

oleksis commented Feb 16, 2023

@tomschr yes you can check the repo file contain the $releasever variable.

$ sudo cat /etc/zypp/repos.d/repo-oss.repo
[repo-oss]
name=Main Repository
enabled=1
autorefresh=1
baseurl=http://download.opensuse.org/distribution/leap/$releasever/repo/oss/
type=rpm-md

@tomschr
Copy link

tomschr commented Feb 16, 2023

@oleksis Thanks, I know. πŸ™‚ Maybe I wasn't clear enough, but I was more referring to that you should add this step into your description above. πŸ˜‰

@oleksis
Copy link
Author

oleksis commented Feb 16, 2023

@tomschr
Copy link

tomschr commented Feb 17, 2023

@oleksis Thanks for the update. πŸ‘

Sorry to bother you again, but I think there is still some aspect missing. πŸ˜‡ For example, some people could still have a "15.3" string in the base URL. Even if you use the --releasever option this won't have any effect on these URLs.

I'd suggest to add an additional section:

## Replace old release string with release variable

    sudo sed -i 's/15.4/\$releasever/g' /etc/zypp/repos.d/*

It could be added before section "Refresh all repositories to 15.4". The reason for this is, this approach isn't completely fool-proof, unfortunately. 😒 I run myself into some issues before.

If the upstream repo can be found or not depends highly on how the upstream repo maintainer has defined its name. For example, if a repo has in the base URL something like openSUSE_Leap_15.3 and you replace "15.3" with $releasever there is no guarantee that the name openSUSE_Leap_15.4 exists. The repo maintainers could name it 15.4. Some repos did that. OBS doesn't provide stable and consistent names, it's pure convention.

Therefor it would be helpful to give the reader in section "Refresh all repositories to 15.4" a hint. Maybe something like this:

If you get errors from the above command, the upstream repo has a different name than what you defined in our `.repo` file.
Open your browser and visit the OBS repository to find the correct name and add it to the  `.repo` file.

@oleksis
Copy link
Author

oleksis commented Feb 17, 2023

@tomschr Thanks for the feedback . Add the Note πŸ“

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment