Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to install on an immutable distro? #103

Closed
Haraven opened this issue Sep 13, 2024 · 10 comments
Closed

How to install on an immutable distro? #103

Haraven opened this issue Sep 13, 2024 · 10 comments

Comments

@Haraven
Copy link

Haraven commented Sep 13, 2024

Hello,

First of all, thanks very much for working on this desktop effect. I've been using it on my system for many months now and have been very happy with it.

That being said, I'm considering switching to Ublue Aurora (Fedora Silverblue-based distro), which, being an immutable distro, has read-only access to /usr. From what I've seen, desktop effects, including the Better Blur/Force Blur effect, normally install in a subfolder in that location.

I've tried using distrobox, and that lets me compile the effect, but it installs in the /usr folder of the distrobox image, not the host itself.

Is there an alternative folder or some other way to install the effect so that it correctly installs on an immutable distro?

Thank you!

@Haraven
Copy link
Author

Haraven commented Sep 13, 2024

Small update: I've found this post which mentions that desktop effects can be installed under ~/.local/share/kwin/effects, but the plugins located there seem to have a different structure (each plugin has a subfolder with metadata.json and a contents folder) compared to ForceBlur (which only has .so files).

Not really sure how to proceed from here.

@taj-ny
Copy link
Owner

taj-ny commented Sep 14, 2024

Maybe layered packages would work? There's a package on Fedora Copr.

~/.local/share/kwin/effects is for scripted effects only, compiled effects are loaded from directories specified in the QT_PLUGIN_PATH environment variable.

@Haraven
Copy link
Author

Haraven commented Sep 14, 2024

I gave it a try, but I ran into issues.

I added the Copr repository for the effect under /etc/yum.repos.d/ but when I try to install the effect I get an error:

> sudo rpm-ostree install kwin-effects-forceblur
Checking out tree 6b6d651... done
Enabled rpm-md repositories: copr:copr.fedorainfracloud.org:lukenukem:asus-linux updates fedora copr:copr.fedorainfracloud.org:hikariknight:looking-glass-kvmfr copr:copr.fedorainfracloud.org:errornointernet:mergerfs copr:copr.fedorainfracloud.org:errornointernet:mergerfs copr:copr.fedorainfracloud.org:yohane-shiro:kwin-effects-forceblur updates-archive
Importing rpm-md... done
rpm-md repo 'copr:copr.fedorainfracloud.org:lukenukem:asus-linux' (cached); generated: 2024-08-31T09:45:14Z solvables: 5
rpm-md repo 'updates' (cached); generated: 2024-09-13T01:44:38Z solvables: 26430
rpm-md repo 'fedora' (cached); generated: 2024-04-14T18:51:11Z solvables: 74881
rpm-md repo 'copr:copr.fedorainfracloud.org:hikariknight:looking-glass-kvmfr' (cached); generated: 2024-08-21T09:46:29Z solvables: 5
rpm-md repo 'copr:copr.fedorainfracloud.org:errornointernet:mergerfs' (cached); generated: 2024-05-27T08:33:29Z solvables: 2
rpm-md repo 'copr:copr.fedorainfracloud.org:errornointernet:mergerfs' (cached); generated: 2024-05-27T08:33:29Z solvables: 2
rpm-md repo 'copr:copr.fedorainfracloud.org:yohane-shiro:kwin-effects-forceblur' (cached); generated: 2024-09-02T10:06:16Z solvables: 2
rpm-md repo 'updates-archive' (cached); generated: 2024-09-13T02:31:26Z solvables: 39640
Resolving dependencies... done
error: Could not depsolve transaction; 1 problem detected:
 Problem: package kwin-effects-forceblur-1.3.1-2.fc40.x86_64 from copr:copr.fedorainfracloud.org:yohane-shiro:kwin-effects-forceblur requires kf6-kio, but none of the providers can be installed
  - package kf6-kio-6.5.0-1.fc40.x86_64 from updates requires kf6-kio-core(x86-64) = 6.5.0-1.fc40, but none of the providers can be installed
  - package kf6-kio-6.5.0-1.fc40.x86_64 from updates-archive requires kf6-kio-core(x86-64) = 6.5.0-1.fc40, but none of the providers can be installed
  - package kf6-kio-6.0.0-5.fc40.x86_64 from fedora requires kf6-kio-core(x86-64) = 6.0.0-5.fc40, but none of the providers can be installed
  - package kf6-kio-6.1.0-2.fc40.x86_64 from updates-archive requires kf6-kio-core(x86-64) = 6.1.0-2.fc40, but none of the providers can be installed
  - package kf6-kio-6.2.0-1.fc40.x86_64 from updates-archive requires kf6-kio-core(x86-64) = 6.2.0-1.fc40, but none of the providers can be installed
  - package kf6-kio-6.3.0-1.fc40.x86_64 from updates-archive requires kf6-kio-core(x86-64) = 6.3.0-1.fc40, but none of the providers can be installed
  - package kf6-kio-6.4.1-1.fc40.x86_64 from updates-archive requires kf6-kio-core(x86-64) = 6.4.1-1.fc40, but none of the providers can be installed
  - cannot install both kf6-kio-core-6.5.0-1.fc40.x86_64 from updates and kf6-kio-core-6.5.0-3.fc40.switcheroo.0.0.git.145.d627dff1.x86_64 from @System
  - cannot install both kf6-kio-core-6.0.0-5.fc40.x86_64 from fedora and kf6-kio-core-6.5.0-3.fc40.switcheroo.0.0.git.145.d627dff1.x86_64 from @System
  - cannot install both kf6-kio-core-6.1.0-2.fc40.x86_64 from updates-archive and kf6-kio-core-6.5.0-3.fc40.switcheroo.0.0.git.145.d627dff1.x86_64 from @System
  - cannot install both kf6-kio-core-6.2.0-1.fc40.x86_64 from updates-archive and kf6-kio-core-6.5.0-3.fc40.switcheroo.0.0.git.145.d627dff1.x86_64 from @System
  - cannot install both kf6-kio-core-6.3.0-1.fc40.x86_64 from updates-archive and kf6-kio-core-6.5.0-3.fc40.switcheroo.0.0.git.145.d627dff1.x86_64 from @System
  - cannot install both kf6-kio-core-6.4.1-1.fc40.x86_64 from updates-archive and kf6-kio-core-6.5.0-3.fc40.switcheroo.0.0.git.145.d627dff1.x86_64 from @System
  - cannot install both kf6-kio-core-6.5.0-1.fc40.x86_64 from updates-archive and kf6-kio-core-6.5.0-3.fc40.switcheroo.0.0.git.145.d627dff1.x86_64 from @System
  - conflicting requests

It looks like Ublue Aurora comes with a version of kf6-kio that's different from the one the forceblur package expects. Here is the version that seems to be installed on the system:

> rpm -qa | grep kf6-kio-core
kf6-kio-core-libs-6.5.0-3.fc40.switcheroo.0.0.git.145.d627dff1.x86_64
kf6-kio-core-6.5.0-3.fc40.switcheroo.0.0.git.145.d627dff1.x86_64

@YouCanTouCan
Copy link

Just wanted to check if there's been any progress on this issue - I tried building it in toolbox, but it didn't show up in the settings menu after, unfortunately (yet unsurprisingly).

@taj-ny
Copy link
Owner

taj-ny commented Dec 3, 2024

Try this:

Name: kwin-effects-forceblur
Version: 1.3.2
Release: %{?dist}
Summary: Fork of the KWin Blur effect for KDE Plasma 6 with additional features (including force blur) and bug fixes
License: GPLv3
URL: https://github.com/taj-ny/kwin-effects-forceblur
Source0: https://github.com/taj-ny/kwin-effects-forceblur/archive/refs/tags/v%{?version}.zip
BuildRequires: cmake extra-cmake-modules gcc-g++ kf6-kwindowsystem-devel plasma-workspace-devel libplasma-devel qt6-qtbase-private-devel qt6-qtbase-devel cmake kwin-devel extra-cmake-modules kwin-devel kf6-knotifications-devel kf6-kio-devel kf6-kcrash-devel kf6-ki18n-devel kf6-kguiaddons-devel libepoxy-devel kf6-kglobalaccel-devel kf6-kcmutils-devel kf6-kconfigwidgets-devel kf6-kdeclarative-devel kdecoration-devel kf6-kglobalaccel kf6-kdeclarative libplasma kf6-kio qt6-qtbase kf6-kguiaddons kf6-ki18n wayland-devel
Requires: kf6-kglobalaccel kf6-kdeclarative kwin libplasma kf6-kio qt6-qtbase kf6-kguiaddons kf6-ki18n
BuildArch: x86_64
 
%description
Fork of the KWin Blur effect for KDE Plasma 6 with additional features (including force blur) and bug fixes
 
%prep
%setup -q
 
%global _enable_debug_package 0
%global debug_package %{nil}
 
%build
%cmake -DCMAKE_INSTALL_PREFIX=/usr
%cmake_build %{?_smp_mflags}
 
%install
%cmake_install
 
%clean
#rm -rf $RPM_BUILD_ROOT
 
%files
%defattr(-,root,root,-)
%{_libdir}/qt6/plugins/kwin/effects/configs/kwin_better_blur_config.so
%{_libdir}/qt6/plugins/kwin/effects/plugins/forceblur.so
 
%changelog

Save as kwin-effects-forceblur.spec and run:

toolbox create
toolbox enter
sudo dnf install git cmake extra-cmake-modules gcc-g++ kf6-kwindowsystem-devel plasma-workspace-devel libplasma-devel qt6-qtbase-private-devel qt6-qtbase-devel cmake kwin-devel extra-cmake-modules kwin-devel kf6-knotifications-devel kf6-kio-devel kf6-kcrash-devel kf6-ki18n-devel kf6-kguiaddons-devel libepoxy-devel kf6-kglobalaccel-devel kf6-kcmutils-devel kf6-kconfigwidgets-devel kf6-kdeclarative-devel kdecoration-devel kf6-kglobalaccel kf6-kdeclarative libplasma kf6-kio qt6-qtbase kf6-kguiaddons kf6-ki18n wayland-devel fedpkg rpmdevtools
spectool -gR kwin-effects-forceblur.spec
rpmbuild -ba kwin-effects-forceblur.spec

exit
sudo rpm-ostree install rpmbuild/RPMS/x86_64/kwin-effects-forceblur-1.3.2-.fc41.x86_64.rpm
systemctl reboot

Tested on Fedora Kinoite 41.

Maybe I can create an action that makes RPMs.

@YouCanTouCan
Copy link

YouCanTouCan commented Dec 3, 2024

Thank you so much for your help! Unfortunately, after getting most of the way through the directions, I did run into an issue.

After running sudo rpm-ostree install rpmbuild/RPMS/x86_64/kwin-effects-forceblur-1.3.2-.fc41.x86_64.rpm, I got the response error: Updating deployment: Preparing D-Bus arguments: Handling argument rpmbuild/RPMS/x86_64/kwin-effects-forceblur-1.3.2-.fc41.x86_64.rpm: No such file or directory (os error 2)

I double-checked to see if the file name or location was wrong, and noticed that the created rpm file was named "kwin-effects-forceblur-1.3.2-.fc40.x86_64.rpm", not "kwin-effects-forceblur-1.3.2-.fc41.x86_64.rpm". So, I tried running sudo rpm-ostree install rpmbuild/RPMS/x86_64/kwin-effects-forceblur-1.3.2-.fc40.x86_64.rpm instead.

However, that gave the following response:

Checking out tree b7938d3... done
Enabled rpm-md repositories: updates fedora copr:copr.fedorainfracloud.org:gmaglione:podman-bootc copr:copr.fedorainfracloud.org:hikariknight:looking-glass-kvmfr nordvpn nordvpn-noarch filips_FirefoxPWA_rpm_any filips_FirefoxPWA_rpm_any-source updates-archive
Updating metadata for 'updates'... done
Updating metadata for 'copr:copr.fedorainfracloud.org:gmaglione:podman-bootc'... done
Updating metadata for 'filips_FirefoxPWA_rpm_any'... done
Updating metadata for 'filips_FirefoxPWA_rpm_any-source'... done
Updating metadata for 'updates-archive'... done
Importing rpm-md... done
rpm-md repo 'updates'; generated: 2024-12-03T02:48:04Z solvables: 11815
rpm-md repo 'fedora' (cached); generated: 2024-10-24T13:55:59Z solvables: 76624
rpm-md repo 'copr:copr.fedorainfracloud.org:gmaglione:podman-bootc'; generated: 2024-11-26T03:58:59Z solvables: 5
rpm-md repo 'copr:copr.fedorainfracloud.org:hikariknight:looking-glass-kvmfr' (cached); generated: 2024-10-25T08:11:34Z solvables: 5
rpm-md repo 'nordvpn' (cached); generated: 2024-11-27T15:54:11Z solvables: 15
rpm-md repo 'nordvpn-noarch' (cached); generated: 2024-11-27T15:53:56Z solvables: 1
rpm-md repo 'filips_FirefoxPWA_rpm_any'; generated: 2024-11-06T17:53:21Z solvables: 45
rpm-md repo 'filips_FirefoxPWA_rpm_any-source'; generated: 2021-08-01T17:47:53Z solvables: 0
rpm-md repo 'updates-archive'; generated: 2024-12-03T03:03:29Z solvables: 12671
Resolving dependencies... done
error: Could not depsolve transaction; 1 problem detected:
 Problem: package kwin-effects-forceblur-1.3.2-.fc40.x86_64 from @commandline requires kf6-kio, but none of the providers can be installed
  - package kf6-kio-6.8.0-1.fc41.x86_64 from updates requires kf6-kio-core(x86-64) = 6.8.0-1.fc41, but none of the providers can be installed
  - package kf6-kio-6.8.0-1.fc41.x86_64 from updates-archive requires kf6-kio-core(x86-64) = 6.8.0-1.fc41, but none of the providers can be installed
  - package kf6-kio-6.7.0-1.fc41.x86_64 from fedora requires kf6-kio-core(x86-64) = 6.7.0-1.fc41, but none of the providers can be installed
  - package kf6-kio-6.7.0-2.fc41.x86_64 from updates-archive requires kf6-kio-core(x86-64) = 6.7.0-2.fc41, but none of the providers can be installed
  - cannot install both kf6-kio-core-6.8.0-1.fc41.x86_64 from updates and kf6-kio-core-6.7.0-2.fc41.switcheroo.0.0.git.177.aecb2069.x86_64 from @System
  - cannot install both kf6-kio-core-6.7.0-1.fc41.x86_64 from fedora and kf6-kio-core-6.7.0-2.fc41.switcheroo.0.0.git.177.aecb2069.x86_64 from @System
  - cannot install both kf6-kio-core-6.7.0-2.fc41.x86_64 from updates-archive and kf6-kio-core-6.7.0-2.fc41.switcheroo.0.0.git.177.aecb2069.x86_64 from @System
  - cannot install both kf6-kio-core-6.8.0-1.fc41.x86_64 from updates-archive and kf6-kio-core-6.7.0-2.fc41.switcheroo.0.0.git.177.aecb2069.x86_64 from @System
  - conflicting requests

Any ideas what the issue could be? I'm on Aurora 41, a slightly edited version of Kionite 41, but I cant imagine that would be the difference.

@taj-ny
Copy link
Owner

taj-ny commented Dec 4, 2024

Looks like your toolbox has Fedora 40, upgrade it to 41.

@taj-ny
Copy link
Owner

taj-ny commented Dec 4, 2024

#132 added better build instructions to the README, the .spec file is not required anymore.

@YouCanTouCan
Copy link

I can happily report that building it in a toolbx based on a fedora 41 image then following the instructions in the README worked perfectly for me. Thank you for this awesome project and for helping me with this issue so quickly.

@taj-ny
Copy link
Owner

taj-ny commented Dec 28, 2024

Judging by the reactions, I assume the issue is solved, so I'm closing it.

@taj-ny taj-ny closed this as completed Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants