Skip to content

ngclient: downloading targets fails if targetpath includes subdirectories #1571

Closed

Description

@jku

ngclient has so far copied the legacy client decision of downloading files to the same directory structure as the repository uses. It has however removed the code that creates the directory structure.

So downloading any targets with paths like "path/to/file" will fail because the local directories do not exist.

Activity

  1. jku commented on Sep 9, 2021

    @jku
    MemberAuthor

    I think this is actually a good time to get rid of this idea of using target paths as local path with directories (as it has several issues, not just that we don't create the subdirectories)... I'll take this

  2. self-assigned this
    on Sep 9, 2021
  3. changed the title [-]ngclient: target directory creation is missing[/-] [+]ngclient: downloading targets fails if targetpath includes subdirectories[/+] on Sep 9, 2021
  4. jku commented on Sep 13, 2021

    @jku
    MemberAuthor

    We might want to fix this with #1412
    #1412 (comment)

  5. added
    backlog
    on Sep 15, 2021
  6. jku commented on Sep 24, 2021

    @jku
    MemberAuthor

    I have a branch but this is in practice blocked by #1587 : The legacy tests do not include any targets with sub directories (!) and I can't be bothered to add them, will wait for #1587.

    I also suppose this one makes #1576 trickier to test (as the downloads just won't work).

  7. added a commit that references this issue on Sep 24, 2021
    599fa10
  8. MVrachev commented on Sep 24, 2021

    @MVrachev
    Collaborator

    I think this is actually a good time to get rid of this idea of using target paths as local path with directories (as it has several issues, not just that we don't create the subdirectories)... I'll take this

    @jku I am sorry I created a commit before reading this issue and noticing you are assigned to it.
    I created one commit possibly solving that issue: 6f108c9, but the question remains do we want
    to further support targetpaths as local paths.

    What other do you mean besides this one if we consider targetpaths as local paths?

  9. jku commented on Sep 27, 2021

    @jku
    MemberAuthor

    @jku I am sorry I created a commit before reading this issue and noticing you are assigned to it.
    I created one commit possibly solving that issue: 6f108c9,

    That's fine, I'm sure you needed to do something to test -- and we are annoyingly touching the same bits of code. We'll see how bad the merging/rebasing gets...

    but the question remains do we want to further support targetpaths as local paths.

    I don't want to create local directories based on a URL -- a specific TUF implementation might know that is a reasonable thing to do but I don't think the library can know that. I'm suggesting we use the whole target path (url encoded) as a filename, and then also offer a way for the client application to decide the filepath themselves (so if the client knows using target path as path is safe, it can create the directories).

  10. added 3 commits that reference this issue on Sep 27, 2021
    876cb0e
    db99e86
    eeebc41
  11. added a commit that references this issue on Oct 8, 2021
    d88a557
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

backlogbugngclient

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions