[Orca-checkins] r448 - in trunk/orca: . lib orca packages
blair at orcaware.com
blair at orcaware.com
Sat May 7 20:43:59 PDT 2005
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)
More information about the Orca-checkins
mailing list