On Tue, Jul 14, 2015 at 11:32 PM, Sérgio Basto <sergio@serjux.com> wrote:
Hello ,

On Ter, 2015-07-14 at 21:41 -0500, Richard Shaw wrote:
> Ok, I wasn't sure if installing in a chroot was a sufficient test case
> so I tried installing akmods in a F22 virtual machine and can confirm
> that although the services are explicitly enabled in %post that they
> are not enabled after install. Somehow systemd (or something else) is
> refusing to allow the enable commands to work in %post and is using
> the preset file instead.

Not in my test case :

mock -r fedora-22-i386-rpmfusion_free --install  akmods
mock -r fedora-22-i386-rpmfusion_free --shell

<mock-chroot>sh-4.3# systemctl is-enabled akmods
enabled

Ok, I've been able to reproduce your result but I think it's lying. It says enabled there but I think it's actually answering for the host system, not the chroot because there's still not a symbolic link where it should be:

 <mock-chroot>sh-4.3# ll /usr/lib/systemd/system/multi-user.target.wants/
total 0
lrwxrwxrwx. 1 root root 15 May 14 09:34 dbus.service -> ../dbus.service
lrwxrwxrwx. 1 root root 15 Jul  7 08:28 getty.target -> ../getty.target
lrwxrwxrwx. 1 root root 33 Jul  7 08:28 systemd-ask-password-wall.path -> ../systemd-ask-password-wall.path
lrwxrwxrwx. 1 root root 25 Jul  7 08:28 systemd-logind.service -> ../systemd-logind.service
lrwxrwxrwx. 1 root root 39 Jul  7 08:28 systemd-update-utmp-runlevel.service -> ../systemd-update-utmp-runlevel.service
lrwxrwxrwx. 1 root root 32 Jul  7 08:28 systemd-user-sessions.service -> ../systemd-user-sessions.service

Thanks,
Richard