From b976c04437daee44030ddd28f757a7df1ae5df45 Mon Sep 17 00:00:00 2001 From: Georgy Yakovlev Date: Wed, 7 Mar 2018 19:33:42 -0800 Subject: [PATCH] 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 --- sys-fs/zfs/zfs-0.6.5.11-r2.ebuild | 11 +++++++++++ sys-fs/zfs/zfs-0.6.5.4-r4.ebuild | 12 ++++++++++++ sys-fs/zfs/zfs-0.7.5-r2.ebuild | 12 +++++++++++- sys-fs/zfs/zfs-0.7.6-r1.ebuild | 12 +++++++++++- sys-fs/zfs/zfs-0.7.9999.ebuild | 12 +++++++++++- sys-fs/zfs/zfs-9999.ebuild | 12 +++++++++++- 6 files changed, 67 insertions(+), 4 deletions(-) diff --git a/sys-fs/zfs/zfs-0.6.5.11-r2.ebuild b/sys-fs/zfs/zfs-0.6.5.11-r2.ebuild index 1973747e4403..c658c579f070 100644 --- a/sys-fs/zfs/zfs-0.6.5.11-r2.ebuild +++ b/sys-fs/zfs/zfs-0.6.5.11-r2.ebuild @@ -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() { diff --git a/sys-fs/zfs/zfs-0.6.5.4-r4.ebuild b/sys-fs/zfs/zfs-0.6.5.4-r4.ebuild index afdedfdc2c2e..739109276099 100644 --- a/sys-fs/zfs/zfs-0.6.5.4-r4.ebuild +++ b/sys-fs/zfs/zfs-0.6.5.4-r4.ebuild @@ -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() { diff --git a/sys-fs/zfs/zfs-0.7.5-r2.ebuild b/sys-fs/zfs/zfs-0.7.5-r2.ebuild index 118fe97e22a6..b625fe321e0f 100644 --- a/sys-fs/zfs/zfs-0.7.5-r2.ebuild +++ b/sys-fs/zfs/zfs-0.7.5-r2.ebuild @@ -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() { diff --git a/sys-fs/zfs/zfs-0.7.6-r1.ebuild b/sys-fs/zfs/zfs-0.7.6-r1.ebuild index 118fe97e22a6..b625fe321e0f 100644 --- a/sys-fs/zfs/zfs-0.7.6-r1.ebuild +++ b/sys-fs/zfs/zfs-0.7.6-r1.ebuild @@ -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() { diff --git a/sys-fs/zfs/zfs-0.7.9999.ebuild b/sys-fs/zfs/zfs-0.7.9999.ebuild index 9a83e14a4afa..9c81d0b6e89b 100644 --- a/sys-fs/zfs/zfs-0.7.9999.ebuild +++ b/sys-fs/zfs/zfs-0.7.9999.ebuild @@ -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() { diff --git a/sys-fs/zfs/zfs-9999.ebuild b/sys-fs/zfs/zfs-9999.ebuild index 4599d9acad30..4ea8bfe85be0 100644 --- a/sys-fs/zfs/zfs-9999.ebuild +++ b/sys-fs/zfs/zfs-9999.ebuild @@ -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() { -- 2.26.2