[Mageia-dev] %{_unitdir} after /usr move
Colin Guthrie
mageia at colin.guthr.ie
Tue Jul 24 16:25:59 CEST 2012
'Twas brillig, and Olav Vitters at 24/07/12 15:11 did gyre and gimble:
> $ rpm -E '%{_unitdir}'
> /lib/systemd/system
>
> This should show:
> /usr/lib/systemd/system
>
> I see that it is defined in two places:
> 1. /etc/rpm/macros.d/20build.macros: %_unitdir /lib/systemd/system
> 2. /usr/lib/rpm/macros.systemd: %_unitdir /usr/lib/systemd/system
>
> The latter obviously provides the right setting. But I guess due to
> ordering and so on it picks up the setting from 20build.macros.
>
> This is preventing me to package NetworkManager properly (I prefer
> relying on %{_unitdir} to give me the location, so the spec still works
> on Mageia 2).
>
> Could someone fix this?
Yeah this was on my to-fix list.
As far as I'm aware the file in /usr/lib/rpm/macros.systemd will not be
looked at at all anyway as it's not in any kind of magical .d folder.
I would like to see the following changes:
1) We define a /usr/lib/rpm/macros.d/ folder.
2) Any packages shipping file in the /etc/ folder should change and use
/usr/lib instead (/etc should be for admin overrides, NOT for general
packaging).
3) We include the systemd macos in the /usr/lib/rpm/macos.d/ folder.
4) Any files shipping systemd units require systemd-devel to ensure they
have the macro.
While steps 1-3 are probably OK (just need work) I'm not sure if
requiring systemd-devel is overkill when all they need is a small part
of it. I could potentially create a systemd-unit-devel package which
only contained the neccesary stuff which would be lighter on the
requirements front but I'm also against too much fragmentation here, so
I'd be tempted to just say "require systemd-devel" and sod the
not-strictly-necessary stuff it might end up pulling in.
Thoughts?
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