Gentoo Archives: gentoo-commits

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