Compare commits

..

4 commits

Author SHA1 Message Date
Terje Røsten
c3c5e6fa74 Some refactoring 2025-09-29 18:23:03 +02:00
Terje Røsten
266569fcb8 Port to epel10
Add TZ patches
Remove legacy libart_lgpl-devel buildreq
Fix URL
2025-09-28 21:48:55 +02:00
Fedora Release Engineering
66edd50471 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-23 20:56:47 +00:00
Python Maint
a157a44a4e Rebuilt for Python 3.14 2025-06-02 19:55:46 +02:00
3 changed files with 114 additions and 16 deletions

View file

@ -0,0 +1,34 @@
From 092f16cafa0a1ef5f001a35b54dd896f601f1428 Mon Sep 17 00:00:00 2001
From: Vladimir Vuksan <44271-vvuksan-fastly@users.noreply.drupalcode.org>
Date: Mon, 5 May 2025 10:16:00 -0400
Subject: [PATCH 1/2] Sanitize input for timezone
---
graph.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/graph.php b/graph.php
index e8a7a9c..fdf9c86 100644
--- a/graph.php
+++ b/graph.php
@@ -946,7 +946,7 @@ function rrdgraph_cmd_build($rrdtool_graph,
$command = '';
if (isset($_SESSION['tz']) && ($_SESSION['tz'] != ''))
- $command .= "TZ='" . $_SESSION['tz'] . "' ";
+ $command .= "TZ='" . escapeshellcmd($_SESSION['tz']) . "' ";
$command .=
$conf['rrdtool'] .
@@ -1123,7 +1123,7 @@ function output_data_to_external_format($rrdtool_graph_series,
$command = '';
if (isset($_SESSION['tz']) && ($_SESSION['tz'] != ''))
- $command .= "TZ='" . $_SESSION['tz'] . "' ";
+ $command .= "TZ='" . escapeshellcmd($_SESSION['tz']) . "' ";
$command .= $rrdtool .
" xport --start '" . $rrdtool_graph_start .
--
2.51.0

View file

@ -0,0 +1,25 @@
From bd2a339a510f0da021d3adededdfa98006f03001 Mon Sep 17 00:00:00 2001
From: Vladimir Vuksan <44271-vvuksan-fastly@users.noreply.drupalcode.org>
Date: Mon, 5 May 2025 10:30:48 -0400
Subject: [PATCH 2/2] Validate that the supplied timezone is a valid timezone
---
header.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/header.php b/header.php
index 729fe27..a50c41b 100644
--- a/header.php
+++ b/header.php
@@ -1,7 +1,7 @@
<?php
session_start();
-if (isset($_GET['tz'])) {
+if (isset($_GET['tz']) && in_array($_GET['tz'], timezone_identifiers_list())) {
$_SESSION['tz'] = $_GET['tz'];
}
--
2.51.0

View file

@ -11,13 +11,33 @@
%global py3 1
%endif
%if 0%{?fedora} || 0%{?rhel} > 9
%global pcre2 1
%global autoconf_fix 1
%endif
%if 0%{?fedora} || 0%{?rhel} > 7
%global tirpc 1
%global php_xml 1
%endif
%if 0%{?fedora} > 42
%global sysusers 1
%else
%global legacy_users 1
%endif
%if 0%{?fedora} || 0%{?rhel} > 6
%global httpd24 1
%endif
Summary: Distributed Monitoring System
Name: ganglia
Version: %{gangver}
Release: 58%{?dist}
Release: 62%{?dist}
# Automatically converted from old format: BSD - review is highly recommended.
License: LicenseRef-Callaway-BSD
URL: http://ganglia.sourceforge.net/
URL: https://github.com/ganglia
Source0: http://downloads.sourceforge.net/sourceforge/ganglia/ganglia-%{version}.tar.gz
Source1: https://github.com/ganglia/ganglia-web/archive/%{webver}/ganglia-web-%{webver}.tar.gz
Source2: gmond.service
@ -32,6 +52,8 @@ Patch10: ganglia-3.7.2-tirpc-hack.patch
Patch20: ganglia-web-3.7.2-path.patch
Patch21: ganglia-web-3.7.6-pr-379.patch
Patch22: ganglia-web-3.7.6-php8.patch
Patch23: 0001-Sanitize-input-for-timezone.patch
Patch24: 0002-Validate-that-the-supplied-timezone-is-a-valid-timez.patch
Patch30: ganglia-gmond-python2to3.patch
Patch31: 0002-2to3-pass.patch
Patch32: 0003-Ruff-pass.patch
@ -43,7 +65,7 @@ Patch50: ganglia-3.7.2-pcre2.patch
%if 0%{?systemd}
BuildRequires: systemd
%endif
%if 0%{?fedora} || 0%{?rhel} > 7
%if 0%{?tirpc}
BuildRequires: rpcgen
BuildRequires: libtirpc-devel
BuildRequires: autoconf
@ -55,15 +77,14 @@ BuildRequires: cyrus-sasl-devel
BuildRequires: expat-devel
BuildRequires: freetype-devel
BuildRequires: gcc
BuildRequires: libart_lgpl-devel
BuildRequires: libconfuse-devel
BuildRequires: libmemcached-devel
BuildRequires: libpng-devel
BuildRequires: make
%if 0%{?rhel}
BuildRequires: pcre-devel
%else
%if 0%{?pcre2}
BuildRequires: pcre2-devel
%else
BuildRequires: pcre-devel
%endif
%{?py2:BuildRequires: python2-devel}
%{?py3:BuildRequires: python3-devel}
@ -83,7 +104,7 @@ Requires: rrdtool
Requires: php
Requires: php-gd
Requires: %{name}-gmetad = %{gangver}-%{release}
%if 0%{?fedora} || 0%{?rhel} > 7
%if 0%{?php_xml}
Requires: php-xml
%endif
%description web
@ -184,10 +205,10 @@ programmers can use to build scalable cluster or grid applications
%{?py3:%patch -P 34 -p1}
%{?py3:%patch -P 35 -p1}
%patch -P 40 -p1
%if 0%{?fedora} || 0%{?rhel} > 7
%if 0%{?tirpc}
%patch -P 10 -p1
%endif
%if 0%{?fedora}
%if 0%{?pcre2}
%patch -P 50 -p1
%endif
# fix broken systemd support
@ -200,12 +221,14 @@ pushd web
%patch -P 20 -p1
%patch -P 21 -p1
%patch -P 22 -p1
%patch -P 23 -p1
%patch -P 24 -p1
popd
%build
touch Makefile.am
%if 0%{?fedora} || 0%{?rhel} > 7
%if 0%{?tirpc}
aclocal -I m4
autoheader
automake --add-missing --copy --foreign 2>/dev/null
@ -214,7 +237,7 @@ automake --add-missing --copy --foreign
autoconf -f || exit 1
%endif
%if 0%{?fedora} > 36
%if 0%{?autoconf_fix}
pushd libmetrics
aclocal -I m4
autoheader
@ -301,7 +324,7 @@ ln -s ../../..%{_sysconfdir}/%{name}/conf.php \
popd
## httpd config
%if 0%{?fedora} || 0%{?rhel} > 6
%if 0%{?httpd24}
install -Dp -m 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/httpd/conf.d/%{name}.conf
%else
install -Dp -m 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/httpd/conf.d/%{name}.conf
@ -337,11 +360,12 @@ chmod 0644 %{buildroot}%{_datadir}/%{name}/css/smoothness/jquery-ui-1.10.2.custo
%{?with_python:sed -i '1{\@^#!@d}' %{buildroot}%{_libdir}/%{name}/python_modules/*.py}
# Sysusers
%if 0%{?fedora} > 42
%if 0%{?sysusers}
install -m0644 -D %{SOURCE7} %{buildroot}%{_sysusersdir}/ganglia.conf
%endif
%if 0%{?rhel} || 0%{?fedora} < 43
%if 0%{?legacy_users}
%pre
## Add the "ganglia" user
/usr/sbin/useradd -c "Ganglia Monitoring System" \
@ -404,7 +428,7 @@ end
%dir %{_libdir}/ganglia
%{_libdir}/ganglia/*.so
%{?with_python:%exclude %{_libdir}/ganglia/modpython.so}
%if 0%{?fedora} > 42
%if 0%{?sysusers}
%{_sysusersdir}/ganglia.conf
%endif
@ -477,6 +501,21 @@ end
%dir %attr(0755,apache,apache) %{_localstatedir}/lib/%{name}-web/dwoo/compiled
%changelog
* Mon Sep 29 2025 Terje Rosten <terjeros@gmail.com> - 3.7.2-62
- Some refactoring
* Sun Sep 28 2025 Terje Rosten <terjeros@gmail.com> - 3.7.2-61
- Port to epel10
- Add TZ patches
- Remove legacy libart_lgpl-devel buildreq
- Fix URL
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.2-60
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Mon Jun 02 2025 Python Maint <python-maint@redhat.com> - 3.7.2-59
- Rebuilt for Python 3.14
* Sat Apr 05 2025 Terje Rosten <terjeros@gmail.com> - 3.7.2-58
- Follow PHP quote rules