aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-auth/keystone')
-rw-r--r--sys-auth/keystone/files/openstack-keystone.service13
-rw-r--r--sys-auth/keystone/files/openstack-keystone.sysctl3
-rw-r--r--sys-auth/keystone/keystone-21.0.0-r1.ebuild (renamed from sys-auth/keystone/keystone-21.0.0.ebuild)51
-rw-r--r--sys-auth/keystone/metadata.xml4
4 files changed, 33 insertions, 38 deletions
diff --git a/sys-auth/keystone/files/openstack-keystone.service b/sys-auth/keystone/files/openstack-keystone.service
new file mode 100644
index 000000000..f591c4500
--- /dev/null
+++ b/sys-auth/keystone/files/openstack-keystone.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=OpenStack Identity Service (code-named Keystone)
+After=syslog.target network.target
+
+[Service]
+Type=notify
+NotifyAccess=all
+Restart=always
+User=keystone
+ExecStart=/usr/bin/keystone-all
+
+[Install]
+WantedBy=multi-user.target
diff --git a/sys-auth/keystone/files/openstack-keystone.sysctl b/sys-auth/keystone/files/openstack-keystone.sysctl
new file mode 100644
index 000000000..682c160e0
--- /dev/null
+++ b/sys-auth/keystone/files/openstack-keystone.sysctl
@@ -0,0 +1,3 @@
+# By default, keystone starts a service on IANA-assigned port 35357
+# http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.txt
+net.ipv4.ip_local_reserved_ports = 35357
diff --git a/sys-auth/keystone/keystone-21.0.0.ebuild b/sys-auth/keystone/keystone-21.0.0-r1.ebuild
index b0be04ded..bf0863462 100644
--- a/sys-auth/keystone/keystone-21.0.0.ebuild
+++ b/sys-auth/keystone/keystone-21.0.0-r1.ebuild
@@ -6,7 +6,7 @@ EAPI=8
MYP="${P/_/}"
PYTHON_COMPAT=( python3_{8..9} )
-inherit distutils-r1 tmpfiles
+inherit distutils-r1 optfeature systemd tmpfiles
DESCRIPTION="The Openstack authentication, authorization, and service catalog"
HOMEPAGE="
@@ -20,7 +20,6 @@ S="${WORKDIR}/${MYP}"
KEYWORDS="~amd64"
LICENSE="Apache-2.0"
SLOT="0"
-IUSE="+sqlite ldap memcached mongo mysql postgres"
RDEPEND="
>=dev-python/pbr-2.0.0[${PYTHON_USEDEP}]
@@ -57,33 +56,8 @@ RDEPEND="
>=dev-python/osprofiler-1.4.0[${PYTHON_USEDEP}]
>=dev-python/pytz-2013.6[${PYTHON_USEDEP}]
- ldap? (
- >=dev-python/python-ldap-3.1.0[${PYTHON_USEDEP}]
- >=dev-python/ldappool-2.3.1[${PYTHON_USEDEP}]
- )
- mysql? (
- >=dev-python/pymysql-0.7.6[${PYTHON_USEDEP}]
- >=dev-python/sqlalchemy-1.3.0[${PYTHON_USEDEP}]
- )
- memcached? (
- >=dev-python/python-memcached-1.56[${PYTHON_USEDEP}]
- )
- mongo? (
- >=dev-python/pymongo-3.0.2[${PYTHON_USEDEP}]
- )
- postgres? (
- >=dev-python/psycopg-2.5.0[${PYTHON_USEDEP}]
- >=dev-python/sqlalchemy-1.3.0[${PYTHON_USEDEP}]
- )
- sqlite? (
- >=dev-python/sqlalchemy-1.3.0[sqlite,${PYTHON_USEDEP}]
- )
+ >=dev-python/sqlalchemy-1.3.0[${PYTHON_USEDEP}]
- || (
- www-servers/uwsgi[python,${PYTHON_USEDEP}]
- www-apache/mod_wsgi[${PYTHON_USEDEP}]
- www-servers/gunicorn[${PYTHON_USEDEP}]
- )
acct-user/keystone
acct-group/keystone
"
@@ -101,14 +75,13 @@ BDEPEND="
>=dev-python/testtools-2.2.0[${PYTHON_USEDEP}]
>=dev-python/tempest-17.1.0[${PYTHON_USEDEP}]
>=dev-python/requests-2.14.2[${PYTHON_USEDEP}]
+
+ >=dev-python/python-ldap-3.1.0[${PYTHON_USEDEP}]
+ >=dev-python/ldappool-2.3.1[${PYTHON_USEDEP}]
)
"
PATCHES=( "${FILESDIR}/${P}-no-usr-local-bin.patch" )
-REQUIRED_USE="
- || ( mysql postgres sqlite )
- test? ( ldap )
-"
distutils_enable_tests pytest
@@ -145,6 +118,13 @@ python_install_all() {
insinto /etc/logrotate.d
newins "${FILESDIR}/keystone.logrotate" keystone.conf
+ systemd_dounit "${FILESDIR}/openstack-keystone.service"
+
+ insinto /usr/lib/sysctl.d/
+ newins "${FILESDIR}/openstack-keystone.sysctl" openstack-keystone.conf
+
+ newbin tools/sample_data.sh openstack-keystone-sample-data
+
rm -r "${ED}/usr/etc" || die
}
@@ -156,10 +136,13 @@ pkg_postinst() {
elog "please do it by modifying /etc/ssl/openssl.cnf"
elog "BEFORE issuing the configuration command."
elog "Otherwise default values will be used."
-}
-pkg_postinst() {
tmpfiles_process keystone.conf
+
+ optfeature "ldap" >=dev-python/ldappool-2.3.1 >=dev-python/python-ldap-3.1.0
+ optfeature "memcache" >=dev-python/python-memcached-1.56
+ optfeature "mongodb" >=dev-python/pymongo-3.0.2
+ optfeature "bandit" >=dev-python/bandit-1.1.0
}
pkg_config() {
diff --git a/sys-auth/keystone/metadata.xml b/sys-auth/keystone/metadata.xml
index e27cc1a8b..c204dc60d 100644
--- a/sys-auth/keystone/metadata.xml
+++ b/sys-auth/keystone/metadata.xml
@@ -6,10 +6,6 @@
<email>lssndrbarbieri@gmail.com</email>
<name>Alessandro Barbieri</name>
</maintainer>
- <use>
- <flag name="memcached">Installs dependencies needed for using memcached as a backend</flag>
- <flag name="mongo">Installs dependencies needed for using mongo as a backend</flag>
- </use>
<upstream>
<remote-id type="launchpad">keystone</remote-id>
</upstream>