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