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