rwfus icon indicating copy to clipboard operation
rwfus copied to clipboard

[Question/Feature] Is IgnorePkg a viable workaround for safe overlay upgrades?

Open erisdev opened this issue 2 years ago • 6 comments

As per the wiki, pacman.conf has IgnorePkg to prevent upgrading certain packages. If one were to add all the Steam OS default installed packages to this list, would it be safe to run pacman -Su on the overlay, or is there some other issue that I'm not aware of? Obviously, I'm hesitant to simply fuck around and find out.

erisdev avatar Jan 31 '23 18:01 erisdev

That could very well work, yeah! Good idea!

ValShaped avatar Feb 05 '23 21:02 ValShaped

I looked into it further, and setting IgnorePkg would require touching /etc/pacman.conf. As /etc/ is itself an overlay, that would copy it into /var/lib/overlay/etc/upper, and when the Deck updates, that file will desync from the one in the base filesystem.

We can't remount /etc/ without crashing everything, either, since that's where all the config files are.

The only other options are to wrap pacman, or create a custom package manager interface based on libalpm, which I'm diametrically apposed to doing (since that would defeat the purpose of using overlays in the first place -- and at that point you might as well just add ~/.local/some_dir to $PATH, and use your custom pacman config to install packages there.)

If you know of a solution that doesn't require reimplementing or wrapping pacman, I'm all up for it, otherwise I don't know what to do.

ValShaped avatar Feb 06 '23 08:02 ValShaped

Would it be possible to be a little rude and say that rwfus "owns" /etc/pacman.conf and re-inject a freshly generated IgnorePkg into a clean copy of the file before each mount? Or maybe only when it detects that the OS image has been updated, if that's possible?

erisdev avatar Feb 06 '23 22:02 erisdev

The problem there is getting at the original file without unmounting /etc. Writing directly into an overlayfs upper dir while it's mounted is undefined behavior, so we can't just delete the modified file at runtime (though I've never had it fail in my testing)

(Rwfus can't start before SteamOS-Offload, since it relies on Offload for other things)

ValShaped avatar Feb 07 '23 01:02 ValShaped

Gotcha. the /etc overlay doesn't belong to rwfus, then? That makes sense.

Yeah, I'm not sure what else I'd have for this, but I'll let you know if I have a stroke of genius. I'm fairly familiar with Arch, but I haven't really dug too deep into the workings of Steam OS.

erisdev avatar Feb 07 '23 23:02 erisdev

Yep, the /etc overlay is handled by SteamOS Offload (which is part of the package steamos-customizations, iirc)

ValShaped avatar Feb 11 '23 05:02 ValShaped