sys-fs/zfs: fix systemd related installation paths
authorGeorgy Yakovlev <ya@sysdump.net>
Thu, 8 Mar 2018 03:33:42 +0000 (19:33 -0800)
committerMatthew Thode <prometheanfire@gentoo.org>
Thu, 8 Mar 2018 16:20:41 +0000 (10:20 -0600)
ebuilds intalls most systemd files into
/usr/lib/systemd
while it should be
/lib/systemd

qlist =sys-fs/zfs-0.7.6 | grep systemd
/usr/lib/systemd/system-preset/50-zfs.preset
/usr/lib/systemd/system/zfs-zed.service
/usr/lib/systemd/system/zfs-import-cache.service
/usr/lib/systemd/system/zfs-import-scan.service
/usr/lib/systemd/system/zfs-mount.service
/usr/lib/systemd/system/zfs-share.service
/usr/lib/systemd/system/zfs-import.target
/usr/lib/systemd/system/zfs.target
/lib/systemd/system/zfs.service < this is ok

The reason is that default values for:
--with-systemdpresetdir and
--with-systemdmodulesloaddir

point to /usr/lib/systemd

This commit overrides the location to to use
gentoo preferred /lib/systemd

Use systemd_reapply to re-create broken symlinks

Also fixes minor QA, no more --with-blkid switch
for 7.xx and live ebuilds.

Package-Manager: Portage-2.3.24, Repoman-2.3.6
Signed-off-by: Matthew Thode <prometheanfire@gentoo.org>
sys-fs/zfs/zfs-0.6.5.11-r2.ebuild
sys-fs/zfs/zfs-0.6.5.4-r4.ebuild
sys-fs/zfs/zfs-0.7.5-r2.ebuild
sys-fs/zfs/zfs-0.7.6-r1.ebuild
sys-fs/zfs/zfs-0.7.9999.ebuild
sys-fs/zfs/zfs-9999.ebuild

index 1973747e4403939a0864d87fb20459998c7155f2..c658c579f070d568840040e72cf79511facae24f 100644 (file)
@@ -105,6 +105,8 @@ src_configure() {
                --with-linux-obj="${KV_OUT_DIR}"
                --with-udevdir="$(get_udevdir)"
                --with-blkid
+               --with-systemdunitdir="$(systemd_get_systemunitdir)"
+               --with-systemdpresetdir="${EPREFIX}/lib/systemd/system-preset"
                $(use_enable debug)
        )
        autotools-utils_src_configure
@@ -191,6 +193,15 @@ pkg_postinst() {
                rm "${EROOT}etc/runlevels/shutdown/zfs-shutdown"
        fi
 
+       systemd_reenable zfs-zed.service
+       systemd_reenable zfs-import-cache.service
+       systemd_reenable zfs-import-scan.service
+       systemd_reenable zfs-mount.service
+       systemd_reenable zfs-share.service
+       systemd_reenable zfs-import.target
+       systemd_reenable zfs.target
+       systemd_reenable zfs.service
+
 }
 
 pkg_postrm() {
index afdedfdc2c2eb4cc26e7f609ed03951f0391de5d..739109276099811b3fec0e9cdbeb6375c0a0ccba 100644 (file)
@@ -121,6 +121,8 @@ src_configure() {
                --with-linux-obj="${KV_OUT_DIR}"
                --with-udevdir="$(get_udevdir)"
                --with-blkid
+               --with-systemdunitdir="$(systemd_get_systemunitdir)"
+               --with-systemdpresetdir="${EPREFIX}/lib/systemd/system-preset"
                $(use_enable debug)
        )
        autotools-utils_src_configure
@@ -223,6 +225,16 @@ pkg_postinst() {
                ewarn "It is very important that you update your initramfs after this "
                ewarn "update."
        fi
+
+       systemd_reenable zfs-zed.service
+       systemd_reenable zfs-import-cache.service
+       systemd_reenable zfs-import-scan.service
+       systemd_reenable zfs-mount.service
+       systemd_reenable zfs-share.service
+       systemd_reenable zfs-import.target
+       systemd_reenable zfs.target
+       systemd_reenable zfs.service
+
 }
 
 pkg_postrm() {
index 118fe97e22a6103921a75e72be055d0999f196f3..b625fe321e0f5866b6aebb9e32616503aef593c0 100644 (file)
@@ -105,7 +105,8 @@ src_configure() {
                --with-linux="${KV_DIR}"
                --with-linux-obj="${KV_OUT_DIR}"
                --with-udevdir="$(get_udevdir)"
-               --with-blkid
+               --with-systemdunitdir="$(systemd_get_systemunitdir)"
+               --with-systemdpresetdir="${EPREFIX}/lib/systemd/system-preset"
                $(use_enable debug)
        )
        autotools-utils_src_configure
@@ -192,6 +193,15 @@ pkg_postinst() {
                rm "${EROOT}etc/runlevels/shutdown/zfs-shutdown"
        fi
 
+       systemd_reenable zfs-zed.service
+       systemd_reenable zfs-import-cache.service
+       systemd_reenable zfs-import-scan.service
+       systemd_reenable zfs-mount.service
+       systemd_reenable zfs-share.service
+       systemd_reenable zfs-import.target
+       systemd_reenable zfs.target
+       systemd_reenable zfs.service
+
 }
 
 pkg_postrm() {
index 118fe97e22a6103921a75e72be055d0999f196f3..b625fe321e0f5866b6aebb9e32616503aef593c0 100644 (file)
@@ -105,7 +105,8 @@ src_configure() {
                --with-linux="${KV_DIR}"
                --with-linux-obj="${KV_OUT_DIR}"
                --with-udevdir="$(get_udevdir)"
-               --with-blkid
+               --with-systemdunitdir="$(systemd_get_systemunitdir)"
+               --with-systemdpresetdir="${EPREFIX}/lib/systemd/system-preset"
                $(use_enable debug)
        )
        autotools-utils_src_configure
@@ -192,6 +193,15 @@ pkg_postinst() {
                rm "${EROOT}etc/runlevels/shutdown/zfs-shutdown"
        fi
 
+       systemd_reenable zfs-zed.service
+       systemd_reenable zfs-import-cache.service
+       systemd_reenable zfs-import-scan.service
+       systemd_reenable zfs-mount.service
+       systemd_reenable zfs-share.service
+       systemd_reenable zfs-import.target
+       systemd_reenable zfs.target
+       systemd_reenable zfs.service
+
 }
 
 pkg_postrm() {
index 9a83e14a4afa8bda6baa27bd6589cf2217fdd059..9c81d0b6e89b5d0860623f8903627490416949e4 100644 (file)
@@ -101,7 +101,8 @@ src_configure() {
                --with-linux="${KV_DIR}"
                --with-linux-obj="${KV_OUT_DIR}"
                --with-udevdir="$(get_udevdir)"
-               --with-blkid
+               --with-systemdunitdir="$(systemd_get_systemunitdir)"
+               --with-systemdpresetdir="${EPREFIX}/lib/systemd/system-preset"
                $(use_enable debug)
        )
        autotools-utils_src_configure
@@ -188,6 +189,15 @@ pkg_postinst() {
                rm "${EROOT}etc/runlevels/shutdown/zfs-shutdown"
        fi
 
+       systemd_reenable zfs-zed.service
+       systemd_reenable zfs-import-cache.service
+       systemd_reenable zfs-import-scan.service
+       systemd_reenable zfs-mount.service
+       systemd_reenable zfs-share.service
+       systemd_reenable zfs-import.target
+       systemd_reenable zfs.target
+       systemd_reenable zfs.service
+
 }
 
 pkg_postrm() {
index 4599d9acad3098affa5d14f92bc19775b6ef79ad..4ea8bfe85be0a6d9eac100d61c95cc34df10f9ae 100644 (file)
@@ -106,7 +106,8 @@ src_configure() {
                --with-linux="${KV_DIR}"
                --with-linux-obj="${KV_OUT_DIR}"
                --with-udevdir="$(get_udevdir)"
-               --with-blkid
+               --with-systemdunitdir="$(systemd_get_systemunitdir)"
+               --with-systemdpresetdir="${EPREFIX}/lib/systemd/system-preset"
                $(use_enable debug)
        )
        autotools-utils_src_configure
@@ -197,6 +198,15 @@ pkg_postinst() {
                rm "${EROOT}etc/runlevels/shutdown/zfs-shutdown"
        fi
 
+       systemd_reenable zfs-zed.service
+       systemd_reenable zfs-import-cache.service
+       systemd_reenable zfs-import-scan.service
+       systemd_reenable zfs-mount.service
+       systemd_reenable zfs-share.service
+       systemd_reenable zfs-import.target
+       systemd_reenable zfs.target
+       systemd_reenable zfs.service
+
 }
 
 pkg_postrm() {