Gentoo Archives: gentoo-commits

From: Richard Yao <ryao@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs/
Date: Thu, 28 Jan 2016 06:17:56
Message-Id: 1453961857.1f024c42ad5c7cc283751df2c48a938634cbf0f9.ryao@gentoo
1 commit: 1f024c42ad5c7cc283751df2c48a938634cbf0f9
2 Author: Richard Yao <ryao <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jan 28 06:14:33 2016 +0000
4 Commit: Richard Yao <ryao <AT> gentoo <DOT> org>
5 CommitDate: Thu Jan 28 06:17:37 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f024c42
7
8 sys-fs/zfs-{0.6.5.3-r5,0.6.5.4-r2}: Regression fix
9
10 The fix for the `zfs send -R` / `zfs send -p` regression in 0.6.5.3-r4 and
11 0.6.5.4-r1 caused a regression where the internal get_numeric function failed
12 to retrieve the case, version, utf8only and normalization properties. This
13 broke printing in `zfs get case,version,utf8only,normalization`, hid them in
14 `zfs get all` and broke mount.zfs on legacy mountpoints because it would try to
15 lookup the version.
16
17 Package-Manager: portage-2.2.24
18 Signed-off-by: Richard Yao <ryao <AT> gentoo.org>
19
20 sys-fs/zfs/Manifest | 2 +
21 sys-fs/zfs/zfs-0.6.5.3-r5.ebuild | 230 +++++++++++++++++++++++++++++++++++++++
22 sys-fs/zfs/zfs-0.6.5.4-r2.ebuild | 230 +++++++++++++++++++++++++++++++++++++++
23 3 files changed, 462 insertions(+)
24
25 diff --git a/sys-fs/zfs/Manifest b/sys-fs/zfs/Manifest
26 index aa89cf2..c436c04 100644
27 --- a/sys-fs/zfs/Manifest
28 +++ b/sys-fs/zfs/Manifest
29 @@ -9,7 +9,9 @@ DIST zfs-0.6.5.2.tar.gz 1817267 SHA256 aecd2bc5189f2a71a45eb222230146bed231af4f3
30 DIST zfs-0.6.5.3-patches-p0.tar.xz 63780 SHA256 cc6d2881304738619b9d00bc55fbd358119b35cbb345cae2ecf538051f1b7fe7 SHA512 4a531fd10d1d4d9c9cabaad9c13d8112eab3641249a7ce44599288bc4510b444d132833fae2fdf922eff43670ce77d32972c7b5b4a7d70f80c3365a0dcc89b70 WHIRLPOOL adc20e7917a518c790007499763210a4d27a164abe00a86f76d64f56f0fafc459f5d5c483019acacc136e41c57894e669fd58956b3f0ac0bcafeb1e02fec7988
31 DIST zfs-0.6.5.3-patches-p2.tar.xz 85996 SHA256 0e38b1bd7e2eb96c74b3eaab49c14f1f65fa02dc42b62b6015200185bfc911c7 SHA512 0a8fb131cc9a5a239a7434593000259a581b20ee7c6fef87ec2ea78281b7887151e219ebe66603b9dafaa4fa22cbf8c55175e1f6b36af4502c147c478f0b3e38 WHIRLPOOL 726bf1c05605943a205e2e70099c6cf8c7ba8cc9bbf34d45a2d56cea87c1e23166700979e47c82dd91bd1778e297dd211a0e6f48e0eab2392471218bcb5853ce
32 DIST zfs-0.6.5.3-patches-p3.tar.xz 88736 SHA256 031cd97765f890d9b78e1a5746cbd2a3ce06c7208693ec75c0b47324ac67b97a SHA512 8f17cc6e02a35828a57a7c2a437d9d18a41203b6e3f9e154b2ab863296b64596dc827afeeb0f993e37f47881d0f2ed4834f270d0ba843ab84b21c491cc352576 WHIRLPOOL 20f69c0a936bb612d5e3b551d4bf904aca3aff6d885d72f67f3b14cd720094ec13e383032ee4e322b0e81017d8ffcfafb47bf07f273badef34f7210d687ddacc
33 +DIST zfs-0.6.5.3-patches-p4.tar.xz 89140 SHA256 34114671614aec3b33b17e6fc66a31549b3dd3e1d21ccd68d6987a1e1641f86b SHA512 3f8a4490e654a2d13bf4d31ee688276243244d4e0ab7c7911d597730bbbf6c9d7dea8e075409de4c22e871928cd647ce3064a671a1259f3adaf2b27bcc5370b8 WHIRLPOOL a63c0a2eff6c29c9600e4aaafa7120a0c1bd9bdf9b2f1e52d5a85df2c02e5e924ed74a406919cff9353a77c697dcf4248749ad6a7137f17dc427c7f0d63ea99a
34 DIST zfs-0.6.5.3.tar.gz 2524218 SHA256 49e6f9760ea172cb756f7357e4bcb90ee0293028540a68d62ed087724276131f SHA512 325cb91b7ddbcd6aa0bb9fc41eb0099dbb047a4e32d096fd414799729ef68cbc9c2e15714092eff8044a681af4ab552bd9ac1949cc673c6c5c3de1a23d9895ec WHIRLPOOL 957c3a75bb11befd4b74583883f2f11f717deb6bda368939b342049e809aa191a9ee8d1e709eaddc2a831418c7fdb5e763f918ff56d45f03baf4569ef8a4a070
35 DIST zfs-0.6.5.4-patches-p1.tar.xz 64004 SHA256 83877d9b7c629730838325fd5b16bcb54259520e200f0539de9b8edfdcee9403 SHA512 9203356b43bdad2ed78c946af8c95c9fc4d2996b41a09a3b1f5a8657d2742ac69d10b4a87d443db497d591878cf7a70ebb19762b0df135ee25f4e8d2ed6ad71f WHIRLPOOL ff5788356d6a85608d22ea2c010a799464922614204c7eea06b57930a44ee876e596a053a773205de0543d36c04337d60c32594939e8e64d3022906c51c4d4e6
36 +DIST zfs-0.6.5.4-patches-p2.tar.xz 63912 SHA256 bbcfe43ee4a46deed86543d23abd31bbc662408f56ef8f7c9500dc25fecd49c4 SHA512 9f598c2a750b92dadddb677a6a9dda4573fa91421a82270d8104d718da4b945a4d5412bab92037a033cec1ec177f2a0eb52207babd023847918e3754054ec5e9 WHIRLPOOL bab1330c7489dd172c522300698f6a2d670a2f6ddcf8cd2566d1daffe8b41a3667755ad1ab377d07716af66449f7332974bcd7df4647bb028b5f5279c59c428c
37 DIST zfs-0.6.5.4.tar.gz 2506470 SHA256 780862ec2301ccace412a324787e9df762cff6046e73e2ac0ebdce9e2bd59b0f SHA512 90c87cd95fd06cf34755358e7cc4053d19f351316133f0b808e7585a3fc8f82e7c0f49072c2995d0520de5104fd04d91a166a0d5b6c923c82dfb2fb4f7f57a01 WHIRLPOOL eacd2ec09afdbc3f6d946583116296fadcd7d0dea5158c89f82f6d0b02e0cbf075712015bfa5f321ae5815cf86af13b39ce93e5026e6a00da58d9ddb04d12320
38 DIST zfs-kmod-0.6.2-p4.tar.xz 63984 SHA256 9167edc4be86e3fcda6b3c198e51f92ab0c95ac5baca11666c28029a628cdac9 SHA512 13e4ec415c35d2f268d89565745f5898c0943423577a2ba6714b3a069c5a80f244cd06dff91464f38dd4ed60673d1145ead080bb03a56d4be33e328f948ffa64 WHIRLPOOL 8c399ec67119ed4fbebb5599d00f888918678bc4e4ea369b4bdc5c75bfc90fc76396087624c8011de370a54ff103bccaa8922d05ac7ccebb2b3481bbbcf44b19
39
40 diff --git a/sys-fs/zfs/zfs-0.6.5.3-r5.ebuild b/sys-fs/zfs/zfs-0.6.5.3-r5.ebuild
41 new file mode 100644
42 index 0000000..812f639
43 --- /dev/null
44 +++ b/sys-fs/zfs/zfs-0.6.5.3-r5.ebuild
45 @@ -0,0 +1,230 @@
46 +# Copyright 1999-2015 Gentoo Foundation
47 +# Distributed under the terms of the GNU General Public License v2
48 +# $Id$
49 +
50 +EAPI="5"
51 +PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} )
52 +
53 +AT_M4DIR="config"
54 +AUTOTOOLS_AUTORECONF="1"
55 +AUTOTOOLS_IN_SOURCE_BUILD="1"
56 +
57 +if [ ${PV} == "9999" ] ; then
58 + inherit git-r3 linux-mod
59 + AUTOTOOLS_AUTORECONF="1"
60 + EGIT_REPO_URI="git://github.com/zfsonlinux/${PN}.git"
61 +else
62 + SRC_URI="https://github.com/zfsonlinux/${PN}/releases/download/${P}/${P}.tar.gz
63 + https://dev.gentoo.org/~ryao/dist/${P}-patches-p$((${PR#r} - 1)).tar.xz"
64 + KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
65 +fi
66 +
67 +inherit autotools-utils bash-completion-r1 flag-o-matic linux-info python-r1 systemd toolchain-funcs udev
68 +
69 +DESCRIPTION="Userland utilities for ZFS Linux kernel module"
70 +HOMEPAGE="http://zfsonlinux.org/"
71 +
72 +LICENSE="BSD-2 CDDL MIT"
73 +SLOT="0"
74 +IUSE="custom-cflags debug kernel-builtin +rootfs test-suite static-libs"
75 +RESTRICT="test"
76 +
77 +COMMON_DEPEND="
78 + sys-apps/util-linux[static-libs?]
79 + sys-libs/zlib[static-libs(+)?]
80 + virtual/awk
81 +"
82 +DEPEND="${COMMON_DEPEND}
83 + virtual/pkgconfig
84 +"
85 +
86 +RDEPEND="${COMMON_DEPEND}
87 + !=sys-apps/grep-2.13*
88 + !kernel-builtin? (
89 + =sys-fs/zfs-kmod-${PV}*
90 + !<sys-fs/zfs-kmod-0.6.5.3-r1
91 + )
92 + !sys-fs/zfs-fuse
93 + !prefix? ( virtual/udev )
94 + test-suite? (
95 + sys-apps/util-linux
96 + sys-devel/bc
97 + sys-block/parted
98 + sys-fs/lsscsi
99 + sys-fs/mdadm
100 + sys-process/procps
101 + virtual/modutils
102 + )
103 + rootfs? (
104 + app-arch/cpio
105 + app-misc/pax-utils
106 + !<sys-boot/grub-2.00-r2:2
107 + )
108 + !>=sys-fs/udev-init-scripts-28
109 +"
110 +
111 +AT_M4DIR="config"
112 +AUTOTOOLS_IN_SOURCE_BUILD="1"
113 +
114 +pkg_setup() {
115 + if use kernel_linux && use test-suite; then
116 + linux-info_pkg_setup
117 + if ! linux_config_exists; then
118 + ewarn "Cannot check the linux kernel configuration."
119 + else
120 + # recheck that we don't have usblp to collide with libusb
121 + if use test-suite; then
122 + if linux_chkconfig_present BLK_DEV_LOOP; then
123 + eerror "The ZFS test suite requires loop device support enabled."
124 + eerror "Please enable it:"
125 + eerror " CONFIG_BLK_DEV_LOOP=y"
126 + eerror "in /usr/src/linux/.config or"
127 + eerror " Device Drivers --->"
128 + eerror " Block devices --->"
129 + eerror " [ ] Loopback device support"
130 + fi
131 + fi
132 + fi
133 + fi
134 +
135 +}
136 +
137 +src_prepare() {
138 + if [ ${PV} != "9999" ]
139 + then
140 + # Apply patch set
141 + EPATCH_SUFFIX="patch" \
142 + EPATCH_FORCE="yes" \
143 + epatch "${WORKDIR}/${P}-patches"
144 + fi
145 +
146 + # Update paths
147 + sed -e "s|/sbin/lsmod|/bin/lsmod|" \
148 + -e "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" \
149 + -e "s|/sbin/parted|/usr/sbin/parted|" \
150 + -i scripts/common.sh.in
151 +
152 + autotools-utils_src_prepare
153 +}
154 +
155 +src_configure() {
156 + use custom-cflags || strip-flags
157 + local myeconfargs=(
158 + --bindir="${EPREFIX}/bin"
159 + --sbindir="${EPREFIX}/sbin"
160 + --with-config=user
161 + --with-dracutdir="/usr/$(get_libdir)/dracut"
162 + --with-linux="${KV_DIR}"
163 + --with-linux-obj="${KV_OUT_DIR}"
164 + --with-udevdir="$(get_udevdir)"
165 + --with-blkid
166 + $(use_enable debug)
167 + )
168 + autotools-utils_src_configure
169 +
170 + # prepare systemd unit and helper script
171 + cat "${FILESDIR}/zfs.service.in" | \
172 + sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
173 + -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
174 + > "${T}/zfs.service" || die
175 + cat "${FILESDIR}/zfs-init.sh.in" | \
176 + sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
177 + -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
178 + > "${T}/zfs-init.sh" || die
179 +}
180 +
181 +src_install() {
182 + autotools-utils_src_install
183 + gen_usr_ldscript -a uutil nvpair zpool zfs zfs_core
184 + use test-suite || rm -rf "${ED}usr/share/zfs"
185 +
186 + newbashcomp "${FILESDIR}/bash-completion-r1" zfs
187 + bashcomp_alias zfs zpool
188 +
189 + exeinto /usr/libexec
190 + doexe "${T}/zfs-init.sh"
191 + systemd_dounit "${T}/zfs.service"
192 +}
193 +
194 +pkg_postinst() {
195 + if ! use kernel-builtin && [ ${PV} = "9999" ]
196 + then
197 + einfo "Adding ${P} to the module database to ensure that the"
198 + einfo "kernel modules and userland utilities stay in sync."
199 + update_moduledb
200 + fi
201 +
202 + if [ -e "${EROOT}etc/runlevels/boot/zfs" ]
203 + then
204 + einfo 'The zfs boot script has been split into the zfs-import,'
205 + einfo 'zfs-mount and zfs-share scripts.'
206 + einfo
207 + einfo 'You had the zfs script in your boot runlevel. For your'
208 + einfo 'convenience, it has been automatically removed and the three'
209 + einfo 'scripts that replace it have been configured to start.'
210 + einfo 'The zfs-import and zfs-mount scripts have been added to the boot'
211 + einfo 'runlevel while the zfs-share script is in the default runlevel.'
212 +
213 + rm "${EROOT}etc/runlevels/boot/zfs"
214 + ln -snf "${EROOT}etc/init.d/zfs-import" \
215 + "${EROOT}etc/runlevels/boot/zfs-import"
216 + ln -snf "${EROOT}etc/init.d/zfs-mount" \
217 + "${EROOT}etc/runlevels/boot/zfs-mount"
218 + ln -snf "${EROOT}etc/init.d/zfs-share" \
219 + "${EROOT}etc/runlevels/default/zfs-share"
220 + else
221 + [ -e "${EROOT}etc/runlevels/boot/zfs-import" ] || \
222 + einfo "You should add zfs-import to the boot runlevel."
223 + [ -e "${EROOT}etc/runlevels/boot/zfs-mount" ] || \
224 + einfo "You should add zfs-mount to the boot runlevel."
225 + [ -e "${EROOT}etc/runlevels/default/zfs-share" ] || \
226 + einfo "You should add zfs-share to the default runlevel."
227 + fi
228 +
229 + if [ -e "${EROOT}etc/runlevels/default/zed" ]
230 + then
231 + einfo 'The downstream OpenRC zed script has replaced by the upstream'
232 + einfo 'OpenRC zfs-zed script.'
233 + einfo
234 + einfo 'You had the zed script in your default runlevel. For your'
235 + einfo 'convenience, it has been automatically removed and the zfs-zed'
236 + einfo 'script that replaced it has been configured to start.'
237 +
238 + rm "${EROOT}etc/runlevels/boot/zed"
239 + ln -snf "${EROOT}etc/init.d/zfs-sed" \
240 + "${EROOT}etc/runlevels/default/zfs-zed"
241 + else
242 + [ -e "${EROOT}etc/runlevels/default/zfs-zed" ] || \
243 + einfo "You should add zfs-zed to the default runlevel."
244 + fi
245 +
246 + if [ -e "${EROOT}etc/runlevels/shutdown/zfs-shutdown" ]
247 + then
248 + einfo "The zfs-shutdown script is obsolete. Removing it from runlevel."
249 + rm "${EROOT}etc/runlevels/shutdown/zfs-shutdown"
250 + fi
251 +
252 + einfo "sys-kernel/spl-0.6.5.3-r1, sys-fs/zfs-kmod-0.6.5.3-r1 and "
253 + einfo "sys-fs/zfs-0.6.5.3-r1 have introduced a partial stable "
254 + einfo "/dev/zfs API developed by ClusterHQ. This means that situations "
255 + einfo "arising from the kernel modules and userland tools being "
256 + einfo "mismatched on future updates will not cause problems."
257 + einfo
258 + einfo "In specific, this should solve the failure to mount filesystems when "
259 + einfo "old modules are cached in an old initramfs provided that those "
260 + einfo "modules support this API"
261 + if use rootfs
262 + then
263 + einfo
264 + ewarn "The older modules will *NOT* work with the new userland code."
265 + ewarn "It is very important that you update your initramfs after this "
266 + ewarn "update."
267 + fi
268 +}
269 +
270 +pkg_postrm() {
271 + if ! use kernel-builtin && [ ${PV} = "9999" ]
272 + then
273 + remove_moduledb
274 + fi
275 +}
276
277 diff --git a/sys-fs/zfs/zfs-0.6.5.4-r2.ebuild b/sys-fs/zfs/zfs-0.6.5.4-r2.ebuild
278 new file mode 100644
279 index 0000000..0962856
280 --- /dev/null
281 +++ b/sys-fs/zfs/zfs-0.6.5.4-r2.ebuild
282 @@ -0,0 +1,230 @@
283 +# Copyright 1999-2015 Gentoo Foundation
284 +# Distributed under the terms of the GNU General Public License v2
285 +# $Id$
286 +
287 +EAPI="5"
288 +PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} )
289 +
290 +AT_M4DIR="config"
291 +AUTOTOOLS_AUTORECONF="1"
292 +AUTOTOOLS_IN_SOURCE_BUILD="1"
293 +
294 +if [ ${PV} == "9999" ] ; then
295 + inherit git-r3 linux-mod
296 + AUTOTOOLS_AUTORECONF="1"
297 + EGIT_REPO_URI="git://github.com/zfsonlinux/${PN}.git"
298 +else
299 + SRC_URI="https://github.com/zfsonlinux/${PN}/releases/download/${P}/${P}.tar.gz
300 + https://dev.gentoo.org/~ryao/dist/${P}-patches-p${PR#r}.tar.xz"
301 + KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
302 +fi
303 +
304 +inherit autotools-utils bash-completion-r1 flag-o-matic linux-info python-r1 systemd toolchain-funcs udev
305 +
306 +DESCRIPTION="Userland utilities for ZFS Linux kernel module"
307 +HOMEPAGE="http://zfsonlinux.org/"
308 +
309 +LICENSE="BSD-2 CDDL MIT"
310 +SLOT="0"
311 +IUSE="custom-cflags debug kernel-builtin +rootfs test-suite static-libs"
312 +RESTRICT="test"
313 +
314 +COMMON_DEPEND="
315 + sys-apps/util-linux[static-libs?]
316 + sys-libs/zlib[static-libs(+)?]
317 + virtual/awk
318 +"
319 +DEPEND="${COMMON_DEPEND}
320 + virtual/pkgconfig
321 +"
322 +
323 +RDEPEND="${COMMON_DEPEND}
324 + !=sys-apps/grep-2.13*
325 + !kernel-builtin? (
326 + =sys-fs/zfs-kmod-${PV}*
327 + !<sys-fs/zfs-kmod-0.6.5.3-r1
328 + )
329 + !sys-fs/zfs-fuse
330 + !prefix? ( virtual/udev )
331 + test-suite? (
332 + sys-apps/util-linux
333 + sys-devel/bc
334 + sys-block/parted
335 + sys-fs/lsscsi
336 + sys-fs/mdadm
337 + sys-process/procps
338 + virtual/modutils
339 + )
340 + rootfs? (
341 + app-arch/cpio
342 + app-misc/pax-utils
343 + !<sys-boot/grub-2.00-r2:2
344 + )
345 + !>=sys-fs/udev-init-scripts-28
346 +"
347 +
348 +AT_M4DIR="config"
349 +AUTOTOOLS_IN_SOURCE_BUILD="1"
350 +
351 +pkg_setup() {
352 + if use kernel_linux && use test-suite; then
353 + linux-info_pkg_setup
354 + if ! linux_config_exists; then
355 + ewarn "Cannot check the linux kernel configuration."
356 + else
357 + # recheck that we don't have usblp to collide with libusb
358 + if use test-suite; then
359 + if linux_chkconfig_present BLK_DEV_LOOP; then
360 + eerror "The ZFS test suite requires loop device support enabled."
361 + eerror "Please enable it:"
362 + eerror " CONFIG_BLK_DEV_LOOP=y"
363 + eerror "in /usr/src/linux/.config or"
364 + eerror " Device Drivers --->"
365 + eerror " Block devices --->"
366 + eerror " [ ] Loopback device support"
367 + fi
368 + fi
369 + fi
370 + fi
371 +
372 +}
373 +
374 +src_prepare() {
375 + if [ ${PV} != "9999" ]
376 + then
377 + # Apply patch set
378 + EPATCH_SUFFIX="patch" \
379 + EPATCH_FORCE="yes" \
380 + epatch "${WORKDIR}/${P}-patches"
381 + fi
382 +
383 + # Update paths
384 + sed -e "s|/sbin/lsmod|/bin/lsmod|" \
385 + -e "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" \
386 + -e "s|/sbin/parted|/usr/sbin/parted|" \
387 + -i scripts/common.sh.in
388 +
389 + autotools-utils_src_prepare
390 +}
391 +
392 +src_configure() {
393 + use custom-cflags || strip-flags
394 + local myeconfargs=(
395 + --bindir="${EPREFIX}/bin"
396 + --sbindir="${EPREFIX}/sbin"
397 + --with-config=user
398 + --with-dracutdir="/usr/$(get_libdir)/dracut"
399 + --with-linux="${KV_DIR}"
400 + --with-linux-obj="${KV_OUT_DIR}"
401 + --with-udevdir="$(get_udevdir)"
402 + --with-blkid
403 + $(use_enable debug)
404 + )
405 + autotools-utils_src_configure
406 +
407 + # prepare systemd unit and helper script
408 + cat "${FILESDIR}/zfs.service.in" | \
409 + sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
410 + -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
411 + > "${T}/zfs.service" || die
412 + cat "${FILESDIR}/zfs-init.sh.in" | \
413 + sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
414 + -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
415 + > "${T}/zfs-init.sh" || die
416 +}
417 +
418 +src_install() {
419 + autotools-utils_src_install
420 + gen_usr_ldscript -a uutil nvpair zpool zfs zfs_core
421 + use test-suite || rm -rf "${ED}usr/share/zfs"
422 +
423 + newbashcomp "${FILESDIR}/bash-completion-r1" zfs
424 + bashcomp_alias zfs zpool
425 +
426 + exeinto /usr/libexec
427 + doexe "${T}/zfs-init.sh"
428 + systemd_dounit "${T}/zfs.service"
429 +}
430 +
431 +pkg_postinst() {
432 + if ! use kernel-builtin && [ ${PV} = "9999" ]
433 + then
434 + einfo "Adding ${P} to the module database to ensure that the"
435 + einfo "kernel modules and userland utilities stay in sync."
436 + update_moduledb
437 + fi
438 +
439 + if [ -e "${EROOT}etc/runlevels/boot/zfs" ]
440 + then
441 + einfo 'The zfs boot script has been split into the zfs-import,'
442 + einfo 'zfs-mount and zfs-share scripts.'
443 + einfo
444 + einfo 'You had the zfs script in your boot runlevel. For your'
445 + einfo 'convenience, it has been automatically removed and the three'
446 + einfo 'scripts that replace it have been configured to start.'
447 + einfo 'The zfs-import and zfs-mount scripts have been added to the boot'
448 + einfo 'runlevel while the zfs-share script is in the default runlevel.'
449 +
450 + rm "${EROOT}etc/runlevels/boot/zfs"
451 + ln -snf "${EROOT}etc/init.d/zfs-import" \
452 + "${EROOT}etc/runlevels/boot/zfs-import"
453 + ln -snf "${EROOT}etc/init.d/zfs-mount" \
454 + "${EROOT}etc/runlevels/boot/zfs-mount"
455 + ln -snf "${EROOT}etc/init.d/zfs-share" \
456 + "${EROOT}etc/runlevels/default/zfs-share"
457 + else
458 + [ -e "${EROOT}etc/runlevels/boot/zfs-import" ] || \
459 + einfo "You should add zfs-import to the boot runlevel."
460 + [ -e "${EROOT}etc/runlevels/boot/zfs-mount" ] || \
461 + einfo "You should add zfs-mount to the boot runlevel."
462 + [ -e "${EROOT}etc/runlevels/default/zfs-share" ] || \
463 + einfo "You should add zfs-share to the default runlevel."
464 + fi
465 +
466 + if [ -e "${EROOT}etc/runlevels/default/zed" ]
467 + then
468 + einfo 'The downstream OpenRC zed script has replaced by the upstream'
469 + einfo 'OpenRC zfs-zed script.'
470 + einfo
471 + einfo 'You had the zed script in your default runlevel. For your'
472 + einfo 'convenience, it has been automatically removed and the zfs-zed'
473 + einfo 'script that replaced it has been configured to start.'
474 +
475 + rm "${EROOT}etc/runlevels/boot/zed"
476 + ln -snf "${EROOT}etc/init.d/zfs-sed" \
477 + "${EROOT}etc/runlevels/default/zfs-zed"
478 + else
479 + [ -e "${EROOT}etc/runlevels/default/zfs-zed" ] || \
480 + einfo "You should add zfs-zed to the default runlevel."
481 + fi
482 +
483 + if [ -e "${EROOT}etc/runlevels/shutdown/zfs-shutdown" ]
484 + then
485 + einfo "The zfs-shutdown script is obsolete. Removing it from runlevel."
486 + rm "${EROOT}etc/runlevels/shutdown/zfs-shutdown"
487 + fi
488 +
489 + einfo "sys-kernel/spl-0.6.5.3-r1, sys-fs/zfs-kmod-0.6.5.3-r1 and "
490 + einfo "sys-fs/zfs-0.6.5.3-r1 have introduced a partial stable "
491 + einfo "/dev/zfs API developed by ClusterHQ. This means that situations "
492 + einfo "arising from the kernel modules and userland tools being "
493 + einfo "mismatched on future updates will not cause problems."
494 + einfo
495 + einfo "In specific, this should solve the failure to mount filesystems when "
496 + einfo "old modules are cached in an old initramfs provided that those "
497 + einfo "modules support this API"
498 + if use rootfs
499 + then
500 + einfo
501 + ewarn "The older modules will *NOT* work with the new userland code."
502 + ewarn "It is very important that you update your initramfs after this "
503 + ewarn "update."
504 + fi
505 +}
506 +
507 +pkg_postrm() {
508 + if ! use kernel-builtin && [ ${PV} = "9999" ]
509 + then
510 + remove_moduledb
511 + fi
512 +}