debian/0000755000000000000000000000000012161522157007170 5ustar debian/cricket.install0000644000000000000000000000036411751166605012215 0ustar collect-subtrees collector collector_th usr/share/cricket debian/cricket-conf.pl subtree-sets etc/cricket grapher.cgi mini-graph.cgi usr/lib/cgi-bin/cricket lib images util usr/share/cricket sample-config/Defaults etc/cricket/config debian/wrapper-mini.c0000644000000000000000000000031211751166605011750 0ustar #include int main(int argn, char **argv, char **envp) { argv[0] = "/usr/lib/cgi-bin/cricket/mini-graph-real.cgi"; execve("/usr/lib/cgi-bin/cricket/mini-graph-real.cgi",argv,envp); } debian/postrm0000644000000000000000000000266711751166605010460 0ustar #! /bin/sh # postrm script for cricket # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `remove' # * `purge' # * `upgrade' # * `failed-upgrade' # * `abort-install' # * `abort-install' # * `abort-upgrade' # * `disappear' overwrit>r> # for details, see /usr/doc/packaging-manual/ case "$1" in purge) if id cricket > /dev/null 2>&1; then userdel cricket else echo "Can't remove user cricket. Please remove this user by hand." fi if sg cricket -c true 2>/dev/null; then groupdel cricket else echo "Can't remove user cricket. Please remove this user by hand." fi rm -rf /etc/cricket /var/cache/cricket /var/lib/cricket \ /var/log/cricket ;; remove|upgrade|failed-upgrade|abort-install|disappear) ;; abort-upgrade) if dpkg --compare-versions "$2" lt "1.0.2+1.0.3-pre4b-1" && \ test -d /etc/cricket/config then find /etc/cricket/config -maxdepth 1 -mindepth 1 -print0 | \ xargs -0 --no-run-if-empty \ mv --target-directory=/etc/cricket fi ;; *) echo "postrm called with unknown argument \`$1'" >&2 exit 0 esac #DEBHELPER# debian/source/0000775000000000000000000000000011751166605010500 5ustar debian/source/format0000644000000000000000000000001411751166605011704 0ustar 3.0 (quilt) debian/cricket.10000644000000000000000000000332611751166605010710 0ustar .TH CRICKET 1 .\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection .\" other parms are allowed: see man(7), man(1) .ds c /etc/cricket .SH NAME cricket \- A program to manage the collection and display of time-series data .SH SYNOPSIS .B cricket-compile .br .B /usr/share/cricket/collector .br .B /usr/lib/cgi-bin/cricket/grapher.cgi .SH "DESCRIPTION" This manual page documents briefly the programs associated with Cricket. .TP .B cricket-compile .br The \fBcricket-compile\fR program compiles the Cricket config tree (found in \fI\*c\fR) into the format read by the collector. It is normally run after editing the files in the config tree. No options are needed. .TP .B collector The .B collector program reads a Cricket configuration from \fI\*c\fR, compiled by the .B cricket-compile command, and collects and stores data according to the information found there. It is normally run periodically from a \fBcron\fR(8) job. .TP .B grapher.cgi \fBgrapher.cgi\fR is a CGI program to display the data collected by Cricket in a graphical format. It is usually accessed using a web browser, e.g. using the URL http://localhost/cgi-bin/cricket/grapher.cgi. It will allow you to navigate around all of the targets in the config tree. .PP This manual page was written for the Debian GNU/Linux distribution because the original program does not have a manual page. Instead, it has documentation in the HTML format; see below. .SH "SEE ALSO" The programs are documented fully by various HTML documents available via the help system, or directly in /usr/share/doc/cricket. .br dhelp(1), dwww(1), cron(8) .SH AUTHOR This manual page was written by Matt Zimmerman , for the Debian GNU/Linux system (but may be used by others). debian/cricket-conf.pl0000644000000000000000000000266611751166605012114 0ustar # Sample Cricket configuration file. # This file is looked for in the same directory where the executable # scripts are located, or in /etc/cricket-conf.pl. # In its absence, the rules for Cricket 1.0.2 and previous versions # apply, i.e. Cricket looks at your HOME directory to find its # components. # # The commented out variables are optional and should probably # not be tweaked unless you know what you're doing. # # It is possible to modify the Perl environment, e.g. by adding # "use lib /foo" to this file. # # After modifying this file, you should check it for validity with # 'perl -c cricket-conf.pl' before running cricket. # # $Id: cricket-conf.pl,v 1.2 2003/03/23 16:50:37 mdz Exp $ package Common::global; $gCricketHome = "/usr/share/cricket"; $gInstallRoot = "/usr/share/cricket"; $gConfigRoot = "/etc/cricket/config"; $gLogDir = "/var/log/cricket"; # Whether to optimize config tree access for the collector by # copying the database into memory on startup. # Switch off if your collector becomes too big in run time. # Most sites will probably want slurp, this is the default. #$gDbAccess = "slurp"; # Slurp the database into memory #$gDbAccess = "lookup"; # Use normal DB lookups # Where cricket caches generated images. $gCacheDir = "/var/cache/cricket"; # It is strongly recommended that you *not* set a global logLevel. # Use the CRICKET_LOG_LEVEL environment variable or the # -logLevel option instead. #$gLogLevel = "info"; debian/patches/0000755000000000000000000000000011751166605010625 5ustar debian/patches/01_debian-patch.diff0000644000000000000000000004624211751166605014306 0ustar Index: cricket-1.0.5/doc/index.html =================================================================== --- cricket-1.0.5.orig/doc/index.html 2011-08-23 15:14:00.409899435 +0200 +++ cricket-1.0.5/doc/index.html 2011-12-07 11:47:42.399453510 +0100 @@ -7,6 +7,13 @@

Cricket Documentation

    +
  • Cricket for Debian + +

    + Important information about how Cricket has been adapted + for Debian. You should read this before any of the + following documents. +

  • Installing Cricket for the Complete Beginner Index: cricket-1.0.5/lib/snmp.pm =================================================================== --- cricket-1.0.5.orig/lib/snmp.pm 2011-08-23 15:14:00.461897330 +0200 +++ cricket-1.0.5/lib/snmp.pm 2011-12-07 11:47:42.407453773 +0100 @@ -79,7 +79,8 @@ my(@oidsToQuery) = (); if ($#{ $snmpDSRef } >= 0) { - my(@oidsToQuery) = my(@indices) = (); + my(@oidsToQuery) = (); + my(@indices) = (); my($line); while ($line = shift @{ $snmpDSRef }) { my($index, $oid) = split(/:/, $line); Index: cricket-1.0.5/lib/ConfigTree/Cache.pm =================================================================== --- cricket-1.0.5.orig/lib/ConfigTree/Cache.pm 2011-08-23 15:14:00.493896035 +0200 +++ cricket-1.0.5/lib/ConfigTree/Cache.pm 2011-12-07 11:47:42.407453773 +0100 @@ -145,7 +145,10 @@ $tags = '' unless defined($tags); foreach $tag (split(/,/, $tags)) { - $hash->{$tag} = $dbRef->{"d:$item:$dict:--default--:$tag"}; + my $s = $dbRef->{"d:$item:$dict:--default--:$tag"}; + # untaint; the config tree is trusted + $s =~ /^(.*)$/ and $s = $1; + $hash->{$tag} = $s; } # ...and try once for $name @@ -153,7 +156,10 @@ $tags = '' unless defined($tags); foreach $tag (split(/,/, $tags)) { - $hash->{$tag} = $dbRef->{"d:$item:$dict:$name:$tag"}; + my $s = $dbRef->{"d:$item:$dict:$name:$tag"}; + # untaint; the config tree is trusted + $s =~ /^(.*)$/ and $s = $1; + $hash->{$tag} = $s; } } Index: cricket-1.0.5/lib/ConfigTree/Node.pm =================================================================== --- cricket-1.0.5.orig/lib/ConfigTree/Node.pm 2011-08-23 15:14:00.477896684 +0200 +++ cricket-1.0.5/lib/ConfigTree/Node.pm 2011-12-07 11:48:55.313863389 +0100 @@ -168,9 +168,24 @@ my($file) = "$base/config.db.new"; my($finalFile) = "$base/config.db"; my($errorLevel); + my($file_uid,$file_gid,$file_mode); + + # ideally, we shouldn't unlink($file) and then move the new + # one into its place with rename(): it would be better to rewrite + # $file in place (could be dangerous) or make the new database in + # a temporary place and then dump it on top of the existing one + # (equiv. to "cat foo > bar", preserving file ownership & mode). + # + # for now: cache the mode and ownership of $file, and do some sanity + # checking to make sure this routine doesn't fall over in a heap. + unless (-w $base) { + Common::Log::Error("Don't have write permission on $base, creating a new file and fixing its permissions will be problematic at best"); + } + ($file_mode,$file_uid,$file_gid) = (stat($finalFile))[2,4,5]; + # we are being asked to do a complete rebuild, so start - # from scratch - unlink($file); + # from scratch: remove the temporary config.db if it exists. + unlink($file) if (-e $file); my(%db); my($dbh) = tie %db, 'DB_File', $file, O_CREAT|O_RDWR, 0644, $DB_BTREE; @@ -190,8 +205,14 @@ undef $dbh; untie %db; + if (defined($file_mode) && !chmod($file_mode, $file)) { + $file_mode = sprintf("%04o",$file_mode & 07777); + Common::Log::Error("couldn't apply preserved file mode ($file_mode) to $file, fix manually"); + } + if(defined($file_uid) && defined($file_gid) && !chown($file_uid, $file_gid, $file)) { + Common::Log::Error("couldn't apply preserved file ownership ($file_uid/$file_gid) to $file, fix manually"); + } rename($file, $finalFile) or $errorLevel = $!; - if ($errorLevel) { Common::Log::Error("config.db.new could not be renamed to config.db!"); Common::Log::Error("Reason is: $errorLevel"); @@ -584,6 +605,7 @@ $res = 1 if ($file =~ /\.dpkg-/); $res = 1 if ($file =~ /^\./); $res = 1 if ($file =~ /\/CVS$/); + $res = 1 if ($file =~ /\.dpkg-/); return $res; } Index: cricket-1.0.5/collector =================================================================== --- cricket-1.0.5.orig/collector 2011-08-23 15:14:00.425898788 +0200 +++ cricket-1.0.5/collector 2011-12-07 11:47:42.407453773 +0100 @@ -20,11 +20,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. BEGIN { - my $programdir = (($0 =~ m:^(.*/):)[0] || "./") . "."; - eval "require '$programdir/cricket-conf.pl'"; - eval "require '/usr/local/etc/cricket-conf.pl'" - unless $Common::global::gInstallRoot; - $Common::global::gInstallRoot ||= $programdir; + require '/etc/cricket/cricket-conf.pl'; } use lib "$Common::global::gInstallRoot/lib"; @@ -81,9 +77,8 @@ if ($recomp) { Warn("Config tree needs to be recompiled: $why"); - system( (Common::Util::isWin32() ? 'perl ' : '') . - "$Common::global::gInstallRoot/compile " . - "-base $Common::global::gConfigRoot"); + system("/usr/bin/cricket-compile " . + "-base $Common::global::gConfigRoot"); $gCT = new ConfigTree::Cache; $gCT->Base($Common::global::gConfigRoot); Index: cricket-1.0.5/collector_th =================================================================== --- cricket-1.0.5.orig/collector_th 2011-08-23 15:14:00.453897655 +0200 +++ cricket-1.0.5/collector_th 2011-12-07 11:47:42.407453773 +0100 @@ -20,11 +20,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. BEGIN { - my $programdir = (($0 =~ m:^(.*/):)[0] || "./") . "."; - eval "require '$programdir/cricket-conf.pl'"; - #eval "require '/usr/local/etc/cricket-conf.pl'" - # unless $Common::global::gInstallRoot; - $Common::global::gInstallRoot ||= $programdir; + require '/etc/cricket/cricket-conf.pl'; } Index: cricket-1.0.5/compile =================================================================== --- cricket-1.0.5.orig/compile 2011-08-23 15:14:00.625890695 +0200 +++ cricket-1.0.5/compile 2011-12-07 11:47:42.407453773 +0100 @@ -20,11 +20,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. BEGIN { - my $programdir = (($0 =~ m:^(.*/):)[0] || "./") . "."; - eval "require '$programdir/cricket-conf.pl'"; - eval "require '/usr/local/etc/cricket-conf.pl'" - unless $Common::global::gInstallRoot; - $Common::global::gInstallRoot ||= $programdir; + require '/etc/cricket/cricket-conf.pl'; } use lib "$Common::global::gInstallRoot/lib"; Index: cricket-1.0.5/mini-graph.cgi =================================================================== --- cricket-1.0.5.orig/mini-graph.cgi 2011-08-23 15:14:00.437898302 +0200 +++ cricket-1.0.5/mini-graph.cgi 2011-12-07 11:47:42.407453773 +0100 @@ -23,11 +23,10 @@ # This magic attempts to guess the install directory based # on how the script was called. If it fails for you, just # hardcode it. - my $programdir = (($0 =~ m:^(.*/):)[0] || "./") . "."; - eval "require '$programdir/cricket-conf.pl'"; - eval "require '/usr/local/etc/cricket-conf.pl'" - unless $Common::global::gInstallRoot; - $Common::global::gInstallRoot ||= $programdir; + require '/etc/cricket/cricket-conf.pl'; + + # Necessary for set[ug]id operation + $ENV{PATH} = '/bin:/usr/bin'; } use lib "$Common::global::gInstallRoot/lib"; @@ -106,7 +105,7 @@ if (! tryPng($png)) { Warn("Could not open $png: $!"); - if (! tryPng("images/failed.png")) { + if (! tryPng("/usr/share/cricket/images/failed.png")) { Warn("Could not send failure png: $!"); return; } Index: cricket-1.0.5/subtree-sets =================================================================== --- cricket-1.0.5.orig/subtree-sets 2011-08-23 15:14:00.637890208 +0200 +++ cricket-1.0.5/subtree-sets 2011-12-07 11:47:42.411453905 +0100 @@ -1,14 +1,6 @@ # This file lists the subtrees that will be processed together in one # set. See the comments at the beginning of collect-subtrees for more info. -# This will be passed to collector so it can find the Config Tree. -# If this directory does not start with a slash, it will -# have $HOME prepended. -base: cricket-config - -# this is where logs will be put. (The $HOME rule applies here too.) -logdir: cricket-logs - set normal: /routers /router-interfaces Index: cricket-1.0.5/sample-config/atm-interfaces/Defaults =================================================================== --- cricket-1.0.5.orig/sample-config/atm-interfaces/Defaults 2011-08-23 15:14:00.529894580 +0200 +++ cricket-1.0.5/sample-config/atm-interfaces/Defaults 2011-12-07 11:47:42.411453905 +0100 @@ -6,7 +6,7 @@ target --default-- short-desc = "%swname%: %interface-desc%" long-desc = %interface-desc% - util-dir = %auto-base%/../cricket/util + util-dir = /usr/share/cricket/util inst = %InterfaceID% snmp-community = public snmp-host = %swname% Index: cricket-1.0.5/sample-config/Defaults =================================================================== --- cricket-1.0.5.orig/sample-config/Defaults 2011-08-23 15:14:00.541894094 +0200 +++ cricket-1.0.5/sample-config/Defaults 2011-12-07 11:48:39.817351323 +0100 @@ -3,7 +3,7 @@ # Target --default-- - dataDir = %auto-base%/../cricket-data/%auto-target-path% + dataDir = /var/lib/cricket/%auto-target-path% email-program = /usr/bin/mailx rrd-datafile = %dataDir%/%auto-target-name%.rrd rrd-poll-interval = 300 @@ -125,7 +125,7 @@
    - +

    @@ -137,7 +137,7 @@

    - +
    @@ -174,6 +174,7 @@ color orange FF8000 color burntorng 800000 color purply FB31FB +color white ffffff # this tells the grapher which colors to choose first, if # it was not given colors Index: cricket-1.0.5/sample-config/http-performance/Defaults =================================================================== --- cricket-1.0.5.orig/sample-config/http-performance/Defaults 2011-08-23 15:14:00.609891341 +0200 +++ cricket-1.0.5/sample-config/http-performance/Defaults 2011-12-07 11:47:42.411453905 +0100 @@ -4,7 +4,7 @@ %url%." # you'll probably want to change this... unless you # have Cricket in ~/cricket and your config tree in ~/cricket-config - util-dir = %auto-base%/../cricket/util + util-dir = /usr/share/cricket/util target-type = http-performance url = "" Index: cricket-1.0.5/sample-config/news-server/Defaults =================================================================== --- cricket-1.0.5.orig/sample-config/news-server/Defaults 2011-08-23 15:14:00.513895227 +0200 +++ cricket-1.0.5/sample-config/news-server/Defaults 2011-12-07 11:47:42.411453905 +0100 @@ -10,7 +10,7 @@ target --default-- # you'll probably want to change this... unless you # have Cricket in ~/cricket and your config tree in ~/config - util-dir = %auto-base%/../cricket/util + util-dir = /usr/share/cricket/util remexec = "/usr/local/net/bin/ssh -l %user% %server%" user = news server = nntp-host Index: cricket-1.0.5/sample-config/portmasters/Defaults =================================================================== --- cricket-1.0.5.orig/sample-config/portmasters/Defaults 2011-08-23 15:14:00.573892799 +0200 +++ cricket-1.0.5/sample-config/portmasters/Defaults 2011-12-07 11:47:42.411453905 +0100 @@ -9,7 +9,7 @@ # fill in your domain name here domain = "" snmp-host = %portmaster%.%domain% - pm3lineUsage = "%auto-base%/../cricket/util/pmlines.pl" + pm3lineUsage = "/usr/share/cricket/util/pmlines.pl" pm3lines = "%pm3lineUsage% %snmp-community%@%snmp-host%" # you could set a router-specific community string here: # snmp-community = not-public Index: cricket-1.0.5/sample-config/subtree-times/Defaults =================================================================== --- cricket-1.0.5.orig/sample-config/subtree-times/Defaults 2011-08-23 15:14:00.593891990 +0200 +++ cricket-1.0.5/sample-config/subtree-times/Defaults 2011-12-07 11:47:42.411453905 +0100 @@ -14,7 +14,7 @@ directory-desc = "Just how long is the collector taking?" disable-short-desc = true long-desc = "%auto-target-name% collector information" - bindir = %auto-base%/../cricket/util + bindir = /usr/share/cricket/util datasource --default-- rrd-ds-type = GAUGE Index: cricket-1.0.5/sample-config/usr/Defaults =================================================================== --- cricket-1.0.5.orig/sample-config/usr/Defaults 2011-08-23 15:14:00.561893285 +0200 +++ cricket-1.0.5/sample-config/usr/Defaults 2011-12-07 11:47:42.411453905 +0100 @@ -9,7 +9,7 @@ domain = yournetwork.net # you'll probably want to change this... unless you # have Cricket in ~/cricket and your config tree in ~/config - util-dir = %auto-base%/../cricket/util + util-dir = /usr/share/cricket/util #snmp-community = private snmp-host = "%modem%.%domain%" usrGetUsage = "%auto-base%/../cricket/util/usrModemUsage" Index: cricket-1.0.5/util/LeanODBC/test.pl =================================================================== --- cricket-1.0.5.orig/util/LeanODBC/test.pl 2011-08-23 15:14:00.665889075 +0200 +++ cricket-1.0.5/util/LeanODBC/test.pl 2011-12-07 11:47:42.411453905 +0100 @@ -1,3 +1,4 @@ +#!/usr/bin/perl # Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl test.pl' @@ -74,4 +75,3 @@ print (($ret[0] == SQL_SUCCESS) ? "ok 14\n" : "not ok 14\n"); @ret = SQLFreeHandle(SQL_HANDLE_ENV,$henv); print (($ret[0] == SQL_SUCCESS) ? "ok 15\n" : "not ok 15\n"); - Index: cricket-1.0.5/util/dump-targets =================================================================== --- cricket-1.0.5.orig/util/dump-targets 2011-08-23 15:14:00.653889562 +0200 +++ cricket-1.0.5/util/dump-targets 2011-12-07 11:47:42.411453905 +0100 @@ -20,11 +20,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. BEGIN { - my $programdir = (($0 =~ m:^(.*/):)[0] || "./") . ".."; - eval "require '$programdir/cricket-conf.pl'"; - eval "require '/usr/local/etc/cricket-conf.pl'" - unless $Common::global::gInstallRoot; - $Common::global::gInstallRoot ||= $programdir; + require '/etc/cricket/cricket-conf.pl'; } use lib "$Common::global::gInstallRoot/lib"; Index: cricket-1.0.5/util/generate-statics =================================================================== --- cricket-1.0.5.orig/util/generate-statics 2011-08-23 15:14:00.693887942 +0200 +++ cricket-1.0.5/util/generate-statics 2011-12-07 11:47:42.411453905 +0100 @@ -20,11 +20,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. BEGIN { - my $programdir = (($0 =~ m:^(.*/):)[0] || "./") . ".."; - eval "require '$programdir/cricket-conf.pl'"; - eval "require '/usr/local/etc/cricket-conf.pl'" - unless $Common::global::gInstallRoot; - $Common::global::gInstallRoot ||= $programdir; + require '/etc/cricket/cricket-conf.pl'; } use lib "$Common::global::gInstallRoot/lib"; Index: cricket-1.0.5/util/get-collector-stats =================================================================== --- cricket-1.0.5.orig/util/get-collector-stats 2011-08-23 15:14:00.725886647 +0200 +++ cricket-1.0.5/util/get-collector-stats 2011-12-07 11:47:42.411453905 +0100 @@ -20,11 +20,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. BEGIN { - my $programdir = (($0 =~ m:^(.*/):)[0] || "./") . ".."; - eval "require '$programdir/cricket-conf.pl'"; - eval "require '/usr/local/etc/cricket-conf.pl'" - unless $Common::global::gInstallRoot; - $Common::global::gInstallRoot ||= $programdir; + require '/etc/cricket/cricket-conf.pl'; } use strict; @@ -41,12 +37,12 @@ my $when = 0; my $now = time(); -if (! -f "$Common::global::gCricketHome/cricket-logs/$subtree.times") { - die "Couldn't find $Common::global::gCricketHome/cricket-logs/$subtree.times.\n"; +if (! -f "$Common::global::gLogDir/$subtree.times") { + die "Couldn't find $Common::global::gLogDir/$subtree.times.\n"; } else { - @output = `tail -1 $Common::global::gCricketHome/cricket-logs/$subtree.times 2>&1`; + @output = `tail -1 $Common::global::gLogDir/$subtree.times 2>&1`; if ($?) { - die "Error tailing $Common::global::gCricketHome/cricket-logs/$subtree.times: $?\n"; } + die "Error tailing $Common::global::gLogDir/$subtree.times: $?\n"; } } if ($output[0] =~ /\[(.*?)\]\s+Processed\s+([0-9]+)\s+targets\s+in\s+(.*)\.$/) { Index: cricket-1.0.5/util/listInterfaces =================================================================== --- cricket-1.0.5.orig/util/listInterfaces 2011-08-23 15:14:00.681888429 +0200 +++ cricket-1.0.5/util/listInterfaces 2011-12-07 11:47:42.411453905 +0100 @@ -20,11 +20,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. BEGIN { - my $programdir = (($0 =~ m:^(.*/):)[0] || "./") . ".."; - eval "require '$programdir/cricket-conf.pl'"; - eval "require '/usr/local/etc/cricket-conf.pl'" - unless $Common::global::gInstallRoot; - $Common::global::gInstallRoot ||= $programdir; + require '/etc/cricket/cricket-conf.pl'; } use lib "$Common::global::gInstallRoot/lib"; Index: cricket-1.0.5/util/rrd-tune =================================================================== --- cricket-1.0.5.orig/util/rrd-tune 2011-08-23 15:14:00.709887296 +0200 +++ cricket-1.0.5/util/rrd-tune 2011-12-07 11:47:42.415454037 +0100 @@ -20,11 +20,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. BEGIN { - my $programdir = (($0 =~ m:^(.*/):)[0] || "./") . ".."; - eval "require '$programdir/cricket-conf.pl'"; - eval "require '/usr/local/etc/cricket-conf.pl'" - unless $Common::global::gInstallRoot; - $Common::global::gInstallRoot ||= $programdir; + require '/etc/cricket/cricket-conf.pl'; } use lib "$Common::global::gInstallRoot/lib"; debian/patches/07_Format.pm.x86_64.diff0000644000000000000000000000171111751166605014565 0ustar Index: cricket-1.0.5/lib/RRD/Format.pm =================================================================== --- cricket-1.0.5.orig/lib/RRD/Format.pm 2009-04-26 10:52:51.000000000 +0200 +++ cricket-1.0.5/lib/RRD/Format.pm 2009-04-26 11:01:25.000000000 +0200 @@ -160,6 +160,16 @@ $self->{'liveHead'} = "Q"; $self->{'rraPtr'} = "Q"; $self->{'element'} = "d"; + } elsif ( $archname =~ /^x86_64-linux/ ) { + $self->{'statHead'} = "a4 a5 x7 d Q Q Q x80"; + $self->{'dsDef'} = "a20 a20 Q d d x56"; + $self->{'rraDef'} = "a20 x4 Q Q d x72"; + $self->{'liveHead'} = "Q Q"; + $self->{'liveHead3'} = "Q Q"; + $self->{'pdpDef'} = "a30 x2 Q d x64"; + $self->{'cdpDef'} = "d Q x64"; + $self->{'rraPtr'} = "Q"; + $self->{'element'} = "d"; } elsif ( $archname eq 'sparc64-netbsd' ) { $self->{'statHead'} = "a4 a5 x7 d Q Q Q x80"; $self->{'dsDef'} = "a20 a20 Q d d x56"; debian/patches/10_getFormat.c.diff0000644000000000000000000000446011751166605014134 0ustar Index: cricket-1.0.5/util/getFormat.c =================================================================== --- cricket-1.0.5.orig/util/getFormat.c 2009-04-12 19:06:47.000000000 +0200 +++ cricket-1.0.5/util/getFormat.c 2009-04-12 19:52:57.000000000 +0200 @@ -22,7 +22,9 @@ #include #include -#include +#define RRD_EXPORT_DEPRECATED + +#include void format_stat_head (void) { stat_head_t h1; @@ -102,7 +104,7 @@ pad = sizeof(h1) - total; sprintf(rrdFormat, "%s x%d", rrdFormat, pad); - printf("$self->{'statHead'} = \"%s\"\n", rrdFormat); + printf("$self->{'statHead'} = \"%s\";\n", rrdFormat); } void format_ds_def (void) { @@ -153,7 +155,7 @@ sprintf(rrdFormat, "%s x%d", rrdFormat, pad); } - printf("$self->{'dsDef'} = \"%s\"\n", rrdFormat); + printf("$self->{'dsDef'} = \"%s\";\n", rrdFormat); } void format_rra_def (void) { @@ -209,7 +211,7 @@ sprintf(rrdFormat, "%s x%d", rrdFormat, pad); } - printf("$self->{'rraDef'} = \"%s\"\n", rrdFormat); + printf("$self->{'rraDef'} = \"%s\";\n", rrdFormat); } void format_live_head (void) { @@ -218,7 +220,7 @@ memset(rrdFormat, 0, sizeof(rrdFormat)); sprintf(rrdFormat, "%c", (sizeof(time_t)==8)?'Q':'L'); - printf("$self->{'liveHead'} = \"%s\"\n", rrdFormat); + printf("$self->{'liveHead'} = \"%s\";\n", rrdFormat); } void format_pdp_prep (void) { @@ -259,7 +261,7 @@ sprintf(rrdFormat, "%s x%d", rrdFormat, pad); } - printf("$self->{'pdpDef'} = \"%s\"\n", rrdFormat); + printf("$self->{'pdpDef'} = \"%s\";\n", rrdFormat); } void format_cdp_prep (void) { @@ -286,7 +288,7 @@ sprintf(rrdFormat, "%s x%d", rrdFormat, pad); } - printf("$self->{'cdpDef'} = \"%s\"\n", rrdFormat); + printf("$self->{'cdpDef'} = \"%s\";\n", rrdFormat); } void format_rra_ptr (void) { @@ -296,7 +298,7 @@ sprintf(rrdFormat, "%c", (sizeof(&rrdFormat)==8)?'Q':'L'); - printf("$self->{'rraPtr'} = \"%s\"\n", rrdFormat); + printf("$self->{'rraPtr'} = \"%s\";\n", rrdFormat); } void format_element (void) { @@ -304,7 +306,7 @@ sprintf(rrdFormat, "d"); /* Assuming all data elements are just doubles * This is pretty safe */ - printf("$self->{'element'} = \"%s\"\n", rrdFormat); + printf("$self->{'element'} = \"%s\";\n", rrdFormat); } int main (void) { debian/patches/06_Format.pm.diff0000644000000000000000000000154611751166605013635 0ustar Index: cricket-1.0.5/lib/RRD/Format.pm =================================================================== --- cricket-1.0.5.orig/lib/RRD/Format.pm 2009-04-26 10:51:40.000000000 +0200 +++ cricket-1.0.5/lib/RRD/Format.pm 2009-04-26 10:52:51.000000000 +0200 @@ -123,6 +123,7 @@ $self->{'cdpDef'} = "d L x4 x64"; $self->{'liveHead'} = "L"; + $self->{'liveHead3'} = "L L"; $self->{'rraPtr'} = "L"; $self->{'element'} = "d"; @@ -150,7 +151,7 @@ $self->{'liveHead'} = "L"; $self->{'rraPtr'} = "L"; $self->{'element'} = "d"; - } elsif ( $archname eq 'alpha-linux' ) { + } elsif ( $archname eq 'alpha-linux' or $archname eq 'alpha-linux-gnu') { $self->{'statHead'} = "a4 a5 x7 d Q Q Q x80"; $self->{'dsDef'} = "a20 a20 Q d d x56"; $self->{'rraDef'} = "a20 x4 Q Q d x72"; debian/patches/series0000644000000000000000000000030711751166605012042 0ustar 01_debian-patch.diff 02_grapher.cgi.diff 03_File.pm.diff 04_collect-subtrees.diff 05_systemperf.diff 06_Format.pm.diff 07_Format.pm.x86_64.diff 08_hourly.diff 09_white-space.diff 10_getFormat.c.diff debian/patches/03_File.pm.diff0000644000000000000000000000105411751166605013253 0ustar --- cricket-1.0.5.orig/lib/RRD/File.pm 2006-05-04 14:00:17.000000000 +0200 +++ cricket-1.0.5/lib/RRD/File.pm 2006-05-04 14:00:44.000000000 +0200 @@ -196,7 +196,7 @@ { my ($block); my ($last_up, $last_up_usec); - if ($v eq "0001" || $v eq "0002") { + if ($v eq "0001" || $v eq "0002" || $v eq "0003") { $block = $self->_readNextBlock(sizeof($fmt->format('liveHead'))); croak("Could not read live header") unless (defined($block)); $last_up = unpack($fmt->format('liveHead'), $block); debian/patches/02_grapher.cgi.diff0000644000000000000000000000534611751166605014161 0ustar --- cricket-1.0.5.orig/grapher.cgi 2006-05-04 13:54:31.000000000 +0200 +++ cricket-1.0.5/grapher.cgi 2006-05-04 13:56:43.000000000 +0200 @@ -23,19 +23,7 @@ # If you need to change anything in this script, it should only # be here, in this BEGIN block. See the README for more info. - my $programdir = (($0 =~ m:^(.*/):)[0] || "./") . "."; - eval "require '$programdir/cricket-conf.pl'"; - if (!$Common::global::gInstallRoot && -l $0) { - eval { - my $link = readlink($0); - my $dir = (($link =~ m:^(.*/):)[0] || "./") . "."; - require "$dir/cricket-conf.pl"; - } - } - eval "require '/usr/local/etc/cricket-conf.pl'" - unless $Common::global::gInstallRoot; - $Common::global::gInstallRoot ||= $programdir; - $Common::global::gConfigRoot ||= 'cricket-config'; + require '/etc/cricket/cricket-conf.pl'; $Common::global::isGrapher = 1; } @@ -230,8 +218,9 @@ # put the view into the target dict, so it's # there if they want to use it. - my($view) = lc $gQ->param('view'); + my($view) = $gQ->param('view'); if (defined($view)) { + $view = lc $view; $targRef->{'auto-view'} = $view; } @@ -554,6 +543,8 @@ my($bv) = ($ENV{'HTTP_USER_AGENT'} =~ /\/(\d)/); if (defined($bv) && $bv <= 3) { $defFmt = 'gif'; + } elsif ($ENV{'HTTP_USER_AGENT'}=~/Blazer 1.0/i ) { + $defFmt = 'gif'; } my($format) = graphParam($gRef, 'graph-format', $defFmt); @@ -1490,6 +1481,7 @@ # things we pick up form the target dict my($rrd) = $targRef->{'rrd-datafile'}; $lasttime = scalar(localtime(RRDs::last($rrd))); + $lasttime =~ s/:/\\:/g; # use the dslist to create a set of defs/cdefs @@ -1601,8 +1593,8 @@ } # push NaN bars on first in background - $paintNaN && push @cdefs, "CDEF:unavail$ct=ds$ct,UN,INF,0,IF"; - $paintNaN && push @lines, "AREA:unavail$ct#FFCCCC"; + $paintNaN && push @cdefs, "CDEF:unavail$ct=ds$ct,UN,INF,0,IF", "CDEF:unavailneg$ct=ds$ct,UN,NEGINF,0,IF"; + $paintNaN && push @lines, "AREA:unavail$ct#FFCCCC", "AREA:unavailneg$ct#FFCCCC"; my($dsidx) = $dsnamemap{$ds}; if (defined($dsidx)) { @@ -1957,7 +1949,7 @@ my($picData) = suckPic($pic); if (! defined($picData)) { - $pic = "images/failed.gif"; + $pic = "/usr/share/cricket/images/failed.gif"; $picData = suckPic($pic); if (! defined($picData)) { print $gQ->header('text/plain'); debian/patches/04_collect-subtrees.diff0000644000000000000000000001513211751166605015243 0ustar --- cricket-1.0.5.orig/collect-subtrees +++ cricket-1.0.5/collect-subtrees @@ -24,17 +24,13 @@ # argument, the subtree set it will process. It rolls the logfiles # for that set, then runs the collector on that subtree set. -# it reads it's subtree sets from a config file, by default a file +# it reads its subtree sets from a config file, by default a file # in the cricket install directory named 'subtree-sets'. You can # and should put the file somewhere else, and use the -cf argument # to tell collect-subtrees where to find it. BEGIN { - my $programdir = (($0 =~ m:^(.*/):)[0] || "./") . "."; - eval "require '$programdir/cricket-conf.pl'"; - eval "require '/usr/local/etc/cricket-conf.pl'" - unless $Common::global::gInstallRoot; - $Common::global::gInstallRoot ||= $programdir; + require '/etc/cricket/cricket-conf.pl'; } $| = 1; # Useful if you want to tail -f a logfile while the collector runs! :) @@ -47,14 +43,14 @@ my @mHist; my $gMailTo; my $gDebug = 0; -my $gCF = "$Common::global::gInstallRoot/subtree-sets"; +my $gCF = "/etc/cricket/subtree-sets"; GetOptions( "cf=s" => \$gCF, "mail|m=s" => \$gMailTo, "debug|d" => \$gDebug, ); -my $gLogDir = "$Common::global::gCricketHome/log"; +my $gLogDir = $Common::global::gLogDir; my $gBase = $Common::global::gConfigRoot; my $gKeepLogs = 20; my $gUser = getlogin || getpwuid($<); # idiom from perlfunc manpage @@ -65,8 +61,8 @@ # Change this to = 1 if you want to get collection length statistics. my $subtreeTimes = 0; -# Change this to your local mailer if you don't have /bin/mailx! -my $gMailer = '/bin/mailx'; +# Change this to your local mailer if you don't have /usr/bin/mailx! +my $gMailer = '/usr/bin/mailx'; open(S, "<$gCF") || die("Could not read $gCF file.\n"); @@ -112,7 +108,7 @@ my($subtreeRef) = $gSets{$s}; my(@output) = (); my($debugFlag) = ""; - if (! defined($subtreeRef)) { + if (! defined($subtreeRef) && $s ne 'ALL') { if($mOut == 1) { push @mHist, "$0: unknown subtree name: $s\n"; } else { @@ -142,82 +138,87 @@ system("touch $lockfile"); } - rollLogs($s); - my $logfile = "$gLogDir/$s.0"; + #rollLogs($s); + my $logfile = "$gLogDir/$s.log"; my $timelogfile = "$gLogDir/$s.times"; if(-f $timelogfile && -s $timelogfile >= 50000 && $subtreeTimes == 1) { rename $timelogfile, "$timelogfile.old"; } $debugFlag = "-loglevel debug" if ($gDebug == 1); - my $args = "$debugFlag -base $gBase " . join(" ", @{$subtreeRef}); + my $args = "$debugFlag -base $gBase "; + $args .= join(" ", @{$subtreeRef}) + if ($s ne 'ALL'); - # Win32 does not support #! notation - system((isWin32() ? "perl " : "") . - "$Common::global::gInstallRoot/collector $args > $logfile 2>&1"); + warn "$logfile: $!\n" unless open(LOG, ">>$logfile"); - # unlock it - unlink($lockfile) if (!isWin32()); + my $collector = "$Common::global::gInstallRoot/collector $args"; + # Win32 does not support #! notation + $collector = "perl $collector" if (isWin32()); - # scan the logfile for errors and send them to stderr - # so that cron sends them to the admin. + open(COLLECTOR, "$collector 2>&1|") || warn "collector: $!\n"; - if (open(L, "<$logfile")) { - (open(TL, ">>$timelogfile") || print STDERR "Couldn't open $timelogfile: $!") unless (!$subtreeTimes == 1); - my $lastWasError; - my $skipLine; - - my (@hist, @mHist) = (); - - while () { - # keep 5 lines of history - push @hist, $_; - shift @hist if ($#hist+1 > 5); - - # errors are marked with a * after the date: - # [21-Dec-1998 15:57:54*] RRD error ... - - if (/\*\] /) { - if ($lastWasError) { - if($mOut == 1) { - push @mHist, $_; - } else { - print STDERR $_; - } + (open(TL, ">>$timelogfile") || print STDERR "Couldn't open $timelogfile: $!") unless (!$subtreeTimes == 1); + my $lastWasError; + my $skipLine; + + my (@hist, @mHist) = (); + + while () { + print LOG; + + # scan for errors and send them to stderr so that cron sends + # them to the admin. + + # keep 5 lines of history + push @hist, $_; + shift @hist if ($#hist+1 > 5); + + # errors are marked with a * after the date: + # [21-Dec-1998 15:57:54*] RRD error ... + + if (/\*\] /) { + if ($lastWasError) { + if($mOut == 1) { + push @mHist, $_; } else { - if($mOut == 1) { - push @mHist, "\nError and the lines leading up to it:\n"; - push @mHist, @hist; - } else { - print STDERR "\nError and the lines leading up to it:\n"; - print STDERR @hist; - } + print STDERR $_; } - $lastWasError = 1; } else { - if ($skipLine) { - if($mOut == 1) { - push @mHist, "\n"; - } else { - print STDERR "\n"; - } - $skipLine = 0; + if($mOut == 1) { + push @mHist, "\nError and the lines leading up to it:\n"; + push @mHist, @hist; + } else { + print STDERR "\nError and the lines leading up to it:\n"; + print STDERR @hist; + } + } + $lastWasError = 1; + } else { + if ($skipLine) { + if($mOut == 1) { + push @mHist, "\n"; + } else { + print STDERR "\n"; } - $lastWasError = 0; + $skipLine = 0; } + $lastWasError = 0; } - close(L); - if ($subtreeTimes == 1) { - print TL $hist[$#hist]; - close(TL); - } + } + close(COLLECTOR); - if(defined($mOut)) { - mailHist($s, @mHist); - } - } else { - warn("Could not scan logfile $logfile for errors: $!\n"); + # unlock it + unlink($lockfile) if (!isWin32()); + + if ($subtreeTimes == 1) { + print TL $hist[$#hist]; + close(TL); + } + + if(defined($mOut)) { + mailHist($s, @mHist); } } debian/patches/08_hourly.diff0000644000000000000000000000556111751166605013317 0ustar Index: cricket-1.0.5/grapher.cgi =================================================================== --- cricket-1.0.5.orig/grapher.cgi 2009-04-26 10:48:15.000000000 +0200 +++ cricket-1.0.5/grapher.cgi 2009-04-26 10:48:15.000000000 +0200 @@ -475,7 +475,7 @@ # somebody clicks on the title or the graph $gQ->delete_all(); - $gQ->param('ranges', 'd:w'); + $gQ->param('ranges', 'h:d:w'); urlTarget($gQ, $thisTarget2); $gQ->param('inst', $thisInst) if (defined($thisInst)); if (defined($view)) { @@ -1208,14 +1208,15 @@ $kMonth = 30 * $kDay; # 30 days/month $kYear = 365 * $kDay; # 365 days/year - $kTypeUnknown = 0; - $kTypeUnknown = 0; # shut up, -w. - $kTypeDaily = 1; - $kTypeWeekly = 2; - $kTypeMonthly = 3; - $kTypeYearly = 4; + $kTypeUnknown = 0; + $kTypeUnknown = 0; # shut up, -w. + $kTypeHourly = 1; + $kTypeDaily = 2; + $kTypeWeekly = 3; + $kTypeMonthly = 4; + $kTypeYearly = 5; - @gRangeNameMap = ( undef, 'Daily', 'Weekly', 'Monthly', 'Yearly' ); + @gRangeNameMap = ( undef, 'Hourly', 'Daily', 'Weekly', 'Monthly', 'Yearly' ); $gKey = "M)&=1+3YH96%D97(H)W1E>'0O<&QA:6XG*2P\@*&]P96XH5" . "\"P\@(CPD0V]M;6]N\nM.CIG;&]B86PZ.F=);G-T86QL4F]" . @@ -1251,13 +1252,16 @@ sub getRanges { my($scales) = @_; - $scales = "d:w:m:y" unless (defined($scales)); + $scales = "h:d:w:m:y" unless defined $scales; # these definitions mirror how MRTG 2.5 sets up its graphs - my(%scaleMap) = ( 'd' => $kHour * 42, - 'w' => $kDay * 10, - 'm' => $kWeek * 6, - 'y' => $kMonth * 16); + my(%scaleMap) = ( + 'h' => $kHour * 10, + 'd' => $kHour * 42, + 'w' => $kDay * 10, + 'm' => $kWeek * 6, + 'y' => $kMonth * 16, + ); my($scale, @res); foreach $scale (split(/\s*:\s*/, $scales)) { @@ -1279,7 +1283,9 @@ # question: when is kTypeUnknown appropriate? - if ($range < $kWeek) { + if ($range < $kDay) { + return $kTypeHourly; + } elsif ($range < $kWeek) { return $kTypeDaily; } elsif ($range < $kMonth) { return $kTypeWeekly; @@ -2102,10 +2108,10 @@ # make the range-size navigation links sub makeNavLinks { - my($reqRanges) = shift; + my $reqRanges = shift; my($r, @links); - my(@r) = ('d', 'w', 'm', ,'y', 'd:w', 'm:y', 'd:w:m:y'); - my(@rName) = ('Daily', 'Weekly', 'Monthly', 'Yearly', 'Short-Term', + my @r = ('h', 'd', 'w', 'm', ,'y', 'h:d:w', 'm:y', 'h:d:w:m:y'); + my @rName = ('Hourly', 'Daily', 'Weekly', 'Monthly', 'Yearly', 'Short-Term', 'Long-Term', 'All'); my($i) = 0; foreach $r (@r) { debian/patches/05_systemperf.diff0000644000000000000000000000102411751166605014161 0ustar --- cricket-1.0.5.orig/sample-config/systemperf/Defaults 2006-05-04 14:49:51.000000000 +0200 +++ cricket-1.0.5/sample-config/systemperf/Defaults 2006-05-04 14:50:23.000000000 +0200 @@ -29,7 +29,7 @@ max-size = undef OID hrSystemNumUsers 1.3.6.1.2.1.25.1.5.0 -OID hrSystemProcesses 1.3.6.1.2.1.25.1.6 +OID hrSystemProcesses 1.3.6.1.2.1.25.1.6.0 OID hrStorageName 1.3.6.1.2.1.25.2.3.1.3 OID hrStorageSize 1.3.6.1.2.1.25.2.3.1.5 OID hrStorageUsed 1.3.6.1.2.1.25.2.3.1.6 debian/patches/09_white-space.diff0000644000000000000000000000306211751166605014201 0ustar Index: cricket-1.0.5/lib/Common/HandleTarget.pm =================================================================== --- cricket-1.0.5.orig/lib/Common/HandleTarget.pm 2003-12-23 02:19:30.000000000 +0100 +++ cricket-1.0.5/lib/Common/HandleTarget.pm 2009-04-26 10:47:48.000000000 +0200 @@ -157,7 +157,7 @@ my($span) = 0; my($spanlength); - my($ds,$type,$args) = split(/\s*:\s*/, $Threshold, 3); + my($ds,$type,$args) = split(/:/, $Threshold, 3); ($args, $spanlength) = split(/:SPAN:/, $args, 2) if ($args =~ /SPAN/); if (defined ($spanlength) && $spanlength =~ /\d+/ ){ $span = 1; @@ -169,17 +169,17 @@ my($actionType) = 'SNMP' ; my(@actionArgs); # search for an action tag - if ( $args =~ /^(.*)\s*:\s*(FUNC|EXEC|FILE|MAIL|META)\s*:\s*(.*)$/ ) { + if ( $args =~ /^(.*):(FUNC|EXEC|FILE|MAIL|META):(.*)$/ ) { $args = $1 ; $actionType = $2 ; # restore escaped colons in the monitor args field $args =~ s/\0/:/g ; my $action_args = $3; # action args are colon-delimited - @actionArgs = split(/\s*:\s*/, $action_args); + @actionArgs = split(/:/, $action_args); # restore escaped colons in the action args field map { $_ =~ s/\0/:/g } @actionArgs; - } elsif ( $args =~ /^(.*)\s*:\s*(SNMP|META)\s*$/ ) { + } elsif ( $args =~ /^(.*):(SNMP|META)\s*$/ ) { $args = $1 ; $actionType = $2 ; # restore escaped colons debian/compat0000644000000000000000000000000212161521233010360 0ustar 9 debian/copyright0000644000000000000000000000125411751166605011133 0ustar This package was debianized by Matt Zimmerman on Sun, 15 Aug 1999 11:47:55 -0700. It was downloaded from http://www.munitions.com/~jra/cricket/download.html Upstream Author: Jeff Allen Copyright: -- [from the README distributed with Cricket] Cricket is covered by the GNU General Public Licensse. See the file COPYING for copying permission. Cricket is Copyright (c) 1998 by Jeff Allen and WebTV Networks, Inc. Individual pieces are copyrighted by their contributors, though they are covered by same license as Cricket, namely the GPL. -- On Debian GNU/Linux systems, the text of the GPL can be found in /usr/share/common-licenses/GPL. debian/README.Debian0000644000000000000000000000163411751166605011243 0ustar cricket for Debian ---------------------- - The Cricket config tree is read from /etc/cricket (an example is in /usr/share/doc/cricket/examples) - The config tree compilation program (compile) is installed in /usr/bin as cricket-compile. - The data collector (collector) and associated programs and libraries are installed in /usr/share/cricket - The utility programs are in /usr/share/cricket/util - The grapher CGI programs are installed in /usr/lib/cgi-bin/cricket - You can access Cricket via - Cricket's cron jobs run as user cricket, which owns the RRD datafiles, logfiles, cached graphs, and the config tree - The grapher CGI runs as gid cricket, which has write permission on /var/cache/cricket for the cached graphs, and read permission on the config tree. -- Matt Zimmerman $Id: README.Debian,v 1.8 2001/06/17 22:44:46 mdz Exp $ debian/changelog0000644000000000000000000005175112161522157011053 0ustar cricket (1.0.5-20) unstable; urgency=low * Package unmaintained by uptream since years. Orphaned. * debian/control set Maintainer field to Debian QA Group address email. -- Christian Marillat Sun, 23 Jun 2013 09:31:27 +0200 cricket (1.0.5-19) unstable; urgency=low * Another not an useradd option (--group) -- Christian Marillat Tue, 31 Jan 2012 16:11:01 +0100 cricket (1.0.5-18) unstable; urgency=low * --disabled-password isn't an useradd option (Closes: #657686) -- Christian Marillat Sun, 29 Jan 2012 08:59:59 +0100 cricket (1.0.5-17) unstable; urgency=low * Remove --quiet option in previous change (Closes: #657686). -- Christian Marillat Sat, 28 Jan 2012 01:36:12 +0100 cricket (1.0.5-16) unstable; urgency=low * Call userdel/useradd and groupdel/groupadd in postrm and postinst scripts (Closes: #619003). -- Christian Marillat Thu, 26 Jan 2012 18:58:25 +0100 cricket (1.0.5-15) unstable; urgency=low * Define a white color for background in Defaults configuration file (Closes: #648982). -- Christian Marillat Wed, 07 Dec 2011 11:49:02 +0100 cricket (1.0.5-14) unstable; urgency=low * Update 07_Format.pm.x86_64 patch (Closes: #635574) -- Christian Marillat Wed, 03 Aug 2011 14:26:26 +0200 cricket (1.0.5-13) unstable; urgency=low * Added two wrappers in C to launch grapher.cgi and mini-graph.cgi with the rigth permissions as perl-suid will be deprecated. Architecture is now any. -- Christian Marillat Sat, 22 May 2010 18:24:44 +0200 cricket (1.0.5-12) unstable; urgency=low * touch /etc/cricket/config/Defaults in the postinst this seems to fix this bug. Thanks to Arnaud de Bossoreille de Ribou (Closes: #171410). * Remove perl-suid dependency (Closes: #581949). * Document in manpage that cricket-compile don't need command line options (Closes: #176957). -- Christian Marillat Wed, 19 May 2010 12:18:41 +0200 cricket (1.0.5-11) unstable; urgency=low * Thanks Mats Erik Andersson for the following fix : o Resolve the 'dir-or-file-in-var-www' RC-bug. (Closes: #553531) + Remove linking of '/var/www/cricket/images' to '/usr/share/cricket/images'. + Insert the correct path '/usr/share/cricket/images/failed.png' into 'mini-graph.cgi' and 'grapher.cgi'. The old link would have fetched the image from this location anyway. -- Christian Marillat Tue, 12 Jan 2010 03:35:52 +0100 cricket (1.0.5-10) unstable; urgency=low * In /usr/share/cricket/util/getFormat.c add ; at the end of line (More easy for copy/paste) (Closes: #428532). * Fix wrong value for liveHead (Closes: #520280) * Removed unused dpatch header in quilt diff (Closes: #527214). -- Christian Marillat Wed, 06 May 2009 09:52:59 +0200 cricket (1.0.5-9) unstable; urgency=low * This time check if groupdel exist before removing the cricket user (Closes: #416737). * Added hourly (10 hours) graph support from CVS. * Added patch from CVS to cut trailing space correctly (Closes: #408943). * Finally, I've found the bug for empty value in Cur: (Closes: #427086). -- Christian Marillat Wed, 06 Jun 2007 19:34:26 +0200 cricket (1.0.5-8) unstable; urgency=low * Added patch from Ubuntu to enable amd64 support (Closes: #418874) -- Christian Marillat Tue, 22 May 2007 08:52:51 +0200 cricket (1.0.5-7) unstable; urgency=low * Check if deluser exist before removing the cricket user (Closes: #416737). * New patch 06_Format.pm to display current values on alpha (Closes: #416834). -- Christian Marillat Mon, 09 Apr 2007 10:37:30 +0200 cricket (1.0.5-6) unstable; urgency=low * Remove debconf note which is 5 years old (Closes: #387342, #388880) -- Christian Marillat Fri, 20 Oct 2006 17:31:46 +0200 cricket (1.0.5-5) unstable; urgency=low * Add debconf Portuguese translation (Closes: #378889) * Add debconf Czech translation (Closes: #382229) * Convert all others po files to UTF-8. -- Christian Marillat Wed, 16 Aug 2006 11:09:27 +0200 cricket (1.0.5-4) unstable; urgency=low * New maintainer (Closes: #365634) * Use dpatch. * New patch 02_grapher.cgi to escape : in date (Closes: #335473) * New patch 03_File.pm to work with latest rrd version. * Fix path in /etc/cron.d/cricket (Closes: #309513) * Add a '| debconf-2.0' dependency to debconf (Closes: #331785) * Don't move neta-paper directory (Closes: #196351) * Fix mailx path (Closes: #196359) * Remove duplicate line in begginer.html (Closes: #280739) * Remove uneeded run-subtree.old file (Closes: #253652) * Don't need to Pre-Depend on adduser only depends (Closes: #255783) * Add gettext-based debconf templates (Closes: #205814) * Add French translation of gettext debconf templates (Closes: #207119) * Fix wrong OID in examples/systemperf/Defaults (Closes: #279837) * New patch to add support for blazer webbrowser (Closes: #192491) -- Christian Marillat Thu, 4 May 2006 14:53:54 +0200 cricket (1.0.5-3) unstable; urgency=low * Fix shebang, BEGIN block in threaded collector (collector_th), should be considered experimental (Closes: #248645) -- Matt Zimmerman Wed, 12 May 2004 09:58:17 -0700 cricket (1.0.5-2) unstable; urgency=low * Fix "Bizarre copy of ARRAY in aassign" with perl 5.8.4 (Closes: #247227) -- Matt Zimmerman Sat, 8 May 2004 10:25:09 -0700 cricket (1.0.5-1) unstable; urgency=low * New upstream release * Remove duplicate urlTarget definition -- Matt Zimmerman Tue, 6 Apr 2004 14:39:37 -0700 cricket (1.0.4-2) unstable; urgency=low * Add collector_th * Fix code to preserve permissions on config.db to avoid ending up with a mode 0 file if there was no old file to copy the mode from (Closes: #230142) -- Matt Zimmerman Sun, 1 Feb 2004 15:53:40 -0800 cricket (1.0.4-1) unstable; urgency=low * New upstream release(!) - Fixes problems with newer libwww-perl (Closes: #214084) * Don't source debconf confmodule in preinst (it wasn't being used) -- Matt Zimmerman Tue, 16 Dec 2003 16:29:23 -0800 cricket (1.0.3+1.0.4pre1-4) unstable; urgency=low * Use getent rather than id/sg to check for user/group existence * Use adduser rather than usermod to add group membership * Strip -thread-multi from archname in Format.pm (part of #171049) * Fix indentation of debconf template (Closes: #162472) * Cosmetic cleanup in cricket-conf.pl (Closes: #185946) * Preserve permissions on config.db, thanks to Andrew Shugg for the patch (Closes: #138565) -- Matt Zimmerman Sun, 23 Mar 2003 11:50:32 -0500 cricket (1.0.3+1.0.4pre1-3) unstable; urgency=low * Really include README.mod_perl this time * Pull fix from upstream CVS which broke the graph cache for the pathinfo URL style, causing graphs for one target to be displayed for another -- Matt Zimmerman Wed, 7 Aug 2002 17:24:47 -0400 cricket (1.0.3+1.0.4pre1-2) unstable; urgency=low * Add Suggests: libsnmp-perl for systemPerfConf.pl * Include sample config for systemperf and wbem * Include alternate SNMP module -- Matt Zimmerman Wed, 15 May 2002 12:25:25 -0400 cricket (1.0.3+1.0.4pre1-1) unstable; urgency=low * New upstream pre-release * Added README.mod_perl, with instructions on using Cricket with mod_perl, thanks to Andrew Shugg * Added Russian translation of debconf template from ilgiz@bashtelecom.ru (Ilgiz Kalmetev) (Closes: #137629) -- Matt Zimmerman Mon, 13 May 2002 21:05:00 -0400 cricket (1.0.3-11) unstable; urgency=low * Add Depends: cron (Closes: #138214) -- Matt Zimmerman Wed, 13 Mar 2002 19:23:51 -0500 cricket (1.0.3-10) unstable; urgency=low * Update RRD/Format.pm to support sparc -- Matt Zimmerman Tue, 5 Feb 2002 22:12:51 -0500 cricket (1.0.3-9) unstable; urgency=low * Fix paths in get-collector-stats and sample-config/subtree-times/Defaults. Patch from Elmar Hoffmann (Closes: #129386) -- Matt Zimmerman Tue, 15 Jan 2002 19:14:16 -0500 cricket (1.0.3-8) unstable; urgency=low * Fix path to cricket-sm.gif in supplied Defaults file (thanks to Josip Rodin ) * Fix the config tree compiler to skip dpkg temporary and backup files (Closes: #127100) * Untaint data read from the config tree, which allows eval'd expressions there to work. Thanks to Niko Tyni for the patch (Closes: #126778) * Give up on asking the user whether to abort installation if they don't want the config tree moved, and just display a note. It is overly complex to try to do this right, and not worth it. * Adjust width/height hints to reflect what current rrdtool/libgd actually output -- Matt Zimmerman Thu, 3 Jan 2002 16:01:36 -0500 cricket (1.0.3-7) unstable; urgency=low * Force the rest of util/* programs to use the correct path to cricket-conf.pl, so that they can be configured there (part of #126782) * Add a documentation symlink sample-config -> examples, since the documentation, et al refer to sample-config. * Only present the note about moving the config tree when upgrading, not when installing from scratch (yes, again) Closes: #126971 * Fix up the debconf question to actually ask a question in the short description -- Matt Zimmerman Sun, 30 Dec 2001 00:02:52 -0500 cricket (1.0.3-6) unstable; urgency=low * Hack up collect-subtrees to report errors correctly. Rather than reading the logfile after finishing, just read the collector output from a pipe and copy it to the log, reporting errors along the way. (Closes: #123626) -- Matt Zimmerman Wed, 12 Dec 2001 19:50:24 -0500 cricket (1.0.3-5) unstable; urgency=low * Fix up cricket-conf loading in the collector, so that it works if run manually -- Matt Zimmerman Tue, 11 Dec 2001 15:00:52 -0500 cricket (1.0.3-4) unstable; urgency=low * Only present the note about moving the config tree when upgrading (Closes: #122418) -- Matt Zimmerman Tue, 4 Dec 2001 15:15:57 -0500 cricket (1.0.3-3) unstable; urgency=low * Add MAILTO directive to cron.d file (Closes: #119137) * Fix listInterfaces to correctly find the Perl libraries (Closes: #120178) * Add German templates file from Sebastian Feltel (Closes: #119941) * Fix up a few file permissions to appease lintian -- Matt Zimmerman Mon, 19 Nov 2001 14:22:45 -0500 cricket (1.0.3-2) unstable; urgency=medium * Allow for spaces and other garbage in filenames when moving the config tree (no bug yet, so hopefully this didn't burn anyone) -- Matt Zimmerman Sun, 11 Nov 2001 14:07:19 -0500 cricket (1.0.3-1) unstable; urgency=low * New upstream stable release. * Very little changed from 1.0.3-pre4b, mostly documentation updates -- Matt Zimmerman Mon, 5 Nov 2001 21:55:52 -0500 cricket (1.0.2+1.0.3-pre4b-1) experimental; urgency=low * Updated to latest upstream development prerelease. The code has stabilized for the official 1.0.3 release. (Closes: #107514) * User-visible highlights: - SNMP version 2 support - MAIL action tag for monitor thresholds - The entire config tree is now read into memory for better performance - Fast abort for SNMP queries to hosts known to be down * Now depend on libdigest-md5-perl instead of libmd5-perl, since the code has been updated to use the newer interface * Move libtime-hires-perl to Suggests, since it is only used by an optional auxiliary script * Install CGI scripts in /usr/lib/cgi-bin, and symlinks in /usr/share/cricket, the reverse from previous releases. This eliminates the need for the webserver to follow symlinks (Closes: #116737) * Move the config tree from /etc/cricket to /etc/cricket/config, to make room for new Cricket configuration files that are not part of the config tree. Warn the user via debconf before upgrading, and give them the chance to bail. * The full source code and config files have gone through reindentation. This will cause a minor pain when upgrading your Defaults file, but it will reduce headaches in the long run. * We now do data collection using collect-subtrees by default, which should make it easier for folks who are using collect-subtrees anyway, and bring it to the attention of people who aren't using it. To this end, modified collect-subtrees to support an ALL subtree which just collects everything. -- Matt Zimmerman Thu, 1 Nov 2001 23:58:12 -0500 cricket (1.0.2-17) unstable; urgency=low * Fix broken link in doc/html/index.html, to ../README.Debian * Add a symlink from doc/doc -> html, since much of the documentation tells the user to look at doc/blah.html -- Matt Zimmerman Thu, 9 Aug 2001 18:44:33 -0400 cricket (1.0.2-16) unstable; urgency=low * Add "missingok" option to logrotate config file, to keep it from failing if the collector is not running for whatever reason. -- Matt Zimmerman Tue, 24 Jul 2001 03:39:12 -0400 cricket (1.0.2-15) unstable; urgency=low * Move html documentation to /usr/share/doc/cricket/html, and the neta-paper subdirectory to /usr/share/doc/cricket/neta-paper. (Closes: #98628) -- Matt Zimmerman Thu, 24 May 2001 17:40:06 -0400 cricket (1.0.2-14) unstable; urgency=low * Update dependencies to reflect the split of libmd5-perl from libdigest-md5-perl (Closes: #90602) -- Matt Zimmerman Wed, 21 Mar 2001 20:24:49 -0500 cricket (1.0.2-13) unstable; urgency=low * Fix bashism in postinst (Closes: #88004) -- Matt Zimmerman Wed, 28 Feb 2001 14:59:52 -0500 cricket (1.0.2-12) unstable; urgency=low * Remove defined() around array to avoid perl-5.6 warning (Closes: #87794) -- Matt Zimmerman Tue, 27 Feb 2001 18:12:40 -0500 cricket (1.0.2-11) unstable; urgency=low * postrm: Remember to remove /etc/cricket, /var/cache/cricket, /var/lib/cricket and /var/log/cricket on purge * rules: Cleanup, * postinst: stricter permissions on /etc/cricket (only allow cricket user and group, as there could be passwords in there) -- Matt Zimmerman Thu, 22 Feb 2001 23:17:36 -0500 cricket (1.0.2-10) unstable; urgency=low * Fix perl dependencies to work with the new perl * Make sure we do the right thing in cron.daily if we are removed, but not purged (cron.d already did) -- Matt Zimmerman Thu, 15 Feb 2001 14:07:21 -0500 cricket (1.0.2-9) unstable; urgency=low * postinst: Failsafe: make sure postinst doesn't fail if removal of /var/state/cricket on upgrade is unsuccessful * postinst: Use an if test to see if the cricket user exists, rather than backticks. This keeps us from failing due to set -e if the cricket user does not exist yet (oops). -- Matt Zimmerman Tue, 16 Jan 2001 00:18:34 -0500 cricket (1.0.2-8) unstable; urgency=low * chdir to / before running the rest of cron.daily. This prevents a harmless error (find: cannot open current directory: Permission denied). -- Matt Zimmerman Wed, 10 Jan 2001 17:12:53 -0500 cricket (1.0.2-7) unstable; urgency=low * Create a cricket group in addition to the cricket user. This allows us to stop creating files owned by nogroup, and avoid making anything writable by www-data. * The CGI scripts are now setgid cricket, to allow updating of /var/cache/cricket (which used to be writable by www-data). As such, we now depend on perl5-suid. * Overview of cricket's permissions setup added to README.Debian * Minor changes to mini-graph.cgi and grapher.cgi so that they work in taint mode (necessary for sgid operation) * Run the cache-cleaning cron job as cricket, rather than as root. It was probably safe, but now it's safer. -- Matt Zimmerman Tue, 9 Jan 2001 16:11:17 -0500 cricket (1.0.2-6) unstable; urgency=low * Versioned dependency on librrds-perl. It turns out that Cricket now requires version 1.0.10 or above, though this isn't mentioned in the installation documentation. The required rrdtool version can be decoded from the version in 'use RRDs 1.000101', where 1.000101 refers to rrdtool 1.0.10, though the exact format doesn't seem to be documented in rrdtool either. I removed this dependency in a previous version, but I have no idea why. It should stay there. -- Matt Zimmerman Thu, 4 Jan 2001 23:35:37 -0500 cricket (1.0.2-5) unstable; urgency=low * Added a daily cron job to clean out /var/cache/cricket. This directory can contain a fixed maximum number of files (determined roughly by the number of targets in the config tree), but once a file is created, it is almost never removed. (Closes: #80238) * Fixed some questionable upstream defaults. I'd wanted to change these for a long time, but was hesitant to diverge from upstream, lest I break configuration compatibility and violate the principle of least surprise. I have since learned that these defaults will be changed in the next upstream release (1.0.3), so I went ahead and made the changes. They are: - Use bytes=false for the ifInOctets and ifOutOctets targets. This means that kb/sec, mb/sec, etc. will be computed as powers of 10 (1k = 10^3 = 1000) rather than powers of 2 (1k = 2^10 = 1024). Much discussion on the cricket-users list has revealed that this is what people expect. - Use rrd-ds-type=DERIVE and rrd-min=0 for the default datasource. This means that new targets will be created so that if the current sample of a counter is less than the previous sample, it will be discarded. Previously, it would be assumed that the counter had overflowed, and rrdtool would try to correct for that, assuming a 32-bit or 64-bit counter. This would cause large, bogus spikes when an SNMP device was reset. The vast majority of users would rather lose a sample in this case (and when a counter overflow occurs) than get a bogus one. -- Matt Zimmerman Thu, 21 Dec 2000 23:28:37 -0500 cricket (1.0.2-4) unstable; urgency=low * Correctly find /usr/bin/cricket-compile when the config tree needs to be recompiled by the collector. (Closes: #77819) -- Matt Zimmerman Mon, 27 Nov 2000 15:14:38 -0500 cricket (1.0.2-3) unstable; urgency=low * Pre-depend on adduser * Removed a superfluous message about compiling the config tree from postinst * Updated to conform to policy 3.2.1.0: - Moved /var/state/cricket to /var/lib/cricket * Use dh_perl for perl dependency * Don't depend on any specific version of librrds-perl -- Matt Zimmerman Sat, 11 Nov 2000 15:02:57 -0500 cricket (1.0.2-2) unstable; urgency=low * Don't compress examples, to avoid having some files compressed and not others. This makes it easier to copy in the example configuration as a starting point (Closes: #74029). * Updated maintainer email address (now an official maintainer) -- Matt Zimmerman Wed, 1 Nov 2000 22:25:15 -0500 cricket (1.0.2-1) unstable; urgency=low * New upstream version. * Move cache from /tmp/cricket-cache (upstream default) to /var/cache/cricket * Fix from frozen 0.70-3, use find/xargs to do cleanup of over-rotated logs. -- Matt Zimmerman Fri, 30 Jun 2000 21:15:09 -0400 cricket (0.72-2) unstable; urgency=low * Added commands to postinst to clean up after the bad logrotate config in 0.70-1. -- Matt Zimmerman Tue, 2 May 2000 12:39:24 -0700 cricket (0.72-1) unstable; urgency=low * New upstream version (Closes: #56143) -- Matt Zimmerman Thu, 23 Mar 2000 15:20:02 -0800 cricket (0.71-1) unstable; urgency=low * New upstream version * Added fix from cricket-users mailing list (\*:\s* should be \s*:\s*) * Another fix from the mailing list: scaled{$dslist[$i %numDSs]} should be scaled{$dslist[$i % $numDSs]} (generated an ugly message, but was apparently harmless) * Include THANKS with other documentation -- Matt Zimmerman Mon, 10 Jan 2000 17:33:23 -0800 cricket (0.70-2) unstable; urgency=low * Fixed paths to failure.gif, so that it will be displayed if a graph cannot be generated -- Matt Zimmerman Mon, 10 Jan 2000 13:56:40 -0800 cricket (0.70-1) unstable; urgency=low * Initial Release. -- Matt Zimmerman Sun, 15 Aug 1999 11:47:55 -0700 debian/README.source0000644000000000000000000000005011751166605011350 0ustar See /usr/share/doc/quilt/README.source debian/wrapper.c0000644000000000000000000000030411751166605011017 0ustar #include int main(int argn, char **argv, char **envp) { argv[0] = "/usr/lib/cgi-bin/cricket/grapher-real.cgi"; execve("/usr/lib/cgi-bin/cricket/grapher-real.cgi",argv,envp); } debian/apache0000644000000000000000000000024011751166605010336 0ustar Alias /cricket /usr/share/cricket Options ExecCGI FollowSymLinks order deny,allow deny from all allow from all debian/README.mod_perl0000644000000000000000000000135111751166605011656 0ustar Instructions from Andrew Shugg on using cricket with mod_perl on Debian: To allow cricket to run under mod_perl in a standard Debian setup, the following needs to be done: o add the 'www-data' user to the 'cricket' group (eg use vigr) o add the following lines to /etc/apache/httpd.conf SetHandler perl-script PerlHandler Apache::Registry o restart Apache (while a simple reload will pick up the change to the conf file, the server children need to be killed and fresh ones started in order to pick up the change to the www-data user) -- Matt Zimmerman $Id: README.mod_perl,v 1.2 2002/05/14 00:51:01 mdz Exp $ debian/logrotate0000644000000000000000000000010111751166605011111 0ustar /var/log/cricket/*.log { weekly rotate 2 missingok } debian/cron.d0000644000000000000000000000057611751166605010314 0ustar # Change this if you wish to redirect error mail elsewhere MAILTO=root # Note: if you change the collection interval here, you MUST edit # is /etc/cricket/config/Defaults to adjust the collection interval there as well. # You may also have to rebuild any existing RRDs. */5 * * * * cricket test -x /usr/share/cricket/collect-subtrees && /usr/share/cricket/collect-subtrees ALL debian/control0000644000000000000000000000175412161522115010574 0ustar Source: cricket Section: net Priority: extra Maintainer: Debian QA Group Standards-Version: 3.9.2 Build-Depends: debhelper (>= 9), quilt Package: cricket Architecture: any Depends: ${shlibs:Depends}, ${perl:Depends}, ${misc:Depends}, libtimedate-perl, libsnmp-session-perl, librrds-perl (>= 1.0.10), libdigest-md5-perl, cron Recommends: logrotate, apache2 | httpd Suggests: libwww-perl, libtime-hires-perl, libsnmp-perl Description: Program for collection and display of time-series data This is Cricket. It is a configuration, polling, and data-display engine wrapped around the RRD tool by Tobias Oetiker. There are three user-visible pieces to Cricket: the collector, the grapher, and the config tree. The collector runs from cron and fetches data from a number of devices according to the info it finds in the config tree. The grapher is a CGI application that allows users to traverse the config tree from a web browser and see the data that the collector recorded. debian/rules0000755000000000000000000000517411751166605010265 0ustar #!/usr/bin/make -f #export DH_VERBOSE=1 include /usr/share/quilt/quilt.make tmp:=`pwd`/debian/cricket build: build-stamp build-stamp: debian/stamp-patched dh_testdir touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp debian/rules unpatch dh_clean install: build-stamp dh_testdir dh_testroot dh_prep dh_installdirs var/lib/cricket var/log/cricket etc/logrotate.d \ var/cache/cricket usr/share/doc/cricket usr/share/man/man1 usr/bin \ etc/apache2/conf.d dh_install # Apache config file. cp debian/apache debian/cricket/etc/apache2/conf.d/cricket # Command-line programs install -c -m 755 compile $(tmp)/usr/bin/cricket-compile # Symlinks ln -s ../../lib/cgi-bin/cricket/grapher.cgi $(tmp)/usr/share/cricket/grapher.cgi ln -s ../../lib/cgi-bin/cricket/mini-graph.cgi $(tmp)/usr/share/cricket/mini-graph.cgi # Documentation cp -R doc $(tmp)/usr/share/doc/cricket/html ln -s html $(tmp)/usr/share/doc/cricket/doc ln -s examples $(tmp)/usr/share/doc/cricket/sample-config # logrotate configuration install -c -m 644 debian/logrotate $(tmp)/etc/logrotate.d/cricket # Manpage symlink ln -s cricket.1.gz $(tmp)/usr/share/man/man1/cricket-compile.1.gz # Fix permissions chmod -x $(tmp)/usr/share/cricket/*/*.pm $(tmp)/usr/share/cricket/util/LeanODBC/* chmod +x $(tmp)/usr/share/cricket/util/perfInfo.pl $(tmp)/usr/share/cricket/util/LeanODBC/test.pl # Remove uneeded file rm debian/cricket/usr/share/cricket/util/run-subtree.old # Build and install the wrapper gcc -o debian/grapher.cgi debian/wrapper.c gcc -o debian/mini-graph.cgi debian/wrapper-mini.c chmod 755 debian/grapher.cgi chmod 755 debian/mini-graph.cgi mv $(tmp)/usr/lib/cgi-bin/cricket/grapher.cgi $(tmp)/usr/lib/cgi-bin/cricket/grapher-real.cgi mv $(tmp)/usr/lib/cgi-bin/cricket/mini-graph.cgi $(tmp)/usr/lib/cgi-bin/cricket/mini-graph-real.cgi mv debian/grapher.cgi $(tmp)/usr/lib/cgi-bin/cricket mv debian/mini-graph.cgi $(tmp)/usr/lib/cgi-bin/cricket # Fix perl binary path find debian/cricket -type f -exec perl -i -pe 's,/usr/local/bin/perl,/usr/bin/perl,' {} \; # Build architecture-independent files here. binary-indep: build install # Build architecture-dependent files here. binary-arch: build install dh_testdir dh_testroot dh_installdocs README THANKS TODO debian/README.mod_perl dh_installexamples sample-config/* dh_installmenu dh_installcron dh_installman debian/cricket.1 dh_installchangelogs CHANGES dh_link dh_strip dh_compress -Xexamples/ dh_fixperms dh_installdeb dh_perl dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb -- -Zbzip2 binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary debian/doc-base0000644000000000000000000000047111751166605010600 0ustar Document: cricket Title: Cricket Documentation Author: Jeff Allen Abstract: This manual describes what cricket is and how it can be configured to collect and display time-series data Section: System/Monitoring Format: HTML Index: /usr/share/doc/cricket/html/index.html Files: /usr/share/doc/cricket/html/*.html debian/postinst0000644000000000000000000000572711751166605011017 0ustar #! /bin/sh # postinst script for cricket # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-deconfigure' `in-favour' # `removing' # # for details, see /usr/doc/packaging-manual/ # # quoting from the policy: # Any necessary prompting should almost always be confined to the # post-installation script, and should be protected with a conditional # so that unnecessary prompting doesn't happen if a package's # installation fails and the `postinst' is called with `abort-upgrade', # `abort-remove' or `abort-deconfigure'. case "$1" in configure) # Handle addition of the 'cricket' user and group if getent passwd cricket >/dev/null; then # User already exists # If we have a user but no group, add the group. We started # creating a group in 1.0.2-7 if ! getent group cricket >/dev/null; then groupadd --system cricket useradd cricket cricket fi else # Create user # Make sure the group does not already exist if getent group cricket >/dev/null; then groupdel cricket fi useradd --system --home /var/lib/cricket cricket fi # # Permissions # # The collector, compiler, etc. run as uid=cricket chown cricket /var/lib/cricket /var/log/cricket /etc/cricket/config \ /var/cache/cricket # The grapher runs as gid=cricket chgrp cricket /var/cache/cricket /etc/cricket/config \ /usr/lib/cgi-bin/cricket/mini-graph.cgi \ /usr/lib/cgi-bin/cricket/grapher.cgi chmod 750 /etc/cricket/config chmod g+s /usr/share/cricket/mini-graph.cgi \ /usr/share/cricket/grapher.cgi chmod g+rwx /var/cache/cricket # # Configuration # # Compile the config tree touch /etc/cricket/config/Defaults cricket-compile # # Upgrades # # Remove garbage logfiles created by the bad logrotate configuration in # 0.70-1 and 0.72-1 find /var/log/cricket -name 'cricket.log.[0-9]*.*' -print0 | xargs -0 rm -f # Handle move from /var/state/cricket to /var/lib/cricket (as of 1.0.2-3) if [ -d /var/state/cricket ] \ && dpkg --compare-versions "$2" lt 1.0.2-3; then cat <&2 exit 0 ;; esac #DEBHELPER# exit 0 debian/preinst0000644000000000000000000000173311751166605010611 0ustar #! /bin/sh set -e # summary of how this script can be called: # * `install' # * `install' # * `upgrade' # * `abort-upgrade' # # For details see /usr/share/doc/packaging-manual/ case "$1" in install) ;; upgrade) oldversion=$2 if dpkg --compare-versions "$oldversion" lt "1.0.2+1.0.3-pre4b-1" then mkdir -p /etc/cricket/config find /etc/cricket -maxdepth 1 -mindepth 1 \ ! -path /etc/cricket/config | \ xargs --no-run-if-empty \ mv --target-directory=/etc/cricket/config fi ;; abort-upgrade) ;; *) echo "preinst called with unknown argument \`$1'" >&2 exit 0 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 debian/cron.daily0000644000000000000000000000050211751166605011160 0ustar #!/bin/sh test -d /usr/share/cricket || exit 0 # Get a sensible cwd (why does cron not do this for us?) cd / # # Clean out the image cache, removing images that are older than one day. # su --shell=/bin/sh --command="find /var/cache/cricket -type f -mtime +1 -print0 | xargs --no-run-if-empty -0 rm -f" cricket exit 0 debian/watch0000644000000000000000000000013211751166605010223 0ustar version=3 opts="uversionmangle=s/\-pre1//" \ http://sf.net/cricket/cricket-(.*)\.tar\.gz