Bug 2039869

Summary: Autheselect unnecessarily increases buildroot size
Product: [Fedora] Fedora Reporter: Vít Ondruch <vondruch>
Component: authselectAssignee: Pavel Březina <pbrezina>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dominik, fweimer, jhrozek, pbrezina
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: authselect-1.3.0-7.fc36 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-01-13 12:21:11 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: 2019052    

Description Vít Ondruch 2022-01-12 15:31:30 UTC
Description of problem:
It seems that mandatory autheslect [1] increases buildroot size


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:
~~~
DEBUG util.py:446:  Install  169 Packages
DEBUG util.py:446:  Total download size: 65 M
DEBUG util.py:446:  Installed size: 250 M
~~~


Expected results:
~~~
DEBUG util.py:446:  Install  152 Packages
DEBUG util.py:446:  Total download size: 59 M
DEBUG util.py:446:  Installed size: 231 M
~~~


Additional info:

Pease see the [2] for more details, but let me quote from the conversations:

~~~
On Tue, Jan 04, 2022 at 12:25:36PM -0800, Adam Williamson wrote:
> On Tue, 2022-01-04 at 14:57 +0100, Vít Ondruch wrote:
>> One of the packages which caught my attention and previously was not 
>> installed is systemd (there always were just systemd-libs). So is 
>> systemd to blame or is it something else?
>
> I think the difference is that authselect is now pulled in. authselect
> pulls in authselect-libs, which pulls in systemd, which I think pulls
> in the other things.
>
> The reason authselect gets pulled in is that pam now requires it:
>
> https://src.fedoraproject.org/rpms/pam/c/ff21ecd19213fce0570d448831d21f66db6abc2c?branch=rawhide
>
> that change landed in Rawhide in pam-1.5.2-8.fc36, which was built late
> on December 9th, and so likely appeared in the December 10th compose.

This is unfortunate as it most likely affects not just the buildroot but
also other types of minimal installs.

I think the best place to cut this dependency chain would be in authselect-libs:
it should not require systemd. What exactly does it need from systemd?

Zbyszek
~~~


[1] https://fedoraproject.org/wiki/Changes/Make_Authselect_Mandatory
[2] https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/CKDUFJOZC2BK63NZWJNV6QGUFMBZWGRY/

Comment 1 Pavel Březina 2022-01-13 12:21:11 UTC
    authselect-1.3.0-7: remove unnecessary dependencies

    - gawk, findutils and grep are no longer needed in scriptlets
    - systemd does not have to be required

    PAM and nsswitch.conf from shipped profiles references several
    systemd modules. However if those modules are not installed,
    they are simply ignored, therefore this dependency can be
    omitted.

    systemd is usually installed anyway, but it is not necessary to
    pull it in on cases when it is not desired, such as in containers.

Comment 2 Vít Ondruch 2022-01-13 14:23:20 UTC
Just quickly fired some scratch build and we are down to 149 packages:

~~~
DEBUG util.py:446:  Install  149 Packages
DEBUG util.py:446:  Total download size: 51 M
DEBUG util.py:446:  Installed size: 183 M
~~~

LGTM, thx.