public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Jeroen Roovers" <jer@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/sarg/, net-analyzer/sarg/files/
Date: Sun, 17 Dec 2017 16:07:10 +0000 (UTC)	[thread overview]
Message-ID: <1513526828.e56c78f34f5aecdc2a3825c95d56d3cda03fb2df.jer@gentoo> (raw)

commit:     e56c78f34f5aecdc2a3825c95d56d3cda03fb2df
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 17 16:06:43 2017 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sun Dec 17 16:07:08 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e56c78f3

net-analyzer/sarg: Fix some GCC 7 strictness issues (bug #641250).

Package-Manager: Portage-2.3.19, Repoman-2.3.6

 net-analyzer/sarg/files/sarg-2.3.10-bool.patch   | 11 +++
 net-analyzer/sarg/files/sarg-2.3.10-config.patch | 94 ++++++++++++++++++++++++
 net-analyzer/sarg/files/sarg-2.3.10-format.patch | 77 +++++++++++++++++++
 net-analyzer/sarg/sarg-2.3.10-r1.ebuild          | 44 +++++++++++
 4 files changed, 226 insertions(+)

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 00000000000..188b6dd3732
--- /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 00000000000..cfbf103d5b2
--- /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 00000000000..926fdc8c672
--- /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 00000000000..72e6e4dbb97
--- /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/"
+}


             reply	other threads:[~2017-12-17 16:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-17 16:07 Jeroen Roovers [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-01-16 11:25 [gentoo-commits] repo/gentoo:master commit in: net-analyzer/sarg/, net-analyzer/sarg/files/ Jeroen Roovers
2018-07-08 10:53 Jeroen Roovers
2019-12-26 12:11 Jeroen Roovers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1513526828.e56c78f34f5aecdc2a3825c95d56d3cda03fb2df.jer@gentoo \
    --to=jer@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox