From blair at orcaware.com Sun May 1 22:22:48 2005 From: blair at orcaware.com (blair at orcaware.com) Date: Sun, 1 May 2005 22:22:48 -0700 Subject: [Orca-checkins] r439 - trunk/orca/config Message-ID: <200505020522.j425Mm2v024530@orca1.orcaware.com> Author: blair at orcaware.com Date: Sun May 1 22:21:27 2005 New Revision: 439 Modified: trunk/orca/config/config.guess trunk/orca/config/config.sub Log: Update to the latest config.guess and config.sub files. * config/config.guess: Downloaded version 2005-04-22 from http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess * config/config.sub: Downloaded version 2005-04-22 from http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub Modified: trunk/orca/config/config.guess ============================================================================== --- trunk/orca/config/config.guess (original) +++ trunk/orca/config/config.guess Sun May 1 22:21:27 2005 @@ -1,9 +1,9 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -timestamp='2004-06-11' +timestamp='2005-04-22' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -53,7 +53,7 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO @@ -203,9 +203,6 @@ amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; - arc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; cats:OpenBSD:*:*) echo arm-unknown-openbsd${UNAME_RELEASE} exit 0 ;; @@ -230,18 +227,12 @@ mvmeppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; - pmax:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; sgi:OpenBSD:*:*) - echo mipseb-unknown-openbsd${UNAME_RELEASE} + echo mips64-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sun3:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; - wgrisc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} exit 0 ;; @@ -307,9 +298,6 @@ # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; - Alpha*:OpenVMS:*:*) - echo alpha-hp-vms - exit 0 ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead @@ -331,6 +319,9 @@ *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit 0 ;; *:OS400:*:*) echo powerpc-ibm-os400 exit 0 ;; @@ -354,7 +345,7 @@ DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit 0 ;; - DRS?6000:UNIX_SV:4.2*:7*) + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7 && exit 0 ;; esac ;; @@ -764,7 +755,7 @@ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; *:UNICOS/mp:*:*) - echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` @@ -787,21 +778,7 @@ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) - # Determine whether the default compiler uses glibc. - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #if __GLIBC__ >= 2 - LIBC=gnu - #else - LIBC= - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` - # GNU/KFreeBSD systems have a "k" prefix to indicate we are using - # FreeBSD's kernel, but not the complete OS. - case ${LIBC} in gnu) kernel_only='k' ;; esac - echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin @@ -827,6 +804,9 @@ i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit 0 ;; + amd64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit 0 ;; @@ -850,6 +830,12 @@ cris:Linux:*:*) echo cris-axis-linux-gnu exit 0 ;; + crisv32:Linux:*:*) + echo crisv32-axis-linux-gnu + exit 0 ;; + frv:Linux:*:*) + echo frv-unknown-linux-gnu + exit 0 ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; @@ -1098,7 +1084,7 @@ exit 0 ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` @@ -1154,6 +1140,10 @@ # From seanf at swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; + i*86:VOS:*:*) + # From Paul.Green at stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit 0 ;; *:VOS:*:*) # From Paul.Green at stratus.com. echo hppa1.1-stratus-vos @@ -1196,9 +1186,10 @@ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) - case `uname -p` in + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in *86) UNAME_PROCESSOR=i686 ;; - powerpc) UNAME_PROCESSOR=powerpc ;; + unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit 0 ;; @@ -1213,6 +1204,9 @@ *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit 0 ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; @@ -1260,6 +1254,16 @@ *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms && exit 0 ;; + I*) echo ia64-dec-vms && exit 0 ;; + V*) echo vax-dec-vms && exit 0 ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 @@ -1419,7 +1423,9 @@ the operating system you are using. It is advised that you download the most up to date version of the config scripts from - ftp://ftp.gnu.org/pub/gnu/config/ + http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess +and + http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub If the version you run ($0) is already up to date, please send the following data and any information you think might be Modified: trunk/orca/config/config.sub ============================================================================== --- trunk/orca/config/config.sub (original) +++ trunk/orca/config/config.sub Sun May 1 22:21:27 2005 @@ -1,9 +1,9 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -timestamp='2004-03-12' +timestamp='2005-04-22' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -70,7 +70,7 @@ version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO @@ -145,7 +145,7 @@ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis) + -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; @@ -231,13 +231,14 @@ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ - | m32r | m32rle | m68000 | m68k | m88k | mcore \ + | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -262,12 +263,13 @@ | pyramid \ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ - | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \ + | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ - | x86 | xscale | xstormy16 | xtensa \ + | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; @@ -298,9 +300,9 @@ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ - | bs2000-* \ + | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | cydra-* \ + | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ @@ -310,7 +312,7 @@ | ip2k-* | iq2000-* \ | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | mcore-* \ + | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -326,8 +328,9 @@ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ + | mmix-* \ | msp430-* \ - | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ @@ -335,15 +338,16 @@ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ + | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ - | xtensa-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; @@ -445,6 +449,10 @@ basic_machine=j90-cray os=-unicos ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; cr16c) basic_machine=cr16c-unknown os=-elf @@ -452,6 +460,9 @@ crds | unos) basic_machine=m68k-crds ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; @@ -481,6 +492,10 @@ basic_machine=m88k-motorola os=-sysv3 ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx @@ -659,10 +674,6 @@ mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; - mmix*) - basic_machine=mmix-knuth - os=-mmixware - ;; monitor) basic_machine=m68k-rom68k os=-coff @@ -743,10 +754,6 @@ np1) basic_machine=np1-gould ;; - nv1) - basic_machine=nv1-cray - os=-unicosmp - ;; nsr-tandem) basic_machine=nsr-tandem ;; @@ -1029,6 +1036,10 @@ basic_machine=hppa1.1-winbond os=-proelf ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; xps | xps100) basic_machine=xps100-honeywell ;; @@ -1059,6 +1070,9 @@ romp) basic_machine=romp-ibm ;; + mmix) + basic_machine=mmix-knuth + ;; rs6000) basic_machine=rs6000-ibm ;; @@ -1294,6 +1308,9 @@ -kaos*) os=-kaos ;; + -zvmoe) + os=-zvmoe + ;; -none) ;; *) @@ -1374,6 +1391,9 @@ *-ibm) os=-aix ;; + *-knuth) + os=-mmixware + ;; *-wec) os=-proelf ;; From blair at orcaware.com Sun May 1 23:16:29 2005 From: blair at orcaware.com (blair at orcaware.com) Date: Sun, 1 May 2005 23:16:29 -0700 Subject: [Orca-checkins] r440 - in trunk/orca: . packages/rrdtool-1.0.50/perl-piped packages/rrdtool-1.0.50/perl-shared packages/rrdtool-1.0.50/src Message-ID: <200505020616.j426GT1g025644@orca1.orcaware.com> Author: blair at orcaware.com Date: Sun May 1 23:15:40 2005 New Revision: 440 Modified: trunk/orca/INSTALL trunk/orca/configure.in trunk/orca/packages/rrdtool-1.0.50/perl-piped/RRDp.pm trunk/orca/packages/rrdtool-1.0.50/perl-shared/RRDs.pm trunk/orca/packages/rrdtool-1.0.50/src/rrd_graph.c Log: Fix a file descriptor resource leak and two Boolean tests that always evaluate true in RRDtool's rrd_graph.c. Bump the exported and used minor version of RRDtool so that Orca's copy of RRDtool must be used instead of an official RRDtool release. * packages/rrdtool-1.0.50/src/rrd_graph.c (copyImage): Pass the FILE* to fclose() instead of close(). (graph_paint): Change if (rrd_test_error) to if (rrd_test_error()) because rrdt_test_error is a function and the first statement always evaluates true because it returns the address of the function. * packages/rrdtool-1.0.50/perl-piped/RRDp.pm, * packages/rrdtool-1.0.50/perl-shared/RRDs.pm: Increase VERSION from 1.000501 to 1.000502. * configure.in: Bump the required RRDs Perl VERSION number from 1.000501 to 1.000502. * INSTALL: Bump the required RRDs Perl VERSION number from 1.000501 to 1.000502. Modified: trunk/orca/INSTALL ============================================================================== --- trunk/orca/INSTALL (original) +++ trunk/orca/INSTALL Sun May 1 23:15:40 2005 @@ -175,7 +175,7 @@ Devel::DProf Not required by Orca 19990108 Digest::MD5 >= 2.33 >= 2.33 2.33 Math::IntervalSearch >= 1.05 >= 1.05 1.05 - RRDs >= 1.000501 >= 1.0.50 1.0.50 + RRDs >= 1.000502 >= 1.0.50 1.0.50 Storable >= 2.14 >= 2.14 2.14 Time::HiRes Not required by Orca 1.66 version >= 0.42 >= 0.42 0.42 Modified: trunk/orca/configure.in ============================================================================== --- trunk/orca/configure.in (original) +++ trunk/orca/configure.in Sun May 1 23:15:40 2005 @@ -38,7 +38,7 @@ MATH_INTERVALSEARCH_DIR=Math-Interpolate-1.05 MATH_INTERVALSEARCH_VER=1.05 RRDTOOL_DIR=rrdtool-1.0.50 -RRDTOOL_VER=1.000501 +RRDTOOL_VER=1.000502 STORABLE_DIR=Storable-2.14 STORABLE_VER=2.14 TIME_HIRES_DIR=Time-HiRes-1.66 Modified: trunk/orca/packages/rrdtool-1.0.50/perl-piped/RRDp.pm ============================================================================== --- trunk/orca/packages/rrdtool-1.0.50/perl-piped/RRDp.pm (original) +++ trunk/orca/packages/rrdtool-1.0.50/perl-piped/RRDp.pm Sun May 1 23:15:40 2005 @@ -110,7 +110,7 @@ sub end (); sub read (); -$VERSION = 1.000501 ; +$VERSION = 1.000502 ; sub start ($){ croak "rrdtool is already running" Modified: trunk/orca/packages/rrdtool-1.0.50/perl-shared/RRDs.pm ============================================================================== --- trunk/orca/packages/rrdtool-1.0.50/perl-shared/RRDs.pm (original) +++ trunk/orca/packages/rrdtool-1.0.50/perl-shared/RRDs.pm Sun May 1 23:15:40 2005 @@ -7,7 +7,7 @@ require DynaLoader; -$VERSION = 1.000501; +$VERSION = 1.000502; bootstrap RRDs $VERSION; Modified: trunk/orca/packages/rrdtool-1.0.50/src/rrd_graph.c ============================================================================== --- trunk/orca/packages/rrdtool-1.0.50/src/rrd_graph.c (original) +++ trunk/orca/packages/rrdtool-1.0.50/src/rrd_graph.c Sun May 1 23:15:40 2005 @@ -2460,7 +2460,7 @@ } gdImageDestroy(img); } - close(fi); + fclose(fi); } else { rrd_set_error("Error Opeing %s: %s",image, strerror(errno)); } @@ -2623,7 +2623,7 @@ if (im->bkg_image){ /* background image added first */ copyImage(gif,im->bkg_image,1); - if (rrd_test_error) return(-1); + if (rrd_test_error()) return(-1); } else { @@ -2770,7 +2770,7 @@ if (im->ovl_image) { /* overlay image added last */ copyImage(gif,im->ovl_image,0); - if (rrd_test_error) return(-1); + if (rrd_test_error()) return(-1); } if (strcmp(im->graphfile,"-")==0) { #ifdef WIN32 From blair at orcaware.com Mon May 2 17:51:50 2005 From: blair at orcaware.com (blair at orcaware.com) Date: Mon, 2 May 2005 17:51:50 -0700 Subject: [Orca-checkins] r441 - trunk/orca/orca Message-ID: <200505030051.j430poIt012386@orca1.orcaware.com> Author: blair at orcaware.com Date: Mon May 2 17:50:56 2005 New Revision: 441 Modified: trunk/orca/orca/orca.pl.in Log: Improve a comment on loading Perl modules that have a minimum required module version number. * orca/orca.pl.in: Improve comment. Modified: trunk/orca/orca/orca.pl.in ============================================================================== --- trunk/orca/orca/orca.pl.in (original) +++ trunk/orca/orca/orca.pl.in Mon May 2 17:50:56 2005 @@ -43,9 +43,11 @@ use Getopt::Long; use Cwd; -# Load any modules that have required version numbers here in -# addition to the loading of the modules in the other Orca -# modules to keep all the requiste numbers here. +# For this script and all of the Orca::* Perl modules loaded by this +# script, load of the all Perl modules here that have a minimum +# required version number so that the minimum module version numbers +# can be listed in once place instead of spread out in each Orca::* +# module. use Data::Dumper @DATA_DUMPER_VER@; use Digest::MD5 @DIGEST_MD5_VER@; use Math::IntervalSearch @MATH_INTERVALSEARCH_VER@ qw(interval_search); From blair at orcaware.com Mon May 2 18:42:14 2005 From: blair at orcaware.com (blair at orcaware.com) Date: Mon, 2 May 2005 18:42:14 -0700 Subject: [Orca-checkins] r442 - in trunk/orca: . lib/Orca orca packages packages/version-0.42 Message-ID: <200505030142.j431gEN1013636@orca1.orcaware.com> Author: blair at orcaware.com Date: Mon May 2 18:41:27 2005 New Revision: 442 Removed: trunk/orca/packages/version-0.42/ Modified: trunk/orca/INSTALL trunk/orca/configure.in trunk/orca/lib/Orca/Config.pm trunk/orca/orca/orca.pl.in trunk/orca/packages/Makefile.in Log: Do not use the Perl version module to compare Orca's version number with the required Orca version number specified in Orca's configuration file. Do the comparison in Perl code. * lib/Orca/Config.pm: (main): Do not 'use version'. Import $ORCA_VER_MAJOR, $ORCA_VER_MINOR and $ORCA_VER_PATCH from Orca::Constants. (check_config): Check the required Orca version with Orca's version here. Be stricter in the formatting of Orca version numbers that are accepted. * packages/version-0.42: Delete. * packages/Makefile.in: Remove all rules to descend into and build the Perl version module. * configure.in: No longer check if Perl's version module is installed. Do not substitute the following autoconf variables: @VERSION_DIR@ @VERSION_VER@ @MAKE_VERSION@ @TEST_VERSION@ @INSTALL_PERL_VERSION@ @CLEAN_VERSION@ @DISTCLEAN_VERSION@ * orca/orca.pl.in: Do not 'use version' any more. * INSTALL: Remove all references to the Perl version module. Modified: trunk/orca/INSTALL ============================================================================== --- trunk/orca/INSTALL (original) +++ trunk/orca/INSTALL Mon May 2 18:41:27 2005 @@ -178,9 +178,8 @@ RRDs >= 1.000502 >= 1.0.50 1.0.50 Storable >= 2.14 >= 2.14 2.14 Time::HiRes Not required by Orca 1.66 - version >= 0.42 >= 0.42 0.42 - All seven of these modules are included with the Orca distribution + All eight of these modules are included with the Orca distribution in the packages directory. When you configure Orca in step 3), configure will determine if you need any of these modules compiled and installed. configure will then modify the packages/Makefile @@ -288,17 +287,6 @@ % make test % make install UNINST=1 - version - - http://www.perl.com/CPAN/authors/id/J/JP/JPEACOCK/version-0.42.tar.gz - - % gunzip -c version-0.42.tar.gz | tar xvf - - % cd version-0.42 - % perl Makefile.PL - % make - % make test - % make install UNINST=1 - 5) Make Orca and any necessary Perl modules. To make Orca and these Perl modules run the following command: Modified: trunk/orca/configure.in ============================================================================== --- trunk/orca/configure.in (original) +++ trunk/orca/configure.in Mon May 2 18:41:27 2005 @@ -43,8 +43,6 @@ STORABLE_VER=2.14 TIME_HIRES_DIR=Time-HiRes-1.66 TIME_HIRES_VER=1.66 -VERSION_DIR=version-0.42 -VERSION_VER=0.42 AC_SUBST(COMPRESS_ZLIB_DIR) AC_SUBST(DATA_DUMPER_DIR) @@ -55,7 +53,6 @@ AC_SUBST(RRDTOOL_DIR) AC_SUBST(STORABLE_DIR) AC_SUBST(TIME_HIRES_DIR) -AC_SUBST(VERSION_DIR) AC_SUBST(COMPRESS_ZLIB_VER) AC_SUBST(DATA_DUMPER_VER) @@ -66,7 +63,6 @@ AC_SUBST(RRDTOOL_VER) AC_SUBST(STORABLE_VER) AC_SUBST(TIME_HIRES_VER) -AC_SUBST(VERSION_VER) # Get the current working directory and the config directory. cwd=`pwd` @@ -537,24 +533,6 @@ AC_SUBST(DISTCLEAN_TIME_HIRES) AC_SUBST(PERL_USE_TIME_HIRES) -BORP_PERL_MODULE(orca_cv_perl_module_version, - $PERL, - version, - $VERSION_VER) -test "$ALWAYS_BUILD_PERL_MODULES" && orca_cv_perl_module_version=no -if test "$orca_cv_perl_module_version" = no; then - MAKE_VERSION=make_version - TEST_VERSION=test_version - INSTALL_PERL_VERSION=install_perl_version - CLEAN_VERSION=clean_version - DISTCLEAN_VERSION=distclean_version -fi -AC_SUBST(MAKE_VERSION) -AC_SUBST(TEST_VERSION) -AC_SUBST(INSTALL_PERL_VERSION) -AC_SUBST(CLEAN_VERSION) -AC_SUBST(DISTCLEAN_VERSION) - # Define the INSTALL and MKDIR variables to point to the scripts in # the config directory. INSTALL="$config_dir/install-sh -c" Modified: trunk/orca/lib/Orca/Config.pm ============================================================================== --- trunk/orca/lib/Orca/Config.pm (original) +++ trunk/orca/lib/Orca/Config.pm Mon May 2 18:41:27 2005 @@ -30,11 +30,13 @@ use strict; use Carp; use Exporter; -use version; use Orca::Constants qw($opt_verbose $is_sub_re die_when_called + $ORCA_VER_MAJOR + $ORCA_VER_MINOR + $ORCA_VER_PATCH $ORCA_VER_QUOTED @CONST_IMAGE_PLOT_TYPES %CONST_IMAGE_PLOT_INFO @@ -346,36 +348,56 @@ if (defined $config_global{require}) { my @require = @{$config_global{require}}; if (@require == 2) { - my ($require_what, $require_version) = @require; + my ($require_what, $required_version) = @require; if ($require_what eq 'Orca') { - # Normalize the required version string to the form - # \d+\.\d+\.\d+ . To handle almost any input version string, - # split on the existing periods and for each substring, if it - # is not defined or has 0 length, then set it to 0. Do not - # worry about there being more than two periods in the given - # string, the regular expression match below will catch - # invalid version strings. - my @vers = split(/\./, $require_version); - - for (my $i=0; $i<3; ++$i) { - unless (defined $vers[$i] and length $vers[$i]) { - $vers[$i] = 0; + # Split the required Orca version string on periods and + # compare each element in an array created from the split + # string with an array created from the Orca version numbers. + my @required_version = split(/\./, $required_version); + + # Check each substring. If it is not defined or has 0 length + # or is not an integer number, then set it to 0 and complain. + my $warned = 0; + for (my $i=0; $i<@required_version; ++$i) { + unless (defined $required_version[$i] and + length $required_version[$i] and + $required_version[$i] =~ /^\d+$/) { + unless ($warned) { + warn "$0: error: 'require Orca $required_version' has an ", + "illegally formatted version string in ", + "'$config_filename'.\n"; + $warned = 1; + } + ++$number_errors; + $required_version[$i] = 0; } } - my $reformulated_required_version = join('.', @vers); - if ($reformulated_required_version =~ /^\d+\.\d+\.\d+$/) { - $require_version = version->new($reformulated_required_version); - my $orca_version = version->new($ORCA_VER_QUOTED); - - if ($orca_version < $require_version) { - warn "$0: Orca version $ORCA_VER_QUOTED less than required ", - "version $require_version specified in '$config_filename'.\n"; - ++$number_errors; + # The Orca version number has three elements, so to have a + # good comparison, ensure that the required version number + # array has at least three elements. + for (my $i=@required_version; $i<3; ++$i) { + $required_version[$i] = 0; + } + + # If the required version string has more elements than the + # Orca version array, then extend the Orca version array. + my @orca_version = ($ORCA_VER_MAJOR, $ORCA_VER_MINOR, $ORCA_VER_PATCH); + for (my $i=@orca_version; $i<@required_version; ++$i) { + $orca_version[$i] = 0; + } + + my $orca_version_ok = 1; + for (my $i=0; $i<@orca_version; ++$i) { + if ($orca_version[$i] < $required_version[$i]) { + $orca_version_ok = 0; + last; } - } else { - warn "$0: error: 'require' second argument '$require_version' is ", - "not a valid version number in '$config_filename'.\n"; + } + + unless ($orca_version_ok) { + warn "$0: Orca version $ORCA_VER_QUOTED is less than the required ", + "version $required_version specified in '$config_filename'.\n"; ++$number_errors; } } else { Modified: trunk/orca/orca/orca.pl.in ============================================================================== --- trunk/orca/orca/orca.pl.in (original) +++ trunk/orca/orca/orca.pl.in Mon May 2 18:41:27 2005 @@ -53,7 +53,6 @@ use Math::IntervalSearch @MATH_INTERVALSEARCH_VER@ qw(interval_search); use Storable @STORABLE_VER@; use RRDs @RRDTOOL_VER@; -use version @VERSION_VER@; # Set behavior of the Data::Dumper module. $Data::Dumper::Indent = 1; Modified: trunk/orca/packages/Makefile.in ============================================================================== --- trunk/orca/packages/Makefile.in (original) +++ trunk/orca/packages/Makefile.in Mon May 2 18:41:27 2005 @@ -18,7 +18,6 @@ math_intervalsearch_dir = @MATH_INTERVALSEARCH_DIR@ rrdtool_dir = @RRDTOOL_DIR@ storable_dir = @STORABLE_DIR@ -version_dir = @VERSION_DIR@ MAKE_COMPRESS_ZLIB = @MAKE_COMPRESS_ZLIB@ MAKE_DATA_DUMPER = @MAKE_DATA_DUMPER@ @@ -28,7 +27,6 @@ MAKE_MATH_INTERVALSEARCH = @MAKE_MATH_INTERVALSEARCH@ MAKE_RRDTOOL = @MAKE_RRDTOOL@ MAKE_STORABLE = @MAKE_STORABLE@ -MAKE_VERSION = @MAKE_VERSION@ MAKE_TARGETS = $(MAKE_COMPRESS_ZLIB) \ $(MAKE_DATA_DUMPER) \ $(MAKE_DATE_PARSE) \ @@ -36,8 +34,7 @@ $(MAKE_DIGEST_MD5) \ $(MAKE_MATH_INTERVALSEARCH) \ $(MAKE_RRDTOOL) \ - $(MAKE_STORABLE) \ - $(MAKE_VERSION) + $(MAKE_STORABLE) TEST_COMPRESS_ZLIB = @TEST_COMPRESS_ZLIB@ TEST_DATA_DUMPER = @TEST_DATA_DUMPER@ @@ -47,7 +44,6 @@ TEST_MATH_INTERVALSEARCH = @TEST_MATH_INTERVALSEARCH@ TEST_RRDTOOL = @TEST_RRDTOOL@ TEST_STORABLE = @TEST_STORABLE@ -TEST_VERSION = @TEST_VERSION@ TEST_TARGETS = $(TEST_COMPRESS_ZLIB) \ $(TEST_DATA_DUMPER) \ $(TEST_DATE_PARSE) \ @@ -55,8 +51,7 @@ $(TEST_DIGEST_MD5) \ $(TEST_MATH_INTERVALSEARCH) \ $(TEST_RRDTOOL) \ - $(TEST_STORABLE) \ - $(TEST_VERSION) + $(TEST_STORABLE) INSTALL_PERL_COMPRESS_ZLIB = @INSTALL_PERL_COMPRESS_ZLIB@ INSTALL_PERL_DATA_DUMPER = @INSTALL_PERL_DATA_DUMPER@ @@ -66,7 +61,6 @@ INSTALL_PERL_MATH_INTERVALSEARCH = @INSTALL_PERL_MATH_INTERVALSEARCH@ INSTALL_PERL_RRDTOOL = @INSTALL_PERL_RRDTOOL@ INSTALL_PERL_STORABLE = @INSTALL_PERL_STORABLE@ -INSTALL_PERL_VERSION = @INSTALL_PERL_VERSION@ INSTALL_PERL_TARGETS = $(INSTALL_PERL_COMPRESS_ZLIB) \ $(INSTALL_PERL_DATA_DUMPER) \ $(INSTALL_PERL_DATE_PARSE) \ @@ -74,8 +68,7 @@ $(INSTALL_PERL_DIGEST_MD5) \ $(INSTALL_PERL_MATH_INTERVALSEARCH) \ $(INSTALL_PERL_RRDTOOL) \ - $(INSTALL_PERL_STORABLE) \ - $(INSTALL_PERL_VERSION) + $(INSTALL_PERL_STORABLE) INSTALL_LIB_RRDTOOL = @INSTALL_LIB_RRDTOOL@ INSTALL_LIB_TARGETS = $(INSTALL_LIB_RRDTOOL) @@ -88,7 +81,6 @@ CLEAN_MATH_INTERVALSEARCH = @CLEAN_MATH_INTERVALSEARCH@ CLEAN_RRDTOOL = @CLEAN_RRDTOOL@ CLEAN_STORABLE = @CLEAN_STORABLE@ -CLEAN_VERSION = @CLEAN_VERSION@ CLEAN_TARGETS = $(CLEAN_COMPRESS_ZLIB) \ $(CLEAN_DATA_DUMPER) \ $(CLEAN_DATE_PARSE) \ @@ -96,8 +88,7 @@ $(CLEAN_DIGEST_MD5) \ $(CLEAN_MATH_INTERVALSEARCH) \ $(CLEAN_RRDTOOL) \ - $(CLEAN_STORABLE) \ - $(CLEAN_VERSION) + $(CLEAN_STORABLE) DISTCLEAN_COMPRESS_ZLIB = @DISTCLEAN_COMPRESS_ZLIB@ DISTCLEAN_DATA_DUMPER = @DISTCLEAN_DATA_DUMPER@ @@ -107,7 +98,6 @@ DISTCLEAN_MATH_INTERVALSEARCH = @DISTCLEAN_MATH_INTERVALSEARCH@ DISTCLEAN_RRDTOOL = @DISTCLEAN_RRDTOOL@ DISTCLEAN_STORABLE = @DISTCLEAN_STORABLE@ -DISTCLEAN_VERSION = @DISTCLEAN_VERSION@ DISTCLEAN_TARGETS = $(DISTCLEAN_COMPRESS_ZLIB) \ $(DISTCLEAN_DATA_DUMPER) \ $(DISTCLEAN_DATE_PARSE) \ @@ -115,8 +105,7 @@ $(DISTCLEAN_DIGEST_MD5) \ $(DISTCLEAN_MATH_INTERVALSEARCH) \ $(DISTCLEAN_RRDTOOL) \ - $(DISTCLEAN_STORABLE) \ - $(DISTCLEAN_VERSION) + $(DISTCLEAN_STORABLE) all: Makefile $(MAKE_TARGETS) @@ -174,12 +163,6 @@ $(storable_dir)/Makefile: $(storable_dir)/Makefile.PL $(PERL) cd $(storable_dir) && $(PERL) Makefile.PL -make_version: $(version_dir)/Makefile - cd $(version_dir) && $(MAKE) OPTIMIZE="$(CFLAGS)" - -$(version_dir)/Makefile: $(version_dir)/Makefile.PL $(PERL) - cd $(version_dir) && $(PERL) Makefile.PL - test: test_modules: $(TEST_TARGETS) @@ -208,9 +191,6 @@ test_storable: $(storable_dir)/Makefile cd $(storable_dir) && $(MAKE) OPTIMIZE="$(CFLAGS)" test -test_version: $(version_dir)/Makefile - cd $(version_dir) && $(MAKE) OPTIMIZE="$(CFLAGS)" test - install: $(INSTALL_LIB_TARGETS) install_lib_rrdtool: make_rrdtool @@ -242,9 +222,6 @@ install_perl_storable: $(storable_dir)/Makefile cd $(storable_dir) && $(MAKE) OPTIMIZE="$(CFLAGS)" UNINST="$(UNINST)" install -install_perl_version: $(version_dir)/Makefile - cd $(version_dir) && $(MAKE) OPTIMIZE="$(CFLAGS)" UNINST="$(UNINST)" install - clean: $(CLEAN_TARGETS) clean_compress_zlib: clean_rrdtool @@ -292,12 +269,6 @@ (cd $(storable_dir) && $(MAKE) clean); \ fi -clean_version: - @if test -r $(version_dir)/Makefile; then \ - echo 'cd $(version_dir) && $(MAKE) clean'; \ - (cd $(version_dir) && $(MAKE) clean); \ - fi - distclean: $(DISTCLEAN_TARGETS) $(RM) Makefile @@ -318,7 +289,5 @@ distclean_storable: clean_storable -distclean_version: clean_version - Makefile: Makefile.in cd .. && CONFIG_FILES=packages/Makefile ./config.status From blair at orcaware.com Mon May 2 18:51:51 2005 From: blair at orcaware.com (blair at orcaware.com) Date: Mon, 2 May 2005 18:51:51 -0700 Subject: [Orca-checkins] r443 - trunk/orca/orca Message-ID: <200505030151.j431ppGK013930@orca1.orcaware.com> Author: blair at orcaware.com Date: Mon May 2 18:51:06 2005 New Revision: 443 Modified: trunk/orca/orca/orca.pl.in Log: If -v is given on the command line, then print Orca's version information before any other information is printed out, otherwise if there are configuration file errors generated by Orca, then Orca's version information is not printed, making it hard to determine what Orca version is being used. * orca/orca.pl.in (main): Print the Orca, RRDs, and Perl version numbers immediately upon program startup. Modified: trunk/orca/orca/orca.pl.in ============================================================================== --- trunk/orca/orca/orca.pl.in (original) +++ trunk/orca/orca/orca.pl.in Mon May 2 18:51:06 2005 @@ -127,6 +127,13 @@ 'verbose+' => \$opt_verbose) or Usage; +if ($opt_verbose) { + print "Orca at ", scalar localtime, " running on:\n", + " Orca version $ORCA_VERSION\n", + " RRDs version $RRDs::VERSION\n", + " Perl version $]\n"; +} + # Currently, Orca can only daemonize itself on Unix platforms. if ($opt_daemon and IS_WIN32) { die "$0: cannot daemonize on a Windows platform.\n"; @@ -207,11 +214,6 @@ die "$0: cannot dup stdout: $!\n"; } -if ($opt_verbose) { - print "Orca version $ORCA_VERSION using RRDs version $RRDs::VERSION at ", - scalar localtime, ".\n"; -} - # Load the file state information from disk. load_old_state($config_global{state_file}); From blair at orcaware.com Tue May 3 19:02:28 2005 From: blair at orcaware.com (blair at orcaware.com) Date: Tue, 3 May 2005 19:02:28 -0700 Subject: [Orca-checkins] r444 - in trunk/orca: . packages Message-ID: <200505040202.j4422SGr008619@orca1.orcaware.com> Author: blair at orcaware.com Date: Tue May 3 19:01:29 2005 New Revision: 444 Modified: trunk/orca/configure.in trunk/orca/packages/Makefile.in Log: Remove all of the infrastructure to build and install the Perl Compress::Zlib module which was never used. If any structure is put in place, it'll be for IO::Zlib, which makes it very easy to read compressed files. * configure.in: Remove commented out code to check for the installed version of Compress::Zlib. Do not substitute the following autoconf variables: @COMPRESS_ZLIB_DIR@ @COMPRESS_ZLIB_VER@ @MAKE_COMPRESS_ZLIB@ @TEST_COMPRESS_ZLIB@ @INSTALL_PERL_COMPRESS_ZLIB@ @CLEAN_COMPRESS_ZLIB@ @DISTCLEAN_COMPRESS_ZLIB@ * packages/Makefile.in: Remove all variables and targets to build Compress::Zlib. Modified: trunk/orca/configure.in ============================================================================== --- trunk/orca/configure.in (original) +++ trunk/orca/configure.in Tue May 3 19:01:29 2005 @@ -25,8 +25,6 @@ # Define the directories containing packages that Orca makes use of here. # The directory name packages where these packages are distributed with # Orca gets added where necessary. -COMPRESS_ZLIB_DIR=Compress-Zlib-1.05 -COMPRESS_ZLIB_VER=1.05 DATA_DUMPER_DIR=Data-Dumper-2.101 DATA_DUMPER_VER=2.101 DATE_PARSE_DIR=TimeDate-1.16 @@ -44,7 +42,6 @@ TIME_HIRES_DIR=Time-HiRes-1.66 TIME_HIRES_VER=1.66 -AC_SUBST(COMPRESS_ZLIB_DIR) AC_SUBST(DATA_DUMPER_DIR) AC_SUBST(DATE_PARSE_DIR) AC_SUBST(DEVEL_DPROF_DIR) @@ -54,7 +51,6 @@ AC_SUBST(STORABLE_DIR) AC_SUBST(TIME_HIRES_DIR) -AC_SUBST(COMPRESS_ZLIB_VER) AC_SUBST(DATA_DUMPER_VER) AC_SUBST(DATE_PARSE_VER) AC_SUBST(DEVEL_DPROF_VER) @@ -364,24 +360,6 @@ # options for RRDtool if it is not already declared. # expr "$ORCA_CONFIGURE_COMMAND_LINE" : "--enable-shared" >/dev/null 2>&1 || ORCA_CONFIGURE_COMMAND_LINE="$ORCA_CONFIGURE_COMMAND_LINE --enable-shared" -dnl BORP_PERL_MODULE(orca_cv_perl_module_compress_zlib, -dnl $PERL, -dnl Compress::Zlib, -dnl $COMPRESS_ZLIB_VER) -dnl test "$ALWAYS_BUILD_PERL_MODULES" && orca_cv_perl_module_compress_zlib=no -dnl if test "$orca_cv_perl_module_compress_zlib" = no; then -dnl MAKE_COMPRESS_ZLIB=make_compress_zlib -dnl TEST_COMPRESS_ZLIB=test_compress_zlib -dnl INSTALL_PERL_COMPRESS_ZLIB=install_perl_compress_zlib -dnl CLEAN_COMPRESS_ZLIB=clean_compress_zlib -dnl DISTCLEAN_COMPRESS_ZLIB=distclean_compress_zlib -dnl fi -AC_SUBST(MAKE_COMPRESS_ZLIB) -AC_SUBST(TEST_COMPRESS_ZLIB) -AC_SUBST(INSTALL_PERL_COMPRESS_ZLIB) -AC_SUBST(CLEAN_COMPRESS_ZLIB) -AC_SUBST(DISTCLEAN_COMPRESS_ZLIB) - BORP_PERL_MODULE(orca_cv_perl_module_data_dumper, $PERL, Data::Dumper, Modified: trunk/orca/packages/Makefile.in ============================================================================== --- trunk/orca/packages/Makefile.in (original) +++ trunk/orca/packages/Makefile.in Tue May 3 19:01:29 2005 @@ -10,7 +10,6 @@ # instead of the newer installed module. UNINST = 1 -compress_zlib_dir = @COMPRESS_ZLIB_DIR@ data_dumper_dir = @DATA_DUMPER_DIR@ date_parse_dir = @DATE_PARSE_DIR@ devel_dprof_dir = @DEVEL_DPROF_DIR@ @@ -19,7 +18,6 @@ rrdtool_dir = @RRDTOOL_DIR@ storable_dir = @STORABLE_DIR@ -MAKE_COMPRESS_ZLIB = @MAKE_COMPRESS_ZLIB@ MAKE_DATA_DUMPER = @MAKE_DATA_DUMPER@ MAKE_DATE_PARSE = @MAKE_DATE_PARSE@ MAKE_DEVEL_DPROF = @MAKE_DEVEL_DPROF@ @@ -27,8 +25,7 @@ MAKE_MATH_INTERVALSEARCH = @MAKE_MATH_INTERVALSEARCH@ MAKE_RRDTOOL = @MAKE_RRDTOOL@ MAKE_STORABLE = @MAKE_STORABLE@ -MAKE_TARGETS = $(MAKE_COMPRESS_ZLIB) \ - $(MAKE_DATA_DUMPER) \ +MAKE_TARGETS = $(MAKE_DATA_DUMPER) \ $(MAKE_DATE_PARSE) \ $(MAKE_DEVEL_DPROF) \ $(MAKE_DIGEST_MD5) \ @@ -36,7 +33,6 @@ $(MAKE_RRDTOOL) \ $(MAKE_STORABLE) -TEST_COMPRESS_ZLIB = @TEST_COMPRESS_ZLIB@ TEST_DATA_DUMPER = @TEST_DATA_DUMPER@ TEST_DATE_PARSE = @TEST_DATE_PARSE@ TEST_DEVEL_DPROF = @TEST_DEVEL_DPROF@ @@ -44,8 +40,7 @@ TEST_MATH_INTERVALSEARCH = @TEST_MATH_INTERVALSEARCH@ TEST_RRDTOOL = @TEST_RRDTOOL@ TEST_STORABLE = @TEST_STORABLE@ -TEST_TARGETS = $(TEST_COMPRESS_ZLIB) \ - $(TEST_DATA_DUMPER) \ +TEST_TARGETS = $(TEST_DATA_DUMPER) \ $(TEST_DATE_PARSE) \ $(TEST_DEVEL_DPROF) \ $(TEST_DIGEST_MD5) \ @@ -53,7 +48,6 @@ $(TEST_RRDTOOL) \ $(TEST_STORABLE) -INSTALL_PERL_COMPRESS_ZLIB = @INSTALL_PERL_COMPRESS_ZLIB@ INSTALL_PERL_DATA_DUMPER = @INSTALL_PERL_DATA_DUMPER@ INSTALL_PERL_DATE_PARSE = @INSTALL_PERL_DATE_PARSE@ INSTALL_PERL_DEVEL_DPROF = @INSTALL_PERL_DEVEL_DPROF@ @@ -61,8 +55,7 @@ INSTALL_PERL_MATH_INTERVALSEARCH = @INSTALL_PERL_MATH_INTERVALSEARCH@ INSTALL_PERL_RRDTOOL = @INSTALL_PERL_RRDTOOL@ INSTALL_PERL_STORABLE = @INSTALL_PERL_STORABLE@ -INSTALL_PERL_TARGETS = $(INSTALL_PERL_COMPRESS_ZLIB) \ - $(INSTALL_PERL_DATA_DUMPER) \ +INSTALL_PERL_TARGETS = $(INSTALL_PERL_DATA_DUMPER) \ $(INSTALL_PERL_DATE_PARSE) \ $(INSTALL_PERL_DEVEL_DPROF) \ $(INSTALL_PERL_DIGEST_MD5) \ @@ -73,7 +66,6 @@ INSTALL_LIB_RRDTOOL = @INSTALL_LIB_RRDTOOL@ INSTALL_LIB_TARGETS = $(INSTALL_LIB_RRDTOOL) -CLEAN_COMPRESS_ZLIB = @CLEAN_COMPRESS_ZLIB@ CLEAN_DATA_DUMPER = @CLEAN_DATA_DUMPER@ CLEAN_DATE_PARSE = @CLEAN_DATE_PARSE@ CLEAN_DEVEL_DPROF = @CLEAN_DEVEL_DPROF@ @@ -81,8 +73,7 @@ CLEAN_MATH_INTERVALSEARCH = @CLEAN_MATH_INTERVALSEARCH@ CLEAN_RRDTOOL = @CLEAN_RRDTOOL@ CLEAN_STORABLE = @CLEAN_STORABLE@ -CLEAN_TARGETS = $(CLEAN_COMPRESS_ZLIB) \ - $(CLEAN_DATA_DUMPER) \ +CLEAN_TARGETS = $(CLEAN_DATA_DUMPER) \ $(CLEAN_DATE_PARSE) \ $(CLEAN_DEVEL_DPROF) \ $(CLEAN_DIGEST_MD5) \ @@ -90,7 +81,6 @@ $(CLEAN_RRDTOOL) \ $(CLEAN_STORABLE) -DISTCLEAN_COMPRESS_ZLIB = @DISTCLEAN_COMPRESS_ZLIB@ DISTCLEAN_DATA_DUMPER = @DISTCLEAN_DATA_DUMPER@ DISTCLEAN_DATE_PARSE = @DISTCLEAN_DATE_PARSE@ DISTCLEAN_DEVEL_DPROF = @DISTCLEAN_DEVEL_DPROF@ @@ -98,8 +88,7 @@ DISTCLEAN_MATH_INTERVALSEARCH = @DISTCLEAN_MATH_INTERVALSEARCH@ DISTCLEAN_RRDTOOL = @DISTCLEAN_RRDTOOL@ DISTCLEAN_STORABLE = @DISTCLEAN_STORABLE@ -DISTCLEAN_TARGETS = $(DISTCLEAN_COMPRESS_ZLIB) \ - $(DISTCLEAN_DATA_DUMPER) \ +DISTCLEAN_TARGETS = $(DISTCLEAN_DATA_DUMPER) \ $(DISTCLEAN_DATE_PARSE) \ $(DISTCLEAN_DEVEL_DPROF) \ $(DISTCLEAN_DIGEST_MD5) \ @@ -109,12 +98,6 @@ all: Makefile $(MAKE_TARGETS) -make_compress_zlib: make_rrdtool_zlib $(compress_zlib_dir)/Makefile - cd $(compress_zlib_dir) && $(MAKE) OPTIMIZE="$(CFLAGS)" - -$(compress_zlib_dir)/Makefile: $(compress_zlib_dir)/Makefile.PL $(PERL) - cd $(compress_zlib_dir) && $(PERL) Makefile.PL - make_data_dumper: $(data_dumper_dir)/Makefile cd $(data_dumper_dir) && $(MAKE) OPTIMIZE="$(CFLAGS)" @@ -148,9 +131,6 @@ make_rrdtool: $(rrdtool_dir)/Makefile $(PERL) cd $(rrdtool_dir) && $(MAKE) CFLAGS="$(CFLAGS)" -make_rrdtool_zlib: $(rrdtool_dir)/Makefile $(PERL) - cd $(rrdtool_dir) && $(MAKE) CFLAGS="$(CFLAGS)" zlib-1.1.3/librrd_z.a - $(rrdtool_dir)/Makefile: $(rrdtool_dir)/config.status $(rrdtool_dir)/Makefile.in cd $(rrdtool_dir) && CONFIG_FILES=Makefile ./config.status @@ -167,9 +147,6 @@ test_modules: $(TEST_TARGETS) -test_compress_zlib: make_rrdtool_zlib $(compress_zlib_dir)/Makefile - cd $(compress_zlib_dir) && $(MAKE) OPTIMIZE="$(CFLAGS)" test - test_data_dumper: $(data_dumper_dir)/Makefile cd $(data_dumper_dir) && $(MAKE) OPTIMIZE="$(CFLAGS)" test @@ -198,9 +175,6 @@ install_modules: $(INSTALL_PERL_TARGETS) -install_perl_compress_zlib: make_compress_zlib - cd $(compress_zlib_dir) && $(MAKE) OPTIMIZE="$(CFLAGS)" UNINST="$(UNINST)" install - install_perl_data_dumper: $(data_dumper_dir)/Makefile cd $(data_dumper_dir) && $(MAKE) OPTIMIZE="$(CFLAGS)" UNINST="$(UNINST)" install @@ -224,12 +198,6 @@ clean: $(CLEAN_TARGETS) -clean_compress_zlib: clean_rrdtool - @if test -r $(compress_zlib_dir)/Makefile; then \ - echo 'cd $(compress_zlib_dir) && $(MAKE) clean'; \ - (cd $(compress_zlib_dir) && $(MAKE) clean); \ - fi - clean_data_dumper: @if test -r $(data_dumper_dir)/Makefile; then \ echo 'cd $(data_dumper_dir) && $(MAKE) clean'; \ @@ -272,8 +240,6 @@ distclean: $(DISTCLEAN_TARGETS) $(RM) Makefile -distclean_compress_zlib: clean_compress_zlib - distclean_data_dumper: clean_data_dumper distclean_date_parse: clean_date_parse From blair at orcaware.com Tue May 3 20:14:33 2005 From: blair at orcaware.com (blair at orcaware.com) Date: Tue, 3 May 2005 20:14:33 -0700 Subject: [Orca-checkins] r445 - in trunk/orca: . data_gatherers data_gatherers/aix data_gatherers/hp data_gatherers/orca_services data_gatherers/orcallator data_gatherers/procallator data_gatherers/winallator lib orca packages Message-ID: <200505040314.j443EXPP010078@orca1.orcaware.com> Author: blair at orcaware.com Date: Tue May 3 20:13:44 2005 New Revision: 445 Modified: trunk/orca/Makefile.in trunk/orca/data_gatherers/Makefile.in trunk/orca/data_gatherers/aix/Makefile.in trunk/orca/data_gatherers/hp/Makefile.in trunk/orca/data_gatherers/orca_services/Makefile.in trunk/orca/data_gatherers/orcallator/Makefile.in trunk/orca/data_gatherers/procallator/Makefile.in trunk/orca/data_gatherers/winallator/Makefile.in trunk/orca/lib/Makefile.in trunk/orca/orca/Makefile.in trunk/orca/packages/Makefile.in Log: Bring Orca's Makefile.in's more in line with how GNU packages work. * Makefile.in, * packages/Makefile.in: Use the same rule for the all, install and check targets. Simplify the clean and distclean rules. * data_gatherers/aix/Makefile.in, * data_gatherers/hp/Makefile.in, * data_gatherers/Makefile.in, * data_gatherers/orcallator/Makefile.in, * data_gatherers/orca_services/Makefile.in, * data_gatherers/procallator/Makefile.in, * data_gatherers/winallator/Makefile.in, * lib/Makefile.in, * orca/Makefile.in: Now fail if any of the install or clean targets fail to install or clean properly. Modified: trunk/orca/Makefile.in ============================================================================== --- trunk/orca/Makefile.in (original) +++ trunk/orca/Makefile.in Tue May 3 20:13:44 2005 @@ -11,39 +11,19 @@ docs \ contrib -all: configure config/PerlHead1 config/PerlHead2 Makefile - @for dir in $(SUBDIRS); do \ - if test -d $$dir; then \ - echo "cd $$dir"; \ - cd $$dir || exit 1; \ - echo "$(MAKE) CFLAGS=$(CFLAGS) || exit 1"; \ - $(MAKE) CFLAGS="$(CFLAGS)" || exit 1; \ - echo "cd .."; \ - cd ..; \ - else \ - exit 1; \ - fi \ +ORCA_MAKE_DEFINES = CFLAGS='$(CFLAGS)' + +all install check: configure config/PerlHead1 config/PerlHead2 Makefile + @for subdir in $(SUBDIRS); do \ + echo making $@ in $$subdir; \ + (cd $$subdir && $(MAKE) $(ORCA_MAKE_DEFINES) $@) || exit 1; \ done -test: configure Makefile +test: check upgrade: cd src && $(MAKE) upgrade_installation -install: - @for dir in $(SUBDIRS); do \ - if test -d $$dir; then \ - echo "cd $$dir"; \ - cd $$dir || exit 1; \ - echo "$(MAKE) CFLAGS=$(CFLAGS) install || exit 1"; \ - $(MAKE) CFLAGS="$(CFLAGS)" install || exit 1; \ - echo "cd .."; \ - cd ..; \ - else \ - exit 1; \ - fi \ - done - install_contrib: cd contrib && $(MAKE) install_contrib @@ -62,21 +42,24 @@ install_modules: cd packages && $(MAKE) CFLAGS="$(CFLAGS)" install_modules -clean: - @for dir in $(SUBDIRS); do \ - echo "cd $$dir && $(MAKE) clean"; \ - (cd $$dir && $(MAKE) clean); \ - done +clean: clean-recursive clean-local -distclean: - @for dir in $(SUBDIRS); do \ - echo "cd $$dir && $(MAKE) distclean"; \ - (cd $$dir && $(MAKE) distclean); \ - done +distclean: distclean-recursive distclean-local + +clean-local: + +distclean-local: clean-local $(RM) -r autom4te*.cache $(RM) config/aclocal.m4 config/PerlHead1 config/PerlHead2 $(RM) configure config.cache config.log config.status Makefile +clean-recursive distclean-recursive: + @for subdir in $(SUBDIRS); do \ + target=`echo $@ | sed 's/-recursive//'`; \ + echo making $$target in $$subdir; \ + (cd $$subdir && $(MAKE) $$target) || exit 1; \ + done + to-autoconf: aclocal -I config --output=config/aclocal.m4 autoconf --include=config Modified: trunk/orca/data_gatherers/Makefile.in ============================================================================== --- trunk/orca/data_gatherers/Makefile.in (original) +++ trunk/orca/data_gatherers/Makefile.in Tue May 3 20:13:44 2005 @@ -14,10 +14,12 @@ $(PROCALLATOR_SUBDIR) \ $(WINALLATOR_SUBDIR) -all: Makefile $(TARGETS) - @for dir in $(SUBDIRS); do \ - echo "cd $$dir && $(MAKE) CFLAGS=$(CFLAGS)"; \ - (cd $$dir && $(MAKE) CFLAGS="$(CFLAGS)"); \ +ORCA_MAKE_DEFINES = CFLAGS='$(CFLAGS)' + +all install: Makefile $(TARGETS) + @for subdir in $(SUBDIRS); do \ + echo making $@ in $$subdir; \ + (cd $$subdir && $(MAKE) $(ORCA_MAKE_DEFINES) $@) || exit 1; \ done orcallator_run_at_boot: @@ -29,24 +31,21 @@ procallator_run_at_boot: cd procallator && $(MAKE) procallator_run_at_boot -install: - @for dir in $(SUBDIRS); do \ - echo "cd $$dir && $(MAKE) CFLAGS=$(CFLAGS) install"; \ - (cd $$dir && $(MAKE) CFLAGS="$(CFLAGS)" install); \ - done +clean: clean-recursive clean-local -clean: - @for dir in $(SUBDIRS); do \ - echo "cd $$dir && $(MAKE) CFLAGS=$(CFLAGS) clean"; \ - (cd $$dir && $(MAKE) CFLAGS="$(CFLAGS)" clean); \ - done +distclean: distclean-recursive distclean-local -distclean: clean - @for dir in $(SUBDIRS); do \ - echo "cd $$dir && $(MAKE) CFLAGS=$(CFLAGS) distclean"; \ - (cd $$dir && $(MAKE) CFLAGS="$(CFLAGS)" distclean); \ - done +clean-local: + +distclean-local: clean-local $(RM) Makefile +clean-recursive distclean-recursive: + for subdir in $(SUBDIRS); do \ + target=`echo $@ | sed 's/-recursive//'`; \ + echo making $$target in $$subdir; \ + (cd $$subdir && $(MAKE) $$target) || exit 1; \ + done + Makefile: Makefile.in cd .. && CONFIG_FILES=data_gatherers/Makefile ./config.status Modified: trunk/orca/data_gatherers/aix/Makefile.in ============================================================================== --- trunk/orca/data_gatherers/aix/Makefile.in (original) +++ trunk/orca/data_gatherers/aix/Makefile.in Tue May 3 20:13:44 2005 @@ -37,7 +37,7 @@ $(MKDIR) $(bindir) @for file in `echo $(BIN_TARGETS)`; do \ echo $(INSTALL) $$file $(bindir); \ - $(INSTALL) $$file $(bindir); \ + $(INSTALL) $$file $(bindir) || exit 1; \ done clean: Modified: trunk/orca/data_gatherers/hp/Makefile.in ============================================================================== --- trunk/orca/data_gatherers/hp/Makefile.in (original) +++ trunk/orca/data_gatherers/hp/Makefile.in Tue May 3 20:13:44 2005 @@ -37,7 +37,7 @@ $(MKDIR) $(bindir) @for file in `echo $(BIN_TARGETS)`; do \ echo $(INSTALL) $$file $(bindir); \ - $(INSTALL) $$file $(bindir); \ + $(INSTALL) $$file $(bindir) || exit 1; \ done clean: Modified: trunk/orca/data_gatherers/orca_services/Makefile.in ============================================================================== --- trunk/orca/data_gatherers/orca_services/Makefile.in (original) +++ trunk/orca/data_gatherers/orca_services/Makefile.in Tue May 3 20:13:44 2005 @@ -49,19 +49,19 @@ $(MKDIR) $(RRD_ORCA_SERVICES_DIR) @for file in `echo $(BIN_TARGETS)`; do \ echo $(INSTALL) $$file $(bindir); \ - $(INSTALL) $$file $(bindir); \ + $(INSTALL) $$file $(bindir) || exit 1; \ done @for file in `echo $(LIBEXEC_TARGETS)`; do \ echo $(INSTALL) $$file $(libexecdir); \ - $(INSTALL) $$file $(libexecdir); \ + $(INSTALL) $$file $(libexecdir) || exit 1; \ done - @if test -r $(sysconfdir)/orca_services.cfg; then \ + if test -r $(sysconfdir)/orca_services.cfg; then \ date="`date +%Y-%m-%d-%H:%M:%S`"; \ echo $(INSTALL) -m 0644 orca_services.cfg $(sysconfdir)/orca_services.cfg.$$date; \ - $(INSTALL) -m 0644 orca_services.cfg $(sysconfdir)/orca_services.cfg.$$date; \ + $(INSTALL) -m 0644 orca_services.cfg $(sysconfdir)/orca_services.cfg.$$date || exit 1; \ else \ echo $(INSTALL) -m 0644 orca_services.cfg $(sysconfdir); \ - $(INSTALL) -m 0644 orca_services.cfg $(sysconfdir); \ + $(INSTALL) -m 0644 orca_services.cfg $(sysconfdir) || exit 1; \ fi orca_services_run_at_boot: all Modified: trunk/orca/data_gatherers/orcallator/Makefile.in ============================================================================== --- trunk/orca/data_gatherers/orcallator/Makefile.in (original) +++ trunk/orca/data_gatherers/orcallator/Makefile.in Tue May 3 20:13:44 2005 @@ -50,16 +50,16 @@ $(MKDIR) $(RRD_ORCALLATOR_DIR) @for file in `echo $(BIN_TARGETS)`; do \ echo $(INSTALL) $$file $(bindir); \ - $(INSTALL) $$file $(bindir); \ + $(INSTALL) $$file $(bindir) || exit 1; \ done $(INSTALL) -m 0644 orcallator.se $(libdir) - @if test -r $(sysconfdir)/orcallator.cfg; then \ + if test -r $(sysconfdir)/orcallator.cfg; then \ date="`date +%Y-%m-%d-%H:%M:%S`"; \ echo $(INSTALL) -m 0644 orcallator.cfg $(sysconfdir)/orcallator.cfg.$$date; \ - $(INSTALL) -m 0644 orcallator.cfg $(sysconfdir)/orcallator.cfg.$$date; \ + $(INSTALL) -m 0644 orcallator.cfg $(sysconfdir)/orcallator.cfg.$$date || exit 1; \ else \ echo $(INSTALL) -m 0644 orcallator.cfg $(sysconfdir); \ - $(INSTALL) -m 0644 orcallator.cfg $(sysconfdir); \ + $(INSTALL) -m 0644 orcallator.cfg $(sysconfdir) || exit 1; \ fi orcallator_run_at_boot: all Modified: trunk/orca/data_gatherers/procallator/Makefile.in ============================================================================== --- trunk/orca/data_gatherers/procallator/Makefile.in (original) +++ trunk/orca/data_gatherers/procallator/Makefile.in Tue May 3 20:13:44 2005 @@ -46,15 +46,15 @@ $(MKDIR) $(RRD_PROCALLATOR_DIR) @for file in `echo $(BIN_TARGETS)`; do \ echo $(INSTALL) $$file $(bindir); \ - $(INSTALL) $$file $(bindir); \ + $(INSTALL) $$file $(bindir) || exit 1; \ done - @if test -r $(sysconfdir)/procallator.cfg; then \ + if test -r $(sysconfdir)/procallator.cfg; then \ date="`date +%Y-%m-%d-%H:%M:%S`"; \ echo $(INSTALL) -m 0644 procallator.cfg $(sysconfdir)/procallator.cfg.$$date; \ - $(INSTALL) -m 0644 procallator.cfg $(sysconfdir)/procallator.cfg.$$date; \ + $(INSTALL) -m 0644 procallator.cfg $(sysconfdir)/procallator.cfg.$$date || exit 1; \ else \ echo $(INSTALL) -m 0644 procallator.cfg $(sysconfdir); \ - $(INSTALL) -m 0644 procallator.cfg $(sysconfdir); \ + $(INSTALL) -m 0644 procallator.cfg $(sysconfdir) || exit 1; \ fi procallator_run_at_boot: all Modified: trunk/orca/data_gatherers/winallator/Makefile.in ============================================================================== --- trunk/orca/data_gatherers/winallator/Makefile.in (original) +++ trunk/orca/data_gatherers/winallator/Makefile.in Tue May 3 20:13:44 2005 @@ -44,15 +44,15 @@ $(MKDIR) $(RRD_WINALLATOR_DIR) @for file in `echo $(BIN_TARGETS)`; do \ echo $(INSTALL) $$file $(bindir); \ - $(INSTALL) $$file $(bindir); \ + $(INSTALL) $$file $(bindir) || exit 1; \ done - @if test -r $(sysconfdir)/winallator.cfg; then \ + if test -r $(sysconfdir)/winallator.cfg; then \ date="`date +%Y-%m-%d-%H:%M:%S`"; \ echo $(INSTALL) -m 0644 winallator.cfg $(sysconfdir)/winallator.cfg.$$date; \ - $(INSTALL) -m 0644 winallator.cfg $(sysconfdir)/winallator.cfg.$$date; \ + $(INSTALL) -m 0644 winallator.cfg $(sysconfdir)/winallator.cfg.$$date || exit 1; \ else \ echo $(INSTALL) -m 0644 winallator.cfg $(sysconfdir); \ - $(INSTALL) -m 0644 winallator.cfg $(sysconfdir); \ + $(INSTALL) -m 0644 winallator.cfg $(sysconfdir) || exit 1; \ fi clean: Modified: trunk/orca/lib/Makefile.in ============================================================================== --- trunk/orca/lib/Makefile.in (original) +++ trunk/orca/lib/Makefile.in Tue May 3 20:13:44 2005 @@ -35,13 +35,14 @@ $(MKDIR) $(libdir)/SE/3.4 @for f in Orca/*.pm; do \ echo $(INSTALL) -m 0644 $$f $(libdir)/Orca; \ - $(INSTALL) -m 0644 $$f $(libdir)/Orca; \ + $(INSTALL) -m 0644 $$f $(libdir)/Orca || exit 1; \ done @if test -d Orca/Config; then \ - $(MKDIR) $(libdir)/Orca/Config; \ + echo $(MKDIR) $(libdir)/Orca/Config; \ + $(MKDIR) $(libdir)/Orca/Config || exit 1; \ for f in Orca/Config/*.pm; do \ echo $(INSTALL) -m 0644 $$f $(libdir)/Orca/Config; \ - $(INSTALL) -m 0644 $$f $(libdir)/Orca/Config; \ + $(INSTALL) -m 0644 $$f $(libdir)/Orca/Config || exit 1; \ done; \ fi @for d in SE/*; do \ @@ -49,20 +50,23 @@ for f in $$d/*; do \ test ! -f $$f && continue; \ echo $(INSTALL) -m 0644 $$f $(libdir)/$$d; \ - $(INSTALL) -m 0644 $$f $(libdir)/$$d; \ + $(INSTALL) -m 0644 $$f $(libdir)/$$d || exit 1; \ done \ done - @echo "cd ..; sh -c 'svnversion .' 2>/dev/null || true" + @echo "cd ..; sh -c 'svnversion .'" @current_rev="`cd ..; sh -c 'svnversion .' 2>/dev/null || true`"; \ + echo "Subversion reversion of Orca is: $$current_rev"; \ if test "$$current_rev" != "" && \ - test "$$current_rev" != "exported"; then \ - echo "Found good svnversion for `cd ..; pwd`: $$current_rev"; \ + test "$$current_rev" != "exported"; then \ + echo Fixing svn revision number in $(libdir)/Orca/Constants.pm; \ echo $(PERL) -w -p -i \ -e 's/^(\$$ORCA_VER_REVISION\s*=\s*).*/$${1}"'$$current_rev'";/' \ $(libdir)/Orca/Constants.pm; \ $(PERL) -w -p -i \ -e 's/^(\$$ORCA_VER_REVISION\s*=\s*).*/$${1}"'$$current_rev'";/' \ - $(libdir)/Orca/Constants.pm; \ + $(libdir)/Orca/Constants.pm || exit 1; \ + else \ + echo Not fixing svn revision number in $(libdir)/Orca/Constants.pm; \ fi clean: Modified: trunk/orca/orca/Makefile.in ============================================================================== --- trunk/orca/orca/Makefile.in (original) +++ trunk/orca/orca/Makefile.in Tue May 3 20:13:44 2005 @@ -37,7 +37,7 @@ $(MKDIR) $(bindir) @for file in $(BIN_TARGETS); do \ echo $(INSTALL) $$file $(bindir); \ - $(INSTALL) $$file $(bindir); \ + $(INSTALL) $$file $(bindir) || exit 1; \ done upgrade: upgrade_installation Modified: trunk/orca/packages/Makefile.in ============================================================================== --- trunk/orca/packages/Makefile.in (original) +++ trunk/orca/packages/Makefile.in Tue May 3 20:13:44 2005 @@ -143,6 +143,8 @@ $(storable_dir)/Makefile: $(storable_dir)/Makefile.PL $(PERL) cd $(storable_dir) && $(PERL) Makefile.PL +check: + test: test_modules: $(TEST_TARGETS) @@ -160,7 +162,7 @@ cd $(digest_md5_dir) && $(MAKE) OPTIMIZE="$(CFLAGS)" test test_math_intervalsearch: $(math_intervalsearch_dir)/Makefile - cd $(math_intervalsearch_dir) && $(MAKE) test + cd $(math_intervalsearch_dir) && $(MAKE) OPTIMIZE="$(CFLAGS)" test test_rrdtool: make_rrdtool cd $(rrdtool_dir)/perl-shared && $(MAKE) CFLAGS="$(CFLAGS)" test @@ -199,42 +201,42 @@ clean: $(CLEAN_TARGETS) clean_data_dumper: - @if test -r $(data_dumper_dir)/Makefile; then \ - echo 'cd $(data_dumper_dir) && $(MAKE) clean'; \ - (cd $(data_dumper_dir) && $(MAKE) clean); \ + if test -r $(data_dumper_dir)/Makefile; then \ + echo making clean in $(data_dumper_dir); \ + (cd $(data_dumper_dir) && $(MAKE) clean) || exit 1; \ fi clean_date_parse: - @if test -r $(date_parse_dir)/Makefile; then \ - echo 'cd $(date_parse_dir) && $(MAKE) clean'; \ - (cd $(date_parse_dir) && $(MAKE) clean); \ + if test -r $(date_parse_dir)/Makefile; then \ + echo making clean in $(date_parse_dir); \ + (cd $(date_parse_dir) && $(MAKE) clean) || exit 1; \ fi clean_devel_dprof: - @if test -r $(devel_dprof_dir)/Makefile; then \ - echo 'cd $(devel_dprof_dir) && $(MAKE) clean'; \ - (cd $(devel_dprof_dir) && $(MAKE) clean); \ + if test -r $(devel_dprof_dir)/Makefile; then \ + echo making clean in $(devel_dprof_dir); \ + (cd $(devel_dprof_dir) && $(MAKE) clean) || exit 1; \ fi clean_digest_md5: - @if test -r $(digest_md5_dir)/Makefile; then \ - echo 'cd $(digest_md5_dir) && $(MAKE) clean'; \ - (cd $(digest_md5_dir) && $(MAKE) clean); \ + if test -r $(digest_md5_dir)/Makefile; then \ + echo making clean in $(digest_md5_dir); \ + (cd $(digest_md5_dir) && $(MAKE) clean) || exit 1; \ fi clean_math_intervalsearch: - @if test -r $(math_intervalsearch_dir)/Makefile; then \ - echo 'cd $(math_intervalsearch_dir) && $(MAKE) clean'; \ - (cd $(math_intervalsearch_dir) && $(MAKE) clean); \ + if test -r $(math_intervalsearch_dir)/Makefile; then \ + echo making clean in $(math_intervalsearch_dir); \ + (cd $(math_intervalsearch_dir) && $(MAKE) clean) || exit 1; \ fi clean_rrdtool: - (cd $(rrdtool_dir) && $(MAKE) clean) + cd $(rrdtool_dir) && $(MAKE) clean clean_storable: - @if test -r $(storable_dir)/Makefile; then \ - echo 'cd $(storable_dir) && $(MAKE) clean'; \ - (cd $(storable_dir) && $(MAKE) clean); \ + if test -r $(storable_dir)/Makefile; then \ + echo making clean in $(storable_dir); \ + (cd $(storable_dir) && $(MAKE) clean) || exit 1; \ fi distclean: $(DISTCLEAN_TARGETS) From blair at orcaware.com Wed May 4 12:38:59 2005 From: blair at orcaware.com (blair at orcaware.com) Date: Wed, 4 May 2005 12:38:59 -0700 Subject: [Orca-checkins] r446 - in trunk/orca: contrib contrib/rotate_orca_graphs data_gatherers data_gatherers/aix data_gatherers/hp data_gatherers/orca_services data_gatherers/orcallator data_gatherers/procallator data_gatherers/winallator docs lib orca packages Message-ID: <200505041938.j44Jcxjp029597@orca1.orcaware.com> Author: blair at orcaware.com Date: Wed May 4 12:38:03 2005 New Revision: 446 Modified: trunk/orca/contrib/Makefile.in trunk/orca/contrib/rotate_orca_graphs/Makefile.in trunk/orca/data_gatherers/Makefile.in trunk/orca/data_gatherers/aix/Makefile.in trunk/orca/data_gatherers/hp/Makefile.in trunk/orca/data_gatherers/orca_services/Makefile.in trunk/orca/data_gatherers/orcallator/Makefile.in trunk/orca/data_gatherers/procallator/Makefile.in trunk/orca/data_gatherers/winallator/Makefile.in trunk/orca/docs/Makefile.in trunk/orca/lib/Makefile.in trunk/orca/orca/Makefile.in trunk/orca/packages/Makefile.in Log: Continue to bring Orca's Makefile.in's more in line with how GNU packages work. Add check targets to all 'make check' to work, but most of the time, do nothing. * contrib/Makefile.in: Also pass $(CC) down to the subdirectories. Use the same rule for the all and check targets. When the install target is run, output a message that 'make install_contrib' should be run. Simplify the clean and distclean rules. Add a test target that depends on the check target. * data_gatherers/Makefile.in: Also pass $(CC) down to the subdirectories. * contrib/rotate_orca_graphs/Makefile.in, * data_gatherers/aix/Makefile.in, * data_gatherers/hp/Makefile.in, * data_gatherers/Makefile.in, * data_gatherers/orcallator/Makefile.in, * data_gatherers/orca_services/Makefile.in, * data_gatherers/procallator/Makefile.in, * data_gatherers/winallator/Makefile.in, * docs/Makefile.in, * lib/Makefile.in, * orca/Makefile.in: Add a check target that does nothing and a test target that depends upon the check target. * packages/Makefile.in: Have the test target depend upon the check target. Modified: trunk/orca/contrib/Makefile.in ============================================================================== --- trunk/orca/contrib/Makefile.in (original) +++ trunk/orca/contrib/Makefile.in Wed May 4 12:38:03 2005 @@ -1,34 +1,45 @@ @SET_MAKE@ +CC = @CC@ +CFLAGS = @CFLAGS@ + SUBDIRS = rotate_orca_graphs -all: Makefile $(TARGETS) - @for dir in $(SUBDIRS); do \ - echo "cd $$dir && $(MAKE) CFLAGS=$(CFLAGS)"; \ - (cd $$dir && $(MAKE) CFLAGS="$(CFLAGS)"); \ +ORCA_MAKE_DEFINES = CC='$(CC)' CFLAGS='$(CFLAGS)' + +all check: Makefile + @for subdir in $(SUBDIRS); do \ + echo making $@ in $$subdir; \ + (cd $$subdir && $(MAKE) $(ORCA_MAKE_DEFINES) $@) || exit 1; \ done +test: check + # Users will need to install the contributed programs by hand. install: + @echo "Run make install_contrib to install contributed packages" install_contrib: - @for dir in $(SUBDIRS); do \ - echo "cd $$dir && $(MAKE) CFLAGS=$(CFLAGS) install"; \ - (cd $$dir && $(MAKE) CFLAGS="$(CFLAGS)" install); \ + @for subdir in $(SUBDIRS); do \ + echo making install in $$subdir; \ + (cd $$subdir && $(MAKE) $(ORCA_MAKE_DEFINES) install) || exit 1; \ done -clean: - @for dir in $(SUBDIRS); do \ - echo "cd $$dir && $(MAKE) CFLAGS=$(CFLAGS) clean"; \ - (cd $$dir && $(MAKE) CFLAGS="$(CFLAGS)" clean); \ - done +clean: clean-recursive clean-local -distclean: clean - @for dir in $(SUBDIRS); do \ - echo "cd $$dir && $(MAKE) CFLAGS=$(CFLAGS) distclean"; \ - (cd $$dir && $(MAKE) CFLAGS="$(CFLAGS)" distclean); \ - done +distclean: distclean-recursive distclean-local + +clean-local: + +distclean-local: clean-local $(RM) Makefile +clean-recursive distclean-recursive: + @for subdir in $(SUBDIRS); do \ + target=`echo $@ | sed 's/-recursive//'`; \ + echo making $$target in $$subdir; \ + (cd $$subdir && $(MAKE) $$target) || exit 1; \ + done + Makefile: Makefile.in cd .. && CONFIG_FILES=contrib/Makefile ./config.status Modified: trunk/orca/contrib/rotate_orca_graphs/Makefile.in ============================================================================== --- trunk/orca/contrib/rotate_orca_graphs/Makefile.in (original) +++ trunk/orca/contrib/rotate_orca_graphs/Makefile.in Wed May 4 12:38:03 2005 @@ -8,6 +8,10 @@ all: Makefile $(TARGETS) +check: + +test: check + Makefile: Makefile.in cd ../.. && CONFIG_FILES=contrib/rotate_orca_graphs/Makefile ./config.status Modified: trunk/orca/data_gatherers/Makefile.in ============================================================================== --- trunk/orca/data_gatherers/Makefile.in (original) +++ trunk/orca/data_gatherers/Makefile.in Wed May 4 12:38:03 2005 @@ -1,5 +1,8 @@ @SET_MAKE@ +CC = @CC@ +CFLAGS = @CFLAGS@ + AIXALLATOR_SUBDIR = @AIXALLATOR_SUBDIR@ HPALLATOR_SUBDIR = @HPALLATOR_SUBDIR@ ORCALLATOR_SUBDIR = @ORCALLATOR_SUBDIR@ @@ -14,7 +17,7 @@ $(PROCALLATOR_SUBDIR) \ $(WINALLATOR_SUBDIR) -ORCA_MAKE_DEFINES = CFLAGS='$(CFLAGS)' +ORCA_MAKE_DEFINES = CC='$(CC)' CFLAGS='$(CFLAGS)' all install: Makefile $(TARGETS) @for subdir in $(SUBDIRS); do \ @@ -22,6 +25,10 @@ (cd $$subdir && $(MAKE) $(ORCA_MAKE_DEFINES) $@) || exit 1; \ done +check: + +test: check + orcallator_run_at_boot: cd orcallator && $(MAKE) orcallator_run_at_boot Modified: trunk/orca/data_gatherers/aix/Makefile.in ============================================================================== --- trunk/orca/data_gatherers/aix/Makefile.in (original) +++ trunk/orca/data_gatherers/aix/Makefile.in Wed May 4 12:38:03 2005 @@ -33,6 +33,10 @@ all: Makefile $(TARGETS) +check: + +test: check + install: all $(MKDIR) $(bindir) @for file in `echo $(BIN_TARGETS)`; do \ Modified: trunk/orca/data_gatherers/hp/Makefile.in ============================================================================== --- trunk/orca/data_gatherers/hp/Makefile.in (original) +++ trunk/orca/data_gatherers/hp/Makefile.in Wed May 4 12:38:03 2005 @@ -33,6 +33,10 @@ all: Makefile $(TARGETS) +check: + +test: check + install: all $(MKDIR) $(bindir) @for file in `echo $(BIN_TARGETS)`; do \ Modified: trunk/orca/data_gatherers/orca_services/Makefile.in ============================================================================== --- trunk/orca/data_gatherers/orca_services/Makefile.in (original) +++ trunk/orca/data_gatherers/orca_services/Makefile.in Wed May 4 12:38:03 2005 @@ -41,6 +41,10 @@ all: Makefile $(TARGETS) orca_services.cfg +check: + +test: check + install: all $(MKDIR) $(bindir) $(MKDIR) $(libexecdir) Modified: trunk/orca/data_gatherers/orcallator/Makefile.in ============================================================================== --- trunk/orca/data_gatherers/orcallator/Makefile.in (original) +++ trunk/orca/data_gatherers/orcallator/Makefile.in Wed May 4 12:38:03 2005 @@ -42,6 +42,10 @@ all: Makefile $(TARGETS) orcallator.cfg +check: + +test: check + install: all $(MKDIR) $(bindir) $(MKDIR) $(libdir) Modified: trunk/orca/data_gatherers/procallator/Makefile.in ============================================================================== --- trunk/orca/data_gatherers/procallator/Makefile.in (original) +++ trunk/orca/data_gatherers/procallator/Makefile.in Wed May 4 12:38:03 2005 @@ -40,6 +40,10 @@ all: Makefile $(TARGETS) procallator.cfg +check: + +test: check + install: all $(MKDIR) $(bindir) $(MKDIR) $(RAW_PROCALLATOR_DIR) Modified: trunk/orca/data_gatherers/winallator/Makefile.in ============================================================================== --- trunk/orca/data_gatherers/winallator/Makefile.in (original) +++ trunk/orca/data_gatherers/winallator/Makefile.in Wed May 4 12:38:03 2005 @@ -36,6 +36,10 @@ all: Makefile $(TARGETS) winallator.cfg +check: + +test: check + install: all $(MKDIR) $(bindir) $(MKDIR) $(libdir) Modified: trunk/orca/docs/Makefile.in ============================================================================== --- trunk/orca/docs/Makefile.in (original) +++ trunk/orca/docs/Makefile.in Wed May 4 12:38:03 2005 @@ -24,6 +24,10 @@ orca.txt: $(ORCA) $(POD2TEXT) $(ORCA) > $@ +check: + +test: check + install: all $(MKDIR) $(mandir) $(INSTALL) -m 0644 orca.man $(mandir)/orca.1 Modified: trunk/orca/lib/Makefile.in ============================================================================== --- trunk/orca/lib/Makefile.in (original) +++ trunk/orca/lib/Makefile.in Wed May 4 12:38:03 2005 @@ -27,6 +27,10 @@ rothschild_image_logo.png.hex: rothschild_image_logo.png $(PERL) -e 'while (sysread(STDIN, $$b, 35)){print unpack("h*", $$b),"\n"}' < $< > $@ +check: + +test: check + install: all $(MKDIR) $(libdir)/Orca $(MKDIR) $(libdir)/SE/3.2.1 Modified: trunk/orca/orca/Makefile.in ============================================================================== --- trunk/orca/orca/Makefile.in (original) +++ trunk/orca/orca/Makefile.in Wed May 4 12:38:03 2005 @@ -33,6 +33,10 @@ all: Makefile $(TARGETS) +check: + +test: check + install: all $(MKDIR) $(bindir) @for file in $(BIN_TARGETS); do \ Modified: trunk/orca/packages/Makefile.in ============================================================================== --- trunk/orca/packages/Makefile.in (original) +++ trunk/orca/packages/Makefile.in Wed May 4 12:38:03 2005 @@ -145,7 +145,7 @@ check: -test: +test: check test_modules: $(TEST_TARGETS) From blair at orcaware.com Wed May 4 13:07:23 2005 From: blair at orcaware.com (blair at orcaware.com) Date: Wed, 4 May 2005 13:07:23 -0700 Subject: [Orca-checkins] r447 - trunk/orca Message-ID: <200505042007.j44K7MDm031447@orca1.orcaware.com> Author: blair at orcaware.com Date: Wed May 4 13:06:03 2005 New Revision: 447 Modified: trunk/orca/Makefile.in Log: * Makefile.in: Also pass $(CC) down to the subdirectories. Modified: trunk/orca/Makefile.in ============================================================================== --- trunk/orca/Makefile.in (original) +++ trunk/orca/Makefile.in Wed May 4 13:06:03 2005 @@ -2,6 +2,7 @@ prefix = @prefix@ MKDIR = @MKDIR@ +CC = @CC@ CFLAGS = @CFLAGS@ SUBDIRS = packages \ @@ -11,7 +12,7 @@ docs \ contrib -ORCA_MAKE_DEFINES = CFLAGS='$(CFLAGS)' +ORCA_MAKE_DEFINES = CC='$(CC)' CFLAGS='$(CFLAGS)' all install check: configure config/PerlHead1 config/PerlHead2 Makefile @for subdir in $(SUBDIRS); do \ From blair at orcaware.com Sat May 7 20:43:59 2005 From: blair at orcaware.com (blair at orcaware.com) Date: Sat, 7 May 2005 20:43:59 -0700 Subject: [Orca-checkins] r448 - in trunk/orca: . lib orca packages Message-ID: <200505080343.j483hxrf020648@orca1.orcaware.com> Author: blair at orcaware.com Date: Sat May 7 20:42:56 2005 New Revision: 448 Modified: trunk/orca/INSTALL trunk/orca/Makefile.in trunk/orca/lib/Makefile.in trunk/orca/orca/orca.pl.in trunk/orca/packages/Makefile.in Log: Fix a couple of packaging and distribution issues with this commit. Requirements: 1) Perl versions 5.005_03 and above are supported by Orca. 2) To ease support costs, Orca always uses the latest Perl modules it relies upon, such as RRDs. Issues: 1) To always use the latest Perl modules, Orca used to overwrite existing older versions of the Perl modules it needed with the 'make install UNINST=1' command. This does not work with OS distributions that manage Perl modules, as those Perl modules should not be touched by Orca. Solution: 1) Give Orca its own private lib directory installed into $libdir/perl where it can place newer versions of the Perl modules than is supplied by Perl or the distribution. 2) Have Orca place the private lib directory into it's @INC array to load the newer Perl modules. * lib/Makefile.in (install): Install all the Orca Perl modules into $libdir/perl instead of $libdir. * INSTALL: Update the installation documentation since 'make install_modules' is no longer necessary and does not work any more. * orca/orca.pl.in (main): Instead of adding $libdir to @INC, add $libdir/perl. * Makefile.in (test_modules): Remove this target, as the check target now tests the Perl modules. (install_modules): Remove these target, as the install target now installs the Perl modules. * packages/Makefile.in (srcdir_perl_install_rootdir): New variable holding a fake directory name to install Perl module files located in packages/fake_install_root. (ORCA_MAKE_DEFINES): New variable holding the defines to pass to any non-Perl packages, currently sets CC and CFLAGS. (PERL_INSTALL_LOCATIONS_FLAGS): New variable holding the flags to use in a Perl module that uses ExtUtils::MakeMaker to build and install. This variable is passed to a '$(PERL) Makefile.PL' or '$(MAKE) install' command to install only the necessary Perl files into $libdir for Orca to load and all other files into $(srcdir_perl_install_rootdir). (ORCA_CREATE_MAKEFILE_FLAGS): New variable holding the defines to pass to the '$(PERL) Makefile.PL' command for creating the Makefile for a Perl module. (ORCA_MAKE_PERL_MODULE_FLAGS): New variable holding the defines to pass to the '$(MAKE)' command for building the Perl module. Currently sets CC and OPTIMIZE. (ORCA_INSTALL_PERL_MODULE_FLAGS): New variable holding the options to pass to '$(MAKE) install' when the Perl module is being installed. Currently contains ORCA_MAKE_PERL_MODULE_FLAGS and PERL_INSTALL_LOCATIONS_FLAGS. (test_modules): Delete, as the check module replaces its functionality. (check): Have this target now run the tests in the built packages. (install): Now also depend on the Perl installation targets. (make_rrdtool), (install_lib_rrdtool): Pass $(ORCA_MAKE_DEFINES) down to $(MAKE) instead of just setting CFLAGS on $(MAKE)'s command line. (make_data_dumper), (make_date_parse), (make_devel_dprof), (make_digest_md5), (make_math_intervalsearch), (make_storable), (test_data_dumper), (test_date_parse), (test_devel_dprof), (test_digest_md5), (test_math_intervalsearch), (test_rrdtool), (test_storable): Use $(ORCA_MAKE_PERL_MODULE_FLAGS) to pass to $(MAKE) instead of listing only OPTIMIZE on $(MAKE)'s command line. (install_perl_data_dumper), (install_perl_date_parse), (install_perl_devel_dprof), (install_perl_digest_md5), (install_perl_math_intervalsearch), (install_perl_rrdtool), (install_perl_storable): Pass $(ORCA_INSTALL_PERL_MODULE_FLAGS) instead of OPTIMIZE ad UNINST down to '$(MAKE) install'. The UNINST value is not set at all, because the installation should not complain about already installed older Perl modules. Modified: trunk/orca/INSTALL ============================================================================== --- trunk/orca/INSTALL (original) +++ trunk/orca/INSTALL Sat May 7 20:42:56 2005 @@ -14,13 +14,11 @@ 6) Test if the Perl modules properly compiled. - 7) Install any necessary Perl modules. + 7) Doing an upgrade from Orca 0.23 or older? Follow these steps. - 8) Doing an upgrade from Orca 0.23 or older? Follow these steps. + 8) Install Orca and Orca's Perl modules. - 9) Install Orca. - -10) [Solaris Only and Optional] Install orcallator. + 9) [Solaris Only and Optional] Install orcallator. a) Install the SE toolkit. b) Apply a patch to the SE 3.0 toolkit if necessary. c) Examine Orca/orcallator programs. @@ -29,9 +27,9 @@ e) Run start_orcallator on all systems. f) Edit orcallator.cfg. -11) [Systems with System Statistics in /proc, i.e. Linux] Install procallator. +10) [Systems with System Statistics in /proc, i.e. Linux] Install procallator. -12) Run Orca. +11) Run Orca. @@ -298,27 +296,9 @@ To check if the Perl modules were properly compiled run the following command: - % make test_modules - - 7) Install any necessary Perl modules. - - To automatically install these modules into Perl run the following - command: - - % make install_modules + % make check - This command will pass UNINST=1 down to the Perl Makefile's so - that any old installed Perl modules are properly deleted. - Otherwise, the Perl installation may have the old and new modules - installed and due to Perl's module search order, Perl may use the - older module instead of the newer installed module. - - If you do not wish to delete older Perl modules, then run this - command: - - % make install_modules UNINST=0 - - 8) Doing an upgrade from Orca 0.23 or older? Follow these steps. + 7) Doing an upgrade from Orca 0.23 or older? Follow these steps. Due to various changes to Orca between releases, many of the RRD, HTML and image filenames that Orca creates have changed names. @@ -381,15 +361,20 @@ kill any running percollator.se's before installing and running the following commands - 9) Install Orca. + 8) Install Orca and Orca's Perl modules. - Run the following command to install Orca: + Run the following command to install Orca and all of the Perl + modules Orca needs to properly run. % make install + This will install the Perl modules into $libdir/perl, so it should + not overwrite or clobber the existing Perl modules that you + already have on your system. + This may also install librrd.so in your $libdir. -10) [Solaris Only and Optional] Install orcallator. + 9) [Solaris Only and Optional] Install orcallator. a) Install the SE toolkit. Get the SE toolkit and use the installation instructions at @@ -474,7 +459,7 @@ of date, which may signify a orcallator program that has died and is no longer gathering data. -11) [Systems with System Statistics in /proc, i.e. Linux] Install procallator. +10) [Systems with System Statistics in /proc, i.e. Linux] Install procallator. a) Install procallator boot and halt time start/stop scripts in /etc/init.d/ and /etc/rc?.d/. @@ -512,7 +497,7 @@ signify a procallator program that has died and is no longer gathering data. -12) Run Orca. +11) Run Orca. Log into the system that will run Orca and run the command: Modified: trunk/orca/Makefile.in ============================================================================== --- trunk/orca/Makefile.in (original) +++ trunk/orca/Makefile.in Sat May 7 20:42:56 2005 @@ -37,12 +37,6 @@ procallator_run_at_boot: cd data_gatherers/procallator && $(MAKE) procallator_run_at_boot -test_modules: - cd packages && $(MAKE) CFLAGS="$(CFLAGS)" test_modules - -install_modules: - cd packages && $(MAKE) CFLAGS="$(CFLAGS)" install_modules - clean: clean-recursive clean-local distclean: distclean-recursive distclean-local Modified: trunk/orca/lib/Makefile.in ============================================================================== --- trunk/orca/lib/Makefile.in (original) +++ trunk/orca/lib/Makefile.in Sat May 7 20:42:56 2005 @@ -32,21 +32,21 @@ test: check install: all - $(MKDIR) $(libdir)/Orca + $(MKDIR) $(libdir)/perl/Orca $(MKDIR) $(libdir)/SE/3.2.1 $(MKDIR) $(libdir)/SE/3.3 $(MKDIR) $(libdir)/SE/3.3.1 $(MKDIR) $(libdir)/SE/3.4 @for f in Orca/*.pm; do \ - echo $(INSTALL) -m 0644 $$f $(libdir)/Orca; \ - $(INSTALL) -m 0644 $$f $(libdir)/Orca || exit 1; \ + echo $(INSTALL) -m 0644 $$f $(libdir)/perl/Orca; \ + $(INSTALL) -m 0644 $$f $(libdir)/perl/Orca || exit 1; \ done @if test -d Orca/Config; then \ - echo $(MKDIR) $(libdir)/Orca/Config; \ - $(MKDIR) $(libdir)/Orca/Config || exit 1; \ + echo $(MKDIR) $(libdir)/perl/Orca/Config; \ + $(MKDIR) $(libdir)/perl/Orca/Config || exit 1; \ for f in Orca/Config/*.pm; do \ - echo $(INSTALL) -m 0644 $$f $(libdir)/Orca/Config; \ - $(INSTALL) -m 0644 $$f $(libdir)/Orca/Config || exit 1; \ + echo $(INSTALL) -m 0644 $$f $(libdir)/perl/Orca/Config; \ + $(INSTALL) -m 0644 $$f $(libdir)/perl/Orca/Config || exit 1; \ done; \ fi @for d in SE/*; do \ @@ -62,15 +62,15 @@ echo "Subversion reversion of Orca is: $$current_rev"; \ if test "$$current_rev" != "" && \ test "$$current_rev" != "exported"; then \ - echo Fixing svn revision number in $(libdir)/Orca/Constants.pm; \ + echo Fixing svn revision number in $(libdir)/perl/Orca/Constants.pm; \ echo $(PERL) -w -p -i \ -e 's/^(\$$ORCA_VER_REVISION\s*=\s*).*/$${1}"'$$current_rev'";/' \ - $(libdir)/Orca/Constants.pm; \ + $(libdir)/perl/Orca/Constants.pm; \ $(PERL) -w -p -i \ -e 's/^(\$$ORCA_VER_REVISION\s*=\s*).*/$${1}"'$$current_rev'";/' \ - $(libdir)/Orca/Constants.pm || exit 1; \ + $(libdir)/perl/Orca/Constants.pm || exit 1; \ else \ - echo Not fixing svn revision number in $(libdir)/Orca/Constants.pm; \ + echo Not fixing svn revision number in $(libdir)/perl/Orca/Constants.pm; \ fi clean: Modified: trunk/orca/orca/orca.pl.in ============================================================================== --- trunk/orca/orca/orca.pl.in (original) +++ trunk/orca/orca/orca.pl.in Sat May 7 20:42:56 2005 @@ -35,7 +35,7 @@ BEGIN { my $prefix = "@prefix@"; my $exec_prefix = "@exec_prefix@"; - my $libdir = "@libdir@"; + my $libdir = "@libdir@/perl"; unshift(@INC, $libdir); } Modified: trunk/orca/packages/Makefile.in ============================================================================== --- trunk/orca/packages/Makefile.in (original) +++ trunk/orca/packages/Makefile.in Sat May 7 20:42:56 2005 @@ -1,14 +1,39 @@ @SET_MAKE@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ +libdir = @libdir@ +perl_libdir = $(libdir)/perl + +abs_top_srcdir = @abs_top_srcdir@ +srcdir_perl_install_rootdir = $(abs_top_srcdir)/packages/fake_install_root + PERL = @PERL@ +CC = @CC@ CFLAGS = @CFLAGS@ -# By default, pass UNINST=1 down to the Perl Makefile's so that any -# old installed Perl modules are properly deleted. Otherwise, the -# Perl installation may have the old and new modules installed and and -# due to Perl's module search order, Perl may use the older module -# instead of the newer installed module. -UNINST = 1 +ORCA_MAKE_DEFINES = CC='$(CC)' CFLAGS='$(CFLAGS)' + +# Flags to specify where the Perl modules will be installed. Install +# everything except the files that Perl needs to load the module back +# into an empty directory created in this source tree. +PERL_INSTALL_LOCATIONS_FLAGS = PREFIX=$(srcdir_perl_install_rootdir) \ + INSTALLPRIVLIB=$(perl_libdir) \ + INSTALLARCHLIB=$(perl_libdir) \ + INSTALLSITELIB=$(perl_libdir) \ + INSTALLSITEARCH=$(perl_libdir) + +# Flags to pass to '$(PERL) Makefile.PL' to create the Makefile for a +# Perl module. +ORCA_CREATE_MAKEFILE_FLAGS = $(PERL_INSTALL_LOCATIONS_FLAGS) + +# Flags to pass to '$(MAKE)' when a Perl module is being built. +ORCA_MAKE_PERL_MODULE_FLAGS = CC='$(CC)' OPTIMIZE='$(CFLAGS)' + +# Flags to pass to '$(MAKE) install' when a Perl module is being +# installed. +ORCA_INSTALL_PERL_MODULE_FLAGS = $(ORCA_MAKE_PERL_MODULE_FLAGS) \ + $(PERL_INSTALL_LOCATIONS_FLAGS) data_dumper_dir = @DATA_DUMPER_DIR@ date_parse_dir = @DATE_PARSE_DIR@ @@ -99,37 +124,37 @@ all: Makefile $(MAKE_TARGETS) make_data_dumper: $(data_dumper_dir)/Makefile - cd $(data_dumper_dir) && $(MAKE) OPTIMIZE="$(CFLAGS)" + cd $(data_dumper_dir) && $(MAKE) $(ORCA_MAKE_PERL_MODULE_FLAGS) $(data_dumper_dir)/Makefile: $(data_dumper_dir)/Makefile.PL $(PERL) - cd $(data_dumper_dir) && $(PERL) Makefile.PL + cd $(data_dumper_dir) && $(PERL) Makefile.PL $(ORCA_CREATE_MAKEFILE_FLAGS) make_date_parse: $(date_parse_dir)/Makefile - cd $(date_parse_dir) && $(MAKE) OPTIMIZE="$(CFLAGS)" + cd $(date_parse_dir) && $(MAKE) $(ORCA_MAKE_PERL_MODULE_FLAGS) $(date_parse_dir)/Makefile: $(date_parse_dir)/Makefile.PL $(PERL) - cd $(date_parse_dir) && $(PERL) Makefile.PL + cd $(date_parse_dir) && $(PERL) Makefile.PL $(ORCA_CREATE_MAKEFILE_FLAGS) make_devel_dprof: $(devel_dprof_dir)/Makefile - cd $(devel_dprof_dir) && $(MAKE) OPTIMIZE="$(CFLAGS)" + cd $(devel_dprof_dir) && $(MAKE) $(ORCA_MAKE_PERL_MODULE_FLAGS) $(devel_dprof_dir)/Makefile: $(devel_dprof_dir)/Makefile.PL $(PERL) - cd $(devel_dprof_dir) && $(PERL) Makefile.PL + cd $(devel_dprof_dir) && $(PERL) Makefile.PL $(ORCA_CREATE_MAKEFILE_FLAGS) make_digest_md5: $(digest_md5_dir)/Makefile - cd $(digest_md5_dir) && $(MAKE) OPTIMIZE="$(CFLAGS)" + cd $(digest_md5_dir) && $(MAKE) $(ORCA_MAKE_PERL_MODULE_FLAGS) $(digest_md5_dir)/Makefile: $(digest_md5_dir)/Makefile.PL $(PERL) - cd $(digest_md5_dir) && $(PERL) Makefile.PL + cd $(digest_md5_dir) && $(PERL) Makefile.PL $(ORCA_CREATE_MAKEFILE_FLAGS) make_math_intervalsearch: $(math_intervalsearch_dir)/Makefile - cd $(math_intervalsearch_dir) && $(MAKE) OPTIMIZE="$(CFLAGS)" + cd $(math_intervalsearch_dir) && $(MAKE) $(ORCA_MAKE_PERL_MODULE_FLAGS) $(math_intervalsearch_dir)/Makefile: $(math_intervalsearch_dir)/Makefile.PL $(PERL) - cd $(math_intervalsearch_dir) && $(PERL) Makefile.PL + cd $(math_intervalsearch_dir) && $(PERL) Makefile.PL $(ORCA_CREATE_MAKEFILE_FLAGS) make_rrdtool: $(rrdtool_dir)/Makefile $(PERL) - cd $(rrdtool_dir) && $(MAKE) CFLAGS="$(CFLAGS)" + cd $(rrdtool_dir) && $(MAKE) $(ORCA_MAKE_DEFINES) $(rrdtool_dir)/Makefile: $(rrdtool_dir)/config.status $(rrdtool_dir)/Makefile.in cd $(rrdtool_dir) && CONFIG_FILES=Makefile ./config.status @@ -138,65 +163,64 @@ cd $(rrdtool_dir) && ./configure @RRD_CONFIGURE_COMMAND_LINE@ make_storable: $(storable_dir)/Makefile - cd $(storable_dir) && $(MAKE) OPTIMIZE="$(CFLAGS)" + cd $(storable_dir) && $(MAKE) $(ORCA_MAKE_PERL_MODULE_FLAGS) $(storable_dir)/Makefile: $(storable_dir)/Makefile.PL $(PERL) - cd $(storable_dir) && $(PERL) Makefile.PL + cd $(storable_dir) && $(PERL) Makefile.PL $(ORCA_CREATE_MAKEFILE_FLAGS) -check: +check: $(TEST_TARGETS) test: check -test_modules: $(TEST_TARGETS) - test_data_dumper: $(data_dumper_dir)/Makefile - cd $(data_dumper_dir) && $(MAKE) OPTIMIZE="$(CFLAGS)" test + cd $(data_dumper_dir) && $(MAKE) $(ORCA_MAKE_PERL_MODULE_FLAGS) test test_date_parse: $(date_parse_dir)/Makefile - cd $(date_parse_dir) && $(MAKE) OPTIMIZE="$(CFLAGS)" test + cd $(date_parse_dir) && $(MAKE) $(ORCA_MAKE_PERL_MODULE_FLAGS) test test_devel_dprof: $(devel_dprof_dir)/Makefile - cd $(devel_dprof_dir) && $(MAKE) OPTIMIZE="$(CFLAGS)" test + cd $(devel_dprof_dir) && $(MAKE) $(ORCA_MAKE_PERL_MODULE_FLAGS) test test_digest_md5: $(digest_md5_dir)/Makefile - cd $(digest_md5_dir) && $(MAKE) OPTIMIZE="$(CFLAGS)" test + cd $(digest_md5_dir) && $(MAKE) $(ORCA_MAKE_PERL_MODULE_FLAGS) test test_math_intervalsearch: $(math_intervalsearch_dir)/Makefile - cd $(math_intervalsearch_dir) && $(MAKE) OPTIMIZE="$(CFLAGS)" test + cd $(math_intervalsearch_dir) && $(MAKE) $(ORCA_MAKE_PERL_MODULE_FLAGS) test test_rrdtool: make_rrdtool - cd $(rrdtool_dir)/perl-shared && $(MAKE) CFLAGS="$(CFLAGS)" test + cd $(rrdtool_dir)/perl-shared && $(MAKE) $(ORCA_MAKE_PERL_MODULE_FLAGS) test test_storable: $(storable_dir)/Makefile - cd $(storable_dir) && $(MAKE) OPTIMIZE="$(CFLAGS)" test + cd $(storable_dir) && $(MAKE) $(ORCA_MAKE_PERL_MODULE_FLAGS) test -install: $(INSTALL_LIB_TARGETS) +$(srcdir_perl_install_rootdir): + $(MKDIR) $(srcdir_perl_install_rootdir) -install_lib_rrdtool: make_rrdtool - cd $(rrdtool_dir)/src && $(MAKE) CFLAGS="$(CFLAGS)" install-libLTLIBRARIES +install: $(INSTALL_LIB_TARGETS) $(INSTALL_PERL_TARGETS) -install_modules: $(INSTALL_PERL_TARGETS) +install_lib_rrdtool: make_rrdtool + cd $(rrdtool_dir)/src && $(MAKE) $(ORCA_MAKE_DEFINES) install-libLTLIBRARIES install_perl_data_dumper: $(data_dumper_dir)/Makefile - cd $(data_dumper_dir) && $(MAKE) OPTIMIZE="$(CFLAGS)" UNINST="$(UNINST)" install + cd $(data_dumper_dir) && $(MAKE) $(ORCA_INSTALL_PERL_MODULE_FLAGS) install install_perl_date_parse: $(date_parse_dir)/Makefile - cd $(date_parse_dir) && $(MAKE) OPTIMIZE="$(CFLAGS)" UNINST="$(UNINST)" install + cd $(date_parse_dir) && $(MAKE) $(ORCA_INSTALL_PERL_MODULE_FLAGS) install install_perl_devel_dprof: $(devel_dprof_dir)/Makefile - cd $(devel_dprof_dir) && $(MAKE) OPTIMIZE="$(CFLAGS)" UNINST="$(UNINST)" install + cd $(devel_dprof_dir) && $(MAKE) $(ORCA_INSTALL_PERL_MODULE_FLAGS) install install_perl_digest_md5: $(digest_md5_dir)/Makefile - cd $(digest_md5_dir) && $(MAKE) OPTIMIZE="$(CFLAGS)" UNINST="$(UNINST)" install + cd $(digest_md5_dir) && $(MAKE) $(ORCA_INSTALL_PERL_MODULE_FLAGS) install install_perl_math_intervalsearch: $(math_intervalsearch_dir)/Makefile - cd $(math_intervalsearch_dir) && $(MAKE) OPTIMIZE="$(CFLAGS)" UNINST="$(UNINST)" install + cd $(math_intervalsearch_dir) && $(MAKE) $(ORCA_INSTALL_PERL_MODULE_FLAGS) install install_perl_rrdtool: make_rrdtool - cd $(rrdtool_dir)/perl-shared && $(MAKE) OPTIMIZE="$(CFLAGS)" UNINST="$(UNINST)" install + cd $(rrdtool_dir)/perl-shared && $(MAKE) $(ORCA_INSTALL_PERL_MODULE_FLAGS) install install_perl_storable: $(storable_dir)/Makefile - cd $(storable_dir) && $(MAKE) OPTIMIZE="$(CFLAGS)" UNINST="$(UNINST)" install + cd $(storable_dir) && $(MAKE) $(ORCA_INSTALL_PERL_MODULE_FLAGS) install clean: $(CLEAN_TARGETS) From blair at orcaware.com Sun May 8 13:38:38 2005 From: blair at orcaware.com (blair at orcaware.com) Date: Sun, 8 May 2005 13:38:38 -0700 Subject: [Orca-checkins] r449 - trunk/orca Message-ID: <200505082038.j48KcclM005431@orca1.orcaware.com> Author: blair at orcaware.com Date: Sun May 8 13:37:34 2005 New Revision: 449 Modified: trunk/orca/INSTALL Log: Update the installation instructions to be consistent with the new Makefile targets and rules. Hopefully, also make the steps clearer and easier to understand. * INSTALL: Update to match Makefile's. Modified: trunk/orca/INSTALL ============================================================================== --- trunk/orca/INSTALL (original) +++ trunk/orca/INSTALL Sun May 8 13:37:34 2005 @@ -2,23 +2,24 @@ 1) Install Perl 5.005_03 or later. - 2) Decide where Orca's binaries, raw data, RRD and HTML directories - will reside. Make sure performance concerns are handled. + 2) Configure Orca. + a) Overview of the 'configure' script. + b) Decide where Orca's binaries, raw data, RRD and HTML + directories will reside. Make sure performance concerns are + handled. + c) Find out where Orca's input files are located. + d) Other 'configure' command line options. + e) Run the configure script to configure Orca. - 3) Determine which Perl modules need compiling and installing. - Optionally download newer versions of these modules. + 3) Make Orca and any necessary Perl modules. - 4) Configure Orca. + 4) Test if the the Perl modules were properly compiled. - 5) Make Orca and any necessary Perl modules. + 5) Doing an upgrade from Orca 0.23 or older? Follow these steps. - 6) Test if the Perl modules properly compiled. + 6) Install Orca and any Perl modules Orca requires. - 7) Doing an upgrade from Orca 0.23 or older? Follow these steps. - - 8) Install Orca and Orca's Perl modules. - - 9) [Solaris Only and Optional] Install orcallator. + 7) [Solaris Only and Optional] Install orcallator. a) Install the SE toolkit. b) Apply a patch to the SE 3.0 toolkit if necessary. c) Examine Orca/orcallator programs. @@ -27,9 +28,9 @@ e) Run start_orcallator on all systems. f) Edit orcallator.cfg. -10) [Systems with System Statistics in /proc, i.e. Linux] Install procallator. + 8) [Systems with System Statistics in /proc, i.e. Linux] Install procallator. -11) Run Orca. + 9) Run Orca. @@ -38,7 +39,7 @@ This step is too large to go into here. The bottom line is to follow the instructions at - http://www.perl.com/pub/language/info/software.html + http://www.perl.com/download.csp or download a binary package from @@ -46,83 +47,128 @@ if you happen to run Linux, Solaris or Windows. - 2) Decide where Orca's binaries, raw data, RRD and HTML directories - will reside. Make sure performance concerns are handled. + If you run Solaris, you can also get a binary Perl package from + + http://www.sunfreeware.com/ - First choose the location where Orca will be installed. By - default, Orca will install into the following structure: + 2) Configure Orca. - $prefix Prefix, set with --prefix - $prefix/bin Binaries, set with --bindir - $prefix/lib Libraries, set with --libdir - $prefix/man Manual pages, set with --mandir - $prefix/var/orca Data storage directory, set with --with-var-dir - $prefix/var/orca/rrd RRD directory, set with --with-rrd-dir - - The HTML output directory is not set by default and must be - specified by the Orca administrator. - - By default $prefix is set to /usr/local. The -- arguments shown - above should be given to the configure script described below - which configures Orca. If you want to change the installation - location of Orca, say into /opt/orca, you would do so by passing - --prefix=/opt/orca to the configure script. - - Because Orca is extremely IO intensive, I recommend the following - architecture. Choose one host that can locally mount all the RRD - data files and the directory containing the HTML and image files - that are viewed by Orca users. If these two locations must be on - separate hosts and one directory must be NFS mounted to the Orca - host, then I recommend that the RRD data file be local instead of - the HTML and image files, since the RRD files are much more - read/write intensive. - - If you are going to use the orcallator.se Orca addon to monitor - your Sun Solaris systems, then you will in addition need to decide - where to have orcallator store its data files. By default, these - data files are written to once every 5 minutes, so IO is not an - issue. The issue here is that orcallator needs to run as root and - all of the orcallator output files from all your hosts need to be - written into the same NFS shared directory that Orca can read. It - is not too important that the directory that orcallator writes - into be mounted locally on the machine that Orca will run on, - since Orca will only read each file every five minutes. - - If you are running orcallator on a system running a web, proxy, or - Squid server, you can have orcallator watch the logs generated by - these programs. In this case, note the location of the log file - for the configure script. - - 3) Configure Orca. - - --prefix=DIR - --with-var-dir=DIR - --with-rrd-dir=DIR - --with-html-dir=DIR - - Now that you have decided where the RRD, HTML, and optionally - the orcallator data files and the web server access logs, are - located, the configure script can be passed the following - arguments: - - --prefix=ORCA_PREFIX_DIRECTORY - --with-var-dir=VAR_DIR_LOCATION - --with-rrd-dir=RRD_DIR_LOCATION - --with-html-dir=HTML_DIR_LOCATION - - If you choose nothing else, the --with-html-dir must always be - used, otherwise configure will fail. - - --with-ncsa-log=LOG_FILENAME - --with-proxy-log=LOG_FILENAME - --with-squid-log=LOG_FILENAME - - If you use a web, proxy, or Squid server, you can have - orcallator gather statistics from the log file. Use this table - to determine the appropriate configure command line option to - use. LOG_FILENAME should be the location of the log file to - monitor. Note that Apache and NCSA servers use the Common Log - Format. + Orca is configured when the user runs the 'configure' script + located in the same directory as this INSTALL file. + + a) Overview of the 'configure' script. + + The 'configure' shell script attempts to guess correct values + for various system-dependent variables used during compilation. + It uses those values to create a 'Makefile' in each directory + of the package. It may also create one or more '.h' files + containing system-dependent definitions. Finally, it creates a + shell script 'config.status' that you can run in the future to + recreate the current configuration, and a file 'config.log' + containing compiler output (useful mainly for debugging + 'configure'). + + The 'configure' script will find where your version of Perl and + some other assorted programs are located. It will also + determine if you have the necessary Perl modules to run Orca. + If it does not find the required Perl modules, the modules that + are included with the Orca distribution will be built. + + The 'configure' script will also determine if you run one of + the operating systems where a shared RRDtool library + (librrd.so) will be built and installed in $libdir. + + The configure script takes a number of optional command line + arguments that customize its behavior. All command line + arguments begin with the -- characters. To see the command + line arguments that 'configure' takes, run it as + + ./configure --help + + or if you are using 'csh' on an old version of System V, you + might need to type + + sh ./configure --help + + instead to prevent 'csh' from trying to execute 'configure' + itself. + + Take a look through the available options, the important ones + are be discussed below. + + b) Decide where Orca's binaries, raw data, RRD and HTML + directories will reside. Make sure performance concerns are + handled. + + First choose the location where Orca will be installed. By + default, Orca will install into the following structure: + + $prefix Prefix, set with --prefix + $prefix/bin Binaries, set with --bindir + $prefix/lib Libraries, set with --libdir + $prefix/man Manual pages, set with --mandir + $prefix/var/orca Data storage directory, set with --with-var-dir + $prefix/var/orca/rrd RRD directory, set with --with-rrd-dir + + By default $prefix is set to /usr/local. The -- arguments + shown above should be given to the 'configure'. If you want to + change the installation location of Orca, say into /opt/orca, + you would do so by passing --prefix=/opt/orca to the + 'configure' script. + + Because Orca is extremely IO intensive, we recommend the + following architecture. Choose one host that can locally mount + all the RRD data files and the directory containing the HTML + and image files that are viewed by Orca users. If these two + locations must be on separate hosts and one directory must be + NFS mounted to the Orca host, then I recommend that the RRD + data file be local instead of the HTML and image files, since + the RRD files are much more read/write intensive. + + Orca requires a separate data gathering process to measure and + save the data that Orca will plot. You need to decide where + these data gathering processes will save its data files. Most + data gatherers take a measurement and write to their data files + once every 5 minutes, so IO is not an issue. The issue here is + that most data gatherers need to run as root and all of the + data files from all your hosts need to be written into the same + NFS shared directory that Orca can read. It is not too + important that the directory that data gatherer writes into be + mounted locally on the machine that Orca will run on, since + Orca will only read each file every five minutes. + + The HTML output directory is not set by default and must be + specified by the Orca administrator with the + + --with-html-dir=DIR + + command line option. If you choose nothing else, the + --with-html-dir must always be used, otherwise 'configure' will + fail. + + The HTML output directory will normally be accessible by a web + server so that Orca's files can be viewed in a browser. It is + less important that this directory be locally mounted than the + RRD directory, as this directory sees much less IO than the RRD + directory. Orca is smart enough not to update plots that do + not need to be updated even when new data is loaded. For + example, Orca's daily plots do not need to be updated but once + a day, so even though measurements may be taken every five + minutes, only a measurement taken in the new day will cause + Orca to generate an updated plot. + + c) Find out where Orca's input files are located. + + If you are running a Solaris system and use a web, proxy, or + Squid server, you can have the Solaris orcallator gather + statistics from the log file. Use this table to determine the + appropriate configure command line option to use. LOG_FILENAME + should be the location of the log file to monitor. Note that + Apache and NCSA servers use the Common Log Format. + + --with-ncsa-log=LOG_FILENAME + --with-proxy-log=LOG_FILENAME + --with-squid-log=LOG_FILENAME Log Type Configure Option ----------------------------------------------------------- @@ -130,175 +176,57 @@ Common Log Format with Proxy Information --with-proxy-log Squid Log Format --with-squid-log - Configure will let you use only one of these options. + The 'configure' script will let you use only one of these + options. + + d) Other 'configure' command line options. + + --with-warn-email + + Orca has a 'warn_email' configuration setting which is set + to an email address where Orca should send its warning + messages. By default this address is 'root at localhost'. You + can use this configure option to change the default email + address to use in the Orca configuration scripts in this + distribution. + + e) Run the configure script to configure Orca. + + --prefix=DIR + --with-var-dir=DIR + --with-rrd-dir=DIR + --with-html-dir=DIR + + Now that you have decided where the RRD, HTML, and + optionally the orcallator data files and the web server + access logs, are located, the configure script can be passed + the following arguments: + + --prefix=ORCA_PREFIX_DIRECTORY + --with-var-dir=VAR_DIR_LOCATION + --with-rrd-dir=RRD_DIR_LOCATION + --with-html-dir=HTML_DIR_LOCATION + + Now run the configure script like - --with-warn-email + ./configure [flags] - Orca has a 'warn_email' configuration setting which is set to - an email address where Orca should send its warning messages. - By default this address is 'root at localhost'. You can use this - configure option to change the default email address to use in - the Orca configuration scripts in this distribution. - - The configure script will find where your version of Perl and some - other assorted programs are located. It will also determine if - you have the necessary Perl modules to run Orca. If it does not - find the required modules, the modules that are included with the - Orca distribution will be built. - - Configure will also determine if you run one of the operating - systems where a shared librrd.so library will be built and - installed in $libdir. - - 4) Determine which Perl modules need compiling and installing. - Optionally download newer versions of these modules. - - The Orca distribution includes the following Perl modules. Some - of them are required for Orca to execute and some are included as - modules that may be needed to help process data loaded by Orca - (such as Date::Parse) or to profile Orca for performance - improvements (Devel::DProf). - - Here, the module version refers to the $VERSION variable in the - Perl module that is loaded by Perl and the package version refers - to the version number in the file name of the .tar.gz that - includes the Perl module. - - Module Required Required Package Version - Name Module Package Included With - Version Version Orca - ------------------------------------------------------------------- - Data::Dumper >= 2.101 >= 2.101 2.101 - Date::Parse Not required by Orca 2.24 - Devel::DProf Not required by Orca 19990108 - Digest::MD5 >= 2.33 >= 2.33 2.33 - Math::IntervalSearch >= 1.05 >= 1.05 1.05 - RRDs >= 1.000502 >= 1.0.50 1.0.50 - Storable >= 2.14 >= 2.14 2.14 - Time::HiRes Not required by Orca 1.66 - - All eight of these modules are included with the Orca distribution - in the packages directory. When you configure Orca in step 3), - configure will determine if you need any of these modules compiled - and installed. configure will then modify the packages/Makefile - file to only build those modules that need to be installed. - - All of the modules except for Date::Parse and Math::IntervalSearch - require a C compiler and generate shared libraries by default. - - If you wish to download and install modules that have been updated - since this Orca package has been assembled, please use the - following information. - - Data::Dumper - - http://www.perl.com/CPAN/authors/id/G/GS/GSAR/Data-Dumper-2.101.tar.gz - - % gunzip -c Data-Dumper-2.101.tar.gz | tar xvf - - % cd Data-Dumper-2.101 - % perl Makefile.PL - % make - % make test - % make install UNINST=1 - - Date::Parse - - http://www.perl.com/CPAN/authors/id/G/GB/GBARR/TimeDate-1.16.tar.gz - - % gunzip -c TimeDate-1.16.tar.gz | tar xvf - - % cd TimeDate-1.16 - % perl Makefile.PL - % make - % make test - % make install UNINST=1 - - Devel::DProf - - http://www.perl.com/CPAN/authors/id/I/IL/ILYAZ/modules/DProf-19990108.tar.gz - - % gunzip -c DProf-19990108.tar.gz | tar xvf - - % cd DProf-19990108 - % perl Makefile.PL - % make - % make test - % make install UNINST=1 - - Digest::MD5 - - http://www.perl.com/CPAN/authors/id/G/GA/GAAS/Digest-MD5-2.33.tar.gz - - % gunzip -c Digest-MD5-2.33.tar.gz | tar xvf - - % cd Digest-MD5-2.33 - % perl Makefile.PL - % make - % make test - % make install UNINST=1 - - Math::IntervalSearch - - http://www.perl.com/CPAN/authors/id/B/BZ/BZAJAC/Math-Interpolate-1.05.tar.gz - - % gunzip -c Math-Interpolate-1.05.tar.gz | tar xvf - - % cd Math-Interpolate-1.05 - % perl Makefile.PL - % make - % make test - % make install UNINST=1 - - RRDs - - http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/rrdtool-1.0.x/ - - RRDs is the Perl module that comes with RRDtool, a package - written by Tobias Oetiker. - - % gunzip -c rrdtool-1.0.??.tar.gz | tar xvf - - % cd rrdtool-1.0.?? - % sh configure --verbose - % make - % cd perl-shared - % make test - % make install UNINST=1 - - For large installations, I recommend that RRDs be compiled with - optimization turned on. - - Storable - - http://www.perl.com/CPAN/authors/id/A/AM/AMS/Storable-2.14.tar.gz - - % gunzip -c Storable-2.14.tar.gz | tar xvf - - % cd Storable-2.14 - % perl Makefile.PL - % make - % make test - % make install UNINST=1 - - Time::HiRes - - http://www.perl.com/CPAN/authors/id/J/JH/JHI/Time-HiRes-1.66.tar.gz - - % gunzip -c Time-HiRes-1.66.tar.gz | tar xvf - - % cd Time-HiRes-1.66 - % perl Makefile.PL - % make - % make test - % make install UNINST=1 + with the appropriate flags you want. - 5) Make Orca and any necessary Perl modules. + 3) Make Orca and any necessary Perl modules. To make Orca and these Perl modules run the following command: % make [ To optimize: make CFLAGS=-O or CFLAGS=-O3 ] - 6) Test if the Perl modules properly compiled. + 4) Test if the the Perl modules were properly compiled. To check if the Perl modules were properly compiled run the following command: % make check - 7) Doing an upgrade from Orca 0.23 or older? Follow these steps. + 5) Doing an upgrade from Orca 0.23 or older? Follow these steps. Due to various changes to Orca between releases, many of the RRD, HTML and image filenames that Orca creates have changed names. @@ -361,20 +289,20 @@ kill any running percollator.se's before installing and running the following commands - 8) Install Orca and Orca's Perl modules. + 6) Install Orca and any Perl modules Orca requires. - Run the following command to install Orca and all of the Perl - modules Orca needs to properly run. + Run the following command to install Orca and all the Perl modules + Orca uses. % make install This will install the Perl modules into $libdir/perl, so it should - not overwrite or clobber the existing Perl modules that you + not overwrite or clobber any existing Perl modules that you already have on your system. This may also install librrd.so in your $libdir. - 9) [Solaris Only and Optional] Install orcallator. + 7) [Solaris Only and Optional] Install orcallator. a) Install the SE toolkit. Get the SE toolkit and use the installation instructions at @@ -459,7 +387,7 @@ of date, which may signify a orcallator program that has died and is no longer gathering data. -10) [Systems with System Statistics in /proc, i.e. Linux] Install procallator. + 8) [Systems with System Statistics in /proc, i.e. Linux] Install procallator. a) Install procallator boot and halt time start/stop scripts in /etc/init.d/ and /etc/rc?.d/. @@ -497,7 +425,7 @@ signify a procallator program that has died and is no longer gathering data. -11) Run Orca. + 9) Run Orca. Log into the system that will run Orca and run the command: From blair at orcaware.com Sun May 8 13:57:28 2005 From: blair at orcaware.com (blair at orcaware.com) Date: Sun, 8 May 2005 13:57:28 -0700 Subject: [Orca-checkins] r450 - in trunk/orca: . packages/Time-HiRes-1.66 packages/Time-HiRes-1.67 Message-ID: <200505082057.j48KvS72005884@orca1.orcaware.com> Author: blair at orcaware.com Date: Sun May 8 13:56:30 2005 New Revision: 450 Added: trunk/orca/packages/Time-HiRes-1.67/ - copied from r449, trunk/orca/packages/Time-HiRes-1.66/ Removed: trunk/orca/packages/Time-HiRes-1.66/ Modified: trunk/orca/configure.in trunk/orca/packages/Time-HiRes-1.67/Changes trunk/orca/packages/Time-HiRes-1.67/HiRes.pm trunk/orca/packages/Time-HiRes-1.67/HiRes.xs trunk/orca/packages/Time-HiRes-1.67/META.yml Log: Upgrade Time::HiRes from 1.66 to 1.67. * configure.in: Bump Time::HiRes's version number to 1.67. * packages/Time-HiRes-1.67: Renamed from packages/Time-HiRes-1.66. Directory contents updated from Time-HiRes-1.67.tar.gz. Modified: trunk/orca/configure.in ============================================================================== --- trunk/orca/configure.in (original) +++ trunk/orca/configure.in Sun May 8 13:56:30 2005 @@ -39,8 +39,8 @@ RRDTOOL_VER=1.000502 STORABLE_DIR=Storable-2.14 STORABLE_VER=2.14 -TIME_HIRES_DIR=Time-HiRes-1.66 -TIME_HIRES_VER=1.66 +TIME_HIRES_DIR=Time-HiRes-1.67 +TIME_HIRES_VER=1.67 AC_SUBST(DATA_DUMPER_DIR) AC_SUBST(DATE_PARSE_DIR) Modified: trunk/orca/packages/Time-HiRes-1.67/Changes ============================================================================== --- trunk/orca/packages/Time-HiRes-1.66/Changes (original) +++ trunk/orca/packages/Time-HiRes-1.67/Changes Sun May 8 13:56:30 2005 @@ -1,5 +1,10 @@ Revision history for Perl extension Time::HiRes. +1.67 + - (internal) don't ignore the return value of gettimeofday() + - (external) return undef or an empty if gettimeofday() fails + (gettimeofday() and the hires time()) + 1.66 - add nanosleep() - fix the 'hierachy' typo in Makefile.PL [rt.cpan.org #8492] Modified: trunk/orca/packages/Time-HiRes-1.67/HiRes.pm ============================================================================== --- trunk/orca/packages/Time-HiRes-1.66/HiRes.pm (original) +++ trunk/orca/packages/Time-HiRes-1.67/HiRes.pm Sun May 8 13:56:30 2005 @@ -15,7 +15,335 @@ d_usleep d_ualarm d_gettimeofday d_getitimer d_setitimer d_nanosleep); -$VERSION = '1.66'; +$VERSION = '1.67'; +$XS_VERSION = $VERSION; +$VERSION = eval $VERSION; + +sub AUTOLOAD { + my $constname; + ($constname = $AUTOLOAD) =~ s/.*:://; + die "&Time::HiRes::constant not defined" if $constname eq 'constant'; + my ($error, $val) = constant($constname); + if ($error) { die $error; } + { + no strict 'refs'; + *$AUTOLOAD = sub { $val }; + } + goto &$AUTOLOAD; +} + +bootstrap Time::HiRes; + +# Preloaded methods go here. + +sub tv_interval { + # probably could have been done in C + my ($a, $b) = @_; + $b = [gettimeofday()] unless defined($b); + (${$b}[0] - ${$a}[0]) + ((${$b}[1] - ${$a}[1]) / 1_000_000); +} + +# Autoload methods go after =cut, and are processed by the autosplit program. + +1; +__END__ + +=head1 NAME + +Time::HiRes - High resolution alarm, sleep, gettimeofday, interval timers + +=head1 SYNOPSIS + + use Time::HiRes qw( usleep ualarm gettimeofday tv_interval nanosleep ); + + usleep ($microseconds); + nanosleep ($nanoseconds); + + ualarm ($microseconds); + ualarm ($microseconds, $interval_microseconds); + + $t0 = [gettimeofday]; # undef on failure. + ($seconds, $microseconds) = gettimeofday; # (undef, undef) on failure. + + $elapsed = tv_interval ( $t0, [$seconds, $microseconds]); + $elapsed = tv_interval ( $t0, [gettimeofday]); + $elapsed = tv_interval ( $t0 ); + + use Time::HiRes qw ( time alarm sleep ); + + $now_fractions = time; # -1.0 on failure. + sleep ($floating_seconds); + alarm ($floating_seconds); + alarm ($floating_seconds, $floating_interval); + + use Time::HiRes qw( setitimer getitimer + ITIMER_REAL ITIMER_VIRTUAL ITIMER_PROF ITIMER_REALPROF ); + + setitimer ($which, $floating_seconds, $floating_interval ); + getitimer ($which); + +=head1 DESCRIPTION + +The C module implements a Perl interface to the +C, C, C, C, and +C/C system calls, in other words, high +resolution time and timers. See the L section below and the +test scripts for usage; see your system documentation for the +description of the underlying C or C, C, +C, and C/C calls. + +If your system lacks C or an emulation of it you don't +get C or the one-argument form of C. +If your system lacks all of C, C, and +C, you don't get C, +C, or C. If your +system lacks both C and C you don't get +C or C. + +If you try to import an unimplemented function in the C statement +it will fail at compile time. + +If your subsecond sleeping is implemented with C instead +of C, you can mix subsecond sleeping with signals since +C does not use signals. This, however, is not portable, +and you should first check for the truth value of +C<&Time::HiRes::d_nanosleep> to see whether you have nanosleep, and +then carefully read your C C API documentation for any +peculiarities. + +Unless using C for mixing sleeping with signals, give +some thought to whether Perl is the tool you should be using for +work requiring nanosecond accuracies. + +The following functions can be imported from this module. +No functions are exported by default. + +=over 4 + +=item gettimeofday () + +In array context returns a two-element array with the seconds and +microseconds since the epoch. In scalar context returns floating +seconds like C (see below). + +=item usleep ( $useconds ) + +Sleeps for the number of microseconds (millionths of a second) +specified. Returns the number of microseconds actually slept. Can +sleep for more than one second, unlike the C system call. See +also C and C. + +Do not expect usleep() to be exact down to one microsecond. + +=item nanosleep ( $nanoseconds ) + +Sleeps for the number of nanoseconds (1e9ths of a second) specified. +Returns the number of nanoseconds actually slept (accurate only to +microseconds, the nearest thousand of them). Can sleep for more than +one second. See also C and +C. + +Do not expect nanosleep() to be exact down to one nanosecond. +Getting even accuracy of one thousand nanoseconds is good. + +=item ualarm ( $useconds [, $interval_useconds ] ) + +Issues a C call; the C<$interval_useconds> is optional and +will be zero if unspecified, resulting in C-like behaviour. + +Note that the interaction between alarms and sleeps are unspecified. + +=item tv_interval + +tv_interval ( $ref_to_gettimeofday [, $ref_to_later_gettimeofday] ) + +Returns the floating seconds between the two times, which should have +been returned by C. If the second argument is omitted, +then the current time is used. + +=item time () + +Returns a floating seconds since the epoch. This function can be +imported, resulting in a nice drop-in replacement for the C