- Add /srv/www directories to filelist [bsc#1231027]
OBS-URL: https://build.opensuse.org/package/show/network:cluster/ganglia-web?expand=0&rev=24
This commit is contained in:
commit
f106c86bb0
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
145
0001-added-of-download_js.patch
Normal file
145
0001-added-of-download_js.patch
Normal file
@ -0,0 +1,145 @@
|
||||
From 3d5c9c2e308123a9d37e7cbab33b854a304bb381 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Goll <cgoll@suse.de>
|
||||
Date: Fri, 6 Dec 2019 16:42:28 +0100
|
||||
Subject: [PATCH 1/2] added of download_js
|
||||
|
||||
---
|
||||
download_js.sh | 126 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 126 insertions(+)
|
||||
create mode 100755 download_js.sh
|
||||
|
||||
diff --git a/download_js.sh b/download_js.sh
|
||||
new file mode 100755
|
||||
index 0000000..67e26fd
|
||||
--- /dev/null
|
||||
+++ b/download_js.sh
|
||||
@@ -0,0 +1,126 @@
|
||||
+#!/bin/bash
|
||||
+CONFFILE="/srv/www/htdocs/ganglia-web/conf_default.php"
|
||||
+SAVEDIR='/srv/www/htdocs/ganglia-web'
|
||||
+PHPCONFDIR='/etc/apache2/conf.d/'
|
||||
+PHPCONFNAME='conf.php'
|
||||
+TARBALL='/tmp/ajax_ganglia.tar.gz'
|
||||
+RESCRIPT='/tmp/download_js.sh'
|
||||
+SUFFIX='ajax_libs'
|
||||
+TMPDIR='/tmp'
|
||||
+
|
||||
+function get_conf() {
|
||||
+declare -f -F conf_stor > /dev/null
|
||||
+if [ $? -eq 0 ] ; then
|
||||
+ conf_stor
|
||||
+else
|
||||
+ cat ${CONFFILE}
|
||||
+fi
|
||||
+}
|
||||
+
|
||||
+function usage() {
|
||||
+cat <<EOF
|
||||
+ $0 parses ${CONFFILE}
|
||||
+ for external java script libraries and downloads or recreate the script
|
||||
+ so that it can download them on another computer.
|
||||
+ Options are:
|
||||
+ -h: prints this help
|
||||
+ -d: download the libraries to
|
||||
+ $SAVEDIR
|
||||
+ and modify/write
|
||||
+ ${PHPCONFDIR}/${PHPCONFNAME}
|
||||
+ so that downloaded libraries are preferred
|
||||
+ -t: download the libraries and store them in
|
||||
+ $TARBALL
|
||||
+ -r: recreate this script by parsing
|
||||
+ $CONFFILE
|
||||
+ and store the download locations of the java script libraries
|
||||
+ direclty in the recreated script, which
|
||||
+ will stored in
|
||||
+ $RESCRIPT
|
||||
+EOF
|
||||
+}
|
||||
+tarball=0
|
||||
+recreate=0
|
||||
+download_libs=0
|
||||
+usage_set=1
|
||||
+
|
||||
+while getopts "h?trd" opt; do
|
||||
+ case "$opt" in
|
||||
+ h|\?)
|
||||
+ usage_set=1
|
||||
+ ;;
|
||||
+ t)
|
||||
+ usage_set=0
|
||||
+ tarball=1
|
||||
+ recreate=0
|
||||
+ ;;
|
||||
+ r)
|
||||
+ usage_set=0
|
||||
+ recreate=1
|
||||
+ ;;
|
||||
+ d)
|
||||
+ usage_set=0
|
||||
+ download_libs=1
|
||||
+ recreate=0
|
||||
+ ;;
|
||||
+ esac
|
||||
+done
|
||||
+
|
||||
+if [ $usage_set -eq 1 ] ; then
|
||||
+ usage
|
||||
+ exit 0
|
||||
+fi
|
||||
+
|
||||
+if [ $recreate -eq 1 ] ; then
|
||||
+ declare -f -F conf_stor > /dev/null
|
||||
+ if [ $? -eq 0 ] ; then
|
||||
+ echo "This script was recreated so could not recreate it."
|
||||
+ exit 1
|
||||
+ fi
|
||||
+ cat << EOF > $RESCRIPT
|
||||
+#!/bin/bash
|
||||
+# this file was recreated on $(uname -n) at $(date)
|
||||
+function conf_stor() {
|
||||
+cat <<ENDCONF
|
||||
+EOF
|
||||
+ grep 'https://cdnjs' $CONFFILE | sed 's@\$@\\\$@' >> $RESCRIPT
|
||||
+ cat << EOF >> $RESCRIPT
|
||||
+
|
||||
+ENDCONF
|
||||
+}
|
||||
+EOF
|
||||
+ cat $0 | sed -e 's@#!/bin/bash@@' \
|
||||
+ -e 's@usage_set=1@usage_set=0@' \
|
||||
+ -e 's@tarball=0@tarball=1@' >> $RESCRIPT
|
||||
+ echo "wrote $RESCRIPT"
|
||||
+ exit 0
|
||||
+fi
|
||||
+
|
||||
+
|
||||
+which curl &> /dev/null || echo "need curl to download ajax libraries"
|
||||
+which curl &> /dev/null || exit 1
|
||||
+
|
||||
+if [ $tarball -eq 1 ] ; then
|
||||
+ test -d ${TMPDIR}/${SUFFIX} || mkdir -vp ${TMPDIR}/${SUFFIX}
|
||||
+ PHPCONFFILELOC=${TMPDIR}/${SUFFIX}/${PHPCONFNAME}
|
||||
+ cd ${TMPDIR}
|
||||
+else
|
||||
+ test -d ${SAVEDIR}/${SUFFIX} || mkdir -vp ${SAVEDIR}/${SUFFIX}
|
||||
+ PHPCONFFILELOC=${PHPCONFDIR}/${PHPCONFNAME}
|
||||
+ cd ${SAVEDIR}
|
||||
+fi
|
||||
+
|
||||
+for lib_line in $(get_conf | grep -e '^$conf.* = \"https://cdnjs' | tr ' ' '@') ; do
|
||||
+ conf_line=$(echo $lib_line | cut -f 1 -d '@')
|
||||
+ url=$(echo $lib_line | cut -f 3 -d '@' |tr -d '"' | tr -d ';')
|
||||
+ file_name=$(basename $url)
|
||||
+ echo -n "getting ${file_name}: "
|
||||
+ curl -# $url -o ${SUFFIX}/$file_name
|
||||
+ echo "$conf_line = \"${SAVEDIR}/${SUFFIX}/${file_name}\";" >> ${PHPCONFFILELOC}
|
||||
+done
|
||||
+if [ $tarball -eq 1 ] ; then
|
||||
+ tar czf ${TARBALL} ${SUFFIX}
|
||||
+ echo "created ${TARBALL} , which also contains ${PHPCONFNAME}"
|
||||
+fi
|
||||
+cd - > /dev/null
|
||||
+
|
||||
--
|
||||
2.16.4
|
||||
|
28
0002-looking-for-systemwide-user-config.patch
Normal file
28
0002-looking-for-systemwide-user-config.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From b88b085b67e48ec5baf1bc66a973beb31b737360 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Goll <cgoll@suse.de>
|
||||
Date: Mon, 9 Dec 2019 11:52:48 +0100
|
||||
Subject: [PATCH 2/2] looking for systemwide user config
|
||||
|
||||
---
|
||||
eval_conf.php | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/eval_conf.php b/eval_conf.php
|
||||
index b39fb2e..5e3d884 100644
|
||||
--- a/eval_conf.php
|
||||
+++ b/eval_conf.php
|
||||
@@ -12,6 +12,11 @@ require_once $base_dir . "/conf_default.php";
|
||||
require_once 'lib/GangliaAcl.php';
|
||||
require_once 'lib/GangliaAuth.php';
|
||||
|
||||
+# Include system-wide overrides if they exist.
|
||||
+if( file_exists( "/etc/ganglia/conf.d/conf.php" ) ) {
|
||||
+ include_once "/etc/ganglia/conf.d/conf.php";
|
||||
+}
|
||||
+
|
||||
# Include user-defined overrides if they exist.
|
||||
if( file_exists( $base_dir . "/conf.php" ) ) {
|
||||
include_once $base_dir . "/conf.php";
|
||||
--
|
||||
2.16.4
|
||||
|
10
README.SUSE
Normal file
10
README.SUSE
Normal file
@ -0,0 +1,10 @@
|
||||
* The apache2 php7 or php5 module must be enabled , before ganglia-web works.
|
||||
SLE-12* is shipped with php5 and SLE-15* is shipped with php7, for this
|
||||
products you also have to add the "Web and Scripting Module". This can be done
|
||||
with a2enmod php7 or a2enmod php5
|
||||
apache2 must be restarted after this
|
||||
* The web interface uses some external java script libraries for a better user
|
||||
experience. The script download_js.sh can be used to download this libraries
|
||||
from a host with internet connection.
|
||||
|
||||
-- cgoll@suse.de
|
12
ganglia-httpd24.conf.d
Normal file
12
ganglia-httpd24.conf.d
Normal file
@ -0,0 +1,12 @@
|
||||
#
|
||||
# Ganglia monitoring system php web frontend
|
||||
#
|
||||
# Make sure to enable PHP. Depending on the version used.
|
||||
# For php5 execute "a2enmod php5",
|
||||
# for php7 execute "a2enmod php7".
|
||||
Alias /ganglia WEBPATH
|
||||
|
||||
<Location /ganglia>
|
||||
Require all granted
|
||||
# Require host example.org
|
||||
</Location>
|
3
ganglia-web-3.7.5.tar.gz
Normal file
3
ganglia-web-3.7.5.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:64b5eb6c196e1a6b67614a873b5ab914f64b9a182d3d0024ff56abe73e5006eb
|
||||
size 712659
|
58
ganglia-web.changes
Normal file
58
ganglia-web.changes
Normal file
@ -0,0 +1,58 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Sep 28 07:03:17 UTC 2024 - Thorsten Kukuk <kukuk@suse.com>
|
||||
|
||||
- Add /srv/www directories to filelist [bsc#1231027]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 29 14:53:55 UTC 2021 - Christian Goll <cgoll@suse.com>
|
||||
|
||||
- updated to 3.7.5 which fixes bsc#1179835
|
||||
- various bugfixes and enhancements, highlights are:
|
||||
* heatmap coloring enhanced
|
||||
* Fix XSS from OBB#1005024 (https://www.openbugbounty.org/reports/1005024/)
|
||||
* uses `httponly` and `secure` flags in setcookie calls
|
||||
* add the available memory to the graph, if present
|
||||
- Possible XSS via ce & cs parameters in header.php are no longer present
|
||||
in this version (bsc#1160761, CVE-2019-20378).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 4 12:54:20 UTC 2019 - Christian Goll <cgoll@suse.com>
|
||||
|
||||
- updated to version 3.7.4
|
||||
- added patches for a global user config under /etc/ganglia/conf.d/
|
||||
and added download_js.sh which can download the external java
|
||||
script libararies.
|
||||
* new file: 0001-added-of-download_js.patch which adds download_js.sh
|
||||
* new file: 0002-looking-for-systemwide-user-config.patch which
|
||||
makes ganglia-web to serach for config in /etc/ganglia/conf.d/
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 16 21:24:26 UTC 2018 - eich@suse.com
|
||||
|
||||
- Fix comment in config file to cover both php5 and php7
|
||||
(bsc#1088887).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 10 14:53:10 UTC 2018 - cgoll@suse.com
|
||||
|
||||
- Removed all explicit php dependencies (bsc#1088887)
|
||||
* updated README.SUSE
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 16 11:20:02 UTC 2017 - cgoll@suse.com
|
||||
|
||||
- update to version 3.7.2
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 27 20:52:53 UTC 2015 - scorot@free.fr
|
||||
|
||||
- version 3.6.2
|
||||
* Performance improvements
|
||||
* New clearer heatmaps
|
||||
* Other minor improvements and fixes
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 1 12:03:10 UTC 2013 - scorot@free.fr
|
||||
|
||||
- first package
|
||||
|
95
ganglia-web.spec
Normal file
95
ganglia-web.spec
Normal file
@ -0,0 +1,95 @@
|
||||
#
|
||||
# spec file for package ganglia-web
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define web_prefixdir /srv/www/htdocs/ganglia-web
|
||||
%define gittag f5bdfca75f9f5d701c8f8e9310f7801cd2e62799
|
||||
|
||||
Name: ganglia-web
|
||||
Version: 3.7.5
|
||||
Release: 0
|
||||
Summary: Ganglia web frontend
|
||||
License: BSD-3-Clause
|
||||
Group: System/Monitoring
|
||||
URL: http://ganglia.info/
|
||||
Source0: https://github.com/ganglia/ganglia-web/archive/%{gittag}.tar.gz#/ganglia-web-%{version}.tar.gz
|
||||
Source1: ganglia-httpd24.conf.d
|
||||
Source2: README.SUSE
|
||||
Patch1: 0001-added-of-download_js.patch
|
||||
Patch2: 0002-looking-for-systemwide-user-config.patch
|
||||
BuildRequires: apache2
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: rsync
|
||||
Requires: apache2
|
||||
Requires: mod_php_any
|
||||
Requires: php
|
||||
Requires: php-gd
|
||||
Requires: php-xml
|
||||
Requires: rrdtool
|
||||
Recommends: ganglia-gmetad
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
This package provides a web frontend to display the XML tree published by
|
||||
ganglia, and to provide historical graphs of collected metrics. This website is
|
||||
written in the PHP5/7 language and uses the Dwoo templating engine.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{gittag}
|
||||
%autopatch -p1
|
||||
|
||||
%build
|
||||
cp %SOURCE2 .
|
||||
|
||||
%install
|
||||
%{__sed} -i 's,www-data,abuild,' Makefile
|
||||
%{__sed} -i 's,/usr/share/ganglia-webfrontend,%{buildroot}%{web_prefixdir},' Makefile
|
||||
%{__sed} -i 's,WEBPATH,%{web_prefixdir},' %SOURCE1
|
||||
%{__sed} -i 's,/etc/ganglia-web,%{buildroot}/etc/apache2/conf.d,' Makefile
|
||||
%{__sed} -i 's,/var/lib/ganglia,%{buildroot}/var/lib/ganglia,' Makefile
|
||||
|
||||
make install
|
||||
install -d %{buildroot}/etc/apache2/conf.d
|
||||
install -m 644 %SOURCE1 %{buildroot}/etc/apache2/conf.d/%{name}.conf
|
||||
mkdir -pv %{buildroot}%{_docdir}/%{name}/
|
||||
cp -v download_js.sh %{buildroot}%{_docdir}/%{name}/download_js.sh
|
||||
# fix suprious buildroot in config
|
||||
%{__sed} -i 's@%{buildroot}@@' %{buildroot}/%{web_prefixdir}/conf_default.php
|
||||
|
||||
%fdupes %{buildroot}%{web_prefixdir}
|
||||
%fdupes %{buildroot}%{_localstatedir}/lib/ganglia-web
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc AUTHORS TODO README README.SUSE
|
||||
%{_docdir}/%{name}/download_js.sh
|
||||
%license COPYING
|
||||
%dir /srv/www
|
||||
%dir /srv/www/htdocs
|
||||
%dir %{web_prefixdir}/
|
||||
%dir %{web_prefixdir}/dwoo
|
||||
%{web_prefixdir}/*
|
||||
%config(noreplace) /etc/apache2/conf.d/%{name}.conf
|
||||
%dir %{_localstatedir}/lib/ganglia-web
|
||||
%{_localstatedir}/lib/ganglia-web/conf
|
||||
%attr(0755,wwwrun,www)%{_localstatedir}/lib/%{name}/dwoo
|
||||
%attr(0755,wwwrun,www)%{_localstatedir}/lib/%{name}/dwoo/compiled
|
||||
%attr(0755,wwwrun,www)%{_localstatedir}/lib/%{name}/dwoo/cache
|
||||
|
||||
%changelog
|
Loading…
Reference in New Issue
Block a user