summaryrefslogtreecommitdiff
path: root/network/awstats/patches
diff options
context:
space:
mode:
authorNishant Limbachia <nishant@mnspace.net>2010-05-12 23:31:57 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-12 23:31:57 +0200
commitb48f6cb313d338a6214cd56e4e45c7c64b7537c3 (patch)
tree742597036319417706c9f79df225cfbd47c62c3a /network/awstats/patches
parent4f593e6145ffc72d2387e25075915535d5401a70 (diff)
downloadslackbuilds-b48f6cb313d338a6214cd56e4e45c7c64b7537c3.tar.gz
network/awstats: Added to 12.2 repository
Diffstat (limited to 'network/awstats/patches')
-rw-r--r--network/awstats/patches/awstats_configure.pl.patch55
-rw-r--r--network/awstats/patches/httpd-awstats.conf.patch39
2 files changed, 94 insertions, 0 deletions
diff --git a/network/awstats/patches/awstats_configure.pl.patch b/network/awstats/patches/awstats_configure.pl.patch
new file mode 100644
index 0000000000..2f1e51f5c3
--- /dev/null
+++ b/network/awstats/patches/awstats_configure.pl.patch
@@ -0,0 +1,55 @@
+By Nishant Limbachia <nishant@mnspace.net>
+
+Patch awstats_configure.pl file in case somebody runs it.
+Following things are patched:
+1. Use correct paths
+2. Stop awstats_configure.pl to get the current working directory
+ on first run (use standard path instead)
+3. Added support to restart httpd server for Slackware
+
+--- tools/awstats_configure.pl.orig 2009-01-27 13:23:05.000000000 -0600
++++ tools/awstats_configure.pl 2009-01-27 13:36:46.000000000 -0600
+@@ -28,16 +28,14 @@
+ $AWSTATS_MODEL_CONFIG
+ $AWSTATS_DIRDATA_PATH
+ /;
+-$AWSTATS_PATH='';
+-$AWSTATS_ICON_PATH='/usr/local/awstats/wwwroot/icon';
+-$AWSTATS_CSS_PATH='/usr/local/awstats/wwwroot/css';
+-$AWSTATS_CLASSES_PATH='/usr/local/awstats/wwwroot/classes';
+-$AWSTATS_CGI_PATH='/usr/local/awstats/wwwroot/cgi-bin';
++$AWSTATS_PATH='@DOCROOT@/awstats';
++$AWSTATS_ICON_PATH='$AWSTATS_PATH/wwwroot/icon';
++$AWSTATS_CSS_PATH='$AWSTATS_PATH/wwwroot/css';
++$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
+
+-
+-
+ #-------------------------------------------------------
+ # Defines
+ #-------------------------------------------------------
+@@ -306,7 +304,7 @@
+ print "\n-----> Running OS detected: $OSLib{$OS}\n";
+
+ if ($OS eq 'linux') {
+- $AWSTATS_PATH=`pwd`; $AWSTATS_PATH =~ s/[\r\n]//;
++ $AWSTATS_PATH =~ s/[\r\n]//;
+ $AWSTATS_PATH=~s/tools[\\\/]?$//;
+ $AWSTATS_PATH=~s/[\\\/]$//;
+ if ($AWSTATS_PATH ne '/usr/local/awstats') {
+@@ -662,6 +660,12 @@
+ print "\n-----> Restart Web server with '$command'\n";
+ my $ret=`$command`;
+ print "$ret";
++ } 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 (-x "/sbin/service") {
+ # We are not on debian
+ my $command="/sbin/service httpd restart";
diff --git a/network/awstats/patches/httpd-awstats.conf.patch b/network/awstats/patches/httpd-awstats.conf.patch
new file mode 100644
index 0000000000..da4edd5de2
--- /dev/null
+++ b/network/awstats/patches/httpd-awstats.conf.patch
@@ -0,0 +1,39 @@
+By Nishant Limbachia <nishant@mnspace.net>
+1. Fixup paths for SlackBuilds.org
+2. Tighten default access mode
+
+--- tools/httpd_conf.orig 2009-01-27 10:41:54.000000000 -0600
++++ tools/httpd_conf 2009-01-27 15:04:31.000000000 -0600
+@@ -1,23 +1,19 @@
+ #
+-# Content of this file, with correct values, can be automatically added to
+-# your Apache server by using the AWStats configure.pl tool.
+-#
+-
+-#
+ # 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.
+ #
+-Alias /awstatsclasses "/usr/local/awstats/wwwroot/classes/"
+-Alias /awstatscss "/usr/local/awstats/wwwroot/css/"
+-Alias /awstatsicons "/usr/local/awstats/wwwroot/icon/"
+-ScriptAlias /awstats/ "/usr/local/awstats/wwwroot/cgi-bin/"
++
++Alias /awstatsclasses "@DOCROOT@/awstats/wwwroot/classes/"
++Alias /awstatscss "@DOCROOT@/awstats/wwwroot/css/"
++Alias /awstatsicons "@DOCROOT@/awstats/wwwroot/icon/"
++ScriptAlias /awstats/ "@DOCROOT@/awstats/wwwroot/cgi-bin/"
+
+ #
+ # This is to permit URL access to scripts/files in AWStats directory.
+ #
+-<Directory "/usr/local/awstats/wwwroot">
++<Directory "@DOCROOT@/awstats/wwwroot">
+ Options None
+ AllowOverride None
+- Order allow,deny
+- Allow from all
++ Order deny,allow
++ Deny from all
++ Allow from localhost
+ </Directory>