From 1c3d1ee302de6ea1581591e288e5f50b3a608bdf Mon Sep 17 00:00:00 2001 From: Vladimir Diaz Date: Tue, 26 Jun 2018 17:07:33 -0400 Subject: [PATCH 1/3] Revise QUICKSTART.md to capture more of what happens in the background Signed-off-by: Vladimir Diaz --- docs/QUICKSTART.md | 47 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 3 deletions(-) diff --git a/docs/QUICKSTART.md b/docs/QUICKSTART.md index 1651cad92d..de70031705 100644 --- a/docs/QUICKSTART.md +++ b/docs/QUICKSTART.md @@ -8,15 +8,35 @@ The CLI requires a few dependencies and C extensions that can be installed with The following is a basic workflow in four steps: -**Step (1)** - Initialize an empty repo +**Step (1)** - Initialize a repo. The `tufrepo`, `tufkeystore`, and +`tufclient` directories are created in the current working directory. ```Bash $ repo.py --init ``` -**Step (2)** - Add a target file to the repo +**Step (2)** - Add a target file to the repo. The file size and hashes of +the target file are also written to the Targets metadata file. ```Bash $ echo 'Test file' > testfile $ repo.py --add testfile +$ tree tufrepo/ +tufrepo/ +├── metadata +│   ├── 1.root.json +│   ├── root.json +│   ├── snapshot.json +│   ├── targets.json +│   └── timestamp.json +├── metadata.staged +│   ├── 1.root.json +│   ├── root.json +│   ├── snapshot.json +│   ├── targets.json +│   └── timestamp.json +└── targets + └── testfile + + 3 directories, 11 files ``` **Step (3)** - Serve the repo @@ -28,10 +48,31 @@ or with Python 3... $ python3 -m http.server 8001 ``` -**Step (4)** - Fetch a target file from the repo +**Step (4)** - Fetch a target file from the repo. The client downloads +any required metadata and the requested target file. ```Bash $ cd "tufclient/" $ client.py --repo http://localhost:8001 testfile +$ tree +. +├── tufrepo +│   └── metadata +│   ├── current +│   │   ├── 1.root.json +│   │   ├── root.json +│   │   ├── snapshot.json +│   │   ├── targets.json +│   │   └── timestamp.json +│   └── previous +│   ├── 1.root.json +│   ├── root.json +│   ├── snapshot.json +│   ├── targets.json +│   └── timestamp.json +└── tuftargets + └── testfile + + 5 directories, 11 files ``` From 97021b4e16be164621edeacd637fa33d7ed6d975 Mon Sep 17 00:00:00 2001 From: Vladimir Diaz Date: Tue, 26 Jun 2018 17:20:33 -0400 Subject: [PATCH 2/3] Revise help description for --init It should mention the files/directories that are created. Signed-off-by: Vladimir Diaz --- tuf/scripts/repo.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tuf/scripts/repo.py b/tuf/scripts/repo.py index 4ade3cce5d..def1ab9e5d 100755 --- a/tuf/scripts/repo.py +++ b/tuf/scripts/repo.py @@ -890,8 +890,9 @@ def parse_arguments(): description='Create or modify a TUF repository.') parser.add_argument('-i', '--init', action='store_true', - help='Create a repository. The repository is created in the current' - ' working directory unless --path is specified.') + help='Create a repository. The "tufrepo", "tufkeystore", and' + ' "tufclient" directories are created in the current working' + ' directory, unless --path is specified.') parser.add_argument('-p', '--path', nargs='?', default='.', metavar='', help='Specify a repository path. If used' From 473a0b0c122a33dee390319cddf7e0b1d53c68ed Mon Sep 17 00:00:00 2001 From: Vladimir Diaz Date: Tue, 26 Jun 2018 17:21:07 -0400 Subject: [PATCH 3/3] Add a couple line breaks to help break apart the main text Signed-off-by: Vladimir Diaz --- docs/QUICKSTART.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/QUICKSTART.md b/docs/QUICKSTART.md index de70031705..5dc92761f6 100644 --- a/docs/QUICKSTART.md +++ b/docs/QUICKSTART.md @@ -6,6 +6,7 @@ This is a work in progress and subject to change. The CLI requires a few dependencies and C extensions that can be installed with `pip install securesystemslib[crypto,pynacl]`. +---- The following is a basic workflow in four steps: **Step (1)** - Initialize a repo. The `tufrepo`, `tufkeystore`, and @@ -74,7 +75,7 @@ $ tree 5 directories, 11 files ``` - +---- See [CLI.md](CLI.md) and [CLI_EXAMPLES.md](CLI_EXAMPLES.md) to learn about the other supported CLI options. A [tutorial](TUTORIAL.md) is also available, and