Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add git add-to-store support for Nix #3

Merged
merged 35 commits into from
Jun 2, 2020

Commits on Jun 1, 2020

  1. Configuration menu
    Copy the full SHA
    130267d View commit details
    Browse the repository at this point in the history
  2. Parse git blobs correctly

    This matches what we want for blobs.
    
    Trees are still in progress - we need a way to symlink to other
    objects, using that to determine ca.
    matthewbauer committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    df74744 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f292e50 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1592d09 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    cf81991 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    9e9c2ce View commit details
    Browse the repository at this point in the history
  7. Use SHA1 for Git objects

    This is really bad and dangerous! But Git migration to sha256 is still
    a ways away:
    
    https://lwn.net/Articles/811068/
    
    So we need to allow it for the time being.
    matthewbauer committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    6f7fab9 View commit details
    Browse the repository at this point in the history
  8. Pass storeDir to restoreGit

    We need access to other things in the store. This is kind of dangerous
    though if things are added in the wrong order�.
    matthewbauer committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    ee989c6 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    9cd3ac7 View commit details
    Browse the repository at this point in the history
  10. Add createExecutableFile primitive to ParseSink

    This is needed to create files based on git permissions
    matthewbauer committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    b5ed6a9 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    6ceba63 View commit details
    Browse the repository at this point in the history
  12. Allow sha1 in --hash results

    This updates the remote protocol to try to handle sha1 hashes.
    matthewbauer committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    e44956d View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    646862e View commit details
    Browse the repository at this point in the history
  14. Expand git tests

    matthewbauer committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    592e926 View commit details
    Browse the repository at this point in the history
  15. Cleanup git.cc code

    matthewbauer committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    a4a038f View commit details
    Browse the repository at this point in the history
  16. Use path-based addToStore method for add-to-store

    This is more direct.
    matthewbauer committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    4ecb49d View commit details
    Browse the repository at this point in the history
  17. Properly handle realStoreDir vs. storeDir in git.cc

    We need both to properly mess with the file system. storeDir goes into
    the hash while realStoreDir is what we read & write to.
    matthewbauer committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    d68b774 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    18d4a3d View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    d8f34fd View commit details
    Browse the repository at this point in the history
  20. Add hash to local store correctly from dump

    Need to use the htSHA1 we were given, don’t recompute.
    matthewbauer committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    27ffbc7 View commit details
    Browse the repository at this point in the history
  21. Move git tests to own file

    this makes maintanence easier
    matthewbauer committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    05cbfde View commit details
    Browse the repository at this point in the history
  22. Revert "Depend on install for installcheck"

    This reverts commit 7b6186d.
    matthewbauer committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    97ce2cc View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    229ce9c View commit details
    Browse the repository at this point in the history
  24. Use SHA256 for narHash

    narHash is the hash of the nar, not the git objects.
    matthewbauer committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    031fa72 View commit details
    Browse the repository at this point in the history
  25. Use correct narHash in add-to-store

    We need to dump path and dump git here so that the hashes match what
    is expected elsewhere.
    matthewbauer committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    d49c873 View commit details
    Browse the repository at this point in the history
  26. Throw error when hashAlgo != SHA1 on git ingestion

    This should always use sha1 hash type, but we want to make sure the
    caller knows that. So just throw an error instead of ignoring hashAlgo
    on Git ingestion.
    matthewbauer committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    cd3ef3f View commit details
    Browse the repository at this point in the history
  27. Don’t include realStoreDir refs in git output

    symlinks should be relative so that they look like:
    
      ../s5c0hnz9qfnpnn1bszfxicgz21d1fam3-dummy3
    
    instead of
    
      /build/nix-test/store/s5c0hnz9qfnpnn1bszfxicgz21d1fam3-dummy3
    
    This way our hashes will work with any real store dir. Note that
    /nix/store is still embedded in the store entry function.
    matthewbauer committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    4dae98e View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    1b14945 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    54ee74e View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    b1e1ace View commit details
    Browse the repository at this point in the history
  31. Don’t preallocate file size

    this shouldn’t be needed - FdSink handles this for us.
    matthewbauer committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    7fe9a48 View commit details
    Browse the repository at this point in the history
  32. Copy instead of symlinking directories

    Symlinks are resolved in the nar format so we end up with references
    to the real store dir. Copying avoids this and gives us a stable hash.
    
    Also update the ParseSink api with two methods:
    
      - copyFile
      - copyDirectory
    
    both are needed to properly implement git parsing.
    matthewbauer committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    eb90cc6 View commit details
    Browse the repository at this point in the history
  33. Use custom copyDirectory instead of libc++fs

    libc++fs isn’t alway available
    matthewbauer committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    b120259 View commit details
    Browse the repository at this point in the history

Commits on Jun 2, 2020

  1. Fixup bad rebase

    matthewbauer committed Jun 2, 2020
    Configuration menu
    Copy the full SHA
    7432a9d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    24544d3 View commit details
    Browse the repository at this point in the history