Bug 200174 - www/py-graphite-web pkg-message and graphite.wsgi.example need updating
Summary: www/py-graphite-web pkg-message and graphite.wsgi.example need updating
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Steve Wills
URL:
Keywords:
: 200175 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-05-13 17:45 UTC by Kaspars Mickevics
Modified: 2016-04-22 15:48 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (swills)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kaspars Mickevics 2015-05-13 17:45:55 UTC
I tried installing Graphite using this port but two small issues that prevent this port from working out of the box.

First, the provided example in pkg-message needs updating as it does not work as-is with apache24 (worked with apache22 before).

Fix:

--- pkg-message.in	2014-09-14 06:58:14.000000000 +0300
+++ pkg-message.in_fixed	2015-05-13 20:39:25.505087000 +0300
@@ -56,20 +56,23 @@
 		SetHandler None
 	</Location>
 	<Directory "%%PYTHON_SITELIBDIR%%/django/contrib/admin/static/">
-		Order deny,allow
-		Allow from all
+		AllowOverride All
+		Options All
+		Require all granted
 	</Directory>

 	# The graphite.wsgi file has to be accessible by apache. It won't
 	# be visible to clients because of the DocumentRoot though.
 	<Directory %%PREFIX%%/etc/graphite/>
-		Order deny,allow
-		Allow from all
+		AllowOverride All
+		Options All
+		Require all granted
 	</Directory>

 	<Directory %%DATADIR%%/content/>
-		Order deny,allow
-		Allow from all
+		AllowOverride All
+		Options All
+		Require all granted
 	</Directory>

 </VirtualHost>

More info on why this is so: http://httpd.apache.org/docs/2.4/upgrading.html


And the other problem - patch-conf__graphite.wsgi.example contains wrong path to the graphite webapp.

Fix:

--- patch-conf__graphite.wsgi.example	2014-09-14 06:58:14.000000000 +0300
+++ patch-conf__graphite.wsgi.example_fixed	2015-05-13 20:41:08.553705000 +0300
@@ -3,7 +3,7 @@
 @@ -1,8 +1,10 @@
  import os, sys
 -sys.path.append('/opt/graphite/webapp')
-+sys.path.append('%%PREFIX%%/graphite/webapp')
++sys.path.append('/usr/ports/www/py-graphite-web/files')
  os.environ['DJANGO_SETTINGS_MODULE'] = 'graphite.settings'

 +import django




This could have very well worked with STABLE but with CURRENT and apache24 these fixes are required in order to successfully use graphite.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2015-05-15 13:50:35 UTC
*** Bug 200175 has been marked as a duplicate of this bug. ***
Comment 2 commit-hook freebsd_committer freebsd_triage 2016-04-22 15:46:25 UTC
A commit references this bug:

Author: swills
Date: Fri Apr 22 15:45:52 UTC 2016
New revision: 413785
URL: https://svnweb.freebsd.org/changeset/ports/413785

Log:
  www/py-graphite-web: add CPE and fix example

  * Add CPE info for security issues [1]
  * Fix the path in the graphite.wsgi.example [2]
  * Bump portrevision for package change

  PR:		208331 [1]
  PR:		200174 [2]
  Submitted by:	shun <shun.fbsd.pr@dropcut.net> [1]
  Submitted by:	Kaspars Mickevics <kaspars@fx.lv> [2]

Changes:
  head/www/py-graphite-web/Makefile
  head/www/py-graphite-web/files/patch-conf__graphite.wsgi.example
Comment 3 Steve Wills freebsd_committer freebsd_triage 2016-04-22 15:48:54 UTC
First part of this was fixed a while ago, second part was just committed. Thanks and sorry it took so long!