Gentoo Archives: gentoo-commits

From: Georgy Yakovlev <gyakovlev@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs/
Date: Wed, 07 Oct 2020 00:00:33
Message-Id: 1602028639.453e4cc935de690bf8fd05544f040218d11577d0.gyakovlev@gentoo
1 commit: 453e4cc935de690bf8fd05544f040218d11577d0
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Tue Oct 6 23:54:13 2020 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Tue Oct 6 23:57:19 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=453e4cc9
7
8 sys-fs/zfs: bump to 0.8.5
9
10 Package-Manager: Portage-3.0.8, Repoman-3.0.1
11 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
12
13 sys-fs/zfs/Manifest | 1 +
14 sys-fs/zfs/zfs-0.8.5.ebuild | 222 ++++++++++++++++++++++++++++++++++++++++++++
15 2 files changed, 223 insertions(+)
16
17 diff --git a/sys-fs/zfs/Manifest b/sys-fs/zfs/Manifest
18 index e3ff6c2eec9..e722910db54 100644
19 --- a/sys-fs/zfs/Manifest
20 +++ b/sys-fs/zfs/Manifest
21 @@ -1,3 +1,4 @@
22 DIST zfs-0.8.4.tar.gz 9285838 BLAKE2B 776bcd6dfab8825c07d315085e288b29bf543d6957325d5d566b7b78c04505dde9bd25eb6684cb4a1b6a657de8a4e1290d04d2b9079d26d6b834a70f1ec3b569 SHA512 9086dc6a6262dd93ca6ec43f1b4c2e5c804deba708c8a7460b8531aa4802b0bf8cac0917a1a00e6af2e96d4a21cd68b85e226bf571bd94041d0325c457106eb1
23 +DIST zfs-0.8.5.tar.gz 9196381 BLAKE2B 8376f360369c4657ff1fc040fb2bba780bbd5d6a98d149d2fa4ba39478588e213dbf6db218c7bd970839f015a69ae00ac951b90afc1c26b34aadf666b2976cab SHA512 3e6e70b76f7cc5b018adb78ce7c3009f88faf5b3da0a03170b03577cd84a2937b6056621c41fc819fd08bf59b28053caf8fec375cf375816a6786bb5646ed773
24 DIST zfs-2.0.0-rc2.tar.gz 12854085 BLAKE2B 73cabd565c11eef1bebbc391f8c4ba18acd1610f98f1b8afb507bc844f4b6a64ba32d9727e634c7f26c48fe365a841bf071513df234b9b7a87e954610a6d7f3b SHA512 14b17d06124890efef15b3b073e103c9faeecaea761779fff9a8420e3ab72fa611df9875fa766a323d69646e9025f8b19f918ded4c6705af116cf9f14eea4f40
25 DIST zfs-2.0.0-rc3.tar.gz 12860212 BLAKE2B bd29ceb17938180ffda9a26cfee97f4b9b42752cd7a3bf5d72705d94967d219889cc84a71d4c0f59aaf718d596011ecdbf07000788aa39a424087eb7cf62a944 SHA512 c09bebb1d1b19079b51305eea1b3d1a428a46bf1301afc9dfa20871ac670d94dc9f7f9127384b2db501fd909f22a16fad0c1b7383eb9ce31a7c0e696e66a097f
26
27 diff --git a/sys-fs/zfs/zfs-0.8.5.ebuild b/sys-fs/zfs/zfs-0.8.5.ebuild
28 new file mode 100644
29 index 00000000000..5839302a8db
30 --- /dev/null
31 +++ b/sys-fs/zfs/zfs-0.8.5.ebuild
32 @@ -0,0 +1,222 @@
33 +# Copyright 1999-2020 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_{6,7,8} )
40 +
41 +inherit autotools bash-completion-r1 flag-o-matic linux-info distutils-r1 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/${P}/${P}.tar.gz"
51 + KEYWORDS="~amd64 ~arm64 ~ppc64"
52 +fi
53 +
54 +LICENSE="BSD-2 CDDL MIT"
55 +SLOT="0"
56 +IUSE="custom-cflags debug kernel-builtin libressl minimal nls python +rootfs test-suite static-libs"
57 +
58 +DEPEND="
59 + net-libs/libtirpc[static-libs?]
60 + sys-apps/util-linux[static-libs?]
61 + sys-libs/zlib[static-libs(+)?]
62 + virtual/awk
63 + virtual/libudev[static-libs(-)?]
64 + libressl? ( dev-libs/libressl:0=[static-libs?] )
65 + !libressl? ( dev-libs/openssl:0=[static-libs?] )
66 + !minimal? ( ${PYTHON_DEPS} )
67 + python? (
68 + virtual/python-cffi[${PYTHON_USEDEP}]
69 + )
70 +"
71 +
72 +BDEPEND="virtual/awk
73 + virtual/pkgconfig
74 + nls? ( sys-devel/gettext )
75 + python? (
76 + dev-python/setuptools[${PYTHON_USEDEP}]
77 + )
78 +"
79 +
80 +RDEPEND="${DEPEND}
81 + !kernel-builtin? ( ~sys-fs/zfs-kmod-${PV} )
82 + !prefix? ( virtual/udev )
83 + sys-fs/udev-init-scripts
84 + rootfs? (
85 + app-arch/cpio
86 + app-misc/pax-utils
87 + !<sys-kernel/genkernel-3.5.1.1
88 + )
89 + test-suite? (
90 + sys-apps/kmod[tools]
91 + sys-apps/util-linux
92 + sys-devel/bc
93 + sys-block/parted
94 + sys-fs/lsscsi
95 + sys-fs/mdadm
96 + sys-process/procps
97 + )
98 +"
99 +
100 +REQUIRED_USE="
101 + !minimal? ( ${PYTHON_REQUIRED_USE} )
102 + python? ( !minimal )
103 + test-suite? ( !minimal )
104 +"
105 +
106 +RESTRICT="test"
107 +
108 +PATCHES=(
109 + "${FILESDIR}/bash-completion-sudo.patch"
110 +)
111 +
112 +pkg_setup() {
113 + if use kernel_linux && use test-suite; then
114 + linux-info_pkg_setup
115 +
116 + if ! linux_config_exists; then
117 + ewarn "Cannot check the linux kernel configuration."
118 + else
119 + if use test-suite; then
120 + if linux_chkconfig_present BLK_DEV_LOOP; then
121 + eerror "The ZFS test suite requires loop device support enabled."
122 + eerror "Please enable it:"
123 + eerror " CONFIG_BLK_DEV_LOOP=y"
124 + eerror "in /usr/src/linux/.config or"
125 + eerror " Device Drivers --->"
126 + eerror " Block devices --->"
127 + eerror " [X] Loopback device support"
128 + fi
129 + fi
130 + fi
131 + fi
132 +}
133 +
134 +src_prepare() {
135 + default
136 +
137 + if [[ ${PV} == "9999" ]]; then
138 + eautoreconf
139 + else
140 + # Set revision number
141 + sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" META || die "Could not set Gentoo release"
142 + fi
143 +
144 + if use python; then
145 + pushd contrib/pyzfs >/dev/null || die
146 + distutils-r1_src_prepare
147 + popd >/dev/null || die
148 + fi
149 +
150 + # prevent errors showing up on zfs-mount stop, #647688
151 + # openrc will unmount all filesystems anyway.
152 + sed -i "/^ZFS_UNMOUNT=/ s/yes/no/" "etc/default/zfs.in" || die
153 +}
154 +
155 +src_configure() {
156 + use custom-cflags || strip-flags
157 + use minimal || python_setup
158 +
159 + local myconf=(
160 + --bindir="${EPREFIX}/bin"
161 + --enable-shared
162 + --enable-systemd
163 + --enable-sysvinit
164 + --localstatedir="${EPREFIX}/var"
165 + --sbindir="${EPREFIX}/sbin"
166 + --with-config=user
167 + --with-dracutdir="${EPREFIX}/usr/lib/dracut"
168 + --with-linux="${KV_DIR}"
169 + --with-linux-obj="${KV_OUT_DIR}"
170 + --with-udevdir="$(get_udevdir)"
171 + --with-systemdunitdir="$(systemd_get_systemunitdir)"
172 + --with-systemdpresetdir="${EPREFIX}/lib/systemd/system-preset"
173 + $(use_enable debug)
174 + $(use_enable nls)
175 + $(use_enable python pyzfs)
176 + $(use_enable static-libs static)
177 + $(usex minimal --without-python --with-python="${EPYTHON}")
178 + )
179 +
180 + CONFIG_SHELL="${EPREFIX}/bin/bash" econf "${myconf[@]}"
181 +}
182 +
183 +src_compile() {
184 + default
185 + if use python; then
186 + pushd contrib/pyzfs >/dev/null || die
187 + distutils-r1_src_compile
188 + popd >/dev/null || die
189 + fi
190 +}
191 +
192 +src_install() {
193 + default
194 +
195 + gen_usr_ldscript -a uutil nvpair zpool zfs zfs_core
196 +
197 + use test-suite || rm -rf "${ED}/usr/share/zfs"
198 +
199 + if ! use static-libs; then
200 + find "${ED}/" -name '*.la' -delete || die
201 + fi
202 +
203 + dobashcomp contrib/bash_completion.d/zfs
204 + bashcomp_alias zfs zpool
205 +
206 + # strip executable bit from conf.d file
207 + fperms 0644 /etc/conf.d/zfs
208 +
209 + if use python; then
210 + pushd contrib/pyzfs >/dev/null || die
211 + distutils-r1_src_install
212 + popd >/dev/null || die
213 + fi
214 +
215 + # enforce best available python implementation
216 + use minimal || python_fix_shebang "${ED}/bin"
217 +}
218 +
219 +pkg_postinst() {
220 + if use rootfs; then
221 + if ! has_version sys-kernel/genkernel && ! has_version sys-kernel/dracut; then
222 + elog "root on zfs requires initramfs to boot"
223 + elog "the following packages known to provide one and tested on regular basis:"
224 + elog " sys-kernel/dracut"
225 + elog " sys-kernel/genkernel"
226 + fi
227 + fi
228 +
229 + if ! use kernel-builtin && [[ ${PV} = "9999" ]]; then
230 + einfo "Adding ${P} to the module database to ensure that the"
231 + einfo "kernel modules and userland utilities stay in sync."
232 + update_moduledb
233 + fi
234 +
235 + if systemd_is_booted || has_version sys-apps/systemd; then
236 + einfo "Please refer to ${EROOT}/lib/systemd/system-preset/50-zfs.preset"
237 + einfo "for default zfs systemd service configuration"
238 + else
239 + [[ -e "${EROOT}/etc/runlevels/boot/zfs-import" ]] || \
240 + einfo "You should add zfs-import to the boot runlevel."
241 + [[ -e "${EROOT}/etc/runlevels/boot/zfs-mount" ]]|| \
242 + einfo "You should add zfs-mount to the boot runlevel."
243 + [[ -e "${EROOT}/etc/runlevels/default/zfs-share" ]] || \
244 + einfo "You should add zfs-share to the default runlevel."
245 + [[ -e "${EROOT}/etc/runlevels/default/zfs-zed" ]] || \
246 + einfo "You should add zfs-zed to the default runlevel."
247 + fi
248 +}
249 +
250 +pkg_postrm() {
251 + if ! use kernel-builtin && [[ ${PV} == "9999" ]]; then
252 + remove_moduledb
253 + fi
254 +}