Upgrade to Fedora 28: nss-pem does not belong to a distupgrade repository

Fedora 28 was released a while ago, and I do not immediately upgrade my workstation from past experience with external repositories needing to catch up.

Starting with

sudo dnf --refresh upgrade
sudo dnf system-upgrade download --refresh --releasever=28

led to this error.

Fehler: 
 Problem: nss-pem-1.0.3-6.fc27.i686 has inferior architecture
  - nss-pem-1.0.3-6.fc27.x86_64 does not belong to a distupgrade repository
  - problem with installed package nss-pem-1.0.3-6.fc27.i686

This is coming from steam which is installed via UnitedRPM/RPMFusion repository. There seems to be a package dependency change during the F27 cycle, where right now there’s no explicit dependency or provider is there.

sudo dnf remove nss-pem-1.0.3-6.fc27.i686
Abhängigkeiten sind aufgelöst.
=========================================================================================================================================================================
 Paket                                     Arch                        Version                                   Paketquelle                                       Größe
=========================================================================================================================================================================
Entfernen:
 nss-pem                                   i686                        1.0.3-6.fc27                              @updates                                          215 k
Removing dependent packages:
 libcurl                                   i686                        7.55.1-10.fc27                            @updates                                          581 k
 libdbusmenu-gtk2                          i686                        16.04.0-4.fc27                            @fedora                                            79 k
 libdbusmenu-gtk3                          i686                        16.04.0-4.fc27                            @fedora                                            79 k
 nss                                       i686                        3.36.1-1.0.fc27                           @updates                                          2.4 M
 openldap                                  i686                        2.4.45-4.fc27                             @updates                                          1.0 M
 steam                                     i686                        1.0.0.54-17.fc27                          @rpmfusion-nonfree-updates                        2.7 M

This bug report and this blog post helped a lot, just pre-install the F28 package prior to the upgrade. In my case I had to force the package update.

sudo dnf update nss-pem --releasever=28 --best --allowerasing

Next, proceed with the upgrade again.

sudo dnf system-upgrade download --refresh --releasever=28

Say hi to Fedora 28 🙂

Clear redirect cache in Chrome

Chrome caches 301 redirects in a certain way. This one caused problems when testing redirects with monitoring-portal.org with / to /woltlab (now removed).

There is no direct configuration setting for this, you need to visit chrome://net-internals/ in Chrome. Then right click on the cursor icon in the right upper corner and select “clear cache”.

VLC on Fedora with Wayland: Big Icons, small text problem

I’ve always used VLC as my favorite video player on Linux. Recently they changed releases to 3.0 from Git in Fedora 25 (RPMFusion repository). This also included changes to work with Wayland instead of Xorg. Unfortunately the user interface was broken then – big icons, small text. Just looked like 800×600 on a full HD resolution, 27″ here.

Options described on the net where to create a custom skin, or clear the configuration cache. None of these worked unfortunately.

While looking for a possible bug I’ve found this issue which lead me to a new repository called “United RPMs”.

Thought I’d give it a try, since this issue proposes updated packages which fix the issue entirely.

sudo -rpm --import https://raw.githubusercontent.com/UnitedRPMs/unitedrpms/master/URPMS-GPG-PUBLICKEY-Fedora-24
sudo dnf -y install https://github.com/UnitedRPMs/unitedrpms/releases/download/6/unitedrpms-$(rpm -E %fedora)-6.fc$(rpm -E %fedora).noarch.rpm

sudo dnf makecache

In order to prefer UnitedRPMs over RPMFusion, I’m explicitly setting the repositories on install (I don’t want to fiddle with yum priorities here).

sudo dnf remove vlc

sudo dnf install --repo=unitedrpms --repo=fedora vlc

Voilá, VLC works again.

lldb NameError: name ‘run_one_line’ is not defined

I’m a heavy lldb user during Icinga 2 development. Most recently I got many of those error messages when starting lldb for debugging Icinga 2.

mbmif /usr/local/icinga2/etc/icinga2/tests (master) # lldb -- /usr/local/icinga2/lib/icinga2/sbin/icinga2 console
(lldb) target create "/usr/local/icinga2/lib/icinga2/sbin/icinga2"
Traceback (most recent call last):
  File "", line 1, in 
  File "/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 98, in 
    import six
ImportError: No module named six
Traceback (most recent call last):
  File "", line 1, in 
NameError: name 'run_one_line' is not defined

Turns out that I have Python2 installed from a dependency in Homebrew. The lldb scripts just use the system path for determining the preferred Python binary.

A sensible workaround is discussed here:

$ /usr/local/bin/pip install six

Works again.

mbmif /usr/local/icinga2/etc/icinga2/tests (master) # lldb -- /usr/local/icinga2/lib/icinga2/sbin/icinga2 console
(lldb) target create "/usr/local/icinga2/lib/icinga2/sbin/icinga2"
Current executable set to '/usr/local/icinga2/lib/icinga2/sbin/icinga2' (x86_64).
(lldb) settings set -- target.run-args  "console"
(lldb) q

Since I wanted to check which package requires python in /usr/local/bin/python I found this command

$ brew list | while read cask; do echo -n "$cask ->"; brew deps $cask | awk '{printf(" %s ", $0)}'; echo ""; done

I can’t get rid of pygtk and macvim, so each new install/update will pull Python again. The reason why they build their own Python is somewhat unsafe C++ functions. Guess I don’t want to dig any deeper here.

Homebrew Caskroom migration

I’m using Homebrew on my Macbook. It is a great addition to installing software when you are used to package managers from the Linux world.

There’s also an extension called Homebrew Cask which allows you to manage MacOS applications, such as Adium or Gimp. This saves you the hassle of manually downloading the package/dmg files and automates the installation/updates.

Lately when doing an update again, there was a notice about a changed Caskroom location.

michi@mbmif ~ $ brew cask list
Warning: The default Caskroom location has moved to /usr/local/Caskroom.
Please migrate your Casks to the new location and delete /opt/homebrew-cask/Caskroom,
or if you would like to keep your Caskroom at /opt/homebrew-cask/Caskroom, add the
following to your HOMEBREW_CASK_OPTS:
  --caskroom=/opt/homebrew-cask/Caskroom
For more details on each of those options, see https://github.com/caskroom/homebrew-cask/issues/21913.
apache-directory-studio  filezilla                gimp                     macvim                   vlc                      xquartz
bitbar                   firefox                  java7                    mysqlworkbench           wireshark

Ok, what would I do now? “Migration” could just mean moving the directories. But wait, the installed applications could be symlinked into ~/Applications instead of being moved (#13966).

Looking into the mentioned github issue #21913 shed some light on how to fix it. Moving the directories will make “brew cask list” shut up about the changed location, but later uninstalls will fail due to dangling symlinks. The solution is simple – force an installation again after moving the installed casks.

michi@mbmif ~ $ mv /opt/homebrew-cask/Caskroom /usr/local
michi@mbmif ~ $ brew cask list
apache-directory-studio  filezilla                gimp                     macvim                   vlc                      xquartz
bitbar                   firefox                  java7                    mysqlworkbench           wireshark

michi@mbmif ~ $ for cask in $(brew cask list); do brew cask install $cask --force; done

Done 🙂

Windows 10 update changes partition table and breaks GRUB

It’s holiday season and so I got a hold of playing some games longly missed on Windows. Booting Windows 10 certainly unveiled several pending updates (Antivirus, Geforce, Windows updates). Since Windows 10 does not explicitly tell about big updates anymore I just did let it reboot several times, waiting for manual grub selection then.

Though this time the update essentially broke GRUB. “error: unknown filesystem. Entering rescue mode…” is certainly not what I expect from a Windows 10 update. After googling a bit I found this thread including an explanation as well as a solution for the problem: The Windows 10 update adds yet another hidden partition, but essentially rewrites the partition table which then breaks GRUB finding the correct /boot partition containing grub2/. Congrats Microsoft!

So, Windows 10 “Upgrade to Windows 10 Home, version 1511, 10586” breaks grub2 because boot block grub2 still thinks it should boot grub2 from (hd0,msdos2) when it now needs to boot from (hd0,msdos3).

The solution is simple but nasty without bash-completion and English keyboard layout on a German keyboard.

First find the boot partition containing the grub2/ directory.windows10_upgrade_dec2015_breaks_grub

grub rescue> ls (hd0,msdos1)/grub2
error: unknown filesystem.
grub rescue> ls (hd0,msdos2)/grub2
error: unknown filesystem.
grub rescue> ls (hd0,msdos3)/grub2
./ ../ themes/ device.map i386-pc/ locale/ fonts/ grubenv grub.cfg

Next set the changed boot prefix and root attributes:

grub rescue> set prefix=(hd0,msdos3)/grub2
grub rescue> set root=(hd0,msdos3)
grub rescue> set
prefix=(hd0,msdos3)/grub2
root=hd0,msdos3
grub rescue> insmod normal
grub rescue> normal

Change from “rescue” to “normal” GRUB mode, and quickly select Fedora from the boot menu. In order to fix GRUB log into Fedora, open a terminal and become root. Now generate a new grub configuration.

sudo -i
grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-install /dev/sda
reboot

Reboot and the GRUB menu should be fixed. Now safely choose to continue the Windows 10 upgrade.