![](https://seccdn.libravatar.org/avatar/fcf3b9ad1ecb822bc2f5206caa9a7a05.jpg?s=120&d=mm&r=g)
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