Bug 1722493
Summary: | gpgcheck=0 in a /etc/yum.repos.d/ .repo file is ignored | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Jiri Danek <jdanek> |
Component: | dnf | Assignee: | Jaroslav Rohel <jrohel> |
Status: | CLOSED ERRATA | QA Contact: | Eva Mrakova <emrakova> |
Severity: | medium | Docs Contact: | |
Priority: | high | ||
Version: | 8.1 | CC: | dmach, james.antill, jwboyer, mblaha, mdomonko, rkubis |
Target Milestone: | rc | Keywords: | Triaged |
Target Release: | 8.0 | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libdnf-0.35.1-5.el8 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2019-11-05 22:22:10 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1722637 |
Comment 5
Jiri Danek
2019-06-21 07:50:13 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 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. The problem cannot be reproduce with dnf-4.0.9, but can be reproduced with dnf-4.2.6. 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 Potential culprit: https://github.com/rpm-software-management/libdnf/pull/738/files#diff-44da4ba12130739fae594f3c423d0121R1884 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, ... 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 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 |