Bug 1427144

Summary: libselinux-python not installed when @ansible-node in kickstart %packages
Product: [Fedora] Fedora Reporter: Vratislav Podzimek <vpodzime>
Component: dnfAssignee: Jaroslav Mracek <jmracek>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 26CC: jmracek, packaging-team-maint, rpm-software-management, vmukhame, vpodzime, vtrefny
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-2.7.3-1.fc26 dnf-2.7.3-1.fc27 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-10-08 08:27:32 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 Vratislav Podzimek 2017-02-27 12:59:42 UTC
Description of problem:
When '@ansible-node' is listed in kickstart %packages section, the libselinux-python package is not installed. However, if 'dnf groupinstall ansible-node' is run on the installed system, the package is installed.

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

How reproducible:
100%

Steps to Reproduce:
1. install a new system using kickstart with '@ansible-node' in %packages
2. do 'dnf groupinstall ansible-node' on an installed system

Actual results:
1. doesn't install the libselinux-python packages, 2. does.

Expected results:
libselinux-python installed because ansible doesn't work without it on systems where SELinux is enabled.

Additional info:
This is what 'dnf groupinfo ansible-node' says:
Group: Ansible node
 Description: This group contains packages necessary for the system to be controlled by Ansible.
 Mandatory Packages:
   python2-dnf
 Conditional Packages:
   libselinux-python

Comment 1 Igor Gnatenko 2017-02-27 15:11:21 UTC
      <packagereq type="conditional" requires="selinux-policy">libselinux-python</packagereq>


So it should work this way: if selinux-policy is getting installed, install libselinux-python.

Either selinux-policy is not getting installed at all and there's bug in `groupinstall` which ignores this requirement or selinux-policy is not referenced by any other comps group and there's bug in code which tells 

We would need to get debugdata from you (see dnf.conf.Conf.debug_sover).


The latter bug is not trivial to fix, this would require to completely eliminate dependency on libcomps and use libsolv for that (actually, this is best approach anyway).

Comment 2 Fedora End Of Life 2017-02-28 12:27:24 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 3 Honza Silhan 2017-03-08 11:49:21 UTC
Vratislav, can you please either upload debugdata as mentioned in comment 1 or report whether `selinux-policy` was already on the system?

Comment 4 Vratislav Podzimek 2017-03-14 12:04:41 UTC
(In reply to Honza Silhan from comment #3)
> Vratislav, can you please either upload debugdata as mentioned in comment 1
> or report whether `selinux-policy` was already on the system?

I can confirm that `selinux-policy` was installed during the installation, but `libselinux-python` wasn't while `@ansible-node` was.

I'm sorry, but I don't have enough time to get the debugdata now.

Comment 5 Honza Silhan 2017-03-22 12:55:47 UTC
DNF should consider packages within transaction when dealing with "conditional" packages (the same as rich dependencies works). The best way to do this is replace group.xmls with metapackages.

Comment 6 Jaroslav Mracek 2017-09-18 16:23:38 UTC
I created a patch that could solve the issue (https://github.com/rpm-software-management/dnf/pull/928), but it needs to be tested first by people that use kickstart. I can provide a copr repo according to your request (distro). I have to point out that it works only if multilib_policy=best (default dnf setting). The patch does not change the behavior with multilib_policy=all . Please can anyone test the patch?

Comment 7 Fedora Update System 2017-10-06 15:58:41 UTC
dnf-2.7.3-1.fc27 dnf-plugins-core-2.1.5-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-bb3b9775cc

Comment 8 Fedora Update System 2017-10-06 15:59:05 UTC
dnf-2.7.3-1.fc26 dnf-plugins-core-2.1.5-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-0f2730a8c2

Comment 9 Fedora Update System 2017-10-08 06:23:24 UTC
dnf-2.7.3-1.fc27, dnf-plugins-core-2.1.5-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-bb3b9775cc

Comment 10 Fedora Update System 2017-10-08 08:27:32 UTC
dnf-2.7.3-1.fc26, dnf-plugins-core-2.1.5-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2017-10-10 19:30:18 UTC
dnf-2.7.3-1.fc27, dnf-plugins-core-2.1.5-1.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 12 Red Hat Bugzilla 2023-09-14 03:54:24 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days