coreos / rpm-ostree

āš›šŸ“¦ Hybrid image/package system with atomic upgrades and package layering
https://coreos.github.io/rpm-ostree
Other
878 stars 196 forks source link

alternatives (/etc/alternatives -> var/lib/alternatives) is broken with ostree #1614

Open ghost opened 6 years ago

ghost commented 6 years ago

I'm not sure this is correct to report here, but...

Host system details

State: idle
AutomaticUpdates: disabled
Deployments:
ā— ostree://atomic:fedora/28/x86_64/workstation
                   Version: 28.20181009.0 (2018-10-09 01:41:48)
                BaseCommit: 992822124452d3ad0c065f6bdc5dc4a56887c21366e3b97634f3f78c9986f1bb
              GPGSignature: Valid signature by 128CF232A9371991C8A65695E08E7E629DB62FB1
       RemovedBasePackages: cheese-2:3.28.0-1.fc28.x86_64, eog-3.28.3-1.fc28.x86_64, gnome-maps-3.28.2-1.fc28.x86_64, gnome-contacts-3.28.2-1.fc28.x86_64, gnome-clocks-3.28.0-1.fc28.x86_64, gnome-calculator-3.28.2-1.fc28.x86_64, gnome-characters-3.28.2-1.fc28.x86_64, gedit-2:3.28.1-1.fc28.x86_64, gnome-weather-3.26.0-4.fc28.noarch
           LayeredPackages: android-tools chrome-gnome-shell expect ffmpeg-libs firefox-wayland galternatives gnome-terminal-nautilus gnome-tweak-tool gparted gstreamer1-libav gstreamer1-libav.i686
                            gstreamer1-libav.x86_64 gstreamer1-plugin-openh264 gstreamer1-plugins-bad-freeworld gstreamer1-plugins-bad-nonfree gstreamer1-plugins-good.i686 gstreamer1-plugins-ugly
                            gstreamer1-plugins-ugly.i686 gstreamer1-plugins-ugly.x86_64 gstreamer1-vaapi gstreamer1-vaapi.i686 gstreamer1-vaapi.x86_64 hddtemp icedtea-web java-1.8.0-openjdk
                            java-1.8.0-openjdk-devel java-1.8.0-openjdk-headless java-1.8.0-openjdk-src java-1.8.0-oracle java-1.8.0-oracle-devel java-1.8.0-oracle-headless java-1.8.0-oracle-javafx
                            java-1.8.0-oracle-src java-9-openjdk java-9-openjdk-devel java-9-openjdk-headless java-9-openjdk-src libgnome libva-intel-driver libva-utils lm_sensors mozilla-openh264 nvme-cli
                            qemu-user screen smartmontools steam vim
             LocalPackages: webkitgtk-2.4.11-8.1.x86_64 russianfedora-fixes-release-28-1.noarch russianfedora-free-release-28-1.noarch russianfedora-nonfree-release-28-1.noarch rpmfusion-free-release-28-1.noarch
                            obs-studio-22.0.3-2.fc28.x86_64 obs-studio-libs-22.0.3-2.fc28.x86_64 rpmfusion-nonfree-release-28-1.noarch
                 Initramfs: -a crypt crypt-gpg  -I /etc/crypttab /usr/sbin/mkswap /usr/sbin/swapon /usr/sbin/swapoff  

  ostree://atomic:fedora/28/x86_64/workstation
                   Version: 28.20181009.0 (2018-10-09 01:41:48)
                BaseCommit: 992822124452d3ad0c065f6bdc5dc4a56887c21366e3b97634f3f78c9986f1bb
              GPGSignature: Valid signature by 128CF232A9371991C8A65695E08E7E629DB62FB1
       RemovedBasePackages: cheese-2:3.28.0-1.fc28.x86_64, eog-3.28.3-1.fc28.x86_64, gnome-maps-3.28.2-1.fc28.x86_64, gnome-contacts-3.28.2-1.fc28.x86_64, gnome-clocks-3.28.0-1.fc28.x86_64, gnome-calculator-3.28.2-1.fc28.x86_64, gnome-characters-3.28.2-1.fc28.x86_64, gedit-2:3.28.1-1.fc28.x86_64, gnome-weather-3.26.0-4.fc28.noarch
           LayeredPackages: android-tools chrome-gnome-shell expect ffmpeg-libs firefox-wayland galternatives gnome-terminal-nautilus gnome-tweak-tool gparted gstreamer1-libav gstreamer1-libav.i686
                            gstreamer1-libav.x86_64 gstreamer1-plugin-openh264 gstreamer1-plugins-bad-freeworld gstreamer1-plugins-bad-nonfree gstreamer1-plugins-good.i686 gstreamer1-plugins-ugly
                            gstreamer1-plugins-ugly.i686 gstreamer1-plugins-ugly.x86_64 gstreamer1-vaapi gstreamer1-vaapi.i686 gstreamer1-vaapi.x86_64 hddtemp java-1.8.0-openjdk java-1.8.0-openjdk-devel
                            java-1.8.0-openjdk-src java-1.8.0-oracle java-1.8.0-oracle-devel java-1.8.0-oracle-javafx java-1.8.0-oracle-src java-9-openjdk java-9-openjdk-devel java-9-openjdk-src libgnome
                            libva-intel-driver libva-utils lm_sensors mozilla-openh264 nvme-cli qemu-user screen smartmontools steam vim
             LocalPackages: webkitgtk-2.4.11-8.1.x86_64 russianfedora-fixes-release-28-1.noarch russianfedora-free-release-28-1.noarch russianfedora-nonfree-release-28-1.noarch rpmfusion-free-release-28-1.noarch
                            obs-studio-22.0.3-2.fc28.x86_64 obs-studio-libs-22.0.3-2.fc28.x86_64 rpmfusion-nonfree-release-28-1.noarch
                 Initramfs: -a crypt crypt-gpg  -I /etc/crypttab /usr/sbin/mkswap /usr/sbin/swapon /usr/sbin/swapoff

// I know, that's a lot of layered packages. But I need to do some stuff and I'm still not a container-guy

Description

Any packages that use alternatives system register alternatives in bwrap container, but /var contents of this container isn't copied back to the host system and vanish. And because of that /var/lib/alternatives is empty and /usr/sbin/alternatives can't do anything. For example, switch java version.

Would you like to work on the issue?

I can't help. But I can test the fix if it would be released.

cgwalters commented 6 years ago

Yeah, need to change alternatives to stop using /var.

ghost commented 6 years ago

I made a dirty hack on my host to make alternatives work, to switch java version. But it seems like alternatives will need more changes than expected to make it work on Atomic. Because when switching links it also tries to recreate the links in /usr, even if they're already exist and pointing to the right places and crashes without any changes to /etc/alternatives links. It needs to make ostree admin unlock to work properly.

jlebon commented 5 years ago

Related: https://bugzilla.redhat.com/show_bug.cgi?id=1657367

LorbusChris commented 3 years ago

related: https://github.com/fedora-sysv/chkconfig/issues/9

travier commented 3 months ago

https://github.com/fedora-sysv/chkconfig/pull/135 has been merged. I have not checked the implications for existing and new systems yet.

vrothberg commented 3 months ago

fedora-sysv/chkconfig#135 has been merged. I have not checked the implications for existing and new systems yet.

With that being merged, can we close this issue?

travier commented 3 months ago

I think it would be great to get some docs on how to migrate existing systems before we close this.