Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-cluster/glusterfs/
Date: Tue, 30 Jun 2020 13:31:19
Message-Id: 1593523856.282baa2b85923dab9e57c99dd9a4775cee0fc9f7.whissi@gentoo
1 commit: 282baa2b85923dab9e57c99dd9a4775cee0fc9f7
2 Author: Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
3 AuthorDate: Tue Jun 30 08:30:38 2020 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Tue Jun 30 13:30:56 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=282baa2b
7
8 sys-cluster/glusterfs: bump to 7.6
9
10 Package-Manager: Portage-2.3.102, Repoman-2.3.23
11 Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
12 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
13
14 sys-cluster/glusterfs/Manifest | 1 +
15 sys-cluster/glusterfs/glusterfs-7.6.ebuild | 211 +++++++++++++++++++++++++++++
16 2 files changed, 212 insertions(+)
17
18 diff --git a/sys-cluster/glusterfs/Manifest b/sys-cluster/glusterfs/Manifest
19 index d63476847c3..647a10ce773 100644
20 --- a/sys-cluster/glusterfs/Manifest
21 +++ b/sys-cluster/glusterfs/Manifest
22 @@ -6,3 +6,4 @@ DIST glusterfs-6.9.tar.gz 7580928 BLAKE2B 655544b7ffa70ac9980e1a1041af538f473b6b
23 DIST glusterfs-7.2.tar.gz 7630773 BLAKE2B abceafd06ca8f5de1c84708a1a3ec4453c5d536d8811b773fa6f5dd02d6e3d450c329bc4d0fa32d970ff57e82a1fe3aa48ec9c3a7d3d5ca5817a91e8930b1b6e SHA512 fd1059222c4d30fa5c4011083c3c53af44433180ae124c884a774628051d31d95386bef71d4d25ed2b0c5dd8d9a6936601e8e37d963b34d291cb88ea45e31ff2
24 DIST glusterfs-7.3.tar.gz 7636144 BLAKE2B 8595e4eafc66b6b926d9aad220b569d7f5ae22b020ee3701db37f3db9dba6a33f805cebe322fb0423a1a8f18b85685411fa967beb34b03028d23b24725c5be00 SHA512 901f55d5084e90f4b5907fbbe7d5f7d1937198b500efc369651970053029b727c0bfc6180b6058a3211523b4e16a63bf821b1a9f81dfc1b87b2061d271ec9b3f
25 DIST glusterfs-7.5.tar.gz 7649044 BLAKE2B 01088654051a33c3a009b42c6e7adf7cabc52927a83a3331eced428ed3e6bfb3f7198fcc53a2b1dce678ac58c2f2619d02cce72a9850a50f3a26b37d39baeeaa SHA512 dfd8f04fb398daa7d7f58ef978ab69c0a55a313ac2af3287f7e1e7044f708317227c8749af5fd8d56844dfb8ad47bbd3214c42b806e2e21191a6a8617ab0be38
26 +DIST glusterfs-7.6.tar.gz 7653500 BLAKE2B ff3d4817f2a8b85126669cfbe6f58990aaccfffd91464d7acd97d7092c8eb94c21552eaf5e2301e3e6a7f99534b40c2afce1ade593d8ac559baee2d175538333 SHA512 c26b2046e7afdbb37fdd395fd9f692a0513ebb58c91ea223fbbaf9f8b41641b1fd009f2975e187f0feb8d83fb5cd4a8a0c2fdf4591a8a31e920d6bba75ae7c0f
27
28 diff --git a/sys-cluster/glusterfs/glusterfs-7.6.ebuild b/sys-cluster/glusterfs/glusterfs-7.6.ebuild
29 new file mode 100644
30 index 00000000000..14d47e54215
31 --- /dev/null
32 +++ b/sys-cluster/glusterfs/glusterfs-7.6.ebuild
33 @@ -0,0 +1,211 @@
34 +# Copyright 1999-2020 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=7
38 +
39 +PYTHON_COMPAT=( python3_{6..9} )
40 +
41 +inherit autotools elisp-common python-single-r1 systemd
42 +
43 +if [[ ${PV#9999} != ${PV} ]]; then
44 + inherit git-r3
45 + EGIT_REPO_URI="https://github.com/gluster/glusterfs.git"
46 +else
47 + SRC_URI="https://download.gluster.org/pub/gluster/${PN}/$(ver_cut 1)/${PV}/${P}.tar.gz"
48 + KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
49 +fi
50 +
51 +DESCRIPTION="GlusterFS is a powerful network/cluster filesystem"
52 +HOMEPAGE="https://www.gluster.org/"
53 +
54 +LICENSE="|| ( GPL-2 LGPL-3+ )"
55 +SLOT="0"
56 +IUSE="debug emacs +fuse +georeplication infiniband ipv6 libressl +libtirpc rsyslog static-libs +syslog test vim-syntax +xml"
57 +
58 +REQUIRED_USE="georeplication? ( ${PYTHON_REQUIRED_USE} )
59 + ipv6? ( libtirpc )"
60 +
61 +# the tests must be run as root
62 +RESTRICT="test"
63 +
64 +# sys-apps/util-linux is required for libuuid
65 +RDEPEND="
66 + acct-group/gluster
67 + acct-user/gluster
68 + dev-libs/libaio
69 + dev-libs/userspace-rcu:=
70 + net-libs/rpcsvc-proto
71 + sys-apps/util-linux
72 + sys-libs/readline:=
73 + emacs? ( >=app-editors/emacs-23.1:* )
74 + fuse? ( >=sys-fs/fuse-2.7.0:0 )
75 + georeplication? ( ${PYTHON_DEPS} )
76 + infiniband? ( sys-fabric/libibverbs:* sys-fabric/librdmacm:* )
77 + xml? ( dev-libs/libxml2 )
78 + !elibc_glibc? ( sys-libs/argp-standalone )
79 + libtirpc? ( net-libs/libtirpc:= )
80 + !libtirpc? ( elibc_glibc? ( sys-libs/glibc[rpc(-)] ) )
81 + !libressl? ( dev-libs/openssl:=[-bindist] )
82 + libressl? ( dev-libs/libressl:= )
83 +"
84 +DEPEND="
85 + ${RDEPEND}
86 + sys-devel/bison
87 + sys-devel/flex
88 + virtual/acl
89 + test? ( >=dev-util/cmocka-1.0.1
90 + app-benchmarks/dbench
91 + dev-vcs/git
92 + net-fs/nfs-utils
93 + virtual/perl-Test-Harness
94 + dev-libs/yajl
95 + sys-fs/xfsprogs
96 + sys-apps/attr )
97 +"
98 +BDEPEND="
99 + virtual/pkgconfig
100 +"
101 +
102 +SITEFILE="50${PN}-mode-gentoo.el"
103 +
104 +DOCS=( AUTHORS ChangeLog NEWS README.md THANKS )
105 +
106 +# Maintainer notes:
107 +# * The build system will always configure & build argp-standalone but it'll never use it
108 +# if the argp.h header is found in the system. Which should be the case with
109 +# glibc or if argp-standalone is installed.
110 +
111 +pkg_setup() {
112 + python_setup "python3*"
113 + python-single-r1_pkg_setup
114 +}
115 +
116 +src_prepare() {
117 + default
118 +
119 + # https://bugs.gentoo.org/705536
120 + # https://bugzilla.redhat.com/show_bug.cgi?id=1793990
121 + eapply "${FILESDIR}/glusterfs-6.7-fix-seek.patch"
122 +
123 + # build rpc-transport and xlators only once as shared libs
124 + find rpc/rpc-transport xlators -name Makefile.am |
125 + xargs sed -i 's|.*$(top_srcdir).*\.sym|\0 -shared|' || die
126 +
127 + # fix execution permissions
128 + chmod +x libglusterfs/src/gen-defaults.py || die
129 +
130 + eautoreconf
131 +}
132 +
133 +src_configure() {
134 + econf \
135 + --disable-fusermount \
136 + $(use_enable debug) \
137 + $(use_enable fuse fuse-client) \
138 + $(use_enable georeplication) \
139 + $(use_enable infiniband ibverbs) \
140 + $(use_enable static-libs static) \
141 + $(use_enable syslog) \
142 + $(use_enable test cmocka) \
143 + $(use_enable xml xml-output) \
144 + $(use libtirpc || echo --without-libtirpc) \
145 + $(use ipv6 && echo --with-ipv6-default) \
146 + --with-tmpfilesdir="${EPREFIX}"/etc/tmpfiles.d \
147 + --localstatedir="${EPREFIX}"/var
148 +}
149 +
150 +src_compile() {
151 + default
152 + use emacs && elisp-compile extras/glusterfs-mode.el
153 +}
154 +
155 +src_install() {
156 + default
157 +
158 + rm \
159 + "${ED}"/etc/glusterfs/glusterfs-{georep-,}logrotate \
160 + "${ED}"/etc/glusterfs/gluster-rsyslog-*.conf \
161 + "${ED}"/usr/share/doc/${PF}/glusterfs{-mode.el,.vim} || die "removing false files failed"
162 +
163 + insinto /etc/logrotate.d
164 + newins "${FILESDIR}"/glusterfs.logrotate glusterfs
165 +
166 + if use rsyslog ; then
167 + insinto /etc/rsyslog.d
168 + newins extras/gluster-rsyslog-7.2.conf 60-gluster.conf
169 + fi
170 +
171 + if use emacs ; then
172 + elisp-install ${PN} extras/glusterfs-mode.el*
173 + elisp-site-file-install "${FILESDIR}/${SITEFILE}"
174 + fi
175 +
176 + if use vim-syntax ; then
177 + insinto /usr/share/vim/vimfiles/ftdetect; doins "${FILESDIR}"/${PN}.vim
178 + insinto /usr/share/vim/vimfiles/syntax; doins extras/${PN}.vim
179 + fi
180 +
181 + # insert some other tools which might be useful
182 + insinto /usr/share/glusterfs/scripts
183 + doins \
184 + extras/backend-{cleanup,xattr-sanitize}.sh \
185 + extras/clear_xattrs.sh \
186 + extras/migrate-unify-to-distribute.sh
187 +
188 + # correct permissions on installed scripts
189 + # fperms 0755 /usr/share/glusterfs/scripts/*.sh
190 + chmod 0755 "${ED}"/usr/share/glusterfs/scripts/*.sh || die
191 +
192 + if use georeplication ; then
193 + # move the gsync-sync-gfid tool to a binary path
194 + # and set a symlink to be compliant with all other distros
195 + mv "${ED}"/usr/{share/glusterfs/scripts/gsync-sync-gfid,libexec/glusterfs/} || die
196 + dosym ../../../libexec/glusterfs/gsync-sync-gfid /usr/share/glusterfs/scripts/gsync-sync-gfid
197 + fi
198 +
199 + newinitd "${FILESDIR}/${PN}-r1.initd" glusterfsd
200 + newinitd "${FILESDIR}/glusterd-r3.initd" glusterd
201 + newconfd "${FILESDIR}/${PN}.confd" glusterfsd
202 +
203 + keepdir /var/log/${PN}
204 + keepdir /var/lib/glusterd/{events,glusterfind/.keys}
205 +
206 + # QA
207 + rm -r "${ED}/var/run/" || die
208 + if ! use static-libs; then
209 + find "${D}" -type f -name '*.la' -delete || die
210 + fi
211 +}
212 +
213 +src_test() {
214 + ./run-tests.sh || die
215 +}
216 +
217 +pkg_postinst() {
218 + elog "Starting with ${PN}-3.1.0, you can use the glusterd daemon to configure your"
219 + elog "volumes dynamically. To do so, simply use the gluster CLI after running:"
220 + elog " /etc/init.d/glusterd start"
221 + echo
222 + elog "For static configurations, the glusterfsd startup script can be multiplexed."
223 + elog "The default startup script uses /etc/conf.d/glusterfsd to configure the"
224 + elog "separate service. To create additional instances of the glusterfsd service"
225 + elog "simply create a symlink to the glusterfsd startup script."
226 + echo
227 + elog "Example:"
228 + elog " # ln -s glusterfsd /etc/init.d/glusterfsd2"
229 + elog " # ${EDITOR} /etc/glusterfs/glusterfsd2.vol"
230 + elog "You can now treat glusterfsd2 like any other service"
231 + echo
232 + ewarn "You need to use a ntp client to keep the clocks synchronized across all"
233 + ewarn "of your servers. Setup a NTP synchronizing service before attempting to"
234 + ewarn "run GlusterFS."
235 + echo
236 + elog "If you are upgrading from a previous version of ${PN}, please read:"
237 + elog " http://docs.gluster.org/en/latest/Upgrade-Guide/upgrade_to_$(ver_cut '1-2')/"
238 +
239 + use emacs && elisp-site-regen
240 +}
241 +
242 +pkg_postrm() {
243 + use emacs && elisp-site-regen
244 +}