1 |
commit: a2a7b9e874a31b29718c2cf70b8465b0c647781a |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jun 11 01:49:07 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jun 11 01:49:07 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a2a7b9e8 |
7 |
|
8 |
sys-fs/zfs-kmod: add 2.1.0_rc7 |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
|
12 |
sys-fs/zfs-kmod/Manifest | 2 + |
13 |
sys-fs/zfs-kmod/zfs-kmod-2.1.0_rc7.ebuild | 204 ++++++++++++++++++++++++++++++ |
14 |
2 files changed, 206 insertions(+) |
15 |
|
16 |
diff --git a/sys-fs/zfs-kmod/Manifest b/sys-fs/zfs-kmod/Manifest |
17 |
index 272fa8bfaa3..38ea1c754d6 100644 |
18 |
--- a/sys-fs/zfs-kmod/Manifest |
19 |
+++ b/sys-fs/zfs-kmod/Manifest |
20 |
@@ -2,4 +2,6 @@ DIST zfs-0.8.6.tar.gz 9295260 BLAKE2B 45424d710aaf75a05f766ae523ae157a24b5cbdcef |
21 |
DIST zfs-2.0.4.tar.gz 13123872 BLAKE2B 7e4780092c0a87d5d187cd5734ddc736574db80b500f155287640ef2230e09335cc9b6b26ec1b7d8ab1b7942673ea49a3007a81da372a6d2ac36f3908913045c SHA512 1dda92d424372bce7020f5215545485eae69211b6f0fb6bea3c7c22efac76c6a2662f0dd14a03f723b6a6fe73b1228ecca211a4034b86cf885bcadf38ba0dc6b |
22 |
DIST zfs-2.1.0-rc6.tar.gz 34777294 BLAKE2B 0080b03a9cf9717ae2bc7674e340dffafd923467368d8941df9be5a21f081e88745297e1a8b2ac5059e9f346949bbeb759a5fc8bcdb60c3be49b0645389ec8b1 SHA512 696d525c1c738a508d04366f8ffd0142aebe4498efbf129c9d38fa7c67dbec83554f55a2c4a5d7647a03ca0df173c2720fe85edbc859195f4ca19e04d2adf143 |
23 |
DIST zfs-2.1.0-rc6.tar.gz.asc 195 BLAKE2B a1267b8faffc75ac70082e261c6053b2070cbad014c92051ebc82af56b21bbe2e72e01e44c0701ed255a3201330bb56b5e1a72e12c1ae9f15f72883b53c17ec6 SHA512 afc0eb839de6b0b21b3d781dd74dce9f6f668b7b9fc079ea764666e28d4d3228b8a80641b6d0084851bffedfc3406dc0f829242f6b4247d192f554ba45ce3a4c |
24 |
+DIST zfs-2.1.0-rc7.tar.gz 34800406 BLAKE2B a645c3e19f521a7abb606cbcd619ea019abeb7810bd6476ecddcd76c7c801d6f1e3f197d49199eac72497db5c529b22bcd605b2e7ec2c236aec5216dc99b7dc1 SHA512 4e1cb1cc83454d92cac58110c219fca28dcf8361a5ea27dca955a5c88434b6e9ccd68892d93bf14d773056760f1907e004e65cc5d653308dd8996692ecba61f1 |
25 |
+DIST zfs-2.1.0-rc7.tar.gz.asc 195 BLAKE2B b772bba2f64bec51f11b5c51564a1449cd37d5e8e5c90eee1eb5c357193cab187bdeceef299c95622aed9c03601c1b5d67a941de12003c01e0af9ad68e82bfa2 SHA512 6c48eeab7658db1e9bac54da2f73087b1a58046504c507c94e58478f03f3b37336af254947964dbf9383575dc2cb3019640c7286ab0dfa5d5d9f55df96b34864 |
26 |
DIST zfs-8.0.4_5.12_compat_idmapped_mounts.patch 41410 BLAKE2B 49724351c5a8e6ffa66762d5aac84ad89a3d04022d086d9f37ccd616b3e8e95852197b5333bdeeeab54fc51516d8254d0138a4422cc66214bb602e5ed72bbabf SHA512 1554d74a7024c106a3f4814895a64914f2e3d627f7edff3c8f415b419c6a596454862f8c0984a6e2f96e340851f1a9222a4c472ebd6d5db7dc0aa108dc2dca6c |
27 |
|
28 |
diff --git a/sys-fs/zfs-kmod/zfs-kmod-2.1.0_rc7.ebuild b/sys-fs/zfs-kmod/zfs-kmod-2.1.0_rc7.ebuild |
29 |
new file mode 100644 |
30 |
index 00000000000..34cc83a6093 |
31 |
--- /dev/null |
32 |
+++ b/sys-fs/zfs-kmod/zfs-kmod-2.1.0_rc7.ebuild |
33 |
@@ -0,0 +1,204 @@ |
34 |
+# Copyright 1999-2021 Gentoo Authors |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI=7 |
38 |
+ |
39 |
+inherit autotools dist-kernel-utils flag-o-matic linux-mod toolchain-funcs |
40 |
+ |
41 |
+DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs" |
42 |
+HOMEPAGE="https://github.com/openzfs/zfs" |
43 |
+ |
44 |
+if [[ ${PV} == "9999" ]]; then |
45 |
+ inherit git-r3 |
46 |
+ EGIT_REPO_URI="https://github.com/openzfs/zfs.git" |
47 |
+else |
48 |
+ VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/openzfs.asc |
49 |
+ inherit verify-sig |
50 |
+ |
51 |
+ MY_PV="${PV/_rc/-rc}" |
52 |
+ SRC_URI="https://github.com/openzfs/zfs/releases/download/zfs-${MY_PV}/zfs-${MY_PV}.tar.gz" |
53 |
+ SRC_URI+=" verify-sig? ( https://github.com/openzfs/zfs/releases/download/zfs-${MY_PV}/zfs-${MY_PV}.tar.gz.asc )" |
54 |
+ S="${WORKDIR}/zfs-${PV%_rc?}" |
55 |
+ ZFS_KERNEL_COMPAT="5.12" |
56 |
+ |
57 |
+ if [[ ${PV} != *_rc* ]]; then |
58 |
+ KEYWORDS="~amd64 ~arm64 ~ppc64" |
59 |
+ fi |
60 |
+fi |
61 |
+ |
62 |
+LICENSE="CDDL MIT debug? ( GPL-2+ )" |
63 |
+SLOT="0/${PVR}" |
64 |
+IUSE="custom-cflags debug +rootfs" |
65 |
+ |
66 |
+RDEPEND="${DEPEND} |
67 |
+ !sys-kernel/spl |
68 |
+" |
69 |
+ |
70 |
+BDEPEND=" |
71 |
+ dev-lang/perl |
72 |
+ virtual/awk |
73 |
+" |
74 |
+ |
75 |
+if [[ ${PV} != "9999" ]] ; then |
76 |
+ BDEPEND+=" verify-sig? ( app-crypt/openpgp-keys-openzfs )" |
77 |
+fi |
78 |
+ |
79 |
+# PDEPEND in this form is needed to trick portage suggest |
80 |
+# enabling dist-kernel if only 1 package have it set |
81 |
+PDEPEND="dist-kernel? ( ~sys-fs/zfs-${PV}[dist-kernel] )" |
82 |
+ |
83 |
+RESTRICT="debug? ( strip ) test" |
84 |
+ |
85 |
+DOCS=( AUTHORS COPYRIGHT META README.md ) |
86 |
+ |
87 |
+pkg_pretend() { |
88 |
+ use rootfs || return 0 |
89 |
+ |
90 |
+ if has_version virtual/dist-kernel && ! use dist-kernel; then |
91 |
+ ewarn "You have virtual/dist-kernel installed, but" |
92 |
+ ewarn "USE=\"dist-kernel\" is not enabled for ${CATEGORY}/${PN}" |
93 |
+ ewarn "It's recommended to globally enable dist-kernel USE flag" |
94 |
+ ewarn "to auto-trigger initrd rebuilds with kernel updates" |
95 |
+ fi |
96 |
+} |
97 |
+ |
98 |
+pkg_setup() { |
99 |
+ CONFIG_CHECK=" |
100 |
+ !DEBUG_LOCK_ALLOC |
101 |
+ EFI_PARTITION |
102 |
+ MODULES |
103 |
+ !PAX_KERNEXEC_PLUGIN_METHOD_OR |
104 |
+ !TRIM_UNUSED_KSYMS |
105 |
+ ZLIB_DEFLATE |
106 |
+ ZLIB_INFLATE |
107 |
+ " |
108 |
+ |
109 |
+ use debug && CONFIG_CHECK="${CONFIG_CHECK} |
110 |
+ FRAME_POINTER |
111 |
+ DEBUG_INFO |
112 |
+ !DEBUG_INFO_REDUCED |
113 |
+ " |
114 |
+ |
115 |
+ use rootfs && \ |
116 |
+ CONFIG_CHECK="${CONFIG_CHECK} |
117 |
+ BLK_DEV_INITRD |
118 |
+ DEVTMPFS |
119 |
+ " |
120 |
+ |
121 |
+ kernel_is -lt 5 && CONFIG_CHECK="${CONFIG_CHECK} IOSCHED_NOOP" |
122 |
+ |
123 |
+ if [[ ${PV} != "9999" ]]; then |
124 |
+ local kv_major_max kv_minor_max zcompat |
125 |
+ zcompat="${ZFS_KERNEL_COMPAT_OVERRIDE:-${ZFS_KERNEL_COMPAT}}" |
126 |
+ kv_major_max="${zcompat%%.*}" |
127 |
+ zcompat="${zcompat#*.}" |
128 |
+ kv_minor_max="${zcompat%%.*}" |
129 |
+ kernel_is -le "${kv_major_max}" "${kv_minor_max}" || die \ |
130 |
+ "Linux ${kv_major_max}.${kv_minor_max} is the latest supported version" |
131 |
+ |
132 |
+ fi |
133 |
+ |
134 |
+ kernel_is -ge 3 10 || die "Linux 3.10 or newer required" |
135 |
+ |
136 |
+ linux-mod_pkg_setup |
137 |
+} |
138 |
+ |
139 |
+src_prepare() { |
140 |
+ default |
141 |
+ |
142 |
+ if [[ ${PV} == "9999" ]]; then |
143 |
+ eautoreconf |
144 |
+ else |
145 |
+ # Set module revision number |
146 |
+ sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" META || die "Could not set Gentoo release" |
147 |
+ fi |
148 |
+} |
149 |
+ |
150 |
+src_configure() { |
151 |
+ set_arch_to_kernel |
152 |
+ |
153 |
+ use custom-cflags || strip-flags |
154 |
+ |
155 |
+ filter-ldflags -Wl,* |
156 |
+ |
157 |
+ local myconf=( |
158 |
+ CROSS_COMPILE="${CHOST}-" |
159 |
+ HOSTCC="$(tc-getBUILD_CC)" |
160 |
+ --bindir="${EPREFIX}/bin" |
161 |
+ --sbindir="${EPREFIX}/sbin" |
162 |
+ --with-config=kernel |
163 |
+ --with-linux="${KV_DIR}" |
164 |
+ --with-linux-obj="${KV_OUT_DIR}" |
165 |
+ $(use_enable debug) |
166 |
+ ) |
167 |
+ |
168 |
+ econf "${myconf[@]}" |
169 |
+} |
170 |
+ |
171 |
+src_compile() { |
172 |
+ set_arch_to_kernel |
173 |
+ |
174 |
+ myemakeargs=( |
175 |
+ CROSS_COMPILE="${CHOST}-" |
176 |
+ HOSTCC="$(tc-getBUILD_CC)" |
177 |
+ V=1 |
178 |
+ ) |
179 |
+ |
180 |
+ emake "${myemakeargs[@]}" |
181 |
+} |
182 |
+ |
183 |
+src_install() { |
184 |
+ set_arch_to_kernel |
185 |
+ |
186 |
+ myemakeargs+=( |
187 |
+ DEPMOD=: |
188 |
+ DESTDIR="${D}" |
189 |
+ INSTALL_MOD_PATH="${EPREFIX:-/}" # lib/modules/<kver> added by KBUILD |
190 |
+ ) |
191 |
+ |
192 |
+ emake "${myemakeargs[@]}" install |
193 |
+ |
194 |
+ einstalldocs |
195 |
+} |
196 |
+ |
197 |
+pkg_postinst() { |
198 |
+ linux-mod_pkg_postinst |
199 |
+ |
200 |
+ # Remove old modules |
201 |
+ if [[ -d "${EROOT}/lib/modules/${KV_FULL}/addon/zfs" ]]; then |
202 |
+ ewarn "${PN} now installs modules in ${EROOT}/lib/modules/${KV_FULL}/extra/zfs" |
203 |
+ ewarn "Old modules were detected in ${EROOT}/lib/modules/${KV_FULL}/addon/zfs" |
204 |
+ ewarn "Automatically removing old modules to avoid problems." |
205 |
+ rm -r "${EROOT}/lib/modules/${KV_FULL}/addon/zfs" || die "Cannot remove modules" |
206 |
+ rmdir --ignore-fail-on-non-empty "${EROOT}/lib/modules/${KV_FULL}/addon" |
207 |
+ fi |
208 |
+ |
209 |
+ if [[ -z ${ROOT} ]] && use dist-kernel; then |
210 |
+ set_arch_to_portage |
211 |
+ dist-kernel_reinstall_initramfs "${KV_DIR}" "${KV_FULL}" |
212 |
+ fi |
213 |
+ |
214 |
+ if use x86 || use arm; then |
215 |
+ ewarn "32-bit kernels will likely require increasing vmalloc to" |
216 |
+ ewarn "at least 256M and decreasing zfs_arc_max to some value less than that." |
217 |
+ fi |
218 |
+ |
219 |
+ ewarn "This version of OpenZFS includes support for new feature flags" |
220 |
+ ewarn "that are incompatible with previous versions. GRUB2 support for" |
221 |
+ ewarn "/boot with the new feature flags is not yet available." |
222 |
+ ewarn "Do *NOT* upgrade root pools to use the new feature flags." |
223 |
+ ewarn "Any new pools will be created with the new feature flags by default" |
224 |
+ ewarn "and will not be compatible with older versions of ZFSOnLinux. To" |
225 |
+ ewarn "create a newpool that is backward compatible wih GRUB2, use " |
226 |
+ ewarn |
227 |
+ ewarn "zpool create -d -o feature@async_destroy=enabled " |
228 |
+ ewarn " -o feature@empty_bpobj=enabled -o feature@lz4_compress=enabled" |
229 |
+ ewarn " -o feature@spacemap_histogram=enabled" |
230 |
+ ewarn " -o feature@enabled_txg=enabled " |
231 |
+ ewarn " -o feature@extensible_dataset=enabled -o feature@bookmarks=enabled" |
232 |
+ ewarn " ..." |
233 |
+ ewarn |
234 |
+ ewarn "GRUB2 support will be updated as soon as either the GRUB2" |
235 |
+ ewarn "developers do a tag or the Gentoo developers find time to backport" |
236 |
+ ewarn "support from GRUB2 HEAD." |
237 |
+} |