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: Fri, 20 Aug 2021 10:21:55
Message-Id: 1629454823.b16868490c2e32877cb379d3ddb4245eb8cbfe12.ultrabug@gentoo
1 commit: b16868490c2e32877cb379d3ddb4245eb8cbfe12
2 Author: Jaco Kroon <jaco <AT> uls <DOT> co <DOT> za>
3 AuthorDate: Wed Aug 18 19:47:48 2021 +0000
4 Commit: Alexys Jacob <ultrabug <AT> gentoo <DOT> org>
5 CommitDate: Fri Aug 20 10:20:23 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1686849
7
8 sys-cluster/glusterfs: glusterfs-9.3
9
10 Package-Manager: Portage-3.0.20, Repoman-3.0.2
11 Signed-off-by: Jaco Kroon <jaco <AT> uls.co.za>
12 Closes: https://github.com/gentoo/gentoo/pull/22019
13 Signed-off-by: Alexys Jacob <ultrabug <AT> gentoo.org>
14
15 sys-cluster/glusterfs/Manifest | 1 +
16 sys-cluster/glusterfs/glusterfs-9.3.ebuild | 195 +++++++++++++++++++++++++++++
17 2 files changed, 196 insertions(+)
18
19 diff --git a/sys-cluster/glusterfs/Manifest b/sys-cluster/glusterfs/Manifest
20 index d14904e6601..e898928fc11 100644
21 --- a/sys-cluster/glusterfs/Manifest
22 +++ b/sys-cluster/glusterfs/Manifest
23 @@ -4,3 +4,4 @@ DIST glusterfs-8.4.tar.gz 7833014 BLAKE2B c67f510c655465e9fbecaa7f391531543e37a2
24 DIST glusterfs-8.5.tar.gz 7873397 BLAKE2B 6ababf15fda216c9a47c05859f7123847d711dd5a12e3ec2c5dcf8475f35830c9a32f7b21ad763ab1be59b06f1d93f83acc0cbb8f7635456a3638be73b162aa4 SHA512 e256141a76deb9a255be31422d76b0c81aad4a7e5b166d2be90a79d340ceb811cbff11f469166ef7582f40f58f47fb056aa05aafd4b35f094bf9c21a5c08f3bb
25 DIST glusterfs-9.1.tar.gz 8206207 BLAKE2B dea099eb1d366704010247964c24de404fb09c00a375dde4af30a2af836d3b35689fab91a75268aa01dba45860eb50a6e0572913c059e53fb5799d2302c2f005 SHA512 2c26813f12fed7a0640cc470badc2b83f156b660ef475487a689dca6c3fa407192f4959aeaf7a981969a079cf5d2c7aace85ff818ea6133d5a085d90d226e1da
26 DIST glusterfs-9.2.tar.gz 8212980 BLAKE2B 7fb42186c5d309c357f72e3037fc09d8b15f32770d74173dd4779bab91056d1ceb78a4a651fec2018faf1597357576d41593e9d7b04cf9af7f4742301b284b01 SHA512 34a0a1745029e2fad3c8fc6a044b4e4645f8cf11eddc3c8c8e94cce9733449248c577ce6066bc49010a65121d991daf67766393fe513ac694082f0efa1d4ef95
27 +DIST glusterfs-9.3.tar.gz 8167846 BLAKE2B 119e2c089ef250fafb2b2dfdcf71f40cc25fdda6ac1cbb38a8557a3c206f721227eceadd87b40341e6bf2b32a7cb24996910f45e061f25d193ab2ca4070ddc76 SHA512 0974cf57a6810505f767c490b53201e62bb73ca2fd3c5203d9882dcbe4088c816afb5445ef606d12fb797b1b1fa5e0994f2ea0816577f70e630637668a20f005
28
29 diff --git a/sys-cluster/glusterfs/glusterfs-9.3.ebuild b/sys-cluster/glusterfs/glusterfs-9.3.ebuild
30 new file mode 100644
31 index 00000000000..8bc22e9cba2
32 --- /dev/null
33 +++ b/sys-cluster/glusterfs/glusterfs-9.3.ebuild
34 @@ -0,0 +1,195 @@
35 +# Copyright 1999-2021 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI=7
39 +
40 +PYTHON_COMPAT=( python3_{7..9} )
41 +
42 +inherit autotools elisp-common python-single-r1 tmpfiles
43 +
44 +DESCRIPTION="GlusterFS is a powerful network/cluster filesystem"
45 +HOMEPAGE="https://www.gluster.org/ https://github.com/gluster/glusterfs/"
46 +SRC_URI="https://download.gluster.org/pub/gluster/${PN}/$(ver_cut 1)/${PV}/${P}.tar.gz"
47 +
48 +LICENSE="|| ( GPL-2 LGPL-3+ )"
49 +SLOT="0/${PV%%.*}"
50 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
51 +
52 +IUSE="debug emacs +fuse +georeplication ipv6 +libtirpc rsyslog static-libs +syslog test +xml"
53 +
54 +REQUIRED_USE="georeplication? ( ${PYTHON_REQUIRED_USE} xml )
55 + ipv6? ( libtirpc )"
56 +
57 +# the tests must be run as root
58 +RESTRICT="test"
59 +
60 +# sys-apps/util-linux is required for libuuid
61 +RDEPEND="
62 + acct-group/gluster
63 + acct-user/gluster
64 + dev-libs/libaio
65 + dev-libs/userspace-rcu:=
66 + net-libs/rpcsvc-proto
67 + sys-apps/util-linux
68 + sys-libs/liburing:=
69 + sys-libs/readline:=
70 + emacs? ( >=app-editors/emacs-23.1:* )
71 + fuse? ( >=sys-fs/fuse-2.7.0:0 )
72 + georeplication? ( ${PYTHON_DEPS} )
73 + xml? ( dev-libs/libxml2 )
74 + !elibc_glibc? ( sys-libs/argp-standalone )
75 + libtirpc? ( net-libs/libtirpc:= )
76 + !libtirpc? ( elibc_glibc? ( sys-libs/glibc[rpc(-)] ) )
77 + dev-libs/openssl:=[-bindist(-)]
78 +"
79 +DEPEND="
80 + ${RDEPEND}
81 + sys-devel/bison
82 + sys-devel/flex
83 + virtual/acl
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 +BDEPEND="
94 + virtual/pkgconfig
95 +"
96 +
97 +SITEFILE="50${PN}-mode-gentoo.el"
98 +
99 +DOCS=( AUTHORS ChangeLog NEWS README.md THANKS )
100 +
101 +# Maintainer notes:
102 +# * The build system will always configure & build argp-standalone but it'll never use it
103 +# if the argp.h header is found in the system. Which should be the case with
104 +# glibc or if argp-standalone is installed.
105 +
106 +pkg_setup() {
107 + python_setup "python3*"
108 + python-single-r1_pkg_setup
109 +}
110 +
111 +src_prepare() {
112 + default
113 +
114 + # build rpc-transport and xlators only once as shared libs
115 + find rpc/rpc-transport xlators -name Makefile.am -exec \
116 + sed -i 's|.*$(top_srcdir).*\.sym|\0 -shared|' {} + || die
117 +
118 + # fix execution permissions
119 + chmod +x libglusterfs/src/gen-defaults.py || die
120 +
121 + eautoreconf
122 +}
123 +
124 +src_configure() {
125 + econf \
126 + --disable-fusermount \
127 + $(use_enable debug) \
128 + $(use_enable fuse fuse-client) \
129 + $(use_enable georeplication) \
130 + $(use_enable static-libs static) \
131 + $(use_enable syslog) \
132 + $(use_enable test cmocka) \
133 + $(use_enable xml xml-output) \
134 + $(use libtirpc || echo --without-libtirpc) \
135 + $(use ipv6 && echo --with-ipv6-default) \
136 + --with-tmpfilesdir="${EPREFIX}"/usr/lib/tmpfiles.d \
137 + --localstatedir="${EPREFIX}"/var
138 +}
139 +
140 +src_compile() {
141 + default
142 + use emacs && elisp-compile extras/glusterfs-mode.el
143 +}
144 +
145 +src_test() {
146 + ./run-tests.sh || die
147 +}
148 +
149 +src_install() {
150 + default
151 +
152 + rm \
153 + "${ED}"/etc/glusterfs/glusterfs-{georep-,}logrotate \
154 + "${ED}"/etc/glusterfs/gluster-rsyslog-*.conf \
155 + "${ED}"/usr/share/doc/${PF}/glusterfs{-mode.el,.vim} || die "removing false files failed"
156 +
157 + insinto /etc/logrotate.d
158 + newins "${FILESDIR}"/glusterfs.logrotate glusterfs
159 +
160 + if use rsyslog ; then
161 + insinto /etc/rsyslog.d
162 + newins extras/gluster-rsyslog-7.2.conf 60-gluster.conf
163 + fi
164 +
165 + if use emacs ; then
166 + elisp-install ${PN} extras/glusterfs-mode.el*
167 + elisp-site-file-install "${FILESDIR}/${SITEFILE}"
168 + fi
169 +
170 + insinto /usr/share/vim/vimfiles/ftdetect; doins "${FILESDIR}"/${PN}.vim
171 + insinto /usr/share/vim/vimfiles/syntax; doins extras/${PN}.vim
172 +
173 + # insert some other tools which might be useful
174 + insinto /usr/share/glusterfs/scripts
175 + doins \
176 + extras/backend-{cleanup,xattr-sanitize}.sh \
177 + extras/clear_xattrs.sh \
178 + extras/migrate-unify-to-distribute.sh
179 +
180 + # correct permissions on installed scripts
181 + # fperms 0755 /usr/share/glusterfs/scripts/*.sh
182 + chmod 0755 "${ED}"/usr/share/glusterfs/scripts/*.sh || die
183 +
184 + newinitd "${FILESDIR}/${PN}-r1.initd" glusterfsd
185 + newinitd "${FILESDIR}/glusterd-r4.initd" glusterd
186 + newconfd "${FILESDIR}/${PN}.confd" glusterfsd
187 +
188 + keepdir /var/log/${PN}
189 + keepdir /var/lib/glusterd/{events,glusterfind/.keys}
190 +
191 + # QA
192 + rm -r "${ED}/var/run/" || die
193 + if ! use static-libs; then
194 + find "${D}" -type f -name '*.la' -delete || die
195 + fi
196 +
197 + python_optimize "${ED}"
198 +}
199 +
200 +pkg_postinst() {
201 + tmpfiles_process gluster.conf
202 +
203 + elog "Starting with ${PN}-3.1.0, you can use the glusterd daemon to configure your"
204 + elog "volumes dynamically. To do so, simply use the gluster CLI after running:"
205 + elog " /etc/init.d/glusterd start"
206 + echo
207 + elog "For static configurations, the glusterfsd startup script can be multiplexed."
208 + elog "The default startup script uses /etc/conf.d/glusterfsd to configure the"
209 + elog "separate service. To create additional instances of the glusterfsd service"
210 + elog "simply create a symlink to the glusterfsd startup script."
211 + echo
212 + elog "Example:"
213 + elog " # ln -s glusterfsd /etc/init.d/glusterfsd2"
214 + elog " # ${EDITOR} /etc/glusterfs/glusterfsd2.vol"
215 + elog "You can now treat glusterfsd2 like any other service"
216 + echo
217 + ewarn "You need to use a ntp client to keep the clocks synchronized across all"
218 + ewarn "of your servers. Setup a NTP synchronizing service before attempting to"
219 + ewarn "run GlusterFS."
220 + echo
221 + elog "If you are upgrading from a previous version of ${PN}, please read:"
222 + elog " http://docs.gluster.org/en/latest/Upgrade-Guide/upgrade_to_$(ver_cut '1-2')/"
223 +
224 + use emacs && elisp-site-regen
225 +}
226 +
227 +pkg_postrm() {
228 + use emacs && elisp-site-regen
229 +}