Gentoo Archives: gentoo-commits

From: Jonathan Vasquez <fearedbliss@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs/
Date: Thu, 27 Jul 2017 12:41:24
Message-Id: 1501159114.89c0d689986450acd080f71a65a734b8aedef7de.fearedbliss@gentoo
1 commit: 89c0d689986450acd080f71a65a734b8aedef7de
2 Author: Jonathan Vasquez <fearedbliss <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jul 27 12:38:34 2017 +0000
4 Commit: Jonathan Vasquez <fearedbliss <AT> gentoo <DOT> org>
5 CommitDate: Thu Jul 27 12:38:34 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=89c0d689
7
8 sys-fs/zfs: version bump to 0.7.0
9
10 Package-Manager: Portage-2.3.6, Repoman-2.3.2
11
12 sys-fs/zfs/Manifest | 1 +
13 sys-fs/zfs/zfs-0.7.0.ebuild | 197 ++++++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 198 insertions(+)
15
16 diff --git a/sys-fs/zfs/Manifest b/sys-fs/zfs/Manifest
17 index 0fb5b610bb5..38d65b65c32 100644
18 --- a/sys-fs/zfs/Manifest
19 +++ b/sys-fs/zfs/Manifest
20 @@ -20,4 +20,5 @@ DIST zfs-0.6.5.6.tar.gz 2561093 SHA256 c349d46d86b4f61cd53a0891acad916cfc3f0d675
21 DIST zfs-0.6.5.7.tar.gz 2537816 SHA256 4a9e271bb9a6af8d564e4d5800e4fff36224f1697b923a7253659bdda80dc590 SHA512 559b826ae1a176217b92d8407729e2c5feeffb117dc9affaa8c9c2134d996b6c3cbe095f7a0c4666c9b131742491f1304eeb292e13e0df0b6d001fa620568af2 WHIRLPOOL bf2e0865de35496cc995738ddde34df797b0c5047c0dd17e5b755803ef16e7c16f8ba89927106a1f6131c2f75a6749c31a72dff95fc0fee186b308c50ce0b4f4
22 DIST zfs-0.6.5.8.tar.gz 2521921 SHA256 d77f43f7dc38381773e2c34531954c52f3de80361b7bb10c933a7482f89cfe84 SHA512 e5b53a9531b865e7c650892c0deb1ee81db086a33538cd667a087a8a8d33a0ad93a30ae5e800096abfc4dc8ed00843da924230082e204fb7543dd401ef41fcde WHIRLPOOL 623bf8ee51d59dcd1842bf41ccf19c2eb6813fb1e88dea1ea1c6f1388c11484b798546bdcb94500735a0e9e5f9099a4df43308760b353b5b62ff56af035f88bd
23 DIST zfs-0.6.5.9.tar.gz 2610650 SHA256 b724b57dbddae59246fdc15f88f1224061c712945bb36412a2087e0c7760d77f SHA512 6e175f32421cf0f9e13429f12f0fac0564dc7059ab076831d0ebc4f6a17412160ca3526ebdf894bc7666e82580355b08701dd01c411d3177f82e7330b4529a37 WHIRLPOOL 149d730a26363b50691363b314669756d218c4a16e6d06e319c2b0866c5f8ed6e2da2396a516297c127d3343d51d78072d8b7371e3f4d327d30fa43c90be5cd3
24 +DIST zfs-0.7.0.tar.gz 6714094 SHA256 6907524f5ca4149b799fe65cd31b552b0ae90dba5dc20524e1a24fc708d807d2 SHA512 6e6cbf54399fc85b74b76a6ceb3f30e94903f755fe6386fccc56b5e6d307a907759e4b62acec5d32e8383ef1083423eaff8dee2b0ef01a99459171a42b47d217 WHIRLPOOL 74687be4220bab51f18fdd3c047400c4261acf16f38086c2485f5cb9d79af87f5adfafced92860b021814aece7446cb18e9ca310a363b90c6bac39343b72a4b6
25 DIST zfs-kmod-0.6.2-p4.tar.xz 63984 SHA256 9167edc4be86e3fcda6b3c198e51f92ab0c95ac5baca11666c28029a628cdac9 SHA512 13e4ec415c35d2f268d89565745f5898c0943423577a2ba6714b3a069c5a80f244cd06dff91464f38dd4ed60673d1145ead080bb03a56d4be33e328f948ffa64 WHIRLPOOL 8c399ec67119ed4fbebb5599d00f888918678bc4e4ea369b4bdc5c75bfc90fc76396087624c8011de370a54ff103bccaa8922d05ac7ccebb2b3481bbbcf44b19
26
27 diff --git a/sys-fs/zfs/zfs-0.7.0.ebuild b/sys-fs/zfs/zfs-0.7.0.ebuild
28 new file mode 100644
29 index 00000000000..7512d7282ca
30 --- /dev/null
31 +++ b/sys-fs/zfs/zfs-0.7.0.ebuild
32 @@ -0,0 +1,197 @@
33 +# Copyright 1999-2017 Gentoo Foundation
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI="5"
37 +PYTHON_COMPAT=( python{2_7,3_4,3_5} )
38 +
39 +if [ ${PV} == "9999" ] ; then
40 + inherit git-r3 linux-mod
41 + AUTOTOOLS_AUTORECONF="1"
42 + EGIT_REPO_URI="git://github.com/zfsonlinux/${PN}.git"
43 +else
44 + SRC_URI="https://github.com/zfsonlinux/${PN}/releases/download/${P}/${P}.tar.gz"
45 + KEYWORDS=" ~amd64"
46 +fi
47 +
48 +inherit autotools-utils bash-completion-r1 flag-o-matic linux-info python-r1 systemd toolchain-funcs udev
49 +
50 +DESCRIPTION="Userland utilities for ZFS Linux kernel module"
51 +HOMEPAGE="http://zfsonlinux.org/"
52 +
53 +LICENSE="BSD-2 CDDL MIT"
54 +SLOT="0"
55 +IUSE="custom-cflags debug kernel-builtin +rootfs test-suite static-libs"
56 +RESTRICT="test"
57 +
58 +COMMON_DEPEND="
59 + sys-apps/util-linux[static-libs?]
60 + sys-libs/zlib[static-libs(+)?]
61 + virtual/awk
62 +"
63 +DEPEND="${COMMON_DEPEND}
64 + virtual/pkgconfig
65 +"
66 +
67 +RDEPEND="${COMMON_DEPEND}
68 + !=sys-apps/grep-2.13*
69 + !kernel-builtin? ( =sys-fs/zfs-kmod-${PV}* )
70 + !sys-fs/zfs-fuse
71 + !prefix? ( virtual/udev )
72 + test-suite? (
73 + sys-apps/util-linux
74 + sys-devel/bc
75 + sys-block/parted
76 + sys-fs/lsscsi
77 + sys-fs/mdadm
78 + sys-process/procps
79 + virtual/modutils
80 + )
81 + rootfs? (
82 + app-arch/cpio
83 + app-misc/pax-utils
84 + !<sys-boot/grub-2.00-r2:2
85 + )
86 + sys-fs/udev-init-scripts
87 +"
88 +
89 +AT_M4DIR="config"
90 +AUTOTOOLS_IN_SOURCE_BUILD="1"
91 +
92 +pkg_setup() {
93 + if use kernel_linux && use test-suite; then
94 + linux-info_pkg_setup
95 + if ! linux_config_exists; then
96 + ewarn "Cannot check the linux kernel configuration."
97 + else
98 + # recheck that we don't have usblp to collide with libusb
99 + if use test-suite; then
100 + if linux_chkconfig_present BLK_DEV_LOOP; then
101 + eerror "The ZFS test suite requires loop device support enabled."
102 + eerror "Please enable it:"
103 + eerror " CONFIG_BLK_DEV_LOOP=y"
104 + eerror "in /usr/src/linux/.config or"
105 + eerror " Device Drivers --->"
106 + eerror " Block devices --->"
107 + eerror " [ ] Loopback device support"
108 + fi
109 + fi
110 + fi
111 + fi
112 +
113 +}
114 +
115 +src_prepare() {
116 + # Update paths
117 + sed -e "s|/sbin/lsmod|/bin/lsmod|" \
118 + -e "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" \
119 + -e "s|/sbin/parted|/usr/sbin/parted|" \
120 + -i scripts/common.sh.in
121 +
122 + autotools-utils_src_prepare
123 +}
124 +
125 +src_configure() {
126 + use custom-cflags || strip-flags
127 + local myeconfargs=(
128 + --bindir="${EPREFIX}/bin"
129 + --sbindir="${EPREFIX}/sbin"
130 + --with-config=user
131 + --with-dracutdir="/usr/$(get_libdir)/dracut"
132 + --with-linux="${KV_DIR}"
133 + --with-linux-obj="${KV_OUT_DIR}"
134 + --with-udevdir="$(get_udevdir)"
135 + --with-blkid
136 + $(use_enable debug)
137 + )
138 + autotools-utils_src_configure
139 +
140 + # prepare systemd unit and helper script
141 + cat "${FILESDIR}/zfs.service.in" | \
142 + sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
143 + -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
144 + > "${T}/zfs.service" || die
145 + cat "${FILESDIR}/zfs-init.sh.in" | \
146 + sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
147 + -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
148 + > "${T}/zfs-init.sh" || die
149 +}
150 +
151 +src_install() {
152 + autotools-utils_src_install
153 + gen_usr_ldscript -a uutil nvpair zpool zfs zfs_core
154 + use test-suite || rm -rf "${ED}usr/share/zfs"
155 +
156 + newbashcomp "${FILESDIR}/bash-completion-r1" zfs
157 + bashcomp_alias zfs zpool
158 +
159 + exeinto /usr/libexec
160 + doexe "${T}/zfs-init.sh"
161 + systemd_dounit "${T}/zfs.service"
162 +}
163 +
164 +pkg_postinst() {
165 + if ! use kernel-builtin && [ ${PV} = "9999" ]
166 + then
167 + einfo "Adding ${P} to the module database to ensure that the"
168 + einfo "kernel modules and userland utilities stay in sync."
169 + update_moduledb
170 + fi
171 +
172 + if [ -e "${EROOT}etc/runlevels/boot/zfs" ]
173 + then
174 + einfo 'The zfs boot script has been split into the zfs-import,'
175 + einfo 'zfs-mount and zfs-share scripts.'
176 + einfo
177 + einfo 'You had the zfs script in your boot runlevel. For your'
178 + einfo 'convenience, it has been automatically removed and the three'
179 + einfo 'scripts that replace it have been configured to start.'
180 + einfo 'The zfs-import and zfs-mount scripts have been added to the boot'
181 + einfo 'runlevel while the zfs-share script is in the default runlevel.'
182 +
183 + rm "${EROOT}etc/runlevels/boot/zfs"
184 + ln -snf "${EROOT}etc/init.d/zfs-import" \
185 + "${EROOT}etc/runlevels/boot/zfs-import"
186 + ln -snf "${EROOT}etc/init.d/zfs-mount" \
187 + "${EROOT}etc/runlevels/boot/zfs-mount"
188 + ln -snf "${EROOT}etc/init.d/zfs-share" \
189 + "${EROOT}etc/runlevels/default/zfs-share"
190 + else
191 + [ -e "${EROOT}etc/runlevels/boot/zfs-import" ] || \
192 + einfo "You should add zfs-import to the boot runlevel."
193 + [ -e "${EROOT}etc/runlevels/boot/zfs-mount" ] || \
194 + einfo "You should add zfs-mount to the boot runlevel."
195 + [ -e "${EROOT}etc/runlevels/default/zfs-share" ] || \
196 + einfo "You should add zfs-share to the default runlevel."
197 + fi
198 +
199 + if [ -e "${EROOT}etc/runlevels/default/zed" ]
200 + then
201 + einfo 'The downstream OpenRC zed script has replaced by the upstream'
202 + einfo 'OpenRC zfs-zed script.'
203 + einfo
204 + einfo 'You had the zed script in your default runlevel. For your'
205 + einfo 'convenience, it has been automatically removed and the zfs-zed'
206 + einfo 'script that replaced it has been configured to start.'
207 +
208 + rm "${EROOT}etc/runlevels/boot/zed"
209 + ln -snf "${EROOT}etc/init.d/zfs-sed" \
210 + "${EROOT}etc/runlevels/default/zfs-zed"
211 + else
212 + [ -e "${EROOT}etc/runlevels/default/zfs-zed" ] || \
213 + einfo "You should add zfs-zed to the default runlevel."
214 + fi
215 +
216 + if [ -e "${EROOT}etc/runlevels/shutdown/zfs-shutdown" ]
217 + then
218 + einfo "The zfs-shutdown script is obsolete. Removing it from runlevel."
219 + rm "${EROOT}etc/runlevels/shutdown/zfs-shutdown"
220 + fi
221 +
222 +}
223 +
224 +pkg_postrm() {
225 + if ! use kernel-builtin && [ ${PV} = "9999" ]
226 + then
227 + remove_moduledb
228 + fi
229 +}