1 |
commit: f8bf4ec3380d4dabc612b93f6a0e257c812cadf0 |
2 |
Author: Jaco Kroon <jaco <AT> uls <DOT> co <DOT> za> |
3 |
AuthorDate: Thu Aug 18 16:47:19 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Aug 18 18:42:25 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8bf4ec3 |
7 |
|
8 |
sys-cluster/glusterfs: 10.2-r2 bump to enable USE=uring. |
9 |
|
10 |
Other minor fixes: |
11 |
|
12 |
Closes: https://bugs.gentoo.org/860312 |
13 |
Closes: https://bugs.gentoo.org/860309 |
14 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
15 |
Signed-off-by: Jaco Kroon <jaco <AT> uls.co.za> |
16 |
Closes: https://github.com/gentoo/gentoo/pull/26912 |
17 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
18 |
|
19 |
sys-cluster/glusterfs/files/glusterd-10.2-r2.initd | 32 ++++ |
20 |
sys-cluster/glusterfs/glusterfs-10.2-r2.ebuild | 203 +++++++++++++++++++++ |
21 |
sys-cluster/glusterfs/metadata.xml | 1 + |
22 |
3 files changed, 236 insertions(+) |
23 |
|
24 |
diff --git a/sys-cluster/glusterfs/files/glusterd-10.2-r2.initd b/sys-cluster/glusterfs/files/glusterd-10.2-r2.initd |
25 |
new file mode 100644 |
26 |
index 000000000000..e7e53f3ed9c4 |
27 |
--- /dev/null |
28 |
+++ b/sys-cluster/glusterfs/files/glusterd-10.2-r2.initd |
29 |
@@ -0,0 +1,32 @@ |
30 |
+#!/sbin/openrc-run |
31 |
+# Copyright 1999-2022 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+description="Gluster elastic volume management daemon" |
35 |
+command="/usr/sbin/glusterd" |
36 |
+pidfile="/run/${SVCNAME}.pid" |
37 |
+command_args="-N" |
38 |
+ |
39 |
+command_background="yes" |
40 |
+ |
41 |
+depend() { |
42 |
+ need net |
43 |
+ before netmount |
44 |
+} |
45 |
+ |
46 |
+start_pre() { |
47 |
+ # Ensure that the GlusterFS auxiliary mount parent directory exists |
48 |
+ checkpath --directory --owner gluster:gluster --mode 0775 /run/gluster |
49 |
+} |
50 |
+ |
51 |
+start_post() { |
52 |
+ local c=0 |
53 |
+ ebegin "Waiting for glusterd to start up" |
54 |
+ while ! /usr/sbin/gluster volume list >/dev/null 2>&1 && [ "${c}" -lt "${glusterd_max_wait_start-60}" ]; do |
55 |
+ c=$(( c+1 )) |
56 |
+ done |
57 |
+ [ "${c}" -lt "${glusterd_max_wait_start-60}" ] |
58 |
+ eend $? |
59 |
+ |
60 |
+ return 0 |
61 |
+} |
62 |
|
63 |
diff --git a/sys-cluster/glusterfs/glusterfs-10.2-r2.ebuild b/sys-cluster/glusterfs/glusterfs-10.2-r2.ebuild |
64 |
new file mode 100644 |
65 |
index 000000000000..ef78462da8cb |
66 |
--- /dev/null |
67 |
+++ b/sys-cluster/glusterfs/glusterfs-10.2-r2.ebuild |
68 |
@@ -0,0 +1,203 @@ |
69 |
+# Copyright 1999-2022 Gentoo Authors |
70 |
+# Distributed under the terms of the GNU General Public License v2 |
71 |
+ |
72 |
+EAPI=7 |
73 |
+ |
74 |
+PYTHON_COMPAT=( python3_{8..11} ) |
75 |
+ |
76 |
+inherit autotools elisp-common python-single-r1 tmpfiles systemd |
77 |
+ |
78 |
+DESCRIPTION="GlusterFS is a powerful network/cluster filesystem" |
79 |
+HOMEPAGE="https://www.gluster.org/ https://github.com/gluster/glusterfs/" |
80 |
+SRC_URI="https://download.gluster.org/pub/gluster/${PN}/$(ver_cut 1)/${PV}/${P}.tar.gz" |
81 |
+ |
82 |
+LICENSE="|| ( GPL-2 LGPL-3+ )" |
83 |
+SLOT="0/${PV%%.*}" |
84 |
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86" |
85 |
+ |
86 |
+IUSE="debug emacs +fuse georeplication ipv6 +libtirpc rsyslog static-libs tcmalloc test +uring xml" |
87 |
+ |
88 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE} |
89 |
+ georeplication? ( xml ) |
90 |
+ ipv6? ( libtirpc )" |
91 |
+ |
92 |
+# the tests must be run as root |
93 |
+RESTRICT="test" |
94 |
+ |
95 |
+# sys-apps/util-linux is required for libuuid |
96 |
+RDEPEND=" |
97 |
+ acct-group/gluster |
98 |
+ acct-user/gluster |
99 |
+ dev-libs/libaio |
100 |
+ dev-libs/openssl:=[-bindist(-)] |
101 |
+ net-libs/rpcsvc-proto |
102 |
+ dev-libs/userspace-rcu:= |
103 |
+ sys-apps/util-linux |
104 |
+ sys-libs/readline:= |
105 |
+ !elibc_glibc? ( sys-libs/argp-standalone ) |
106 |
+ emacs? ( >=app-editors/emacs-23.1:* ) |
107 |
+ fuse? ( >=sys-fs/fuse-2.7.0:0 ) |
108 |
+ georeplication? ( ${PYTHON_DEPS} ) |
109 |
+ libtirpc? ( net-libs/libtirpc:= ) |
110 |
+ !libtirpc? ( elibc_glibc? ( sys-libs/glibc[rpc(-)] ) ) |
111 |
+ tcmalloc? ( dev-util/google-perftools ) |
112 |
+ uring? ( sys-libs/liburing:= ) |
113 |
+ xml? ( dev-libs/libxml2 ) |
114 |
+" |
115 |
+DEPEND=" |
116 |
+ ${RDEPEND} |
117 |
+ sys-devel/bison |
118 |
+ sys-devel/flex |
119 |
+ virtual/acl |
120 |
+ test? ( >=dev-util/cmocka-1.0.1 |
121 |
+ app-benchmarks/dbench |
122 |
+ dev-vcs/git |
123 |
+ net-fs/nfs-utils |
124 |
+ virtual/perl-Test-Harness |
125 |
+ dev-libs/yajl |
126 |
+ sys-fs/xfsprogs |
127 |
+ sys-apps/attr ) |
128 |
+" |
129 |
+BDEPEND=" |
130 |
+ virtual/pkgconfig |
131 |
+" |
132 |
+ |
133 |
+SITEFILE="50${PN}-mode-gentoo.el" |
134 |
+ |
135 |
+DOCS=( AUTHORS ChangeLog NEWS README.md THANKS ) |
136 |
+ |
137 |
+QA_PKGCONFIG_VERSION=7.10.2 |
138 |
+ |
139 |
+# Maintainer notes: |
140 |
+# * The build system will always configure & build argp-standalone but it'll never use it |
141 |
+# if the argp.h header is found in the system. Which should be the case with |
142 |
+# glibc or if argp-standalone is installed. |
143 |
+ |
144 |
+pkg_setup() { |
145 |
+ python_setup "python3*" |
146 |
+ python-single-r1_pkg_setup |
147 |
+} |
148 |
+ |
149 |
+src_prepare() { |
150 |
+ default |
151 |
+ |
152 |
+ # build rpc-transport and xlators only once as shared libs |
153 |
+ find rpc/rpc-transport xlators -name Makefile.am -exec \ |
154 |
+ sed -i 's|.*$(top_srcdir).*\.sym|\0 -shared|' {} + || die |
155 |
+ |
156 |
+ # fix execution permissions |
157 |
+ chmod +x libglusterfs/src/gen-defaults.py || die |
158 |
+ |
159 |
+ eautoreconf |
160 |
+} |
161 |
+ |
162 |
+src_configure() { |
163 |
+ econf \ |
164 |
+ --disable-fusermount \ |
165 |
+ --disable-lto \ |
166 |
+ $(use_enable debug) \ |
167 |
+ $(use_enable fuse fuse-client) \ |
168 |
+ $(use_enable georeplication) \ |
169 |
+ $(use_enable static-libs static) \ |
170 |
+ $(use_enable test cmocka) \ |
171 |
+ $(use_enable uring linux-io-uring) \ |
172 |
+ $(use_enable xml xml-output) \ |
173 |
+ $(usex ipv6 --with-ipv6-default "") \ |
174 |
+ $(usex libtirpc "" --without-libtirpc) \ |
175 |
+ $(usex tcmalloc "" --without-tcmalloc) \ |
176 |
+ --with-tmpfilesdir="${EPREFIX}"/usr/lib/tmpfiles.d \ |
177 |
+ --localstatedir="${EPREFIX}"/var |
178 |
+} |
179 |
+ |
180 |
+src_compile() { |
181 |
+ default |
182 |
+ use emacs && elisp-compile extras/glusterfs-mode.el |
183 |
+} |
184 |
+ |
185 |
+src_test() { |
186 |
+ ./run-tests.sh || die |
187 |
+} |
188 |
+ |
189 |
+src_install() { |
190 |
+ default |
191 |
+ |
192 |
+ rm \ |
193 |
+ "${ED}"/etc/glusterfs/glusterfs-{georep-,}logrotate \ |
194 |
+ "${ED}"/etc/glusterfs/gluster-rsyslog-*.conf \ |
195 |
+ "${ED}"/usr/share/doc/${PF}/glusterfs{-mode.el,.vim} || die "removing false files failed" |
196 |
+ |
197 |
+ insinto /etc/logrotate.d |
198 |
+ newins "${FILESDIR}"/glusterfs.logrotate glusterfs |
199 |
+ |
200 |
+ if use rsyslog ; then |
201 |
+ insinto /etc/rsyslog.d |
202 |
+ newins extras/gluster-rsyslog-7.2.conf 60-gluster.conf |
203 |
+ fi |
204 |
+ |
205 |
+ if use emacs ; then |
206 |
+ elisp-install ${PN} extras/glusterfs-mode.el* |
207 |
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}" |
208 |
+ fi |
209 |
+ |
210 |
+ insinto /usr/share/vim/vimfiles/ftdetect; doins "${FILESDIR}"/${PN}.vim |
211 |
+ insinto /usr/share/vim/vimfiles/syntax; doins extras/${PN}.vim |
212 |
+ |
213 |
+ # insert some other tools which might be useful |
214 |
+ insinto /usr/share/glusterfs/scripts |
215 |
+ doins \ |
216 |
+ extras/backend-{cleanup,xattr-sanitize}.sh \ |
217 |
+ extras/clear_xattrs.sh \ |
218 |
+ extras/migrate-unify-to-distribute.sh |
219 |
+ |
220 |
+ # correct permissions on installed scripts |
221 |
+ # fperms 0755 /usr/share/glusterfs/scripts/*.sh |
222 |
+ chmod 0755 "${ED}"/usr/share/glusterfs/scripts/*.sh || die |
223 |
+ |
224 |
+ newinitd "${FILESDIR}/glusterfsd-10.2.initd" glusterfsd |
225 |
+ newinitd "${FILESDIR}/glusterd-10.2-r2.initd" glusterd |
226 |
+ newconfd "${FILESDIR}/${PN}.confd" glusterfsd |
227 |
+ |
228 |
+ keepdir /var/log/${PN} |
229 |
+ keepdir /var/lib/glusterd/{events,glusterfind/.keys} |
230 |
+ |
231 |
+ systemd_dounit extras/systemd/{glusterd,glustereventsd,glusterfssharedstorage,gluster-ta-volume}.service |
232 |
+ |
233 |
+ # QA |
234 |
+ rm -r "${ED}/var/run/" || die |
235 |
+ if ! use static-libs; then |
236 |
+ find "${D}" -type f -name '*.la' -delete || die |
237 |
+ fi |
238 |
+ |
239 |
+ python_optimize "${ED}" |
240 |
+} |
241 |
+ |
242 |
+pkg_postinst() { |
243 |
+ tmpfiles_process gluster.conf |
244 |
+ |
245 |
+ elog "Starting with ${PN}-3.1.0, you can use the glusterd daemon to configure your" |
246 |
+ elog "volumes dynamically. To do so, simply use the gluster CLI after running:" |
247 |
+ elog " /etc/init.d/glusterd start" |
248 |
+ echo |
249 |
+ elog "For static configurations, the glusterfsd startup script can be multiplexed." |
250 |
+ elog "The default startup script uses /etc/conf.d/glusterfsd to configure the" |
251 |
+ elog "separate service. To create additional instances of the glusterfsd service" |
252 |
+ elog "simply create a symlink to the glusterfsd startup script." |
253 |
+ echo |
254 |
+ elog "Example:" |
255 |
+ elog " # ln -s glusterfsd /etc/init.d/glusterfsd2" |
256 |
+ elog " # ${EDITOR} /etc/glusterfs/glusterfsd2.vol" |
257 |
+ elog "You can now treat glusterfsd2 like any other service" |
258 |
+ echo |
259 |
+ ewarn "You need to use a ntp client to keep the clocks synchronized across all" |
260 |
+ ewarn "of your servers. Setup a NTP synchronizing service before attempting to" |
261 |
+ ewarn "run GlusterFS." |
262 |
+ echo |
263 |
+ elog "If you are upgrading from a previous version of ${PN}, please read:" |
264 |
+ elog " http://docs.gluster.org/en/latest/Upgrade-Guide/upgrade_to_$(ver_cut '1-2')/" |
265 |
+ |
266 |
+ use emacs && elisp-site-regen |
267 |
+} |
268 |
+ |
269 |
+pkg_postrm() { |
270 |
+ use emacs && elisp-site-regen |
271 |
+} |
272 |
|
273 |
diff --git a/sys-cluster/glusterfs/metadata.xml b/sys-cluster/glusterfs/metadata.xml |
274 |
index 73cd1d833a48..ec48e5f0ac96 100644 |
275 |
--- a/sys-cluster/glusterfs/metadata.xml |
276 |
+++ b/sys-cluster/glusterfs/metadata.xml |
277 |
@@ -26,5 +26,6 @@ |
278 |
<flag name="ipv6">Use IPv6 by default, requires libtirpc</flag> |
279 |
<flag name="libtirpc">Build against <pkg>net-libs/libtirpc</pkg> for RPC support</flag> |
280 |
<flag name="rsyslog">Install configuration snippet for <pkg>app-admin/rsyslog</pkg></flag> |
281 |
+ <flag name="uring">Control whether or not glusterfs is compiled with uring support or not.</flag> |
282 |
</use> |
283 |
</pkgmetadata> |