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