Hello community, here is the log from the commit of package sarg checked in at Thu Dec 6 01:35:03 CET 2007. -------- --- sarg/sarg.changes 2007-01-31 21:26:22.000000000 +0100 +++ /mounts/work_src_done/STABLE/sarg/sarg.changes 2007-12-05 17:19:51.324631000 +0100 @@ -1,0 +2,11 @@ +Wed Dec 5 17:19:46 CET 2007 - kssingvo@suse.de + +- added daily,weekly,monthly cronjobs for sarg reports +- added sarg-reports tool +- adapted configuration to SUSE paths +- fixed default config file +- fixed issue in util.c (bugzilla#342529) +- fixed wrong description (bugzilla#334146) +- http_proxy is no longer Requires:, using instead Recommends: + +------------------------------------------------------------------- New: ---- cron.daily.sarg cron.monthly.sarg cron.weekly.sarg sarg-2.2.3.1-config.patch sarg-2.2.3.1-description.patch sarg-2.2.3.1-util_fix.patch sarg.hosts sarg-reports sysconfig.sarg ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ sarg.spec ++++++ --- /var/tmp/diff_new_pack.H25915/_old 2007-12-06 01:32:50.000000000 +0100 +++ /var/tmp/diff_new_pack.H25915/_new 2007-12-06 01:32:50.000000000 +0100 @@ -11,19 +11,28 @@ # norootforbuild Name: sarg - Summary: Squid Analysis Report Generator Version: 2.2.3.1 -Release: 1 -License: GNU General Public License (GPL) -URL: http://sarg.sourceforge.net/sarg.php +Release: 48 +License: GPL v2 or later +Url: http://sarg.sourceforge.net/sarg.php Group: Productivity/Networking/Web/Utilities -Requires: http_proxy -Autoreqprov: on +Recommends: http_proxy +AutoReqProv: on +PreReq: %fillup_prereq BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source: http://web.onda.com.br/orso/%{name}-%{version}.tar.bz2 +Source0: http://web.onda.com.br/orso/%{name}-%{version}.tar.bz2 Source1: sarg.conf +Source2: http://www.initzero.it/products/opensource/sarg-reports/download/sarg-report... +Source3: sarg.hosts +Source4: sysconfig.sarg +Source5: cron.daily.sarg +Source6: cron.weekly.sarg +Source7: cron.monthly.sarg # Patch0: http://sarg.sourceforge.net/sarg-2.0.1-largeurl.patch.gz +Patch0: sarg-2.2.3.1-config.patch +Patch1: sarg-2.2.3.1-util_fix.patch +Patch2: sarg-2.2.3.1-description.patch %description Sarg -- Squid Analysis Report Generator is a tool that allows you to @@ -80,12 +89,15 @@ %prep %setup -# %patch0 -p0 +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 %build %{?suse_update_config:%{suse_update_config -f cfgaux}} CFLAGS="$RPM_OPT_FLAGS" \ ./configure \ + --prefix=/usr \ --enable-bindir=%{_bindir} \ --enable-sysconfdir=%{_datadir}/%{name} \ --enable-htmldir=/srv/www/htdocs \ @@ -108,16 +120,32 @@ ln -sf ../../../etc/sarg.conf $RPM_BUILD_ROOT/%{_datadir}/%{name}/sarg.conf chmod a-x CONTRIBUTORS COPYING ChangeLog DONATIONS LICENSE README chmod a-x $RPM_BUILD_ROOT/%{_mandir}/man1/* +mkdir -p $RPM_BUILD_ROOT/%{_sbindir} +install -m 755 %SOURCE2 $RPM_BUILD_ROOT/%{_sbindir} +install -m 644 %SOURCE3 $RPM_BUILD_ROOT/%{_datadir}/%{name}/sarg.hosts +mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates +install -m 644 %{SOURCE4} $RPM_BUILD_ROOT/var/adm/fillup-templates +mkdir -p $RPM_BUILD_ROOT/etc/cron.daily +install -m 755 %{SOURCE5} $RPM_BUILD_ROOT/etc/cron.daily/suse.de-sarg +mkdir -p $RPM_BUILD_ROOT/etc/cron.weekly +install -m 755 %{SOURCE6} $RPM_BUILD_ROOT/etc/cron.weekly/suse.de-sarg +mkdir -p $RPM_BUILD_ROOT/etc/cron.monthly +install -m 755 %{SOURCE7} $RPM_BUILD_ROOT/etc/cron.monthly/suse.de-sarg # --------------------------------------------------------------------------- %clean # Clear up the mess [ "$RPM_BUILD_ROOT" != "" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT; +%post +%{fillup_only -n sarg} + %files %defattr(-, root, root) %config(noreplace) /etc/sarg.conf +/etc/cron.*/suse.de-sarg %{_bindir}/sarg +%{_sbindir}/sarg-reports %dir %{_datadir}/%{name} %{_datadir}/%{name}/css.tpl %{_datadir}/%{name}/fonts @@ -126,11 +154,21 @@ %{_datadir}/%{name}/exclude_codes %{_datadir}/%{name}/languages %{_datadir}/%{name}/sarg.conf +%{_datadir}/%{name}/sarg.hosts %{_datadir}/%{name}/user_limit_block +/var/adm/fillup-templates/sysconfig.sarg %doc %{_mandir}/man1/sarg* %doc CONTRIBUTORS COPYING ChangeLog DONATIONS LICENSE README -%changelog -n sarg +%changelog +* Wed Dec 05 2007 - kssingvo@suse.de +- added daily,weekly,monthly cronjobs for sarg reports +- added sarg-reports tool +- adapted configuration to SUSE paths +- fixed default config file +- fixed issue in util.c (bugzilla#342529) +- fixed wrong description (bugzilla#334146) +- http_proxy is no longer Requires:, using instead Recommends: * Wed Jan 31 2007 - kssingvo@suse.de - upgrade to version 2.2.3.1: * fidex -m option to show all the used tags ++++++ sarg-2.2.3.1-config.patch ++++++ --- sarg-2.2.3.1/sarg-php/sarg-block-it.php.orig 2007-01-02 20:11:26.000000000 +0100 +++ sarg-2.2.3.1/sarg-php/sarg-block-it.php 2007-12-05 16:17:14.000000000 +0100 @@ -25,7 +25,7 @@ * */ -$filename = "/usr/local/squid/etc/block.txt"; +$filename = "/etc/squid/etc/block.txt"; $url = $_GET['url']; $url = $url."\n"; --- sarg-2.2.3.1/sarg-php/sarg-squidguard-block.php.orig 2007-01-02 20:11:26.000000000 +0100 +++ sarg-2.2.3.1/sarg-php/sarg-squidguard-block.php 2007-12-05 16:16:14.000000000 +0100 @@ -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.conf"; +$squidGuardConf = "/etc/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.conf'; function parse_config($line,$clave) { if (preg_match("/dbhome/i", $line)) { --- sarg-2.2.3.1/sarg.1.orig 2007-01-02 20:11:26.000000000 +0100 +++ sarg-2.2.3.1/sarg.1 2007-12-05 16:37:19.000000000 +0100 @@ -131,11 +131,11 @@ .B \-split Split the log file by date in \fB-d\fP parameter. .SH FILES -.BR /usr/local/sarg/sarg.conf +.BR /etc/sarg.conf .br -.B /usr/local/squid/logs/access.log +.B /var/log/squid/access.log .br -.B /usr/local/squidGuard/logs/squidGuard.log +.B /var/log/squidGuard/squidGuard.log .SH SEE ALSO squid(8) .SH AUTHOR --- sarg-2.2.3.1/log.c.orig 2007-01-02 20:11:26.000000000 +0100 +++ sarg-2.2.3.1/log.c 2007-12-05 16:38:33.000000000 +0100 @@ -145,7 +145,7 @@ int main(argc,argv) SquidGuardLogAlternate[0]='\0'; arq[0]='\0'; - strcpy(AccessLog,"/usr/local/squid/var/logs/access.log"); + strcpy(AccessLog,"/var/log/squid/access.log"); sprintf(ExcludeCodes,"%s/exclude_codes",SYSCONFDIR); strcpy(GraphDaysBytesBarColor,"orange"); strcpy(BgColor,"#ffffff"); @@ -201,7 +201,7 @@ int main(argc,argv) strcpy(DisplayedValues,"abbreviation"); strcpy(HeaderFontSize,"9px"); strcpy(TitleFontSize,"11px"); - strcpy(AuthUserFile,"/usr/local/sarg/passwd"); + strcpy(AuthUserFile,"/usr/share/sarg/passwd"); strcpy(AuthName,"SARG, Restricted Access"); strcpy(AuthType,"basic"); strcpy(Require,"require user admin %u"); --- sarg-2.2.3.1/user_limit_block.orig 2007-01-02 20:13:14.000000000 +0100 +++ sarg-2.2.3.1/user_limit_block 2007-12-05 16:40:00.000000000 +0100 @@ -24,8 +24,8 @@ # # -conf="/usr/local/sarg/sarg.conf" -squid_password_file="/usr/local/squid/etc/passwd" +conf="/etc/sarg.conf" +squid_password_file="/etc/squid/passwd" tmp="/tmp/sarg_limit.$$" limit_file=`grep "per_user_limit" $conf|grep -v "#"|awk '{print $2}'` --- sarg-2.2.3.1/README.orig 2007-01-02 20:11:26.000000000 +0100 +++ sarg-2.2.3.1/README 2007-12-05 16:40:28.000000000 +0100 @@ -50,20 +50,20 @@ If you use native squid log format, the default: /usr/bin --enable-sysconfdir - where the configuration directory is - default: /usr/local/sarg + default: /usr/share/sarg --enable-htmldir - where the www html root dir is default: /var/www/html --enable-mandir - where the sarg man page will be saved - default: /usr/local/man/man1 + default: /usr/share/man/man1 3. make 4. make install -5. Go to /usr/local/sarg (or file entered with --sysconfdir on configure) +5. Go to /usr/share/sarg (or file entered with --sysconfdir on configure) and change sarg.conf as you need. 6. Notes about sarg: --- sarg-2.2.3.1/splitlog.c.orig 2007-01-02 20:11:26.000000000 +0100 +++ sarg-2.2.3.1/splitlog.c 2007-12-05 16:40:49.000000000 +0100 @@ -39,7 +39,7 @@ void splitlog(char *arq, char *df, int d struct tm *t; if(arq[0] == '\0') - strcpy(arq,"/usr/local/squid/logs/access.log"); + strcpy(arq,"/var/log/squid/access.log"); if((fp_in=fopen(arq,"r"))==NULL) { fprintf(stderr, "SARG: (splitlog) %s: %s\n",text[8],arq); --- sarg-2.2.3.1/htaccess.orig 2007-01-02 20:11:26.000000000 +0100 +++ sarg-2.2.3.1/htaccess 2007-12-05 16:41:20.000000000 +0100 @@ -1,4 +1,4 @@ -AuthUserFile /usr/local/sarg/passwd +AuthUserFile /usr/share/sarg/passwd AuthName "SARG, Squid Analysis Report Generator" AuthType Basic <Limit GET POST> --- sarg-2.2.3.1/convlog.c.orig 2007-01-02 20:11:26.000000000 +0100 +++ sarg-2.2.3.1/convlog.c 2007-12-05 16:41:35.000000000 +0100 @@ -39,7 +39,7 @@ void convlog(char *arq, char *df, int df struct tm *t; if(arq[0] == '\0') - strcpy(arq,"/usr/local/squid/logs/access.log"); + strcpy(arq,"/usr/log/squid/access.log"); if((fp_in=fopen(arq,"r"))==NULL) { fprintf(stderr, "SARG: (convlog) %s: %s\n",text[8],arq); --- sarg-2.2.3.1/sarg-php/INSTALL.orig 2007-01-02 20:11:26.000000000 +0100 +++ sarg-2.2.3.1/sarg-php/INSTALL 2007-12-05 16:42:59.000000000 +0100 @@ -2,8 +2,8 @@ To use sarg-squidGuard you need to change: 1. These two variables on sarg-squidguard-block.php file: -$SargConf = "/usr/local/sarg/sarg.conf"; -$squidGuardConf = "/usr/local/squidGuard/squidGuard.conf"; +$SargConf = "/etc/sarg.conf"; +$squidGuardConf = "/etc/squidGuard.conf"; 2.change the squidGuard db file to the same httpd process owner: -chown apache /var/www/html/sarg-php +chown apache /srv/www/htdocs/sarg-php ++++++ sarg-2.2.3.1-description.patch ++++++ --- sarg-2.2.3.1/languages/English.orig 2007-01-02 20:11:26.000000000 +0100 +++ sarg-2.2.3.1/languages/English 2007-12-05 15:40:53.000000000 +0100 @@ -33,8 +33,8 @@ "User" "Squid version" "Temporary dir" -"Debug messages" "Process messages" +"Debug messages" "Input log" "Output dir" "Usage" ++++++ sarg-2.2.3.1-util_fix.patch ++++++ --- sarg-2.2.3.1/util.c.orig 2007-01-02 20:11:26.000000000 +0100 +++ sarg-2.2.3.1/util.c 2007-12-05 15:12:17.000000000 +0100 @@ -408,13 +408,13 @@ void fixip(char *ip) } -char *fixnum(long long int value, int n) #define MAXIMO 1024 +char *fixnum(long long int value, int n) { char num[MAXIMO]; char buf[MAXIMO * 2]; char *pbuf; - char ret[MAXIMO * 2]; + static char ret[MAXIMO * 2]; char *pret; register int i, j, k; static char abbrev[30]; @@ -501,13 +501,13 @@ char *fixnum(long long int value, int n) } -char *fixnum2(long long int value, int n) #define MAXIMO 1024 +char *fixnum2(long long int value, int n) { char num[MAXIMO]; char buf[MAXIMO * 2]; char *pbuf; - char ret[MAXIMO * 2]; + static char ret[MAXIMO * 2]; char *pret; register int i, j, k; static char abbrev[30]; ++++++ sarg.conf ++++++ --- sarg/sarg.conf 2002-12-04 18:43:33.000000000 +0100 +++ /mounts/work_src_done/STABLE/sarg/sarg.conf 2007-12-05 16:30:01.680615000 +0100 @@ -40,6 +40,7 @@ # Especify the font for html page. # #font_face Arial +font_face Tahoma,Verdana,Arial # TAG: header_color # Especify the header color @@ -55,7 +56,12 @@ # TAG: font_size # Especify the font size # -#header_font_size -1 +#header_font_size 9px + +# TAG: title_font_size +# Especify the title font size +# +#title_font_size 11px # TAG: background_color # TAG: background_color @@ -157,6 +163,7 @@ # you can use indexonly to have only index.html file. # #exclude_users none +#exclude_users /etc/squid/sarg.users # TAG: exclude_hosts file # Hosts, domains or subnets will be excluded from reports. @@ -166,6 +173,7 @@ # s1.acme.foo - exclude hostname only # acme.foo - exclude full domain name # +#exclude_hosts /etc/squid/sarg.hosts #exclude_hosts none # TAG: useragent_log file @@ -205,7 +213,7 @@ # yes - if report date already exist then will be overwrited. # no - if report date already exist then will be renamed to filename.n, filename.n+1 # -#overwrite_report no +overwrite_report yes # TAG: records_without_userid ignore|ip|everybody # What can I do with records without user id (no authentication) in access.log file ? @@ -238,10 +246,15 @@ # #topsites_sort_order CONNECT D +# TAG: index_sort_order A/D +# Sort for index.html, where A=Ascendent, D=Descendent +# +#index_sort_order D + # TAG: exclude_codes file # Ignore records with these codes. Eg.: NONE/400 # -#exclude_codes /usr/local/sarg/exclude_codes +#exclude_codes /usr/share/sarg/exclude_codes # TAG: replace_index string # Replace "index.html" in the main index file with this string @@ -344,7 +357,12 @@ # TAG: show_successful_message yes|no # Show "Successful report generated on dir" at end of process. # -#show_successful_message yes +show_successful_message no + +# TAG: show_read_statistics yes|no +# Shows some reading statistics. +# +show_read_statistics no # TAG: topuser_fields # Which fields must be in Topuser report. @@ -356,6 +374,11 @@ # #topuser_num 0 +# TAG: site_user_time_date_type list|table +# generate reports for site_user_time_date in list or table format +# +#site_user_time_date_type table + # TAG: datafile file # Save the report results in a file to populate some database # @@ -385,3 +408,176 @@ #hours 7-12,14,16,18-20 # Default: #hours 0-23 + +# TAG: squidguard_conf file +# path to squidGuard.conf file +# Generate reports from SquidGuard logs. +# Use 'none' to disable. +# You can use sarg -L filename to use an alternate squidGuard log. +# squidguard_conf /etc/squidGuard.conf +# +#squidguard_conf none + +# TAG: squidguard_ignore_date on|off +# Use 'on' use the record even the date range is different from +# the used squid access.log file. +# Use 'off' use the record only if the date range is in the used +# squid access.log file. +# +#squidguard_ignore_date off + +# TAG: squidguard_log_format +# Format string SquidGuard logs. +# REJIK #year#-#mon#-#day# #hour# #list#:#tmp# #ip# #user# #tmp#/#tm +#/#url#/#end# +# SQUIDGUARD #year#-#mon#-#day# #hour# #tmp#/#list#/#tmp#/#tmp#/#url#/#tmp# #ip#/#tmp# #user# #end# +#squidguard_log_format #year#-#mon#-#day# #hour# #tmp#/#list#/#tmp#/#tmp#/#url#/#tmp# #ip#/#tmp# #user# #end# + +# TAG: show_sarg_info yes|no +# shows sarg information and site path on each report bottom +# +#show_sarg_info yes + +# TAG: show_sarg_logo yes|no +# shows sarg logo +# +#show_sarg_logo yes + +# TAG: parsed_output_log directory +# Saves the processed log in a sarg format after parsing the squid log file. +# This is a way to dump all of the data structures out, after parsing from +# the logs (presumably this data will be much smaller than the log files t +emselves), +# and pull them back in for later processing and merging with data from previous logs. +# +#parsed_output_log none + +# TAG: parsed_output_log_compress /bin/gzip|/usr/bin/bzip2|nocompress +# sarg logs compress util +# +#parsed_output_log_compress /bin/gzip + +# TAG: displayed_values bytes|abbreviation +# how the values will be displayed in reports. +# eg. bytes - 209.526 +# abbreviation - 210K +# +#displayed_values bytes + +# Report limits +# TAG: authfail_report_limit n +# TAG: denied_report_limit n +# TAG: siteusers_report_limit n +# TAG: squidguard_report_limit n +# TAG: user_report_limit n +# TAG: dansguardian_report_limit n +# TAG: download_report_limit n +# report limits (lines). +# '0' no limit +# +#authfail_report_limit 10 +#denied_report_limit 10 +#siteusers_report_limit 0 +#squidguard_report_limit 10 +#dansguardian_report_limit 10 +#user_report_limit 10 +#user_report_limit 50 + +# TAG: www_document_root dir +# Where is your Web DocumentRoot +# Sarg will create sarg-php directory with some PHP modules: +# - sarg-squidguard-block.php - add urls from user reports to squidGuard DB +# +www_document_root /srv/www/htdocs +# TAG: block_it module_url +# This tag allow you to pass urls from user reports to a cgi or php module, +# to be blocked by some Squid acl +# +# Eg.: block_it /sarg-php/sarg-block-it.php +# sarg-block-it is a php that will append a url to a flat file. +# You must change /var/www/html/sarg-php/sarg-block-it to point to your file +# in $filename variable, and chown to a httpd owner. +# +# sarg will pass http://module_url?url=url +# +#block_it none + +# TAG: external_css_file path +# This tag allow internal sarg css override. +# Sarg use theses style classes: +# .body body class +# .info sarg information class, align=center +# .title title class, align=center +# .header header class, align:left +# .header2 header class, align:right +# .header3 header class, align:right +# .text text class, align:left +# .data table text class, align:right +# .data2 table text class, align:right, border colors +# .link link class +# +# There is a sample in /usr/local/sarg/etc/css.tpl +# +#external_css_file none + +# TAG: user_authentication yes|no +# Allow user authentication in User Reports using .htaccess +# Parameters: +# AuthUserFile - where the user password file is +# AuthName - authentication realm. Eg "Members Only" +# AuthType - authenticaion type - basic +# Require - authorized users to see the report. +# %u - user report +# +# user_authentication no +# AuthUserFile /usr/local/sarg/passwd +# AuthName "SARG, Restricted Access" +# AuthType Basic +# Require user admin %u + +# TAG: download_suffix "suffix,suffix,...,suffix" +# file suffix to be considered as "download" in Download report. +# Use 'none' to disable. +# +download_suffix "zip,arj,bzip,gz,ace,doc,iso,adt,bin,cab,com,dot,drv$,lha,lzh,mdb,mso,ppt,rtf,src,shs,sys,exe,dll,mp3,avi,mpg,mpeg" + +# TAG: ulimit n +# The maximum number of open file descriptors to avoid "Too many open files" error message. +# You need to run sarg as root to use ulimit tag. +# +#ulimit 20000 + +# TAG: ntlm_user_format username|domainname+username +# NTLM users format. +# +#ntlm_user_format domainname+username + +# TAG: realtime_refresh_time num sec +# How many time to auto refresh the realtime report +# 0 = disable +# +# realtime_refresh_time 3 + +# TAG: realtime_access_log_lines num +# How many last lines to get from access.log file +# +# realtime_access_log_lines 1000 + +# TAG: realtime_types: GET,PUT,CONNECT,ICP_QUERY,POST +# Which records must be in realtime report. +# +# realtime_types GET,PUT,CONNECT + +# TAG: realtime_unauthenticated_records: ignore|show +# What to do with unauthenticated records in realtime report. +# +# realtime_unauthenticated_records: ignore + +# TAG: byte_cost value no_cost_limit +# Cost per byte. +# Eg. byte_cost 0.01 100000000 +# per byte cost = 0.01 +# bytes with no cost = 100 Mb +# 0 = disable +# +# byte_cost 0.01 50000000 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org