.gear/rules | 2 + .../tags/6c78feadb1d61594a9e5c52d5333dc4b7d15b17f | 6 + .gear/tags/list | 1 + .gear/upstream/remotes | 3 + LogAnalyzer-apache.conf | 13 ++ LogAnalyzer.spec | 133 +++++++++++++++++++++ src/chartgenerator.php | 14 +-- src/include/functions_frontendhelpers.php | 4 +- 8 files changed, 167 insertions(+), 9 deletions(-) diff --git a/.gear/rules b/.gear/rules new file mode 100644 index 0000000..4b0460c --- /dev/null +++ b/.gear/rules @@ -0,0 +1,2 @@ +tar: v@version@:. +diff: v@version@:. . diff --git a/.gear/tags/6c78feadb1d61594a9e5c52d5333dc4b7d15b17f b/.gear/tags/6c78feadb1d61594a9e5c52d5333dc4b7d15b17f new file mode 100644 index 0000000..8c89a87 --- /dev/null +++ b/.gear/tags/6c78feadb1d61594a9e5c52d5333dc4b7d15b17f @@ -0,0 +1,6 @@ +object 58c1e8ab2084f5b1cdaedba190b9e03bbc986939 +type commit +tag v4.1.13 +tagger Andre Lorbach 1666183753 +0200 + +v4.1.13 (stable) diff --git a/.gear/tags/list b/.gear/tags/list new file mode 100644 index 0000000..ada6902 --- /dev/null +++ b/.gear/tags/list @@ -0,0 +1 @@ +6c78feadb1d61594a9e5c52d5333dc4b7d15b17f v4.1.13 diff --git a/.gear/upstream/remotes b/.gear/upstream/remotes new file mode 100644 index 0000000..4d20770 --- /dev/null +++ b/.gear/upstream/remotes @@ -0,0 +1,3 @@ +[remote "upstream"] + url = https://github.com/rsyslog/loganalyzer.git + fetch = +refs/heads/*:refs/remotes/upstream/* diff --git a/LogAnalyzer-apache.conf b/LogAnalyzer-apache.conf new file mode 100644 index 0000000..9e85ff9 --- /dev/null +++ b/LogAnalyzer-apache.conf @@ -0,0 +1,13 @@ +Alias /LogAnalyzer /usr/share/LogAnalyzer +Alias /loganalyzer /usr/share/LogAnalyzer + + + Options -Indexes + = 2.4> + Require all granted + + + Order allow,deny + Allow from all + + diff --git a/LogAnalyzer.spec b/LogAnalyzer.spec new file mode 100644 index 0000000..1e58c72 --- /dev/null +++ b/LogAnalyzer.spec @@ -0,0 +1,133 @@ +%define wwwdir %_datadir/%name +%define phpver 8.1 + +Summary: A syslog data viewer for the web +Name: LogAnalyzer +Version: 4.1.13 +Release: alt1 +License: GPLv3+ +Group: Monitoring +Url: http://loganalyzer.adiscon.com/ +VCS: https://github.com/rsyslog/loganalyzer.git +Source: %name-%version.tar +Patch: %name-%version-%release.patch +BuildArch: noarch +Provides: phplogcon + +Requires(pre): webserver-common +Requires: fonts-ttf-vera + +BuildPreReq: rpm-macros-webserver-common rpm-macros-apache2 + +%description +LogAnalyzer project provides an easy to use but powerful front end for +searching, reviewing and analyzing network event data, including +syslog, windows event log and many other event sources. + +%package apache2 +Group: Networking/WWW +BuildArch: noarch +Summary: apache2 configs for %name +Requires: %name = %EVR +Requires: %name-php%phpver +Requires: apache2-httpd-prefork-like php-engine + +%description apache2 +%summary + +%package php%phpver +Group: Networking/WWW +BuildArch: noarch +Summary: php virtual package for %name +Provides: %name-php +Requires: %name = %EVR +Requires: php%phpver-mysqli +Requires: php%phpver-ldap php%phpver-pdo php%phpver-mbstring +Requires: php%phpver-gd2 + +%description php%phpver +%summary + +%prep +%setup -n %name-%version +%patch -p1 + +%build +#rm -rf src/classes/jpgraph +rm -rf src/BitstreamVeraFonts + +%install +mkdir -p %buildroot{%_sysconfdir/cron.d,%wwwdir,%_sysconfdir/%name} +cp -aRf src/* %buildroot%wwwdir/ + +touch %buildroot%_sysconfdir/%name/config.php +ln -s ../../..%_sysconfdir/%name/config.php %buildroot%wwwdir/config.php + +install -pDm644 LogAnalyzer-apache.conf %buildroot%apache2_extra_available/%name.conf + +# It is the file in the package named Thumbs.db or Thumbs.db.gz, +# which is normally a Windows image thumbnail database. +# Such databases are generally useless in packages and were usually +# accidentally included by copying complete directories from the source tarball. +find $RPM_BUILD_ROOT \( -name 'Thumbs.db' -o -name 'Thumbs.db.gz' \) -print -delete + + +%files +%doc COPYING INSTALL ChangeLog LogAnalyzer-apache.conf doc +%dir %attr(750,root,%webserver_group) %_sysconfdir/%name +%attr(640,root,%webserver_group) %config(noreplace) %_sysconfdir/%name/config.php +%dir %wwwdir +%wwwdir/* + +%files apache2 +%config(noreplace) %apache2_extra_available/%name.conf + +%files php%phpver + +%changelog +* Tue Aug 08 2023 Anton Farygin 4.1.13-alt1 +- update to 4.1.13 +- use php 8.1 as default php for LogAnalyzer + +* Tue Dec 15 2020 Alexey Shabalin 4.1.11-alt1 +- new version 4.1.11 + +* Tue Mar 05 2019 Alexey Shabalin 4.1.7-alt2 +- drop php5 package + +* Tue Jan 22 2019 Alexey Shabalin 4.1.7-alt1 +- 4.1.7 + +* Wed Apr 11 2018 Alexey Shabalin 4.1.6-alt1 +- 4.1.6 +- add php5, php7, apache2 packages + +* Mon Nov 28 2016 Alexey Shabalin 4.1.5-alt1 +- 4.1.5 +- use bundled jpgraph + +* Tue Oct 22 2013 Alexey Shabalin 3.6.5-alt1 +- 3.6.5 + +* Tue Sep 03 2013 Alexey Shabalin 3.6.4-alt1 +- 3.6.4 + +* Thu Jul 11 2013 Alexey Shabalin 3.6.3-alt1 +- 3.6.3 + +* Mon Aug 27 2012 Repocop Q. A. Robot 3.4.4-alt1.qa1 +- NMU (by repocop). See http://www.altlinux.org/Tools/Repocop +- applied repocop fixes: + * windows-thumbnail-database-in-package for LogAnalyzer + +* Tue Aug 07 2012 Michael Shigorin 3.4.4-alt1 +- 3.4.4 + +* Mon Mar 12 2012 Alexey Shabalin 3.4.1-alt1 +- 3.4.1 + +* Mon Oct 17 2011 Alexey Shabalin 3.2.2-alt1 +- 3.2.2 + +* Fri Jun 10 2011 Alexey Shabalin 3.2.1-alt1 +- initial build for ALT Linux Sisyphus diff --git a/src/chartgenerator.php b/src/chartgenerator.php index d52e9a9..75d85bc 100644 --- a/src/chartgenerator.php +++ b/src/chartgenerator.php @@ -49,7 +49,7 @@ include_once($gl_root_path . 'include/functions_filters.php'); include_once($gl_root_path . 'classes/logstream.class.php'); // Include basic jpgraph lib -require_once ($gl_root_path . "classes/jpgraph/jpgraph.php"); +require_once ("jpgraph/jpgraph.php"); InitPhpLogCon(); InitSourceConfigs(); @@ -221,8 +221,8 @@ if ( !$content['error_occured'] ) if ( $content['chart_type'] == CHART_CAKE ) { // Include additional code filers for this chart! - include_once ($gl_root_path . "classes/jpgraph/jpgraph_pie.php"); - include_once ($gl_root_path . "classes/jpgraph/jpgraph_pie3d.php"); + include_once ("jpgraph/jpgraph_pie.php"); + include_once ("jpgraph/jpgraph_pie3d.php"); // Create Basic Image, and set basic properties! $graph = new PieGraph($content['chart_width'], $content['chart_width'], 'auto'); @@ -295,8 +295,8 @@ if ( !$content['error_occured'] ) else if ( $content['chart_type'] == CHART_BARS_VERTICAL ) { // Include additional code filers for this chart! - include_once ($gl_root_path . "classes/jpgraph/jpgraph_bar.php"); - include_once ($gl_root_path . "classes/jpgraph/jpgraph_line.php"); + include_once ("jpgraph/jpgraph_bar.php"); + include_once ("jpgraph/jpgraph_line.php"); // Create Basic Image, and set basic properties! $graph = new Graph($content['chart_width'], $content['chart_width'], 'auto'); @@ -381,8 +381,8 @@ if ( !$content['error_occured'] ) else if ( $content['chart_type'] == CHART_BARS_HORIZONTAL ) { // Include additional code filers for this chart! - include_once ($gl_root_path . "classes/jpgraph/jpgraph_bar.php"); - include_once ($gl_root_path . "classes/jpgraph/jpgraph_line.php"); + include_once ("jpgraph/jpgraph_bar.php"); + include_once ("jpgraph/jpgraph_line.php"); // Create Basic Image, and set basic properties! $graph = new Graph($content['chart_width'], $content['chart_width'], 'auto'); diff --git a/src/include/functions_frontendhelpers.php b/src/include/functions_frontendhelpers.php index 762bc71..a3478e0 100644 --- a/src/include/functions_frontendhelpers.php +++ b/src/include/functions_frontendhelpers.php @@ -122,7 +122,7 @@ function GetAdditionalUrl($skipParam, $appendParam = "") function CreateCurrentUrl() { global $content; - $content['CURRENTURL'] = $_SERVER['PHP_SELF']; // . "?" . $_SERVER['QUERY_STRING'] + $content['CURRENTURL'] = ltrim($_SERVER['PHP_SELF'],'/'); // . "?" . $_SERVER['QUERY_STRING'] // Init additional_url helper variable $content['additional_url'] = ""; @@ -328,4 +328,4 @@ function GetPriorityFromDebugLevel( $DebugLevel ) } } -?> \ No newline at end of file +?>