Bug 1847714

Summary: Upgrading via cockpit does not honors includepkgs
Product: Red Hat Enterprise Linux 8 Reporter: g.danti
Component: libdnfAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED ERRATA QA Contact: Jan Blazek <jblazek>
Severity: high Docs Contact:
Priority: medium    
Version: 8.2CC: g.danti, klember, mpitt, pkratoch
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libdnf-0.48.0-2.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 01:53:12 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:

Description g.danti 2020-06-16 20:46:05 UTC
Description of problem:
When using cockpit's "software update" tab, the "includepkgs" directive eventually defined in some repo is ignored. This can wreak havok on system where a thirdy party repository is enabled but filtered to provide only a very specific package subset. While cockpit is clearly affected by this problem, the root issue stems from PackageKit itself - which ignores the "includepkgs" directive.

Version-Release number of selected component (if applicable):
cockpit-packagekit-211.3-1.el8.noarch
PackageKit-1.1.12-4.el8.x86_64

How reproducible:
Enable a thirdy party repository which redefines some system package (eg: enable a fedora repository). While doing it repo-wide is clearly unwise, it can be very useful to reference only *some* packages via the "includepkgs" directive. However, clicking on the "check for update" button exposed in cockipit will lead to massive upgrades, which can wreak havoc on the entire system.

Steps to Reproduce:
1. enable a fedora repo with a specific "includepkgs" directive including a single packet
2. check that "yum update" will *not* propose a massive upgrade
3. the "check for update" button in cockpit *will* suggest upgrading 100s packages

Actual results:
Massive, dangerous upgrades are proposed

Expected results:
Only enabled/unfiltered packages should be proposed for the upgrade. More broadly, PackageKit should honor yum/dum directives as "includepkgs".

Additional info:
None

Comment 1 Martin Pitt 2020-06-17 04:54:51 UTC
If dnf (aka yum) honors it, then somehow PackageKit/libdnf doesn't.

Comment 2 Kalev Lember 2020-06-17 06:35:01 UTC
includepkgs support has landed upstream libdnf now: https://github.com/rpm-software-management/libdnf/pull/860
I assume it just needs backporting to RHEL.

Comment 3 Daniel Mach 2020-06-17 06:45:50 UTC
I believe the RHEL 8.3 libdnf contains this patch already.

Acceptance criteria: If includepkgs option is set for a repo, PackageKit offers only packages according to the option. This applies on all operations incl. install, upgrade, list, etc.

Comment 4 Kalev Lember 2020-06-17 07:07:54 UTC
Ah nice, thanks!

Comment 11 errata-xmlrpc 2020-11-04 01:53:12 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 (yum bug fix and enhancement 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/RHEA-2020:4510