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: Sat, 18 Sep 2021 21:27:20
Message-Id: 1632000123.0815716d665794d6b7385161db7005eed3590c4e.gyakovlev@gentoo
1 commit: 0815716d665794d6b7385161db7005eed3590c4e
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 18 21:17:53 2021 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 18 21:22:03 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0815716d
7
8 sys-fs/zfs: drop 2.1.1
9
10 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
11
12 sys-fs/zfs/zfs-2.1.1.ebuild | 288 --------------------------------------------
13 1 file changed, 288 deletions(-)
14
15 diff --git a/sys-fs/zfs/zfs-2.1.1.ebuild b/sys-fs/zfs/zfs-2.1.1.ebuild
16 deleted file mode 100644
17 index cf525674e3a..00000000000
18 --- a/sys-fs/zfs/zfs-2.1.1.ebuild
19 +++ /dev/null
20 @@ -1,288 +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_{8,9,10} )
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 ~riscv"
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/5"
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=( "${FILESDIR}/2.0.4-scrub-timers.patch" )
116 -
117 -pkg_pretend() {
118 - use rootfs || return 0
119 -
120 - if has_version virtual/dist-kernel && ! use dist-kernel; then
121 - ewarn "You have virtual/dist-kernel installed, but"
122 - ewarn "USE=\"dist-kernel\" is not enabled for ${CATEGORY}/${PN}"
123 - ewarn "It's recommended to globally enable dist-kernel USE flag"
124 - ewarn "to auto-trigger initrd rebuilds with kernel updates"
125 - fi
126 -}
127 -
128 -pkg_setup() {
129 - if use kernel_linux; then
130 - linux-info_pkg_setup
131 -
132 - if ! linux_config_exists; then
133 - ewarn "Cannot check the linux kernel configuration."
134 - else
135 - if use test-suite; then
136 - if linux_chkconfig_present BLK_DEV_LOOP; then
137 - eerror "The ZFS test suite requires loop device support enabled."
138 - eerror "Please enable it:"
139 - eerror " CONFIG_BLK_DEV_LOOP=y"
140 - eerror "in /usr/src/linux/.config or"
141 - eerror " Device Drivers --->"
142 - eerror " Block devices --->"
143 - eerror " [X] Loopback device support"
144 - fi
145 - fi
146 - fi
147 - fi
148 -}
149 -
150 -libsoversion_check() {
151 - local bugurl libzfs_sover
152 - bugurl="https://bugs.gentoo.org/enter_bug.cgi?form_name=enter_bug&product=Gentoo+Linux&component=Current+packages"
153 -
154 - libzfs_sover="$(grep 'libzfs_la_LDFLAGS += -version-info' lib/libzfs/Makefile.am \
155 - | grep -Eo '[0-9]+:[0-9]+:[0-9]+')"
156 - libzfs_sover="${libzfs_sover%%:*}"
157 -
158 - if [[ ${libzfs_sover} -ne $(ver_cut 2 ${SLOT}) ]]; then
159 - echo
160 - eerror "BUG BUG BUG BUG BUG BUG BUG BUG"
161 - eerror "ebuild subslot does not match libzfs soversion!"
162 - eerror "libzfs soversion: ${libzfs_sover}"
163 - eerror "ebuild value: $(ver_cut 2 ${SLOT})"
164 - eerror "This is a bug in the ebuild, please use the following URL to report it"
165 - eerror "${bugurl}&short_desc=${CATEGORY}%2F${P}+update+subslot"
166 - echo
167 - # we want to abort for releases, but just print a warning for live ebuild
168 - # to keep package installable
169 - [[ ${PV} == "9999" ]] || die
170 - fi
171 -}
172 -
173 -src_prepare() {
174 - default
175 - libsoversion_check
176 -
177 - # Run unconditionally (bug #792627)
178 - eautoreconf
179 -
180 - if [[ ${PV} != "9999" ]]; then
181 - # Set revision number
182 - sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" META || die "Could not set Gentoo release"
183 - fi
184 -
185 - if use python; then
186 - pushd contrib/pyzfs >/dev/null || die
187 - distutils-r1_src_prepare
188 - popd >/dev/null || die
189 - fi
190 -
191 - # prevent errors showing up on zfs-mount stop, #647688
192 - # openrc will unmount all filesystems anyway.
193 - sed -i "/^ZFS_UNMOUNT=/ s/yes/no/" "etc/default/zfs.in" || die
194 -}
195 -
196 -src_configure() {
197 - use custom-cflags || strip-flags
198 - use minimal || python_setup
199 -
200 - local myconf=(
201 - --bindir="${EPREFIX}/bin"
202 - --enable-shared
203 - --enable-systemd
204 - --enable-sysvinit
205 - --localstatedir="${EPREFIX}/var"
206 - --sbindir="${EPREFIX}/sbin"
207 - --with-config=user
208 - --with-dracutdir="${EPREFIX}/usr/lib/dracut"
209 - --with-linux="${KV_DIR}"
210 - --with-linux-obj="${KV_OUT_DIR}"
211 - --with-udevdir="$(get_udevdir)"
212 - --with-pamconfigsdir="${EPREFIX}/unwanted_files"
213 - --with-pammoduledir="$(getpam_mod_dir)"
214 - --with-systemdunitdir="$(systemd_get_systemunitdir)"
215 - --with-systemdpresetdir="${EPREFIX}/lib/systemd/system-preset"
216 - --with-vendor=gentoo
217 - $(use_enable debug)
218 - $(use_enable nls)
219 - $(use_enable pam)
220 - $(use_enable python pyzfs)
221 - --disable-static
222 - $(usex minimal --without-python --with-python="${EPYTHON}")
223 - )
224 -
225 - econf "${myconf[@]}"
226 -}
227 -
228 -src_compile() {
229 - default
230 - if use python; then
231 - pushd contrib/pyzfs >/dev/null || die
232 - distutils-r1_src_compile
233 - popd >/dev/null || die
234 - fi
235 -}
236 -
237 -src_install() {
238 - default
239 -
240 - gen_usr_ldscript -a nvpair uutil zfsbootenv zfs zfs_core zpool
241 -
242 - use pam && { rm -rv "${ED}/unwanted_files" || die ; }
243 -
244 - use test-suite || { rm -r "${ED}/usr/share/zfs" || die ; }
245 -
246 - find "${ED}" -name '*.la' -delete || die
247 -
248 - dobashcomp contrib/bash_completion.d/zfs
249 - bashcomp_alias zfs zpool
250 -
251 - # strip executable bit from conf.d file
252 - fperms 0644 /etc/conf.d/zfs
253 -
254 - if use python; then
255 - pushd contrib/pyzfs >/dev/null || die
256 - distutils-r1_src_install
257 - popd >/dev/null || die
258 - fi
259 -
260 - # enforce best available python implementation
261 - use minimal || python_fix_shebang "${ED}/bin"
262 -}
263 -
264 -pkg_postinst() {
265 - # we always need userspace utils in sync with zfs-kmod
266 - # so force initrd update for userspace as well, to avoid
267 - # situation when zfs-kmod trigger initrd rebuild before
268 - # userspace component is rebuilt
269 - # KV_* variables are provided by linux-info.eclass
270 - if [[ -z ${ROOT} ]] && use dist-kernel; then
271 - dist-kernel_reinstall_initramfs "${KV_DIR}" "${KV_FULL}"
272 - fi
273 -
274 - if use rootfs; then
275 - if ! has_version sys-kernel/genkernel && ! has_version sys-kernel/dracut; then
276 - elog "Root on zfs requires an initramfs to boot"
277 - elog "The following packages provide one and are tested on a regular basis:"
278 - elog " sys-kernel/dracut"
279 - elog " sys-kernel/genkernel"
280 - fi
281 - fi
282 -
283 - if ! use kernel-builtin && [[ ${PV} == "9999" ]]; then
284 - einfo "Adding ${P} to the module database to ensure that the"
285 - einfo "kernel modules and userland utilities stay in sync."
286 - update_moduledb
287 - fi
288 -
289 - if systemd_is_booted || has_version sys-apps/systemd; then
290 - einfo "Please refer to ${EROOT}/lib/systemd/system-preset/50-zfs.preset"
291 - einfo "for default zfs systemd service configuration"
292 - else
293 - [[ -e "${EROOT}/etc/runlevels/boot/zfs-import" ]] || \
294 - einfo "You should add zfs-import to the boot runlevel."
295 - [[ -e "${EROOT}/etc/runlevels/boot/zfs-mount" ]]|| \
296 - einfo "You should add zfs-mount to the boot runlevel."
297 - [[ -e "${EROOT}/etc/runlevels/default/zfs-share" ]] || \
298 - einfo "You should add zfs-share to the default runlevel."
299 - [[ -e "${EROOT}/etc/runlevels/default/zfs-zed" ]] || \
300 - einfo "You should add zfs-zed to the default runlevel."
301 - fi
302 -}
303 -
304 -pkg_postrm() {
305 - if ! use kernel-builtin && [[ ${PV} == "9999" ]]; then
306 - remove_moduledb
307 - fi
308 -}