1 |
commit: 101730da16c7cb4341a56e8db18662289b774215 |
2 |
Author: Matthew Thode <prometheanfire <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Feb 14 20:58:00 2018 +0000 |
4 |
Commit: Matt Thode <prometheanfire <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Feb 14 21:01:17 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=101730da |
7 |
|
8 |
sys-fs/zfs-kmod: adding 0.7 stable branch ebuild |
9 |
|
10 |
Package-Manager: Portage-2.3.19, Repoman-2.3.6 |
11 |
|
12 |
sys-fs/zfs-kmod/zfs-kmod-0.7.9999.ebuild | 147 +++++++++++++++++++++++++++++++ |
13 |
1 file changed, 147 insertions(+) |
14 |
|
15 |
diff --git a/sys-fs/zfs-kmod/zfs-kmod-0.7.9999.ebuild b/sys-fs/zfs-kmod/zfs-kmod-0.7.9999.ebuild |
16 |
new file mode 100644 |
17 |
index 00000000000..8a1354857fe |
18 |
--- /dev/null |
19 |
+++ b/sys-fs/zfs-kmod/zfs-kmod-0.7.9999.ebuild |
20 |
@@ -0,0 +1,147 @@ |
21 |
+# Copyright 1999-2018 Gentoo Foundation |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+ |
24 |
+EAPI="5" |
25 |
+ |
26 |
+if [[ ${PV} == *"9999" ]] ; then |
27 |
+ AUTOTOOLS_AUTORECONF="1" |
28 |
+ EGIT_REPO_URI="https://github.com/zfsonlinux/zfs.git" |
29 |
+ EGIT_BRANCH="zfs-0.7-release" |
30 |
+ inherit git-r3 |
31 |
+else |
32 |
+ SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/zfs-${PV}.tar.gz" |
33 |
+ S="${WORKDIR}/zfs-${PV}" |
34 |
+ KEYWORDS="~amd64 ~arm ~ppc ~ppc64" |
35 |
+fi |
36 |
+ |
37 |
+inherit flag-o-matic linux-info linux-mod toolchain-funcs autotools-utils |
38 |
+ |
39 |
+DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs" |
40 |
+HOMEPAGE="http://zfsonlinux.org/" |
41 |
+ |
42 |
+LICENSE="CDDL debug? ( GPL-2+ )" |
43 |
+SLOT="0" |
44 |
+IUSE="custom-cflags debug +rootfs" |
45 |
+RESTRICT="debug? ( strip ) test" |
46 |
+ |
47 |
+DEPEND=" |
48 |
+ =sys-kernel/spl-${PV}* |
49 |
+ dev-lang/perl |
50 |
+ virtual/awk |
51 |
+" |
52 |
+ |
53 |
+RDEPEND="${DEPEND} |
54 |
+ !sys-fs/zfs-fuse |
55 |
+" |
56 |
+ |
57 |
+AT_M4DIR="config" |
58 |
+AUTOTOOLS_IN_SOURCE_BUILD="1" |
59 |
+ |
60 |
+DOCS=( AUTHORS COPYRIGHT DISCLAIMER README.markdown ) |
61 |
+ |
62 |
+pkg_setup() { |
63 |
+ linux-info_pkg_setup |
64 |
+ CONFIG_CHECK=" |
65 |
+ !DEBUG_LOCK_ALLOC |
66 |
+ !CONFIG_REISER4_FS |
67 |
+ EFI_PARTITION |
68 |
+ IOSCHED_NOOP |
69 |
+ MODULES |
70 |
+ !PAX_KERNEXEC_PLUGIN_METHOD_OR |
71 |
+ ZLIB_DEFLATE |
72 |
+ ZLIB_INFLATE |
73 |
+ " |
74 |
+ |
75 |
+ use debug && CONFIG_CHECK="${CONFIG_CHECK} |
76 |
+ FRAME_POINTER |
77 |
+ DEBUG_INFO |
78 |
+ !DEBUG_INFO_REDUCED |
79 |
+ " |
80 |
+ |
81 |
+ use rootfs && \ |
82 |
+ CONFIG_CHECK="${CONFIG_CHECK} |
83 |
+ BLK_DEV_INITRD |
84 |
+ DEVTMPFS |
85 |
+ " |
86 |
+ |
87 |
+ kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required" |
88 |
+ |
89 |
+ [[ ${PV} != *"9999" ]] && \ |
90 |
+ { kernel_is le 4 15 || die "Linux 4.15 is the latest supported version."; } |
91 |
+ |
92 |
+ check_extra_config |
93 |
+} |
94 |
+ |
95 |
+src_prepare() { |
96 |
+ # Remove GPLv2-licensed ZPIOS unless we are debugging |
97 |
+ use debug || sed -e 's/^subdir-m += zpios$//' -i "${S}/module/Makefile.in" |
98 |
+ |
99 |
+ # Set module revision number |
100 |
+ [[ ${PV} != *"9999" ]] && \ |
101 |
+ { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; } |
102 |
+ |
103 |
+ autotools-utils_src_prepare |
104 |
+} |
105 |
+ |
106 |
+src_configure() { |
107 |
+ local SPL_PATH="$(basename $(echo "${EROOT}usr/src/spl-"*))" |
108 |
+ use custom-cflags || strip-flags |
109 |
+ filter-ldflags -Wl,* |
110 |
+ |
111 |
+ set_arch_to_kernel |
112 |
+ local myeconfargs=(${myeconfargs} |
113 |
+ --bindir="${EPREFIX}/bin" |
114 |
+ --sbindir="${EPREFIX}/sbin" |
115 |
+ --with-config=kernel |
116 |
+ --with-linux="${KV_DIR}" |
117 |
+ --with-linux-obj="${KV_OUT_DIR}" |
118 |
+ --with-spl="${EROOT}usr/src/${SPL_PATH}" |
119 |
+ --with-spl-obj="${EROOT}usr/src/${SPL_PATH}/${KV_FULL}" |
120 |
+ $(use_enable debug) |
121 |
+ ) |
122 |
+ |
123 |
+ autotools-utils_src_configure |
124 |
+} |
125 |
+ |
126 |
+src_install() { |
127 |
+ autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}" |
128 |
+} |
129 |
+ |
130 |
+pkg_postinst() { |
131 |
+ linux-mod_pkg_postinst |
132 |
+ |
133 |
+ # Remove old modules |
134 |
+ if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/zfs" ] |
135 |
+ then |
136 |
+ ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/zfs" |
137 |
+ ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/zfs" |
138 |
+ ewarn "Automatically removing old modules to avoid problems." |
139 |
+ rm -r "${EROOT}lib/modules/${KV_FULL}/addon/zfs" || die "Cannot remove modules" |
140 |
+ rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon" |
141 |
+ fi |
142 |
+ |
143 |
+ if use x86 || use arm |
144 |
+ then |
145 |
+ ewarn "32-bit kernels will likely require increasing vmalloc to" |
146 |
+ ewarn "at least 256M and decreasing zfs_arc_max to some value less than that." |
147 |
+ fi |
148 |
+ |
149 |
+ ewarn "This version of ZFSOnLinux includes support for new feature flags" |
150 |
+ ewarn "that are incompatible with previous versions. GRUB2 support for" |
151 |
+ ewarn "/boot with the new feature flags is not yet available." |
152 |
+ ewarn "Do *NOT* upgrade root pools to use the new feature flags." |
153 |
+ ewarn "Any new pools will be created with the new feature flags by default" |
154 |
+ ewarn "and will not be compatible with older versions of ZFSOnLinux. To" |
155 |
+ ewarn "create a newpool that is backward compatible wih GRUB2, use " |
156 |
+ ewarn |
157 |
+ ewarn "zpool create -d -o feature@async_destroy=enabled " |
158 |
+ ewarn " -o feature@empty_bpobj=enabled -o feature@lz4_compress=enabled" |
159 |
+ ewarn " -o feature@spacemap_histogram=enabled" |
160 |
+ ewarn " -o feature@enabled_txg=enabled " |
161 |
+ ewarn " -o feature@extensible_dataset=enabled -o feature@bookmarks=enabled" |
162 |
+ ewarn " ..." |
163 |
+ ewarn |
164 |
+ ewarn "GRUB2 support will be updated as soon as either the GRUB2" |
165 |
+ ewarn "developers do a tag or the Gentoo developers find time to backport" |
166 |
+ ewarn "support from GRUB2 HEAD." |
167 |
+} |