From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5590A138334 for ; Wed, 23 Jan 2019 13:55:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 80DC7E0BE0; Wed, 23 Jan 2019 13:55:36 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4609CE0BDF for ; Wed, 23 Jan 2019 13:55:36 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C73A9335D20 for ; Wed, 23 Jan 2019 13:55:34 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6D6D2522 for ; Wed, 23 Jan 2019 13:55:33 +0000 (UTC) From: "Fabian Groffen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" Message-ID: <1548251559.48520c2867a182b1983a3e75b7024ab8c97b95e2.grobian@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/graphite-web/, net-analyzer/graphite-web/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-analyzer/graphite-web/Manifest net-analyzer/graphite-web/files/graphite-web-1.1.5-fhs-paths.patch net-analyzer/graphite-web/graphite-web-1.1.5.ebuild X-VCS-Directories: net-analyzer/graphite-web/ net-analyzer/graphite-web/files/ X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: 48520c2867a182b1983a3e75b7024ab8c97b95e2 X-VCS-Branch: master Date: Wed, 23 Jan 2019 13:55:33 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: e273ac31-16ea-4de2-baf5-c5aa84ee676f X-Archives-Hash: a8500539898fe6e86ccfb207881b6eea commit: 48520c2867a182b1983a3e75b7024ab8c97b95e2 Author: Fabian Groffen gentoo org> AuthorDate: Wed Jan 23 13:52:23 2019 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Wed Jan 23 13:52:39 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48520c28 net-analyzer/graphite-web: version bump Signed-off-by: Fabian Groffen gentoo.org> Package-Manager: Portage-2.3.51, Repoman-2.3.11 net-analyzer/graphite-web/Manifest | 1 + .../files/graphite-web-1.1.5-fhs-paths.patch | 63 +++++++++++++ .../graphite-web/graphite-web-1.1.5.ebuild | 100 +++++++++++++++++++++ 3 files changed, 164 insertions(+) diff --git a/net-analyzer/graphite-web/Manifest b/net-analyzer/graphite-web/Manifest index 15fe0c57bdd..4f5f75d3c2b 100644 --- a/net-analyzer/graphite-web/Manifest +++ b/net-analyzer/graphite-web/Manifest @@ -1 +1,2 @@ DIST graphite-web-1.1.3.tar.gz 1171342 BLAKE2B f18c84d707f93d897553ec05d7b910a3dba97c6068498d1b216f178ea8a1f64baf59bb572b433a56f5e417a2873c018a38a19c3b8c765f667d7c3fbb38b9ed0a SHA512 3f9de216bd55e4e8de7391087e9b876a16e4f137fd60932a6d5855804c3d9868422645177776258e74486b97ec7a853b63a6d89b1de9b325bcb50ad694208436 +DIST graphite-web-1.1.5.tar.gz 1173809 BLAKE2B 94a1b4deab3159d3bde2d3c8b6f9664f39942cb1b815ce042b196be3c0e769ee1acac4b619135e9471360849308b90e02e1df4f7d6b7d0ef31e46d38ee2425e5 SHA512 b2097609ca77a40e6e7d83a3141335e2208d69e7f4edbac8ce3505ed9dd654589836a3b3498bfb7f7585332bceeb8e367f0c10f3cf6afdb5ad6b96377338a7bb diff --git a/net-analyzer/graphite-web/files/graphite-web-1.1.5-fhs-paths.patch b/net-analyzer/graphite-web/files/graphite-web-1.1.5-fhs-paths.patch new file mode 100644 index 00000000000..4cbbe7213b3 --- /dev/null +++ b/net-analyzer/graphite-web/files/graphite-web-1.1.5-fhs-paths.patch @@ -0,0 +1,63 @@ +Install FHS-style paths + +--- a/conf/graphite.wsgi.example ++++ b/conf/graphite.wsgi.example +@@ -1,4 +1,4 @@ + import sys +-sys.path.append('/opt/graphite/webapp') ++sys.path.append('@GENTOO_PORTAGE_EPREFIX@/usr/share/graphite-web/webapp') + + from graphite.wsgi import application +--- a/setup.py ++++ b/setup.py +@@ -107,8 +107,8 @@ + ], + package_data={'graphite' : + ['templates/*', 'local_settings.py.example']}, +- scripts=glob('bin/*'), +- data_files=list(webapp_content.items()) + storage_dirs + conf_files + examples, ++ scripts=['bin/graphite-web-build-index'], ++ data_files=list(webapp_content.items()), + install_requires=['Django>=1.8,<2.1', 'django-tagging==0.4.3', 'pytz', 'pyparsing', 'cairocffi', 'urllib3', 'scandir', 'six'], + classifiers=[ + 'Intended Audience :: Developers', +--- a/webapp/graphite/local_settings.py.example ++++ b/webapp/graphite/local_settings.py.example +@@ -101,6 +101,7 @@ + # Change only GRAPHITE_ROOT if your install is merely shifted from /opt/graphite + # to somewhere else + #GRAPHITE_ROOT = '/opt/graphite' ++GRAPHITE_ROOT = '@GENTOO_PORTAGE_EPREFIX@/usr/share/graphite-web' + + # Most installs done outside of a separate tree such as /opt/graphite will + # need to change these settings. Note that the default settings for each +@@ -110,6 +111,11 @@ + #STATIC_ROOT = '/opt/graphite/static' + #LOG_DIR = '/opt/graphite/storage/log/webapp' + #INDEX_FILE = '/opt/graphite/storage/index' # Search index file ++CONF_DIR = '@GENTOO_PORTAGE_EPREFIX@/etc/graphite-web' ++STORAGE_DIR = '@GENTOO_PORTAGE_EPREFIX@/var/lib/carbon' ++STATIC_ROOT = '@GENTOO_PORTAGE_EPREFIX@/usr/share/graphite-web/webapp/content' ++LOG_DIR = '@GENTOO_PORTAGE_EPREFIX@/var/log/graphite-web' ++INDEX_FILE = '@GENTOO_PORTAGE_EPREFIX@/var/lib/graphite-web/index' # Search index file + + # To further or fully customize the paths, modify the following. Note that the + # default settings for each of these are relative to CONF_DIR and STORAGE_DIR +@@ -127,6 +133,8 @@ + #CERES_DIR = '/opt/graphite/storage/ceres' + #WHISPER_DIR = '/opt/graphite/storage/whisper' + #RRD_DIR = '/opt/graphite/storage/rrd' ++WHISPER_DIR = '@GENTOO_PORTAGE_EPREFIX@/var/lib/carbon/whisper' ++RRD_DIR = '@GENTOO_PORTAGE_EPREFIX@/var/lib/carbon/rrd' + # + # Data directories using the "Standard" metrics finder (i.e. not Ceres) + #STANDARD_DIRS = [WHISPER_DIR, RRD_DIR] # Default: set from the above variables +@@ -244,7 +244,7 @@ + # + #DATABASES = { + # 'default': { +-# 'NAME': '/opt/graphite/storage/graphite.db', ++# 'NAME': '@GENTOO_PORTAGE_EPREFIX@/var/lib/graphite-web/graphite.db', + # 'ENGINE': 'django.db.backends.sqlite3', + # 'USER': '', + # 'PASSWORD': '', diff --git a/net-analyzer/graphite-web/graphite-web-1.1.5.ebuild b/net-analyzer/graphite-web/graphite-web-1.1.5.ebuild new file mode 100644 index 00000000000..b0cada7cd87 --- /dev/null +++ b/net-analyzer/graphite-web/graphite-web-1.1.5.ebuild @@ -0,0 +1,100 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python{2_7,3_{4,5,6}} ) # 3.7 dropped due to dep-hell + +inherit distutils-r1 python-utils-r1 prefix + +DESCRIPTION="Enterprise scalable realtime graphing" +HOMEPAGE="https://graphiteapp.org/" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+carbon ldap mysql memcached postgres +sqlite" + +DEPEND="" +RDEPEND=" + carbon? ( dev-python/carbon[${PYTHON_USEDEP}] ) + ldap? ( dev-python/python-ldap[${PYTHON_USEDEP}] ) + memcached? ( dev-python/python-memcached[${PYTHON_USEDEP}] ) + mysql? ( + || ( + dev-python/mysql-python[${PYTHON_USEDEP}] + dev-python/mysqlclient[${PYTHON_USEDEP}] + ) + ) + postgres? ( dev-python/psycopg:2[${PYTHON_USEDEP}] ) + >=dev-python/django-1.8[sqlite?,${PYTHON_USEDEP}] + =dev-python/django-tagging-0.4.6[${PYTHON_USEDEP}] + dev-python/cairocffi[${PYTHON_USEDEP}] + dev-python/pyparsing[${PYTHON_USEDEP}] + dev-python/pytz[${PYTHON_USEDEP}] + dev-python/scandir[${PYTHON_USEDEP}] + dev-python/six[${PYTHON_USEDEP}] + dev-python/urllib3[${PYTHON_USEDEP}] + media-libs/fontconfig +" + +PATCHES=( + # Do not install the configuration and data files. We install them + # somewhere sensible by hand. + "${FILESDIR}"/${PN}-1.1.5-fhs-paths.patch +) + +python_prepare_all() { + # Use a less common name + mv bin/build-index bin/${PN}-build-index || die + # use FHS-style paths + export GRAPHITE_NO_PREFIX=yes + distutils-r1_python_prepare_all + eprefixify \ + conf/graphite.wsgi.example \ + webapp/graphite/local_settings.py.example +} + +python_install_all() { + distutils-r1_python_install_all + keepdir /var/{lib,log}/${PN} + docinto examples + docompress -x "/usr/share/doc/${PF}/examples" + dodoc \ + examples/example-graphite-vhost.conf \ + conf/dashboard.conf.example \ + conf/graphite.wsgi.example +} + +python_install() { + distutils-r1_python_install \ + --install-data="${EPREFIX}"/usr/share/${PN} + + insinto /etc/${PN} + newins webapp/graphite/local_settings.py.example local_settings.py + pushd "${D}/$(python_get_sitedir)"/graphite > /dev/null || die + ln -s ../../../../../etc/${PN}/local_settings.py local_settings.py || die + popd > /dev/null || die +} + +pkg_config() { + "${EROOT}"/usr/bin/django-admin.py migrate \ + --settings=graphite.settings --run-syncdb + "${EROOT}"/usr/bin/${PN}-build-index +} + +pkg_postinst() { + # Only display this for new installs + if [[ -z ${REPLACING_VERSIONS} ]]; then + elog "You need to configure ${PN} to run with a WSGI server of your choice." + elog "For example using Apache, you can use www-apache/mod_wsgi," + elog " using Nginx, you can use www-servers/uwsgi." + elog "Don't forget to edit local_settings.py in ${EPREFIX}/etc/${PN}" + elog "See https://graphite.readthedocs.org/en/latest/config-local-settings.html" + elog "Run emerge --config =${PN}-${PVR} if this is a fresh install." + elog "" + elog "If you want to update the search index regularily, you should consider running" + elog "the '${PN}-build-index' script in a crontab." + fi +}