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 1337105 - Yum should handle correctly package checksum mismatch with proxy enabled
Summary: Yum should handle correctly package checksum mismatch with proxy enabled
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: yum
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Michal Domonkos
QA Contact: Karel Srot
URL:
Whiteboard:
Depends On:
Blocks: 1342179
TreeView+ depends on / blocked
 
Reported: 2016-05-18 10:08 UTC by Vadim Rutkovsky
Modified: 2016-11-04 09:37 UTC (History)
5 users (show)

Fixed In Version: yum-3.4.3-148.el7
Doc Type: Enhancement
Doc Text:
Feature: The "http_caching" option has been extended with the new possible value "lazy:packages". Reason: Sometimes, packages may change their content on the server after they have been published. This usually happens when packages are first pushed to the repository unsigned and are only signed at a later time. If the user is behind a proxy cache, they may experience checksum verification errors when attempting to install such packages. This could be worked around by using the "none" value, however that disallows HTTP caching unconditionally, which is not optimal. Result: When the new value is used in the yum configuration file, yum will behave the same way as with "packages" but improve the RPM download logic to prevent such false checksum errors. As package caching will still be allowed under normal circumstances, the users may consider using the new value rather than "none" if they experience the above issues.
Clone Of:
: 1342179 (view as bug list)
Environment:
Last Closed: 2016-11-04 05:32:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1360532 0 unspecified CLOSED Failed to install rpm packages of rhel-7.3 from SAT5 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHBA-2016:2397 0 normal SHIPPED_LIVE yum bug fix and enhancement update 2016-11-03 13:55:12 UTC

Internal Links: 1360532

Description Vadim Rutkovsky 2016-05-18 10:08:50 UTC
Description of problem:
Yum currently doesn't handle the situation when package is updated without changing its name (e.g. package was signed) with proxy enabled:

As discussed at https://www.redhat.com/archives/rhl-devel-list/2008-January/msg02361.html:
----------
Yum and "X-Cache: HIT"
======================
If you use wget --server-response and a target file, you see the raw
HTTP headers of that request.  If the file is already cached, you see a
HTTP header like below:

X-Cache: HIT from proxyserver.example.com

Proposal:
Improve yum with the following download logic:

IF (a downloaded repodata/* file doesn't match the repomd.xml checksum
    OR a downloaded RPM doesn't match the expected checksum)
   AND "X-Cache: HIT from" was in its HTTP header
THEN download it again with URLGrabber option: http_headers =
(('Pragma', 'no-cache')

This should solve the case where RPM files legitimately change contents
without changing filenames, like RPM signing.
-------

This feature is required for OSBS team to cache rpms used to build Docker containers, as the packages might be signed while being cached.



Steps to Reproduce:
1. Setup squid cache for a yum repo
2. Set 'yum_proxy' address for the repo on client machine
3. Make sure the package hits the cache - e.g. install the package on client machine using squid proxy
4. Sign the package with a new key
5. Install a package on different machine using squid as a proxy

Actual results:
Old package is fetched - yum will complain about mismatched checksum

Expected results:
Yum should be aware that proxy is used when checksums don't match and fetch the package avoiding proxy (using Pragma = no-cache header in request)

Comment 25 errata-xmlrpc 2016-11-04 05:32:14 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://rhn.redhat.com/errata/RHBA-2016-2397.html


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