-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
[OpenSUSE] zypper download command requires root #30
Comments
|
rspm::enable()
fails due to lack of root privileges on OpenSUSE (Tumbleweed) rspm::enable()
fails due to lack of root privileges on OpenSUSE
rspm::enable()
fails due to lack of root privileges on OpenSUSE
After a quick look, maybe this is just not possible with zypper. Maybe this is only possible via dnf. |
Thanks for taking a look! Double-checking the |
And in case it was lost in wordiness: |
As a normal user on OpenSUSE Tumbleweed,
rspm::enable()
encounters an error trying to installreqs
:This appears to be due to
zypper -d
(=zypper --download-only
) still requiring root privileges.I expect that this problem also occurs on OpenSUSE Leap:
podman run opensuse/leap bash -c "zypper install -y sudo && useradd --create-home testuser && sudo -u testuser bash -c '(cd ~ && zypper --pkg-cache-dir /home/testuser install -dy patchelf)'"
also produces
Root privileges are required to run this command.
when attempting to usezypper -d
.Potential alternatives
Treat
reqs
aspreqs
instead and forcing user to get root to install themNot as smooth as the current approach, but not too bad.
zypper --pkg-cache-dir . download <name>
There is
zypper download
that doesn't require root privileges. Some notes:zypper download
does not appear to automatically download dependencies, though this may not be an issue:ldd
probably already exists, at least onopensuse/{leap,tumbleweed}
images from Docker Hub (andzypper install ldd
would fail anyway, as it's not recognized as a package or capability name)zypper install patchelf
on the above containers appears to only installpatchelf
and no additional (dependency) packages, so it looks like fresh systems may already have all of its dependencies.zypper info --requires <name>
, though its output seems pretty unfriendly; hopefully somewhere there's a better option.)rpm_install()
routes torpm2archive
, which isn't installed by default, and whichzypper install
can't find.rspm:::rpm_version()
is'4.19.1.1'
. But thever >= "1000.0"
command seems to successfully run when I manually try it. Perhaps therpm_version
logic could be adjusted to avoid this issue.opensuse/leap
image has anrpm --version
ofRPM version 4.14.3
, but norpm2archive
installed, andzypper install rpm2archive
doesn't find it as a package or capability.part of `sudo zypper install patchelf` output
`zypper info --requires patchelf` output
Further issues down the line, at least for Tumbleweed
pak::pkg_install
at least) seems to be a one-time "ℹ source packages are missing from packagemanager.posit.co" as it apparently routes everything to install from source instead.options(repos)
points me tohttps://packagemanager.posit.co/all/__linux__/opensuse20240809/latest
, which points tohttps://packagemanager.posit.co/all/__linux__/opensuse20240809/latest/src/contrib/PACKAGES
, which contains the message "Distribution with identifier 'opensuse20240809' not supported or not enabled". (As opposed tohttps://packagemanager.posit.co/cran/__linux__/opensuse155/latest/src/contrib/PACKAGES
which is actually a package listing.)zypper download
+>= "1000.0"
approach might successfully work. I haven't fully tested this yet though.The text was updated successfully, but these errors were encountered: