Bug 2165325 - dnf downloadonly upgrade requires root privileges
Summary: dnf downloadonly upgrade requires root privileges
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf5
Version: 39
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: rpm-software-management
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-01-29 12:19 UTC by Adrian Torregrosa
Modified: 2023-08-16 08:14 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Adrian Torregrosa 2023-01-29 12:19:05 UTC
Description of problem:
Attempting to just download packages, not installing them, with the "dnf upgrade" command requires root privileges. 

Version-Release number of selected component (if applicable):


How reproducible:
Always.

Steps to Reproduce:
1. Give command:
dnf --releasever 37 --setopt=keepcache=1 --downloadonly --downloaddir=common --noautoremove upgrade

Actual results:
Error: This command has to be run with superuser privileges (under the root user on most systems).

Expected results:
A number of packages ought to be downloaded.

Additional info:

Comment 1 amatej 2023-01-30 16:07:04 UTC
Thank you for the report, we should fix that. When --downloadonly is used (especially with --downloaddir so there are no problems later finding the packages) there is no need for superuser privileges.

We will be targeting dnf5 with the fix: https://github.com/rpm-software-management/dnf5 so it might be a while until it is fixed in stable fedora (it is currently in rawhide).

In the meantime you could try our download plugin so:
$ dnf download pkg-name
I understand it is a different use case and it doesn't download the full upgrade transaction but perhaps it could help.

Comment 2 Ben Cotton 2023-04-25 18:18:25 UTC
This message is a reminder that Fedora Linux 36 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 36 on 2023-05-16.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '36'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 36 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 3 Fedora Release Engineering 2023-08-16 08:14:44 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.


Note You need to log in before you can comment on or make changes to this bug.