summaryrefslogtreecommitdiff
path: root/net-analyzer/sarg
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-01-15 15:51:32 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-01-15 15:51:32 +0000
commit21435953e16cda318a82334ddbadb3b5c36d9ea7 (patch)
treee1810a4b135afce04b34862ef0fab2bfaeb8aeca /net-analyzer/sarg
parent7bc9c63c9da678a7e6fceb095d56c634afd22c56 (diff)
gentoo resync : 15.01.2020
Diffstat (limited to 'net-analyzer/sarg')
-rw-r--r--net-analyzer/sarg/Manifest8
-rw-r--r--net-analyzer/sarg/files/sarg-2.4.0-config.patch81
-rw-r--r--net-analyzer/sarg/files/sarg-2.4.0-configure.patch43
-rw-r--r--net-analyzer/sarg/files/sarg-2.4.0-fabs.patch11
-rw-r--r--net-analyzer/sarg/files/sarg-2.4.0-format.patch22
-rw-r--r--net-analyzer/sarg/metadata.xml29
-rw-r--r--net-analyzer/sarg/sarg-2.4.0_pre3.ebuild59
7 files changed, 237 insertions, 16 deletions
diff --git a/net-analyzer/sarg/Manifest b/net-analyzer/sarg/Manifest
index f44dfb0a481b..2c7a90cb94ff 100644
--- a/net-analyzer/sarg/Manifest
+++ b/net-analyzer/sarg/Manifest
@@ -2,7 +2,13 @@ AUX sarg-2.3.10-config.patch 2612 BLAKE2B 8d0d6bdab60784dd9c289e974dba087b11234b
AUX sarg-2.3.11-Werror.patch 1012 BLAKE2B f3e9b66c95fe905817c2ceecc52e863c4c0eb9c09d96a525c7876a5f807160421f694b95a02f8f1d62e1292102218c6a1fecf3ed1dedd8f0c7b6b9293322c034 SHA512 e74013c3bc22248ba08656b8751ca6177aeb070ce06661279ee3208ffa62dac8014fed0d6e35b65627ce6f02e70ed662b41dccf21dae8ff2b4e5902cc141e358
AUX sarg-2.3.11-configure.patch 641 BLAKE2B 8afacc3e90ee7092b762c812dd7e2cab94e9bc6d63026818fb67b26c814b101695989d31e2b3bdd61a346334008afbe2b6f55493e68ecf5c55f7e23f16325253 SHA512 15dce8406ddcc4a4937743c9a6ee8cbe11eb95ef2d86f56f8e6a7b5f3288534a98cb0b3609332ef6b40a3d5d22dc879aaa750f0bbda64b3d5ecc66c606bad9d4
AUX sarg-2.3.11-format.patch 778 BLAKE2B c3fdcbba47da9ef4b27adeb3cd0bcfc80b1eee230bfb7f44ed5508e0ebe0e5005abf9c40b8794f6986a533170166f7d5c455e0782271f9f87c5db7da594460e9 SHA512 d7e6baa56465d163c0422dd15317bbbf2bf8b20e4aae54eab2c77c7505f18cbf1cc600ddf35ed3f8e7b2a4c58326c5e38c837711c8f9d9188a1e1e8dfe244bc7
+AUX sarg-2.4.0-config.patch 2417 BLAKE2B 7c5f0ddea35dd77acf38431f17427c5be7d4880bcaa230c3570a5d39f8910943f94df9f6f257ba4185add2cad8795ed481371ebaa259de5b60937a569fc732d5 SHA512 8b3ee4d986a200a9ba47435bb21b08c860a7af3543f7ba88064e63b89b0dde7da40d397c57789e411c1a2be55082e8832882236ba45ecc71821df0ea8618e623
+AUX sarg-2.4.0-configure.patch 1497 BLAKE2B 2cd26287e2a5b3cbd641ead5953fb499c542ac3d1c149149261bafbc51c8bbed454dbdecfe2009d54e3ed9c7532de136396e71b8353e55cf9c98638f1157438e SHA512 c6031d8c0034dea88fc83b3171cd0d221e6a421c7806b0af3cb3a80e2c73dc92e273793f7420e4f30490911bbcc13368c0fa1cd328b972ff3eb63ae7b652cf0c
+AUX sarg-2.4.0-fabs.patch 245 BLAKE2B be45ebf17fe6d7588fa7bd8d94da305347f7f017b61875ffc3249ac1a2788ddbee7e09fc855328e0da961866375b43f5a25c2421462b95fcb8265653c3fd2803 SHA512 9fd403ea0ddc411b99645f27e4b0209d9609355735601aa225621fce74270ebaae0e5569ae111bfba88fbd97cb41099f6eaf14047d09f2ceaac25dd85b6b134b
+AUX sarg-2.4.0-format.patch 400 BLAKE2B 020927621edfb7512f962fb12d0536b6a9a471c784b11f4105a27b533ec609cd9be3d97a43e45a2b2f45342a633ee300f6e39274ffb3aa48a556c44c95a49260 SHA512 fa6f3c0eaf0950c03d5cd8561e0e51cb06b008a90ae4df322933b56e92b73873f4903e3caf6adc7bbe886e2b7d3a53355637c5fa334b7d55b271384876d93c86
DIST sarg-2.3.11.tar.gz 1346884 BLAKE2B f1ba5e5d3531b611cca1e18444b24772d5f6fb31622d3702ce34bf7e5208b7ff04000ed80c984ff103f785dd9b7015f56403b8389100bbd02cdbf936c8343be9 SHA512 a5bf5c0f696a9d58d9dd1d631d2b458e7a48f597e7a084b032b2feb6185440b08babe7ffaaefc04676f0dbc11301084d1896b6246a7e79a10acdbd7aa7882ff6
+DIST sarg-2.4.0-pre3.tar.gz 1364547 BLAKE2B 94729294de60ded125abd346d38833c64b3f0b320b0e07fc8153e287ce84b09ff83259fe2189afa087a46e6617d47628c162e3bda209563e3f7618d71ffd0cd5 SHA512 136313e36a8107f1ba84f7653aa3a0972beea05b89d77d8bd02a564c62881696f87bd2ed6cd0069624fe2ed013042cd604932220c8476d62702d27e68e8fd655
EBUILD sarg-2.3.11-r1.ebuild 849 BLAKE2B dadaef09ee5131c4aec4bec7a5d27084a9a5da0bcb0bc18f7648ece30d5ff7b8da5345bbc3833c423c3530c2596cdebb837396aacccd2f11471e26a53d78b448 SHA512 395e8bbb6c7b752637393f6ad1b90b964cc7502f3750674888a1ae94da13de0efa890c52f5dd59af0e23f54a4976180859cab86aa3b9ce0dc62bdbe74c0b3973
EBUILD sarg-2.3.11-r2.ebuild 900 BLAKE2B ae2ee2cec4f73a97a4f2191a2a5659ab2cb314bd6e17b886085c246cc8aec0ac699f22aece2c3516380d107191b8267a211d496372a7ef5005776d32369134f4 SHA512 1905afac5cb561d9f28f11e86a4f594ab01a2667bbb84ac2504a916f43710a4c3547a8213094da9d70727ee6d14d2dea61ec6e2ea78f600a1486cf82ba9a7dfe
-MISC metadata.xml 856 BLAKE2B 0640133457b9035a7a30e4ec481ff092254902a21cb8f8cc9a91d0a0b13f99a484982787646e2367f7bcde5f3d2436371f588729acc35b638c289c09cddb2ff9 SHA512 3571bb6b4562fa58e9736ce48c4b3930bb33a3b38dec15b79b22b3cbd457ea7751819a2b45a7e728b02e641c187c085e813eb29d8644dc57e40b682f061b115a
+EBUILD sarg-2.4.0_pre3.ebuild 1217 BLAKE2B 298dbdce30c542511a51f16b1f3b345cfb5035e2c9cad2c39e127a010068d934488d8a83eefaf7297c8a172705671bacdad0d13eda8b724e177fd2d53a35c237 SHA512 c38ab11a82e2c2488215326c26f34d91b0f6027fbb3c2c0b298ba89746933d3ae8b0d6a66b88a38e8eaae1e42b64382a72a6f59a688a2ddeb07c1e97a2e5d1d3
+MISC metadata.xml 997 BLAKE2B b0103361ea70e01da884621e5243317afdae68481b50c18296122617b0bc29669d50d6c6dda00c85d77e48186111bdf9252419a1b0627993b91dc652b263ca32 SHA512 0b24013475c4e92553539de23c2e88dff9e0bf9c42b3c5d6cb46e54dc113ceb8bc5889ac1d1c397f73bfde600ec6a394b2ba0da2520351f9050ec873b2c8d49c
diff --git a/net-analyzer/sarg/files/sarg-2.4.0-config.patch b/net-analyzer/sarg/files/sarg-2.4.0-config.patch
new file mode 100644
index 000000000000..1168f98337d7
--- /dev/null
+++ b/net-analyzer/sarg/files/sarg-2.4.0-config.patch
@@ -0,0 +1,81 @@
+--- a/log.c
++++ b/log.c
+@@ -151,7 +151,7 @@
+ strcpy(FontSize,"9px");
+ strcpy(TempDir,"/tmp");
+ TempDirPath[0] = '\0';
+- strcpy(OutputDir,"/var/www/html/squid-reports");
++ strcpy(OutputDir,"/var/www/localhost/htdocs/squid-reports");
+ AnonymousOutputFiles=false;
+ Ip2Name=false;
+ DateFormat='u';
+--- 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
+@@ -17,7 +17,7 @@
+ # If some files are passed on the command line with "sarg -l file" or
+ # "sarg file", the files listed here are ignored.
+ #
+-#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.
+@@ -147,7 +147,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
+@@ -632,7 +632,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}'`
+--- a/sarg-php/config.php.inc
++++ b/sarg-php/config.php.inc
+@@ -1,13 +1,13 @@
+ <?php
+
+ // 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";
+
+ // File where URL to block will be appended
+-$DefaultSquidBlock = "/usr/local/squid/etc/block.txt";
++$DefaultSquidBlock = "/etc/squid/etc/block.txt";
+
+ // Choose the locale you want to use to display messages (it must exist on your system)
+-$language = "fr_BE.utf-8";
++$language = "POSIX";
+
+ ?>
diff --git a/net-analyzer/sarg/files/sarg-2.4.0-configure.patch b/net-analyzer/sarg/files/sarg-2.4.0-configure.patch
new file mode 100644
index 000000000000..7ca44a6901f1
--- /dev/null
+++ b/net-analyzer/sarg/files/sarg-2.4.0-configure.patch
@@ -0,0 +1,43 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -35,6 +35,11 @@
+ dnl C99 support is required to define LLONG_MAX (at least on CentOS 5.7)
+ AC_PROG_CC_C99
+
++dnl mkdir_p / MKDIR_P
++AC_PROG_MKDIR_P
++mkdir_p="$MKDIR_P"
++AC_SUBST(mkdir_p)
++
+ # Report more warnings to improve code quality.
+ CFLAGS="${CFLAGS} -Wall"
+
+@@ -50,23 +55,23 @@
+ # Don't compare signs as it is a mess
+ CFLAGS="${CFLAGS} -Wno-sign-compare"
+
+-AC_MSG_CHECKING([for implicit-function-declaration error flag in $CC])
++AC_MSG_CHECKING([for implicit-function-declaration warning flag in $CC])
+ saved_CFLAGS="${CFLAGS}"
+-CFLAGS="${CFLAGS} -Werror=implicit-function-declaration"
++CFLAGS="${CFLAGS} -Wimplicit-function-declaration"
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[have_implicit_function_declaration="yes"],[have_implicit_function_declaration="no"])
+ AC_MSG_RESULT($have_implicit_function_declaration)
+ AS_IF([test "$have_implicit_function_declaration" = "no"],[CFLAGS="${saved_CFLAGS}"])
+
+-AC_MSG_CHECKING([for format error flag in $CC])
++AC_MSG_CHECKING([for format warning flag in $CC])
+ saved_CFLAGS="${CFLAGS}"
+-CFLAGS="${CFLAGS} -Werror=format"
++CFLAGS="${CFLAGS} -Wformat"
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[have_error_format="yes"],[have_error_format="no"])
+ AC_MSG_RESULT($have_error_format)
+ AS_IF([test "$have_error_format" = "no"],[CFLAGS="${saved_CFLAGS}"])
+
+ case "$host" in
+ *-solaris*)
+- LDFLAGS="${LDFLAGS} -lsocket -lnsl"
++ LIBS="${LIBS} -lsocket -lnsl"
+ CFLAGS="-DSOLARIS ${CFLAGS}"
+ ;;
+ esac
diff --git a/net-analyzer/sarg/files/sarg-2.4.0-fabs.patch b/net-analyzer/sarg/files/sarg-2.4.0-fabs.patch
new file mode 100644
index 000000000000..e9b73d88fb4a
--- /dev/null
+++ b/net-analyzer/sarg/files/sarg-2.4.0-fabs.patch
@@ -0,0 +1,11 @@
+--- a/btree_cache.c
++++ b/btree_cache.c
+@@ -268,7 +268,7 @@
+ static struct bt *get_disbalanced_node(struct bt *node)
+ {
+ struct bt *rdn;
+- if (fabs(node->balanceinfo) > 1)
++ if (abs(node->balanceinfo) > 1)
+ return node;
+ if (node->left)
+ {
diff --git a/net-analyzer/sarg/files/sarg-2.4.0-format.patch b/net-analyzer/sarg/files/sarg-2.4.0-format.patch
new file mode 100644
index 000000000000..686f659c1300
--- /dev/null
+++ b/net-analyzer/sarg/files/sarg-2.4.0-format.patch
@@ -0,0 +1,22 @@
+--- a/userinfo.c
++++ b/userinfo.c
+@@ -78,7 +78,7 @@
+ int skip;
+ int flen;
+ int count, clen;
+- char cstr[9];
++ char cstr[10];
+ char filename[MAX_USER_FNAME_LEN];
+
+ if (!UserStrings) {
+--- a/index.c
++++ b/index.c
+@@ -535,7 +535,7 @@
+ struct dirent *direntp;
+ char yearindex[MAXLEN];
+ char yeardir[MAXLEN];
+- char yearnum[10];
++ char yearnum[15];
+ int yearsort[150];
+ int nyears;
+ int year;
diff --git a/net-analyzer/sarg/metadata.xml b/net-analyzer/sarg/metadata.xml
index deaa23376cb0..774ea9db6563 100644
--- a/net-analyzer/sarg/metadata.xml
+++ b/net-analyzer/sarg/metadata.xml
@@ -1,19 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="project">
- <email>netmon@gentoo.org</email>
- <name>Gentoo network monitoring and analysis project</name>
- </maintainer>
- <longdescription>Sarg - Squid Analysis Report Generator is a tool that allow
- you to view "where" your users are going to on the Internet. Sarg provides many
- informations about Squid users activities: times, bytes, sites, etc...
- </longdescription>
- <use>
- <flag name="pcre">Enable support for regular expressions in the hostalias file through <pkg>dev-libs/libpcre</pkg></flag>
- <flag name="gd">Enable support for graphs in reports through <pkg>media-libs/gd</pkg></flag>
- </use>
- <upstream>
- <remote-id type="sourceforge">sarg</remote-id>
- </upstream>
+<maintainer type="project">
+<email>netmon@gentoo.org</email>
+<name>Gentoo network monitoring and analysis project</name>
+</maintainer>
+<longdescription>Squid Analysis Report Generator is a tool that allow you to view where your users are going to on the Internet. Sarg provides many informations about Squid users activities: times, bytes, sites, etc...</longdescription>
+<use>
+<flag name="doublecheck">Make sarg double check the data it manipulates and output a warning if an error is found</flag>
+<flag name="gd">Enable support for graphs in reports through <pkg>media-libs/gd</pkg></flag>
+<flag name="glob">Disable to ignore wildcards in file names</flag>
+<flag name="pcre">Enable support for regular expressions in the hostalias file through <pkg>dev-libs/libpcre</pkg></flag>
+</use>
+<upstream>
+<remote-id type="sourceforge">sarg</remote-id>
+</upstream>
</pkgmetadata>
diff --git a/net-analyzer/sarg/sarg-2.4.0_pre3.ebuild b/net-analyzer/sarg/sarg-2.4.0_pre3.ebuild
new file mode 100644
index 000000000000..992488f78a3c
--- /dev/null
+++ b/net-analyzer/sarg/sarg-2.4.0_pre3.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit autotools
+
+DESCRIPTION="Squid Analysis Report Generator"
+HOMEPAGE="https://sourceforge.net/projects/sarg/"
+SRC_URI="mirror://sourceforge/${PN}/${P/_/-}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~x86"
+SLOT="0"
+IUSE="bzip2 doublecheck +gd +glob ldap lzma pcre zlib"
+
+RDEPEND="
+ bzip2? ( app-arch/bzip2 )
+ gd? ( media-libs/gd[png,truetype] )
+ ldap? ( net-nds/openldap )
+ lzma? ( app-arch/xz-utils )
+ pcre? ( dev-libs/libpcre )
+ zlib? ( sys-libs/zlib )
+"
+DEPEND="
+ ${RDEPEND}
+"
+DOCS=( BETA-TESTERS CONTRIBUTORS DONATIONS README ChangeLog htaccess )
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.4.0-config.patch
+ "${FILESDIR}"/${PN}-2.4.0-configure.patch
+ "${FILESDIR}"/${PN}-2.4.0-fabs.patch
+ "${FILESDIR}"/${PN}-2.4.0-format.patch
+)
+S=${WORKDIR}/${P/_/-}
+
+src_prepare() {
+ default
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable doublecheck) \
+ $(use_with bzip2 bzlib) \
+ $(use_with gd) \
+ $(use_with glob) \
+ $(use_with ldap) \
+ $(use_with lzma liblzma) \
+ $(use_with pcre) \
+ $(use_with zlib) \
+ --sysconfdir="${EPREFIX}/etc/sarg/"
+}
+
+src_install() {
+ default
+
+ dodoc documentation/*
+}