commit: b533f66cd77aa9cda886a93c2b88bac4afcba9a5
Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Mon Apr 4 19:19:20 2022 +0000
Commit: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Mon Apr 4 19:32:03 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=b533f66c
app-admin/glance: add 24.0.0, drop 23.0.0
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
app-admin/glance/Manifest | 2 +-
app-admin/glance/files/glance.logrotate | 8 ++++
app-admin/glance/files/glance.sudoers | 3 ++
app-admin/glance/files/glance.tmpfiles | 2 +
.../glance/files/openstack-glance-api.service | 16 +++++++
.../{glance-23.0.0.ebuild => glance-24.0.0.ebuild} | 53 +++++++++++++++-------
6 files changed, 67 insertions(+), 17 deletions(-)
diff --git a/app-admin/glance/Manifest b/app-admin/glance/Manifest
index 53b510110..c368789b8 100644
--- a/app-admin/glance/Manifest
+++ b/app-admin/glance/Manifest
@@ -1 +1 @@
-DIST glance-23.0.0.tar.gz 2095878 BLAKE2B
9c47dc3005828d1d6e8e194d641abea67d1fc05cb4fd76a4f70c8906a036df2c5501984e1f81050e0c8719410b6226a699ead8b91a9ae14a9a5cd491743d3adf
SHA512
97c11c95c8957fece373f009644e192468b0e2f74bd8ed78e5a99c549890a432c96e4a8a85c66bbcdac1278b3a2db1c3b7a01f779cfcf939a830557414f8cc14
+DIST glance-24.0.0.tar.gz 2100290 BLAKE2B
3f9774a1ff30974bf5986b9c64bd3b7aef63427ef75449daf29bd217b8a87d6edc9696e338d5f30abcc289e6d2f7fde25893c619ddd49acf483ebdf765663324
SHA512
a5a9a9d91f14f485cdebe6b2b96a0712b09cfbf2f03b13c3919d597dbef1bd58b0ab2b4aac386c52a25e6059c03d2e1a821b28827b7689c3272cde51d80f3809
diff --git a/app-admin/glance/files/glance.logrotate
b/app-admin/glance/files/glance.logrotate
new file mode 100644
index 000000000..b91cfd32c
--- /dev/null
+++ b/app-admin/glance/files/glance.logrotate
@@ -0,0 +1,8 @@
+/var/log/glance/*.log {
+ daily
+ missingok
+ compress
+ delaycompress
+ notifempty
+ copytruncate
+}
diff --git a/app-admin/glance/files/glance.sudoers
b/app-admin/glance/files/glance.sudoers
new file mode 100644
index 000000000..ebb61440d
--- /dev/null
+++ b/app-admin/glance/files/glance.sudoers
@@ -0,0 +1,3 @@
+Defaults:glance !requiretty
+
+glance ALL = (root) NOPASSWD: /usr/bin/glance-rootwrap
/etc/glance/rootwrap.conf *
diff --git a/app-admin/glance/files/glance.tmpfiles
b/app-admin/glance/files/glance.tmpfiles
new file mode 100644
index 000000000..33619e305
--- /dev/null
+++ b/app-admin/glance/files/glance.tmpfiles
@@ -0,0 +1,2 @@
+d /var/lib/glance 0750 glance glance -
+d /var/log/glance 0750 glance glance -
diff --git a/app-admin/glance/files/openstack-glance-api.service
b/app-admin/glance/files/openstack-glance-api.service
new file mode 100644
index 000000000..841d4e315
--- /dev/null
+++ b/app-admin/glance/files/openstack-glance-api.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=OpenStack Image Service API server
+After=network.target httpd.service memcached.service etcd.service
mysqld.service redis.service rabbitmq.service
+
+[Service]
+LimitNOFILE=131072
+LimitNPROC=131072
+Type=simple
+User=glance
+ExecStart=/usr/bin/glance-api --log-file=/var/log/glance/api.log
+PrivateTmp=true
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/app-admin/glance/glance-23.0.0.ebuild
b/app-admin/glance/glance-24.0.0.ebuild
similarity index 80%
rename from app-admin/glance/glance-23.0.0.ebuild
rename to app-admin/glance/glance-24.0.0.ebuild
index 26203fab4..331a5d544 100644
--- a/app-admin/glance/glance-23.0.0.ebuild
+++ b/app-admin/glance/glance-24.0.0.ebuild
@@ -1,11 +1,11 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_8 )
+PYTHON_COMPAT=( python3_{8..9} )
-inherit distutils-r1
+inherit distutils-r1 systemd tmpfiles
DESCRIPTION="Services for discovering, registering, and retrieving VM images"
HOMEPAGE="
@@ -23,17 +23,6 @@ IUSE="mysql postgres +sqlite +swift"
RDEPEND="
>=dev-python/pbr-3.1.1[${PYTHON_USEDEP}]
>=dev-python/defusedxml-0.6.0[${PYTHON_USEDEP}]
- sqlite? (
- >=dev-python/sqlalchemy-1.0.10[sqlite,${PYTHON_USEDEP}]
- )
- mysql? (
- >=dev-python/pymysql-0.7.6[${PYTHON_USEDEP}]
- >=dev-python/sqlalchemy-1.0.10[${PYTHON_USEDEP}]
- )
- postgres? (
- >=dev-python/psycopg-2.5.0[${PYTHON_USEDEP}]
- >=dev-python/sqlalchemy-1.0.10[${PYTHON_USEDEP}]
- )
>=dev-python/eventlet-0.25.1[${PYTHON_USEDEP}]
>=dev-python/pastedeploy-1.5.0[${PYTHON_USEDEP}]
>=dev-python/routes-2.3.1[${PYTHON_USEDEP}]
@@ -50,16 +39,16 @@ RDEPEND="
>=dev-python/futurist-1.2.0[${PYTHON_USEDEP}]
>=dev-python/taskflow-4.0.0[${PYTHON_USEDEP}]
>=dev-python/keystoneauth-3.4.0[${PYTHON_USEDEP}]
- >=dev-python/keystonemiddleware-5.17.0[${PYTHON_USEDEP}]
+ >=dev-python/keystonemiddleware-5.1.0[${PYTHON_USEDEP}]
>=dev-python/WSME-0.8.0[${PYTHON_USEDEP}]
>=dev-python/prettytable-0.7.1[${PYTHON_USEDEP}]
>=dev-python/paste-2.0.2[${PYTHON_USEDEP}]
>=dev-python/jsonschema-3.2.0[${PYTHON_USEDEP}]
>=dev-python/python-keystoneclient-3.8.0[${PYTHON_USEDEP}]
>=dev-python/pyopenssl-17.1.0[${PYTHON_USEDEP}]
- >=dev-python/six-1.11.0[${PYTHON_USEDEP}]
>=dev-python/oslo-db-5.0.0[${PYTHON_USEDEP}]
>=dev-python/oslo-i18n-5.0.0[${PYTHON_USEDEP}]
+ >=dev-python/oslo-limit-1.4.0[${PYTHON_USEDEP}]
>=dev-python/oslo-log-4.3.0[${PYTHON_USEDEP}]
>=dev-python/oslo-messaging-5.29.0[${PYTHON_USEDEP}]
>=dev-python/oslo-middleware-3.31.0[${PYTHON_USEDEP}]
@@ -74,6 +63,19 @@ RDEPEND="
>=dev-python/iso8601-0.1.11[${PYTHON_USEDEP}]
>=dev-python/os-win-4.0.1[${PYTHON_USEDEP}]
>=dev-python/castellan-0.17.0[${PYTHON_USEDEP}]
+
+ sqlite? (
+ >=dev-python/sqlalchemy-1.0.10[sqlite,${PYTHON_USEDEP}]
+ )
+ mysql? (
+ >=dev-python/pymysql-0.7.6[${PYTHON_USEDEP}]
+ >=dev-python/sqlalchemy-1.0.10[${PYTHON_USEDEP}]
+ )
+ postgres? (
+ >=dev-python/psycopg-2.5.0[${PYTHON_USEDEP}]
+ >=dev-python/sqlalchemy-1.0.10[${PYTHON_USEDEP}]
+ )
+
acct-user/glance
acct-group/glance
"
@@ -108,6 +110,15 @@ REQUIRED_USE="
distutils_enable_tests pytest
+python_compile_all() {
+ oslo-config-generator --config-file
etc/oslo-config-generator/glance-api.conf || die
+ oslo-config-generator --config-file
etc/oslo-config-generator/glance-scrubber.conf || die
+ oslo-config-generator --config-file
etc/oslo-config-generator/glance-cache.conf || die
+ oslo-config-generator --config-file
etc/oslo-config-generator/glance-manage.conf || die
+ oslo-config-generator --config-file
etc/oslo-config-generator/glance-image-import.conf || die
+ oslopolicy-sample-generator
--config-file=etc/glance-policy-generator.conf || die
+}
+
python_prepare_all() {
sed -i '/pysendfile/d' test-requirements.txt || die
sed -i '/^hacking/d' test-requirements.txt || die
@@ -126,6 +137,16 @@ python_install_all() {
keepdir /var/lib/glance/images
keepdir /var/lib/glance/scrubber
+ systemd_dounit "${FILESDIR}/openstack-glance-api.service"
+ newtmpfiles "${FILESDIR}/glance.tmpfiles" glance.conf
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/glance.logrotate" glance
+
+ insinto /etc/sudoers.d
+ insopts -m 0440 -o root -g root
+ newins "${FILESDIR}/glance.sudoers" glance
+
insinto /etc/glance
insopts -m 0640 -o glance -g glance
doins -r etc/*.ini etc/*.conf etc/*.sample etc/*.json etc/meta*