Bug 1947918

Summary: sssd-common uses Recommends for libsss_autofs, libsss_sudo, and sssd-nfs-idmap
Product: Red Hat Enterprise Linux 9 Reporter: Jan Pazdziora (Red Hat) <jpazdziora>
Component: sssdAssignee: Alexey Tikhonov <atikhono>
Status: CLOSED ERRATA QA Contact: Steeve Goveas <sgoveas>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.0CC: atikhono, dlavu, grajaiya, jhrozek, jpazdziora, lslebodn, mzidek, pbrezina, sbose, sgoveas, thalman, tscherf
Target Milestone: betaKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: sync-to-jira
Fixed In Version: sssd-2.6.1-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-17 16:00:30 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 Jan Pazdziora (Red Hat) 2021-04-09 14:10:53 UTC
Description of problem:

RHEL 9 Content Structure and Guidelines state that weak dependencies in BaseOS are allowed, but discouraged.

By using the Recommends weak dependencies especially for packages in @core group (Minimal host installation) or their direct dependencies, the recommended package gets pulled into the installed package set depending on the current configuration of the dnf transaction.

The sssd package Recommends libsss_autofs(x86-64) = 2.4.2-2.el9, libsss_sudo = 2.4.2-2.el9, and sssd-nfs-idmap = 2.4.2-2.el9.

If those packages are needed by sssd for correct operation, Requires should be used.

If libsss_autofs, libsss_sudo, and sssd-nfs-idmap are essential in minimal host installations, they should be listed in the @core group in the comps file, not pulled in as a weak side-effect of having sssd-common in @core.

If they are listed primarily for convenience, Suggests might be better option. Or just drop the weak dependency completely.

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

sssd-common-2.4.2-2.el9.x86_64

How reproducible:

Deterministic.

Steps to Reproduce:
1. dnf remove -y libsss_autofs libsss_sudo sssd-nfs-idmap
2. dnf reinstall -y sssd-common

Actual results:

================================================================================
 Package            Arch       Version                  Repository         Size
================================================================================
Reinstalling:
 sssd-common        x86_64     2.4.2-2.el9              beaker-BaseOS     1.6 M
Installing dependencies:
 libnfsidmap        x86_64     1:2.5.2-1.rc4.el9        beaker-BaseOS      63 k
Installing weak dependencies:
 libsss_autofs      x86_64     2.4.2-2.el9              beaker-BaseOS      36 k
 libsss_sudo        x86_64     2.4.2-2.el9              beaker-BaseOS      33 k
 sssd-nfs-idmap     x86_64     2.4.2-2.el9              beaker-BaseOS      36 k

Expected results:

Only sssd-common reinstalled.

Additional info:

Comment 3 Sumit Bose 2021-05-07 14:25:10 UTC
Hi Jan,

the listed packages provide interfaces to SSSD for other packages, e.g. libsss_sudo for sudo. So ideally they should be installed if both SSSD and sudo are installed. I wonder if boolean dependencies would be allowed for RHEL9 like e.g. for the sssd.spec:

    Requires: libsss_sudo = 2.4.2-2.el9 if sudo

Similar for the other packages.

bye,
Sumit

Comment 4 Jan Pazdziora (Red Hat) 2021-05-11 10:19:55 UTC
Yes, using boolean dependencies seems like the best way of modelling this relationship.

Comment 8 Steeve Goveas 2021-12-08 11:45:53 UTC
[root@ci-vm-10-0-138-130 ~]# rpm -q libsss_autofs libsss_sudo sssd-nfs-idmap sssd-common sssd
package libsss_autofs is not installed
package libsss_sudo is not installed
package sssd-nfs-idmap is not installed
sssd-common-2.5.2-5.el9.x86_64
sssd-2.5.2-5.el9.x86_64
 
[root@ci-vm-10-0-138-130 ~]# yum remove sssd-common -y
 
[root@ci-vm-10-0-138-130 ~]# rpm -q sudo
sudo-1.9.5p2-7.el9.x86_64
 
[root@ci-vm-10-0-138-130 ~]# rpm -q autofs
package autofs is not installed
 
[root@ci-vm-10-0-138-130 ~]# yum install sssd-common
 
Updating Subscription Management repositories.
Unable to read consumer identity
 
This system is not registered with an entitlement server. You can use subscription-manager to register.
 
Last metadata expiration check: 0:45:01 ago on Wed 08 Dec 2021 04:34:50 AM EST.
Dependencies resolved.
================================================================================================================================================================================
 Package                                         Architecture                          Version                                        Repository                           Size
================================================================================================================================================================================
Installing:
 sssd-common                                     x86_64                                2.5.2-5.el9                                    rhel                                1.6 M
Installing dependencies:
 c-ares                                          x86_64                                1.17.1-4.el9                                   rhel                                107 k
 libdhash                                        x86_64                                0.5.0-51.el9                                   rhel                                 32 k
 libldb                                          x86_64                                2.3.0-6.el9                                    rhel                                194 k
 libsss_certmap                                  x86_64                                2.5.2-5.el9                                    rhel                                 74 k
 libsss_idmap                                    x86_64                                2.5.2-5.el9                                    rhel                                 42 k
 libsss_nss_idmap                                x86_64                                2.5.2-5.el9                                    rhel                                 44 k
 libtalloc                                       x86_64                                2.3.2-5.el9                                    rhel                                 33 k
 libtdb                                          x86_64                                1.4.3-10.el9                                   rhel                                 53 k
 libtevent                                       x86_64                                0.11.0-1.el9                                   rhel                                 46 k
 lmdb-libs                                       x86_64                                0.9.29-3.el9                                   rhel                                 63 k
 sssd-client                                     x86_64                                2.5.2-5.el9                                    rhel                                140 k
Installing weak dependencies:
 libsss_autofs                                   x86_64                                2.5.2-5.el9                                    rhel                                 38 k
 libsss_sudo                                     x86_64                                2.5.2-5.el9                                    rhel                                 34 k
 sssd-nfs-idmap                                  x86_64                                2.5.2-5.el9                                    rhel                                 37 k
 
Transaction Summary
================================================================================================================================================================================
Install  15 Packages
 
Total download size: 2.5 M
Installed size: 7.3 M
Is this ok [y/N]: y
 
 
[root@ci-vm-10-0-138-130 ~]# rpm -q libsss_autofs libsss_sudo sssd-nfs-idmap sssd-common sssd
libsss_autofs-2.5.2-5.el9.x86_64
libsss_sudo-2.5.2-5.el9.x86_64
sssd-nfs-idmap-2.5.2-5.el9.x86_64
sssd-common-2.5.2-5.el9.x86_64
package sssd is not installed
 
[root@ci-vm-10-0-138-130 ~]# dnf config-manager --dump  | grep -i weak
exclude_from_weak =
exclude_from_weak_autodetect = 1
install_weak_deps = 1
 
[root@ci-vm-10-0-138-130 ~]# yum remove libsss_autofs-2.5.2-5.el9.x86_64 libsss_sudo-2.5.2-5.el9.x86_64
Updating Subscription Management repositories.
Unable to read consumer identity
 
This system is not registered with an entitlement server. You can use subscription-manager to register.
 
Dependencies resolved.
================================================================================================================================================================================
 Package                                       Architecture                           Version                                       Repository                             Size
================================================================================================================================================================================
Removing:
 libsss_autofs                                 x86_64                                 2.5.2-5.el9                                   @rhel                                  62 k
 libsss_sudo                                   x86_64                                 2.5.2-5.el9                                   @rhel                                  54 k
 
Transaction Summary
================================================================================================================================================================================
Remove  2 Packages
 
Freed space: 116 k
Is this ok [y/N]: y
 
 
Installing sssd-common 2.6.1-1.el9
 
[root@ci-vm-10-0-138-130 ~]# yum upgrade sssd-common
Updating Subscription Management repositories.
Unable to read consumer identity
 
This system is not registered with an entitlement server. You can use subscription-manager to register.
 
rhel-sssd                                                                                                                                        10 MB/s | 1.0 MB     00:00    
rhel                                                                                                                                            429 kB/s | 2.7 kB     00:00    
rhel-AppStream                                                                                                                                  730 kB/s | 3.2 kB     00:00    
Dependencies resolved.
================================================================================================================================================================================
 Package                                        Architecture                         Version                                      Repository                               Size
================================================================================================================================================================================
Upgrading:
 libsss_certmap                                 x86_64                               2.6.1-1.el9                                  rhel-sssd                                77 k
 libsss_idmap                                   x86_64                               2.6.1-1.el9                                  rhel-sssd                                40 k
 libsss_nss_idmap                               x86_64                               2.6.1-1.el9                                  rhel-sssd                                41 k
 sssd-client                                    x86_64                               2.6.1-1.el9                                  rhel-sssd                               144 k
 sssd-common                                    x86_64                               2.6.1-1.el9                                  rhel-sssd                               1.5 M
 sssd-nfs-idmap                                 x86_64                               2.6.1-1.el9                                  rhel-sssd                                37 k
Installing dependencies:
 libsss_sudo                                    x86_64                               2.6.1-1.el9                                  rhel-sssd                                32 k
 
Transaction Summary
================================================================================================================================================================================
Install  1 Package
Upgrade  6 Packages
 
Total download size: 1.9 M
Is this ok [y/N]: N

[root@ci-vm-10-0-138-130 ~]# yum remove sssd-nfs-idmap-2.5.2-5.el9.x86_64 libnfsidmap

[root@ci-vm-10-0-138-130 ~]# yum upgrade sssd-common
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

Last metadata expiration check: 0:11:53 ago on Wed 08 Dec 2021 06:26:36 AM EST.
Dependencies resolved.
================================================================================================================================================================================
 Package                                        Architecture                         Version                                      Repository                               Size
================================================================================================================================================================================
Upgrading:
 libsss_certmap                                 x86_64                               2.6.1-1.el9                                  rhel-sssd                                77 k
 libsss_idmap                                   x86_64                               2.6.1-1.el9                                  rhel-sssd                                40 k
 libsss_nss_idmap                               x86_64                               2.6.1-1.el9                                  rhel-sssd                                41 k
 libsss_sudo                                    x86_64                               2.6.1-1.el9                                  rhel-sssd                                32 k
 sssd-client                                    x86_64                               2.6.1-1.el9                                  rhel-sssd                               144 k
 sssd-common                                    x86_64                               2.6.1-1.el9                                  rhel-sssd                               1.5 M

Transaction Summary
================================================================================================================================================================================
Upgrade  6 Packages

Total download size: 1.9 M
Is this ok [y/N]: y

Comment 15 errata-xmlrpc 2022-05-17 16:00:30 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 (new packages: sssd), 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/RHBA-2022:4015