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-kmod/
Date: Fri, 27 Sep 2019 19:16:33
Message-Id: 1569611779.cc577be6b9369f13d51b40168daceddaa6aa7531.gyakovlev@gentoo
1 commit: cc577be6b9369f13d51b40168daceddaa6aa7531
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 27 18:19:55 2019 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 27 19:16:19 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc577be6
7
8 sys-fs/zfs-kmod: bump to 0.8.2
9
10 Package-Manager: Portage-2.3.76, Repoman-2.3.17
11 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
12
13 sys-fs/zfs-kmod/Manifest | 1 +
14 sys-fs/zfs-kmod/zfs-kmod-0.8.2.ebuild | 177 ++++++++++++++++++++++++++++++++++
15 2 files changed, 178 insertions(+)
16
17 diff --git a/sys-fs/zfs-kmod/Manifest b/sys-fs/zfs-kmod/Manifest
18 index daccededfad..1c908ae93b7 100644
19 --- a/sys-fs/zfs-kmod/Manifest
20 +++ b/sys-fs/zfs-kmod/Manifest
21 @@ -1,2 +1,3 @@
22 DIST zfs-0.7.13.tar.gz 6614047 BLAKE2B c59c46287715779eb04d69333b0a417fa9865eb0d61c642b043188c4c97d4eed369f76a48327326ed1d4dd608ff95d91d20d26c80ed0b120a8fcd5f83cea638f SHA512 457d8f110b68c9656194cd3738b216d5d807d680e5cfc6ed1f3cf5ebde67860476387c6b862ba3ba7f972d8945075963e6c325543ab84468e3eff5dbce68476e
23 DIST zfs-0.8.1.tar.gz 8668360 BLAKE2B f18268656381c20af6bd18421636a1c56633c7eafaf91b1308d15508d5f4bdcfa5dfbb4e09d0302ac3de9d6a4f69718fe9c3d083ed5b3ab2a32c6fb7a1db624b SHA512 1fb3957f65dbe94edaffcedb5b2694390dc14e472c11f7e63184a9ea6a774e79a43d47a2d789b7ced233fc67c76583bf7d5c1bda0692bb07929673e2a57f4667
24 +DIST zfs-0.8.2.tar.gz 8738111 BLAKE2B 5c15f6664ca70f0deeb5b9e32f2bcff68f9821529e5203ff18612ce88473fee9af369354c442f3db7882d301cf17c805c9635b05bfd3460833ed8e5ff8004dd0 SHA512 1424b1a030b814f812b5da422100669db5b8c3ccae14c2fdd62a5e0df28e7255247fe5ca99c95a14f08c92cc1574c22dd132093e4a1dd81e38c95b10cc5e2496
25
26 diff --git a/sys-fs/zfs-kmod/zfs-kmod-0.8.2.ebuild b/sys-fs/zfs-kmod/zfs-kmod-0.8.2.ebuild
27 new file mode 100644
28 index 00000000000..c14dbf91524
29 --- /dev/null
30 +++ b/sys-fs/zfs-kmod/zfs-kmod-0.8.2.ebuild
31 @@ -0,0 +1,177 @@
32 +# Copyright 1999-2019 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +inherit flag-o-matic linux-info linux-mod toolchain-funcs
38 +
39 +DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
40 +HOMEPAGE="https://zfsonlinux.org/"
41 +
42 +if [[ ${PV} == "9999" ]]; then
43 + inherit autotools git-r3
44 + EGIT_REPO_URI="https://github.com/zfsonlinux/zfs.git"
45 +else
46 + SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/zfs-${PV}.tar.gz"
47 + KEYWORDS="~amd64 ~arm64 ~ppc64"
48 + S="${WORKDIR}/zfs-${PV}"
49 + ZFS_KERNEL_COMPAT="5.3"
50 +fi
51 +
52 +LICENSE="CDDL debug? ( GPL-2+ )"
53 +SLOT="0"
54 +IUSE="custom-cflags debug +rootfs"
55 +
56 +DEPEND=""
57 +
58 +RDEPEND="${DEPEND}
59 + !sys-fs/zfs-fuse
60 + !sys-kernel/spl
61 +"
62 +
63 +BDEPEND="
64 + dev-lang/perl
65 + virtual/awk
66 +"
67 +
68 +RESTRICT="debug? ( strip ) test"
69 +
70 +DOCS=( AUTHORS COPYRIGHT META README.md )
71 +
72 +pkg_setup() {
73 + linux-info_pkg_setup
74 +
75 + CONFIG_CHECK="
76 + !DEBUG_LOCK_ALLOC
77 + EFI_PARTITION
78 + MODULES
79 + !PAX_KERNEXEC_PLUGIN_METHOD_OR
80 + !TRIM_UNUSED_KSYMS
81 + ZLIB_DEFLATE
82 + ZLIB_INFLATE
83 + "
84 +
85 + use debug && CONFIG_CHECK="${CONFIG_CHECK}
86 + FRAME_POINTER
87 + DEBUG_INFO
88 + !DEBUG_INFO_REDUCED
89 + "
90 +
91 + use rootfs && \
92 + CONFIG_CHECK="${CONFIG_CHECK}
93 + BLK_DEV_INITRD
94 + DEVTMPFS
95 + "
96 +
97 + if use arm64; then
98 + kernel_is -ge 5 && CONFIG_CHECK="${CONFIG_CHECK} !PREEMPT"
99 + fi
100 +
101 + kernel_is -lt 5 && CONFIG_CHECK="${CONFIG_CHECK} IOSCHED_NOOP"
102 +
103 + kernel_is -ge 2 6 32 || die "Linux 2.6.32 or newer required"
104 +
105 + if [[ ${PV} != "9999" ]]; then
106 + local kv_major_max kv_minor_max zcompat
107 + zcompat="${ZFS_KERNEL_COMPAT_OVERRIDE:-${ZFS_KERNEL_COMPAT}}"
108 + kv_major_max="${zcompat%%.*}"
109 + zcompat="${zcompat#*.}"
110 + kv_minor_max="${zcompat%%.*}"
111 + kernel_is -le "${kv_major_max}" "${kv_minor_max}" || die \
112 + "Linux ${kv_major_max}.${kv_minor_max} is the latest supported version"
113 + fi
114 +
115 + check_extra_config
116 +}
117 +
118 +src_prepare() {
119 + default
120 +
121 + if [[ ${PV} == "9999" ]]; then
122 + eautoreconf
123 + else
124 + # Set module revision number
125 + sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" META || die "Could not set Gentoo release"
126 + fi
127 +
128 + # Remove GPLv2-licensed ZPIOS unless we are debugging
129 + use debug || sed -e 's/^subdir-m += zpios$//' -i module/Makefile.in
130 +}
131 +
132 +src_configure() {
133 + set_arch_to_kernel
134 +
135 + use custom-cflags || strip-flags
136 +
137 + filter-ldflags -Wl,*
138 +
139 + local myconf=(
140 + --bindir="${EPREFIX}/bin"
141 + --sbindir="${EPREFIX}/sbin"
142 + --with-config=kernel
143 + --with-linux="${KV_DIR}"
144 + --with-linux-obj="${KV_OUT_DIR}"
145 + $(use_enable debug)
146 + )
147 +
148 + econf "${myconf[@]}"
149 +}
150 +
151 +src_compile() {
152 + set_arch_to_kernel
153 +
154 + myemakeargs=( V=1 )
155 +
156 + emake "${myemakeargs[@]}"
157 +}
158 +
159 +src_install() {
160 + set_arch_to_kernel
161 +
162 + myemakeargs+=(
163 + DEPMOD="/bin/true"
164 + DESTDIR="${D}"
165 + INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
166 + )
167 +
168 + emake "${myemakeargs[@]}" install
169 +
170 + einstalldocs
171 +}
172 +
173 +pkg_postinst() {
174 + linux-mod_pkg_postinst
175 +
176 + # Remove old modules
177 + if [[ -d "${EROOT}/lib/modules/${KV_FULL}/addon/zfs" ]]; then
178 + ewarn "${PN} now installs modules in ${EROOT}/lib/modules/${KV_FULL}/extra/zfs"
179 + ewarn "Old modules were detected in ${EROOT}/lib/modules/${KV_FULL}/addon/zfs"
180 + ewarn "Automatically removing old modules to avoid problems."
181 + rm -r "${EROOT}/lib/modules/${KV_FULL}/addon/zfs" || die "Cannot remove modules"
182 + rmdir --ignore-fail-on-non-empty "${EROOT}/lib/modules/${KV_FULL}/addon"
183 + fi
184 +
185 + if use x86 || use arm; then
186 + ewarn "32-bit kernels will likely require increasing vmalloc to"
187 + ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
188 + fi
189 +
190 + ewarn "This version of ZFSOnLinux includes support for new feature flags"
191 + ewarn "that are incompatible with previous versions. GRUB2 support for"
192 + ewarn "/boot with the new feature flags is not yet available."
193 + ewarn "Do *NOT* upgrade root pools to use the new feature flags."
194 + ewarn "Any new pools will be created with the new feature flags by default"
195 + ewarn "and will not be compatible with older versions of ZFSOnLinux. To"
196 + ewarn "create a newpool that is backward compatible wih GRUB2, use "
197 + ewarn
198 + ewarn "zpool create -d -o feature@async_destroy=enabled "
199 + ewarn " -o feature@empty_bpobj=enabled -o feature@lz4_compress=enabled"
200 + ewarn " -o feature@spacemap_histogram=enabled"
201 + ewarn " -o feature@enabled_txg=enabled "
202 + ewarn " -o feature@extensible_dataset=enabled -o feature@bookmarks=enabled"
203 + ewarn " ..."
204 + ewarn
205 + ewarn "GRUB2 support will be updated as soon as either the GRUB2"
206 + ewarn "developers do a tag or the Gentoo developers find time to backport"
207 + ewarn "support from GRUB2 HEAD."
208 +}