Compare commits

..

No commits in common. "rawhide" and "f30" have entirely different histories.

5 changed files with 92 additions and 109 deletions

3
.gitignore vendored
View file

@ -6,6 +6,3 @@ awstats-7.0.tar.gz
/awstats-7.4.tar.gz
/awstats-7.6.tar.gz
/awstats-7.7.tar.gz
/awstats-7.8.tar.gz
/awstats-7.9.tar.gz
/awstats-8.0.tar.gz

View file

@ -1,6 +1,7 @@
--- awstats-7.9/tools/httpd_conf.orig 2014-09-23 09:16:09.000000000 +0200
+++ awstats-7.9/tools/httpd_conf 2023-01-18 23:30:18.097762242 +0100
@@ -10,20 +10,26 @@
diff -up awstats-7.0/tools/httpd_conf.http-2.4 awstats-7.0/tools/httpd_conf
--- awstats-7.0/tools/httpd_conf.http-2.4 2012-11-16 16:11:07.612386681 +0100
+++ awstats-7.0/tools/httpd_conf 2012-11-16 16:44:24.921755562 +0100
@@ -10,20 +10,33 @@
#
# Directives to add to your Apache conf file to allow use of AWStats as a CGI.
@ -27,7 +28,14 @@
- Order allow,deny
- Allow from all
+ <IfModule mod_authz_core.c>
+ # Apache 2.4
+ Require local
+ </IfModule>
+ <IfModule !mod_authz_core.c>
+ # Apache 2.2
+ Order allow,deny
+ Allow from 127.0.0.1
+ Allow from ::1
+ </IfModule>
</Directory>
+# Additional Perl modules

View file

@ -0,0 +1,38 @@
From: Chris Caron <lead2gold@gmail.com>
Date: Tue, 29 Nov 2016 20:33:53 -0500
Subject: update default path to be more compatible with Linux distro
Website: http://nuxref.com
Make it so you don't have to pass in the -awstats=/path/to/awstats.pl
every time any script is called.
---
diff -Naur awstats-7.4/tools/awstats_buildstaticpages.pl awstats-7.4.patched/tools/awstats_buildstaticpages.pl
--- awstats-7.4/tools/awstats_buildstaticpages.pl 2014-09-23 03:16:09.000000000 -0400
+++ awstats-7.4.patched/tools/awstats_buildstaticpages.pl 2016-11-29 20:33:53.203777945 -0500
@@ -299,6 +299,10 @@
# Check if AWSTATS prog is found
my $AwstatsFound=0;
if (-s "$Awstats") { $AwstatsFound=1; }
+elsif (-s "/usr/share/awstats/wwwroot/cgi-bin/awstats.pl") {
+ $Awstats="/usr/share/awstats/wwwroot/cgi-bin/awstats.pl";
+ $AwstatsFound=1;
+}
elsif (-s "/usr/local/awstats/wwwroot/cgi-bin/awstats.pl") {
$Awstats="/usr/local/awstats/wwwroot/cgi-bin/awstats.pl";
$AwstatsFound=1;
diff -Naur awstats-7.4/tools/awstats_updateall.pl awstats-7.4.patched/tools/awstats_updateall.pl
--- awstats-7.4/tools/awstats_updateall.pl 2014-09-23 03:16:09.000000000 -0400
+++ awstats-7.4.patched/tools/awstats_updateall.pl 2016-11-29 20:34:58.026745752 -0500
@@ -129,6 +129,10 @@
# Check if AWSTATS prog is found
my $AwstatsFound=0;
if (-s "$Awstats") { $AwstatsFound=1; }
+ elsif (-s "/usr/share/awstats/wwwroot/cgi-bin/awstats.pl") {
+ $Awstats="/usr/share/awstats/wwwroot/cgi-bin/awstats.pl";
+ $AwstatsFound=1;
+ }
elsif (-s "/usr/local/awstats/wwwroot/cgi-bin/awstats.pl") {
$Awstats="/usr/local/awstats/wwwroot/cgi-bin/awstats.pl";
$AwstatsFound=1;

View file

@ -1,16 +1,22 @@
Name: awstats
Version: 8.0
Release: 2%{?dist}
Version: 7.7
Release: 5%{?dist}
Summary: Advanced Web Statistics
# Automatically converted from old format: GPLv3+ - review is highly recommended.
License: GPL-3.0-or-later
URL: https://www.awstats.org/
Source0: https://downloads.sourceforge.net/project/awstats/AWStats/%{version}/awstats-%{version}.tar.gz
License: GPLv3+
URL: http://awstats.sourceforge.net
Source0: http://downloads.sourceforge.net/project/awstats/AWStats/%{version}/awstats-%{version}.tar.gz
Source1: %{name}.cron
Patch0: awstats-awredir.pl-sanitize-parameters.patch
%if 0%{?rhel} == 7 || 0%{?fedora}
# fix configuration for httpd 2.4 (#871366)
Patch1: awstats-7.9-httpd-2.4.patch
Patch1: awstats-7.0-httpd-2.4.patch
%endif
Patch2: awstats-awstats_path.patch
# distribution specific definitions
%define use_systemd (0%{?fedora} || 0%{?rhel} >= 7)
BuildArch: noarch
BuildRequires: coreutils
@ -18,13 +24,18 @@ BuildRequires: findutils
BuildRequires: perl-interpreter
BuildRequires: perl-generators
BuildRequires: recode
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
Requires: perl-Net-IP, perl-Net-DNS, perl-Geo-IP
Requires: crontabs
Requires: crontabs
Requires(post): perl-interpreter
%if %use_systemd
# For systemd.macros
BuildRequires: systemd
Requires(postun): systemd
%else
Requires(postun): /sbin/service
%endif
## SELinux policy is now included upstream
Obsoletes: awstats-selinux < 6.8-1
@ -32,26 +43,29 @@ Provides: awstats-selinux = %{version}-%{release}
%description
Advanced Web Statistics is a powerful and full-featured tool that generates
advanced web server graphical statistics. This server log analyzer works
from the command line or as a CGI and shows all information your log contains,
in graphical web pages. It can analyze a lot of web/wap/proxy servers such as
Apache, IIS, Weblogic, Webstar, Squid, ... but also mail or FTP servers.
Advanced Web Statistics is a powerful and featureful tool that generates
advanced web server graphic statistics. This server log analyzer works
from command line or as a CGI and shows you all information your log contains,
in graphical web pages. It can analyze a lot of web/wap/proxy servers like
Apache, IIS, Weblogic, Webstar, Squid, ... but also mail or ftp servers.
This program can measure visits, unique visitors, authenticated users, pages,
This program can measure visits, unique vistors, authenticated users, pages,
domains/countries, OS busiest times, robot visits, type of files, search
engines/keywords used, visit duration, HTTP errors and more...
engines/keywords used, visits duration, HTTP errors and more...
Statistics can be updated from a browser or your scheduler.
The program also supports virtual servers, plugins and a lot of features.
With the default configuration, the statistics are available at:
With the default configuration, the statistics are available:
http://localhost/awstats/awstats.pl
%prep
%setup -q
%patch -P0 -p 1
%patch -P1 -p 1
%patch0 -p 1
%if 0%{?rhel} == 7 || 0%{?fedora}
%patch1 -p 1
%endif
%patch2 -p 1
# Fix style sheets.
perl -pi -e 's,/icon,/awstatsicons,g' wwwroot/css/*
@ -62,8 +76,7 @@ find tools/xslt -type f | xargs chmod -x
perl -pi -e 's/\r//g' docs/COPYING.TXT docs/LICENSE.TXT docs/pad_awstats.xml docs/awstats_changelog.txt docs/styles.css tools/httpd_conf tools/logresolvemerge.pl tools/awstats_exportlib.pl tools/awstats_buildstaticpages.pl tools/maillogconvert.pl tools/urlaliasbuilder.pl wwwroot/cgi-bin/awredir.pl
# Encoding
recode ISO-8859-1..UTF-8 docs/awstats_changelog.txt
# Stray version control file
rm -f tools/webmin/.gitignore
%install
rm -rf $RPM_BUILD_ROOT
@ -103,9 +116,9 @@ perl -pi -e '
' $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/%{name}.model.conf
install -p -m 644 $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/%{name}.{model,localhost.localdomain}.conf
# Fix AWStats path in scripts
# Fix scripts
perl -pi -e 's|/usr/local/awstats|%{_datadir}/awstats|g' \
$RPM_BUILD_ROOT%{_datadir}/%{name}/tools/*.pl
$RPM_BUILD_ROOT%{_datadir}/%{name}/tools/{*.pl}
# Apache configuration
install -p -m 644 tools/httpd_conf $RPM_BUILD_ROOT/%{_sysconfdir}/httpd/conf.d/%{name}.conf
@ -117,7 +130,7 @@ install -m 0750 -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly/%{name}
# https://bugzilla.redhat.com/show_bug.cgi?id=1196549
cd $RPM_BUILD_ROOT%{_datadir}/%{name}/wwwroot/icon
for i in browser/adobe.png browser/seamonkey.png os/win*.png os/macos*.png cpu/intel.png cpu/ibm.png; do
cp -v os/unknown.png $i
cp -v os/unknown.png $i
done
cd -
@ -133,7 +146,13 @@ if [ $1 -eq 1 ]; then
fi
%postun
%if %use_systemd
%systemd_postun_with_restart httpd.service
%else
if [ $1 -ne 0 ]; then
/sbin/service httpd condrestart >/dev/null 2>&1
fi
%endif
%files
@ -159,85 +178,6 @@ fi
%changelog
* Fri Jan 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 8.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
* Sat Nov 22 2025 Tim Jackson <rpm@timj.co.uk> - 8.0-1
* Update to 8.0
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 7.9-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 7.9-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Thu Jul 25 2024 Miroslav Suchý <msuchy@redhat.com> - 7.9-6
- convert license to SPDX
* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 7.9-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Tue Jan 23 2024 Fedora Release Engineering <releng@fedoraproject.org> - 7.9-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 7.9-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 7.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Wed Jan 18 2023 Tim Jackson <rpm@timj.co.uk> - 7.9-1
- Version 7.9
* Wed Jan 18 2023 Fedora Release Engineering <releng@fedoraproject.org> - 7.8-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Mon Jan 09 2023 Tim Jackson <rpm@timj.co.uk> - 7.8-9
- Fix CVE-2022-46391 (rhbz #2150632)
- Clean up spec file, removing conditionals for now-obsolete releases
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 7.8-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon May 30 2022 Jitka Plesnikova <jplesnik@redhat.com> - 7.8-7
- Perl 5.36 rebuild
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 7.8-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 7.8-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri May 21 2021 Jitka Plesnikova <jplesnik@redhat.com> - 7.8-4
- Perl 5.34 rebuild
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 7.8-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Dec 30 2020 Tim Jackson <rpm@timj.co.uk> - 7.8-2
- Fix CVE-2020-35176
* Fri Aug 07 2020 Tim Jackson <rpm@timj.co.uk> - 7.8-1
- Version 7.8
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 7.7-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri Jun 26 2020 Jitka Plesnikova <jplesnik@redhat.com> - 7.7-10
- Perl 5.32 re-rebuild of bootstrapped packages
* Mon Jun 22 2020 Jitka Plesnikova <jplesnik@redhat.com> - 7.7-9
- Perl 5.32 rebuild
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 7.7-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 7.7-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu May 30 2019 Jitka Plesnikova <jplesnik@redhat.com> - 7.7-6
- Perl 5.30 rebuild
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 7.7-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

View file

@ -1 +1 @@
SHA512 (awstats-8.0.tar.gz) = b14f820e2ea6895baa0034828bba422d2f0dadd70387f682c1e9f25a72d8817ecf91127e254d6c6e7e7c866e02860a05112b0ac4452da7e71b2d9a6f57f21d03
SHA512 (awstats-7.7.tar.gz) = 8bf32b0650ef0cc900a16eead866da3847d81c2696e7a90fb49833679c958768833d781e5b4becd9b4f6748c7266e2887ff7ff33d98293ce3a0296a810fbe899