Skip to content
Snippets Groups Projects
Name Last commit Last update
basics
configs
example
scott
tools
.gitignore
README.md

INFRA

The generic packaging scripts are in a git repo, and can be obtained by...

git clone git@gitlab.ssec.wisc.edu:scottm/infra.git

creating the directory infra with the following directory structure...

infra
    ├── configs
    │       ├── adl_anc
    │       ├── GEOCAT
    │       ├── GVAR
    │       ├── HCAST
    │       ├── infra
    │       ├── SDR
    │       ├── make_geo.bash
    │       └── make_gvar.bash
    ├── example
    │       ├── config
    │       ├── data
    │       ├── devel
    │       ├── package
    │       ├── repo_code
    │       └── tar_scripts
    ├── tools
    │       ├── contents.py
    │       ├── find_vms.bash
    │       ├── prj-check-install.bash
    │       ├── prj-create.bash
    │       ├── prj-create.py
    │       ├── prj-repos.bash
    │       ├── prj-repos.py
    │       ├── prj-rpath.bash
    │       ├── prj-rpath.py
    │       ├── prj-tar.bash
    │       ├── prj-tar.py
    │       ├── prj-trace.bash
    │       ├── prj-trace.py
    │       ├── prj-util.bash
    │       ├── run_trace.bash
    │       └── starter.py
    └── README.md

Each project has a directory under infra/configs, in this case we will look at infra/configs/GEOCAT, which has three packaging json files: cspp_geocat_l2.json, cspp_geocat_l2_cache.json and cspp_geocat_l2_static.json...

infra/configs/GEOCAT/cspp_geocat_l2.json

  • This is the packaging setup file concerning the application component of the package, which includes the python scripting.

infra/configs/GEOCAT/cspp_geocat_l2_cache.json

  • This is the packaging setup file concerning the cache component of the package.

infra/configs/GEOCAT/cspp_geocat_l2_static.json

  • This is the packaging setup file concerning the vendor component of the package.

These files all have the sections...

  • a_home: The path of the dir (e.g.: ~/GEOCAT/CSPP_GEOCAT/cspp-geo-geocat-1.0b3) that will be packaged.
  • a_repo_home: The root SVN repository (e.g.: repos).
  • copy_from_app:
  • dereferenced_links: A collection of lists [file,link], which each contain a file or dir, and the location of a link to it. Might include links to third-party binary packages that want to be included (say, like, ShellB3).
  • links_in_package: A collection of lists [file,link], which each contain a file or dir, and the location of a link to it (both relative to a_home). Links which help enforce a packaging scheme which differs from the physical file locations.
  • links_from_repos: Links to files in repositories which are being actively developed.
  • dirs_in_package: A list of dirs to create
  • ignores: A list of files and dirs which are ingnored by the tar command or rpath.
  • trace:
  • repo_urls: A list of version control urls which contribute files to the package.

Once we have updated the json files, in infra/tools we have the following files...

  • prj-repos.bash: generate a script to pull the repos.
  • prj-create.bash : This will create your project directory with links.
  • prj-rpath.bash : do the rpathes
  • prj-trace.bash : pull out binaries
  • prj-tar.bash : generates script to create tarball.

which take the command line args...

-H home, --home home       : Home location to create package
-c config, --config config : The JSON configuration file.

Running prj-create.bash...

export INFRA_DIR=/home/RH6B/GEOCAT/repos/infra

$INFRA_DIR/tools/prj-create.bash -H /home/RH6B/GEOCAT -c $INFRA_DIR/configs/GEOCAT/cspp_geocat_l2.json
$INFRA_DIR/tools/prj-create.bash -H /home/RH6B/GEOCAT -c $INFRA_DIR/configs/GEOCAT/cspp_geocat_l2_static.json
$INFRA_DIR/tools/prj-create.bash -H /home/RH6B/GEOCAT -c $INFRA_DIR/configs/GEOCAT/cspp_geocat_l2_cache.json

The cspp_geocat_l2*.json files contain the entry "a_home": "CSPP_GEOCAT/cspp-geo-geocat-1.0b4", and so create a package dir tree under /home/RH6B/GEOCAT/CSPP_GEOCAT/cspp-geo-geocat-1.0b4. The script prj-create.bash can be run over and over again until the correct package dir tree is achieved, without the need to remove previous attempts (although this may be desirable).