[Mageia-dev] minor systemd-related issues
Colin Guthrie
mageia at colin.guthr.ie
Thu Apr 12 23:56:34 CEST 2012
'Twas brillig, and David Walser at 12/04/12 21:25 did gyre and gimble:
> Colin Guthrie <mageia at ...> writes:
>>> httpd is running, but it is using the LSB init script instead of
>>> systemd units. I believe Colin's intention was to have
>>> apache-mpm-prefork install a symlink to httpd-prefork.service called
>>> httpd.service, but this symlink does not exist.
>>
>> Are you sure? The %post script should certainly have done that....
>>
>> [colin <at> jimmy ~]$ rpm -q --scripts apache-mpm-prefork
>> postinstall scriptlet (using /bin/sh):
>> ln -s /lib/systemd/system/httpd-prefork.service
>> /etc/systemd/system/httpd.service 2>/dev/null || :
>>
>> I guess the only possible explanation I can think of here is that
>> somehow, apache-mpm-prefork was upgraded before systemd was installed!
>> Perhaps we need to make sure system is installed early in the process?
>
> I am sure. The only symlink in /etc/systemd/system is default.target,
> everything else there is directories. Is that the right place to put that
> symlink anyway?
Yes, the /etc/.... tree is the right place for this as it's a symlink
that could get overwritten by another mpm should the user decide it's
the correct mpm for their setup. The generic httpd.service link serves
two purposes here: 1. is to allow users to still refer to "httpd"
service (i.e. the command "service httpd restart" will still work, and
likewise calling the sysvinit script directly will also still redirect
properly to systemctl) and 2. is to allow a smooth upgrade from mga1
such that the "enabled" state of the httpd service is properly migrated too.
> I hadn't thought of the possibility that systemd not being installed is the
> problem, but I guess that's the only logical explanation (unless systemd somehow
> swept that directory and deleted it for some reason). I guess maybe the mpm
> packages just need Requires(pre): systemd-units
Maybe, but looking at deps, basesystem requires systemd which requires
the units. Perhaps on upgrade, basesystem was not upgraded early enough.
Or maybe rpm-helper was not installed early enough... dunno. I can't
help but feel it would be overkill to add it to the mpm packages as a
Requires(pre) - it feels like it's something we should just be able to
rely on. That said, it would certainly work!
Thinking about it, I reckon rpm-helper especially should be something
that is always installed first on a big upgrade. There could be multiple
files running e.g. %_post_service etc. in their post scripts but we
certainly want the latest rpm-helper for that.
Perhaps something to check out.
Col
--
Colin Guthrie
colin(at)mageia.org
http://colin.guthr.ie/
Day Job:
Tribalogic Limited http://www.tribalogic.net/
Open Source:
Mageia Contributor http://www.mageia.org/
PulseAudio Hacker http://www.pulseaudio.org/
Trac Hacker http://trac.edgewall.org/
More information about the Mageia-dev
mailing list