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, 29 Sep 2021 23:12:03
Message-Id: 1632956911.e6d24b418895e82a1ea5d61bb7194b634d7d4646.gyakovlev@gentoo
1 commit: e6d24b418895e82a1ea5d61bb7194b634d7d4646
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Wed Sep 29 23:06:14 2021 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 29 23:08:31 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e6d24b41
7
8 sys-fs/zfs: drop 2.0.6
9
10 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
11
12 sys-fs/zfs/zfs-2.0.6.ebuild | 292 --------------------------------------------
13 1 file changed, 292 deletions(-)
14
15 diff --git a/sys-fs/zfs/zfs-2.0.6.ebuild b/sys-fs/zfs/zfs-2.0.6.ebuild
16 deleted file mode 100644
17 index 4b474020cd7..00000000000
18 --- a/sys-fs/zfs/zfs-2.0.6.ebuild
19 +++ /dev/null
20 @@ -1,292 +0,0 @@
21 -# Copyright 1999-2021 Gentoo Authors
22 -# Distributed under the terms of the GNU General Public License v2
23 -
24 -EAPI=7
25 -
26 -DISTUTILS_OPTIONAL=1
27 -DISTUTILS_USE_SETUPTOOLS=manual
28 -PYTHON_COMPAT=( python3_{7,8,9} )
29 -
30 -inherit autotools bash-completion-r1 dist-kernel-utils distutils-r1 flag-o-matic linux-info pam systemd udev usr-ldscript
31 -
32 -DESCRIPTION="Userland utilities for ZFS Linux kernel module"
33 -HOMEPAGE="https://github.com/openzfs/zfs"
34 -
35 -if [[ ${PV} == "9999" ]]; then
36 - inherit git-r3 linux-mod
37 - EGIT_REPO_URI="https://github.com/openzfs/zfs.git"
38 -else
39 - VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/openzfs.asc
40 - inherit verify-sig
41 -
42 - MY_P="${P/_rc/-rc}"
43 - SRC_URI="https://github.com/openzfs/${PN}/releases/download/${MY_P}/${MY_P}.tar.gz"
44 - SRC_URI+=" verify-sig? ( https://github.com/openzfs/${PN}/releases/download/${MY_P}/${MY_P}.tar.gz.asc )"
45 - S="${WORKDIR}/${P%_rc?}"
46 -
47 - if [[ ${PV} != *_rc* ]]; then
48 - KEYWORDS="~amd64 ~arm64 ~ppc64"
49 - fi
50 -fi
51 -
52 -LICENSE="BSD-2 CDDL MIT"
53 -# just libzfs soname major for now.
54 -# possible candidates: libuutil, libzpool, libnvpair. Those do not provide stable abi, but are considered.
55 -# see libsoversion_check() below as well
56 -SLOT="0/4"
57 -IUSE="custom-cflags debug dist-kernel kernel-builtin minimal nls pam python +rootfs test-suite"
58 -
59 -DEPEND="
60 - net-libs/libtirpc
61 - sys-apps/util-linux
62 - sys-libs/zlib
63 - virtual/libudev:=
64 - dev-libs/openssl:0=
65 - !minimal? ( ${PYTHON_DEPS} )
66 - pam? ( sys-libs/pam )
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 -if [[ ${PV} != "9999" ]] ; then
81 - BDEPEND+=" verify-sig? ( app-crypt/openpgp-keys-openzfs )"
82 -fi
83 -
84 -# awk is used for some scripts, completions, and the Dracut module
85 -RDEPEND="${DEPEND}
86 - !kernel-builtin? ( ~sys-fs/zfs-kmod-${PV}:=[dist-kernel?] )
87 - !prefix? ( virtual/udev )
88 - sys-fs/udev-init-scripts
89 - virtual/awk
90 - dist-kernel? ( virtual/dist-kernel:= )
91 - rootfs? (
92 - app-arch/cpio
93 - app-misc/pax-utils
94 - !<sys-kernel/genkernel-3.5.1.1
95 - )
96 - test-suite? (
97 - sys-apps/kmod[tools]
98 - sys-apps/util-linux
99 - sys-devel/bc
100 - sys-block/parted
101 - sys-fs/lsscsi
102 - sys-fs/mdadm
103 - sys-process/procps
104 - )
105 -"
106 -
107 -REQUIRED_USE="
108 - !minimal? ( ${PYTHON_REQUIRED_USE} )
109 - python? ( !minimal )
110 - test-suite? ( !minimal )
111 -"
112 -
113 -RESTRICT="test"
114 -
115 -PATCHES=(
116 - "${FILESDIR}/bash-completion-sudo.patch"
117 - "${FILESDIR}/2.0.4-scrub-timers.patch"
118 -)
119 -
120 -pkg_pretend() {
121 - use rootfs || return 0
122 -
123 - if has_version virtual/dist-kernel && ! use dist-kernel; then
124 - ewarn "You have virtual/dist-kernel installed, but"
125 - ewarn "USE=\"dist-kernel\" is not enabled for ${CATEGORY}/${PN}"
126 - ewarn "It's recommended to globally enable dist-kernel USE flag"
127 - ewarn "to auto-trigger initrd rebuilds with kernel updates"
128 - fi
129 -}
130 -
131 -pkg_setup() {
132 - if use kernel_linux; then
133 - linux-info_pkg_setup
134 -
135 - if ! linux_config_exists; then
136 - ewarn "Cannot check the linux kernel configuration."
137 - else
138 - if use test-suite; then
139 - if linux_chkconfig_present BLK_DEV_LOOP; then
140 - eerror "The ZFS test suite requires loop device support enabled."
141 - eerror "Please enable it:"
142 - eerror " CONFIG_BLK_DEV_LOOP=y"
143 - eerror "in /usr/src/linux/.config or"
144 - eerror " Device Drivers --->"
145 - eerror " Block devices --->"
146 - eerror " [X] Loopback device support"
147 - fi
148 - fi
149 - fi
150 - fi
151 -}
152 -
153 -libsoversion_check() {
154 -
155 - local bugurl libzfs_sover
156 - bugurl="https://bugs.gentoo.org/enter_bug.cgi?form_name=enter_bug&product=Gentoo+Linux&component=Current+packages"
157 -
158 - libzfs_sover="$(grep 'libzfs_la_LDFLAGS += -version-info' lib/libzfs/Makefile.am \
159 - | grep -Eo '[0-9]+:[0-9]+:[0-9]+')"
160 - libzfs_sover="${libzfs_sover%%:*}"
161 -
162 - if [[ ${libzfs_sover} -ne $(ver_cut 2 ${SLOT}) ]]; then
163 - echo
164 - eerror "BUG BUG BUG BUG BUG BUG BUG BUG"
165 - eerror "ebuild subslot does not match libzfs soversion!"
166 - eerror "libzfs soversion: ${libzfs_sover}"
167 - eerror "ebuild value: $(ver_cut 2 ${SLOT})"
168 - eerror "This is a bug in the ebuild, please use the following URL to report it"
169 - eerror "${bugurl}&short_desc=${CATEGORY}%2F${P}+update+subslot"
170 - echo
171 - # we want to abort for releases, but just print a warning for live ebuild
172 - # to keep package installable
173 - [[ ${PV} == "9999" ]] || die
174 - fi
175 -}
176 -
177 -src_prepare() {
178 - default
179 - libsoversion_check
180 -
181 - # Run unconditionally (bug #792627)
182 - eautoreconf
183 -
184 - if [[ ${PV} != "9999" ]]; then
185 - # Set revision number
186 - sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" META || die "Could not set Gentoo release"
187 - fi
188 -
189 - if use python; then
190 - pushd contrib/pyzfs >/dev/null || die
191 - distutils-r1_src_prepare
192 - popd >/dev/null || die
193 - fi
194 -
195 - # prevent errors showing up on zfs-mount stop, #647688
196 - # openrc will unmount all filesystems anyway.
197 - sed -i "/^ZFS_UNMOUNT=/ s/yes/no/" "etc/default/zfs.in" || die
198 -}
199 -
200 -src_configure() {
201 - use custom-cflags || strip-flags
202 - use minimal || python_setup
203 -
204 - local myconf=(
205 - --bindir="${EPREFIX}/bin"
206 - --enable-shared
207 - --enable-systemd
208 - --enable-sysvinit
209 - --localstatedir="${EPREFIX}/var"
210 - --sbindir="${EPREFIX}/sbin"
211 - --with-config=user
212 - --with-dracutdir="${EPREFIX}/usr/lib/dracut"
213 - --with-linux="${KV_DIR}"
214 - --with-linux-obj="${KV_OUT_DIR}"
215 - --with-udevdir="$(get_udevdir)"
216 - --with-pamconfigsdir="${EPREFIX}/unwanted_files"
217 - --with-pammoduledir="$(getpam_mod_dir)"
218 - --with-systemdunitdir="$(systemd_get_systemunitdir)"
219 - --with-systemdpresetdir="${EPREFIX}/lib/systemd/system-preset"
220 - --with-vendor=gentoo
221 - $(use_enable debug)
222 - $(use_enable nls)
223 - $(use_enable pam)
224 - $(use_enable python pyzfs)
225 - --disable-static
226 - $(usex minimal --without-python --with-python="${EPYTHON}")
227 - )
228 -
229 - econf "${myconf[@]}"
230 -}
231 -
232 -src_compile() {
233 - default
234 - if use python; then
235 - pushd contrib/pyzfs >/dev/null || die
236 - distutils-r1_src_compile
237 - popd >/dev/null || die
238 - fi
239 -}
240 -
241 -src_install() {
242 - default
243 -
244 - gen_usr_ldscript -a nvpair uutil zfsbootenv zfs zfs_core zpool
245 -
246 - use pam && { rm -rv "${ED}/unwanted_files" || die ; }
247 -
248 - use test-suite || { rm -r "${ED}/usr/share/zfs" || die ; }
249 -
250 - find "${ED}" -name '*.la' -delete || die
251 -
252 - dobashcomp contrib/bash_completion.d/zfs
253 - bashcomp_alias zfs zpool
254 -
255 - # strip executable bit from conf.d file
256 - fperms 0644 /etc/conf.d/zfs
257 -
258 - if use python; then
259 - pushd contrib/pyzfs >/dev/null || die
260 - distutils-r1_src_install
261 - popd >/dev/null || die
262 - fi
263 -
264 - # enforce best available python implementation
265 - use minimal || python_fix_shebang "${ED}/bin"
266 -}
267 -
268 -pkg_postinst() {
269 - # we always need userspace utils in sync with zfs-kmod
270 - # so force initrd update for userspace as well, to avoid
271 - # situation when zfs-kmod trigger initrd rebuild before
272 - # userspace component is rebuilt
273 - # KV_* variables are provided by linux-info.eclass
274 - if [[ -z ${ROOT} ]] && use dist-kernel; then
275 - dist-kernel_reinstall_initramfs "${KV_DIR}" "${KV_FULL}"
276 - fi
277 -
278 - if use rootfs; then
279 - if ! has_version sys-kernel/genkernel && ! has_version sys-kernel/dracut; then
280 - elog "Root on zfs requires an initramfs to boot"
281 - elog "The following packages provide one and are tested on a regular basis:"
282 - elog " sys-kernel/dracut"
283 - elog " sys-kernel/genkernel"
284 - fi
285 - fi
286 -
287 - if ! use kernel-builtin && [[ ${PV} == "9999" ]]; then
288 - einfo "Adding ${P} to the module database to ensure that the"
289 - einfo "kernel modules and userland utilities stay in sync."
290 - update_moduledb
291 - fi
292 -
293 - if systemd_is_booted || has_version sys-apps/systemd; then
294 - einfo "Please refer to ${EROOT}/lib/systemd/system-preset/50-zfs.preset"
295 - einfo "for default zfs systemd service configuration"
296 - else
297 - [[ -e "${EROOT}/etc/runlevels/boot/zfs-import" ]] || \
298 - einfo "You should add zfs-import to the boot runlevel."
299 - [[ -e "${EROOT}/etc/runlevels/boot/zfs-mount" ]]|| \
300 - einfo "You should add zfs-mount to the boot runlevel."
301 - [[ -e "${EROOT}/etc/runlevels/default/zfs-share" ]] || \
302 - einfo "You should add zfs-share to the default runlevel."
303 - [[ -e "${EROOT}/etc/runlevels/default/zfs-zed" ]] || \
304 - einfo "You should add zfs-zed to the default runlevel."
305 - fi
306 -}
307 -
308 -pkg_postrm() {
309 - if ! use kernel-builtin && [[ ${PV} == "9999" ]]; then
310 - remove_moduledb
311 - fi
312 -}