1 |
commit: bbe740704477875c80a724ad69f0c8dcd1540861 |
2 |
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Oct 22 13:16:07 2017 +0000 |
4 |
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Oct 22 14:16:43 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bbe74070 |
7 |
|
8 |
sys-cluster/glusterfs: Bump to 3.12.2, EAPI 6, fix #616760, and more |
9 |
|
10 |
* Fix URLs. |
11 |
* Prefix fixes. |
12 |
* Migration away from autotools-utils.eclass. |
13 |
* Create user and group for statedumps. |
14 |
* Use upstream tmpfiles.d file. |
15 |
* Fix poisoned sysmacros.h issue (#616760). |
16 |
|
17 |
Package-Manager: Portage-2.3.8, Repoman-2.3.2 |
18 |
Closes: https://bugs.gentoo.org/631392 |
19 |
|
20 |
sys-cluster/glusterfs/Manifest | 1 + |
21 |
sys-cluster/glusterfs/files/glusterd-r3.initd | 32 ++++ |
22 |
.../glusterfs-3.12.2-poisoned-sysmacros.patch | 11 ++ |
23 |
.../files/glusterfs-3.12.2-silent_rules.patch | 22 +++ |
24 |
sys-cluster/glusterfs/glusterfs-3.12.2.ebuild | 213 +++++++++++++++++++++ |
25 |
5 files changed, 279 insertions(+) |
26 |
|
27 |
diff --git a/sys-cluster/glusterfs/Manifest b/sys-cluster/glusterfs/Manifest |
28 |
index 4b45438299d..75b7af89fac 100644 |
29 |
--- a/sys-cluster/glusterfs/Manifest |
30 |
+++ b/sys-cluster/glusterfs/Manifest |
31 |
@@ -1,4 +1,5 @@ |
32 |
DIST glusterfs-3.10.1.tar.gz 8926368 SHA256 d3c23df3299964efe6b688c94ddde258506ecf173b58e8c07fa18d470bb21517 SHA512 35acf10d37db7ca9cf7d88e4eabcac4febdccfe15cbe68df86c44042987547f3a56447a1ced5ed238d171efdbcb97dd1fc6917283641bdcd7d476deb37ad0871 WHIRLPOOL 7ce3b5cbe136b1d09b4c0c062decf0d9c5bba03f9b7249648e886ceff758061e73863c9f6d82ed2de3fc41546950ee08c022683174283dc03201c12d61d295aa |
33 |
+DIST glusterfs-3.12.2.tar.gz 9404275 SHA256 6f9fbf8183df9e012a2c95f3ac3fad303443218beef4fd060f4af57c0bdbc069 SHA512 2bcb3e9356964ea8557ea4291cf6b641122c58a3beb59c00de0acb6772b05b22c0610db4f2bde2e506e15233cfa610db415c6622933e04600ddee3cc55b01166 WHIRLPOOL e788f65be5a3b9965ae485a1d273c2890d89fcff705490c040192fc549580e051e3208e0d2ccdc8dc9350c1e57b188a39a1690751dee1201ef032ca71d514871 |
34 |
DIST glusterfs-3.6.5.tar.gz 6091408 SHA256 20d912ef35fb8350c50c39c15134a3558ee90d012203f049799c8eb67a61fd2a SHA512 7ca41855239818fc4c84cdb86e1f1d39502e781d5117a5ee50ea134f03f0823a8640ee9bda28f05463e8504aba9ddb12ac72e118f0ce7c3755c083033f5677ca WHIRLPOOL 9fc0592052d976d65fcc769c69d910fa6d909695162bccf80c1e799a2c54c531ab03a4afd3788951c231a214a22e5f8bb3613a83277858627425b86fd532ab5e |
35 |
DIST glusterfs-3.7.4.tar.gz 7552110 SHA256 f98f448117d1de7666ae425eddd8d7d87b02c57f6627234ce96ba60566f47173 SHA512 f9a281f3a37835f9f54679740ddb19b307babe576a8f14c9ef24d256f483789c227d7e7c5b0ed4ef5c13a257bcf00d0c17b6108fa60c5e45d0175df6e236b3a5 WHIRLPOOL 7b0320936de078234228cb691f3e381da3cc89c638d6246aba63695aa36cb114afca6e53d12d23de441b8da0b3a594ac1702b450d5d14720254af73e689c4ab8 |
36 |
DIST glusterfs-3.8.11.tar.gz 8544971 SHA256 2285c02f9449168eabeaa7b72706e80f3de659eb685293dd899c71c33798702e SHA512 61cadc567a73403c78eac5e472aadd1457053be936042ea1218c172760376b026152e84b4ca15a0c249524347d434cc7d35c3a73f4d0b01e89c6aec5edcbbb49 WHIRLPOOL 21d4c2da1d281cb03181c21385a62d74c71f24936d2c33da22085accb5fa563b7095757b7df3eb30bf865c37fe683c420756c542d6933c99c0d3f9025c07a217 |
37 |
|
38 |
diff --git a/sys-cluster/glusterfs/files/glusterd-r3.initd b/sys-cluster/glusterfs/files/glusterd-r3.initd |
39 |
new file mode 100644 |
40 |
index 00000000000..27682d06216 |
41 |
--- /dev/null |
42 |
+++ b/sys-cluster/glusterfs/files/glusterd-r3.initd |
43 |
@@ -0,0 +1,32 @@ |
44 |
+#!/sbin/openrc-run |
45 |
+# Copyright 1999-2015 Gentoo Foundation |
46 |
+# Distributed under the terms of the GNU General Public License v2 |
47 |
+ |
48 |
+description="Gluster elastic volume management daemon" |
49 |
+command="/usr/sbin/glusterd" |
50 |
+pidfile="/var/run/${SVCNAME}.pid" |
51 |
+command_args="-N" |
52 |
+ |
53 |
+command_background="yes" |
54 |
+ |
55 |
+depend() { |
56 |
+ need net |
57 |
+ before netmount |
58 |
+} |
59 |
+ |
60 |
+start_pre() { |
61 |
+ # Ensure that the GlusterFS auxiliary mount parent directory exists |
62 |
+ checkpath --directory --owner gluster:gluster --mode 0775 /var/run/gluster |
63 |
+} |
64 |
+ |
65 |
+start_post() { |
66 |
+ local c=0 |
67 |
+ ebegin "Waiting for glusterd to start up" |
68 |
+ while ! /usr/sbin/gluster volume list &>/dev/null && [ "${c}" -lt "${glusterd_max_wait_start-60}" ]; do |
69 |
+ (( ++c )) |
70 |
+ done |
71 |
+ [ "${c}" -lt "${glusterd_max_wait_start-60}" ] |
72 |
+ eend $? |
73 |
+ |
74 |
+ return 0 |
75 |
+} |
76 |
|
77 |
diff --git a/sys-cluster/glusterfs/files/glusterfs-3.12.2-poisoned-sysmacros.patch b/sys-cluster/glusterfs/files/glusterfs-3.12.2-poisoned-sysmacros.patch |
78 |
new file mode 100644 |
79 |
index 00000000000..34153516374 |
80 |
--- /dev/null |
81 |
+++ b/sys-cluster/glusterfs/files/glusterfs-3.12.2-poisoned-sysmacros.patch |
82 |
@@ -0,0 +1,11 @@ |
83 |
+diff --git a/libglusterfs/src/compat.h b/libglusterfs/src/compat.h |
84 |
+index 1d0ac27e8..b1a7c0a93 100644 |
85 |
+--- a/libglusterfs/src/compat.h |
86 |
++++ b/libglusterfs/src/compat.h |
87 |
+@@ -510,6 +510,7 @@ int gf_mkostemp (char *tmpl, int suffixlen, int flags); |
88 |
+ /* Use run API, see run.h */ |
89 |
+ #include <stdlib.h> /* system(), mkostemp() */ |
90 |
+ #include <stdio.h> /* popen() */ |
91 |
++#include <sys/sysmacros.h> |
92 |
+ #pragma GCC poison system mkostemp popen |
93 |
+ #endif |
94 |
|
95 |
diff --git a/sys-cluster/glusterfs/files/glusterfs-3.12.2-silent_rules.patch b/sys-cluster/glusterfs/files/glusterfs-3.12.2-silent_rules.patch |
96 |
new file mode 100644 |
97 |
index 00000000000..d5e2727aa8d |
98 |
--- /dev/null |
99 |
+++ b/sys-cluster/glusterfs/files/glusterfs-3.12.2-silent_rules.patch |
100 |
@@ -0,0 +1,22 @@ |
101 |
+--- a/configure.ac 2017-08-30 13:46:34.075359703 +0100 |
102 |
++++ b/configure.ac 2017-09-07 21:28:48.110879291 +0100 |
103 |
+@@ -19,19 +19,6 @@ |
104 |
+ #but libglusterfs fails to build with contrib (Then are not set up that way?) |
105 |
+ #AM_INIT_AUTOMAKE([subdir-objects]) |
106 |
+ |
107 |
+-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES(yes)]) |
108 |
+- |
109 |
+-if make --help 2>&1 | grep -q no-print-directory; then |
110 |
+- AM_MAKEFLAGS="$AM_MAKEFLAGS --no-print-directory"; |
111 |
+-fi |
112 |
+- |
113 |
+-if make --help 2>&1 | grep -q quiet; then |
114 |
+- AM_MAKEFLAGS="$AM_MAKEFLAGS --quiet" |
115 |
+-fi |
116 |
+- |
117 |
+-if libtool --help 2>&1 | grep -q quiet; then |
118 |
+- AM_LIBTOOLFLAGS="--quiet"; |
119 |
+-fi |
120 |
+ |
121 |
+ AC_CONFIG_HEADERS([config.h site.h]) |
122 |
+ |
123 |
|
124 |
diff --git a/sys-cluster/glusterfs/glusterfs-3.12.2.ebuild b/sys-cluster/glusterfs/glusterfs-3.12.2.ebuild |
125 |
new file mode 100644 |
126 |
index 00000000000..3811ea410c4 |
127 |
--- /dev/null |
128 |
+++ b/sys-cluster/glusterfs/glusterfs-3.12.2.ebuild |
129 |
@@ -0,0 +1,213 @@ |
130 |
+# Copyright 1999-2017 Gentoo Foundation |
131 |
+# Distributed under the terms of the GNU General Public License v2 |
132 |
+ |
133 |
+EAPI=6 |
134 |
+ |
135 |
+PYTHON_COMPAT=( python2_7 ) |
136 |
+ |
137 |
+inherit autotools elisp-common python-single-r1 systemd user versionator |
138 |
+ |
139 |
+DESCRIPTION="GlusterFS is a powerful network/cluster filesystem" |
140 |
+HOMEPAGE="https://www.gluster.org/" |
141 |
+SRC_URI="https://download.gluster.org/pub/gluster/${PN}/$(get_version_component_range '1-2')/${PV}/${P}.tar.gz" |
142 |
+ |
143 |
+LICENSE="|| ( GPL-2 LGPL-3+ )" |
144 |
+SLOT="0" |
145 |
+KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86" |
146 |
+IUSE="bd-xlator crypt-xlator debug emacs +fuse +georeplication glupy infiniband qemu-block rsyslog static-libs +syslog systemtap test +tiering vim-syntax +xml" |
147 |
+ |
148 |
+REQUIRED_USE="georeplication? ( ${PYTHON_REQUIRED_USE} ) |
149 |
+ glupy? ( ${PYTHON_REQUIRED_USE} )" |
150 |
+ |
151 |
+# the tests must be run as root |
152 |
+RESTRICT="test" |
153 |
+ |
154 |
+# sys-apps/util-linux is required for libuuid |
155 |
+RDEPEND="bd-xlator? ( sys-fs/lvm2 ) |
156 |
+ emacs? ( virtual/emacs ) |
157 |
+ fuse? ( >=sys-fs/fuse-2.7.0:0 ) |
158 |
+ georeplication? ( ${PYTHON_DEPS} ) |
159 |
+ infiniband? ( sys-fabric/libibverbs:* sys-fabric/librdmacm:* ) |
160 |
+ qemu-block? ( dev-libs/glib:2 ) |
161 |
+ systemtap? ( dev-util/systemtap ) |
162 |
+ tiering? ( dev-db/sqlite:3 ) |
163 |
+ xml? ( dev-libs/libxml2 ) |
164 |
+ sys-libs/readline:= |
165 |
+ dev-libs/libaio |
166 |
+ dev-libs/openssl:=[-bindist] |
167 |
+ dev-libs/userspace-rcu:= |
168 |
+ || ( sys-libs/glibc sys-libs/argp-standalone ) |
169 |
+ sys-apps/util-linux" |
170 |
+DEPEND="${RDEPEND} |
171 |
+ virtual/acl |
172 |
+ virtual/pkgconfig |
173 |
+ sys-devel/bison |
174 |
+ sys-devel/flex |
175 |
+ test? ( >=dev-util/cmocka-1.0.1 |
176 |
+ app-benchmarks/dbench |
177 |
+ dev-vcs/git |
178 |
+ net-fs/nfs-utils |
179 |
+ virtual/perl-Test-Harness |
180 |
+ dev-libs/yajl |
181 |
+ sys-fs/xfsprogs |
182 |
+ sys-apps/attr )" |
183 |
+ |
184 |
+SITEFILE="50${PN}-mode-gentoo.el" |
185 |
+ |
186 |
+PATCHES=( |
187 |
+ "${FILESDIR}/${PN}-3.12.2-poisoned-sysmacros.patch" |
188 |
+ "${FILESDIR}/${PN}-3.12.2-silent_rules.patch" |
189 |
+) |
190 |
+ |
191 |
+DOCS=( AUTHORS ChangeLog NEWS README.md THANKS ) |
192 |
+ |
193 |
+# Maintainer notes: |
194 |
+# * The build system will always configure & build argp-standalone but it'll never use it |
195 |
+# if the argp.h header is found in the system. Which should be the case with |
196 |
+# glibc or if argp-standalone is installed. |
197 |
+ |
198 |
+pkg_setup() { |
199 |
+ python_setup "python2*" |
200 |
+ python-single-r1_pkg_setup |
201 |
+ |
202 |
+ # Needed for statedumps |
203 |
+ # https://github.com/gluster/glusterfs/commit/0e50c4b3ea734456c14e2d7a578463999bd332c3 |
204 |
+ enewgroup gluster |
205 |
+ enewuser gluster -1 -1 "${EPREFIX}"/var/run/gluster gluster |
206 |
+} |
207 |
+ |
208 |
+src_prepare() { |
209 |
+ default |
210 |
+ |
211 |
+ # build rpc-transport and xlators only once as shared libs |
212 |
+ find rpc/rpc-transport xlators -name Makefile.am | |
213 |
+ xargs sed -i 's|.*$(top_srcdir).*\.sym|\0 -shared|' || die |
214 |
+ |
215 |
+ # fix execution permissions |
216 |
+ chmod +x libglusterfs/src/gen-defaults.py || die |
217 |
+ |
218 |
+ eautoreconf |
219 |
+} |
220 |
+ |
221 |
+src_configure() { |
222 |
+ econf \ |
223 |
+ --disable-dependency-tracking \ |
224 |
+ --disable-silent-rules \ |
225 |
+ --disable-fusermount \ |
226 |
+ $(use_enable debug) \ |
227 |
+ $(use_enable bd-xlator) \ |
228 |
+ $(use_enable crypt-xlator) \ |
229 |
+ $(use_enable fuse fuse-client) \ |
230 |
+ $(use_enable georeplication) \ |
231 |
+ $(use_enable glupy) \ |
232 |
+ $(use_enable infiniband ibverbs) \ |
233 |
+ $(use_enable qemu-block) \ |
234 |
+ $(use_enable static-libs static) \ |
235 |
+ $(use_enable syslog) \ |
236 |
+ $(use_enable systemtap) \ |
237 |
+ $(use_enable test cmocka) \ |
238 |
+ $(use_enable tiering) \ |
239 |
+ $(use_enable xml xml-output) \ |
240 |
+ --with-tmpfilesdir="${EPREFIX}"/etc/tmpfiles.d \ |
241 |
+ --docdir="${EPREFIX}"/usr/share/doc/${PF} \ |
242 |
+ --localstatedir="${EPREFIX}"/var |
243 |
+} |
244 |
+ |
245 |
+src_compile() { |
246 |
+ default |
247 |
+ use emacs && elisp-compile extras/glusterfs-mode.el |
248 |
+} |
249 |
+ |
250 |
+src_install() { |
251 |
+ default |
252 |
+ |
253 |
+ rm \ |
254 |
+ "${ED}"/etc/glusterfs/glusterfs-{georep-,}logrotate \ |
255 |
+ "${ED}"/etc/glusterfs/gluster-rsyslog-*.conf \ |
256 |
+ "${ED}"/usr/share/doc/${PF}/glusterfs{-mode.el,.vim} || die "removing false files failed" |
257 |
+ |
258 |
+ insinto /etc/logrotate.d |
259 |
+ newins "${FILESDIR}"/glusterfs.logrotate glusterfs |
260 |
+ |
261 |
+ if use rsyslog ; then |
262 |
+ insinto /etc/rsyslog.d |
263 |
+ newins extras/gluster-rsyslog-7.2.conf 60-gluster.conf |
264 |
+ fi |
265 |
+ |
266 |
+ if use emacs ; then |
267 |
+ elisp-install ${PN} extras/glusterfs-mode.el* |
268 |
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}" |
269 |
+ fi |
270 |
+ |
271 |
+ if use vim-syntax ; then |
272 |
+ insinto /usr/share/vim/vimfiles/ftdetect; doins "${FILESDIR}"/${PN}.vim |
273 |
+ insinto /usr/share/vim/vimfiles/syntax; doins extras/${PN}.vim |
274 |
+ fi |
275 |
+ |
276 |
+ # insert some other tools which might be useful |
277 |
+ insinto /usr/share/glusterfs/scripts |
278 |
+ doins \ |
279 |
+ extras/backend-{cleanup,xattr-sanitize}.sh \ |
280 |
+ extras/clear_xattrs.sh \ |
281 |
+ extras/migrate-unify-to-distribute.sh |
282 |
+ |
283 |
+ # correct permissions on installed scripts |
284 |
+ # fperms 0755 /usr/share/glusterfs/scripts/*.sh |
285 |
+ chmod 0755 "${ED}"/usr/share/glusterfs/scripts/*.sh || die |
286 |
+ |
287 |
+ if use georeplication ; then |
288 |
+ # move the gsync-sync-gfid tool to a binary path |
289 |
+ # and set a symlink to be compliant with all other distros |
290 |
+ mv "${ED}"/usr/{share/glusterfs/scripts/gsync-sync-gfid,libexec/glusterfs/} || die |
291 |
+ dosym ../../../libexec/glusterfs/gsync-sync-gfid /usr/share/glusterfs/scripts/gsync-sync-gfid |
292 |
+ fi |
293 |
+ |
294 |
+ newinitd "${FILESDIR}/${PN}-r1.initd" glusterfsd |
295 |
+ newinitd "${FILESDIR}/glusterd-r3.initd" glusterd |
296 |
+ newconfd "${FILESDIR}/${PN}.confd" glusterfsd |
297 |
+ |
298 |
+ keepdir /var/log/${PN} |
299 |
+ keepdir /var/lib/glusterd |
300 |
+ |
301 |
+ # QA |
302 |
+ rm -r "${ED}/var/run/" || die |
303 |
+ if ! use static-libs; then |
304 |
+ find "${D}" -type f -name '*.la' -delete || die |
305 |
+ fi |
306 |
+ |
307 |
+ # fix all shebang for python2 #560750 |
308 |
+ python_fix_shebang "${ED}" |
309 |
+} |
310 |
+ |
311 |
+src_test() { |
312 |
+ ./run-tests.sh || die |
313 |
+} |
314 |
+ |
315 |
+pkg_postinst() { |
316 |
+ elog "Starting with ${PN}-3.1.0, you can use the glusterd daemon to configure your" |
317 |
+ elog "volumes dynamically. To do so, simply use the gluster CLI after running:" |
318 |
+ elog " /etc/init.d/glusterd start" |
319 |
+ echo |
320 |
+ elog "For static configurations, the glusterfsd startup script can be multiplexed." |
321 |
+ elog "The default startup script uses /etc/conf.d/glusterfsd to configure the" |
322 |
+ elog "separate service. To create additional instances of the glusterfsd service" |
323 |
+ elog "simply create a symlink to the glusterfsd startup script." |
324 |
+ echo |
325 |
+ elog "Example:" |
326 |
+ elog " # ln -s glusterfsd /etc/init.d/glusterfsd2" |
327 |
+ elog " # ${EDITOR} /etc/glusterfs/glusterfsd2.vol" |
328 |
+ elog "You can now treat glusterfsd2 like any other service" |
329 |
+ echo |
330 |
+ ewarn "You need to use a ntp client to keep the clocks synchronized across all" |
331 |
+ ewarn "of your servers. Setup a NTP synchronizing service before attempting to" |
332 |
+ ewarn "run GlusterFS." |
333 |
+ echo |
334 |
+ elog "If you are upgrading from a previous version of ${PN}, please read:" |
335 |
+ elog " http://docs.gluster.org/en/latest/Upgrade-Guide/upgrade_to_$(get_version_component_range '1-2')/" |
336 |
+ |
337 |
+ use emacs && elisp-site-regen |
338 |
+} |
339 |
+ |
340 |
+pkg_postrm() { |
341 |
+ use emacs && elisp-site-regen |
342 |
+} |