Commit graph

3503 commits

Author SHA1 Message Date
Lukas Puehringer
b86b4aad5b doc: Remove Python prompt tutorial snippet
Reasons are:

- The prompt says 2.7.3  Sep 26 2013, which makes the tutorial look
  outdated
- There is another section that explains how snippets should be
  executed in a Python interactive interpreter
- The only activity in the snippet is importing tuf functions and
  creating a repo, both of which is done in another snippet below.
  And the here created repo is not re-used
- The tutorial is long enough

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2019-12-16 15:16:24 +01:00
Sebastien Awwad
14500a8d24 Correct test_tutorial to use '/' in filepaths on all platforms
Note that target filepaths specified in the repo use '/' even on
Windows.

(That property is important to make sure that metadata is platform-
independent.)

Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
2019-12-16 15:16:24 +01:00
Sebastien Awwad
bfcdfd5c5a Test: Correctly test target addition in tutorial despite #774
(that is, despite currently existing issue to be remedied in #774)

Currently, repository_tool.get_filepaths_in_directory yields
relative paths, not the absolute paths it promises in its docstring.
This test will now function despite this and continue to function
after #774 is merged.

Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
2019-12-16 15:16:24 +01:00
Sebastien Awwad
6c850e062b Test: correctly test use of non-TUF-generated signatures in tutorial
Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
2019-12-16 15:16:24 +01:00
Sebastien Awwad
8e22de5842 Correct remove_target() call in TUTORIAL.md and test_tutorial.py
Target removal is done relative to the root of the targets dir.

Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
2019-12-16 15:16:24 +01:00
Sebastien Awwad
3a37189e69 Use os.path.join instead of '/' in test_tutorial.py for compat
for compatibility with non-Linux environments.

Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
2019-12-16 15:16:24 +01:00
Sebastien Awwad
e24525c94c In repo tutorial, fix consistent snapshots instructions
to include loading the root signing keys and explaining why.

Also update test_tutorial.py

Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
2019-12-16 15:16:24 +01:00
Sebastien Awwad
608e377d83 Exclude leading '/' for target fnames in tutorial and its tester
Because leading '/' is no longer allowed in target filenames in
target addition or delegation.

See https://github.com/theupdateframework/tuf/issues/639

While we're at it, remove some other unnecessary '/' characters
in repository creation and loading in the tutorial and tutorial
test.

Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
2019-12-16 15:16:24 +01:00
Sebastien Awwad
b947a6bd48 Have test_tutorial.py copy metadata.staged to metadata
in order to allow testing of client creation script

Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
2019-12-16 15:16:24 +01:00
Sebastien Awwad
56f14c4342 Remove add_restricted_paths from TUTORIAL.md and test_tutorial.py
add_restricted_paths was renamed to add_path; however, this
function represents a problematic element of TUF that assumes
that roles are have a single delegator and delegatee, and that
one can refer to a role's expected keys without being concerned
about any delegation metadata....

So this is being removed from the tutorial. In time, add_paths
will either be removed or changed (to expect a delegator role
and a delegatee role, not just a delegatee role).

This comment does not do justice to the issue: please see TUF
GitHub Issue #660:
https://github.com/theupdateframework/tuf/issues/660

Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
2019-12-16 15:16:24 +01:00
Sebastien Awwad
e2ec3ef158 Remove keystore/ use from TUTORIAL.md and test_tutorial
While it may be nice, the use of a keystore/ directory for the
temporary keys created in the tutorial complicates the code a
good bit when it's done in a portable way (tons of os.path.join()
calls), and that's not worth it. It also is a slight complication
in a tutorial that profits from being as simple as possible.

Tests will be run in multiple environments (including non-Linux
environments) and to leave so many extra subdirectory uses in the
tutorial means that the tutorial test will deviate over a large
number of lines from the TUTORIAL.md content it is intended to
test, which would be bad.

This commit adjusts both the tutorial doc and the regression test
for the tutorial.

Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
2019-12-16 15:16:24 +01:00
Sebastien Awwad
2d2c527b74 Add a regression test for the tutorial instructions
running test_tutorial.py attempts the commands replicated from
TUTORIAL.md. This should help us avoid breaking the tutorial with
future changes without noticing by having automated testing run
the tutorial and produce helpful output.

NOTE that this test currently fails because the tutorial is
currently broken!

Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
2019-12-16 15:16:24 +01:00
lukpueh
fa62bc810b
Merge pull request #966 from lukpueh/update-py-support
Update tested and supported Python versions
2019-12-16 10:29:16 +01:00
Lukas Puehringer
f7a0685190 Update tested and supported Python versions
- Drop 3.4 (due to end-of-life) and add 3.7 and 3.8 to tox, travis
and appveyor configuration for automated testing.
- Adapt classifiers in setup.py accordingly.
- Add python_requires field in setup.py to reflect supported
versions. This will prevent pip from trying to install tuf on
a non-supported version.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2019-12-13 09:46:18 +01:00
lukpueh
409eef1a48
Merge pull request #962 from theupdateframework/revert-961-joshuagl/tutorial
Revert "Minor tutorial related tweaks made after reviewing PR #775"
2019-11-29 12:36:18 +01:00
lukpueh
c5dac3136d Revert "Minor tutorial related tweaks made after reviewing PR #775"
- line-wraps are integrated with
190a736d297ef5d8d3c1e8761ac196666954f3a2 in #775
- sorting the value returned by `get_dirty_roles()` in
`dirty_roles()` is not necessary as `get_dirty_roles()` already
returns a sorted list per ac010337f0e154f9c183f8abe759ce26ed16731c
in #775.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2019-11-29 12:35:28 +01:00
Justin Cappos
762b9c2c55
Merge pull request #961 from joshuagl/joshuagl/tutorial
Minor tutorial related tweaks made after reviewing PR #775
2019-11-28 21:40:43 -05:00
Joshua Lock
ff21b36d3b repository_tool: sort the list of roles in dirty_roles()
By sorting this printed list we make the output much easier to compare,
whether by eye (as in users following the tutorial) or programatically.

Signed-off-by: Joshua Lock <jlock@vmware.com>
2019-11-28 22:02:45 +00:00
Joshua Lock
282c9aa98b TUTORIAL: minor cleanup
An attempt to make part of the tutorial less jarring, and reformatting
of the surrounding text to keep the lines <80 characters.

Signed-off-by: Joshua Lock <jlock@vmware.com>
2019-11-28 22:01:33 +00:00
Justin Cappos
3a79476ffd
Merge pull request #960 from brainwane/pypi-badge
Add PyPI badge
2019-11-26 15:18:54 -05:00
Sumana Harihareswara
4d43201af8 Add PyPI badge
Signed-off-by: Sumana Harihareswara <sh@changeset.nyc>
2019-11-26 14:23:28 -05:00
lukpueh
25e9e77dad
Merge pull request #959 from lukpueh/bump_version_0.12.1
Bump version 0.12.1
2019-11-15 16:27:43 +01:00
Lukas Puehringer
054a32ce1a setup.py/__init__.py: bump version to v0.12.1
Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2019-11-14 15:49:15 +01:00
Lukas Puehringer
733c2edfe0 CHANGELOG: Add v0.12.1 entry
Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2019-11-14 15:49:10 +01:00
lukpueh
73aff69b34
Merge pull request #950 from theupdateframework/trishankatdatadog-patch-1
Relax semver for spec version in 0.12.MINOR
2019-11-14 15:29:59 +01:00
lukpueh
42c8d116d9
Merge pull request #956 from lukpueh/update-2019-11-12
Update dependencies
2019-11-12 16:00:02 +01:00
Lukas Puehringer
e718757dde Update dependencies
- Fix syntax issue (remove stray conflict marker)
- Update dependencies
  astroid from 2.3.2 to 2.3.3
  securesystemslib from 0.12.1 to 0.12.2
  six from 1.12.0 to 1.13.0

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2019-11-12 12:34:55 +01:00
lukpueh
9b93c0bccc
Merge pull request #954 from theupdateframework/JustinCappos-Governance-clarifications
Governance clarifications
2019-11-11 15:55:00 +01:00
Justin Cappos
f6bd46fc13 Governance clarifications
Signed-off-by: Justin Cappos <justincappos@gmail.com>
Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2019-11-11 15:51:52 +01:00
Trishank K Kuppusamy
e488386a0c
relax semver for spec version in 0.12.MINOR
Signed-off-by: Trishank K Kuppusamy <trishank.kuppusamy@datadoghq.com>

Update formats.py
2019-11-06 11:52:25 -05:00
Justin Cappos
141be9cd92
Merge pull request #953 from theupdateframework/JustinCappos-term-info-1
CB term information
2019-11-05 16:13:06 -05:00
Justin Cappos
1f2df57ecd
Update docs/GOVERNANCE.md
Signed-off-by: Justin Cappos <justincappos@gmail.com>

Co-Authored-By: Trishank K Kuppusamy <33133073+trishankatdatadog@users.noreply.github.com>
2019-11-05 15:32:29 -05:00
Justin Cappos
35b97a1951
Update docs/GOVERNANCE.md
Signed-off-by: Justin Cappos <justincappos@gmail.com>

Co-Authored-By: Lois Anne DeLong <lad278@nyu.edu>
2019-11-05 15:25:36 -05:00
Justin Cappos
01b90c4245
Update docs/GOVERNANCE.md
Signed-off-by: Justin Cappos <justincappos@gmail.com>

Co-Authored-By: Lois Anne DeLong <lad278@nyu.edu>
2019-11-05 15:25:11 -05:00
Justin Cappos
7753af072c
Update docs/GOVERNANCE.md
Signed-off-by: Justin Cappos <justincappos@gmail.com>

Co-Authored-By: Lois Anne DeLong <lad278@nyu.edu>
2019-11-05 15:25:00 -05:00
Justin Cappos
6a13894fb5
CB term information
Signed-off-by: Justin Cappos <justincappos@gmail.com>
2019-11-05 13:28:11 -05:00
Trishank K Kuppusamy
3d96fb1933
Merge pull request #945 from theupdateframework/pyup-scheduled-update-2019-11-04
Scheduled weekly dependency update for week 44
2019-11-05 10:54:13 -05:00
Justin Cappos
991b4f3ee3
Merge pull request #947 from theupdateframework/JustinCappos-CB-clarify+DCO
CB clarifications requested by Liz
2019-11-05 10:42:19 -05:00
Justin Cappos
51a972736f
Merge pull request #948 from theupdateframework/trishankatdatadog-patch-1
Update MAINTAINERS.txt
2019-11-05 10:04:51 -05:00
Trishank K Kuppusamy
f067ff9e3e
Update MAINTAINERS.txt 2019-11-05 09:56:28 -05:00
Trishank K Kuppusamy
ccd8904a1e
Update MAINTAINERS.txt 2019-11-05 09:55:17 -05:00
pyup-bot
5f54053aee Update dependencies
backports.functools-lru-cache from 1.5 to 1.6.1
cffi from 1.13.1 to 1.13.2
python-dateutil from 2.8.0 to 2.8.1
securesystemslib from 0.12.0 to 0.12.1

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2019-11-05 15:41:53 +01:00
Justin Cappos
bab230ff32
CB clarifications requested by Liz
Signed-off-by: Justin Cappos <justincappos@gmail.com>
2019-11-05 09:00:35 -05:00
Justin Cappos
a142413099
Merge pull request #944 from theupdateframework/JustinCappos-CB
changes recommended by Liz
2019-10-30 06:56:00 -04:00
Justin Cappos
3973e79b87
changes recommended by Liz
Signed-off-by: Justin Cappos  <justincappos@gmail.com>
2019-10-30 06:31:33 -04:00
lukpueh
3079888a06
Merge pull request #942 from theupdateframework/pyup-scheduled-update-2019-10-28
Scheduled weekly dependency update for week 43
2019-10-29 10:13:44 +01:00
pyup-bot
f5690aac13 Misc dependency updates
gitpython from 3.0.3 to 3.0.4
lazy-object-proxy from 1.4.2 to 1.4.3
virtualenv from 16.7.6 to 16.7.7

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2019-10-29 10:06:23 +01:00
lukpueh
96858da2d8
Merge pull request #941 from theupdateframework/pyup-scheduled-update-2019-10-21
Scheduled weekly dependency update for week 42
2019-10-28 16:04:52 +01:00
pyup-bot
98f0a405f2 Misc dependency updates
asn1crypto from 1.1.0 to 1.2.0
astroid from 2.3.1 to 2.3.2
cffi from 1.12.3 to 1.13.1
cffi from 1.13.0 to 1.13.1
cryptography from 2.7 to 2.8
ipaddress from 1.0.22 to 1.0.23
pylint from 2.4.2 to 2.4.3
virtualenv from 16.7.5 to 16.7.6

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2019-10-28 10:17:07 +01:00
lukpueh
e911fc4016
Merge pull request #936 from lukpueh/update-requirements
Update requirements files
2019-10-21 15:02:35 +02:00