Bug 1671362

Summary: Optimize dnf RPM spec for systemd requirements when installing it in containers
Product: [Fedora] Fedora Reporter: Bogdan Dobrelya <bdobreli>
Component: dnfAssignee: Marek Blaha <mblaha>
Status: CLOSED CANTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dmach, jmracek, jrohel, mblaha, mhatina, packaging-team-maint, pkratoch, rpm-software-management, vmukhame
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1654659
: 1671374 (view as bug list) Environment:
Last Closed: 2019-02-11 13:13:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Bogdan Dobrelya 2019-01-31 13:33:58 UTC
+++ This bug was initially created as a clone of Bug #1654659 +++

Description of problem:

When installing dnf into a container image, it is preferable to use the systemd_ordering macro.

According to https://fedoraproject.org/wiki/Packaging:Scriptlets:
If a package is suitable for installation without systemd (in a
container image, for example) and does not require any of the
systemd mechanisms such as tmpfiles.d, then the systemd_ordering macro
MAY be used instead of the systemd_requires macro. 

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Bogdan Dobrelya 2019-01-31 13:50:41 UTC
A PR against master https://src.fedoraproject.org/rpms/dnf/pull-request/14
and f29 backport https://src.fedoraproject.org/rpms/dnf/pull-request/15

Comment 2 Marek Blaha 2019-02-04 13:53:54 UTC
Please, can you create PR against our upstream repository https://github.com/rpm-software-management/dnf ? We are maintaining the spec file there. Btw, are you aware whether this %{?systemd_ordering} macro is also usable on RHEL 7?

Comment 3 Bogdan Dobrelya 2019-02-05 16:12:25 UTC
@Marek, will update the PR target, thanks!

I think adapting this particular change request for RHEL7 may be a good idea, but wouldn't buy a lot, as other components, like iptables, iputils, rsyslog, puppet and more things will still be relying on systemd via its RPM specs.

Comment 4 Bogdan Dobrelya 2019-02-05 16:27:26 UTC
Here is a new PR target https://github.com/rpm-software-management/dnf/pull/1315

Comment 5 Marek Blaha 2019-02-06 15:30:58 UTC
Thanks, I'll look into it.

Comment 6 Bogdan Dobrelya 2019-02-11 13:13:28 UTC
Closing because of https://github.com/rpm-software-management/dnf/pull/1315#issuecomment-462321911

Comment 7 Bogdan Dobrelya 2019-02-11 13:24:26 UTC
Folks, perchance, do you know if there is a way to fix that to allow dnf leveraging the ordering macro? For containerized OpenStack, we really do not want to pull in systemd & deps for all containers only because we install packages with dnf there.