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