OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Torsten Homeyer
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   26-Aug-2004 12:48:36
  Branch: HEAD                             Handle: 2004082611483500

  Added files:
    openpkg-src/squidalyser rc.squidalyser squidalyser.README
                            squidalyser.apache squidalyser.passwd
                            squidalyser.spec

  Log:
    new package: squidalyser 1.0b (Big Brother for Squid Logfiles)

  Summary:
    Revision    Changes     Path
    1.1         +40 -0      openpkg-src/squidalyser/rc.squidalyser
    1.1         +77 -0      openpkg-src/squidalyser/squidalyser.README
    1.1         +25 -0      openpkg-src/squidalyser/squidalyser.apache
    1.1         +1  -0      openpkg-src/squidalyser/squidalyser.passwd
    1.1         +137 -0     openpkg-src/squidalyser/squidalyser.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/squidalyser/rc.squidalyser
  ============================================================================
  $ cvs diff -u -r0 -r1.1 rc.squidalyser
  --- /dev/null 2004-08-26 12:48:36 +0200
  +++ rc.squidalyser    2004-08-26 12:48:36 +0200
  @@ -0,0 +1,40 @@
  [EMAIL PROTECTED]@/lib/openpkg/bash @l_prefix@/etc/rc
  +##
  +##  rc.squidalyser -- Run-Commands
  +##
  +
  +%config
  +    squidalyser_enable="$openpkg_rc_def"
  +
  +%common
  +
  +%status -u @l_susr@ -o
  +    squidalyser_usable="no"
  +    squidalyser_active="no"
  +    rcService squidalyser enable yes && \
  +        squidalyser_usable="yes" && squidalyser_active="yes"
  +    echo "squidalyser_enable=\"$squidalyser_enable\""
  +    echo "squidalyser_usable=\"$squidalyser_usable\""
  +    echo "squidalyser_active=\"$squidalyser_active\""
  +
  +%start -u @l_susr@
  +    rcService squidalyser enable yes || exit 0
  +    exit 0
  +
  +%stop -u @l_susr@
  +    rcService squidalyser enable yes || exit 0
  +    exit 0
  +
  +%restart -u @l_susr@
  +    rcService squidalyser enable yes || exit 0
  +    exit 0
  +
  +%reload -u @l_susr@
  +    rcService squidalyser enable yes || exit 0
  +    exit 0
  +
  +%hourly -u @l_susr@
  +    rcService squidalyser enable yes || exit 0
  +    @l_prefix@/sbin/squidparse.pl
  +    exit $?
  +
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/squidalyser/squidalyser.README
  ============================================================================
  $ cvs diff -u -r0 -r1.1 squidalyser.README
  --- /dev/null 2004-08-26 12:48:36 +0200
  +++ squidalyser.README        2004-08-26 12:48:36 +0200
  @@ -0,0 +1,77 @@
  +To activate "squidalyser" you have to do the following steps:
  +-------------------------------------------------------------
  +1.
  +    Change the password for the user "proxymaster" in the
  +    "squidalyser.passwd" file with the htpasswd command. The
  +    default is "proxymaster".
  +
  +2.
  +    Add the supplied include line from the file
  +    sqidalyser.apache to your apche.conf file and restart apache.
  +
  +3.
  +    Follow the below directions to setup your mysql database
  +    and change the squidalyser.conf accordingly:
  +
  +
  +
  +First, you need to create the database; then grant the
  +appropriate permissions to the database user; and finally create
  +the database tables and the information contained in them. The
  +"logfile" table contains a few entries for testing purposes, which
  +can be deleted after testing.
  +
  +Access mysql using this command:
  +
  +    mysql -u root -p 
  +
  +`root' is the name of the user who has sufficient privileges to set
  +up users and databases, and may be different on your system (ask
  +your systems administrator if you are unsure). The `-p' option
  +specifies that you need a password to access mysql: if you haven't
  +set a root password, consult the MySQL documentation to find out how
  +to do so.
  +
  +Create the database by typing: 
  +
  +    create database <dbname>;
  +
  +"squidalyser" is the suggested dbname. 
  +
  +    grant all on <dbname>.* to <dbuser>@localhost identified by '<dbpass>';
  +
  +"squidalyser" is the suggested dbuser. Make up your own password :-) 
  +
  +    flush privileges;
  +    exit
  +
  +When you've done that, create the tables and insert the
  +information they contain:
  +
  +    mysql <dbname> -u <admin_username> -p < squid.sql
  +
  +
  +That's it. You have a database which is ready to hold the information
  +from your squid logfiles.
  +
  +To ensure you have set up the database correctly, try submitting a few
  +queries via the mysql interface:
  +
  +    mysql <dbname> -u <dbuser> -p
  +
  +    select * from logfile;
  +
  +You should see a list of URLs and associated data. 
  +
  +    select * from list;
  +    
  +Should show the predefined lists of users and words. 
  +
  +    select * from list_member, list where list_id=list.id and list.id=9;
  +    
  +Shows a list of advertising-related keywords. 
  +
  +If it didn't work, you're on your own. Repeat the steps above (dropping
  +and recreating the database if necessary) and make sure you get the
  +details right.
  +
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/squidalyser/squidalyser.apache
  ============================================================================
  $ cvs diff -u -r0 -r1.1 squidalyser.apache
  --- /dev/null 2004-08-26 12:48:36 +0200
  +++ squidalyser.apache        2004-08-26 12:48:36 +0200
  @@ -0,0 +1,25 @@
  +#Include "@l_prefix@/etc/squidalyser/squidalyser.apache"
  +#
  +# Put the above line uncommented into your apache.conf
  +#
  +
  +#   configure global document root
  +DocumentRoot @l_prefix@/share/squidalyser
  +<Directory "@l_prefix@/share/squidalyser">
  +    Options FollowSymLinks ExecCGI
  +    AllowOverride none
  +    Order allow,deny
  +    Allow from all
  +    <IfModule mod_dir.c>
  +        DirectoryIndex squidalyser_about.html
  +    </IfModule>
  +    AuthName "Enter username and password for administrativ access:"
  +    AuthType Basic
  +    Require user proxymaster
  +    AuthUserFile "@l_prefix@/etc/squidalyser/squidalyser.passwd"
  +</Directory>
  +
  +<IfModule mod_cgi.c>
  +    AddHandler cgi-script .pl
  +</IfModule>
  +
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/squidalyser/squidalyser.passwd
  ============================================================================
  $ cvs diff -u -r0 -r1.1 squidalyser.passwd
  --- /dev/null 2004-08-26 12:48:36 +0200
  +++ squidalyser.passwd        2004-08-26 12:48:36 +0200
  @@ -0,0 +1 @@
  +proxymaster:X4OPGbV5cPMhw
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/squidalyser/squidalyser.spec
  ============================================================================
  $ cvs diff -u -r0 -r1.1 squidalyser.spec
  --- /dev/null 2004-08-26 12:48:36 +0200
  +++ squidalyser.spec  2004-08-26 12:48:36 +0200
  @@ -0,0 +1,137 @@
  +##
  +##  squidalyser.spec -- OpenPKG RPM Specification
  +##  Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
  +##  Copyright (c) 2000-2004 Ralf S. Engelschall <[EMAIL PROTECTED]>
  +##  Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.com/>
  +##
  +##  Permission to use, copy, modify, and distribute this software for
  +##  any purpose with or without fee is hereby granted, provided that
  +##  the above copyright notice and this permission notice appear in all
  +##  copies.
  +##
  +##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  +##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  +##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  +##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  +##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  +##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  +##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  +##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  +##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  +##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  +##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  +##  SUCH DAMAGE.
  +##
  +
  +#   package information
  +Name:         squidalyser
  +Summary:      Big Brother for Squid Logfiles
  +URL:          http://squidalyser.sourceforge.net
  +Vendor:       Simon Burns
  +Packager:     The OpenPKG Project
  +Distribution: OpenPKG
  +Class:        JUNK
  +Group:        Web
  +License:      GPL
  +Version:      1.0b
  +Release:      20040826
  +
  +#   list of sources
  +Source0:      http://squidalyser.sourceforge.net/dist/squidalyser-%{version}.tar.gz
  +Source1:      rc.squidalyser
  +Source2:      squidalyser.README
  +Source3:      squidalyser.passwd
  +Source4:      squidalyser.apache
  +
  +#   build information
  +Prefix:       %{l_prefix}
  +BuildRoot:    %{l_buildroot}
  +BuildPreReq:  OpenPKG, openpkg >= 20040130
  +PreReq:       OpenPKG, openpkg >= 20040130, perl-db, perl-dbi::with_dbd_mysql = 
yes, perl-gd, perl-www
  +AutoReq:      no
  +AutoReqProv:  no
  +
  +%description
  +    Squidalyser is a squid traffic analyser, designed to allow per-user
  +    scrutiny and analysis of squid logfiles. The program allows a
  +    non-technical user to extract information about web usage patterns,
  +    the type of information downloaded, the sites visited by users, the
  +    graphics downloaded, and the amount of information (per-byte or
  +    per-file) accessed. The program runs from a Unix system via a web
  +    browser.
  +
  +%track
  +    prog squidalyser = {
  +        version   = %{version}
  +        url       = http://squidalyser.sourceforge.net/dist
  +        regex     = squidalyser-(__VER__)\.tar\.gz
  +    }
  +
  +%prep
  +    %setup -q
  +
  +%build
  +    #   no-op
  +
  +%install
  +    rm -rf $RPM_BUILD_ROOT
  +    %{l_shtool} mkdir -f -p -m 755 \
  +    $RPM_BUILD_ROOT%{l_prefix}/share/squidalyser/icons \
  +    $RPM_BUILD_ROOT%{l_prefix}/share/squidalyser/cgi-bin/Squidalyser \
  +    $RPM_BUILD_ROOT%{l_prefix}/sbin \
  +    $RPM_BUILD_ROOT%{l_prefix}/etc/squidalyser \
  +    $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  +
  +    %{l_shtool} install -c -m 644 \
  +        icons/* $RPM_BUILD_ROOT%{l_prefix}/share/squidalyser/icons/
  +
  +    %{l_shtool} install -c -m 755 \
  +        -e 's;/usr/bin/perl;%{l_prefix}/bin/perl;' \
  +        -e 
's;/usr/local/squidalyser/squidalyser.conf;%{l_prefix}/etc/squidalyser/squidalyser.conf;'
 \
  +        -e '/use 
lib/s;/usr/local/squidalyser;%{l_prefix}/share/squidalyser/cgi-bin/Squidalyser;' \
  +        -e 
's;/usr/local/squidalyser/template.html;%{l_prefix}/share/squidalyser/template.html;' \
  +        cgi-bin/* $RPM_BUILD_ROOT%{l_prefix}/share/squidalyser/cgi-bin/
  +
  +    %{l_shtool} install -c -m 755 \
  +        -e 
's;/usr/local/squidalyser/squidalyser.conf;%{l_prefix}/etc/squidalyser/squidalyser.conf;'
 \
  +        -e 
's;/usr/local/squidalyser/template.html;%{l_prefix}/share/squidalyser/template.html;' \
  +        squidalyser/Squidalyser/* 
$RPM_BUILD_ROOT%{l_prefix}/share/squidalyser/cgi-bin/Squidalyser/
  +
  +    %{l_shtool} install -c -m 644 \
  +        html/* $RPM_BUILD_ROOT%{l_prefix}/share/squidalyser/
  +
  +    %{l_shtool} install -c -m 644 \
  +        squidalyser/template.html $RPM_BUILD_ROOT%{l_prefix}/share/squidalyser/
  +
  +    %{l_shtool} install -c -m 755 \
  +        -e 's;/usr/bin/perl;%{l_prefix}/bin/perl;' \
  +        -e 
's;/usr/local/squidalyser/squidalyser.conf;%{l_prefix}/etc/squidalyser/squidalyser.conf;'
 \
  +        -e 
's;/usr/local/squidparse/squidalyser.conf;%{l_prefix}/etc/squidalyser/squidalyser.conf;'
 \
  +        squidalyser/squidparse.pl $RPM_BUILD_ROOT%{l_prefix}/sbin/
  +
  +    %{l_shtool} install -c -m 644 \
  +        -e 's;/var/log/squid/access.log;%{l_prefix}/var/squid/logs/access.log;' \
  +        squidalyser/squidalyser.conf $RPM_BUILD_ROOT%{l_prefix}/etc/squidalyser/
  +
  +    %{l_shtool} install -c -m 644 \
  +        sql/squid.sql $RPM_BUILD_ROOT%{l_prefix}/etc/squidalyser/
  +
  +    %{l_shtool} install -c -m 644 %{l_value -s -a} \
  +        %{SOURCE squidalyser.README} \
  +        %{SOURCE squidalyser.passwd} \
  +        %{SOURCE squidalyser.apache} \
  +        $RPM_BUILD_ROOT%{l_prefix}/etc/squidalyser/
  +
  +    %{l_shtool} install -c -m 755 %{l_value -s -a} \
  +        %{SOURCE rc.squidalyser} \
  +        $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  +
  +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
  +        '%config %attr(444,%{l_musr},%{l_mgrp}) %{l_prefix}/etc/squidalyser/*' \
  +        '%config(noreplace) %attr(444,%{l_musr},%{l_mgrp}) 
%{l_prefix}/etc/squidalyser/squidalyser.passwd'
  +
  +%files -f files
  +
  +%clean
  +    rm -rf $RPM_BUILD_ROOT
  +
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to