IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 13847


Ignore:
Timestamp:
Jun 15, 2007, 10:52:48 AM (19 years ago)
Author:
eugene
Message:

updates to manual

Location:
trunk/doc/manual
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/manual/manual.tex

    r13846 r13847  
    1  %%% $Id: manual.tex,v 1.6 2007-06-15 15:33:38 eugene Exp $
     1 %%% $Id: manual.tex,v 1.7 2007-06-15 20:52:48 eugene Exp $
    22\documentclass[panstarrs,spec]{panstarrs}
    33
     
    66\subtitle{User Guide}
    77\shorttitle{PS IPP UG}
    8 \author{Paul A. Price, Joshua Hoblitt}
     8\author{Eugene A. Magnier, Paul A. Price, Joshua Hoblitt}
    99\audience{Pan-STARRS IPP Users}
    1010\group{Pan-STARRS Image Processing Pipeline}
     
    124124%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    125125
     126\section{Using the IPP}
     127
     128\subsection{Conceptual Overview}
     129
     130The operating goals of the IPP can be broken down into several major categories:
     131\begin{itemize}
     132\item reduction, analysis, and calibration of individual astronomical science images.
     133\item combinations (additions and subtractions) of groups of science image, along with their analysis and calibration.
     134\item analysis of the ensemble properties of astronomical objects detected from many images, including improved astrometric and photometric calibrations.
     135\item construction of the necessary master detrend images and other calibration information needed to perform the science analysis.
     136\item enabling further investigation into the data characteristics by tracking sufficient metadata and providing tools for this analysis.
     137\end{itemize}
     138Furthermore, the IPP is designed to perform these tasks with a high
     139degree of automation and for large collections of data from multiple
     140instruments.
     141
     142A cartoon of the user's view on the IPP is seen in Figure~\ref{}.
     143Images are injected into the IPP, either automatically by software
     144interacting with the telescope systems or manually by the user.  The
     145images are processed by the IPP through any number of analysis steps;
     146the specifics of the analysis will depend on the type of image, the
     147overall configuration, and additional requests the user may make.  The
     148user may use the program \code{pantasks} to control and monitor the
     149ongoing processing, or view summary result information in the
     150ippMonitor web browser.  As science images are processed, the
     151information about the objects detected in these images is passed to
     152the DVO database.  The user may explore the results or perform further
     153science analysis by interacting with the DVO database via the DVO
     154Shell.  From this tool, the user may, for example, create
     155color-magnitude diagrams of regions in the sky, or plot light curves
     156of specific objects.  The DVO Shell makes it possible to performing
     157data extraction and data visualization on the DVO database.
     158
     159Below, we discuss in more detail how a user would use the IPP in
     160several different operating scenarios: to reduce the results from an
     161individual observing run; to perform automatic analysis of data from a
     162telescope with a blocked-out schedule, as for example the CFHT Megacam
     163Queue; to perform automatic analysis of data from a continuous survey
     164instrument such as the Pan-STARRS PS1 Telescope.  These difference
     165scenarios have slightly different conditions and underlying
     166assumptions, and make a good set of examples for the types of
     167decisions a user much make.
     168
     169All of these scenarios have a few common elements.  The first goal of
     170the user is to explore the characteristics of the instrument in
     171question and to define initial master detrend images.  The intial
     172master detrend images may be used to test the validity of new detrend
     173images and thereby test the evolution of the instrument response.
     174Next, the user will make an initial analysis of science images.  This
     175initial analysis may be used to construct further master detrend or
     176calibration information (eg, flat-field correction images; reference
     177astrometric parameters; deeper astrometric reference catalog).
     178Finally, the user may begin large-scale automatic analysis of the
     179complete data collection or the real-time data stream.
     180
     181\subsection{Projects and Databases}
     182
     183The IPP has the concept of a 'project': a related group of data that
     184are analysed within the same context.  A project may consist of data
     185from many different camera, or the user may find it more convenient to
     186divide data even from the same camera into multiple independent
     187projects.  A single installation of the IPP may operate on many
     188separate projects at the same time. 
     189
     190Within a single project, the user may also choose to define more than
     191one output DVO database.  For example, within the Pan-STARRS project,
     192the detections from the different survey modes, with different depths
     193and cadences, will initially be saved in separate DVO databases, and
     194only later joined for improved calibration and more in-depth analysis.
     195
     196\subsection{User Interface Tools}
     197
     198In this section, we introduce the user to the IPP user interface
     199tools.
     200
     201\subsubsection{ippMonitor}
     202
     203The \code{ippMonitor} is a web-based tool that allows the end-user to
     204explore at a high level the results of the IPP analysis.  There is an
     205initial login page, after which the user is asked to choose a project.
     206Once a project is selected, the user may view pages which show summary
     207information of the images that have been processed at each of the
     208different stages.  There are top-level sections for the detrend
     209analysis, the single science image analysis, and the different image
     210combinations.  Further clicking takes the user to more detailed
     211information about the individual images: jpegs of the reduced image,
     212plots showing the psf modeling and the astrometric analysis, etc.
     213
     214\note{to be added to ippMonitor: pages showing summary plots from DVO}
     215
     216\subsubsection{DVO Shell}
     217
     218The DVO database is the primary output destination for results from
     219the IPP.  The DVO shell is the basic user interface to the DVO
     220database.  Within the DVO shell, the user may extract measurments from
     221the database, create plots, or view the locations of objects and
     222images on projections of the sky.
     223
     224A complete user's guide is available at DVO REF.  Here are a few
     225quick-start details:
     226
     227Start the DVO shell by typing: \code{dvo}.  You will be given a
     228prompt, at which you may type commands.  This is an interactive shell,
     229with standard readline comand-line editing features.  The \code{help}
     230command gives further information about the commands.  Commands will
     231give additional information if they are given a '-help' option, or in
     232many cases if the command is typed without arguments.
     233
     234\begin{verbatim}
     235catdir demo
     236region -n view1 0 0 80 ait
     237images
     238
     239region -n view2 10 40 2
     240avextract ra,dec where (g - i > 2.0)
     241cplot ra dec -c red
     242avextract ra,dec where (g - i < 0.5)
     243cplot ra dec -c blue
     244\end{verbatim}
     245
     246Choose the DVO database with the command \code{catdir}.  \note{you
     247must specify the path to the top of the database directories}.  Define
     248a view port for plotting objects and images on a sky projection with:
     249\code{region RA DEC range [projection]}.  The projection may be
     250\code{ait} (aitoff projection), \code{sin} (sin projection), .... 
     251
     252\subsubsection{pantasks}
     253
     254Pantasks is the program which schedules the analysis to be performed
     255and distributes the analysis jobs across the parallel processing
     256environemnt.  A more complete user's guide is available at REF. Here
     257we give a basic overview of starting up the IPP.  In this example, we
     258are using the stand-alone pantasks program.  It is also possible to
     259run pantasks in a client / server mode.  In this mode, the server runs
     260continuously in the background, and multiple users may interact with
     261the same pantasks server via the pantasks client tool.  Most of the
     262commands are the same in both contexts.  However, for security reasons
     263in the client / server mode, the clients are not able to issue certain
     264commands to the server.  Thus, there are some differences in the details.
     265
     266Start \code{pantasks}.  Load the collection of IPP tasks with the
     267command: \code{module pantasks.pro}.  Add remote analysis hosts to the
     268parallel processing controller (pcontrol): \code{controller host add
     269NAME}, where NAME is the name of a machine set up to run the IPP.  Add
     270the IPP project(s) of interest: \code{add.database (project)}.  Start
     271the analysis: \code{run}.  Check the current status with
     272\code{status}.  If something goes wrong, stop the processing with
     273\code{stop} or \code{halt}.  The former will continue to accept the
     274results from the jobs already launched, while the latter halts all
     275processing. \note{halt does not current stop pcontrol}. 
     276
     277\subsubsection{ippTools}
     278
     279\subsection{Operational Scenarios}
     280
     281\subsubsection{Reducing an Observing Run}
     282
     283\subsubsection{Pipeline Reduction : CFHT Queue Runs}
     284
     285\subsubsection{Pipeline Reduction : PS1 Survey Operations}
     286
     287\section{IPP Components}
     288
     289\tbd{Need to document command-line arguments, perhaps even
     290algorithms.}
     291
     292\subsection{Analysis Programs}
     293\subsubsection{psphot}
     294\subsubsection{psastro}
     295\subsubsection{ppStats}
     296\subsubsection{ppImage}
     297\subsubsection{ppMerge}
     298\subsubsection{ppNorm}
     299
     300\subsection{Pipeline Infrastructure}
     301\subsubsection{ippdb}
     302\subsubsection{ippTools}
     303\subsubsection{ippScripts}
     304\subsubsection{ippTasks and panTasks}
     305\subsubsection{ippMonitor}
     306
     307\subsubsection{Nebulous}
     308
     309\subsection{DVO}
     310\subsubsection{DVO Shell}
     311\subsubsection{Adding and Removing Data}
     312\subsubsubsection{addstar}
     313\subsubsubsection{delstar}
     314\subsubsubsection{getstar}
     315\subsubsection{Database Level Calibrations}
     316\subsubsubsection{relphot}
     317\subsubsubsection{uniphot}
     318\subsubsubsection{relastro}
     319\subsubsection{Other Tools}
     320\subsubsubsection{sky cell tools}
     321
     322\subsection{Software Architecture}
     323\subsection{psLib}
     324\subsection{psModules}
     325\subsection{Perl Modules}
     326
     327\section{Configuration}
     328
     329Correct use of the IPP depends on several configuration files.  We
     330distinguish below between configuration files required for the image
     331processing and those for running the process scheduler, PanTasks.
     332Note, however, that the Perl scripts called by PanTasks to run the
     333processing do use the site and camera configuration files principally
     334used for the image processing.
     335
     336\subsection{Image Processing}
     337
     338Configuration information for the image processing is provided on four
     339levels: the site, camera, format and recipe configurations.  Each uses
     340the ``MetaData Configuration'' (MDC) file format, which is briefly
     341described below; for a more detailed description, see the psLib SDRS
     342(PSDC-430-007).
     343
     344The configuration levels for the image processing components of the
     345IPP are:
     346\begin{itemize}
     347\item Options for the particular site installation of the
     348  pipeline: the {\it site};
     349\item Options specifying the instrument setup: the {\it camera};
     350\item Options specifying the format of the FITS file: the {\it
     351  format}; and
     352\item Options specifying the particular parameter choices that affect
     353  the details of an analysis: the {\it recipe}.
     354\end{itemize}
     355Note that these are arranged in an hierarchical order, with the site
     356configuration being the most general, and the recipe configurations
     357the most specific.  For example, not all sites will have to deal with
     358all cameras, and different cameras may require different recipes at
     359different times according to their particular quirks, analysis
     360experimentations, or their evolution.
     361
     362We have provided examples of each of these configurations in the
     363\code{config} component of the IPP, which should be a useful guide for
     364setting up your own.  The Pan-STARRS IPP Configuration Guide
     365(PSDC-430-???) has all the detailed information.
     366
     367\subsubsection{Overview of MDC format}
     368
     369psLib defines a \code{psMetadata} structure which can carry labeled
     370data of arbitrary types.  Originally designed for carrying the data in
     371FITS headers, the \code{psMetadata} have proved so generally useful
     372that we use them for our configurations (and a multitude of other
     373uses!).  We have designed a human-readable text-based format --- the
     374``MetaData Configuration'' (MDC) format --- which we use for this end.
     375
     376Each simple entry in an MDC file must contain the name, type and
     377value.  Each of these is on a single line, separated by whitespace,
     378and in that order.  Comments may be placed at the end of the line (or
     379on a blank line), after a hash mark (\code{#}).  Whitespace at the
     380beginning and end of strings (either the name, value or comment) are
     381stripped.
     382
     383The simple types follow the psLib types.  Integers are specified by a
     384letter indicating if the integer is signed (\code{S}) or unsigned
     385(\code{U}) and a number indicating the dynamic range in bits (8, 16,
     38632 or 64); e.g., \code{U8} is commonly used for bit mask values,
     387\code{S32} is commonly used for ordinary integer values.  Floating
     388point values are specified by the letter \code{F} and a number
     389indicating the precision in bits (32 or 64): \code{F32} (single
     390precision) or \code{F64} (double precision).  Strings are specified by
     391\code{STR}.  Times may be specified with the following types:
     392\code{UTC,UT1,TAI,TT}; values for the time are expected to be in
     393ISO8601 format (\code{YYYY-MM-DDTHH:MM:SS.sZ}).
     394
     395Names are traditionally all-caps, though there is no reason why they
     396must be; the names are case-sensitive.  A name may not be repeated
     397unless it has previously been declared to be of type \code{MULTI} (no
     398value should be provided with this declaration):
     399\begin{verbatim}
     400COMMENT    MULTI
     401COMMENT    STR    Having more than one COMMENT like this
     402COMMENT    STR    is permitted because of the MULTI.
     403\end{verbatim}
     404
     405A hierarchy can be made using the \code{METADATA} type, which signals
     406a new level:
     407\begin{verbatim}
     408JANITOR    METADATA
     409    NAME          STR    John Doe
     410    PAY           F32    1234.56
     411    ECCENTRICITY  STR    9.87
     412END
     413\end{verbatim}
     414Note that a \code{METADATA} block is closed by an \code{END}.  No
     415identing need be done within a \code{METADATA} block, but it is useful
     416to be able to see the levels at a glance (just like in a C program).
     417\code{METADATA} blocks may be nested within \code{METADATA} blocks,
     418probably down as far as you have the patience to try.  Note that
     419\code{MULTI} declarations only apply to the current level --- there is
     420no inheritance.
     421
     422The above format can be long if there are many \code{METADATA}s with
     423similar contents.  For this reason, we provide the \code{TYPE}
     424declaration, which generates a \code{METADATA} with the contents each
     425of type \code{STR}:
     426\begin{verbatim}
     427TYPE          EMPLOYEE    NAME       PAY        ECCENTRICITY
     428\end{verbatim}
     429Now, the type \code{EMPLOYEE} may be used, with string values (NB: no
     430spaces allowed!) to specify multiple entries:
     431\begin{verbatim}
     432JANITOR       EMPLOYEE    JohnDoe    1234.56    9.87
     433PROGRAMMER    EMPLOYEE    FooBar     2345.67    1.00
     434\end{verbatim}
     435This is the same as the much longer block:
     436\begin{verbatim}
     437JANITOR       METADATA
     438    NAME            STR     JohnDoe
     439    PAY             STR     1234.56
     440    ECCENTRICITY    STR     9.87
     441END
     442PROGRAMMER    METADATA
     443    NAME            STR     FooBar
     444    PAY             STR     2345.67
     445    ECCENTRICITY    STR     1.00
     446END
     447\end{verbatim}
     448Like the \code{MULTI}, \code{TYPE} declarations only apply to the
     449current level.
     450
     451
     452\subsubsection{Setting up configuration files}
     453
     454You will generally want to link \code{~/.ipprc} to the site
     455configuration file (\code{ipprc.config} which gets installed in
     456\code{PREFIX/share/ippconfig/} where \code{PREFIX} is your
     457installation prefix).  Then link \code{~/.ipp} to the \code{ippconfig}
     458directory to save hacking the \code{PATH} in the site configuration.
     459
     460\subsection{PanTasks}
     461
     462\subsubsection{Paths}
     463
     464Throughout PanTasks, a file may be referred to as:
     465\begin{itemize}
     466\item \code{/path/to/file.ext} --- not a URI, but it should work.
     467\item \code{file:///path/to/file.ext} --- the URI version of the above.
     468\item \code{path://PATH/file.ext} --- Uses the \code{DATAPATH} in the site configuration to set the path.
     469\end{itemize}
     470
     471\section{Installation}
     472
     473After the dependencies (\S\ref{sec:dependencies}) have been satisfied,
     474the IPP packages should be installed in the following order:
     475\begin{itemize}
     476\item \code{Ohana}
     477\item \code{psLib}
     478\item \code{psModules}
     479\item \code{psphot}
     480\item \code{psastro}
     481\item \code{ppStats}
     482\item \code{ppImage}
     483\item \code{ppMerge}
     484\item \code{ppNorm}
     485\item \code{pois}
     486\item \code{stac}
     487\item \code{pswarp}
     488\item \code{ppStac}
     489\item \code{ippdb}
     490\item \code{ippTools}
     491\item \code{PS-IPP-Metadata-Config}
     492\item \code{PS-IPP-Metadata}
     493\item \code{ippScripts}
     494\item \code{ippTasks}
     495\item \code{config}
     496\end{itemize}
     497
     498\subsection{psconfig}
     499
     500* pscheckperl : search for and install, if needed, external Perl modules
     501* pschecklibs : search for and install, if needed, external C libraries
     502* psconfig : set up the UNIX shell environment
     503* psbuild : build and install the software
     504* psdist : build IPP distributions (requires CVS access)
     505* tagsets : tables defining the C and Perl components to be built
     506
     507The IPP is a large and complex software system.  A major goal of the
     508IPP build system is to be user-friendly for those end users which do
     509not have root access on their machines.  Using the IPP build tools, it
     510is possible to install the complete system as a non-priviledged user.
     511The build system also makes it possible to maintain multiple
     512simultaneous installations with different versions of the
     513software. This latter feature is particularly important for developers
     514who need to be able to make tests and comparisons of different
     515versions.
     516
     517\subsubsubsection{UNIX environment}
     518
     519With the psconfig system, the complete collection of libraries and
     520
     521When building software
     522
     523\subsubsection{jhbuild}
     524
     525JH uses \code{jhbuild} even though the 'jh' in \code{jhbuild} doesn't
     526really refer to him.
     527
     528\subsubsubsection{What is it?}
     529
     530According to the introduction on the \code{jhbuild} website:
     531
     532\begin{quote}
     533\code{jhbuild} is a program that can be used to pull a number of
     534modules from CVS and build them in the correct order. Unlike some
     535build scripts, \code{jhbuild} lets you specify what modules you want
     536built and it will then go and build those modules plus dependencies.
     537
     538Although \code{jhbuild} was originally developed to build
     539\code{[WWW]Gnome}, it is now able to build a number of the modules in
     540\code{freedesktop.org} CVS. Extending it to handle new modules is
     541usually trivial (assuming the build infrastructure matches the other
     542modules it handles).
     543\end{quote}
     544
     545In additional to retrieving source code from various SCM's (CVS, SVN,
     546arch, etc.), jhbuild has the ability to download tarballs via HTTP or
     547FTP.
     548
     549\code{jhbuild} has been adopted as an official \code{freedesktop.org}
     550project. You can find more information on the project's homepage
     551(\code{http://www.freedesktop.org/Software/jhbuild}). Bugs can be
     552filed in the Gnome Bugzilla (\code{http://bugzilla.gnome.org}).
     553
     554\subsubsubsection{Where to get it}
     555
     556It was necessary to slightly modify \code{jhbuild} for use with IPP
     557software. Therefore, you must checkout the \code{jhbuild} module from
     558the Pan-STARRS CVS tree. Please see the Pan-STARRS CVS Guide for help
     559on setting up and using CVS. \code{jhbuild} will need to be able to
     560find it's own source tree even after installation so you should choose
     561a checkout path that can be permanent. Something along the lines of
     562\code{$HOME/src} is recommended.
     563
     564\begin{verbatim}
     565cd
     566mkdir -p src
     567cd src
     568cvs co jhbuild
     569\end{verbatim}
     570
     571After running CVS you should see something like this:
     572
     573\begin{verbatim}
     574$ cvs co jhbuild
     575cvs checkout: Updating jhbuild
     576U jhbuild/.cvsignore
     577U jhbuild/COPYING
     578U jhbuild/ChangeLog
     579U jhbuild/HACKING
     580U jhbuild/Makefile
     581U jhbuild/README
     582U jhbuild/install-check.c
     583.
     584.
     585\end{verbatim}
     586
     587\subsubsubsection{Installing jhbuild into your home directory}
     588
     589\code{jhbuild} should be installed locally under your home
     590directory. This will require that you modify the \code{PATH}
     591environment variable so that you can run jhbuild after it has been
     592installed.
     593
     594\begin{verbatim}
     595cd jhbuild
     596make
     597make install
     598\end{verbatim}
     599
     600Which should look something like this:
     601
     602\begin{verbatim}
     603$ make
     604gcc -Wall -O2 -o install-check install-check.c
     605Run "make install" to install.
     606$ make install
     607Creating /home/moanui/jhoblitt/bin/jhbuild
     608Creating /home/moanui/jhoblitt/.gnome2/vfolders/applications/jhbuild.desktop
     609install -m755 install-check /home/moanui/jhoblitt/bin/install-check
     610install -m755 config.guess /home/moanui/jhoblitt/bin/config.guess
     611\end{verbatim}
     612
     613That will install the \code{jhbuild} executable under
     614\code{$HOME/bin}. You are responsible for including this path in your
     615\code{PATH} environment variable. It is highly recommended that you
     616add this to your \code{.bashrc} or equivalent shell login script.
     617
     618For the \code{bash} shell, place this line in your \code{.bashrc}:
     619\begin{verbatim}
     620export PATH=${HOME}/bin:${PATH}
     621\end{verbatim}
     622For the \code{tcsh} shell, place this line in your \code{.tschrc}:
     623\begin{verbatim}
     624setenv PATH ${HOME}/bin:${PATH}
     625\end{verbatim}
     626
     627\subsubsubsection{Configuring jhbuild}
     628
     629\code{jhbuild} is configured via an rc file that lives at
     630\code{${HOME}/.jhbuildrc}. Please note that this rc file is executed
     631as Python code; be careful!
     632
     633Example \code{.jhbuildrc}, suitable for cut and paste:
     634
     635\begin{verbatim}
     636# what profile to build?
     637moduleset = 'http://pan-starrs.ifa.hawaii.edu/project/IPP/software/modulesets/ipp12.modules'
     638
     639# modules to build by default
     640modules = [ 'pslib', 'psmodules' ]
     641
     642# where should working copies go?
     643jhroot = os.environ['HOME'] + '/jhroot'
     644
     645# where should tarballs be kept?
     646tarballdir = jhroot + '/src'
     647
     648# in what prefix should things be installed? (must be writable)
     649target = os.popen('config.guess').read().rstrip()
     650prefix = jhroot + '/' + target
     651checkoutroot = prefix + '/build'
     652
     653# extra arguments to pass to the autogen.sh script?
     654autogenargs = '--enable-maintainer-mode --disable-static'
     655
     656# use an alternative install program that preserves the
     657# mtime on header files if they haven't changed.  Speeds
     658# up rebuilds.
     659os.environ['INSTALL'] = os.environ['HOME'] + '/bin/install-check'
     660
     661# don't try to use /usr/ucb/cc on Solaris
     662import sys
     663if sys.platform == 'sunos5':
     664    os.environ['CC'] = 'gcc'
     665\end{verbatim}
     666
     667\subsubsubsection{Running jhbuild}
     668
     669\code{Jhbuild} can be executed as \code{jhbuild build
     670[modulename]}. Just \code{jhbuild} will build the packages specified
     671in the \code{modules} variable from your rc file.
     672\begin{verbatim}
     673jhbuild
     674\end{verbatim}
     675or
     676\begin{verbatim}
     677jhbuild build pslib
     678\end{verbatim}
     679
     680Run \code{jhbuild} list to get a list of the packages \code{jhbuild}
     681knows how to build.
     682
     683\begin{verbatim}
     684$ jhbuild list
     685cfitsio
     686gsl
     687fftw
     688libxml2
     689mysql
     690pslib
     691psmodules
     692\end{verbatim}
     693
     694\code{jhbuild} supports many other commands. Please see \code{jhbuild
     695--help} for a complete list of options.
     696
     697\begin{verbatim}
     698$ jhbuild --help
     699usage: jhbuild [ -f config ] command [ options ... ]
     700Build a set of CVS modules (such as GNOME).
     701
     702Global options:
     703  -f, --file=CONFIG            use a non default configuration file
     704  -m, --moduleset=URI          use a non default module set
     705      --no-interact            do not prompt for input
     706
     707Commands:
     708  gui                          build targets from a gui app
     709  update                       update from cvs
     710  updateone modules            update a fixed set of modules
     711  build [ opts... ] [modules]  update and compile (the default)
     712  buildone [ opts... ] modules build a single module
     713  tinderbox [ opts... ]        build non-interactively with logging
     714  run program [ args... ]      run a command in the build environment
     715  shell                        start a shell in the build environment
     716  sanitycheck                  check that required support tools exists
     717  bootstrap                    build required support tools
     718  list [ opts ... ] [modules]  list what modules would be built
     719  dot [ modules ]              output a dot file of dependencies suitable
     720                               for processing with graphviz
     721  info modules...              prints information about modules
     722
     723Options valid for the build, buildone, tinderbox and update commands:
     724  -s, --skip=MODULES           treat the given modules as up to date
     725  -t, --start-at=MODULE        start building at the given module
     726  -D date_spec                 set a sticky date when checking out modules
     727
     728Options valid for the build, buildone and tinderbox commands:
     729  -a, --autogen                always run autogen.sh
     730  -c, --clean                  run make clean before make
     731  -n, --no-network             skip cvs update
     732
     733Options valid for the tinderbox command:
     734  -o, --output=DIR             directory to save build logs in
     735
     736Options valid for the list command:
     737  -r, --show-revision          show which revision will be built
     738\end{verbatim}
     739
     740\subsubsubsection{Dependancies}
     741
     742\code{jhbuild} has a fairly minimal set of dependencies --- far less
     743than what may be required to actually compile and install any
     744packages. However, if your system can meet the base requirements,
     745\code{jhbuild} should be able to bootstrap your build environment.
     746\begin{itemize}
     747\item A working C compiler (eg. \code{gcc})
     748\item A working \code{libc} (eg. \code{glibc})
     749\item Perl 5 with the \code{XML::Parser} module (needed by
     750  \code{libtool})
     751\item Python 2.?
     752\item Either \code{wget} or \code{curl}
     753\item GNU \code{M4} 1.4
     754\item \code{tar}
     755\item \code{gzip}
     756\item \code{bzip2}
     757\end{itemize}
     758
     759\subsubsubsection{Bootstrapping}
     760
     761\code{jhbuild} has a limited ability to install some of the necessary
     762tools for maintaining software that configure its build environment
     763with the GNU autotools.
     764
     765This step is probably required on OSX and Solaris. Your mileage will
     766vary per Linux distribution but you can probably skip this step if
     767your distribution is around RedHat 9 vintage or newer.
     768
     769\begin{verbatim}
     770jhbuild bootstrap
     771\end{verbatim}
     772
     773\code{jhbuild} will then will begin to build a series of packages.
     774
     775\subsubsubsection{Using the jhbuild enviroment}
     776
     777As you've already seen, \code{jhbuild} is capable of setting up an
     778independent build environment under the (configurable) directory of
     779your choice. In order to link non-\code{jhbuild} management software
     780against this build environment a number of your shell's environment
     781variable have to be modified. \code{jhbuild} is capable of doing this
     782for you. The syntax for this is \code{jhbuild shell}, which as the
     783syntax implies, spawns a new shell with the proper environment
     784variables.
     785
     786This example demonstrates \code{jhbuild} setting up the dynamic
     787linkers default search path for you.
     788
     789\begin{verbatim}
     790$ echo $LD_LIBRARY_PATH
     791
     792$ jhbuild shell
     793$ echo $LD_LIBRARY_PATH
     794/home/moanui/jhoblitt/jhroot/i686-pc-linux-gnu/lib
     795\end{verbatim}
     796
     797%$ --- Emacs needs this to balance out the dollar signs
     798
     799A fair number of other variables are also adjusted for you. Enough so
     800that most (all?) \code{autoconf} configured software will be able to
     801find it's dependencies.
     802
     803%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     804
     805\subsubsection{Aliases}
     806
     807PAP puts the following in his \code{~/.tcshrc}:
     808\begin{verbatim}
     809setenv SWDIR $HOME/local/`$HOME/bin/config.guess`/
     810if (! -d $SWDIR) mkdir --parents $SWDIR
     811alias ./autogen.sh './autogen.sh --prefix=$SWDIR CFLAGS="-I$SWDIR/include/ -g" LDFLAGS=-L$SWDIR/lib/'
     812alias   autogen.sh './autogen.sh --prefix=$SWDIR CFLAGS="-I$SWDIR/include/ -g" LDFLAGS=-L$SWDIR/lib/'
     813alias ./configure  './configure  --prefix=$SWDIR CFLAGS="-I$SWDIR/include/ -g" LDFLAGS=-L$SWDIR/lib/'
     814alias   configure  './configure  --prefix=$SWDIR CFLAGS="-I$SWDIR/include/ -g" LDFLAGS=-L$SWDIR/lib/'
     815setenv PATH ${PATH}:$SWDIR/bin/
     816setenv LD_LIBRARY_PATH $SWDIR/lib/:$SWDIR/lib/mysql:$LD_LIBRARY_PATH
     817setenv MANPATH $SWDIR/man:$MANPATH
     818setenv PKG_CONFIG_PATH $SWDIR/lib/pkgconfig/:$PKG_CONFIG_PATH
     819\end{verbatim}
     820
     821%$ --- Emacs needs this to balance out the dollar signs
     822
     823Here, \code{config.guess} is the common GNU script for guessing the
     824build system triplet (e.g., \code{i686-pc-linux-gnu}).
     825
     826There are a couple of notes:
     827\begin{itemize}
     828\item To compile a binary, simply do \code{./configure}, then
     829  \code{make && make install}.
     830\item \code{Ohana} doesn't like this setup, so you need to build it
     831  with: \code{\./configure --prefix=$SWDIR}
     832\item Perl modules can be installed: \code{./Build install
     833  --prefix=$SWDIR}.
     834\end{itemize}
     835
     836\subsection{Perl}
     837
     838Here we describe setting up the Perl dependencies followed by the
     839IPP components.
     840
     841\subsubsection{Dependencies}
     842\label{sec:installing-perl-dependencies}
     843
     844If you have access to the \code{root} account, installation as
     845\code{root} is much easier.  If not, you will have to go through
     846the more flaky installation as an unprivileged user.
     847
     848\subsubsubsection{Installation as root}
     849
     850Many of the Perl dependencies are available from the Comprehensive
     851Perl Archive Network (CPAN) at www.cpan.org.  If you have root access
     852on your target machines, they can be very simply retrieved, built and
     853installed (replacing \code{MODULE_NAME} for each module):
     854
     855\begin{verbatim}
     856> su -
     857Password:
     858> cpan
     859[...]
     860cpan> install MODULE_NAME
     861[...]
     862cpan> quit
     863\end{verbatim}
     864
     865Follow the prompts.  It's usually safe to accept the default (simply
     866hit enter) in response to most questions.
     867
     868If you get into trouble, try: \code{force install MODULE_NAME}.
     869
     870You can also try to use the \code{Bundle::PS} as described below if
     871you're feeling adventurous.
     872
     873\subsubsubsection{Installation as unprivileged user}
     874
     875To install modules from CPAN with the \code{CPAN.pm} interface, you
     876need to setup a CPAN configuration file in your home directory.  Then
     877\code{CPAN.pm} can walk you through setting up the most important
     878configuration values.  Unfortunately, there is some variation in the
     879behavior of the various versions of \code{CPAN.pm} that have shipped
     880with Perl.  Some (most) of these variants will not correctly create a
     881configuration files that allows a non-\code{root} user to install
     882modules outside of "system" paths.  In order to make sure that you get
     883a "correct" CPAN configuration file you need to ``prime'' it with a
     884few values.
     885
     886First you need to create the directory in which the CPAN configuration file will live.
     887\begin{verbatim}
     888> mkdir -p .cpan/CPAN/
     889\end{verbatim}
     890
     891Then we need to create a partial configuration file.  Note that this example
     892assumes that you want to install your perl modules under
     893\code{$HOME/local/lib/perl5}.
     894
     895\begin{verbatim}
     896> echo "\$CPAN::Config = {" >> .cpan/CPAN/MyConfig.pm
     897> echo "  makepl_arg => q[PREFIX=$HOME/local/]," >> .cpan/CPAN/MyConfig.pm
     898> echo "  mbuildpl_arg => q[--install_base $HOME/local/]," >> .cpan/CPAN/MyConfig.pm
     899> echo "};" >> .cpan/CPAN/MyConfig.pm
     900> echo "1;" >> .cpan/CPAN/MyConfig.pm
     901> echo "__END__" >> .cpan/CPAN/MyConfig.pm
     902\end{verbatim}
     903
     904%$ --- Emacs needs this to balance the previous dollar sign
     905
     906Now you need to invoke \code{CPAN.pm} so it can walk you through
     907configuring the rest of the required values.  This is an example of
     908one possible configuration with \code{CPAN.pm} version 1.8802.
     909\textbf{Your version of CPAN.pm may present you with different
     910prompts.}  Use your common sense.  If in doubt, it is generally safe
     911to simply hit enter (and accept the default).
     912
     913\begin{verbatim}
     914> perl -MCPAN -e shell
     915CPAN: File::HomeDir loaded ok
     916Sorry, we have to rerun the configuration dialog for CPAN.pm due to
     917the following indispensable but missing parameters:
     918
     919build_cache, build_dir, cache_metadata, cpan_home, ftp_proxy, http_proxy,
     920index_expire, inhibit_startup_message, keep_source_where, make_arg,
     921make_install_arg, mbuild_arg, mbuild_install_arg, mbuild_install_build_command,
     922no_proxy, prerequisites_policy, scan_cache, urllist
     923
     924
     925The following questions are intended to help you with the
     926configuration. The CPAN module needs a directory of its own to cache
     927important index files and maybe keep a temporary mirror of CPAN files.
     928This may be a site-wide directory or a personal directory.
     929
     930
     931
     932I see you already have a  directory
     933    /home/moanui/jhoblitt/.cpan
     934Shall we use it as the general CPAN build and cache directory?
     935
     936CPAN build and cache directory? [/home/moanui/jhoblitt/.cpan]
     937
     938
     939Unless you are accessing the CPAN via the filesystem directly CPAN.pm
     940needs to keep the source files it downloads somewhere. Please supply a
     941directory where the downloaded files are to be kept. [/home/moanui/jhoblitt/.cpan/sources]
     942Directory where the build process takes place? [/home/moanui/jhoblitt/.cpan/build]
     943
     944
     945How big should the disk cache be for keeping the build directories
     946with all the intermediate files?
     947
     948Cache size for build directory (in MB)? [100]
     949
     950
     951The CPAN indexes are usually rebuilt once or twice per hour, but the
     952typical CPAN mirror mirrors only once or twice per day. Depending on
     953the quality of your mirror and your desire to be on the bleeding edge,
     954you may want to set the following value to more or less than one day
     955(which is the default). It determines after how many days CPAN.pm
     956downloads new indexes.
     957
     958Let the index expire after how many days? [1]
     959
     960
     961By default, each time the CPAN module is started, cache scanning is
     962performed to keep the cache size in sync. To prevent this, answer
     963'never'.
     964
     965Perform cache scanning (atstart or never)? [atstart]
     966
     967
     968To considerably speed up the initial CPAN shell startup, it is
     969possible to use Storable to create a cache of metadata. If Storable
     970is not available, the normal index mechanism will be used.
     971
     972Cache metadata (yes/no)? [yes]
     973
     974
     975The CPAN module can detect when a module which you are trying to build
     976depends on prerequisites. If this happens, it can build the
     977prerequisites for you automatically ('follow'), ask you for
     978confirmation ('ask'), or just ignore them ('ignore'). Please set your
     979policy to one of the three values.
     980
     981Policy on building prerequisites (follow, ask or ignore)? [ask] follow
     982
     983
     984Every Makefile.PL is run by perl in a separate process. Likewise we
     985run 'make' and 'make install' in separate processes. If you have
     986any parameters (e.g. PREFIX, LIB, UNINST or the like) you want to
     987pass to the calls, please specify them here.
     988
     989If you don't understand this question, just press ENTER.
     990Parameters for the 'make' command?
     991Typical frequently used setting:
     992
     993    -j3              # dual processor system
     994
     995Your choice:  []
     996Parameters for the 'make install' command?
     997Typical frequently used setting:
     998
     999    UNINST=1         # to always uninstall potentially conflicting files
     1000
     1001Your choice:  [] UNINST=1
     1002
     1003
     1004The next questions deal with Module::Build support.
     1005
     1006A Build.PL is run by perl in a separate process. Likewise we run
     1007'./Build' and './Build install' in separate processes. If you have any
     1008parameters you want to pass to the calls, please specify them here.
     1009
     1010Parameters for the './Build' command?
     1011Setting might be:
     1012
     1013    --extra_linker_flags -L/usr/foo/lib  # non-standard library location
     1014
     1015Your choice:  []
     1016Do you want to use a different command for './Build install'?
     1017Sudo users will probably prefer:
     1018
     1019    su root -c ./Build
     1020or
     1021    sudo ./Build
     1022or
     1023    /path1/to/sudo -u admin_account ./Build
     1024
     1025or some such. Your choice:  [./Build]
     1026Parameters for the './Build install' command?
     1027Typical frequently used setting:
     1028
     1029    --uninst 1                           # uninstall conflicting files
     1030
     1031Your choice:  [] --uninst 1
     1032
     1033
     1034If you're accessing the net via proxies, you can specify them in the
     1035CPAN configuration or via environment variables. The variable in
     1036the $CPAN::Config takes precedence.
     1037
     1038Your ftp_proxy? []
     1039Your http_proxy? []
     1040Your no_proxy? []
     1041You have no /home/moanui/jhoblitt/.cpan/sources/MIRRORED.BY
     1042  I'm trying to fetch one
     1043CPAN: LWP::UserAgent loaded ok
     1044Fetching with LWP:
     1045  http://www.perl.org/CPAN/MIRRORED.BY
     1046
     1047
     1048Now we need to know where your favorite CPAN sites are located. Push
     1049a few sites onto the array (just in case the first on the array won't
     1050work). If you are mirroring CPAN to your local workstation, specify a
     1051file: URL.
     1052
     1053First, pick a nearby continent and country by typing in the number(s)
     1054in front of the item(s) you want to select. You can pick several of
     1055each, separated by spaces. Then, you will be presented with a list of
     1056URLs of CPAN mirrors in the countries you selected, along with
     1057previously selected URLs. Select some of those URLs, or just keep the
     1058old list. Finally, you will be prompted for any extra URLs -- file:,
     1059ftp:, or http: -- that host a CPAN mirror.
     1060
     1061(1) Africa
     1062(2) Asia
     1063(3) Central America
     1064(4) Europe
     1065(5) North America
     1066(6) Oceania
     1067(7) South America
     1068Select your continent (or several nearby continents) [] 5
     1069
     1070(1) Bahamas
     1071(2) Canada
     1072(3) Mexico
     1073(4) United States
     1074Select your country (or several nearby countries) [] 4
     1075
     1076(1) ftp://carroll.cac.psu.edu/pub/CPAN/
     1077(2) ftp://cpan-du.viaverio.com/pub/CPAN/
     1078(3) ftp://cpan-sj.viaverio.com/pub/CPAN/
     1079(4) ftp://cpan.calvin.edu/pub/CPAN
     1080(5) ftp://cpan.cs.utah.edu/pub/CPAN/
     1081(6) ftp://cpan.cse.msu.edu/
     1082(7) ftp://cpan.erlbaum.net/CPAN/
     1083(8) ftp://cpan.glines.org/pub/CPAN/
     1084(9) ftp://cpan.hostrack.net/pub/CPAN
     1085(10) ftp://cpan.llarian.net/pub/CPAN/
     1086(11) ftp://cpan.mirrors.redwire.net/pub/CPAN/
     1087(12) ftp://cpan.mirrors.tds.net/pub/CPAN
     1088(13) ftp://cpan.netnitco.net/pub/mirrors/CPAN/
     1089(14) ftp://cpan.pair.com/pub/CPAN/
     1090(15) ftp://cpan.teleglobe.net/pub/CPAN
     1091(16) ftp://cpan.uchicago.edu/pub/CPAN/
     109240 more items, hit RETURN to show them
     1093Select as many URLs as you like (by number),
     1094put them on one line, separated by blanks, hyphenated ranges allowed
     1095 e.g. '1 4 5' or '7 1-4 8' [] 14 11 12
     1096
     1097Enter another URL or RETURN to quit: []
     1098New set of picks:
     1099  ftp://cpan.pair.com/pub/CPAN/
     1100  ftp://cpan.mirrors.redwire.net/pub/CPAN/
     1101  ftp://cpan.mirrors.tds.net/pub/CPAN
     1102
     1103
     1104Please remember to call 'o conf commit' to make the config permanent!
     1105
     1106
     1107cpan shell -- CPAN exploration and modules installation (v1.8802)
     1108ReadLine support enabled
     1109
     1110 cpan[1]> o conf commit
     1111commit: wrote '/home/moanui/jhoblitt/.cpan/CPAN/MyConfig.pm'
     1112\end{verbatim}
     1113
     1114%$ --- Emacs needs this to balance the previous dollar sign
     1115
     1116Now we need to install the module that installs the other modules.
     1117
     1118\begin{verbatim}
     1119cpan> install Module::Build
     1120\end{verbatim}
     1121
     1122Exit out of cpan:
     1123
     1124\begin{verbatim}
     1125cpan> exit
     1126\end{verbatim}
     1127
     1128In order to use of the installed modules, we need to setup an
     1129environment variable called \code{PERL5LIB} so that 'perl' can find
     1130them.  To do this, we need to know where under 'perl5' our modules
     1131were actually installed.  This will set variable with the version of
     1132Perl that you are using.  The easiest way to do this is just just look
     1133in the root of the path where we did the install.
     1134
     1135\begin{verbatim}
     1136> ls local/lib/perl5/
     11375.8.8  site_perl
     1138\end{verbatim}
     1139
     1140That means we're using perl 5.8.8 and \code{PERL5LIB} needs to be
     1141setup as following:
     1142\begin{verbatim}
     1143export PERL5LIB=$HOME/local/lib/perl5/5.8.8:$HOME/local/lib/perl5/site_perl/5.8.8
     1144\end{verbatim}
     1145
     1146Now we should install the basic compliment of helper modules that
     1147\code{CPAN.pm} needs to function fully.  Go back into CPAN (\code{perl
     1148-MCPAN -e shell}) and:
     1149
     1150\begin{verbatim}
     1151cpan> install Bundle::CPAN
     1152\end{verbatim}
     1153
     1154You can quit out of the CPAN shell at this point with the `exit`
     1155command or do the following few steps in another shell We're ready to
     1156install the full set Perl module dependencies for IPP software.  In
     1157order to make this process a bit easier on the end user a "Bundle"
     1158module has been created.  In order to use it you need to create a
     1159directory (if it doesn't already exist) called Bundle under your .cpan
     1160directory.
     1161
     1162\begin{verbatim}
     1163> mkdir -p .cpan/Bundle
     1164\end{verbatim}
     1165
     1166The file \code{PS.pm} should copied into this directory:
     1167
     1168\begin{verbatim}
     1169cp /path/to/PS.pm .cpan/Bundle/
     1170\end{verbatim}
     1171
     1172Back in the CPAN shell, 'force' the install of the PS Bundle.  The
     1173'force' keyword instructs the shell to ignore any tests failures.
     1174This is necessary as some of the modules 'DBD::mysql'/etc. require a
     1175properly working database setup in order for the tests to pass.  You
     1176will most likely be prompted for input by several the modules.  It is
     1177safe to answer with a carriage return to all questions.  If it insists
     1178on a path to \code{httpd}, hit \code{CTRL-C} and it will go on to the
     1179next step.
     1180
     1181\begin{verbatim}
     1182cpan> force install Bundle:PS
     1183\end{verbatim}
     1184
     1185For further instructions on installing Perl modules from CPAN ''by
     1186hand', see:
     1187\begin{verbatim}
     1188http://www.cs.ucsc.edu/~you/notes/perl-module-install.html
     1189\end{verbatim}
     1190
     1191%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     1192
     1193\subsubsection{Modules and scripts}
     1194
     1195Pan-STARRS Perl modules and scripts are installed by executing the
     1196following in the directory containing the source:
     1197\begin{verbatim}
     1198> perl Build.PL
     1199> ./Build
     1200> ./Build install --prefix=/path/to/install/
     1201\end{verbatim}
     1202
     1203Make sure you set your \code{PERL5LIB} environment variable to the
     1204installation path (here, \code{/path/to/install/}).
     1205
    1261206\section{System Requirements}
    1271207
     
    1501230binaries) and Perl module dependencies.
    1511231
    152 \subsubsection{Libraries}
     1232\subsubsubsection{Libraries}
    1531233
    1541234\begin{figure}
     
    1751255
    1761256
    177 \subsubsection{Perl modules}
     1257\subsubsubsection{Perl modules}
    1781258
    1791259\begin{figure}
     
    2471327\end{itemize}
    2481328
    249 
    250 \section{Installation}
    251 
    252 After the dependencies (\S\ref{sec:dependencies}) have been satisfied,
    253 the IPP packages should be installed in the following order:
    254 \begin{itemize}
    255 \item \code{Ohana}
    256 \item \code{psLib}
    257 \item \code{psModules}
    258 \item \code{psphot}
    259 \item \code{psastro}
    260 \item \code{ppStats}
    261 \item \code{ppImage}
    262 \item \code{ppMerge}
    263 \item \code{ppNorm}
    264 \item \code{pois}
    265 \item \code{stac}
    266 \item \code{pswarp}
    267 \item \code{ppStac}
    268 \item \code{ippdb}
    269 \item \code{ippTools}
    270 \item \code{PS-IPP-Metadata-Config}
    271 \item \code{PS-IPP-Metadata}
    272 \item \code{ippScripts}
    273 \item \code{ippTasks}
    274 \item \code{config}
    275 \end{itemize}
    276 
    2771329\subsection{Binaries}
    2781330
     
    2821334environment and installing the binaries to deal with this problem.  We
    2831335describe each of these below.  Choose one that works for you!
    284 
    285 \subsubsection{Aliases}
    286 
    287 PAP puts the following in his \code{~/.tcshrc}:
    288 \begin{verbatim}
    289 setenv SWDIR $HOME/local/`$HOME/bin/config.guess`/
    290 if (! -d $SWDIR) mkdir --parents $SWDIR
    291 alias ./autogen.sh './autogen.sh --prefix=$SWDIR CFLAGS="-I$SWDIR/include/ -g" LDFLAGS=-L$SWDIR/lib/'
    292 alias   autogen.sh './autogen.sh --prefix=$SWDIR CFLAGS="-I$SWDIR/include/ -g" LDFLAGS=-L$SWDIR/lib/'
    293 alias ./configure  './configure  --prefix=$SWDIR CFLAGS="-I$SWDIR/include/ -g" LDFLAGS=-L$SWDIR/lib/'
    294 alias   configure  './configure  --prefix=$SWDIR CFLAGS="-I$SWDIR/include/ -g" LDFLAGS=-L$SWDIR/lib/'
    295 setenv PATH ${PATH}:$SWDIR/bin/
    296 setenv LD_LIBRARY_PATH $SWDIR/lib/:$SWDIR/lib/mysql:$LD_LIBRARY_PATH
    297 setenv MANPATH $SWDIR/man:$MANPATH
    298 setenv PKG_CONFIG_PATH $SWDIR/lib/pkgconfig/:$PKG_CONFIG_PATH
    299 \end{verbatim}
    300 
    301 %$ --- Emacs needs this to balance out the dollar signs
    302 
    303 Here, \code{config.guess} is the common GNU script for guessing the
    304 build system triplet (e.g., \code{i686-pc-linux-gnu}).
    305 
    306 There are a couple of notes:
    307 \begin{itemize}
    308 \item To compile a binary, simply do \code{./configure}, then
    309   \code{make && make install}.
    310 \item \code{Ohana} doesn't like this setup, so you need to build it
    311   with: \code{\./configure --prefix=$SWDIR}
    312 \item Perl modules can be installed: \code{./Build install
    313   --prefix=$SWDIR}.
    314 \end{itemize}
    315 
    316 \subsubsection{psconfig}
    317 
    318 * pscheckperl : search for and install, if needed, external Perl modules
    319 * pschecklibs : search for and install, if needed, external C libraries
    320 * psconfig : set up the UNIX shell environment
    321 * psbuild : build and install the software
    322 * psdist : build IPP distributions (requires CVS access)
    323 * tagsets : tables defining the C and Perl components to be built
    324 
    325 The IPP is a large and complex software system.  A major goal of the
    326 IPP build system is to be user-friendly for those end users which do
    327 not have root access on their machines.  Using the IPP build tools, it
    328 is possible to install the complete system as a non-priviledged user.
    329 The build system also makes it possible to maintain multiple
    330 simultaneous installations with different versions of the
    331 software. This latter feature is particularly important for developers
    332 who need to be able to make tests and comparisons of different
    333 versions.
    334 
    335 \subsubsubsection{UNIX environment}
    336 
    337 With the psconfig system, the complete collection of libraries and
    338 
    339 When building software
    340 
    341 \subsubsection{jhbuild}
    342 
    343 JH uses \code{jhbuild} even though the 'jh' in \code{jhbuild} doesn't
    344 really refer to him.
    345 
    346 \subsubsubsection{What is it?}
    347 
    348 According to the introduction on the \code{jhbuild} website:
    349 
    350 \begin{quote}
    351 \code{jhbuild} is a program that can be used to pull a number of
    352 modules from CVS and build them in the correct order. Unlike some
    353 build scripts, \code{jhbuild} lets you specify what modules you want
    354 built and it will then go and build those modules plus dependencies.
    355 
    356 Although \code{jhbuild} was originally developed to build
    357 \code{[WWW]Gnome}, it is now able to build a number of the modules in
    358 \code{freedesktop.org} CVS. Extending it to handle new modules is
    359 usually trivial (assuming the build infrastructure matches the other
    360 modules it handles).
    361 \end{quote}
    362 
    363 In additional to retrieving source code from various SCM's (CVS, SVN,
    364 arch, etc.), jhbuild has the ability to download tarballs via HTTP or
    365 FTP.
    366 
    367 \code{jhbuild} has been adopted as an official \code{freedesktop.org}
    368 project. You can find more information on the project's homepage
    369 (\code{http://www.freedesktop.org/Software/jhbuild}). Bugs can be
    370 filed in the Gnome Bugzilla (\code{http://bugzilla.gnome.org}).
    371 
    372 \subsubsubsection{Where to get it}
    373 
    374 It was necessary to slightly modify \code{jhbuild} for use with IPP
    375 software. Therefore, you must checkout the \code{jhbuild} module from
    376 the Pan-STARRS CVS tree. Please see the Pan-STARRS CVS Guide for help
    377 on setting up and using CVS. \code{jhbuild} will need to be able to
    378 find it's own source tree even after installation so you should choose
    379 a checkout path that can be permanent. Something along the lines of
    380 \code{$HOME/src} is recommended.
    381 
    382 \begin{verbatim}
    383 cd
    384 mkdir -p src
    385 cd src
    386 cvs co jhbuild
    387 \end{verbatim}
    388 
    389 After running CVS you should see something like this:
    390 
    391 \begin{verbatim}
    392 $ cvs co jhbuild
    393 cvs checkout: Updating jhbuild
    394 U jhbuild/.cvsignore
    395 U jhbuild/COPYING
    396 U jhbuild/ChangeLog
    397 U jhbuild/HACKING
    398 U jhbuild/Makefile
    399 U jhbuild/README
    400 U jhbuild/install-check.c
    401 .
    402 .
    403 \end{verbatim}
    404 
    405 \subsubsubsection{Installing jhbuild into your home directory}
    406 
    407 \code{jhbuild} should be installed locally under your home
    408 directory. This will require that you modify the \code{PATH}
    409 environment variable so that you can run jhbuild after it has been
    410 installed.
    411 
    412 \begin{verbatim}
    413 cd jhbuild
    414 make
    415 make install
    416 \end{verbatim}
    417 
    418 Which should look something like this:
    419 
    420 \begin{verbatim}
    421 $ make
    422 gcc -Wall -O2 -o install-check install-check.c
    423 Run "make install" to install.
    424 $ make install
    425 Creating /home/moanui/jhoblitt/bin/jhbuild
    426 Creating /home/moanui/jhoblitt/.gnome2/vfolders/applications/jhbuild.desktop
    427 install -m755 install-check /home/moanui/jhoblitt/bin/install-check
    428 install -m755 config.guess /home/moanui/jhoblitt/bin/config.guess
    429 \end{verbatim}
    430 
    431 That will install the \code{jhbuild} executable under
    432 \code{$HOME/bin}. You are responsible for including this path in your
    433 \code{PATH} environment variable. It is highly recommended that you
    434 add this to your \code{.bashrc} or equivalent shell login script.
    435 
    436 For the \code{bash} shell, place this line in your \code{.bashrc}:
    437 \begin{verbatim}
    438 export PATH=${HOME}/bin:${PATH}
    439 \end{verbatim}
    440 For the \code{tcsh} shell, place this line in your \code{.tschrc}:
    441 \begin{verbatim}
    442 setenv PATH ${HOME}/bin:${PATH}
    443 \end{verbatim}
    444 
    445 \subsubsubsection{Configuring jhbuild}
    446 
    447 \code{jhbuild} is configured via an rc file that lives at
    448 \code{${HOME}/.jhbuildrc}. Please note that this rc file is executed
    449 as Python code; be careful!
    450 
    451 Example \code{.jhbuildrc}, suitable for cut and paste:
    452 
    453 \begin{verbatim}
    454 # what profile to build?
    455 moduleset = 'http://pan-starrs.ifa.hawaii.edu/project/IPP/software/modulesets/ipp12.modules'
    456 
    457 # modules to build by default
    458 modules = [ 'pslib', 'psmodules' ]
    459 
    460 # where should working copies go?
    461 jhroot = os.environ['HOME'] + '/jhroot'
    462 
    463 # where should tarballs be kept?
    464 tarballdir = jhroot + '/src'
    465 
    466 # in what prefix should things be installed? (must be writable)
    467 target = os.popen('config.guess').read().rstrip()
    468 prefix = jhroot + '/' + target
    469 checkoutroot = prefix + '/build'
    470 
    471 # extra arguments to pass to the autogen.sh script?
    472 autogenargs = '--enable-maintainer-mode --disable-static'
    473 
    474 # use an alternative install program that preserves the
    475 # mtime on header files if they haven't changed.  Speeds
    476 # up rebuilds.
    477 os.environ['INSTALL'] = os.environ['HOME'] + '/bin/install-check'
    478 
    479 # don't try to use /usr/ucb/cc on Solaris
    480 import sys
    481 if sys.platform == 'sunos5':
    482     os.environ['CC'] = 'gcc'
    483 \end{verbatim}
    484 
    485 \subsubsubsection{Running jhbuild}
    486 
    487 \code{Jhbuild} can be executed as \code{jhbuild build
    488 [modulename]}. Just \code{jhbuild} will build the packages specified
    489 in the \code{modules} variable from your rc file.
    490 \begin{verbatim}
    491 jhbuild
    492 \end{verbatim}
    493 or
    494 \begin{verbatim}
    495 jhbuild build pslib
    496 \end{verbatim}
    497 
    498 Run \code{jhbuild} list to get a list of the packages \code{jhbuild}
    499 knows how to build.
    500 
    501 \begin{verbatim}
    502 $ jhbuild list
    503 cfitsio
    504 gsl
    505 fftw
    506 libxml2
    507 mysql
    508 pslib
    509 psmodules
    510 \end{verbatim}
    511 
    512 \code{jhbuild} supports many other commands. Please see \code{jhbuild
    513 --help} for a complete list of options.
    514 
    515 \begin{verbatim}
    516 $ jhbuild --help
    517 usage: jhbuild [ -f config ] command [ options ... ]
    518 Build a set of CVS modules (such as GNOME).
    519 
    520 Global options:
    521   -f, --file=CONFIG            use a non default configuration file
    522   -m, --moduleset=URI          use a non default module set
    523       --no-interact            do not prompt for input
    524 
    525 Commands:
    526   gui                          build targets from a gui app
    527   update                       update from cvs
    528   updateone modules            update a fixed set of modules
    529   build [ opts... ] [modules]  update and compile (the default)
    530   buildone [ opts... ] modules build a single module
    531   tinderbox [ opts... ]        build non-interactively with logging
    532   run program [ args... ]      run a command in the build environment
    533   shell                        start a shell in the build environment
    534   sanitycheck                  check that required support tools exists
    535   bootstrap                    build required support tools
    536   list [ opts ... ] [modules]  list what modules would be built
    537   dot [ modules ]              output a dot file of dependencies suitable
    538                                for processing with graphviz
    539   info modules...              prints information about modules
    540 
    541 Options valid for the build, buildone, tinderbox and update commands:
    542   -s, --skip=MODULES           treat the given modules as up to date
    543   -t, --start-at=MODULE        start building at the given module
    544   -D date_spec                 set a sticky date when checking out modules
    545 
    546 Options valid for the build, buildone and tinderbox commands:
    547   -a, --autogen                always run autogen.sh
    548   -c, --clean                  run make clean before make
    549   -n, --no-network             skip cvs update
    550 
    551 Options valid for the tinderbox command:
    552   -o, --output=DIR             directory to save build logs in
    553 
    554 Options valid for the list command:
    555   -r, --show-revision          show which revision will be built
    556 \end{verbatim}
    557 
    558 \subsubsubsection{Dependancies}
    559 
    560 \code{jhbuild} has a fairly minimal set of dependencies --- far less
    561 than what may be required to actually compile and install any
    562 packages. However, if your system can meet the base requirements,
    563 \code{jhbuild} should be able to bootstrap your build environment.
    564 \begin{itemize}
    565 \item A working C compiler (eg. \code{gcc})
    566 \item A working \code{libc} (eg. \code{glibc})
    567 \item Perl 5 with the \code{XML::Parser} module (needed by
    568   \code{libtool})
    569 \item Python 2.?
    570 \item Either \code{wget} or \code{curl}
    571 \item GNU \code{M4} 1.4
    572 \item \code{tar}
    573 \item \code{gzip}
    574 \item \code{bzip2}
    575 \end{itemize}
    576 
    577 \subsubsubsection{Bootstrapping}
    578 
    579 \code{jhbuild} has a limited ability to install some of the necessary
    580 tools for maintaining software that configure its build environment
    581 with the GNU autotools.
    582 
    583 This step is probably required on OSX and Solaris. Your mileage will
    584 vary per Linux distribution but you can probably skip this step if
    585 your distribution is around RedHat 9 vintage or newer.
    586 
    587 \begin{verbatim}
    588 jhbuild bootstrap
    589 \end{verbatim}
    590 
    591 \code{jhbuild} will then will begin to build a series of packages.
    592 
    593 \subsubsubsection{Using the jhbuild enviroment}
    594 
    595 As you've already seen, \code{jhbuild} is capable of setting up an
    596 independent build environment under the (configurable) directory of
    597 your choice. In order to link non-\code{jhbuild} management software
    598 against this build environment a number of your shell's environment
    599 variable have to be modified. \code{jhbuild} is capable of doing this
    600 for you. The syntax for this is \code{jhbuild shell}, which as the
    601 syntax implies, spawns a new shell with the proper environment
    602 variables.
    603 
    604 This example demonstrates \code{jhbuild} setting up the dynamic
    605 linkers default search path for you.
    606 
    607 \begin{verbatim}
    608 $ echo $LD_LIBRARY_PATH
    609 
    610 $ jhbuild shell
    611 $ echo $LD_LIBRARY_PATH
    612 /home/moanui/jhoblitt/jhroot/i686-pc-linux-gnu/lib
    613 \end{verbatim}
    614 
    615 %$ --- Emacs needs this to balance out the dollar signs
    616 
    617 A fair number of other variables are also adjusted for you. Enough so
    618 that most (all?) \code{autoconf} configured software will be able to
    619 find it's dependencies.
    620 
    621 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    622 
    623 \subsection{Perl}
    624 
    625 Here we describe setting up the Perl dependencies followed by the
    626 IPP components.
    627 
    628 \subsubsection{Dependencies}
    629 \label{sec:installing-perl-dependencies}
    630 
    631 If you have access to the \code{root} account, installation as
    632 \code{root} is much easier.  If not, you will have to go through
    633 the more flaky installation as an unprivileged user.
    634 
    635 \subsubsubsection{Installation as root}
    636 
    637 Many of the Perl dependencies are available from the Comprehensive
    638 Perl Archive Network (CPAN) at www.cpan.org.  If you have root access
    639 on your target machines, they can be very simply retrieved, built and
    640 installed (replacing \code{MODULE_NAME} for each module):
    641 
    642 \begin{verbatim}
    643 > su -
    644 Password:
    645 > cpan
    646 [...]
    647 cpan> install MODULE_NAME
    648 [...]
    649 cpan> quit
    650 \end{verbatim}
    651 
    652 Follow the prompts.  It's usually safe to accept the default (simply
    653 hit enter) in response to most questions.
    654 
    655 If you get into trouble, try: \code{force install MODULE_NAME}.
    656 
    657 You can also try to use the \code{Bundle::PS} as described below if
    658 you're feeling adventurous.
    659 
    660 \subsubsubsection{Installation as unprivileged user}
    661 
    662 To install modules from CPAN with the \code{CPAN.pm} interface, you
    663 need to setup a CPAN configuration file in your home directory.  Then
    664 \code{CPAN.pm} can walk you through setting up the most important
    665 configuration values.  Unfortunately, there is some variation in the
    666 behavior of the various versions of \code{CPAN.pm} that have shipped
    667 with Perl.  Some (most) of these variants will not correctly create a
    668 configuration files that allows a non-\code{root} user to install
    669 modules outside of "system" paths.  In order to make sure that you get
    670 a "correct" CPAN configuration file you need to ``prime'' it with a
    671 few values.
    672 
    673 First you need to create the directory in which the CPAN configuration file will live.
    674 \begin{verbatim}
    675 > mkdir -p .cpan/CPAN/
    676 \end{verbatim}
    677 
    678 Then we need to create a partial configuration file.  Note that this example
    679 assumes that you want to install your perl modules under
    680 \code{$HOME/local/lib/perl5}.
    681 
    682 \begin{verbatim}
    683 > echo "\$CPAN::Config = {" >> .cpan/CPAN/MyConfig.pm
    684 > echo "  makepl_arg => q[PREFIX=$HOME/local/]," >> .cpan/CPAN/MyConfig.pm
    685 > echo "  mbuildpl_arg => q[--install_base $HOME/local/]," >> .cpan/CPAN/MyConfig.pm
    686 > echo "};" >> .cpan/CPAN/MyConfig.pm
    687 > echo "1;" >> .cpan/CPAN/MyConfig.pm
    688 > echo "__END__" >> .cpan/CPAN/MyConfig.pm
    689 \end{verbatim}
    690 
    691 %$ --- Emacs needs this to balance the previous dollar sign
    692 
    693 Now you need to invoke \code{CPAN.pm} so it can walk you through
    694 configuring the rest of the required values.  This is an example of
    695 one possible configuration with \code{CPAN.pm} version 1.8802.
    696 \textbf{Your version of CPAN.pm may present you with different
    697 prompts.}  Use your common sense.  If in doubt, it is generally safe
    698 to simply hit enter (and accept the default).
    699 
    700 \begin{verbatim}
    701 > perl -MCPAN -e shell
    702 CPAN: File::HomeDir loaded ok
    703 Sorry, we have to rerun the configuration dialog for CPAN.pm due to
    704 the following indispensable but missing parameters:
    705 
    706 build_cache, build_dir, cache_metadata, cpan_home, ftp_proxy, http_proxy,
    707 index_expire, inhibit_startup_message, keep_source_where, make_arg,
    708 make_install_arg, mbuild_arg, mbuild_install_arg, mbuild_install_build_command,
    709 no_proxy, prerequisites_policy, scan_cache, urllist
    710 
    711 
    712 The following questions are intended to help you with the
    713 configuration. The CPAN module needs a directory of its own to cache
    714 important index files and maybe keep a temporary mirror of CPAN files.
    715 This may be a site-wide directory or a personal directory.
    716 
    717 
    718 
    719 I see you already have a  directory
    720     /home/moanui/jhoblitt/.cpan
    721 Shall we use it as the general CPAN build and cache directory?
    722 
    723 CPAN build and cache directory? [/home/moanui/jhoblitt/.cpan]
    724 
    725 
    726 Unless you are accessing the CPAN via the filesystem directly CPAN.pm
    727 needs to keep the source files it downloads somewhere. Please supply a
    728 directory where the downloaded files are to be kept. [/home/moanui/jhoblitt/.cpan/sources]
    729 Directory where the build process takes place? [/home/moanui/jhoblitt/.cpan/build]
    730 
    731 
    732 How big should the disk cache be for keeping the build directories
    733 with all the intermediate files?
    734 
    735 Cache size for build directory (in MB)? [100]
    736 
    737 
    738 The CPAN indexes are usually rebuilt once or twice per hour, but the
    739 typical CPAN mirror mirrors only once or twice per day. Depending on
    740 the quality of your mirror and your desire to be on the bleeding edge,
    741 you may want to set the following value to more or less than one day
    742 (which is the default). It determines after how many days CPAN.pm
    743 downloads new indexes.
    744 
    745 Let the index expire after how many days? [1]
    746 
    747 
    748 By default, each time the CPAN module is started, cache scanning is
    749 performed to keep the cache size in sync. To prevent this, answer
    750 'never'.
    751 
    752 Perform cache scanning (atstart or never)? [atstart]
    753 
    754 
    755 To considerably speed up the initial CPAN shell startup, it is
    756 possible to use Storable to create a cache of metadata. If Storable
    757 is not available, the normal index mechanism will be used.
    758 
    759 Cache metadata (yes/no)? [yes]
    760 
    761 
    762 The CPAN module can detect when a module which you are trying to build
    763 depends on prerequisites. If this happens, it can build the
    764 prerequisites for you automatically ('follow'), ask you for
    765 confirmation ('ask'), or just ignore them ('ignore'). Please set your
    766 policy to one of the three values.
    767 
    768 Policy on building prerequisites (follow, ask or ignore)? [ask] follow
    769 
    770 
    771 Every Makefile.PL is run by perl in a separate process. Likewise we
    772 run 'make' and 'make install' in separate processes. If you have
    773 any parameters (e.g. PREFIX, LIB, UNINST or the like) you want to
    774 pass to the calls, please specify them here.
    775 
    776 If you don't understand this question, just press ENTER.
    777 Parameters for the 'make' command?
    778 Typical frequently used setting:
    779 
    780     -j3              # dual processor system
    781 
    782 Your choice:  []
    783 Parameters for the 'make install' command?
    784 Typical frequently used setting:
    785 
    786     UNINST=1         # to always uninstall potentially conflicting files
    787 
    788 Your choice:  [] UNINST=1
    789 
    790 
    791 The next questions deal with Module::Build support.
    792 
    793 A Build.PL is run by perl in a separate process. Likewise we run
    794 './Build' and './Build install' in separate processes. If you have any
    795 parameters you want to pass to the calls, please specify them here.
    796 
    797 Parameters for the './Build' command?
    798 Setting might be:
    799 
    800     --extra_linker_flags -L/usr/foo/lib  # non-standard library location
    801 
    802 Your choice:  []
    803 Do you want to use a different command for './Build install'?
    804 Sudo users will probably prefer:
    805 
    806     su root -c ./Build
    807 or
    808     sudo ./Build
    809 or
    810     /path1/to/sudo -u admin_account ./Build
    811 
    812 or some such. Your choice:  [./Build]
    813 Parameters for the './Build install' command?
    814 Typical frequently used setting:
    815 
    816     --uninst 1                           # uninstall conflicting files
    817 
    818 Your choice:  [] --uninst 1
    819 
    820 
    821 If you're accessing the net via proxies, you can specify them in the
    822 CPAN configuration or via environment variables. The variable in
    823 the $CPAN::Config takes precedence.
    824 
    825 Your ftp_proxy? []
    826 Your http_proxy? []
    827 Your no_proxy? []
    828 You have no /home/moanui/jhoblitt/.cpan/sources/MIRRORED.BY
    829   I'm trying to fetch one
    830 CPAN: LWP::UserAgent loaded ok
    831 Fetching with LWP:
    832   http://www.perl.org/CPAN/MIRRORED.BY
    833 
    834 
    835 Now we need to know where your favorite CPAN sites are located. Push
    836 a few sites onto the array (just in case the first on the array won't
    837 work). If you are mirroring CPAN to your local workstation, specify a
    838 file: URL.
    839 
    840 First, pick a nearby continent and country by typing in the number(s)
    841 in front of the item(s) you want to select. You can pick several of
    842 each, separated by spaces. Then, you will be presented with a list of
    843 URLs of CPAN mirrors in the countries you selected, along with
    844 previously selected URLs. Select some of those URLs, or just keep the
    845 old list. Finally, you will be prompted for any extra URLs -- file:,
    846 ftp:, or http: -- that host a CPAN mirror.
    847 
    848 (1) Africa
    849 (2) Asia
    850 (3) Central America
    851 (4) Europe
    852 (5) North America
    853 (6) Oceania
    854 (7) South America
    855 Select your continent (or several nearby continents) [] 5
    856 
    857 (1) Bahamas
    858 (2) Canada
    859 (3) Mexico
    860 (4) United States
    861 Select your country (or several nearby countries) [] 4
    862 
    863 (1) ftp://carroll.cac.psu.edu/pub/CPAN/
    864 (2) ftp://cpan-du.viaverio.com/pub/CPAN/
    865 (3) ftp://cpan-sj.viaverio.com/pub/CPAN/
    866 (4) ftp://cpan.calvin.edu/pub/CPAN
    867 (5) ftp://cpan.cs.utah.edu/pub/CPAN/
    868 (6) ftp://cpan.cse.msu.edu/
    869 (7) ftp://cpan.erlbaum.net/CPAN/
    870 (8) ftp://cpan.glines.org/pub/CPAN/
    871 (9) ftp://cpan.hostrack.net/pub/CPAN
    872 (10) ftp://cpan.llarian.net/pub/CPAN/
    873 (11) ftp://cpan.mirrors.redwire.net/pub/CPAN/
    874 (12) ftp://cpan.mirrors.tds.net/pub/CPAN
    875 (13) ftp://cpan.netnitco.net/pub/mirrors/CPAN/
    876 (14) ftp://cpan.pair.com/pub/CPAN/
    877 (15) ftp://cpan.teleglobe.net/pub/CPAN
    878 (16) ftp://cpan.uchicago.edu/pub/CPAN/
    879 40 more items, hit RETURN to show them
    880 Select as many URLs as you like (by number),
    881 put them on one line, separated by blanks, hyphenated ranges allowed
    882  e.g. '1 4 5' or '7 1-4 8' [] 14 11 12
    883 
    884 Enter another URL or RETURN to quit: []
    885 New set of picks:
    886   ftp://cpan.pair.com/pub/CPAN/
    887   ftp://cpan.mirrors.redwire.net/pub/CPAN/
    888   ftp://cpan.mirrors.tds.net/pub/CPAN
    889 
    890 
    891 Please remember to call 'o conf commit' to make the config permanent!
    892 
    893 
    894 cpan shell -- CPAN exploration and modules installation (v1.8802)
    895 ReadLine support enabled
    896 
    897  cpan[1]> o conf commit
    898 commit: wrote '/home/moanui/jhoblitt/.cpan/CPAN/MyConfig.pm'
    899 \end{verbatim}
    900 
    901 %$ --- Emacs needs this to balance the previous dollar sign
    902 
    903 Now we need to install the module that installs the other modules.
    904 
    905 \begin{verbatim}
    906 cpan> install Module::Build
    907 \end{verbatim}
    908 
    909 Exit out of cpan:
    910 
    911 \begin{verbatim}
    912 cpan> exit
    913 \end{verbatim}
    914 
    915 In order to use of the installed modules, we need to setup an
    916 environment variable called \code{PERL5LIB} so that 'perl' can find
    917 them.  To do this, we need to know where under 'perl5' our modules
    918 were actually installed.  This will set variable with the version of
    919 Perl that you are using.  The easiest way to do this is just just look
    920 in the root of the path where we did the install.
    921 
    922 \begin{verbatim}
    923 > ls local/lib/perl5/
    924 5.8.8  site_perl
    925 \end{verbatim}
    926 
    927 That means we're using perl 5.8.8 and \code{PERL5LIB} needs to be
    928 setup as following:
    929 \begin{verbatim}
    930 export PERL5LIB=$HOME/local/lib/perl5/5.8.8:$HOME/local/lib/perl5/site_perl/5.8.8
    931 \end{verbatim}
    932 
    933 Now we should install the basic compliment of helper modules that
    934 \code{CPAN.pm} needs to function fully.  Go back into CPAN (\code{perl
    935 -MCPAN -e shell}) and:
    936 
    937 \begin{verbatim}
    938 cpan> install Bundle::CPAN
    939 \end{verbatim}
    940 
    941 You can quit out of the CPAN shell at this point with the `exit`
    942 command or do the following few steps in another shell We're ready to
    943 install the full set Perl module dependencies for IPP software.  In
    944 order to make this process a bit easier on the end user a "Bundle"
    945 module has been created.  In order to use it you need to create a
    946 directory (if it doesn't already exist) called Bundle under your .cpan
    947 directory.
    948 
    949 \begin{verbatim}
    950 > mkdir -p .cpan/Bundle
    951 \end{verbatim}
    952 
    953 The file \code{PS.pm} should copied into this directory:
    954 
    955 \begin{verbatim}
    956 cp /path/to/PS.pm .cpan/Bundle/
    957 \end{verbatim}
    958 
    959 Back in the CPAN shell, 'force' the install of the PS Bundle.  The
    960 'force' keyword instructs the shell to ignore any tests failures.
    961 This is necessary as some of the modules 'DBD::mysql'/etc. require a
    962 properly working database setup in order for the tests to pass.  You
    963 will most likely be prompted for input by several the modules.  It is
    964 safe to answer with a carriage return to all questions.  If it insists
    965 on a path to \code{httpd}, hit \code{CTRL-C} and it will go on to the
    966 next step.
    967 
    968 \begin{verbatim}
    969 cpan> force install Bundle:PS
    970 \end{verbatim}
    971 
    972 For further instructions on installing Perl modules from CPAN ''by
    973 hand', see:
    974 \begin{verbatim}
    975 http://www.cs.ucsc.edu/~you/notes/perl-module-install.html
    976 \end{verbatim}
    977 
    978 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    979 
    980 \subsubsection{Modules and scripts}
    981 
    982 Pan-STARRS Perl modules and scripts are installed by executing the
    983 following in the directory containing the source:
    984 \begin{verbatim}
    985 > perl Build.PL
    986 > ./Build
    987 > ./Build install --prefix=/path/to/install/
    988 \end{verbatim}
    989 
    990 Make sure you set your \code{PERL5LIB} environment variable to the
    991 installation path (here, \code{/path/to/install/}).
    992 
    993 \section{Configuration}
    994 
    995 Correct use of the IPP depends on several configuration files.  We
    996 distinguish below between configuration files required for the image
    997 processing and those for running the process scheduler, PanTasks.
    998 Note, however, that the Perl scripts called by PanTasks to run the
    999 processing do use the site and camera configuration files principally
    1000 used for the image processing.
    1001 
    1002 \subsection{Image Processing}
    1003 
    1004 Configuration information for the image processing is provided on four
    1005 levels: the site, camera, format and recipe configurations.  Each uses
    1006 the ``MetaData Configuration'' (MDC) file format, which is briefly
    1007 described below; for a more detailed description, see the psLib SDRS
    1008 (PSDC-430-007).
    1009 
    1010 The configuration levels for the image processing components of the
    1011 IPP are:
    1012 \begin{itemize}
    1013 \item Options for the particular site installation of the
    1014   pipeline: the {\it site};
    1015 \item Options specifying the instrument setup: the {\it camera};
    1016 \item Options specifying the format of the FITS file: the {\it
    1017   format}; and
    1018 \item Options specifying the particular parameter choices that affect
    1019   the details of an analysis: the {\it recipe}.
    1020 \end{itemize}
    1021 Note that these are arranged in an hierarchical order, with the site
    1022 configuration being the most general, and the recipe configurations
    1023 the most specific.  For example, not all sites will have to deal with
    1024 all cameras, and different cameras may require different recipes at
    1025 different times according to their particular quirks, analysis
    1026 experimentations, or their evolution.
    1027 
    1028 We have provided examples of each of these configurations in the
    1029 \code{config} component of the IPP, which should be a useful guide for
    1030 setting up your own.  The Pan-STARRS IPP Configuration Guide
    1031 (PSDC-430-???) has all the detailed information.
    1032 
    1033 \subsubsection{Overview of MDC format}
    1034 
    1035 psLib defines a \code{psMetadata} structure which can carry labeled
    1036 data of arbitrary types.  Originally designed for carrying the data in
    1037 FITS headers, the \code{psMetadata} have proved so generally useful
    1038 that we use them for our configurations (and a multitude of other
    1039 uses!).  We have designed a human-readable text-based format --- the
    1040 ``MetaData Configuration'' (MDC) format --- which we use for this end.
    1041 
    1042 Each simple entry in an MDC file must contain the name, type and
    1043 value.  Each of these is on a single line, separated by whitespace,
    1044 and in that order.  Comments may be placed at the end of the line (or
    1045 on a blank line), after a hash mark (\code{#}).  Whitespace at the
    1046 beginning and end of strings (either the name, value or comment) are
    1047 stripped.
    1048 
    1049 The simple types follow the psLib types.  Integers are specified by a
    1050 letter indicating if the integer is signed (\code{S}) or unsigned
    1051 (\code{U}) and a number indicating the dynamic range in bits (8, 16,
    1052 32 or 64); e.g., \code{U8} is commonly used for bit mask values,
    1053 \code{S32} is commonly used for ordinary integer values.  Floating
    1054 point values are specified by the letter \code{F} and a number
    1055 indicating the precision in bits (32 or 64): \code{F32} (single
    1056 precision) or \code{F64} (double precision).  Strings are specified by
    1057 \code{STR}.  Times may be specified with the following types:
    1058 \code{UTC,UT1,TAI,TT}; values for the time are expected to be in
    1059 ISO8601 format (\code{YYYY-MM-DDTHH:MM:SS.sZ}).
    1060 
    1061 Names are traditionally all-caps, though there is no reason why they
    1062 must be; the names are case-sensitive.  A name may not be repeated
    1063 unless it has previously been declared to be of type \code{MULTI} (no
    1064 value should be provided with this declaration):
    1065 \begin{verbatim}
    1066 COMMENT    MULTI
    1067 COMMENT    STR    Having more than one COMMENT like this
    1068 COMMENT    STR    is permitted because of the MULTI.
    1069 \end{verbatim}
    1070 
    1071 A hierarchy can be made using the \code{METADATA} type, which signals
    1072 a new level:
    1073 \begin{verbatim}
    1074 JANITOR    METADATA
    1075     NAME          STR    John Doe
    1076     PAY           F32    1234.56
    1077     ECCENTRICITY  STR    9.87
    1078 END
    1079 \end{verbatim}
    1080 Note that a \code{METADATA} block is closed by an \code{END}.  No
    1081 identing need be done within a \code{METADATA} block, but it is useful
    1082 to be able to see the levels at a glance (just like in a C program).
    1083 \code{METADATA} blocks may be nested within \code{METADATA} blocks,
    1084 probably down as far as you have the patience to try.  Note that
    1085 \code{MULTI} declarations only apply to the current level --- there is
    1086 no inheritance.
    1087 
    1088 The above format can be long if there are many \code{METADATA}s with
    1089 similar contents.  For this reason, we provide the \code{TYPE}
    1090 declaration, which generates a \code{METADATA} with the contents each
    1091 of type \code{STR}:
    1092 \begin{verbatim}
    1093 TYPE          EMPLOYEE    NAME       PAY        ECCENTRICITY
    1094 \end{verbatim}
    1095 Now, the type \code{EMPLOYEE} may be used, with string values (NB: no
    1096 spaces allowed!) to specify multiple entries:
    1097 \begin{verbatim}
    1098 JANITOR       EMPLOYEE    JohnDoe    1234.56    9.87
    1099 PROGRAMMER    EMPLOYEE    FooBar     2345.67    1.00
    1100 \end{verbatim}
    1101 This is the same as the much longer block:
    1102 \begin{verbatim}
    1103 JANITOR       METADATA
    1104     NAME            STR     JohnDoe
    1105     PAY             STR     1234.56
    1106     ECCENTRICITY    STR     9.87
    1107 END
    1108 PROGRAMMER    METADATA
    1109     NAME            STR     FooBar
    1110     PAY             STR     2345.67
    1111     ECCENTRICITY    STR     1.00
    1112 END
    1113 \end{verbatim}
    1114 Like the \code{MULTI}, \code{TYPE} declarations only apply to the
    1115 current level.
    1116 
    1117 
    1118 \subsubsection{Setting up configuration files}
    1119 
    1120 You will generally want to link \code{~/.ipprc} to the site
    1121 configuration file (\code{ipprc.config} which gets installed in
    1122 \code{PREFIX/share/ippconfig/} where \code{PREFIX} is your
    1123 installation prefix).  Then link \code{~/.ipp} to the \code{ippconfig}
    1124 directory to save hacking the \code{PATH} in the site configuration.
    1125 
    1126 \subsection{PanTasks}
    1127 
    1128 \subsubsection{Paths}
    1129 
    1130 Throughout PanTasks, a file may be referred to as:
    1131 \begin{itemize}
    1132 \item \code{/path/to/file.ext} --- not a URI, but it should work.
    1133 \item \code{file:///path/to/file.ext} --- the URI version of the above.
    1134 \item \code{path://PATH/file.ext} --- Uses the \code{DATAPATH} in the site configuration to set the path.
    1135 \end{itemize}
    1136 
    1137 \section{Subsystem specifics}
    1138 
    1139 \tbd{Need to document command-line arguments, perhaps even
    1140 algorithms.}
    1141 
    1142 \subsection{psLib}
    1143 \subsection{psModules}
    1144 \subsection{psphot}
    1145 \subsection{psastro}
    1146 \subsection{ppStats}
    1147 \subsection{ppImage}
    1148 \subsection{ppMerge}
    1149 \subsection{ppNorm}
    1150 \subsection{ippdb}
    1151 \subsection{ippTools}
    1152 \subsection{ippScripts}
    1153 \subsection{ippTasks and panTasks}
    1154 \subsection{ippMonitor}
    1155 
    11561336
    11571337\section{Trouble Shooting Build Issues}
Note: See TracChangeset for help on using the changeset viewer.