aboutsummaryrefslogtreecommitdiff
path: root/extern
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /extern
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'extern')
-rw-r--r--extern/.zzexport1
-rw-r--r--extern/.zzsetenv.def6
-rw-r--r--extern/README183
-rwxr-xr-xextern/configure142
4 files changed, 332 insertions, 0 deletions
diff --git a/extern/.zzexport b/extern/.zzexport
new file mode 100644
index 00000000..d009375e
--- /dev/null
+++ b/extern/.zzexport
@@ -0,0 +1 @@
+ .def=
diff --git a/extern/.zzsetenv.def b/extern/.zzsetenv.def
new file mode 100644
index 00000000..f75e803f
--- /dev/null
+++ b/extern/.zzsetenv.def
@@ -0,0 +1,6 @@
+refitsutil =/iraf/iraf/extern/fitsutil/
+remscred =/iraf/iraf/extern/mscred/
+renfextern =/iraf/iraf/extern/nfextern/
+restsdas =/iraf/iraf/extern/stsdas/
+retables =/iraf/iraf/extern/tables/
+keep
diff --git a/extern/README b/extern/README
new file mode 100644
index 00000000..2c27aabc
--- /dev/null
+++ b/extern/README
@@ -0,0 +1,183 @@
+
+ Dynamic External Package Loading
+
+ November 2, 2010
+
+
+ Dynamic package loading is a new feature in v2.15 that allows for
+package directories created in the iraf$extern directory to be automatically
+defined when the CL is started. The means that external package installation
+no longer *requires* that the hlib$extern.pkg file be edited to define the
+package, although that remains an option for packages which somehow cannot
+conform to this new scheme.
+
+
+
+Getting Started
+---------------
+
+ The IRAF v2.15 system is shipped with no defined external packages,
+instead we assume packages will be installed using this new feature. To
+begin, simply execute the 'configure' script in this directory to create
+the files needed. For example,
+
+ % ./configure
+
+This will create a local 'manifest' file of packages available form
+the IRAF reposistory and iraf.noao.edu and skeleton directories of
+available packages will be created automatically along with a Makefile
+used to do the actual installation. THIS STEP IS REQUIRED BEFORE PACKAGE
+INSTALLATION!
+
+ To get a listing of packages that can be installed, or to check
+which installed packages might need to be updated or are newly available,
+use the command:
+
+ % make check
+
+Each listed package may then be installed using a simple 'make' command.
+For packages not on the list, a manual install is still required.
+
+ The external package tree may be initialize to the distribution state
+using the command:
+
+ % make init
+
+Updates to the distribution mechanism itself is done using the command:
+
+ % make self_update
+
+This last command is used to update the system to new features or bug fixes
+that might be available as the mechanism evolves.
+
+
+
+Installing and Updating Packages
+--------------------------------
+
+ External packages may now be installed with a command such as:
+
+ % make ctio mscred stsdas
+
+Note that dependency packages for each requested package will
+automatically be added to the installation so you do not need to
+necessarily list every package (e.g. you'll get FITSUTIL automatically
+by installing MSCRED). The next time you login to the CL the requested
+package will be defined.
+
+ To update packages to the latest version, use the command
+
+ % make update
+
+The information about available packages will be updated, then a
+comparison of the timestamps of your installed packages with those on
+the repository will be made. If newer package versions are available
+they will be updated (along with their depencies) automatically.
+
+ If a binary repository distribution of a package is not available
+at the moment, a 'source only' distribution will be installed and you will
+not a "[SOURCE ONLY]' status from the make command. The user is then
+responsible for compiling th epackages locally even though the package
+will still be defined for use (but unusable). Our goal is to provide a
+binary distribution for all available packages we can reasonably support.
+
+
+
+How it Works
+------------
+
+ This scheme relies on IRAF v2.15 changes to the CL login process to
+scan this directory for packages, as well as a server-side respository of
+distribution files suited for this method (see below). The 'configure'
+script customizes the package information for your platform and creates a
+'Makefile' based on that information. Subsequent commands update these
+files, however we don't yet provide an automated system for multi-platform
+support.
+
+ The bulk of the work is done using utility scripts found in the
+iraf@util directory and called from the makefile. The management of the
+repository files is the rsponsibility of the distribution maintainers
+(by default this is NOAO). Please contact us if you wish to have your
+package added to the system.
+
+
+
+Repositories
+------------
+
+ The default package repository is defined in the $iraf/util/pkgrepo
+script and may be changed to point to a local respository (e.g. a mirror
+site). It may also be changed by pointing the 'IRAF_REPO' environment
+variable to a new URI source, e.g.
+
+ setenv IRAF_REPO "ftp://localhost/myrepository"
+
+Of course, a network connection is assumed to exist in most cases. Local
+repositories may be preferred for faster local access via mirrors, please
+contact us for information on creating one.
+
+
+
+
+==================================
+Server-Side Repository Description
+==================================
+
+
+[The following comes from the README file on the repository]
+
+ This is the IRAF v2.15 distribution repository directory. Files
+ here are bundled so as to allow them to operate with the dynamic
+ package mechanism or IRAF install procedurs for v2.15. Aside from
+ the repository files themselves, this directory contains
+
+ README This file REPO.DESC A description of
+ each package MK Utility script to update repo
+ checksum/manifest
+
+ CHECKSUM Checksums files on repo tarballs created by MK
+ REPO.MANIFEST Manifest file
+
+ The MK script is used to generate the CHECKSUMS file and REPO.MANIFEST
+ file automatically, it should be run whenever a package is installed
+ or updated. The REPO.DESC file is a handcrafted description of the
+ available package, this is important to describing the dependencies
+ of each package. The MK script is also capable of determining
+ which of the available packages may be used on which platform.
+ For example, a "redhat" package will suffice for both a linux64
+ and linux IRAF system if there is no specific version available.
+ The manifest file created will then list the redhat version as the
+ file to be installed for the linux/linux64 platforms.
+
+ If a binary distribution for a particular package is not provided,
+ the MK script will default to use the source distribution tarball
+ (if available). On the receiving end the user will then have the
+ option of compiling the package locally. The reserved <arch> name
+ "universal" is used for script-only packages, or distributions
+ containing binaries for all supported platforms.
+
+ When packages are installed in the IRAF dynamic package tree,
+ both the REPO.MANIFEST and REPO.DESC files are downloaded. Scripts
+ use these files to build up package lists that are available for a
+ particular platform, as well as which packages are required to be
+ installed to support the requested package. We assume the REPO.DESC
+ file lists full dependencies, e.g. if A requires B, and B requires
+ C the the dependency list for A is both B and C.
+
+
+ The convention for file names is as follows:
+
+ <pkg>-<arch>.tar.gz
+
+ where <pkg> is the package name and <arch> is the iraf architecture.
+
+ For external packages, tarfiles are build at the toplevel, i.e.
+ when unpacked, a subdirectory of the package is created in th current
+ directory. For IRAF distributions we violate this rule and assume
+ the tarball is built from the $iraf root directory.
+
+ When installing a new package, the REPO.DESC file should be edited
+ and the MK script should be run.
+
+ When installing an update to an existing repo package, or a new
+ architecture version of a package, the MK script should be re-run.
diff --git a/extern/configure b/extern/configure
new file mode 100755
index 00000000..b2500125
--- /dev/null
+++ b/extern/configure
@@ -0,0 +1,142 @@
+#!/bin/bash
+#
+# CONFIGURE -- Bootstrap the dynamic external package system by downloading
+# the repository manifest and creating a workable Makefile to be used for
+# install packages and updates. This script only needs to be run once
+# after the system is installed, thereafter the 'make' commands are used.
+# See the README file for details.
+
+
+clean=1
+irafdir=`pwd`/../util
+
+
+# Process cmdline flags.
+while [ -n "$1" ]; do
+ case "$1" in
+ "-noclean") # clean all package sources
+ set clean = 0
+ ;;
+ *)
+ break
+ ;;
+ esac
+
+ shift
+done
+
+
+
+/bin/echo "Initializing repository data ...."
+$irafdir/pkginit # init repository information
+
+
+# Create the template Makefile.
+/bin/echo "Creating system makefile ...."
+cat << MAKE_TEMP_END > Makefile
+#
+# Makefile for IRAF external package installation/maintenance.
+#
+# ---------------------------------------------------------------------------
+
+# Compiler Flags.
+
+RELEASE = v2.16
+
+all:: update
+
+# Update recent changes from the repository.
+update::
+ @./configure -noclean
+ @../util/pkgupdate -all
+
+# Install all available packages for this platform.
+install_all::
+ @../util/pkgall
+
+# List packages available on the repository.
+list::
+ @cat .repo_pkgs
+
+# Clean the IRAF tree of binaries for the currently configured arch.
+init::
+ @../util/pkgclean -init
+
+# Remove all package code but leave the structure in place.
+clean::
+ @../util/pkgclean -all
+
+# Restore the dynamic package directory to its distribution state.
+distclean::
+ @../util/pkgclean -init
+
+# Check to see which installed packages could be updated.
+check::
+ @../util/pkgupdate -list
+
+# Update recent changes from the repository.
+self_update::
+ @../util/pkgupdate -self
+ @./configure -noclean
+
+# Update recent changes from the repository.
+config_update::
+ @../util/pkgupdate -config
+
+
+MAKE_TEMP_END
+
+echo "Setup Complete."
+
+
+
+# For each package we have, append a makefile entry.
+files=`cat .repo_pkgs`
+for p in ${files[@]}; do
+
+ # Create template makefile entries for each package
+ /bin/echo "${p}::" >> Makefile
+ /bin/echo " @../util/pkginst $p" >> Makefile
+ /bin/echo "clean_${p}::" >> Makefile
+ /bin/echo " @../util/pkgclean $p" >> Makefile
+ /bin/echo "update_${p}::" >> Makefile
+ /bin/echo " @../util/pkgupdate $p" >> Makefile
+ /bin/echo "" >> Makefile
+
+ # Create the directory
+ if [ -e "$p" ]; then
+ if (( $clean==1 )); then
+ /bin/rm -rf $p
+ fi
+ else
+ mkdir $p
+ fi
+done
+
+if (( $clean==0 )); then
+ exit 0
+fi
+
+
+/bin/echo ""
+/bin/echo ""
+/bin/echo " To install packages, use 'ls' to list the currently available"
+/bin/echo " packages from the IRAF repository. For each package you wish"
+/bin/echo " to install, use the command:"
+/bin/echo ""
+/bin/echo " make <pkg>"
+/bin/echo ""
+/bin/echo " The package will be loaded dynamically the next time you start"
+/bin/echo " the CL session."
+/bin/echo ""
+/bin/echo " Use the commmands:"
+/bin/echo ""
+/bin/echo " make update # to update pkgs to the latest repository version"
+/bin/echo " make check # to list available updates"
+/bin/echo " make clean # to delete installed all packages"
+/bin/echo " make init # restore to pre-configure state"
+/bin/echo " make <pkg> # to force a re-install of named <pkg>"
+/bin/echo ""
+/bin/echo ""
+
+exit 0