1 |
commit: 1e911c5f26d1ed8ca53b8e829560b458bf34cff7 |
2 |
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Aug 25 22:26:59 2020 +0000 |
4 |
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Aug 25 22:27:56 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e911c5f |
7 |
|
8 |
sys-fs/zfs: 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/Manifest | 1 + |
15 |
sys-fs/zfs/zfs-2.0.0_rc1.ebuild | 217 ++++++++++++++++++++++++++++++++++++++++ |
16 |
2 files changed, 218 insertions(+) |
17 |
|
18 |
diff --git a/sys-fs/zfs/Manifest b/sys-fs/zfs/Manifest |
19 |
index f9de9cf72d8..4b1225f94a5 100644 |
20 |
--- a/sys-fs/zfs/Manifest |
21 |
+++ b/sys-fs/zfs/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/zfs-2.0.0_rc1.ebuild b/sys-fs/zfs/zfs-2.0.0_rc1.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..e5be95e979c |
29 |
--- /dev/null |
30 |
+++ b/sys-fs/zfs/zfs-2.0.0_rc1.ebuild |
31 |
@@ -0,0 +1,217 @@ |
32 |
+# Copyright 1999-2020 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=7 |
36 |
+ |
37 |
+DISTUTILS_OPTIONAL=1 |
38 |
+PYTHON_COMPAT=( python3_{6,7} ) |
39 |
+MY_P="${P/_rc/-rc}" |
40 |
+ |
41 |
+inherit autotools bash-completion-r1 distutils-r1 flag-o-matic linux-info pam systemd toolchain-funcs udev usr-ldscript |
42 |
+ |
43 |
+DESCRIPTION="Userland utilities for ZFS Linux kernel module" |
44 |
+HOMEPAGE="https://github.com/openzfs/zfs" |
45 |
+ |
46 |
+if [[ ${PV} == "9999" ]] ; then |
47 |
+ inherit git-r3 linux-mod |
48 |
+ EGIT_REPO_URI="https://github.com/openzfs/zfs.git" |
49 |
+else |
50 |
+ SRC_URI="https://github.com/openzfs/${PN}/releases/download/${MY_P}/${MY_P}.tar.gz" |
51 |
+ KEYWORDS="~amd64 ~arm64 ~ppc64" |
52 |
+ S="${WORKDIR}/${P%_rc?}" |
53 |
+fi |
54 |
+ |
55 |
+LICENSE="BSD-2 CDDL MIT" |
56 |
+SLOT="0" |
57 |
+IUSE="custom-cflags debug kernel-builtin libressl pam python +rootfs test-suite static-libs" |
58 |
+ |
59 |
+DEPEND=" |
60 |
+ ${PYTHON_DEPS} |
61 |
+ net-libs/libtirpc[static-libs?] |
62 |
+ sys-apps/util-linux[static-libs?] |
63 |
+ sys-libs/zlib[static-libs(+)?] |
64 |
+ virtual/awk |
65 |
+ virtual/libudev[static-libs(-)?] |
66 |
+ libressl? ( dev-libs/libressl:0=[static-libs?] ) |
67 |
+ !libressl? ( dev-libs/openssl:0=[static-libs?] ) |
68 |
+ pam? ( sys-libs/pam ) |
69 |
+ python? ( |
70 |
+ virtual/python-cffi[${PYTHON_USEDEP}] |
71 |
+ ) |
72 |
+" |
73 |
+ |
74 |
+BDEPEND="virtual/awk |
75 |
+ virtual/pkgconfig |
76 |
+ python? ( |
77 |
+ dev-python/setuptools[${PYTHON_USEDEP}] |
78 |
+ ) |
79 |
+" |
80 |
+ |
81 |
+RDEPEND="${DEPEND} |
82 |
+ !kernel-builtin? ( ~sys-fs/zfs-kmod-${PV} ) |
83 |
+ !prefix? ( virtual/udev ) |
84 |
+ sys-fs/udev-init-scripts |
85 |
+ rootfs? ( |
86 |
+ app-arch/cpio |
87 |
+ app-misc/pax-utils |
88 |
+ !<sys-kernel/genkernel-3.5.1.1 |
89 |
+ ) |
90 |
+ test-suite? ( |
91 |
+ sys-apps/kmod[tools] |
92 |
+ sys-apps/util-linux |
93 |
+ sys-devel/bc |
94 |
+ sys-block/parted |
95 |
+ sys-fs/lsscsi |
96 |
+ sys-fs/mdadm |
97 |
+ sys-process/procps |
98 |
+ ) |
99 |
+" |
100 |
+ |
101 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
102 |
+ |
103 |
+RESTRICT="test" |
104 |
+ |
105 |
+PATCHES=( "${FILESDIR}/bash-completion-sudo.patch" ) |
106 |
+ |
107 |
+pkg_setup() { |
108 |
+ if use kernel_linux && use test-suite; then |
109 |
+ linux-info_pkg_setup |
110 |
+ |
111 |
+ if ! linux_config_exists; then |
112 |
+ ewarn "Cannot check the linux kernel configuration." |
113 |
+ else |
114 |
+ if use test-suite; then |
115 |
+ if linux_chkconfig_present BLK_DEV_LOOP; then |
116 |
+ eerror "The ZFS test suite requires loop device support enabled." |
117 |
+ eerror "Please enable it:" |
118 |
+ eerror " CONFIG_BLK_DEV_LOOP=y" |
119 |
+ eerror "in /usr/src/linux/.config or" |
120 |
+ eerror " Device Drivers --->" |
121 |
+ eerror " Block devices --->" |
122 |
+ eerror " [X] Loopback device support" |
123 |
+ fi |
124 |
+ fi |
125 |
+ fi |
126 |
+ fi |
127 |
+} |
128 |
+ |
129 |
+src_prepare() { |
130 |
+ default |
131 |
+ |
132 |
+ if [[ ${PV} == "9999" ]]; then |
133 |
+ eautoreconf |
134 |
+ else |
135 |
+ # Set revision number |
136 |
+ sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" META || die "Could not set Gentoo release" |
137 |
+ fi |
138 |
+ |
139 |
+ if use python; then |
140 |
+ pushd contrib/pyzfs >/dev/null || die |
141 |
+ distutils-r1_src_prepare |
142 |
+ popd >/dev/null || die |
143 |
+ fi |
144 |
+ |
145 |
+ # prevent errors showing up on zfs-mount stop, #647688 |
146 |
+ # openrc will unmount all filesystems anyway. |
147 |
+ sed -i "/^ZFS_UNMOUNT=/ s/yes/no/" "etc/default/zfs.in" || die |
148 |
+} |
149 |
+ |
150 |
+src_configure() { |
151 |
+ use custom-cflags || strip-flags |
152 |
+ python_setup |
153 |
+ |
154 |
+ local myconf=( |
155 |
+ --bindir="${EPREFIX}/bin" |
156 |
+ --enable-shared |
157 |
+ --enable-systemd |
158 |
+ --enable-sysvinit |
159 |
+ --localstatedir="${EPREFIX}/var" |
160 |
+ --sbindir="${EPREFIX}/sbin" |
161 |
+ --with-config=user |
162 |
+ --with-dracutdir="${EPREFIX}/usr/lib/dracut" |
163 |
+ --with-linux="${KV_DIR}" |
164 |
+ --with-linux-obj="${KV_OUT_DIR}" |
165 |
+ --with-udevdir="$(get_udevdir)" |
166 |
+ --with-pamconfigsdir="${EPREFIX}/unwanted_debian_files" |
167 |
+ --with-pammoduledir="$(getpam_mod_dir)" |
168 |
+ --with-python="${EPYTHON}" |
169 |
+ --with-systemdunitdir="$(systemd_get_systemunitdir)" |
170 |
+ --with-systemdpresetdir="${EPREFIX}/lib/systemd/system-preset" |
171 |
+ $(use_enable debug) |
172 |
+ $(use_enable pam) |
173 |
+ $(use_enable python pyzfs) |
174 |
+ $(use_enable static-libs static) |
175 |
+ ) |
176 |
+ |
177 |
+ econf "${myconf[@]}" |
178 |
+} |
179 |
+ |
180 |
+src_compile() { |
181 |
+ default |
182 |
+ if use python; then |
183 |
+ pushd contrib/pyzfs >/dev/null || die |
184 |
+ distutils-r1_src_compile |
185 |
+ popd >/dev/null || die |
186 |
+ fi |
187 |
+} |
188 |
+ |
189 |
+src_install() { |
190 |
+ default |
191 |
+ |
192 |
+ gen_usr_ldscript -a uutil nvpair zpool zfs zfs_core |
193 |
+ |
194 |
+ use pam && { rm -rv "${ED}/unwanted_debian_files" || die ; } |
195 |
+ |
196 |
+ use test-suite || { rm -r "${ED}/usr/share/zfs" || die ; } |
197 |
+ |
198 |
+ if ! use static-libs; then |
199 |
+ find "${ED}/" -name '*.la' -delete || die |
200 |
+ fi |
201 |
+ |
202 |
+ dobashcomp contrib/bash_completion.d/zfs |
203 |
+ bashcomp_alias zfs zpool |
204 |
+ |
205 |
+ # strip executable bit from conf.d file |
206 |
+ fperms 0644 /etc/conf.d/zfs |
207 |
+ |
208 |
+ if use python; then |
209 |
+ pushd contrib/pyzfs >/dev/null || die |
210 |
+ distutils-r1_src_install |
211 |
+ popd >/dev/null || die |
212 |
+ fi |
213 |
+ |
214 |
+ # enforce best available python implementation |
215 |
+ python_fix_shebang "${ED}/bin" |
216 |
+} |
217 |
+ |
218 |
+pkg_postinst() { |
219 |
+ if use rootfs; then |
220 |
+ if ! has_version sys-kernel/genkernel && ! has_version sys-kernel/dracut; then |
221 |
+ elog "root on zfs requires initramfs to boot" |
222 |
+ elog "the following packages known to provide one and tested on regular basis:" |
223 |
+ elog " sys-kernel/dracut" |
224 |
+ elog " sys-kernel/genkernel" |
225 |
+ fi |
226 |
+ fi |
227 |
+ |
228 |
+ if ! use kernel-builtin && [[ ${PV} = "9999" ]]; then |
229 |
+ einfo "Adding ${P} to the module database to ensure that the" |
230 |
+ einfo "kernel modules and userland utilities stay in sync." |
231 |
+ update_moduledb |
232 |
+ fi |
233 |
+ |
234 |
+ [[ -e "${EROOT}/etc/runlevels/boot/zfs-import" ]] || \ |
235 |
+ einfo "You should add zfs-import to the boot runlevel." |
236 |
+ [[ -e "${EROOT}/etc/runlevels/boot/zfs-mount" ]]|| \ |
237 |
+ einfo "You should add zfs-mount to the boot runlevel." |
238 |
+ [[ -e "${EROOT}/etc/runlevels/default/zfs-share" ]] || \ |
239 |
+ einfo "You should add zfs-share to the default runlevel." |
240 |
+ [[ -e "${EROOT}/etc/runlevels/default/zfs-zed" ]] || \ |
241 |
+ einfo "You should add zfs-zed to the default runlevel." |
242 |
+} |
243 |
+ |
244 |
+pkg_postrm() { |
245 |
+ if ! use kernel-builtin && [[ ${PV} == "9999" ]]; then |
246 |
+ remove_moduledb |
247 |
+ fi |
248 |
+} |