summaryrefslogtreecommitdiff
path: root/net-analyzer/sarg
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-12-18 15:11:02 +0000
committerV3n3RiX <venerix@redcorelinux.org>2017-12-18 15:11:02 +0000
commit0fb71e0215ed52863e462cccef73c01aff44d43d (patch)
tree428fc3fa92f9c69ed02878e9b6151a9fb810e651 /net-analyzer/sarg
parent9bd54251864651f49e673a08aec9ef79cfe08f04 (diff)
gentoo resync : 18.12.2017
Diffstat (limited to 'net-analyzer/sarg')
-rw-r--r--net-analyzer/sarg/Manifest4
-rw-r--r--net-analyzer/sarg/files/sarg-2.3.10-bool.patch11
-rw-r--r--net-analyzer/sarg/files/sarg-2.3.10-config.patch94
-rw-r--r--net-analyzer/sarg/files/sarg-2.3.10-format.patch77
-rw-r--r--net-analyzer/sarg/sarg-2.3.10-r1.ebuild44
5 files changed, 230 insertions, 0 deletions
diff --git a/net-analyzer/sarg/Manifest b/net-analyzer/sarg/Manifest
index d6fa1dd697d1..57031c4aeee1 100644
--- a/net-analyzer/sarg/Manifest
+++ b/net-analyzer/sarg/Manifest
@@ -1,5 +1,9 @@
+AUX sarg-2.3.10-bool.patch 228 BLAKE2B 38c1ca6c03c316afab832c2680afc433d499a9f0218c004996b4f74ef24395c57bd3e2355d1af0244b31d1a50f017faf96ca8e75e142884a3b2ab5ac66bbb7e6 SHA512 f5f5aa42a16e01fe84c4f62715215ed960323b1c2525281c1433e20bde08c1ed4c0a460b635905d2fd7a0269cff232446b557c30dc49b4652988f660b832f618
+AUX sarg-2.3.10-config.patch 2612 BLAKE2B 8d0d6bdab60784dd9c289e974dba087b11234b3f961c951bd96ce76a59bdc36f8da5fe5f3c4268f238b5c25f34baa69f97c1e05fbd161abaecb2eb7949d9591d SHA512 e04a971a0838bef3e777708c3328ff940cce84d934de72014eafbcc5123cb8ff2075c30aafdb4ae4541778c6c0fcce38ac32b6dde57ed1a52fc03f1b1f980cda
+AUX sarg-2.3.10-format.patch 1541 BLAKE2B cfa03a3dad67f3ca8ec3b47db8755f5760b3780bedcb29549e04cecc955212003930e2a467749e964ab8073a404d55359826132e43ff6d1a01228a1a6fe79229 SHA512 d3c25d94da93dd1308b9c035fff3ddf6a241327596c182d85d79f183b659fa20ea8e806e5b1e3e8675dae843744b7329d03e572260c6932466694103180c8bd6
AUX sarg-2.3.9-configure-bash.patch 4033 BLAKE2B 7f98a2fda63c4abe93ec80f5a068bdd99a647f811cb95c05f0a716167ca73b6ae4476b344cfe7f1d7d7b5e43e491790cbc8cb8aefc36bb0e0696cadb69a65350 SHA512 42f40db8b2d378888ce73aab0ab03e05f3bbad516d4db025fe6ce1377e1b1d97db2a857b99fb350c8e92a80de75a4c2c4012403546c3f4e5261972060be60b68
AUX sarg-2.3.9-configure.patch 641 BLAKE2B dc4162b7180bc40692e779ddf1d1a1b48442e9814c4d043593f695062f132041102ec70807aad07119b9415a9e04776d5728cd2e73a646e4c2dcb4351d4bf9a5 SHA512 0da589199b6ea13589bc8cdc8504f6b4260a03bf1d8ab48093ada01e3be3a82961a2fad6f0abe301ed004bd9c642f0789ebb745d52044214e98211124c66f6ae
DIST sarg-2.3.10.tar.gz 1278071 BLAKE2B a9412069826328a7828cc3759858160a8e9121fee30697b8c54bc2e6ca948255f297147ff8692e3a62fe6c0a2b596a1a73e1090d03ef1fdacdd692866e6ef27d SHA512 d0a61ac6d455feb8fff024c21f1b7547471ef8cf847fd54d9042881cac3ee14a41fe2a8ea9e0fc2bd2ea0448714ba457e9070282c31e4f3c879e4d83d00ecb2d
+EBUILD sarg-2.3.10-r1.ebuild 936 BLAKE2B f5e330e0c9b7e0a906c04c69e00676bce19a84d021186f3e99208a4bd2fd67895bc837191d0f774fd9488d547813b43e07a0ca8ff72eaadd46284e88bd92082f SHA512 c989ef3e90ae8d1e8852e50d08825efa7596e8c688332e38f648b716bda4cce1d6b35cf1cd249a84c0565284c0aafd9e57d1bfc7d4272219e33dea1156bb16a2
EBUILD sarg-2.3.10.ebuild 1757 BLAKE2B 1e5d9122b9f9dc647971485eafc762155ed7cda0bcd24739a9b1d780d1c9e7f0880136e9ba0b88dc6e628dd2e2341414fa61f08aa92266b73530c5a3e40c391d SHA512 ceef1daa6e382ffa0095733f6747ad7480aab5dd39edbeef15812aa64ce44c87e56a475c5a29dc4878b0581ac1414b569361349e1446684f8aa7533a6405c182
MISC metadata.xml 856 BLAKE2B 0640133457b9035a7a30e4ec481ff092254902a21cb8f8cc9a91d0a0b13f99a484982787646e2367f7bcde5f3d2436371f588729acc35b638c289c09cddb2ff9 SHA512 3571bb6b4562fa58e9736ce48c4b3930bb33a3b38dec15b79b22b3cbd457ea7751819a2b45a7e728b02e641c187c085e813eb29d8644dc57e40b682f061b115a
diff --git a/net-analyzer/sarg/files/sarg-2.3.10-bool.patch b/net-analyzer/sarg/files/sarg-2.3.10-bool.patch
new file mode 100644
index 000000000000..188b6dd3732b
--- /dev/null
+++ b/net-analyzer/sarg/files/sarg-2.3.10-bool.patch
@@ -0,0 +1,11 @@
+--- a/util.c
++++ b/util.c
+@@ -2088,7 +2088,7 @@
+ int pad_len;
+ bool bracket=false;
+ bool port=false;
+- bool port_num=0;
++ int port_num=0;
+
+ // skip leading spaces and tabs
+ while (*buf && (*buf==' ' || *buf=='\t')) buf++;
diff --git a/net-analyzer/sarg/files/sarg-2.3.10-config.patch b/net-analyzer/sarg/files/sarg-2.3.10-config.patch
new file mode 100644
index 000000000000..cfbf103d5b2a
--- /dev/null
+++ b/net-analyzer/sarg/files/sarg-2.3.10-config.patch
@@ -0,0 +1,94 @@
+--- a/log.c
++++ b/log.c
+@@ -241,7 +241,7 @@
+ strcpy(LogoTextColor,"#006699");
+ strcpy(FontSize,"9px");
+ strcpy(TempDir,"/tmp");
+- strcpy(OutputDir,"/var/www/html/squid-reports");
++ strcpy(OutputDir,"/var/www/localhost/htdocs/squid-reports");
+ AnonymousOutputFiles=false;
+ Ip2Name=false;
+ strcpy(DateFormat,"u");
+--- a/sarg-php/sarg-squidguard-block.php
++++ b/sarg-php/sarg-squidguard-block.php
+@@ -26,8 +26,8 @@
+ */
+
+ // Change to squidGuard and sarg config file paths
+-$SargConf = "/usr/local/sarg/sarg.conf";
+-$squidGuardConf = "/usr/local/squidGuard/squidGuard.conf";
++$SargConf = "/etc/sarg/sarg.conf";
++$squidGuardConf = "/etc/squidGuard/squidGuard.conf";
+
+ global $SargConf;
+ global $dbhome;
+@@ -37,7 +37,7 @@
+ include_once("style.php");
+
+ $url = $_GET['url'];
+-$squidGuard_conf = '/usr/local/squidGuard/squidGuard.conf';
++$squidGuard_conf = '/etc/squidGuard/squidGuard.conf';
+
+ function parse_config($line,$clave) {
+ if (preg_match("/dbhome/i", $line)) {
+--- a/sarg-php/sarg-block-it.php
++++ b/sarg-php/sarg-block-it.php
+@@ -25,7 +25,7 @@
+ *
+ */
+
+-$filename = "/usr/local/squid/etc/block.txt";
++$filename = "/etc/squid/etc/block.txt";
+
+ $url = $_GET['url'];
+ $url = $url."\n";
+--- a/htaccess
++++ b/htaccess
+@@ -1,4 +1,4 @@
+-AuthUserFile /usr/local/sarg/passwd
++AuthUserFile /etc/sarg/passwd
+ AuthName "SARG, Squid Analysis Report Generator"
+ AuthType Basic
+ <Limit GET POST>
+--- a/sarg.conf
++++ b/sarg.conf
+@@ -4,7 +4,7 @@
+ # Where is the access.log file
+ # sarg -l file
+ #
+-#access_log /usr/local/squid/var/logs/access.log
++#access_log /var/log/squid/access.log
+
+ # TAG: graphs yes|no
+ # Use graphics where is possible.
+@@ -117,7 +117,7 @@
+ # The reports will be saved in that directory
+ # sarg -o dir
+ #
+-#output_dir /var/www/html/squid-reports
++#output_dir /var/www/localhost/htdocs/squid-reports
+
+ # TAG: anonymous_output_files yes/no
+ # Use anonymous file and directory names in the report. If it is set to
+@@ -545,7 +545,7 @@
+ # Generate reports from SquidGuard logs.
+ # Use 'none' to disable.
+ # You can use sarg -L filename to use an alternate squidGuard log.
+-# squidguard_conf /usr/local/squidGuard/squidGuard.conf
++# squidguard_conf /etc/squidGuard/squidGuard.conf
+ #
+ #squidguard_conf none
+
+--- a/user_limit_block
++++ b/user_limit_block
+@@ -24,8 +24,8 @@
+ #
+ #
+
+-conf="/usr/local/sarg/sarg.conf"
+-squid_password_file="/usr/local/squid/etc/passwd"
++conf="/etc/sarg/sarg.conf"
++squid_password_file="/etc/squid/passwd"
+ tmp="/tmp/sarg_limit.$$"
+
+ limit_file=`grep "per_user_limit" $conf|grep -v "#"|awk '{print $2}'`
diff --git a/net-analyzer/sarg/files/sarg-2.3.10-format.patch b/net-analyzer/sarg/files/sarg-2.3.10-format.patch
new file mode 100644
index 000000000000..926fdc8c6725
--- /dev/null
+++ b/net-analyzer/sarg/files/sarg-2.3.10-format.patch
@@ -0,0 +1,77 @@
+--- a/report.c
++++ b/report.c
+@@ -54,7 +54,7 @@
+ char accsmart[MAXLEN];
+ char crc2[MAXLEN/2 -1];
+ char siteind[MAX_TRUNCATED_URL];
+- char arqtt[256];
++ char arqtt[MAX_USER_FNAME_LEN * 2 + MAXLEN + 10];
+ char *oldurltt=NULL;
+ char oldaccdiatt[11],oldacchoratt[9];
+ char tmp3[MAXLEN];
+--- a/util.c
++++ b/util.c
+@@ -671,10 +671,10 @@
+ char *buildtime(long long int elap)
+ {
+ int num = elap / 1000;
+- int hor = 0;
+- int min = 0;
+- int sec = 0;
+- static char buf[12];
++ short int hor = 0;
++ short int min = 0;
++ short int sec = 0;
++ static char buf[15];
+
+ buf[0]='\0';
+
+@@ -1236,10 +1236,10 @@
+ char *fixtime(long long int elap)
+ {
+ int num = elap / 1000;
+- int hor = 0;
+- int min = 0;
+- int sec = 0;
+- static char buf[12];
++ short int hor = 0;
++ short int min = 0;
++ short int sec = 0;
++ static char buf[15];
+
+ hor=num / 3600;
+ min=(num % 3600) / 60;
+@@ -1248,7 +1248,7 @@
+ if(hor==0 && min==0 && sec==0)
+ strcpy(buf,"0");
+ else
+- sprintf(buf,"%d:%02d:%02d",hor,min,sec);
++ sprintf(buf,"%02d:%02d:%02d",hor,min,sec);
+
+ return buf;
+ }
+--- a/index.c
++++ b/index.c
+@@ -89,9 +89,9 @@
+ char monthdir[MAXLEN];
+ char monthname1[9], monthname2[9];
+ char nmonth[30];
+- char monthnum[10];
++ char monthnum[15];
+ char dayindex[MAXLEN];
+- char daynum[10];
++ char daynum[15];
+ char title[80];
+ int yearsort[150];
+ int nyears;
+--- a/userinfo.c
++++ b/userinfo.c
+@@ -67,7 +67,7 @@
+ int skip;
+ int flen;
+ int count, clen;
+- char cstr[9];
++ char cstr[10];
+
+ last=NULL;
+ for (group=first_user_group ; group ; group=group->next) {
diff --git a/net-analyzer/sarg/sarg-2.3.10-r1.ebuild b/net-analyzer/sarg/sarg-2.3.10-r1.ebuild
new file mode 100644
index 000000000000..72e6e4dbb97f
--- /dev/null
+++ b/net-analyzer/sarg/sarg-2.3.10-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools
+
+DESCRIPTION="Squid Analysis Report Generator"
+HOMEPAGE="http://sarg.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~x86"
+SLOT="0"
+IUSE="+gd ldap pcre"
+
+DEPEND="
+ gd? ( media-libs/gd[png,truetype] )
+ ldap? ( net-nds/openldap )
+ pcre? ( dev-libs/libpcre )
+"
+RDEPEND="${DEPEND}"
+
+DOCS=( BETA-TESTERS CONTRIBUTORS DONATIONS README ChangeLog htaccess )
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.3.9-configure.patch
+ "${FILESDIR}"/${PN}-2.3.9-configure-bash.patch
+ "${FILESDIR}"/${PN}-2.3.10-format.patch
+ "${FILESDIR}"/${PN}-2.3.10-bool.patch
+ "${FILESDIR}"/${PN}-2.3.10-config.patch
+)
+
+src_prepare() {
+ default
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with gd) \
+ $(use_with ldap) \
+ $(use_with pcre) \
+ --sysconfdir="${EPREFIX}/etc/sarg/"
+}