Steps to upgrade old Tumbleweeds
Have a good start: first» cat /etc/os-release NAME="openSUSE Tumbleweed" # VERSION="20181015" ID="opensuse-tumbleweed" ID_LIKE="opensuse suse" VERSION_ID="20181015" first» zypper dup --download-only glibc is zstd-compressed, but the newer rpm that can understand the format requires a newer glibc... it all needs to be unpacked with a second machine to break the cycle. second» sshfs root@first:/ mnt second» cd mnt/var/cache/zypp/packages/base/i586 second» rpm2cpio -diu glibc-2.33-4.1.i586.rpm second» rpm2cpio -diu rpm-4.16.0-4.1.i586.rpm Then, "%__db_backend bdb" needs to be replaced with ndb. The newer rpm is prone to truncate the entire rpm database if it has to do any writes and that value is still on bdb. (Found out the hard way, but luckily I had /var/adm/backup/rpmdb) first» vi /usr/lib/rpm/macros <<Replace %__db_backend bdb with %__db_backend ndb>> first» cd /var/cache/zypp/packages/base/i586 first» ./lib/ld-linux.so.2 --library-path $PWD/lib:$PWD/usr/lib \ ./usr/bin/rpmdb --rebuilddb Using the unmanaged rpm, install the managed rpm & glibc (and possibly zypper too). first» ./lib/ld-linux.so.2 --library-path $PWD/lib:$PWD/usr/lib \ ./bin/rpm -Uhv glibc-2.33-4.1.i586.rpm \ glibc-locale-base-2.33-4.1.i586.rpm glibc-locale-2.33-4.1.i586.rpm \ rpm-4.16.0-4.1.i586.rpm (may need to add a few more, like liblua5_4, libselinux1, libsolv-tools, libzypp, zypper, ..) Once done, both rpm and glibc are new and it's back to standard business: first» zypper dup The following product is going to be upgraded: openSUSE Tumbleweed 20181015-0 -> 20210311-0 first» rm -rf /var/cache/zypp/packages
Hi Jan, looks, like you had some fun! Am Samstag, 13. März 2021, 10:31:03 CET schrieb Jan Engelhardt:
Have a good start:
first» cat /etc/os-release NAME="openSUSE Tumbleweed" # VERSION="20181015" ID="opensuse-tumbleweed" ID_LIKE="opensuse suse" VERSION_ID="20181015"
first» zypper dup --download-only
glibc is zstd-compressed, but the newer rpm that can understand the format requires a newer glibc... it all needs to be unpacked with a second machine to break the cycle.
second» sshfs root@first:/ mnt second» cd mnt/var/cache/zypp/packages/base/i586 second» rpm2cpio -diu glibc-2.33-4.1.i586.rpm second» rpm2cpio -diu rpm-4.16.0-4.1.i586.rpm
Then, "%__db_backend bdb" needs to be replaced with ndb. The newer rpm is prone to truncate the entire rpm database if it has to do any writes and that value is still on bdb. (Found out the hard way, but luckily I had /var/adm/backup/rpmdb)
first» vi /usr/lib/rpm/macros <<Replace %__db_backend bdb with %__db_backend ndb>>
first» cd /var/cache/zypp/packages/base/i586 first» ./lib/ld-linux.so.2 --library-path $PWD/lib:$PWD/usr/lib \ ./usr/bin/rpmdb --rebuilddb
Using the unmanaged rpm, install the managed rpm & glibc (and possibly zypper too).
first» ./lib/ld-linux.so.2 --library-path $PWD/lib:$PWD/usr/lib \ ./bin/rpm -Uhv glibc-2.33-4.1.i586.rpm \ glibc-locale-base-2.33-4.1.i586.rpm glibc-locale-2.33-4.1.i586.rpm \ rpm-4.16.0-4.1.i586.rpm
(may need to add a few more, like liblua5_4, libselinux1, libsolv-tools, libzypp, zypper, ..)
Once done, both rpm and glibc are new and it's back to standard business:
first» zypper dup The following product is going to be upgraded: openSUSE Tumbleweed 20181015-0 -> 20210311-0
first» rm -rf /var/cache/zypp/packages
Beware, Linda will propose to you! Wouldn't it make some sense to supply some transition repo, where just the essential packages are available for older distributions, or even statically linked? Guess, this can reduce the amount of manual work to: add transition repo upgrade disable transition repo Cheers, Pete
On 13/03/2021 17.24, Hans-Peter Jansen wrote:
Wouldn't it make some sense to supply some transition repo, where just the essential packages are available for older distributions, or even statically linked?
https://opensuse.zq1.de/history/20200801/tumbleweed/repo/oss/ already exists, just not minimal. If we reduced the package set, we would lose the repo signature. But the instructions could be add transition repo zypper up zypper rpm ... disable transition repo
On 2021/03/13 01:31, Jan Engelhardt wrote:
Have a good start:
--- FWIW, I saved this aside for reference. I'm having too much fun "playing" with my pkg-dl-script alternating with attempts to build later versions of rpm from leap (15.0 to start with). That seems to be mostly installed, though only lightly tested w/rpm @ v4.14.1, "mostly"...had to give up on beecrypt for now. Even if the leap versions don't have the new compression scheme (dunno if they do or not), they will have a later rpm version that can handle newer build constructs. I do have the compression lib d/l and installed as a separate util. I can use that with 'rpm2cpio' to uncompress and install a new-fmt cpio archive, so I'm also making progress though almost certainly via a more circuitous route (I get distracted easily) like going via leap and a repo-mirroring script that mostly works for TW+leap. I _had_ a shell script to download release-based repos, but with a different set of versions for many rpms, I needed to move to downloading by a dated-list (in primary.xml) of rpms rather than downloading a directory (like oss/x86_64) so I could have a matched set of downloads as existed on a specific day. Backporting that to work with a version-based release was my next stop toward possibly side-grading back to leap, since TW is more unstable than I think I can deal with. In regards to stability, I'm mostly talking about upgrades breaking something: since TW upgrades stuff daily and leap every 'N' months, There's at least 20+ TW releases/month which multiplies chances of breakage considerably. Nevertheless, steps to upgrade an old TW with some repo -- maybe Bernhard's certainly is likely to be more direct than my unprioritized meanderings.
Once done, both rpm and glibc are new and it's back to standard business.
Standard? Thanks for the reference...
On Sat, 13 Mar 2021 10:31:03 +0100 (CET), Jan Engelhardt <jengelh@inai.de> wrote: Thank you for sharing this. It really helped me! I've added my experience for x64 below
Have a good start:
first» cat /etc/os-release NAME="openSUSE Tumbleweed" # VERSION="20181015" ID="opensuse-tumbleweed" ID_LIKE="opensuse suse" VERSION_ID="20181015"
first» zypper dup --download-only
glibc is zstd-compressed, but the newer rpm that can understand the format requires a newer glibc... it all needs to be unpacked with a second machine to break the cycle.
second» sshfs root@first:/ mnt second» cd mnt/var/cache/zypp/packages/base/i586 second» rpm2cpio -diu glibc-2.33-4.1.i586.rpm second» rpm2cpio -diu rpm-4.16.0-4.1.i586.rpm
As I had to do exactly this today, here my experiences for my box on x64 first# # cat /etc/os-release NAME="openSUSE Tumbleweed" # VERSION="20190617" ID="opensuse-tumbleweed" ID_LIKE="opensuse suse" VERSION_ID="20190617" PRETTY_NAME="openSUSE Tumbleweed" ANSI_COLOR="0;32" CPE_NAME="cpe:/o:opensuse:tumbleweed:20190617" BUG_REPORT_URL="https://bugs.opensuse.org" HOME_URL="https://www.opensuse.org/" LOGO="distributor-logo" (running kernel 5.1.7) • rpm2cpio does not accept arguments • today's situation also requires liblua second# sshfs root@first:/ /mnt second# cd /mnt/var/cache/zypp/packages/OSS-TW/x86_64 second# rpm2cpio glibc-2.33-4.1.x86_64.rpm | cpio -idu second# rpm2cpio rpm-4.16.0-4.1.x86_64.rpm | cpio -idu second# rpm2cpio liblua5_4-5-5.4.2-3.1.x86_64.rpm | cpio -diu
Then, "%__db_backend bdb" needs to be replaced with ndb. The newer rpm is prone to truncate the entire rpm database if it has to do any writes and that value is still on bdb. (Found out the hard way, but luckily I had /var/adm/backup/rpmdb)
first» vi /usr/lib/rpm/macros <<Replace %__db_backend bdb with %__db_backend ndb>>
first» cd /var/cache/zypp/packages/base/i586 first» ./lib/ld-linux.so.2 --library-path $PWD/lib:$PWD/usr/lib \ ./usr/bin/rpmdb --rebuilddb
OSS-TW/x86_64# ./lib64/ld-linux-x86-64.so.2 --library-path \ $PWD/lib64:$PWD/lib:$PWD/usr/lib64:$PWD/usr/lib \ ./usr/bin/rpmdb --rebuilddb warning: Converting database from bdb_ro to ndb backend
Using the unmanaged rpm, install the managed rpm & glibc (and possibly zypper too).
first» ./lib/ld-linux.so.2 --library-path $PWD/lib:$PWD/usr/lib \ ./bin/rpm -Uhv glibc-2.33-4.1.i586.rpm \ glibc-locale-base-2.33-4.1.i586.rpm glibc-locale-2.33-4.1.i586.rpm \ rpm-4.16.0-4.1.i586.rpm
(may need to add a few more, like liblua5_4, libselinux1, libsolv-tools, libzypp, zypper, ..)
I did require a --nodeps on a rather extended call as deps grew fast when python2 packages were involved. (I don't require python2) OSS-TW/x86_64# ./lib64/ld-linux-x86-64.so.2 \ --library-path $PWD/lib64:$PWD/lib:$PWD/usr/lib64:$PWD/usr/lib \ ./usr/bin/rpm -Uvh --nodeps \ deltarpm-3.6.2-1.9.x86_64.rpm \ glibc-2.33-4.1.x86_64.rpm \ glibc-devel-2.33-4.1.x86_64.rpm \ glibc-extra-2.33-4.1.x86_64.rpm \ glibc-locale-2.33-4.1.x86_64.rpm \ glibc-locale-base-2.33-4.1.x86_64.rpm \ libboost_thread1_75_0-1.75.0-4.3.x86_64.rpm \ liblua5_4-5-5.4.2-3.1.x86_64.rpm \ libproxy1-0.4.17-1.3.x86_64.rpm \ librpmbuild9-4.16.0-4.1.x86_64.rpm \ libselinux1-3.1-3.3.x86_64.rpm \ libselinux-devel-3.1-3.3.x86_64.rpm \ libsnmp30-5.9-1.4.x86_64.rpm \ libsolv-tools-0.7.17-1.3.x86_64.rpm \ libyaml-cpp0_6-0.6.3-1.5.x86_64.rpm \ libyui* \ libzck1-1.1.5-2.3.x86_64.rpm \ libzypp-17.25.8-1.1.x86_64.rpm \ nscd-2.33-4.1.x86_64.rpm \ python-solv-0.7.17-1.3.x86_64.rpm \ rpm-4.16.0-4.1.x86_64.rpm \ rpm-build-4.16.0-4.1.x86_64.rpm \ rpm-devel-4.16.0-4.1.x86_64.rpm \ valgrind-3.16.1-4.3.x86_64.rpm \ zypper-1.14.43-1.1.x86_64.rpm
Once done, both rpm and glibc are new and it's back to standard business:
first» zypper dup The following product is going to be upgraded: openSUSE Tumbleweed 20181015-0 -> 20210311-0
8800+ packages got updated One learns to value the speed of more modern machines :) Anyway, several hours later I had an up-to-date old HP EliteBook 8560p to be used by my son. (running kernel 5.11.6)
first» rm -rf /var/cache/zypp/packages
-- H.Merijn Brand https://tux.nl Perl Monger http://amsterdam.pm.org/ using perl5.00307 .. 5.33 porting perl5 on HP-UX, AIX, and Linux https://tux.nl/email.html http://qa.perl.org https://www.test-smoke.org
participants (5)
-
Bernhard M. Wiedemann
-
H.Merijn Brand
-
Hans-Peter Jansen
-
Jan Engelhardt
-
L A Walsh