[Request] swupd stateless whitelist?

Hello! I write this request because of a limitation that did arise to some users while using NVIDIA’s propietary drivers.
The problem is like it was described here:
https://docs.01.org/clearlinux/latest/zh_CN/tutorials/nvidia.html

and here:

Quote from official NVIDIA doc in CL documentation:

…the file /usr/lib/libGL.so conflicts with the file provided by the mesa package in Clear Linux OS and the file NVIDIA provides. If a Clear Linux OS update overwrites these files, a reinstallation of the NVIDIA driver might be required.

Basically, NVIDIA’s drivers get things installed in system directories, and of course, conflicts with swupd. My suggestion as a workaround for this, would be to have some kind of whitelist for swupd, where you can specifically tell what to ignore when attempting to update and repair. This can be helpful to put directories or specifically files that are in those directories in that whitelist and avoid the mentioned issue.

As of now, I think the only “solution” is just disabling autoupdate altogether, but it’s not a viable option, also considering that CL updates frequently, it’s not viable either to be reinstalling NVIDIA’s driver each time.

Clear Linux OS is an amazing distro with superb performance, I absolutely love it, and this is the only limitation I find so far, if this gets addressed then this will become the ultimate Linux distro in my opinion.

Hope you can consider adding this feature in the future, thanks a lot in advance!

1 Like

Good suggestion.

In the meantime, we use chattr:slight_smile:

1 Like

…What I like around here is that I always learn something new hahaha!
Assuming swupd respects that command, then this could be a pretty nice workaround I think!

1 Like

And it works perfectly on directories, recursively.

sudo chattr -R +i /immutable-dir

2 Likes

You can take it even a few steps further, like Silverblue :

1 Like

I haven’t had the time to install the NVIDIA’s drivers on my desktop computer since I’m still using my Intel Classmate PC for my study needs :sweat_smile: , but once I get the time and need for use of 3D graphics such as Blender with my GTX, I will try what that article says as well! I had peeked a bit and seems that I should put the drivers into a container or something like that? If the first command “chattr” gets overwritten by swupd when it updates/repairs, I will definitely go into a deep dive in that article, thanks!

2 Likes

I tried chattr to see what would happen to swupd.

Testing: I installed CL including the NVIDIA driver. Then, I copied a lib from /opt/nvidia to /usr/lib64 and made it immutable. Next, I ran sudo swupd bundle-add devpkg-mesa. That will restore the mesa libGL libraries, removed by the NVIDIA installer.

Installing files...
Error: Target has different file type but could not be removed: /usr/lib64/libEGL.so.1
Error: File staging failed: /usr/lib64/libEGL.so.1
Error: Failed to install required files
Failed to install 1 of 1 bundles

It was worth a try though. Hurray for the swupd tool. It passes due to stopping early which is what one would expect.

1 Like

The ignore list for swupd is working. The pre-install-driver script creates /etc/swupd/config. That and and the fix-nvidia-libGL trigger script work together, ensuring the state of the NVIDIA installation. Finally, the CL dev-team resolved two edge cases. Issues 2690 and 2694.

1 Like