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 1722493 - gpgcheck=0 in a /etc/yum.repos.d/ .repo file is ignored
Summary: gpgcheck=0 in a /etc/yum.repos.d/ .repo file is ignored
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: dnf
Version: 8.1
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: rc
: 8.0
Assignee: Jaroslav Rohel
QA Contact: Eva Mrakova
URL:
Whiteboard:
Depends On:
Blocks: 1722637
TreeView+ depends on / blocked
 
Reported: 2019-06-20 13:22 UTC by Jiri Danek
Modified: 2020-11-14 09:02 UTC (History)
6 users (show)

Fixed In Version: libdnf-0.35.1-5.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-05 22:22:10 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-2019:3583 0 None None None 2019-11-05 22:22:23 UTC

Comment 5 Jiri Danek 2019-06-21 07:50:13 UTC
You are correct, the machine had, when I kicked it up, the following config, and it was overriding what was in /etc/yum.repos.d/pulp.repo

# cat /etc/yum.conf 
[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=True
best=True

As far as I remember, I never had to touch /etc/yum.conf to permit installing unsigned packages from repos. Is this some new intentional feature in RHEL 8.1?

Comment 6 Radim Kubis 2019-06-21 08:51:32 UTC
I can confirm that I did not need to touch /etc/yum.conf on RHEL6, RHEL7 and RHEL8 before, when my repofiles in /etc/yum.repos.d had gpgcheck=0 although gpgcheck was set to 1 in /etc/yum.conf

Comment 8 Jaroslav Mracek 2019-06-21 11:56:29 UTC
I am investigating the issue, but so far I am unable to reproduce it. Please could you provide additional information:
Output as an attachment from: "yum repolist --all -v"
                              "rpm -q dnf libdnf"

Also a content from all .repo file from `/etc/yum.repos.d` is needed.

Please could you also provide an information about subscription on the system? Important is also to know whatever the issue is reproducible without the subscription plugin ("--disableplugin=*").

PS: The reproducer in Comment 1 cannot be accessed.
PPS: The presented behavior in the bug is not intended, but cannot say where is the problem due to impossibility to reproduce it.

Comment 9 Jaroslav Mracek 2019-06-21 13:40:11 UTC
The problem cannot be reproduce with dnf-4.0.9, but can be reproduced with dnf-4.2.6.

Comment 10 Jaroslav Mracek 2019-06-21 14:32:38 UTC
It looks like that the last entry in repo file is ignored. But the situation will be more difficult because rhel-8-Server-AppStream doesn't work, but rhel-8-Server-AppStream1 and rhel-8-Server-AppStream2 like expected.

[rhel-8-Server-AppStream]
name=rhel-8-server-AppStream/8Server/x86_64
baseurl=http://download.devel.redhat.com/rel-eng/rhel-8/RHEL-8/RHEL-8.1.0-20190619.2/compose/AppStream/x86_64/os/
enabled=1
gpgcheck=0


[rhel-8-Server-AppStream1]
name=rhel-8-server-AppStream/8Server/x86_64
baseurl=http://download.devel.redhat.com/rel-eng/rhel-8/RHEL-8/RHEL-8.1.0-20190619.2/compose/AppStream/x86_64/os/
enabled=1
gpgcheck=0
# hi

[rhel-8-Server-AppStream2]
name=rhel-8-server-AppStream/8Server/x86_64
baseurl=http://download.devel.redhat.com/rel-eng/rhel-8/RHEL-8/RHEL-8.1.0-20190619.2/compose/AppStream/x86_64/os/
gpgcheck=0
enabled=1

Comment 12 Jaroslav Rohel 2019-06-24 16:06:43 UTC
Config parser supports multiline values. Example:
key = value first line
  value second line
If a line starts with whitespace characters and it is not a section name, it is treated as continuation of previous key=value line.

In this case a line with white spaces is after "gpgcheck=0". The value was parsed as "0\n" (zero with empty line -> not later convertible to boolean) instead of "0".
I made a fix that ignores trailing blank lines. So, newline characters are trimmed out from the end of line.

PR: https://github.com/rpm-software-management/libdnf/pull/754

Note:
Support for multiline values are for yum compatibility. But I hope that nobody is using this feature. It is not supported in old libdnf "context" part. -> It is not working with microdnf, PackageKit, ...

Comment 13 Marek Blaha 2019-06-25 05:57:57 UTC
So the workaround until the patch from comment12 gets released is to remove spaces from all "empty" lines in config file.

Added test in PR https://github.com/rpm-software-management/ci-dnf-stack/pull/567

Comment 19 errata-xmlrpc 2019-11-05 22:22:10 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, 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-2019:3583


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