1 |
commit: 4c0ca3696c21a7eb7878b11e8b043ee1ed0bc5d1 |
2 |
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Aug 25 22:19:31 2020 +0000 |
4 |
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Aug 25 22:27:50 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c0ca369 |
7 |
|
8 |
sys-fs/zfs-kmod: bump to 2.0.0-rc1 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/728104 |
11 |
Package-Manager: Portage-3.0.4, Repoman-3.0.1 |
12 |
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org> |
13 |
|
14 |
sys-fs/zfs-kmod/Manifest | 1 + |
15 |
sys-fs/zfs-kmod/zfs-kmod-2.0.0_rc1.ebuild | 172 ++++++++++++++++++++++++++++++ |
16 |
2 files changed, 173 insertions(+) |
17 |
|
18 |
diff --git a/sys-fs/zfs-kmod/Manifest b/sys-fs/zfs-kmod/Manifest |
19 |
index f9de9cf72d8..4b1225f94a5 100644 |
20 |
--- a/sys-fs/zfs-kmod/Manifest |
21 |
+++ b/sys-fs/zfs-kmod/Manifest |
22 |
@@ -1 +1,2 @@ |
23 |
DIST zfs-0.8.4.tar.gz 9285838 BLAKE2B 776bcd6dfab8825c07d315085e288b29bf543d6957325d5d566b7b78c04505dde9bd25eb6684cb4a1b6a657de8a4e1290d04d2b9079d26d6b834a70f1ec3b569 SHA512 9086dc6a6262dd93ca6ec43f1b4c2e5c804deba708c8a7460b8531aa4802b0bf8cac0917a1a00e6af2e96d4a21cd68b85e226bf571bd94041d0325c457106eb1 |
24 |
+DIST zfs-2.0.0-rc1.tar.gz 12820598 BLAKE2B 6ea935447e4f95eb4040533843677f0091c9620fc387c76818df69a6653467e10aecd07ece22b2a32f849dc52ab0160149147416af90d78c5284f403571f7962 SHA512 b70cd10672d4424a6ffaaa58b4fa14b7d1b6481413463abd9b6d75698e80d94301fd54c7e091d63ebad9c8838eaaef6449223a55f041a62ae8292882feb195b5 |
25 |
|
26 |
diff --git a/sys-fs/zfs-kmod/zfs-kmod-2.0.0_rc1.ebuild b/sys-fs/zfs-kmod/zfs-kmod-2.0.0_rc1.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..756247a7d57 |
29 |
--- /dev/null |
30 |
+++ b/sys-fs/zfs-kmod/zfs-kmod-2.0.0_rc1.ebuild |
31 |
@@ -0,0 +1,172 @@ |
32 |
+# Copyright 1999-2020 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=7 |
36 |
+MY_PV="${PV/_rc/-rc}" |
37 |
+ |
38 |
+inherit autotools 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 |
+ SRC_URI="https://github.com/openzfs/zfs/releases/download/zfs-${MY_PV}/zfs-${MY_PV}.tar.gz" |
48 |
+ KEYWORDS="~amd64 ~arm64 ~ppc64" |
49 |
+ S="${WORKDIR}/zfs-${PV%_rc?}" |
50 |
+ ZFS_KERNEL_COMPAT="5.8" |
51 |
+fi |
52 |
+ |
53 |
+LICENSE="CDDL debug? ( GPL-2+ )" |
54 |
+SLOT="0" |
55 |
+IUSE="custom-cflags debug +rootfs" |
56 |
+ |
57 |
+DEPEND="" |
58 |
+ |
59 |
+RDEPEND="${DEPEND} |
60 |
+ !sys-kernel/spl |
61 |
+" |
62 |
+ |
63 |
+BDEPEND=" |
64 |
+ dev-lang/perl |
65 |
+ virtual/awk |
66 |
+" |
67 |
+ |
68 |
+RESTRICT="debug? ( strip ) test" |
69 |
+ |
70 |
+DOCS=( AUTHORS COPYRIGHT META README.md ) |
71 |
+ |
72 |
+pkg_setup() { |
73 |
+ CONFIG_CHECK=" |
74 |
+ !DEBUG_LOCK_ALLOC |
75 |
+ EFI_PARTITION |
76 |
+ MODULES |
77 |
+ !PAX_KERNEXEC_PLUGIN_METHOD_OR |
78 |
+ !TRIM_UNUSED_KSYMS |
79 |
+ ZLIB_DEFLATE |
80 |
+ ZLIB_INFLATE |
81 |
+ " |
82 |
+ |
83 |
+ use debug && CONFIG_CHECK="${CONFIG_CHECK} |
84 |
+ FRAME_POINTER |
85 |
+ DEBUG_INFO |
86 |
+ !DEBUG_INFO_REDUCED |
87 |
+ " |
88 |
+ |
89 |
+ use rootfs && \ |
90 |
+ CONFIG_CHECK="${CONFIG_CHECK} |
91 |
+ BLK_DEV_INITRD |
92 |
+ DEVTMPFS |
93 |
+ " |
94 |
+ |
95 |
+ kernel_is -lt 5 && CONFIG_CHECK="${CONFIG_CHECK} IOSCHED_NOOP" |
96 |
+ |
97 |
+ if [[ ${PV} != "9999" ]]; then |
98 |
+ local kv_major_max kv_minor_max zcompat |
99 |
+ zcompat="${ZFS_KERNEL_COMPAT_OVERRIDE:-${ZFS_KERNEL_COMPAT}}" |
100 |
+ kv_major_max="${zcompat%%.*}" |
101 |
+ zcompat="${zcompat#*.}" |
102 |
+ kv_minor_max="${zcompat%%.*}" |
103 |
+ kernel_is -le "${kv_major_max}" "${kv_minor_max}" || die \ |
104 |
+ "Linux ${kv_major_max}.${kv_minor_max} is the latest supported version" |
105 |
+ |
106 |
+ # 0.8.x requires at least 2.6.32 |
107 |
+ kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required" |
108 |
+ else |
109 |
+ # git master requires at least 3.10 |
110 |
+ kernel_is -ge 3 10 || die "Linux 3.10 or newer required" |
111 |
+ fi |
112 |
+ |
113 |
+ linux-mod_pkg_setup |
114 |
+} |
115 |
+ |
116 |
+src_prepare() { |
117 |
+ default |
118 |
+ |
119 |
+ if [[ ${PV} == "9999" ]]; then |
120 |
+ eautoreconf |
121 |
+ else |
122 |
+ # Set module revision number |
123 |
+ sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" META || die "Could not set Gentoo release" |
124 |
+ fi |
125 |
+} |
126 |
+ |
127 |
+src_configure() { |
128 |
+ set_arch_to_kernel |
129 |
+ |
130 |
+ use custom-cflags || strip-flags |
131 |
+ |
132 |
+ filter-ldflags -Wl,* |
133 |
+ |
134 |
+ local myconf=( |
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=( V=1 ) |
150 |
+ |
151 |
+ emake "${myemakeargs[@]}" |
152 |
+} |
153 |
+ |
154 |
+src_install() { |
155 |
+ set_arch_to_kernel |
156 |
+ |
157 |
+ myemakeargs+=( |
158 |
+ DEPMOD="/bin/true" |
159 |
+ DESTDIR="${D}" |
160 |
+ INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}" |
161 |
+ ) |
162 |
+ |
163 |
+ emake "${myemakeargs[@]}" install |
164 |
+ |
165 |
+ einstalldocs |
166 |
+} |
167 |
+ |
168 |
+pkg_postinst() { |
169 |
+ linux-mod_pkg_postinst |
170 |
+ |
171 |
+ # Remove old modules |
172 |
+ if [[ -d "${EROOT}/lib/modules/${KV_FULL}/addon/zfs" ]]; then |
173 |
+ ewarn "${PN} now installs modules in ${EROOT}/lib/modules/${KV_FULL}/extra/zfs" |
174 |
+ ewarn "Old modules were detected in ${EROOT}/lib/modules/${KV_FULL}/addon/zfs" |
175 |
+ ewarn "Automatically removing old modules to avoid problems." |
176 |
+ rm -r "${EROOT}/lib/modules/${KV_FULL}/addon/zfs" || die "Cannot remove modules" |
177 |
+ rmdir --ignore-fail-on-non-empty "${EROOT}/lib/modules/${KV_FULL}/addon" |
178 |
+ fi |
179 |
+ |
180 |
+ if use x86 || use arm; then |
181 |
+ ewarn "32-bit kernels will likely require increasing vmalloc to" |
182 |
+ ewarn "at least 256M and decreasing zfs_arc_max to some value less than that." |
183 |
+ fi |
184 |
+ |
185 |
+ ewarn "This version of OpenZFS includes support for new feature flags" |
186 |
+ ewarn "that are incompatible with previous versions. GRUB2 support for" |
187 |
+ ewarn "/boot with the new feature flags is not yet available." |
188 |
+ ewarn "Do *NOT* upgrade root pools to use the new feature flags." |
189 |
+ ewarn "Any new pools will be created with the new feature flags by default" |
190 |
+ ewarn "and will not be compatible with older versions of ZFSOnLinux. To" |
191 |
+ ewarn "create a newpool that is backward compatible wih GRUB2, use " |
192 |
+ ewarn |
193 |
+ ewarn "zpool create -d -o feature@async_destroy=enabled " |
194 |
+ ewarn " -o feature@empty_bpobj=enabled -o feature@lz4_compress=enabled" |
195 |
+ ewarn " -o feature@spacemap_histogram=enabled" |
196 |
+ ewarn " -o feature@enabled_txg=enabled " |
197 |
+ ewarn " -o feature@extensible_dataset=enabled -o feature@bookmarks=enabled" |
198 |
+ ewarn " ..." |
199 |
+ ewarn |
200 |
+ ewarn "GRUB2 support will be updated as soon as either the GRUB2" |
201 |
+ ewarn "developers do a tag or the Gentoo developers find time to backport" |
202 |
+ ewarn "support from GRUB2 HEAD." |
203 |
+} |