RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1914827 - [RHEL8] dnf reposync implicitly downloads source rpms in spite of no --source option
Summary: [RHEL8] dnf reposync implicitly downloads source rpms in spite of no --source...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: dnf
Version: 8.3
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: rc
: 8.0
Assignee: Pavla Kratochvilova
QA Contact: Jan Blazek
URL:
Whiteboard:
Depends On: 1951414
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-01-11 09:58 UTC by Rajesh Dulhani
Modified: 2021-11-10 09:33 UTC (History)
3 users (show)

Fixed In Version: dnf-plugins-core-4.0.21-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-09 19:52:16 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2021:4464 0 None None None 2021-11-09 19:52:27 UTC

Description Rajesh Dulhani 2021-01-11 09:58:56 UTC
Description of problem:

dnf reposync implicitly downloads source rpms in spite of no --source option

RHEL8.x, the "dnf reposync" is misbehaving with respect to downloading source packages. Even if no "--source" option is provided, the source rpms still get downloaded.


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

Package - dnf-4.2.23-4.el8.noarch.rpm


Steps to Reproduce:

compile any package, example "hello" as mentioned in the below link

https://docs.fedoraproject.org/en-US/quick-docs/create-hello-world-rpm/


Create a repo with binary and source rpms and host this repo via any method (http etc.)


Create a repo configuration file named /root/hello.conf on both RHEL7 and RHEL8 reposync clients as shown below

cat hello.conf
[main]
metadata_expire = 86400
enabled = 1
[hello]
baseurl = http://<package-server>/hello

Run the reposync command which has following results:


On RHEL7:

reposync --download-metadata -m -c hello.conf -p "/root/hello"
Repository 'hello' is missing name in configuration, using id
hello | 3.0 kB 00:00:00
hello/primary_db | 2.3 kB 00:00:00
hello-2.10-1.el8.x86_64.rpm | 79 kB 00:00:01
#


On RHEL8:

dnf reposync --download-metadata -m -c hello.conf -p "/root/hello" || echo "There were errors. Exit code: $?"
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

Repository 'hello' is missing name in configuration, using id.
hello 1.6 kB/s | 1.5 kB 00:00
Last metadata expiration check: 0:00:01 ago on Mon 11 Jan 2021 07:14:08 AM CET.
hello 9.9 kB/s | 7.1 kB 00:00
(1/2): hello-2.10-1.el8.x86_64.rpm 64 kB/s | 79 kB 00:01
(2/2): hello-2.10-1.el8.src.rpm 185 kB/s | 716 kB 00:03
#

As seen in the commands and outputs, we did not specify "--source" option, but still, on RHEL8, the hello-2.10-1.el8.src.rpm also gets downloaded.


Actual results:

source rpm geting downloaded.

Expected results:

source rpm should not get downloaded.

Additional info:

Comment 1 Pavla Kratochvilova 2021-03-10 08:14:06 UTC
Hello,

The behavior you described is expected in RHEL 8. The --source option now only limits the result to source packages only and without the option, all packages are downloaded.

This might have not been clear from the documentation, so this PR improves the wording a little: https://github.com/rpm-software-management/dnf-plugins-core/pull/426

Comment 10 errata-xmlrpc 2021-11-09 19:52:16 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: dnf security and bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:4464


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