summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'www-apps')
-rw-r--r--www-apps/cgp/Manifest1
-rw-r--r--www-apps/cgp/cgp-1_p20190510.ebuild56
-rw-r--r--www-apps/cgp/files/cgp-1_p20190510-double-quote.patch23
3 files changed, 80 insertions, 0 deletions
diff --git a/www-apps/cgp/Manifest b/www-apps/cgp/Manifest
index 8c002dc742f9..55f2173885b8 100644
--- a/www-apps/cgp/Manifest
+++ b/www-apps/cgp/Manifest
@@ -1 +1,2 @@
DIST cgp-1_p20181209.tar.gz 139556 BLAKE2B 0a79ff1974b0ae50db5582121c4fdcc2db0b89ef11ecb001dfa525dd753481f0a454e424d17f24b142fd116a9ea2eeb4ba1dade6f2ffadd63943e5c065323224 SHA512 fcbf81fca2bb14ed143ea414c2f11fe09f4594891507a1ad08482720b104ec62c9986ce25b127d45a7962a8b3db54293a6775dc2359bde41f19b5419606b51eb
+DIST cgp-1_p20190510.tar.gz 139241 BLAKE2B 663d8b8f6e144b4b28ca36674f4f0b68537dba36aa481faa5d0b5ff1ea11933018b91e94750c15833e3bc9b4ce6604898276e84ff3d3d649ebff11089f6328e0 SHA512 3a6d6af25db00f8d80b0e0aa6e19763da8492d0e1cb421474bf31c325ff37357b9bf88af70459e669c4e9f740dd1a547421fcb3184526d9f3ba4333eb57fec8f
diff --git a/www-apps/cgp/cgp-1_p20190510.ebuild b/www-apps/cgp/cgp-1_p20190510.ebuild
new file mode 100644
index 000000000000..4821fa570298
--- /dev/null
+++ b/www-apps/cgp/cgp-1_p20190510.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit webapp
+
+MY_PN="${PN^^}"
+MY_PV="fd8fa70739d18d786e88f7ffa57e250e0e41af8f"
+
+DESCRIPTION="A graphical web-based front-end for visualizing RRD collected by collectd"
+HOMEPAGE="https://github.com/pommi/CGP"
+SRC_URI="https://github.com/pommi/${MY_PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="CC-BY-2.0 GPL-2+ GPL-3 MIT"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ dev-lang/php[json]
+ net-analyzer/rrdtool[graph]
+ virtual/httpd-php
+"
+
+need_httpd_cgi
+
+S="${WORKDIR}/${MY_PN}-${MY_PV}"
+
+DOCS=( "README.md" "doc/CHANGELOG" "doc/nginx.conf" )
+
+PATCHES=( "${FILESDIR}/${P}-double-quote.patch" )
+
+src_install() {
+ webapp_src_preinst
+
+ einstalldocs
+
+ # Since the docs are already installed, remove them from htdocs
+ # The file doc/CHANGELOG is needed, as CGP reads from there it's version
+ rm -r .gitignore LICENSE doc/nginx.conf || die
+
+ insinto "${MY_HTDOCSDIR}"
+ doins -r .
+
+ webapp_src_install
+}
+
+pkg_postinst() {
+ webapp_pkg_postinst
+
+ einfo "The command shell_exec must not be disabled"
+ einfo "through the disable_functions php.ini directive."
+ einfo "It must allow execution of the rrdtool program."
+ einfo ""
+ einfo "An configuration file for www-servers/nginx"
+ einfo "has been installed as an example."
+}
diff --git a/www-apps/cgp/files/cgp-1_p20190510-double-quote.patch b/www-apps/cgp/files/cgp-1_p20190510-double-quote.patch
new file mode 100644
index 000000000000..1cfa7f9898d3
--- /dev/null
+++ b/www-apps/cgp/files/cgp-1_p20190510-double-quote.patch
@@ -0,0 +1,23 @@
+From aec5ed41122b1a900c6fe0a3ddc11656c150b6d5 Mon Sep 17 00:00:00 2001
+From: Conrad Kostecki <conrad@kostecki.com>
+Date: Tue, 24 Sep 2019 00:01:59 +0200
+Subject: [PATCH] inc/functions.inc.php: add double quote for whitelist
+
+Signed-off-by: Conrad Kostecki <conrad@kostecki.com>
+---
+ inc/functions.inc.php | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/inc/functions.inc.php b/inc/functions.inc.php
+index 376b6e1..48336fb 100644
+--- a/inc/functions.inc.php
++++ b/inc/functions.inc.php
+@@ -34,7 +34,7 @@ function GET($index = NULL, $value = NULL) {
+ case 'h': # host
+ case 'pi': # plugin instance
+ case 'ti': # type instance
+- if (!preg_match('/^[\w\-.: ]+$/u', $value)) {
++ if (!preg_match('/^[\w\-.:" ]+$/u', $value)) {
+ error_log(sprintf('Invalid %s in $_GET["%s"]: "%s"', $desc[$index], $index, $value));
+ return NULL;
+ }