diff --git a/www/py-graphite-web/Makefile b/www/py-graphite-web/Makefile index 17ecc32487dd..28b27522f966 100644 --- a/www/py-graphite-web/Makefile +++ b/www/py-graphite-web/Makefile @@ -1,68 +1,74 @@ # Created by: Evan Sarmiento PORTNAME= graphite-web -PORTVERSION= 1.1.8 -PORTREVISION= 1 +PORTVERSION= 1.1.10 CATEGORIES= www python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= bofh@FreeBSD.org COMMENT= Enterprise scalable realtime graphing platform LICENSE= APACHE20 DEPRECATED= No support for newer versions of Django EXPIRATION_DATE= 2022-06-30 RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cairo>=1.8.10:graphics/py-cairo@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}carbon>=${PORTVERSION}:databases/py-carbon@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}django-tagging>=0.4.2:www/py-django-tagging@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}django-tagging>=0.4.6:www/py-django-tagging@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}django22>=1.8<3.1:www/py-django22@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}gunicorn>0:www/py-gunicorn@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pyparsing2>=2.3.0:devel/py-pyparsing2@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}python-memcached>=1.58:databases/py-python-memcached@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pytz>0:devel/py-pytz@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}scandir>=0:sysutils/py-scandir@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}pyparsing2>=0:devel/py-pyparsing2@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}urllib3>0:net/py-urllib3@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR} \ - xorg-fonts-truetype>=0:x11-fonts/xorg-fonts-truetype \ - bash:shells/bash + ${PYTHON_PKGNAMEPREFIX}txamqp>=0.8:net/py-txamqp@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}urllib3>0:net/py-urllib3@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}whisper>0:databases/py-whisper@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}whitenoise>=4.1.2:www/py-whitenoise@${PY_FLAVOR} \ + bash:shells/bash \ + xorg-fonts-truetype>=0:x11-fonts/xorg-fonts-truetype -USES= cpe python:3.5+ shebangfix -USE_GITHUB= yes -GH_ACCOUNT= graphite-project +USES= cpe python:3.4-3.8 shebangfix CPE_VENDOR= graphite_project CPE_PRODUCT= graphite +USE_GITHUB= yes +GH_ACCOUNT= graphite-project USE_PYTHON= distutils SHEBANG_FILES= bin/build-index.sh CONFLICTS_INSTALL= py??-graphite-web FETCH_ARGS= -o ${DISTNAME}${EXTRACT_SUFX} NO_ARCH= yes SUB_FILES= pkg-message -SUB_LIST= PYTHON_SITELIBDIR=${PYTHON_SITELIBDIR} WWWOWN=${WWWOWN} \ - WWWGRP=${WWWGRP} DATADIR=${DATADIR} -PLIST_SUB= WWWOWN=${WWWOWN} WWWGRP=${WWWGRP} +SUB_LIST= DATADIR=${DATADIR} \ + PYTHON_SITELIBDIR=${PYTHON_SITELIBDIR} \ + WWWGRP=${WWWGRP} \ + WWWOWN=${WWWOWN} +PLIST_SUB= WWWGRP=${WWWGRP} \ + WWWOWN=${WWWOWN} post-patch: @${RM} ${WRKSRC}/bin/build-index.sh.orig @${RM} ${WRKSRC}/bin/run-graphite-devel-server.py @${REINPLACE_CMD} -i '' -e 's|%%PREFIX%%|${PREFIX}|' \ -e 's|%%DATADIR%%|${DATADIR}|' \ -e 's|%%PYTHON_SITELIBDIR%%|${PYTHON_SITELIBDIR}|' \ ${WRKSRC}/bin/build-index.sh \ ${WRKSRC}/conf/graphite.wsgi.example \ ${WRKSRC}/setup.cfg \ ${WRKSRC}/setup.py \ ${WRKSRC}/webapp/graphite/local_settings.py.example post-install: @${MKDIR} ${STAGEDIR}${DATADIR}/examples @(cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/examples) @${MKDIR} ${STAGEDIR}${DATADIR}/content @(cd ${WRKSRC}/webapp/content && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/content) @${MKDIR} ${STAGEDIR}/var/log/graphite/webapp @${MKDIR} ${STAGEDIR}/var/db/graphite @${CP} ${STAGEDIR}${PYTHON_SITELIBDIR}/graphite/local_settings.py.example ${STAGEDIR}${PREFIX}/etc/graphite/local_settings.py.example @${LN} -s ${PREFIX}/etc/graphite/local_settings.py ${STAGEDIR}${PYTHON_SITELIBDIR}/graphite/local_settings.py .include diff --git a/www/py-graphite-web/distinfo b/www/py-graphite-web/distinfo index 1dfb6150ab98..02c166f97dea 100644 --- a/www/py-graphite-web/distinfo +++ b/www/py-graphite-web/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1618863438 -SHA256 (graphite-project-graphite-web-1.1.8_GH0.tar.gz) = 6e35629493b9be77fa9902471053f6789e300c06fe74a0215253d986fc0b866c -SIZE (graphite-project-graphite-web-1.1.8_GH0.tar.gz) = 1458080 +TIMESTAMP = 1654111675 +SHA256 (graphite-project-graphite-web-1.1.10_GH0.tar.gz) = 1ac42a2871ea58b76b42aa3671affb87c7a92616e949bf1312fca831075a501b +SIZE (graphite-project-graphite-web-1.1.10_GH0.tar.gz) = 1462045 diff --git a/www/py-graphite-web/files/patch-conf__graphite.wsgi.example b/www/py-graphite-web/files/patch-conf__graphite.wsgi.example index 1e2b7d2ec0bf..ce86260c60be 100644 --- a/www/py-graphite-web/files/patch-conf__graphite.wsgi.example +++ b/www/py-graphite-web/files/patch-conf__graphite.wsgi.example @@ -1,10 +1,10 @@ ---- conf/graphite.wsgi.example.orig 2021-04-19 05:24:42 UTC +--- conf/graphite.wsgi.example.orig 2022-05-22 18:11:01 UTC +++ conf/graphite.wsgi.example @@ -2,6 +2,6 @@ import sys # In case of multi-instance graphite, uncomment and set appropriate name # import os # os.environ['GRAPHITE_SETTINGS_MODULE'] = 'graphite.local_settings' -sys.path.append('/opt/graphite/webapp') -+sys.path.append('%%PYTHON_SITELIBDIR%%/graphite') ++sys.path.append('/usr/local/lib/python3.8/site-packages/graphite') from graphite.wsgi import application diff --git a/www/py-graphite-web/files/patch-setup.py b/www/py-graphite-web/files/patch-setup.py index 557c74aa3348..e3cb0fbd36c0 100644 --- a/www/py-graphite-web/files/patch-setup.py +++ b/www/py-graphite-web/files/patch-setup.py @@ -1,47 +1,46 @@ ---- setup.py.orig 2021-04-19 05:24:42 UTC +--- setup.py.orig 2022-05-22 18:11:01 UTC +++ setup.py @@ -39,10 +39,6 @@ else: cf.add_section('install') except DuplicateSectionError: pass - if not cf.has_option('install', 'prefix'): - cf.set('install', 'prefix', '/opt/graphite') - if not cf.has_option('install', 'install-lib'): - cf.set('install', 'install-lib', '%(prefix)s/webapp') with open('setup.cfg', 'w') as f: cf.write(f) -@@ -58,17 +54,17 @@ else: +@@ -58,17 +54,17 @@ storage_dirs = [] storage_dirs = [] -for subdir in ('whisper/dummy.txt', 'ceres/dummy.txt', 'rrd/dummy.txt', 'log/dummy.txt', 'log/webapp/dummy.txt'): - storage_dirs.append( ('storage/%s' % subdir, []) ) +for subdir in ('whisper', 'ceres', 'rrd', 'log', 'log/webapp'): + storage_dirs.append( ('graphite/storage/%s' % subdir, []) ) webapp_content = defaultdict(list) -for root, dirs, files in os.walk('webapp/content'): +for root, dirs, files in os.walk('graphite/webapp/content'): for filename in files: filepath = os.path.join(root, filename) webapp_content[root].append(filepath) -conf_files = [ ('conf', glob('conf/*.example')) ] -+conf_files = [ ('%%PREFIX%%/etc/graphite', glob('conf/*.example')) ] ++conf_files = [ ('/usr/local/etc/graphite', glob('conf/*.example')) ] examples = [ ('examples', glob('examples/example-*')) ] -@@ -116,8 +112,9 @@ try: +@@ -116,8 +112,8 @@ try: package_data={'graphite' : ['templates/*', 'local_settings.py.example']}, scripts=glob('bin/*'), - data_files=list(webapp_content.items()) + storage_dirs + conf_files + examples, - install_requires=['Django>=1.8,<3.1', 'django-tagging==0.4.3', 'pytz', + data_files=list(conf_files), -+ + install_requires=['Django>=1.8,<3.1', 'django-tagging>=0.4.3', 'pytz', - 'pyparsing', 'cairocffi', 'urllib3', 'scandir', 'six'], + 'pyparsing', 'cairocffi', 'urllib3', + 'scandir;python_version<"3.5"', 'six'], classifiers=[ - 'Intended Audience :: Developers', diff --git a/www/py-graphite-web/files/patch-webapp__graphite__local_settings.py.example b/www/py-graphite-web/files/patch-webapp__graphite__local_settings.py.example index cdfb9db732fb..95cac148c58f 100644 --- a/www/py-graphite-web/files/patch-webapp__graphite__local_settings.py.example +++ b/www/py-graphite-web/files/patch-webapp__graphite__local_settings.py.example @@ -1,44 +1,44 @@ ---- webapp/graphite/local_settings.py.example.orig 2018-02-13 06:01:34.000000000 -0500 -+++ webapp/graphite/local_settings.py.example 2018-03-22 09:10:17.659675000 -0400 -@@ -108,15 +108,27 @@ +--- webapp/graphite/local_settings.py.example.orig 2022-05-22 18:11:01 UTC ++++ webapp/graphite/local_settings.py.example +@@ -112,15 +112,27 @@ DEFAULT_XFILES_FACTOR = 0 #CONF_DIR = '/opt/graphite/conf' #STORAGE_DIR = '/opt/graphite/storage' #STATIC_ROOT = '/opt/graphite/static' -+CONF_DIR = '%%PREFIX%%/etc/graphite' ++CONF_DIR = '/usr/local/etc/graphite' +STORAGE_DIR = '/var/db/carbon' -+STATIC_ROOT = '%%PREFIX%%/share/graphite-web/content' ++STATIC_ROOT = '/usr/local/share/graphite-web/content' + #LOG_DIR = '/opt/graphite/storage/log/webapp' #INDEX_FILE = '/opt/graphite/storage/index' # Search index file +WHISPER_DIR = '/var/db/carbon/whisper' +RRD_DIR = '/var/db/carbon/rrd' +DATA_DIRS = [WHISPER_DIR, RRD_DIR] # Default: set from the above variables +LOG_DIR = '/var/log/graphite' +INDEX_FILE = '/var/db/graphite/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 # ## Webapp config files #DASHBOARD_CONF = '/opt/graphite/conf/dashboard.conf' #GRAPHTEMPLATES_CONF = '/opt/graphite/conf/graphTemplates.conf' -+DASHBOARD_CONF = '%%PREFIX%%/etc/graphite/dashboard.conf' -+GRAPHTEMPLATES_CONF = '%%PREFIX%%/etc/graphite/graphTemplates.conf' ++DASHBOARD_CONF = '/usr/local/etc/graphite/dashboard.conf' ++GRAPHTEMPLATES_CONF = '/usr/local/etc/graphite/graphTemplates.conf' ## Data directories # -@@ -253,7 +265,12 @@ +@@ -257,7 +269,12 @@ DEFAULT_XFILES_FACTOR = 0 # } #} # - +DATABASES = { + 'default': { + 'NAME': '/var/db/graphite/graphite.db', + 'ENGINE': 'django.db.backends.sqlite3', + } +} ######################### # Cluster Configuration #