Gentoo Archives: gentoo-commits

From: Georgy Yakovlev <gyakovlev@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs/
Date: Sun, 18 Aug 2019 01:19:33
Message-Id: 1566090250.17b9ca6a5d3e11ddc9ba372f9d50104d7a6a5a71.gyakovlev@gentoo
1 commit: 17b9ca6a5d3e11ddc9ba372f9d50104d7a6a5a71
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Sun Aug 18 00:19:26 2019 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Sun Aug 18 01:04:10 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17b9ca6a
7
8 sys-fs/zfs: update live ebuild
9
10 remove *.la files if no static-libs requested
11
12 clarify genkernel encryption support with genkernel-4
13
14 remove obsolete zfs initscript checks, those were here since cvs times.
15 Those initscripts long gone and systems already migrated to new scripts.
16
17 remove obsolete systemd-reenable calls, those were needed with earlier
18 versions incorrectly installing systemd units to wrong location.
19 it has been more than a year since those versions are gone.
20
21 Bug: https://bugs.gentoo.org/647688
22 Package-Manager: Portage-2.3.71, Repoman-2.3.17
23 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
24
25 sys-fs/zfs/zfs-9999.ebuild | 73 ++++++++++++----------------------------------
26 1 file changed, 18 insertions(+), 55 deletions(-)
27
28 diff --git a/sys-fs/zfs/zfs-9999.ebuild b/sys-fs/zfs/zfs-9999.ebuild
29 index b0b23dadff9..df1803820df 100644
30 --- a/sys-fs/zfs/zfs-9999.ebuild
31 +++ b/sys-fs/zfs/zfs-9999.ebuild
32 @@ -119,6 +119,11 @@ src_prepare() {
33 distutils-r1_src_prepare
34 popd >/dev/null || die
35 fi
36 +
37 + # prevent errors showing up on zfs-mount stop, openrc will unmount all filesystems anyway
38 + if use rootfs; then
39 + sed -i "/^ZFS_UNMOUNT=/ s/yes/no/" etc/init.d/zfs.in || die
40 + fi
41 }
42
43 src_configure() {
44 @@ -162,6 +167,10 @@ src_install() {
45
46 use test-suite || rm -rf "${ED}/usr/share/zfs"
47
48 + if ! use static-libs; then
49 + find "${ED}/" -name '*.la' -delete || die
50 + fi
51 +
52 dobashcomp contrib/bash_completion.d/zfs
53 bashcomp_alias zfs zpool
54
55 @@ -183,7 +192,7 @@ pkg_postinst() {
56 if has_version "<=sys-kernel/genkernel-3.5.3.3"; then
57 einfo "genkernel version 3.5.3.3 and earlier does NOT support"
58 einfo " unlocking pools with native zfs encryption enabled at boot"
59 - einfo " use dracut or genkernel-9999 if you requre this functionality"
60 + einfo " use dracut or >=genkernel-4.0.0 if you requre this functionality"
61 fi
62
63 if ! use kernel-builtin && [[ ${PV} = "9999" ]]; then
64 @@ -192,60 +201,14 @@ pkg_postinst() {
65 update_moduledb
66 fi
67
68 - if [[ -e "${EROOT}/etc/runlevels/boot/zfs" ]]; then
69 - einfo 'The zfs boot script has been split into the zfs-import,'
70 - einfo 'zfs-mount and zfs-share scripts.'
71 - einfo
72 - einfo 'You had the zfs script in your boot runlevel. For your'
73 - einfo 'convenience, it has been automatically removed and the three'
74 - einfo 'scripts that replace it have been configured to start.'
75 - einfo 'The zfs-import and zfs-mount scripts have been added to the boot'
76 - einfo 'runlevel while the zfs-share script is in the default runlevel.'
77 -
78 - rm "${EROOT}/etc/runlevels/boot/zfs"
79 - ln -snf "${EROOT}/etc/init.d/zfs-import" \
80 - "${EROOT}/etc/runlevels/boot/zfs-import"
81 - ln -snf "${EROOT}/etc/init.d/zfs-mount" \
82 - "${EROOT}/etc/runlevels/boot/zfs-mount"
83 - ln -snf "${EROOT}/etc/init.d/zfs-share" \
84 - "${EROOT}/etc/runlevels/default/zfs-share"
85 - else
86 - [[ -e "${EROOT}/etc/runlevels/boot/zfs-import" ]] || \
87 - einfo "You should add zfs-import to the boot runlevel."
88 - [[ -e "${EROOT}/etc/runlevels/boot/zfs-mount" ]]|| \
89 - einfo "You should add zfs-mount to the boot runlevel."
90 - [[ -e "${EROOT}/etc/runlevels/default/zfs-share" ]] || \
91 - einfo "You should add zfs-share to the default runlevel."
92 - fi
93 -
94 - if [[ -e "${EROOT}/etc/runlevels/default/zed" ]]; then
95 - einfo 'The downstream OpenRC zed script has replaced by the upstream'
96 - einfo 'OpenRC zfs-zed script.'
97 - einfo
98 - einfo 'You had the zed script in your default runlevel. For your'
99 - einfo 'convenience, it has been automatically removed and the zfs-zed'
100 - einfo 'script that replaced it has been configured to start.'
101 -
102 - rm "${EROOT}/etc/runlevels/boot/zed"
103 - ln -snf "${EROOT}/etc/init.d/zfs-zed" \
104 - "${EROOT}/etc/runlevels/default/zfs-zed"
105 - else
106 - [[ -e "${EROOT}/etc/runlevels/default/zfs-zed" ]] || \
107 - einfo "You should add zfs-zed to the default runlevel."
108 - fi
109 -
110 - if [[ -e "${EROOT}/etc/runlevels/shutdown/zfs-shutdown" ]]; then
111 - einfo "The zfs-shutdown script is obsolete. Removing it from runlevel."
112 - rm "${EROOT}/etc/runlevels/shutdown/zfs-shutdown"
113 - fi
114 -
115 - systemd_reenable zfs-zed.service
116 - systemd_reenable zfs-import-cache.service
117 - systemd_reenable zfs-import-scan.service
118 - systemd_reenable zfs-mount.service
119 - systemd_reenable zfs-share.service
120 - systemd_reenable zfs-import.target
121 - systemd_reenable zfs.target
122 + [[ -e "${EROOT}/etc/runlevels/boot/zfs-import" ]] || \
123 + einfo "You should add zfs-import to the boot runlevel."
124 + [[ -e "${EROOT}/etc/runlevels/boot/zfs-mount" ]]|| \
125 + einfo "You should add zfs-mount to the boot runlevel."
126 + [[ -e "${EROOT}/etc/runlevels/default/zfs-share" ]] || \
127 + einfo "You should add zfs-share to the default runlevel."
128 + [[ -e "${EROOT}/etc/runlevels/default/zfs-zed" ]] || \
129 + einfo "You should add zfs-zed to the default runlevel."
130 }
131
132 pkg_postrm() {