Gentoo Archives: gentoo-commits

From: Alessandro Barbieri <lssndrbarbieri@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: sys-cluster/cinder/files/, sys-cluster/cinder/
Date: Wed, 30 Mar 2022 10:35:31
Message-Id: 1648635990.e62b628b1801b82f3cf6d9825b8648f55f03f341.Alessandro-Barbieri@gentoo
1 commit: e62b628b1801b82f3cf6d9825b8648f55f03f341
2 Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
3 AuthorDate: Wed Mar 30 09:58:19 2022 +0000
4 Commit: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
5 CommitDate: Wed Mar 30 10:26:30 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=e62b628b
7
8 sys-cluster/cinder: new version
9
10 Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
11
12 sys-cluster/cinder/Manifest | 3 +-
13 sys-cluster/cinder/cinder-17.1.0.ebuild | 192 -------------------
14 sys-cluster/cinder/cinder-20.0.0.0_rc1.ebuild | 207 +++++++++++++++++++++
15 sys-cluster/cinder/files/cinder.logrotate | 8 +
16 sys-cluster/cinder/files/cinder.tmpfile | 1 +
17 .../cinder/files/openstack-cinder-api.service | 14 ++
18 .../cinder/files/openstack-cinder-backup.service | 13 ++
19 .../files/openstack-cinder-scheduler.service | 13 ++
20 .../cinder/files/openstack-cinder-volume.service | 26 +++
21 9 files changed, 283 insertions(+), 194 deletions(-)
22
23 diff --git a/sys-cluster/cinder/Manifest b/sys-cluster/cinder/Manifest
24 index 7ae129be5..8b474a5d9 100644
25 --- a/sys-cluster/cinder/Manifest
26 +++ b/sys-cluster/cinder/Manifest
27 @@ -1,2 +1 @@
28 -DIST cinder-17.1.0.tar.gz 5823116 BLAKE2B 08f8c4e9acdd46d27ad5e35b8602dc7722ff0f08f577183860138f9085f6744abeccf6943d556419cc7584504c3245c19cfd4f17db4164cc8a4c144aa8c112bd SHA512 f3e91945e81e5bb7edefba62050d3750ae5ab870903e55f46e8f0a5d3c140eada1df466d5fcc6623df8ad9688cad3c6519c712494cd20b8cfeb4b992e8f516cc
29 -DIST cinder.conf.sample-17.1.0 186451 BLAKE2B efc75cf3c5e852d411d9c2ed2080eb554a5f81c9b39a2ee9cf44add21842c05ea5b03cc66747da2182d2efc73d83b55323cecd4aa34db99369bf62b5ed1795bc SHA512 ee60a62ec8490a38c995f9c4a9ede8eeec631745bdbc9bc6e1d195370687de5d99aa8754ea017f23e6a9542b987842c7ffd7cf203bfed37f2a7ddbe61a82d517
30 +DIST cinder-20.0.0.0rc1.tar.gz 5948385 BLAKE2B f8f2e2b4b88f4c81db61bc209b1408bf8c49db54b8b89095828d5baf3a1e6789889093ecb29b9494ec580c5878cd2cffcd5930992794d970a7582f190db5c134 SHA512 90e6845d96e896ddf40bd9992e80864a8441a74b265bdf559ada75f0a95af9f3041ee75d16312a9ae3871e35a23719248c7ed879b1511688afb3bf8b09239ab1
31
32 diff --git a/sys-cluster/cinder/cinder-17.1.0.ebuild b/sys-cluster/cinder/cinder-17.1.0.ebuild
33 deleted file mode 100644
34 index ae18e21e1..000000000
35 --- a/sys-cluster/cinder/cinder-17.1.0.ebuild
36 +++ /dev/null
37 @@ -1,192 +0,0 @@
38 -# Copyright 1999-2021 Gentoo Authors
39 -# Distributed under the terms of the GNU General Public License v2
40 -
41 -EAPI=7
42 -
43 -PYTHON_COMPAT=( python3_8 )
44 -DISTUTILS_USE_SETUPTOOLS=rdepend
45 -
46 -inherit distutils-r1 linux-info
47 -
48 -DESCRIPTION="Cinder is the OpenStack Block storage service, a spin out of nova-volumes"
49 -HOMEPAGE="https://launchpad.net/cinder"
50 -
51 -if [[ ${PV} == *9999 ]];then
52 - inherit git-r3
53 - SRC_URI="https://dev.gentoo.org/~prometheanfire/dist/openstack/cinder/victoria/cinder.conf.sample -> cinder.conf.sample-${PV}"
54 - EGIT_REPO_URI="https://github.com/openstack/cinder.git"
55 - EGIT_BRANCH="stable/victoria"
56 -else
57 - SRC_URI="https://dev.gentoo.org/~prometheanfire/dist/openstack/cinder/victoria/cinder.conf.sample -> cinder.conf.sample-${PV}
58 - https://tarballs.openstack.org/${PN}/${P}.tar.gz"
59 - KEYWORDS="~amd64"
60 -fi
61 -
62 -LICENSE="Apache-2.0"
63 -SLOT="0"
64 -IUSE="+api +scheduler +volume infiniband iscsi lvm mysql +memcached postgres rdma sqlite +tcp test +tgt"
65 -RESTRICT="!test? ( test )"
66 -REQUIRED_USE="|| ( mysql postgres sqlite ) iscsi? ( tgt ) infiniband? ( rdma )"
67 -
68 -DEPEND=">=dev-python/pbr-5.4.1[${PYTHON_USEDEP}]
69 - app-admin/sudo"
70 -
71 -# >=dev-python/oauth2client-1.5.0[${PYTHON_USEDEP}] # do not include, upstream depricated
72 -#TODO: remove zstd
73 -RDEPEND="
74 - >=dev-python/pbr-5.4.1[${PYTHON_USEDEP}]
75 - >=dev-python/decorator-4.1.0[${PYTHON_USEDEP}]
76 - >=dev-python/eventlet-0.26.0[${PYTHON_USEDEP}]
77 - >=dev-python/greenlet-0.4.15[${PYTHON_USEDEP}]
78 - >=dev-python/httplib2-0.9.1[${PYTHON_USEDEP}]
79 - >=dev-python/importlib_metadata-1.7.0[${PYTHON_USEDEP}]
80 - >=dev-python/iso8601-0.1.12[${PYTHON_USEDEP}]
81 - >=dev-python/jsonschema-3.2.0[${PYTHON_USEDEP}]
82 - >=dev-python/keystoneauth-3.14.0[${PYTHON_USEDEP}]
83 - >=dev-python/keystonemiddleware-4.21.0[${PYTHON_USEDEP}]
84 - >=dev-python/lxml-4.2.0[${PYTHON_USEDEP}]
85 - >=dev-python/oslo-config-6.11.0[${PYTHON_USEDEP}]
86 - >=dev-python/oslo-concurrency-3.26.0[${PYTHON_USEDEP}]
87 - >=dev-python/oslo-context-2.23.0[${PYTHON_USEDEP}]
88 - >=dev-python/oslo-db-6.0.0[${PYTHON_USEDEP}]
89 - >=dev-python/oslo-log-3.44.0[${PYTHON_USEDEP}]
90 - >=dev-python/oslo-messaging-6.4.0[${PYTHON_USEDEP}]
91 - >=dev-python/oslo-middleware-3.31.0[${PYTHON_USEDEP}]
92 - >=dev-python/oslo-policy-1.44.1[${PYTHON_USEDEP}]
93 - >=dev-python/oslo-privsep-2.3.0[${PYTHON_USEDEP}]
94 - >=dev-python/oslo-reports-1.18.0[${PYTHON_USEDEP}]
95 - >=dev-python/oslo-rootwrap-5.8.0[${PYTHON_USEDEP}]
96 - >=dev-python/oslo-serialization-2.25.0[${PYTHON_USEDEP}]
97 - >=dev-python/oslo-service-2.0.0[${PYTHON_USEDEP}]
98 - >=dev-python/oslo-upgradecheck-0.1.0[${PYTHON_USEDEP}]
99 - >=dev-python/oslo-utils-3.40.2[${PYTHON_USEDEP}]
100 - >=dev-python/oslo-versionedobjects-1.31.2[${PYTHON_USEDEP}]
101 - >=dev-python/osprofiler-1.4.0[${PYTHON_USEDEP}]
102 - >=dev-python/packaging-20.4[${PYTHON_USEDEP}]
103 - >=dev-python/paramiko-2.7.1[${PYTHON_USEDEP}]
104 - >=dev-python/paste-2.0.2[${PYTHON_USEDEP}]
105 - >=dev-python/pastedeploy-1.5.0[${PYTHON_USEDEP}]
106 - >=dev-python/psutil-3.2.2[${PYTHON_USEDEP}]
107 - >=dev-python/pyparsing-2.2.1[${PYTHON_USEDEP}]
108 - >=dev-python/python-barbicanclient-4.9.0[${PYTHON_USEDEP}]
109 - >=dev-python/python-glanceclient-2.15.0[${PYTHON_USEDEP}]
110 - >=dev-python/python-keystoneclient-3.15.0[${PYTHON_USEDEP}]
111 - >=dev-python/python-novaclient-9.1.0[${PYTHON_USEDEP}]
112 - >=dev-python/python-swiftclient-3.2.0[${PYTHON_USEDEP}]
113 - >=dev-python/pytz-2015.7[${PYTHON_USEDEP}]
114 - >=dev-python/requests-2.18.0[${PYTHON_USEDEP}]
115 - !~dev-python/requests-2.20.0[${PYTHON_USEDEP}]
116 - >=dev-python/routes-2.3.1[${PYTHON_USEDEP}]
117 - >=dev-python/taskflow-3.8.0[${PYTHON_USEDEP}]
118 - >=dev-python/rtslib-fb-2.1.65[${PYTHON_USEDEP}]
119 - >=dev-python/six-1.11.0[${PYTHON_USEDEP}]
120 - sqlite? (
121 - >=dev-python/sqlalchemy-1.3.0[sqlite,${PYTHON_USEDEP}]
122 - )
123 - mysql? (
124 - >=dev-python/pymysql-0.7.6[${PYTHON_USEDEP}]
125 - !~dev-python/pymysql-0.7.7[${PYTHON_USEDEP}]
126 - >=dev-python/sqlalchemy-1.3.0[sqlite,${PYTHON_USEDEP}]
127 - )
128 - postgres? (
129 - >=dev-python/psycopg-2.5.0[${PYTHON_USEDEP}]
130 - >=dev-python/sqlalchemy-1.3.0[sqlite,${PYTHON_USEDEP}]
131 - )
132 - >=dev-python/sqlalchemy-migrate-0.13.0[${PYTHON_USEDEP}]
133 - >=dev-python/stevedore-1.31.0[${PYTHON_USEDEP}]
134 - >=dev-python/tabulate-0.8.5[${PYTHON_USEDEP}]
135 - >=dev-python/tenacity-6.1.0[${PYTHON_USEDEP}]
136 - >=dev-python/webob-1.7.1[${PYTHON_USEDEP}]
137 - >=dev-python/oslo-i18n-3.24.0[${PYTHON_USEDEP}]
138 - >=dev-python/oslo-vmware-2.35.0[${PYTHON_USEDEP}]
139 - >=dev-python/os-brick-4.0.1[${PYTHON_USEDEP}]
140 - >=dev-python/os-win-4.2.0[${PYTHON_USEDEP}]
141 - >=dev-python/tooz-1.58.0[${PYTHON_USEDEP}]
142 - >=dev-python/google-api-python-client-1.4.2[${PYTHON_USEDEP}]
143 - >=dev-python/castellan-1.3.0[${PYTHON_USEDEP}]
144 - >=dev-python/cryptography-2.1.4[${PYTHON_USEDEP}]
145 - >=dev-python/cursive-0.2.1[${PYTHON_USEDEP}]
146 - >=dev-python/zstd-1.4.5.0[${PYTHON_USEDEP}]
147 - iscsi? (
148 - tgt? ( sys-block/tgt )
149 - sys-block/open-iscsi
150 - )
151 - lvm? ( sys-fs/lvm2 )
152 - memcached? ( net-misc/memcached )
153 - app-emulation/qemu
154 - sys-fs/sysfsutils
155 - acct-user/cinder
156 - acct-group/cinder"
157 -# qemu is needed for image conversion
158 -
159 -#PATCHES=(
160 -#)
161 -
162 -pkg_pretend() {
163 - linux-info_pkg_setup
164 - CONFIG_CHECK_MODULES=""
165 - if use tcp; then
166 - CONFIG_CHECK_MODULES+="SCSI_ISCSI_ATTRS ISCSI_TCP "
167 - fi
168 - if use rdma; then
169 - CONFIG_CHECK_MODULES+="INFINIBAND_ISER "
170 - fi
171 - if use infiniband; then
172 - CONFIG_CHECK_MODULES+="INFINIBAND_IPOIB INFINIBAND_USER_MAD INFINIBAND_USER_ACCESS"
173 - fi
174 - if linux_config_exists; then
175 - for module in ${CONFIG_CHECK_MODULES}; do
176 - linux_chkconfig_present ${module} || ewarn "${module} needs to be enabled"
177 - done
178 - fi
179 -}
180 -
181 -python_prepare_all() {
182 - sed -i '/^hacking/d' test-requirements.txt || die
183 - # only used for docs
184 - sed -i '/^sphinx-feature-classification/d' requirements.txt || die
185 - distutils-r1_python_prepare_all
186 -}
187 -
188 -python_test() {
189 - # Let's track progress of this # https://bugs.launchpad.net/swift/+bug/1249727
190 - nosetests -I test_wsgi.py cinder/tests/ || die "tests failed under python2.7"
191 -}
192 -
193 -python_install_all() {
194 - distutils-r1_python_install_all
195 - keepdir /etc/cinder
196 - dodir /etc/cinder/rootwrap.d
197 -
198 - for svc in api scheduler volume; do
199 - newinitd "${FILESDIR}/cinder.initd" cinder-${svc}
200 - done
201 -
202 - insinto /etc/cinder
203 - insopts -m0640 -o cinder -g cinder
204 - doins "etc/cinder/api-httpd.conf"
205 - doins "etc/cinder/logging_sample.conf"
206 - doins "etc/cinder/rootwrap.conf"
207 - doins "etc/cinder/api-paste.ini"
208 - doins "etc/cinder/resource_filters.json"
209 - newins "${DISTDIR}/cinder.conf.sample-${PV}" "cinder.conf.sample"
210 - insinto /etc/cinder/rootwrap.d
211 - doins "etc/cinder/rootwrap.d/volume.filters"
212 -
213 - dodir /var/log/cinder
214 - fowners cinder:cinder /var/log/cinder
215 -
216 - #add sudoers definitions for user nova
217 - insinto /etc/sudoers.d/
218 - insopts -m 0440 -o root -g root
219 - newins "${FILESDIR}/cinder.sudoersd" cinder
220 - # stupid python
221 - rm -r "${ED}"/usr/etc
222 -}
223 -
224 -pkg_postinst() {
225 - if use iscsi ; then
226 - elog "Cinder needs tgtd to be installed and running to work with iscsi"
227 - elog "it also needs 'include /var/lib/cinder/volumes/*' in /etc/tgt/targets.conf"
228 - fi
229 -}
230
231 diff --git a/sys-cluster/cinder/cinder-20.0.0.0_rc1.ebuild b/sys-cluster/cinder/cinder-20.0.0.0_rc1.ebuild
232 new file mode 100644
233 index 000000000..8ba86ad84
234 --- /dev/null
235 +++ b/sys-cluster/cinder/cinder-20.0.0.0_rc1.ebuild
236 @@ -0,0 +1,207 @@
237 +# Copyright 1999-2022 Gentoo Authors
238 +# Distributed under the terms of the GNU General Public License v2
239 +
240 +EAPI=8
241 +
242 +MYP="${P/_rc/rc}"
243 +PYTHON_COMPAT=( python3_{8..9} )
244 +
245 +inherit distutils-r1 linux-info systemd tmpfiles
246 +
247 +DESCRIPTION="Cinder is the OpenStack Block storage service, a spin out of nova-volumes"
248 +HOMEPAGE="
249 + https://launchpad.net/cinder
250 + https://opendev.org/openstack/cinder/
251 + https://pypi.org/project/cinder/
252 + https://github.com/openstack/cinder
253 +"
254 +SRC_URI="https://tarballs.openstack.org/${PN}/${MYP}.tar.gz"
255 +KEYWORDS="~amd64"
256 +
257 +LICENSE="Apache-2.0 GPL-2"
258 +SLOT="0"
259 +IUSE="+api +scheduler +volume infiniband iscsi lvm mysql +memcached postgres rdma sqlite +tcp test +tgt"
260 +
261 +# qemu is needed for image conversion
262 +RDEPEND="
263 + >=dev-python/pbr-5.8.0[${PYTHON_USEDEP}]
264 + >=dev-python/decorator-4.4.2[${PYTHON_USEDEP}]
265 + >=dev-python/eventlet-0.30.1[${PYTHON_USEDEP}]
266 + >=dev-python/greenlet-0.4.16[${PYTHON_USEDEP}]
267 + >=dev-python/httplib2-0.18.1[${PYTHON_USEDEP}]
268 + >=dev-python/iso8601-0.1.12[${PYTHON_USEDEP}]
269 + >=dev-python/jsonschema-3.2.0[${PYTHON_USEDEP}]
270 + >=dev-python/keystoneauth-4.2.1[${PYTHON_USEDEP}]
271 + >=dev-python/keystonemiddleware-9.1.0[${PYTHON_USEDEP}]
272 + >=dev-python/lxml-4.5.2[${PYTHON_USEDEP}]
273 + >=dev-python/oauth2client-4.1.3[${PYTHON_USEDEP}]
274 + >=dev-python/oslo-config-8.3.2[${PYTHON_USEDEP}]
275 + >=dev-python/oslo-concurrency-4.5.0[${PYTHON_USEDEP}]
276 + >=dev-python/oslo-context-3.4.0[${PYTHON_USEDEP}]
277 + >=dev-python/oslo-db-11.0.0[${PYTHON_USEDEP}]
278 + >=dev-python/oslo-log-4.6.1[${PYTHON_USEDEP}]
279 + >=dev-python/oslo-messaging-12.5.0[${PYTHON_USEDEP}]
280 + >=dev-python/oslo-middleware-4.1.1[${PYTHON_USEDEP}]
281 + >=dev-python/oslo-policy-3.8.1[${PYTHON_USEDEP}]
282 + >=dev-python/oslo-privsep-2.6.2[${PYTHON_USEDEP}]
283 + >=dev-python/oslo-reports-2.2.0[${PYTHON_USEDEP}]
284 + >=dev-python/oslo-rootwrap-6.2.0[${PYTHON_USEDEP}]
285 + >=dev-python/oslo-serialization-4.2.0[${PYTHON_USEDEP}]
286 + >=dev-python/oslo-service-2.8.0[${PYTHON_USEDEP}]
287 + >=dev-python/oslo-upgradecheck-1.1.1[${PYTHON_USEDEP}]
288 + >=dev-python/oslo-utils-4.12.1[${PYTHON_USEDEP}]
289 + >=dev-python/oslo-versionedobjects-2.3.0[${PYTHON_USEDEP}]
290 + >=dev-python/osprofiler-3.4.0[${PYTHON_USEDEP}]
291 + >=dev-python/packaging-20.4[${PYTHON_USEDEP}]
292 + >=dev-python/paramiko-2.7.2[${PYTHON_USEDEP}]
293 + >=dev-python/paste-3.4.3[${PYTHON_USEDEP}]
294 + >=dev-python/pastedeploy-2.1.0[${PYTHON_USEDEP}]
295 + >=dev-python/psutil-5.7.2[${PYTHON_USEDEP}]
296 + >=dev-python/pyparsing-2.4.7[${PYTHON_USEDEP}]
297 + >=dev-python/python-barbicanclient-5.0.1[${PYTHON_USEDEP}]
298 + >=dev-python/python-glanceclient-3.2.2[${PYTHON_USEDEP}]
299 + >=dev-python/python-keystoneclient-4.1.1[${PYTHON_USEDEP}]
300 + >=dev-python/python-novaclient-17.2.1[${PYTHON_USEDEP}]
301 + >=dev-python/python-swiftclient-3.10.1[${PYTHON_USEDEP}]
302 + >=dev-python/pytz-2020.1[${PYTHON_USEDEP}]
303 + >=dev-python/requests-2.25.1[${PYTHON_USEDEP}]
304 + >=dev-python/routes-2.4.1[${PYTHON_USEDEP}]
305 + >=dev-python/taskflow-4.5.0[${PYTHON_USEDEP}]
306 + >=dev-python/rtslib-fb-2.1.74[${PYTHON_USEDEP}]
307 + >=dev-python/six-1.15.0[${PYTHON_USEDEP}]
308 + >=dev-python/sqlalchemy-migrate-0.13.0[${PYTHON_USEDEP}]
309 + >=dev-python/stevedore-3.2.2[${PYTHON_USEDEP}]
310 + >=dev-python/tabulate-0.8.7[${PYTHON_USEDEP}]
311 + >=dev-python/tenacity-6.3.1[${PYTHON_USEDEP}]
312 + >=dev-python/webob-1.8.6[${PYTHON_USEDEP}]
313 + >=dev-python/oslo-i18n-5.1.0[${PYTHON_USEDEP}]
314 + >=dev-python/oslo-vmware-3.10.0[${PYTHON_USEDEP}]
315 + >=dev-python/os-brick-5.2.0[${PYTHON_USEDEP}]
316 + >=dev-python/os-win-5.5.0[${PYTHON_USEDEP}]
317 + >=dev-python/tooz-2.7.1[${PYTHON_USEDEP}]
318 + >=dev-python/google-api-python-client-1.11.0[${PYTHON_USEDEP}]
319 + >=dev-python/castellan-3.7.0[${PYTHON_USEDEP}]
320 + >=dev-python/cryptography-3.1[${PYTHON_USEDEP}]
321 + >=dev-python/cursive-0.2.2[${PYTHON_USEDEP}]
322 + >=dev-python/zstd-1.4.5.1[${PYTHON_USEDEP}]
323 + >=dev-python/boto3-1.16.51[${PYTHON_USEDEP}]
324 +
325 + iscsi? (
326 + tgt? ( sys-block/tgt )
327 + sys-block/open-iscsi
328 + )
329 + lvm? ( sys-fs/lvm2 )
330 + memcached? ( net-misc/memcached )
331 + mysql? (
332 + >=dev-python/pymysql-0.7.6[${PYTHON_USEDEP}]
333 + >=dev-python/sqlalchemy-1.4.23[${PYTHON_USEDEP}]
334 + )
335 + sqlite? (
336 + >=dev-python/sqlalchemy-1.4.23[sqlite,${PYTHON_USEDEP}]
337 + )
338 + postgres? (
339 + >=dev-python/psycopg-2.5.0[${PYTHON_USEDEP}]
340 + >=dev-python/sqlalchemy-1.4.23[${PYTHON_USEDEP}]
341 + )
342 +
343 + acct-user/cinder
344 + acct-group/cinder
345 + app-emulation/qemu
346 + sys-fs/sysfsutils
347 +"
348 +DEPEND="
349 + ${RDEPEND}
350 + app-admin/sudo
351 +"
352 +BDEPEND="
353 + test? (
354 + >=dev-python/ddt-1.4.4[${PYTHON_USEDEP}]
355 + >=dev-python/fixtures-3.0.0[${PYTHON_USEDEP}]
356 + >=dev-python/oslotest-4.5.0[${PYTHON_USEDEP}]
357 + >=dev-python/testtools-2.4.0[${PYTHON_USEDEP}]
358 + )
359 +"
360 +
361 +RESTRICT="!test? ( test )"
362 +REQUIRED_USE="
363 + || ( mysql postgres sqlite )
364 + iscsi? ( tgt )
365 + infiniband? ( rdma )
366 + test? ( mysql postgres )
367 +"
368 +
369 +pkg_pretend() {
370 + linux-info_pkg_setup
371 + CONFIG_CHECK_MODULES=""
372 + if use tcp; then
373 + CONFIG_CHECK_MODULES+="SCSI_ISCSI_ATTRS ISCSI_TCP "
374 + fi
375 + if use rdma; then
376 + CONFIG_CHECK_MODULES+="INFINIBAND_ISER "
377 + fi
378 + if use infiniband; then
379 + CONFIG_CHECK_MODULES+="INFINIBAND_IPOIB INFINIBAND_USER_MAD INFINIBAND_USER_ACCESS"
380 + fi
381 + if linux_config_exists; then
382 + for module in ${CONFIG_CHECK_MODULES}; do
383 + linux_chkconfig_present ${module} || ewarn "${module} needs to be enabled"
384 + done
385 + fi
386 +}
387 +
388 +python_prepare_all() {
389 + sed -i '/^hacking/d' test-requirements.txt || die
390 + # only used for docs
391 + sed -i '/^sphinx-feature-classification/d' requirements.txt || die
392 + distutils-r1_python_prepare_all
393 +}
394 +
395 +python_compile_all() {
396 + oslo-config-generator --config-file=tools/config/cinder-config-generator.conf || die
397 + oslopolicy-sample-generator --config-file=tools/config/cinder-policy-generator.conf || die
398 +}
399 +
400 +python_install_all() {
401 + distutils-r1_python_install_all
402 + keepdir /etc/cinder
403 + dodir /etc/cinder/rootwrap.d
404 +
405 + for svc in api backup scheduler volume; do
406 + newinitd "${FILESDIR}/cinder.initd" "cinder-${svc}"
407 + systemd_dounit "${FILESDIR}/openstack-cinder-${svc}.service"
408 + done
409 +
410 + insinto /etc/cinder
411 + insopts -m 0640 -o cinder -g cinder
412 + doins "etc/cinder/api-httpd.conf"
413 + doins "etc/cinder/logging_sample.conf"
414 + doins "etc/cinder/rootwrap.conf"
415 + doins "etc/cinder/api-paste.ini"
416 + doins "etc/cinder/resource_filters.json"
417 + doins "etc/cinder/cinder.conf.sample"
418 + doins "etc/cinder/policy.yaml.sample"
419 + insinto /etc/cinder/rootwrap.d
420 + doins "etc/cinder/rootwrap.d/volume.filters"
421 +
422 + dodir /var/log/cinder
423 + fowners cinder:cinder /var/log/cinder
424 +
425 + #add sudoers definitions for user cinder
426 + insinto /etc/sudoers.d/
427 + insopts -m 0440 -o root -g root
428 + newins "${FILESDIR}/cinder.sudoersd" cinder
429 +
430 + newtmpfiles "${FILESDIR}/cinder.tmpfile" cinder.conf
431 +
432 + insinto /etc/logrotate.d
433 + newins "${FILESDIR}/cinder.logrotate" cinder.conf
434 +
435 + rm -r "${ED}/usr/etc"
436 +}
437 +
438 +pkg_postinst() {
439 + if use iscsi ; then
440 + elog "Cinder needs tgtd to be installed and running to work with iscsi"
441 + elog "it also needs 'include /var/lib/cinder/volumes/*' in /etc/tgt/targets.conf"
442 + fi
443 +}
444
445 diff --git a/sys-cluster/cinder/files/cinder.logrotate b/sys-cluster/cinder/files/cinder.logrotate
446 new file mode 100644
447 index 000000000..f96b1b8bb
448 --- /dev/null
449 +++ b/sys-cluster/cinder/files/cinder.logrotate
450 @@ -0,0 +1,8 @@
451 +/var/log/cinder/*.log {
452 + daily
453 + missingok
454 + compress
455 + delaycompress
456 + notifempty
457 + copytruncate
458 +}
459
460 diff --git a/sys-cluster/cinder/files/cinder.tmpfile b/sys-cluster/cinder/files/cinder.tmpfile
461 new file mode 100644
462 index 000000000..cb4b3167d
463 --- /dev/null
464 +++ b/sys-cluster/cinder/files/cinder.tmpfile
465 @@ -0,0 +1 @@
466 +d /run/cinder 0755 cinder cinder -
467
468 diff --git a/sys-cluster/cinder/files/openstack-cinder-api.service b/sys-cluster/cinder/files/openstack-cinder-api.service
469 new file mode 100644
470 index 000000000..a3c890a0b
471 --- /dev/null
472 +++ b/sys-cluster/cinder/files/openstack-cinder-api.service
473 @@ -0,0 +1,14 @@
474 +[Unit]
475 +Description=OpenStack Cinder API Server
476 +After=syslog.target network.target
477 +
478 +[Service]
479 +Type=simple
480 +User=cinder
481 +ExecStart=/usr/bin/cinder-api --config-file /usr/share/cinder/cinder-dist.conf --config-file /etc/cinder/cinder.conf --logfile /var/log/cinder/api.log
482 +Restart=on-failure
483 +KillMode=process
484 +
485 +[Install]
486 +WantedBy=multi-user.target
487 +
488
489 diff --git a/sys-cluster/cinder/files/openstack-cinder-backup.service b/sys-cluster/cinder/files/openstack-cinder-backup.service
490 new file mode 100644
491 index 000000000..39d38773f
492 --- /dev/null
493 +++ b/sys-cluster/cinder/files/openstack-cinder-backup.service
494 @@ -0,0 +1,13 @@
495 +[Unit]
496 +Description=OpenStack Cinder Backup Server
497 +After=syslog.target network.target
498 +
499 +[Service]
500 +Type=simple
501 +User=cinder
502 +ExecStart=/usr/bin/cinder-backup --config-file /usr/share/cinder/cinder-dist.conf --config-file /etc/cinder/cinder.conf --logfile /var/log/cinder/backup.log
503 +Restart=on-failure
504 +
505 +[Install]
506 +WantedBy=multi-user.target
507 +
508
509 diff --git a/sys-cluster/cinder/files/openstack-cinder-scheduler.service b/sys-cluster/cinder/files/openstack-cinder-scheduler.service
510 new file mode 100644
511 index 000000000..806208192
512 --- /dev/null
513 +++ b/sys-cluster/cinder/files/openstack-cinder-scheduler.service
514 @@ -0,0 +1,13 @@
515 +[Unit]
516 +Description=OpenStack Cinder Scheduler Server
517 +After=syslog.target network.target
518 +
519 +[Service]
520 +Type=simple
521 +User=cinder
522 +ExecStart=/usr/bin/cinder-scheduler --config-file /usr/share/cinder/cinder-dist.conf --config-file /etc/cinder/cinder.conf --logfile /var/log/cinder/scheduler.log
523 +Restart=on-failure
524 +
525 +[Install]
526 +WantedBy=multi-user.target
527 +
528
529 diff --git a/sys-cluster/cinder/files/openstack-cinder-volume.service b/sys-cluster/cinder/files/openstack-cinder-volume.service
530 new file mode 100644
531 index 000000000..6b7dc8700
532 --- /dev/null
533 +++ b/sys-cluster/cinder/files/openstack-cinder-volume.service
534 @@ -0,0 +1,26 @@
535 +[Unit]
536 +Description=OpenStack Cinder Volume Server
537 +After=syslog.target
538 +After=network.target
539 +After=target.service
540 +After=iscsi.service
541 +After=iscsid.service
542 +After=lvm-cinder.service
543 +Requires=lvm-cinder.service
544 +Wants=lvm-cinder.service
545 +Wants=target.service
546 +Wants=iscsi.service
547 +Wants=iscsid.service
548 +
549 +[Service]
550 +LimitNOFILE=131072
551 +LimitNPROC=131072
552 +Type=simple
553 +User=cinder
554 +ExecStart=/usr/bin/cinder-volume --config-file /usr/share/cinder/cinder-dist.conf --config-file /etc/cinder/cinder.conf --logfile /var/log/cinder/volume.log
555 +Restart=on-failure
556 +KillMode=process
557 +
558 +[Install]
559 +WantedBy=multi-user.target
560 +