Bug 1654659 - Optimize cronie RPM spec for systemd requirements when installing it in containers
Summary: Optimize cronie RPM spec for systemd requirements when installing it in conta...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: cronie
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomas Mraz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1663456
TreeView+ depends on / blocked
 
Reported: 2018-11-29 11:18 UTC by Bogdan Dobrelya
Modified: 2019-01-23 10:42 UTC (History)
5 users (show)

Fixed In Version: cronie-1.5.2-4.fc30
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1654672 1663456 1671362 (view as bug list)
Environment:
Last Closed: 2018-11-30 10:36:22 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
patch (1.42 KB, patch)
2018-11-29 11:18 UTC, Bogdan Dobrelya
no flags Details | Diff
a better patch (1.51 KB, patch)
2018-11-29 11:30 UTC, Bogdan Dobrelya
no flags Details | Diff
final patch (1.58 KB, patch)
2018-11-30 10:08 UTC, Bogdan Dobrelya
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1804822 0 None None None 2018-11-29 11:31:23 UTC

Description Bogdan Dobrelya 2018-11-29 11:18:58 UTC
Created attachment 1509776 [details]
patch

Description of problem:

When installing cronie 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 2018-11-29 11:20:58 UTC
It would be also very nice to have this for Fedora28. Please let me know if I have to clone this bug for that release? (Not sure what to do to the patch then, I submitted it against master of https://src.fedoraproject.org/rpms/cronie repo, and I can see no stable branches there)

Comment 2 Panu Matilainen 2018-11-29 11:21:47 UTC
This has nothing to do with rpm.

Comment 3 Bogdan Dobrelya 2018-11-29 11:30:07 UTC
Created attachment 1509789 [details]
a better patch

this version of the patch also covers SUSE and RHEL distros

Comment 4 Bogdan Dobrelya 2018-11-29 11:32:34 UTC
@Panu, I'm sorry I was confused by the 'rpm' path used in the repo URL https://src.fedoraproject.org/rpms/cronie :)

Comment 5 Tomas Mraz 2018-11-30 08:39:19 UTC
What would be the point of installing cronie into a container where systemd is not present? This is a system service which cannot be started without systemd.

Also we do not ship anything that is specific to other distros than Fedora and RHEL in Fedora package spec so the SUSE part is irrelevant.

Comment 6 Bogdan Dobrelya 2018-11-30 10:01:18 UTC
@Tomas, in TripleO (OpenStack installer) we have containers that run crond and consume tasks from /var/spool/cron (puppet generates those via the tooling we have in tripleo to trigger puppet in config-containers https://review.openstack.org/#/c/478919/5/docker/docker-puppet.py), like in this example https://review.openstack.org/#/c/485865/2/docker/services/heat-api.yaml@94

So that should be working totally w/o having systemd in containers AFAICT.

Comment 7 Bogdan Dobrelya 2018-11-30 10:08:57 UTC
Created attachment 1510097 [details]
final patch

Comment 8 Tomas Mraz 2018-11-30 10:27:38 UTC
OK, then.

Comment 9 Bogdan Dobrelya 2018-11-30 10:40:43 UTC
Thank you Tomas! What else shall I do to have it also accepted into fc28?

Comment 10 Tomas Mraz 2018-11-30 10:49:06 UTC
I wonder if it is really a safe change to do in already released Fedoras.

Comment 11 Bogdan Dobrelya 2018-11-30 13:20:44 UTC
It would be very nice to have this for f28-stabilized as well.

Comment 12 Bogdan Dobrelya 2019-01-23 10:42:12 UTC
JFYI the final patch was https://src.fedoraproject.org/rpms/cronie/c/4d665d4d53f8e2be58f3e64442714c1990cde05d?branch=master
Thanks for helping!


Note You need to log in before you can comment on or make changes to this bug.