diff options
author | Nishant Limbachia <nishant@mnspace.net> | 2016-07-21 16:19:26 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2016-07-21 22:30:28 +0700 |
commit | 0033396c224c11993d48a192f9180c212758e85e (patch) | |
tree | 8f5e71ad129892dad45e62e76b2d4d1acf2691f3 /network/awstats | |
parent | 90b6b88ebe7b3549499bd89d846a5d90c63f4afb (diff) |
network/awstats: Updated for version 7.5.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/awstats')
-rw-r--r-- | network/awstats/README | 13 | ||||
-rw-r--r-- | network/awstats/awstats.SlackBuild | 13 | ||||
-rw-r--r-- | network/awstats/awstats.info | 8 | ||||
-rw-r--r-- | network/awstats/doinst.sh | 7 | ||||
-rw-r--r-- | network/awstats/patches/awstats.pl.patch | 21 | ||||
-rw-r--r-- | network/awstats/patches/awstats_configure.pl.patch | 15 | ||||
-rw-r--r-- | network/awstats/patches/fixup-warnings-in-perl-522.patch | 22 | ||||
-rw-r--r-- | network/awstats/patches/httpd-awstats.conf.patch | 10 |
8 files changed, 54 insertions, 55 deletions
diff --git a/network/awstats/README b/network/awstats/README index d790a9a2db584..68693856c0a2d 100644 --- a/network/awstats/README +++ b/network/awstats/README @@ -6,7 +6,7 @@ major server tools like Apache log files and a lot of other web, proxy, wap, streaming servers, mail servers and some ftp servers. There's an automated script (awstats_configure.pl) to prepare the httpd -config file located in DOCROOT/awstats/tools/ - however, you should not +config file located in DOCROOT/awstats/ - however, you should not need/want to run it; instead, everything should work well if you make the changes listed below. @@ -18,9 +18,14 @@ Short How-to for using AWStats as CGI: Add the following include line /etc/httpd/httpd.conf: Include /etc/httpd/extra/httpd-awstats.conf +You need to load mod_cgid.so and mod_cgi.so modules Then restart httpd: "/etc/rc.d/rc.httpd restart" -A sample config file will be placed in /etc/awstats; please read it and -make the necessary changes for your system. To run awstats, please refer -to the documentation in the package. +A sample config file will be placed in /etc/awstats; Make some necessary changes +and please read the necessary steps to start awstats from online page +starting from step 4: +http://www.awstats.org/docs/awstats_setup.html + +If you wish to update the process automatically, please refer to: +http://www.awstats.org/docs/awstats_faq.html#CRONTAB diff --git a/network/awstats/awstats.SlackBuild b/network/awstats/awstats.SlackBuild index c09e88d0ed639..e2b193dabc55c 100644 --- a/network/awstats/awstats.SlackBuild +++ b/network/awstats/awstats.SlackBuild @@ -3,7 +3,7 @@ # Slackware Package Build Script for awstats # Home Page http://awstats.sourceforge.net/ -# Copyright (c) 2009-2014, Nishant Limbachia, Hoffman Estates, IL, USA +# Copyright (c) 2009-2016, Nishant Limbachia, Hoffman Estates, IL, USA # <nishant _AT_ mnspace _DOT_ net> # All rights reserved. # @@ -28,7 +28,7 @@ # Modified by the SlackBuilds.org project. PRGNAM="awstats" -VERSION=${VERSION:-7.4} +VERSION=${VERSION:-7.5} # hardcode ARCH ARCH=noarch BUILD=${BUILD:-1} @@ -57,21 +57,20 @@ find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ -o -perm 511 \) -exec chmod 755 {} \; -o \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; - -# https://sourceforge.net/p/awstats/bugs/943/ -patch -p1 < $CWD/patches/fixup-warnings-in-perl-522.patch + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; # Patch httpd_conf file supplied by awstats to correct paths sed s:@DOCROOT@:$DOCROOT: $CWD/patches/httpd-awstats.conf.patch | patch -p0 # Patch awstats_configure.pl file -- see patch header for details sed s:@DOCROOT@:$DOCROOT: $CWD/patches/awstats_configure.pl.patch | patch -p0 +# patch awstats.pl +sed s:@DOCROOT@:$DOCROOT: $CWD/patches/awstats.pl.patch | patch -p0 mkdir -p $PKG/$DOCROOT/awstats $PKG/usr/doc/$PRGNAM-$VERSION mkdir -p $PKG/etc/awstats $PKG/etc/httpd/extra mkdir -m 0770 -p $PKG/var/lib/awstats -cp -a docs/* $PKG/usr/doc/$PRGNAM-$VERSION +cp -a README.md docs/* $PKG/usr/doc/$PRGNAM-$VERSION cp -a tools/nginx/awstats-fcgi.php \ tools/nginx/awstats-nginx.conf $PKG/usr/doc/$PRGNAM-$VERSION cp -a tools/*.pl wwwroot $PKG/$DOCROOT/awstats diff --git a/network/awstats/awstats.info b/network/awstats/awstats.info index 7c841b9ea7259..edf6de5d1f1cd 100644 --- a/network/awstats/awstats.info +++ b/network/awstats/awstats.info @@ -1,10 +1,10 @@ PRGNAM="awstats" -VERSION="7.4" +VERSION="7.5" HOMEPAGE="http://awstats.sourceforge.net/" -DOWNLOAD="http://prdownloads.sourceforge.net/awstats/awstats-7.4.tar.gz" -MD5SUM="2ff8854a471947578ba98f43e9d0db95" +DOWNLOAD="https://prdownloads.sourceforge.net/awstats/awstats-7.5.tar.gz" +MD5SUM="1b11916a0a369a014abeb128289bf6b9" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="jdk" +REQUIRES="" MAINTAINER="Nishant Limbachia" EMAIL="nishant@mnspace.net" diff --git a/network/awstats/doinst.sh b/network/awstats/doinst.sh index 261cfac12ddcb..611e9b15c0070 100644 --- a/network/awstats/doinst.sh +++ b/network/awstats/doinst.sh @@ -11,13 +11,6 @@ config() { # Otherwise, we leave the .new copy for the admin to consider... } -# Keep same perms: -if [ -e etc/httpd/extra/httpd-awstats.conf.new ]; then - cp -a etc/httpd/extra/httpd-awstats.conf etc/httpd/extra/httpd-awstats.conf.new.incoming - cat etc/httpd/extra/httpd-awstats.conf.new > etc/httpd/extra/httpd-awstats.conf.new.incoming - mv etc/httpd/extra/httpd-awstats.conf.new.incoming etc/httpd/extra/httpd-awstats.conf.new -fi - config etc/httpd/extra/httpd-awstats.conf.new config etc/awstats/awstats.model.conf.new diff --git a/network/awstats/patches/awstats.pl.patch b/network/awstats/patches/awstats.pl.patch new file mode 100644 index 0000000000000..a749b988e22a2 --- /dev/null +++ b/network/awstats/patches/awstats.pl.patch @@ -0,0 +1,21 @@ +--- wwwroot/cgi-bin/awstats.pl.orig 2016-07-21 17:42:26.196363651 +0700 ++++ wwwroot/cgi-bin/awstats.pl 2016-07-21 17:44:55.882578219 +0700 +@@ -2223,7 +2223,7 @@ + # Check lib files in common possible directories : + # Windows and standard package: "$DIR/lib" (lib in same dir than awstats.pl) + # Debian package: "/usr/share/awstats/lib" +- my @PossibleLibDir = ( "$DIR/lib", "/usr/share/awstats/lib" ); ++ my @PossibleLibDir = ( "$DIR/lib", "/usr/share/awstats/lib", "@DOCROOT@/awstats/wwwroot/cgi-bin/lib" ); + my %FilePath = (); + my %DirAddedInINC = (); + my @FileListToLoad = (); +@@ -3114,7 +3114,8 @@ + my @PossiblePluginsDir = ( + "$DIR/plugins", + "/usr/local/awstats/wwwroot/cgi-bin/plugins", +- "/usr/share/awstats/plugins" ++ "/usr/share/awstats/plugins", ++ "@DOCROOT@/awstats/wwwroot/cgi-bin/plugins" + ); + my %DirAddedInINC = (); + diff --git a/network/awstats/patches/awstats_configure.pl.patch b/network/awstats/patches/awstats_configure.pl.patch index 67871229acb8f..20c4e127f79ad 100644 --- a/network/awstats/patches/awstats_configure.pl.patch +++ b/network/awstats/patches/awstats_configure.pl.patch @@ -1,6 +1,6 @@ ---- tools/awstats_configure.pl.orig 2014-01-29 09:06:10.000000000 -0600 -+++ tools/awstats_configure.pl 2014-03-01 09:09:03.516604388 -0600 -@@ -27,11 +27,11 @@ +--- tools/awstats_configure.pl.orig 2016-05-13 15:17:18.396302299 -0500 ++++ tools/awstats_configure.pl 2016-05-13 16:09:13.880063387 -0500 +@@ -27,13 +27,13 @@ $AWSTATS_MODEL_CONFIG $AWSTATS_DIRDATA_PATH /; @@ -15,7 +15,10 @@ +$AWSTATS_CLASSES_PATH='$AWSTATS_PATH/wwwroot/classes'; +$AWSTATS_CGI_PATH='$AWSTATS_PATH/wwwroot/cgi-bin'; $AWSTATS_MODEL_CONFIG='/etc/awstats/awstats.model.conf'; # Used only when configure ran on linux - $AWSTATS_DIRDATA_PATH='/var/lib/awstats'; # Used only when configure ran on linux +-$AWSTATS_DIRDATA_PATH='/var/lib/awstats'; # Used only when configure ran on linux ++$AWSTATS_DIRDATA_PATH='/var/lib/awstats'; # Used only when configure ran on linux + + @@ -305,7 +305,7 @@ print "\n-----> Running OS detected: $OSLib{$OS}\n"; @@ -31,13 +34,13 @@ if ($WebServerChanged) { if ($OS eq 'linux') { - if (-f "/etc/debian_version") { -+ if (-f "/etc/slackware-version") { ++ if (-f "/etc/slackware-version") { + # We are on Slackware :) + my $command="/etc/rc.d/rc.httpd restart"; + print "\n-----> Restart Web server with '$command'\n"; + my $ret=`$command`; + print "$ret"; -+ } elsif (-f "/etc/debian_version") { ++ } elsif (-f "/etc/debian_version") { # We are on debian my $command="/etc/init.d/apache restart"; print "\n-----> Restart Web server with '$command'\n"; diff --git a/network/awstats/patches/fixup-warnings-in-perl-522.patch b/network/awstats/patches/fixup-warnings-in-perl-522.patch deleted file mode 100644 index 6adaba998de0b..0000000000000 --- a/network/awstats/patches/fixup-warnings-in-perl-522.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -Nur awstats-7.4.orig/wwwroot/cgi-bin/awstats.pl awstats-7.4/wwwroot/cgi-bin/awstats.pl ---- awstats-7.4.orig/wwwroot/cgi-bin/awstats.pl 2015-07-14 07:52:31.000000000 -0500 -+++ awstats-7.4/wwwroot/cgi-bin/awstats.pl 2016-02-17 16:51:41.341139338 -0600 -@@ -9040,12 +9040,12 @@ - $LogFormatString =~ s/%>s/%code/g; - $LogFormatString =~ s/%b(\s)/%bytesd$1/g; - $LogFormatString =~ s/%b$/%bytesd/g; -- $LogFormatString =~ s/\"%{Referer}i\"/%refererquot/g; -- $LogFormatString =~ s/\"%{User-Agent}i\"/%uaquot/g; -- $LogFormatString =~ s/%{mod_gzip_input_size}n/%gzipin/g; -- $LogFormatString =~ s/%{mod_gzip_output_size}n/%gzipout/g; -- $LogFormatString =~ s/%{mod_gzip_compression_ratio}n/%gzipratio/g; -- $LogFormatString =~ s/\(%{ratio}n\)/%deflateratio/g; -+ $LogFormatString =~ s/\"%\{Referer}i\"/%refererquot/g; -+ $LogFormatString =~ s/\"%\{User-Agent}i\"/%uaquot/g; -+ $LogFormatString =~ s/%\{mod_gzip_input_size}n/%gzipin/g; -+ $LogFormatString =~ s/%\{mod_gzip_output_size}n/%gzipout/g; -+ $LogFormatString =~ s/%\{mod_gzip_compression_ratio}n/%gzipratio/g; -+ $LogFormatString =~ s/\(%\{ratio}n\)/%deflateratio/g; - - # Replacement for a IIS and ISA format string - $LogFormatString =~ s/cs-uri-query/%query/g; # Must be before cs-uri diff --git a/network/awstats/patches/httpd-awstats.conf.patch b/network/awstats/patches/httpd-awstats.conf.patch index 082e5e9eeedd0..e555bda027ade 100644 --- a/network/awstats/patches/httpd-awstats.conf.patch +++ b/network/awstats/patches/httpd-awstats.conf.patch @@ -1,5 +1,5 @@ ---- tools/httpd_conf.orig 2013-11-03 16:35:52.000000000 -0600 -+++ tools/httpd_conf 2014-03-01 08:58:34.894297509 -0600 +--- tools/httpd_conf.orig 2016-07-21 17:38:42.889026388 +0700 ++++ tools/httpd_conf 2016-07-21 17:38:44.177011033 +0700 @@ -12,18 +12,20 @@ # Directives to add to your Apache conf file to allow use of AWStats as a CGI. # Note that path "/usr/local/awstats/" must reflect your AWStats install path. @@ -19,13 +19,13 @@ # -<Directory "/usr/local/awstats/wwwroot"> - Options None -+# Allowing access only via local machine may be too restrictive so you can -+# set Require ip directive below to allow access to AWStats -+# via your local LAN. +<Directory "@DOCROOT@/awstats/wwwroot"> + Options FollowSymLinks ExecCGI AllowOverride None - Order allow,deny - Allow from all ++ AddHandler cgi-script pl ++ DirectoryIndex awstats.pl ++ Require all granted + Require ip 127.0.0.1 </Directory> |