Gentoo Archives: gentoo-commits

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