sys-fs/zfs: fix systemd related installation paths

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>
This commit is contained in:
Georgy Yakovlev
2018-03-07 19:33:42 -08:00
committed by Matthew Thode
parent 20c8e69ec3
commit b976c04437
6 changed files with 67 additions and 4 deletions

View 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() {

View 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() {

View 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() {

View 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() {

View 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() {

View 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() {