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