README.md 4.47 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# 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.

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

76
77
78
79
80
- `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. 
81
82


83
which take the command line args...
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101

    -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).