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