Gentoo Archives: gentoo-commits

From: Yixun Lan <dlan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-cluster/ceph/, sys-cluster/ceph/files/
Date: Mon, 21 Dec 2015 07:47:38
Message-Id: 1450683945.c93f06ce2ecec595db4759cc11b29d5a1f0164bc.dlan@gentoo
1 commit: c93f06ce2ecec595db4759cc11b29d5a1f0164bc
2 Author: Yixun Lan <dlan <AT> gentoo <DOT> org>
3 AuthorDate: Mon Dec 21 06:23:04 2015 +0000
4 Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
5 CommitDate: Mon Dec 21 07:45:45 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c93f06ce
7
8 sys-cluster/ceph: bump to 9.2.0
9
10 add user/group: ceph
11 now sys-cluster/ceph run in normal user 'ceph' instead of 'root'
12
13 Package-Manager: portage-2.2.26
14
15 sys-cluster/ceph/Manifest | 3 +-
16 sys-cluster/ceph/ceph-0.94.4.ebuild | 159 ---------------------
17 sys-cluster/ceph/ceph-10.0.0.ebuild | 18 ++-
18 .../ceph/{ceph-9.0.3.ebuild => ceph-9.2.0.ebuild} | 20 +--
19 sys-cluster/ceph/ceph-9999.ebuild | 17 ++-
20 sys-cluster/ceph/files/README.gentoo | 7 +
21 .../ceph/files/ceph-0.87.1-glibc-2.20.patch | 59 --------
22 sys-cluster/ceph/files/ceph-fix-gnustack.patch | 22 ---
23 sys-cluster/ceph/files/ceph-mds_at.service | 12 --
24 sys-cluster/ceph/files/ceph-mon_at.service | 19 ---
25 sys-cluster/ceph/files/ceph-osd_at.service | 13 --
26 sys-cluster/ceph/files/ceph.initd-r1 | 8 +-
27 12 files changed, 50 insertions(+), 307 deletions(-)
28
29 diff --git a/sys-cluster/ceph/Manifest b/sys-cluster/ceph/Manifest
30 index a4df18b..ea635f0 100644
31 --- a/sys-cluster/ceph/Manifest
32 +++ b/sys-cluster/ceph/Manifest
33 @@ -1,5 +1,4 @@
34 DIST ceph-0.80.10.tar.bz2 4136018 SHA256 a7ca8a3d0710ab88adcd5c52aebe0a8ee573e247c1ccf5d84eea8a9ff07a51fa SHA512 7823a489b7654457512d300050410b4a91d615fbb467d341c76e76b77364d6a2afa763bceb2c6cd8ed05a45d7b0aef4c3baf80155cc3223e940b439e0571f3c9 WHIRLPOOL a03fc3a4ca8c49157ff3b51528418ca62c3520c4141e402863cf3475a11b240be5297f731bf1a4e77a01a476e80f5e06c0722d688fbb8ad2db26ef1975a450da
35 -DIST ceph-0.94.4.tar.bz2 7082496 SHA256 09b3a134c4eb06f770a72769d2aec3900c2c7f1d25092f93b0e8e73ab17e577c SHA512 3ae714d110d63717e7e49d07ac5523cbbd06b8fa140b842576f6afea780aec2408ccd053c109bf5e011018ff1c544366113e83e09ea79925e32d46e7360317ab WHIRLPOOL 8b53fb0410e6168d6385360005b29b919d7d4f255e06cc874fcbb35f1dc5566c0e97bbce50ec7ea2da479a0f068bf254abec474d155186085d500a0f4ea9eb01
36 DIST ceph-0.94.5.tar.bz2 7084809 SHA256 7658bec8cf6e6c8f5ceb1e85116c4df2582c497ae686295abebc6fc82ec79211 SHA512 8bf57eceda37ec058bd7b9cf98ba0eda11c361156da4cea0aa99a3059d61fc2120ebb27f1bb07bae42e13836b57a5db8f3888401481e9125780a6df21ca90529 WHIRLPOOL cfedf299f86e19ff87615e851e4639d4045c0e26756d8896498e2e6eb8304808bc78837ec68b01936abd7fd2563aafe973109ba72d66b368304c38e38fc680f5
37 DIST ceph-10.0.0.tar.gz 10429823 SHA256 fd92052e0de135e1f35ea2add44b5b8add28a2a8235639d69c33cced06a4a357 SHA512 f0e36bf83c97d1dc0328fbba96897e583c6d29b11dc54ea7fa0186ffaa1cf4d26519f336083825d64dda70bd290dc45bd6f3f17ff67ada33322caee5f2f3ce07 WHIRLPOOL f443ab25ab8f89455d76f509f215b55519f9338d3b9daec318b097de4dffff7009a01521da0d963c4b5549485b6aebca1c0a705746cf2e64fef8e9f5e66676cf
38 -DIST ceph-9.0.3.tar.bz2 7082795 SHA256 98ad66b35d3747d56e04fcf32a5387b765f86f43c6f09393fe9c7f17e4ae5418 SHA512 fdaebf26076490394229ef1716278ae82e6397651e25b911553db9f93b0d7ba8849320d770aef1363952e7c8e672616f5e61523fc4b79642fe81f1d2d71c4225 WHIRLPOOL cc11218246efe1d1f0a095ddc3466eacc64ffd032093cc0642a420ed9eb7fdd956b25693cc46e2dace216a6ec577c1c4d26457cf86f0319fe71c5a1125342128
39 +DIST ceph-9.2.0.tar.bz2 7663088 SHA256 706d33e097b4489a75cfaff8d835e05d91df6dac5cdd3a32a57404f0522dbdbb SHA512 d462f2e4696873552b232f0b89bcda8ddb0cddeab89cbab58e99eb068acb082a42cb558898bd4dee66239df64d15992cfd1c1158217b2ce60a465e1761bcea78 WHIRLPOOL d016b873a26afef4816921e5b9cbaae3ba4c9ece6683e3d60b1f689ab7dcc285bc386963e83b410a66a313cc953b7d0d9baa427b3b3eb12697daa08f3a5a6a18
40
41 diff --git a/sys-cluster/ceph/ceph-0.94.4.ebuild b/sys-cluster/ceph/ceph-0.94.4.ebuild
42 deleted file mode 100644
43 index 1a2b052..0000000
44 --- a/sys-cluster/ceph/ceph-0.94.4.ebuild
45 +++ /dev/null
46 @@ -1,159 +0,0 @@
47 -# Copyright 1999-2015 Gentoo Foundation
48 -# Distributed under the terms of the GNU General Public License v2
49 -# $Id$
50 -
51 -EAPI=5
52 -PYTHON_COMPAT=( python2_7 )
53 -
54 -if [[ $PV = *9999* ]]; then
55 - scm_eclass=git-r3
56 - EGIT_REPO_URI="
57 - git://github.com/ceph/ceph.git
58 - https://github.com/ceph/ceph.git"
59 - SRC_URI=""
60 -else
61 - SRC_URI="http://ceph.com/download/${P}.tar.bz2"
62 -fi
63 -KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
64 -
65 -inherit check-reqs autotools eutils multilib python-single-r1 udev readme.gentoo systemd ${scm_eclass}
66 -
67 -DESCRIPTION="Ceph distributed filesystem"
68 -HOMEPAGE="http://ceph.com/"
69 -
70 -LICENSE="LGPL-2.1"
71 -SLOT="0"
72 -IUSE="babeltrace cryptopp debug fuse gtk libatomic +libaio lttng +nss radosgw static-libs jemalloc tcmalloc xfs zfs"
73 -
74 -CDEPEND="
75 - app-arch/snappy
76 - dev-libs/boost:=[threads]
77 - dev-libs/fcgi
78 - dev-libs/libaio
79 - dev-libs/libedit
80 - dev-libs/leveldb[snappy]
81 - nss? ( dev-libs/nss )
82 - cryptopp? ( dev-libs/crypto++ )
83 - sys-apps/keyutils
84 - sys-apps/util-linux
85 - dev-libs/libxml2
86 - babeltrace? ( dev-util/babeltrace )
87 - fuse? ( sys-fs/fuse )
88 - libatomic? ( dev-libs/libatomic_ops )
89 - xfs? ( sys-fs/xfsprogs )
90 - zfs? ( sys-fs/zfs )
91 - gtk? (
92 - x11-libs/gtk+:2
93 - dev-cpp/gtkmm:2.4
94 - gnome-base/librsvg
95 - )
96 - radosgw? (
97 - dev-libs/fcgi
98 - dev-libs/expat
99 - net-misc/curl
100 - )
101 - jemalloc? ( dev-libs/jemalloc )
102 - !jemalloc? ( dev-util/google-perftools )
103 - lttng? ( dev-util/lttng-ust )
104 - ${PYTHON_DEPS}
105 - "
106 -DEPEND="${CDEPEND}
107 - virtual/pkgconfig"
108 -RDEPEND="${CDEPEND}
109 - sys-apps/hdparm
110 - dev-python/flask[${PYTHON_USEDEP}]
111 - dev-python/requests[${PYTHON_USEDEP}]
112 - "
113 -REQUIRED_USE="
114 - ${PYTHON_REQUIRED_USE}
115 - ^^ ( nss cryptopp )
116 - ?? ( jemalloc tcmalloc )
117 - "
118 -
119 -STRIP_MASK="/usr/lib*/rados-classes/*"
120 -
121 -PATCHES=(
122 - "${FILESDIR}"/${PN}-0.79-libzfs.patch
123 -)
124 -CHECKREQS_DISK_BUILD="1400M"
125 -
126 -pkg_setup() {
127 - python_setup
128 -}
129 -
130 -src_prepare() {
131 - [[ ${PATCHES[@]} ]] && epatch "${PATCHES[@]}"
132 -
133 - epatch_user
134 - eautoreconf
135 -}
136 -
137 -src_configure() {
138 - local myeconfargs=(
139 - --without-hadoop
140 - --docdir="${EPREFIX}/usr/share/doc/${PF}"
141 - --includedir=/usr/include
142 - $(use_with debug)
143 - $(use_with fuse)
144 - $(use_with libaio)
145 - $(use_with libatomic libatomic-ops)
146 - $(use_with nss)
147 - $(use_with cryptopp)
148 - $(use_with radosgw)
149 - $(use_with gtk gtk2)
150 - $(use_enable static-libs static)
151 - $(use_with jemalloc)
152 - $(use_with xfs libxfs)
153 - $(use_with zfs libzfs)
154 - --without-kinetic
155 - --without-librocksdb
156 - $(use_with lttng )
157 - $(use_with babeltrace)
158 - )
159 -
160 - use jemalloc || \
161 - myeconfargs+=( $(usex tcmalloc " --with-tcmalloc" " --with-tcmalloc-minimal") )
162 -
163 - PYTHON="${EPYTHON}" \
164 - econf "${myeconfargs[@]}"
165 -}
166 -
167 -src_install() {
168 - default
169 -
170 - prune_libtool_files --all
171 -
172 - exeinto /usr/$(get_libdir)/ceph
173 - newexe src/init-ceph ceph_init.sh
174 -
175 - insinto /etc/logrotate.d/
176 - newins "${FILESDIR}"/ceph.logrotate ${PN}
177 -
178 - chmod 644 "${ED}"/usr/share/doc/${PF}/sample.*
179 -
180 - keepdir /var/lib/${PN}
181 - keepdir /var/lib/${PN}/tmp
182 - keepdir /var/log/${PN}/stat
183 -
184 - newinitd "${FILESDIR}/rbdmap.initd" rbdmap
185 - newinitd "${FILESDIR}/${PN}.initd-r1" ${PN}
186 - newconfd "${FILESDIR}/${PN}.confd-r1" ${PN}
187 -
188 - systemd_dounit "${FILESDIR}/ceph.target"
189 - systemd_newunit "${FILESDIR}/ceph-mds_at.service" "ceph-mds@.service"
190 - systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" "ceph-mds@.service"
191 - systemd_newunit "${FILESDIR}/ceph-osd_at.service" "ceph-osd@.service"
192 - systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" "ceph-osd@.service"
193 - systemd_newunit "${FILESDIR}/ceph-mon_at.service" "ceph-mon@.service"
194 - systemd_install_serviced "${FILESDIR}/ceph-mon_at.service.conf" "ceph-mon@.service"
195 -
196 - python_fix_shebang \
197 - "${ED}"/usr/sbin/{ceph-disk,ceph-create-keys} \
198 - "${ED}"/usr/bin/{ceph,ceph-rest-api}
199 -
200 - #install udev rules
201 - udev_dorules udev/50-rbd.rules
202 - udev_dorules udev/95-ceph-osd.rules
203 -
204 - readme.gentoo_create_doc
205 -}
206
207 diff --git a/sys-cluster/ceph/ceph-10.0.0.ebuild b/sys-cluster/ceph/ceph-10.0.0.ebuild
208 index e2936b9..acb485b 100644
209 --- a/sys-cluster/ceph/ceph-10.0.0.ebuild
210 +++ b/sys-cluster/ceph/ceph-10.0.0.ebuild
211 @@ -16,7 +16,7 @@ else
212 fi
213 KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
214
215 -inherit check-reqs autotools eutils multilib python-single-r1 udev readme.gentoo systemd ${scm_eclass}
216 +inherit check-reqs autotools eutils multilib python-single-r1 udev user readme.gentoo systemd ${scm_eclass}
217
218 DESCRIPTION="Ceph distributed filesystem"
219 HOMEPAGE="http://ceph.com/"
220 @@ -75,7 +75,6 @@ STRIP_MASK="/usr/lib*/rados-classes/*"
221 PATCHES=(
222 "${FILESDIR}"/${PN}-0.79-libzfs.patch
223 )
224 -CHECKREQS_DISK_BUILD="1400M"
225
226 check-reqs_export_vars() {
227 # check-reqs does not support use flags, and there is a lot of variability
228 @@ -93,10 +92,16 @@ check-reqs_export_vars() {
229 fi
230 }
231
232 +user_setup() {
233 + enewgroup ceph
234 + enewuser ceph -1 -1 /var/lib/ceph ceph
235 +}
236 +
237 pkg_setup() {
238 python_setup
239 check-reqs_export_vars
240 check-reqs_pkg_setup
241 + user_setup
242 }
243
244 src_prepare() {
245 @@ -132,6 +137,7 @@ src_configure() {
246 --without-librocksdb
247 $(use_with lttng )
248 $(use_with babeltrace)
249 + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
250 )
251
252 use jemalloc || \
253 @@ -158,21 +164,19 @@ src_install() {
254 keepdir /var/lib/${PN}/tmp
255 keepdir /var/log/${PN}/stat
256
257 + fowners ceph:ceph /var/lib/ceph
258 +
259 newinitd "${FILESDIR}/rbdmap.initd" rbdmap
260 newinitd "${FILESDIR}/${PN}.initd-r1" ${PN}
261 newconfd "${FILESDIR}/${PN}.confd-r1" ${PN}
262
263 - systemd_dounit "${FILESDIR}/ceph.target"
264 - systemd_newunit "${FILESDIR}/ceph-mds_at.service" "ceph-mds@.service"
265 systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" "ceph-mds@.service"
266 - systemd_newunit "${FILESDIR}/ceph-osd_at.service" "ceph-osd@.service"
267 systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" "ceph-osd@.service"
268 - systemd_newunit "${FILESDIR}/ceph-mon_at.service" "ceph-mon@.service"
269 systemd_install_serviced "${FILESDIR}/ceph-mon_at.service.conf" "ceph-mon@.service"
270
271 python_fix_shebang \
272 "${ED}"/usr/sbin/{ceph-disk,ceph-create-keys} \
273 - "${ED}"/usr/bin/{ceph,ceph-rest-api}
274 + "${ED}"/usr/bin/{ceph,ceph-rest-api,ceph-detect-init,ceph-brag}
275
276 #install udev rules
277 udev_dorules udev/50-rbd.rules
278
279 diff --git a/sys-cluster/ceph/ceph-9.0.3.ebuild b/sys-cluster/ceph/ceph-9.2.0.ebuild
280 similarity index 89%
281 rename from sys-cluster/ceph/ceph-9.0.3.ebuild
282 rename to sys-cluster/ceph/ceph-9.2.0.ebuild
283 index c50d81a..434fd90 100644
284 --- a/sys-cluster/ceph/ceph-9.0.3.ebuild
285 +++ b/sys-cluster/ceph/ceph-9.2.0.ebuild
286 @@ -16,7 +16,7 @@ else
287 fi
288 KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
289
290 -inherit check-reqs autotools eutils multilib python-single-r1 udev readme.gentoo systemd ${scm_eclass}
291 +inherit check-reqs autotools eutils multilib python-single-r1 udev user readme.gentoo systemd ${scm_eclass}
292
293 DESCRIPTION="Ceph distributed filesystem"
294 HOMEPAGE="http://ceph.com/"
295 @@ -75,7 +75,6 @@ STRIP_MASK="/usr/lib*/rados-classes/*"
296 PATCHES=(
297 "${FILESDIR}"/${PN}-0.79-libzfs.patch
298 )
299 -CHECKREQS_DISK_BUILD="1400M"
300
301 check-reqs_export_vars() {
302 # check-reqs does not support use flags, and there is a lot of variability
303 @@ -88,15 +87,21 @@ check-reqs_export_vars() {
304 export CHECKREQS_DISK_BUILD="23G"
305 export CHECKREQS_DISK_USR="7G"
306 else
307 - export CHECKREQS_DISK_BUILD="1400M"
308 + export CHECKREQS_DISK_BUILD="9G"
309 export CHECKREQS_DISK_USR="450M"
310 fi
311 }
312
313 +user_setup() {
314 + enewgroup ceph
315 + enewuser ceph -1 -1 /var/lib/ceph ceph
316 +}
317 +
318 pkg_setup() {
319 python_setup
320 check-reqs_export_vars
321 check-reqs_pkg_setup
322 + user_setup
323 }
324
325 src_prepare() {
326 @@ -132,6 +137,7 @@ src_configure() {
327 --without-librocksdb
328 $(use_with lttng )
329 $(use_with babeltrace)
330 + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
331 )
332
333 use jemalloc || \
334 @@ -158,21 +164,19 @@ src_install() {
335 keepdir /var/lib/${PN}/tmp
336 keepdir /var/log/${PN}/stat
337
338 + fowners ceph:ceph /var/lib/ceph
339 +
340 newinitd "${FILESDIR}/rbdmap.initd" rbdmap
341 newinitd "${FILESDIR}/${PN}.initd-r1" ${PN}
342 newconfd "${FILESDIR}/${PN}.confd-r1" ${PN}
343
344 - systemd_dounit "${FILESDIR}/ceph.target"
345 - systemd_newunit "${FILESDIR}/ceph-mds_at.service" "ceph-mds@.service"
346 systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" "ceph-mds@.service"
347 - systemd_newunit "${FILESDIR}/ceph-osd_at.service" "ceph-osd@.service"
348 systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" "ceph-osd@.service"
349 - systemd_newunit "${FILESDIR}/ceph-mon_at.service" "ceph-mon@.service"
350 systemd_install_serviced "${FILESDIR}/ceph-mon_at.service.conf" "ceph-mon@.service"
351
352 python_fix_shebang \
353 "${ED}"/usr/sbin/{ceph-disk,ceph-create-keys} \
354 - "${ED}"/usr/bin/{ceph,ceph-rest-api}
355 + "${ED}"/usr/bin/{ceph,ceph-rest-api,ceph-detect-init,ceph-brag}
356
357 #install udev rules
358 udev_dorules udev/50-rbd.rules
359
360 diff --git a/sys-cluster/ceph/ceph-9999.ebuild b/sys-cluster/ceph/ceph-9999.ebuild
361 index fe924eb..1805e16 100644
362 --- a/sys-cluster/ceph/ceph-9999.ebuild
363 +++ b/sys-cluster/ceph/ceph-9999.ebuild
364 @@ -17,7 +17,7 @@ else
365 KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
366 fi
367
368 -inherit autotools eutils multilib python-any-r1 udev readme.gentoo ${scm_eclass}
369 +inherit autotools eutils multilib python-any-r1 udev user readme.gentoo ${scm_eclass}
370
371 DESCRIPTION="Ceph distributed filesystem"
372 HOMEPAGE="http://ceph.com/"
373 @@ -71,8 +71,14 @@ REQUIRED_USE="
374
375 STRIP_MASK="/usr/lib*/rados-classes/*"
376
377 +user_setup() {
378 + enewgroup ceph
379 + enewuser ceph -1 -1 /var/lib/ceph ceph
380 +}
381 +
382 pkg_setup() {
383 python-any-r1_pkg_setup
384 + user_setup
385 }
386
387 src_prepare() {
388 @@ -99,6 +105,7 @@ src_configure() {
389 $(use_with tcmalloc) \
390 $(use_with xfs libxfs) \
391 $(use_with zfs libzfs)
392 + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
393 }
394
395 src_install() {
396 @@ -118,12 +125,18 @@ src_install() {
397 keepdir /var/lib/${PN}/tmp
398 keepdir /var/log/${PN}/stat
399
400 + fowners ceph:ceph /var/lib/ceph
401 +
402 newinitd "${FILESDIR}/${PN}.initd-r1" ${PN}
403 newconfd "${FILESDIR}/${PN}.confd-r1" ${PN}
404
405 + systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" "ceph-mds@.service"
406 + systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" "ceph-osd@.service"
407 + systemd_install_serviced "${FILESDIR}/ceph-mon_at.service.conf" "ceph-mon@.service"
408 +
409 python_fix_shebang \
410 "${ED}"/usr/sbin/{ceph-disk,ceph-create-keys} \
411 - "${ED}"/usr/bin/{ceph,ceph-rest-api}
412 + "${ED}"/usr/bin/{ceph,ceph-rest-api,ceph-detect-init,ceph-brag}
413
414 #install udev rules
415 udev_dorules udev/50-rbd.rules
416
417 diff --git a/sys-cluster/ceph/files/README.gentoo b/sys-cluster/ceph/files/README.gentoo
418 index b049515..c596120 100644
419 --- a/sys-cluster/ceph/files/README.gentoo
420 +++ b/sys-cluster/ceph/files/README.gentoo
421 @@ -16,3 +16,10 @@
422 net-misc/ntp
423 net-misc/openntpd
424 net-misc/chrony
425 +
426 +4) Starting from version 9.0.x, Ceph daemons run as ‘ceph’ user instead root.
427 + In order to fix this, we suggest to stop ceph daemons, and fix ownership
428 +
429 + chown -R ceph:ceph /var/lib/ceph
430 +
431 + https://ceph.com/releases/v9-2-0-infernalis-released/
432
433 diff --git a/sys-cluster/ceph/files/ceph-0.87.1-glibc-2.20.patch b/sys-cluster/ceph/files/ceph-0.87.1-glibc-2.20.patch
434 deleted file mode 100644
435 index 55a49d7..0000000
436 --- a/sys-cluster/ceph/files/ceph-0.87.1-glibc-2.20.patch
437 +++ /dev/null
438 @@ -1,59 +0,0 @@
439 -From cf2104d4d991361c53f6e2fea93b69de10cd654b Mon Sep 17 00:00:00 2001
440 -From: Federico Simoncelli <fsimonce@××××××.com>
441 -Date: Sat, 15 Nov 2014 14:14:04 +0000
442 -Subject: [PATCH] common: do not unlock rwlock on destruction
443 -
444 -According to pthread_rwlock_unlock(3p):
445 -
446 - Results are undefined if the read-write lock rwlock is not held
447 - by the calling thread.
448 -
449 -and:
450 -
451 - https://sourceware.org/bugzilla/show_bug.cgi?id=17561
452 -
453 - Calling pthread_rwlock_unlock on an rwlock which is not locked
454 - is undefined.
455 -
456 -calling pthread_rwlock_unlock on RWLock destruction could cause
457 -an unknown behavior for two reasons:
458 -
459 -- the lock is acquired by another thread (undefined)
460 -- the lock is not acquired (undefined)
461 -
462 -Moreover since glibc-2.20 calling pthread_rwlock_unlock on a
463 -rwlock that is not locked results in a SIGILL that kills the
464 -application.
465 -
466 -This patch removes the pthread_rwlock_unlock call on destruction
467 -and replaces it with an assertion to check that the RWLock is
468 -not in use.
469 -
470 -Any code that relied on the implicit release is now going to
471 -break the assertion, e.g.:
472 -
473 - {
474 - RWLock l;
475 - l.get(for_write);
476 - } // implicit release, wrong.
477 -
478 -Signed-off-by: Federico Simoncelli <fsimonce@××××××.com>
479 ----
480 - src/common/RWLock.h | 4 +++-
481 - 1 file changed, 3 insertions(+), 1 deletion(-)
482 -
483 -diff --git a/src/common/RWLock.h b/src/common/RWLock.h
484 -index e647e17..6f0ab8e 100644
485 ---- a/src/common/RWLock.h
486 -+++ b/src/common/RWLock.h
487 -@@ -46,7 +46,9 @@ class RWLock
488 - return (nwlock.read() > 0);
489 - }
490 - virtual ~RWLock() {
491 -- pthread_rwlock_unlock(&L);
492 -+ // The following check is racy but we are about to destroy
493 -+ // the object and we assume that there are no other users.
494 -+ assert(!is_locked());
495 - pthread_rwlock_destroy(&L);
496 - }
497 -
498
499 diff --git a/sys-cluster/ceph/files/ceph-fix-gnustack.patch b/sys-cluster/ceph/files/ceph-fix-gnustack.patch
500 deleted file mode 100644
501 index 3e2eace..0000000
502 --- a/sys-cluster/ceph/files/ceph-fix-gnustack.patch
503 +++ /dev/null
504 @@ -1,22 +0,0 @@
505 -diff --git a/src/common/crc32c_intel_fast_asm.S b/src/common/crc32c_intel_fast_asm.S
506 -index 4ca5d65..68d3426 100644
507 ---- a/src/common/crc32c_intel_fast_asm.S
508 -+++ b/src/common/crc32c_intel_fast_asm.S
509 -@@ -662,3 +662,6 @@ global %1_slver
510 - %endmacro
511 - ;;; func core, ver, snum
512 - slversion crc32_iscsi_00, 00, 02, 0014
513 -+#if defined(__linux__) && defined(__ELF__)
514 -+.section .note.GNU-stack,"",%progbits
515 -+#endiF
516 -diff --git a/src/common/crc32c_intel_fast_zero_asm.S b/src/common/crc32c_intel_fast_zero_asm.S
517 -index b7246f2..9728be9 100644
518 ---- a/src/common/crc32c_intel_fast_zero_asm.S
519 -+++ b/src/common/crc32c_intel_fast_zero_asm.S
520 -@@ -644,3 +644,6 @@ global %1_slver
521 - %endmacro
522 - ;;; func core, ver, snum
523 - slversion crc32_iscsi_zero_00, 00, 02, 0014
524 -+#if defined(__linux__) && defined(__ELF__)
525 -+.section .note.GNU-stack,"",%progbits
526 -+#endiF
527
528 diff --git a/sys-cluster/ceph/files/ceph-mds_at.service b/sys-cluster/ceph/files/ceph-mds_at.service
529 deleted file mode 100644
530 index c28604e..0000000
531 --- a/sys-cluster/ceph/files/ceph-mds_at.service
532 +++ /dev/null
533 @@ -1,12 +0,0 @@
534 -[Unit]
535 -Description=Ceph metadata server daemon
536 -After=network-online.target local-fs.target
537 -Wants=network-online.target local-fs.target
538 -PartOf=ceph.target
539 -
540 -[Service]
541 -Environment=CLUSTER=ceph
542 -ExecStart=/usr/bin/ceph-mds -f --cluster ${CLUSTER} --id %i
543 -
544 -[Install]
545 -WantedBy=ceph.target
546
547 diff --git a/sys-cluster/ceph/files/ceph-mon_at.service b/sys-cluster/ceph/files/ceph-mon_at.service
548 deleted file mode 100644
549 index 4f54cc1..0000000
550 --- a/sys-cluster/ceph/files/ceph-mon_at.service
551 +++ /dev/null
552 @@ -1,19 +0,0 @@
553 -[Unit]
554 -Description=Ceph cluster monitor daemon
555 -After=network-online.target
556 -Wants=network-online.target
557 -
558 -# According to:
559 -# http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget
560 -# these can be removed once ceph-mon will dynamically change network
561 -# configuration.
562 -After=network-online.target local-fs.target
563 -Wants=network-online.target local-fs.target
564 -PartOf=ceph.target
565 -
566 -[Service]
567 -Environment=CLUSTER=ceph
568 -ExecStart=/usr/bin/ceph-mon -f --cluster ${CLUSTER} --id %i
569 -
570 -[Install]
571 -WantedBy=ceph.target
572
573 diff --git a/sys-cluster/ceph/files/ceph-osd_at.service b/sys-cluster/ceph/files/ceph-osd_at.service
574 deleted file mode 100644
575 index 7bf125f..0000000
576 --- a/sys-cluster/ceph/files/ceph-osd_at.service
577 +++ /dev/null
578 @@ -1,13 +0,0 @@
579 -[Unit]
580 -Description=Ceph object storage daemon
581 -After=network-online.target local-fs.target
582 -Wants=network-online.target local-fs.target
583 -PartOf=ceph.target
584 -
585 -[Service]
586 -Environment=CLUSTER=ceph
587 -ExecStart=/usr/bin/ceph-osd -f --cluster ${CLUSTER} --id %i
588 -ExecStartPre=/usr/libexec/ceph/ceph-osd-prestart.sh --cluster ${CLUSTER} --id %i
589 -
590 -[Install]
591 -WantedBy=ceph.target
592
593 diff --git a/sys-cluster/ceph/files/ceph.initd-r1 b/sys-cluster/ceph/files/ceph.initd-r1
594 index ca5ab60..7f1558d 100644
595 --- a/sys-cluster/ceph/files/ceph.initd-r1
596 +++ b/sys-cluster/ceph/files/ceph.initd-r1
597 @@ -22,7 +22,7 @@ is_type_valid() {
598 }
599
600 start_pre() {
601 - checkpath -d -q $(dirname ${pidfile})
602 + checkpath -d -q -o ceph $(dirname ${pidfile})
603 }
604
605 start() {
606 @@ -31,18 +31,18 @@ start() {
607 eerror "Please give valid Ceph Server Type: mds, mon, osd"
608 return 1
609 fi
610 - ${command} ${command_args}
611 + start-stop-daemon --start -exec ${command} --user ceph --group ceph -- ${command_args}
612 eend $?
613 }
614
615 stop() {
616 ebegin "Stopping Ceph ${type}.${id}"
617 - start-stop-daemon --stop --pidfile ${pidfile}
618 + start-stop-daemon --stop --user ceph --group ceph --pidfile ${pidfile}
619 eend $?
620 }
621
622 reload() {
623 ebegin "Reloading Ceph ${type}.${id}"
624 - start-stop-daemon --signal 1 --pidfile ${pidfile}
625 + start-stop-daemon --signal 1 --user ceph --group ceph --pidfile ${pidfile}
626 eend $?
627 }