Gentoo Archives: gentoo-commits

From: James Le Cuirot <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-cluster/glusterfs/
Date: Sat, 09 Dec 2017 18:51:00
Message-Id: 1512845448.22c2b5002a396b340e12df805ca051ac5743d70d.chewi@gentoo
1 commit: 22c2b5002a396b340e12df805ca051ac5743d70d
2 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
3 AuthorDate: Sat Dec 9 18:50:20 2017 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Sat Dec 9 18:50:48 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22c2b500
7
8 sys-cluster/glusterfs: Bump to 3.13.0 and add 9999 live ebuild
9
10 I have forced --with-ipv6-default when the libtirpc flag is enabled to
11 avoid bug #639838. This bug affects 3.12.3 too but the aforementioned
12 flag is not available in that version. I'll try to get this issue
13 resolved properly and then push for stabilisation.
14
15 Bug: https://bugs.gentoo.org/639838
16 Package-Manager: Portage-2.3.17, Repoman-2.3.6
17
18 sys-cluster/glusterfs/Manifest | 1 +
19 sys-cluster/glusterfs/glusterfs-3.13.0.ebuild | 224 ++++++++++++++++++++++++++
20 sys-cluster/glusterfs/glusterfs-9999.ebuild | 224 ++++++++++++++++++++++++++
21 3 files changed, 449 insertions(+)
22
23 diff --git a/sys-cluster/glusterfs/Manifest b/sys-cluster/glusterfs/Manifest
24 index 78d1fe1e8d0..5223b773b13 100644
25 --- a/sys-cluster/glusterfs/Manifest
26 +++ b/sys-cluster/glusterfs/Manifest
27 @@ -1 +1,2 @@
28 DIST glusterfs-3.12.3.tar.gz 7187644 BLAKE2B 736c6bb408b0bd289ce5ce0abcc7e8bf4b7f96e4e92a1e669f016b59fb16993b17f7cf50fed09a6eeb851b57054c7bf9e595b642c506b0aca567d7ae80de0e84 SHA512 f648b8324a69360b510c947e49918467c969dcc21b6a408b6916b780aa78c44abe027b6c84d696eed7d5f381b055edd3be1dfe4f3ea8f76d15d9319cd08cfa3d
29 +DIST glusterfs-3.13.0.tar.gz 7445713 BLAKE2B 9e03cc9fb214252cb883c1cb0751dbda71d54cf0c8f15f126f6f7a9f1e437cfc7e42df800c01bd4b6916e32005fc93e5d8ff6228810accdba30c30219ab4f878 SHA512 36d89866658ed10b84ba38a1d7f2afd90f1b7fcc5e40f7e8a2c8e1d05e5b282e7f4e9e20dbe64e093b997a05f884563b8b57aef9ed6b17d61400275c3553c5e1
30
31 diff --git a/sys-cluster/glusterfs/glusterfs-3.13.0.ebuild b/sys-cluster/glusterfs/glusterfs-3.13.0.ebuild
32 new file mode 100644
33 index 00000000000..4615e8fa756
34 --- /dev/null
35 +++ b/sys-cluster/glusterfs/glusterfs-3.13.0.ebuild
36 @@ -0,0 +1,224 @@
37 +# Copyright 1999-2017 Gentoo Foundation
38 +# Distributed under the terms of the GNU General Public License v2
39 +
40 +EAPI=6
41 +
42 +PYTHON_COMPAT=( python2_7 )
43 +
44 +inherit autotools elisp-common python-single-r1 systemd user versionator
45 +
46 +if [[ ${PV#9999} != ${PV} ]]; then
47 + inherit git-r3
48 + EGIT_REPO_URI="https://github.com/gluster/glusterfs.git"
49 +else
50 + SRC_URI="https://download.gluster.org/pub/gluster/${PN}/$(get_version_component_range '1-2')/${PV}/${P}.tar.gz"
51 + KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
52 +fi
53 +
54 +DESCRIPTION="GlusterFS is a powerful network/cluster filesystem"
55 +HOMEPAGE="https://www.gluster.org/"
56 +
57 +LICENSE="|| ( GPL-2 LGPL-3+ )"
58 +SLOT="0"
59 +IUSE="bd-xlator crypt-xlator debug emacs +fuse +georeplication glupy infiniband +libtirpc qemu-block rsyslog static-libs +syslog systemtap test +tiering vim-syntax +xml"
60 +
61 +REQUIRED_USE="georeplication? ( ${PYTHON_REQUIRED_USE} )
62 + glupy? ( ${PYTHON_REQUIRED_USE} )"
63 +
64 +# the tests must be run as root
65 +RESTRICT="test"
66 +
67 +# sys-apps/util-linux is required for libuuid
68 +RDEPEND="bd-xlator? ( sys-fs/lvm2 )
69 + !elibc_glibc? ( sys-libs/argp-standalone )
70 + emacs? ( virtual/emacs )
71 + fuse? ( >=sys-fs/fuse-2.7.0:0 )
72 + georeplication? ( ${PYTHON_DEPS} )
73 + infiniband? ( sys-fabric/libibverbs:* sys-fabric/librdmacm:* )
74 + libtirpc? ( net-libs/libtirpc:= )
75 + !libtirpc? ( elibc_glibc? ( sys-libs/glibc[rpc(-)] ) )
76 + qemu-block? ( dev-libs/glib:2 )
77 + systemtap? ( dev-util/systemtap )
78 + tiering? ( dev-db/sqlite:3 )
79 + xml? ( dev-libs/libxml2 )
80 + sys-libs/readline:=
81 + dev-libs/libaio
82 + dev-libs/openssl:=[-bindist]
83 + dev-libs/userspace-rcu:=
84 + net-libs/rpcsvc-proto
85 + sys-apps/util-linux"
86 +DEPEND="${RDEPEND}
87 + virtual/acl
88 + virtual/pkgconfig
89 + sys-devel/bison
90 + sys-devel/flex
91 + test? ( >=dev-util/cmocka-1.0.1
92 + app-benchmarks/dbench
93 + dev-vcs/git
94 + net-fs/nfs-utils
95 + virtual/perl-Test-Harness
96 + dev-libs/yajl
97 + sys-fs/xfsprogs
98 + sys-apps/attr )"
99 +
100 +SITEFILE="50${PN}-mode-gentoo.el"
101 +
102 +PATCHES=(
103 + "${FILESDIR}/${PN}-3.12.2-poisoned-sysmacros.patch"
104 + "${FILESDIR}/${PN}-3.12.2-silent_rules.patch"
105 +)
106 +
107 +DOCS=( AUTHORS ChangeLog NEWS README.md THANKS )
108 +
109 +# Maintainer notes:
110 +# * The build system will always configure & build argp-standalone but it'll never use it
111 +# if the argp.h header is found in the system. Which should be the case with
112 +# glibc or if argp-standalone is installed.
113 +
114 +pkg_setup() {
115 + python_setup "python2*"
116 + python-single-r1_pkg_setup
117 +
118 + # Needed for statedumps
119 + # https://github.com/gluster/glusterfs/commit/0e50c4b3ea734456c14e2d7a578463999bd332c3
120 + enewgroup gluster
121 + enewuser gluster -1 -1 "${EPREFIX}"/var/run/gluster gluster
122 +}
123 +
124 +src_prepare() {
125 + default
126 +
127 + # build rpc-transport and xlators only once as shared libs
128 + find rpc/rpc-transport xlators -name Makefile.am |
129 + xargs sed -i 's|.*$(top_srcdir).*\.sym|\0 -shared|' || die
130 +
131 + # fix execution permissions
132 + chmod +x libglusterfs/src/gen-defaults.py || die
133 +
134 + eautoreconf
135 +}
136 +
137 +src_configure() {
138 + econf \
139 + --disable-dependency-tracking \
140 + --disable-silent-rules \
141 + --disable-fusermount \
142 + $(use_enable debug) \
143 + $(use_enable bd-xlator) \
144 + $(use_enable crypt-xlator) \
145 + $(use_enable fuse fuse-client) \
146 + $(use_enable georeplication) \
147 + $(use_enable glupy) \
148 + $(use_enable infiniband ibverbs) \
149 + $(use_enable qemu-block) \
150 + $(use_enable static-libs static) \
151 + $(use_enable syslog) \
152 + $(use_enable systemtap) \
153 + $(use_enable test cmocka) \
154 + $(use_enable tiering) \
155 + $(use_enable xml xml-output) \
156 + $(use_with libtirpc ipv6-default) \
157 + $(use_with libtirpc) \
158 + --with-tmpfilesdir="${EPREFIX}"/etc/tmpfiles.d \
159 + --docdir="${EPREFIX}"/usr/share/doc/${PF} \
160 + --localstatedir="${EPREFIX}"/var
161 +}
162 +
163 +src_compile() {
164 + default
165 + use emacs && elisp-compile extras/glusterfs-mode.el
166 +}
167 +
168 +src_install() {
169 + default
170 +
171 + rm \
172 + "${ED}"/etc/glusterfs/glusterfs-{georep-,}logrotate \
173 + "${ED}"/etc/glusterfs/gluster-rsyslog-*.conf \
174 + "${ED}"/usr/share/doc/${PF}/glusterfs{-mode.el,.vim} || die "removing false files failed"
175 +
176 + insinto /etc/logrotate.d
177 + newins "${FILESDIR}"/glusterfs.logrotate glusterfs
178 +
179 + if use rsyslog ; then
180 + insinto /etc/rsyslog.d
181 + newins extras/gluster-rsyslog-7.2.conf 60-gluster.conf
182 + fi
183 +
184 + if use emacs ; then
185 + elisp-install ${PN} extras/glusterfs-mode.el*
186 + elisp-site-file-install "${FILESDIR}/${SITEFILE}"
187 + fi
188 +
189 + if use vim-syntax ; then
190 + insinto /usr/share/vim/vimfiles/ftdetect; doins "${FILESDIR}"/${PN}.vim
191 + insinto /usr/share/vim/vimfiles/syntax; doins extras/${PN}.vim
192 + fi
193 +
194 + # insert some other tools which might be useful
195 + insinto /usr/share/glusterfs/scripts
196 + doins \
197 + extras/backend-{cleanup,xattr-sanitize}.sh \
198 + extras/clear_xattrs.sh \
199 + extras/migrate-unify-to-distribute.sh
200 +
201 + # correct permissions on installed scripts
202 + # fperms 0755 /usr/share/glusterfs/scripts/*.sh
203 + chmod 0755 "${ED}"/usr/share/glusterfs/scripts/*.sh || die
204 +
205 + if use georeplication ; then
206 + # move the gsync-sync-gfid tool to a binary path
207 + # and set a symlink to be compliant with all other distros
208 + mv "${ED}"/usr/{share/glusterfs/scripts/gsync-sync-gfid,libexec/glusterfs/} || die
209 + dosym ../../../libexec/glusterfs/gsync-sync-gfid /usr/share/glusterfs/scripts/gsync-sync-gfid
210 + fi
211 +
212 + newinitd "${FILESDIR}/${PN}-r1.initd" glusterfsd
213 + newinitd "${FILESDIR}/glusterd-r3.initd" glusterd
214 + newconfd "${FILESDIR}/${PN}.confd" glusterfsd
215 +
216 + keepdir /var/log/${PN}
217 + keepdir /var/lib/glusterd
218 +
219 + # QA
220 + rm -r "${ED}/var/run/" || die
221 + if ! use static-libs; then
222 + find "${D}" -type f -name '*.la' -delete || die
223 + fi
224 +
225 + # fix all shebang for python2 #560750
226 + python_fix_shebang "${ED}"
227 +}
228 +
229 +src_test() {
230 + ./run-tests.sh || die
231 +}
232 +
233 +pkg_postinst() {
234 + elog "Starting with ${PN}-3.1.0, you can use the glusterd daemon to configure your"
235 + elog "volumes dynamically. To do so, simply use the gluster CLI after running:"
236 + elog " /etc/init.d/glusterd start"
237 + echo
238 + elog "For static configurations, the glusterfsd startup script can be multiplexed."
239 + elog "The default startup script uses /etc/conf.d/glusterfsd to configure the"
240 + elog "separate service. To create additional instances of the glusterfsd service"
241 + elog "simply create a symlink to the glusterfsd startup script."
242 + echo
243 + elog "Example:"
244 + elog " # ln -s glusterfsd /etc/init.d/glusterfsd2"
245 + elog " # ${EDITOR} /etc/glusterfs/glusterfsd2.vol"
246 + elog "You can now treat glusterfsd2 like any other service"
247 + echo
248 + ewarn "You need to use a ntp client to keep the clocks synchronized across all"
249 + ewarn "of your servers. Setup a NTP synchronizing service before attempting to"
250 + ewarn "run GlusterFS."
251 + echo
252 + elog "If you are upgrading from a previous version of ${PN}, please read:"
253 + elog " http://docs.gluster.org/en/latest/Upgrade-Guide/upgrade_to_$(get_version_component_range '1-2')/"
254 +
255 + use emacs && elisp-site-regen
256 +}
257 +
258 +pkg_postrm() {
259 + use emacs && elisp-site-regen
260 +}
261
262 diff --git a/sys-cluster/glusterfs/glusterfs-9999.ebuild b/sys-cluster/glusterfs/glusterfs-9999.ebuild
263 new file mode 100644
264 index 00000000000..4615e8fa756
265 --- /dev/null
266 +++ b/sys-cluster/glusterfs/glusterfs-9999.ebuild
267 @@ -0,0 +1,224 @@
268 +# Copyright 1999-2017 Gentoo Foundation
269 +# Distributed under the terms of the GNU General Public License v2
270 +
271 +EAPI=6
272 +
273 +PYTHON_COMPAT=( python2_7 )
274 +
275 +inherit autotools elisp-common python-single-r1 systemd user versionator
276 +
277 +if [[ ${PV#9999} != ${PV} ]]; then
278 + inherit git-r3
279 + EGIT_REPO_URI="https://github.com/gluster/glusterfs.git"
280 +else
281 + SRC_URI="https://download.gluster.org/pub/gluster/${PN}/$(get_version_component_range '1-2')/${PV}/${P}.tar.gz"
282 + KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
283 +fi
284 +
285 +DESCRIPTION="GlusterFS is a powerful network/cluster filesystem"
286 +HOMEPAGE="https://www.gluster.org/"
287 +
288 +LICENSE="|| ( GPL-2 LGPL-3+ )"
289 +SLOT="0"
290 +IUSE="bd-xlator crypt-xlator debug emacs +fuse +georeplication glupy infiniband +libtirpc qemu-block rsyslog static-libs +syslog systemtap test +tiering vim-syntax +xml"
291 +
292 +REQUIRED_USE="georeplication? ( ${PYTHON_REQUIRED_USE} )
293 + glupy? ( ${PYTHON_REQUIRED_USE} )"
294 +
295 +# the tests must be run as root
296 +RESTRICT="test"
297 +
298 +# sys-apps/util-linux is required for libuuid
299 +RDEPEND="bd-xlator? ( sys-fs/lvm2 )
300 + !elibc_glibc? ( sys-libs/argp-standalone )
301 + emacs? ( virtual/emacs )
302 + fuse? ( >=sys-fs/fuse-2.7.0:0 )
303 + georeplication? ( ${PYTHON_DEPS} )
304 + infiniband? ( sys-fabric/libibverbs:* sys-fabric/librdmacm:* )
305 + libtirpc? ( net-libs/libtirpc:= )
306 + !libtirpc? ( elibc_glibc? ( sys-libs/glibc[rpc(-)] ) )
307 + qemu-block? ( dev-libs/glib:2 )
308 + systemtap? ( dev-util/systemtap )
309 + tiering? ( dev-db/sqlite:3 )
310 + xml? ( dev-libs/libxml2 )
311 + sys-libs/readline:=
312 + dev-libs/libaio
313 + dev-libs/openssl:=[-bindist]
314 + dev-libs/userspace-rcu:=
315 + net-libs/rpcsvc-proto
316 + sys-apps/util-linux"
317 +DEPEND="${RDEPEND}
318 + virtual/acl
319 + virtual/pkgconfig
320 + sys-devel/bison
321 + sys-devel/flex
322 + test? ( >=dev-util/cmocka-1.0.1
323 + app-benchmarks/dbench
324 + dev-vcs/git
325 + net-fs/nfs-utils
326 + virtual/perl-Test-Harness
327 + dev-libs/yajl
328 + sys-fs/xfsprogs
329 + sys-apps/attr )"
330 +
331 +SITEFILE="50${PN}-mode-gentoo.el"
332 +
333 +PATCHES=(
334 + "${FILESDIR}/${PN}-3.12.2-poisoned-sysmacros.patch"
335 + "${FILESDIR}/${PN}-3.12.2-silent_rules.patch"
336 +)
337 +
338 +DOCS=( AUTHORS ChangeLog NEWS README.md THANKS )
339 +
340 +# Maintainer notes:
341 +# * The build system will always configure & build argp-standalone but it'll never use it
342 +# if the argp.h header is found in the system. Which should be the case with
343 +# glibc or if argp-standalone is installed.
344 +
345 +pkg_setup() {
346 + python_setup "python2*"
347 + python-single-r1_pkg_setup
348 +
349 + # Needed for statedumps
350 + # https://github.com/gluster/glusterfs/commit/0e50c4b3ea734456c14e2d7a578463999bd332c3
351 + enewgroup gluster
352 + enewuser gluster -1 -1 "${EPREFIX}"/var/run/gluster gluster
353 +}
354 +
355 +src_prepare() {
356 + default
357 +
358 + # build rpc-transport and xlators only once as shared libs
359 + find rpc/rpc-transport xlators -name Makefile.am |
360 + xargs sed -i 's|.*$(top_srcdir).*\.sym|\0 -shared|' || die
361 +
362 + # fix execution permissions
363 + chmod +x libglusterfs/src/gen-defaults.py || die
364 +
365 + eautoreconf
366 +}
367 +
368 +src_configure() {
369 + econf \
370 + --disable-dependency-tracking \
371 + --disable-silent-rules \
372 + --disable-fusermount \
373 + $(use_enable debug) \
374 + $(use_enable bd-xlator) \
375 + $(use_enable crypt-xlator) \
376 + $(use_enable fuse fuse-client) \
377 + $(use_enable georeplication) \
378 + $(use_enable glupy) \
379 + $(use_enable infiniband ibverbs) \
380 + $(use_enable qemu-block) \
381 + $(use_enable static-libs static) \
382 + $(use_enable syslog) \
383 + $(use_enable systemtap) \
384 + $(use_enable test cmocka) \
385 + $(use_enable tiering) \
386 + $(use_enable xml xml-output) \
387 + $(use_with libtirpc ipv6-default) \
388 + $(use_with libtirpc) \
389 + --with-tmpfilesdir="${EPREFIX}"/etc/tmpfiles.d \
390 + --docdir="${EPREFIX}"/usr/share/doc/${PF} \
391 + --localstatedir="${EPREFIX}"/var
392 +}
393 +
394 +src_compile() {
395 + default
396 + use emacs && elisp-compile extras/glusterfs-mode.el
397 +}
398 +
399 +src_install() {
400 + default
401 +
402 + rm \
403 + "${ED}"/etc/glusterfs/glusterfs-{georep-,}logrotate \
404 + "${ED}"/etc/glusterfs/gluster-rsyslog-*.conf \
405 + "${ED}"/usr/share/doc/${PF}/glusterfs{-mode.el,.vim} || die "removing false files failed"
406 +
407 + insinto /etc/logrotate.d
408 + newins "${FILESDIR}"/glusterfs.logrotate glusterfs
409 +
410 + if use rsyslog ; then
411 + insinto /etc/rsyslog.d
412 + newins extras/gluster-rsyslog-7.2.conf 60-gluster.conf
413 + fi
414 +
415 + if use emacs ; then
416 + elisp-install ${PN} extras/glusterfs-mode.el*
417 + elisp-site-file-install "${FILESDIR}/${SITEFILE}"
418 + fi
419 +
420 + if use vim-syntax ; then
421 + insinto /usr/share/vim/vimfiles/ftdetect; doins "${FILESDIR}"/${PN}.vim
422 + insinto /usr/share/vim/vimfiles/syntax; doins extras/${PN}.vim
423 + fi
424 +
425 + # insert some other tools which might be useful
426 + insinto /usr/share/glusterfs/scripts
427 + doins \
428 + extras/backend-{cleanup,xattr-sanitize}.sh \
429 + extras/clear_xattrs.sh \
430 + extras/migrate-unify-to-distribute.sh
431 +
432 + # correct permissions on installed scripts
433 + # fperms 0755 /usr/share/glusterfs/scripts/*.sh
434 + chmod 0755 "${ED}"/usr/share/glusterfs/scripts/*.sh || die
435 +
436 + if use georeplication ; then
437 + # move the gsync-sync-gfid tool to a binary path
438 + # and set a symlink to be compliant with all other distros
439 + mv "${ED}"/usr/{share/glusterfs/scripts/gsync-sync-gfid,libexec/glusterfs/} || die
440 + dosym ../../../libexec/glusterfs/gsync-sync-gfid /usr/share/glusterfs/scripts/gsync-sync-gfid
441 + fi
442 +
443 + newinitd "${FILESDIR}/${PN}-r1.initd" glusterfsd
444 + newinitd "${FILESDIR}/glusterd-r3.initd" glusterd
445 + newconfd "${FILESDIR}/${PN}.confd" glusterfsd
446 +
447 + keepdir /var/log/${PN}
448 + keepdir /var/lib/glusterd
449 +
450 + # QA
451 + rm -r "${ED}/var/run/" || die
452 + if ! use static-libs; then
453 + find "${D}" -type f -name '*.la' -delete || die
454 + fi
455 +
456 + # fix all shebang for python2 #560750
457 + python_fix_shebang "${ED}"
458 +}
459 +
460 +src_test() {
461 + ./run-tests.sh || die
462 +}
463 +
464 +pkg_postinst() {
465 + elog "Starting with ${PN}-3.1.0, you can use the glusterd daemon to configure your"
466 + elog "volumes dynamically. To do so, simply use the gluster CLI after running:"
467 + elog " /etc/init.d/glusterd start"
468 + echo
469 + elog "For static configurations, the glusterfsd startup script can be multiplexed."
470 + elog "The default startup script uses /etc/conf.d/glusterfsd to configure the"
471 + elog "separate service. To create additional instances of the glusterfsd service"
472 + elog "simply create a symlink to the glusterfsd startup script."
473 + echo
474 + elog "Example:"
475 + elog " # ln -s glusterfsd /etc/init.d/glusterfsd2"
476 + elog " # ${EDITOR} /etc/glusterfs/glusterfsd2.vol"
477 + elog "You can now treat glusterfsd2 like any other service"
478 + echo
479 + ewarn "You need to use a ntp client to keep the clocks synchronized across all"
480 + ewarn "of your servers. Setup a NTP synchronizing service before attempting to"
481 + ewarn "run GlusterFS."
482 + echo
483 + elog "If you are upgrading from a previous version of ${PN}, please read:"
484 + elog " http://docs.gluster.org/en/latest/Upgrade-Guide/upgrade_to_$(get_version_component_range '1-2')/"
485 +
486 + use emacs && elisp-site-regen
487 +}
488 +
489 +pkg_postrm() {
490 + use emacs && elisp-site-regen
491 +}