swupd-client icon indicating copy to clipboard operation
swupd-client copied to clipboard

Put MoM file somewhere readable to non-root user

Open lebensterben opened this issue 4 years ago • 4 comments

Currently, the system caches the MoM file of official repo at /var/tmp/swupd/Manifest.MoM, which is readable to all users. If it doesn't exist, there's another in /var/lib/swupd/VERSION/Manifest.MoM. But this one, is only readable to root user. Because its /var/lib/swupd is only readable to root user.

For 3rd-party repos, I cannot find a MoM file under readable directory. I do find them at /var/lib/swupd/3rd-party/REPO_NAME/VERSION/Manifest.MoM. But that's no readable.

The main drawback for this is it's difficult to write shell completion for 3rd-party repos. Although this is possible, but I prefer not to ask for root privilege for running a shell completion script.

Please consider to put MoM file for each 3rd-party repo at somewhere like /var/tmp/swupd/3rd-party/REPO_NAME/Manifest.MoM.

lebensterben avatar Apr 22 '20 11:04 lebensterben

relevant issue: https://github.com/clearlinux/swupd-client/issues/490

lebensterben avatar Apr 22 '20 20:04 lebensterben

Yes, this is indeed a problem. We need to improve how we handle permissions in /var/lib/swupd/

otaviobp avatar Apr 22 '20 20:04 otaviobp

@lebensterben we just merged a change that changes the location where we download the manifests, and this location is world readable (https://github.com/clearlinux/swupd-client/commit/8d54e6c995f836f0c65cec511d62bf9dd4539e10). Would this solve your problem?

BTW, these changes have not been released yet, they will be in the next swupd release.

castulo avatar Jun 10 '20 16:06 castulo

@castulo Thanks for notifying me. I will update the scripts after this is released.

lebensterben avatar Jun 10 '20 16:06 lebensterben