Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 48e8049c857c
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b0f4499e9215
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Jun 6, 2019

  1. dockerTools.buildLayeredImage: restore layer sharing

    PR #58431 added /nix/store to each layer.tar. However, the timestamp was
    not explicitly set while adding /nix and /nix/store to the archive. This
    resulted in different SHA256 hashes of layer.tar between image builds.
    
    This change sets time and owner when tar'ing /nix/store.
    danieldk committed Jun 6, 2019

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    iv-nn Ivann
    Copy the full SHA
    d7f3186 View commit details
  2. Merge pull request #62719 from danieldk/docker-fix-shared-layers

    dockerTools.buildLayeredImage: restore layer sharing
    nlewo authored Jun 6, 2019
    Copy the full SHA
    b0f4499 View commit details
Showing with 3 additions and 1 deletion.
  1. +3 −1 pkgs/build-support/docker/store-path-to-layer.sh
4 changes: 3 additions & 1 deletion pkgs/build-support/docker/store-path-to-layer.sh
Original file line number Diff line number Diff line change
@@ -9,7 +9,9 @@ layerPath="./layers/$layerNumber"
echo "Creating layer #$layerNumber for $@"

mkdir -p "$layerPath"
tar --no-recursion -rf "$layerPath/layer.tar" /nix /nix/store
tar --no-recursion -rf "$layerPath/layer.tar" \
--mtime="@$SOURCE_DATE_EPOCH" \
--owner=0 --group=0 /nix /nix/store
tar -rpf "$layerPath/layer.tar" --hard-dereference --sort=name \
--mtime="@$SOURCE_DATE_EPOCH" \
--owner=0 --group=0 "$@"