Frank, this addresses your configure --prefix=... request. Also the
changes necessary to install and run a non-default (non-root)
installation (see the new last section of the INSTALL file for notes on
how to do this).
If $PCP_DIR is set in the environment, then we assume we're running a
non-default install.
Nathan, I'd appreciate a review of the pmapi.h and libpcp changes ...
these are for an unrelated matter where I've chosen to rollback some of
the unsigned changes for the event records data structures (ea_nrecords
and er_nparams) which were causing QA failures.
Changes committed to git://oss.sgi.com/kenj/pcp.git dev
INSTALL | 34 ++++++++--
configure.in | 110 ++++++++++++++++++++--------------
src/bashrc/GNUmakefile | 2
src/include/GNUmakefile | 8 +-
src/include/buildrules | 8 +-
src/include/pcp.conf.in | 4 +
src/include/pcp.env | 10 ++-
src/include/pcp/pmapi.h | 4 -
src/libpcp/src/err.c | 3
src/libpcp/src/events.c | 23 ++++---
src/pmcd/pmdaproc.sh | 25 +++----
src/pmcd/rc-proc.sh | 9 ++
src/pmcd/rc_pmcd | 9 ++
src/pmcd/src/config.c | 20 ------
src/pmdas/simple/GNUmakefile.install | 8 ++
src/pmdas/trivial/GNUmakefile.install | 8 ++
src/pmdas/txmon/GNUmakefile.install | 7 ++
src/pmie/rc_pmie | 9 ++
src/pmlogger/rc_pmlogger | 9 ++
src/pmns/Make.stdpmid | 10 ++-
src/pmpost/pmpost.c | 20 ++++--
src/pmproxy/rc_pmproxy | 9 ++
22 files changed, 228 insertions(+), 121 deletions(-)
commit 4ab91528fb146f40c3da4fcef4c7c3004caaecdc
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Mon Apr 9 20:23:30 2012 +1000
Non-default install ... final fixups
This batch of changes completes the configure --prefix=... work
so that non-default installations can be run without root privileges.
As evidence, with a small number of matching QA changes, the QA
group of "sanity" tests can be run using a non-default installation.
commit a254f049f088a0345bdca299abe066268c60351d
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Mon Apr 9 14:40:51 2012 +1000
event records - unwind recent unsigned changes (part 2)
Revert to the previous code now that ea_nrecords and er_nparams
are back to being signed.
commit 2cc267d99144cc47c41231685fc6cca361cae969
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Mon Apr 9 08:36:03 2012 +1000
pmcd.conf - pathname silliness
As a result of the long and convoluted set of changes from early Irix
versions to the present day, we were not being consistent about how
pathnames for executables and DSOs are specified in pmcd.conf.
It all broke when $PCP_DIR was set in the aftermath of trying to run
a non-default installation after a configure --prefix=... build.
Now we're using absolute pathnames in the initial pmcd.conf with the
default PMDAs, in pmcd's parsing of pmcd.conf and in all the PMDA
Install procedures.
commit 96eaec4b0c818e45499210c6fb3ae6459ed59a52
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Mon Apr 9 08:33:26 2012 +1000
libpcp strerror_x - avoid overlapping dst and src in strcpy()
Found by accident. strerror_r may return the input buffer, which
makes the strcpy not only redundant, but dangerous on some architectures.
commit 54d9672e1d91473e43fe501ce4729df312f06eab
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Mon Apr 9 08:30:36 2012 +1000
pcp.env - fix search logic for pcp.conf
Logic was broken, and would not work with a non-default install using
$PCP_DIR as the base of the installation.
The (now) correct algorithm is:
- if $PCP_CONF is set, use that value
- else if $PCP_DIR, use $PCP_DIR/etc/etc.conf
- else, use /etc/etc.conf
commit 9997565036185de0d2124509c7cb76b1cd3fad69
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Mon Apr 9 08:22:28 2012 +1000
pmapi.h - unwind some of the recent unsigned changes
For event records, a couple of "array size" counts were changed
from int to unsigned int in commit acd24f294f20719f8838ad62042b33d246f8c15e
and this is not quite correct (these are not bit fields or flag fields).
The original design (although we may not have a use case yet in the code
base) was that these counters could be used to encode (negative) error
codes, similar to numpmid in a pmResult or numval in a pmValueSet.
But also, the expression p->ea_nrecords-1 became unsigned as a
by product of the change, which broke some of the code.
So revert ea_nrecords in pmEventArray and er_nparams in pmEventRecord
back to an int.
commit 9f1f62ea057037b3288d0369af86becfd2cc0c30
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Mon Apr 9 08:19:44 2012 +1000
rc scripts - relax "are you running as root?" test
If $PCP_DIR is set, then the check for uid == 0 is skipped.
This is another piece of the configure --prefix=... fixups, so that
a private PCP installation can be made and run, in which case nothing
is required to be done as the user "root".
commit e8c295369742253fafcafb58b0709e959ac1e276
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Sun Apr 8 08:57:47 2012 +1000
pmpost - refine environment handling
In an earlier life, pmpost was setuid root and we had an issue with
possible bogus environment variables. The fix for that issue would not
allow $PCP_DIR nor $PCP_CONF to be passed in the environment, meaning
the relocation of the /var/log/pcp/NOTICES file via pcp.conf did not work.
pmpost is no longer setuid so allowing $PCP_CONF and $PCP_DIR to be
retained should be OK ... in the process fixed a bug where the special
case handling of $TZ was totally broken!
commit fc6ba2411088f7c1e00a59d8950d6745c7988835
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Sun Apr 8 06:20:56 2012 +1000
Support configure --prefix=... and --exec-prefix=...
Changes as requested in http://oss.sgi.com/bugzilla/show_bug.cgi?id=921
Running
$ configure --prefix=/home/frank/mypcp
will setup to move all the PCP related files into a directory
tree below /home/frank/mypcp (--exec-prefix will setup to only move
the architecture-specific binaries and libraries, which is less useful
but comes for free in the autoconf wrappers).
After configure has been run by hand,
$ make install
will install everything as expected below /home/frank/mypcp
Note that none of the Makepkgs support understands any of this, so you
cannot build installable packages (on any platform) using the --prefix=
features of configure.
commit 6b8a983dfd68e4b75c1a1ba73ea867c9b5c4c332
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Sun Apr 8 06:19:26 2012 +1000
buildrules - make clean fixup
After the include files were moved to src/include/pcp, some final
cleanup logic here needed some tweaking.
|