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

Fix missing default-policy.json in skopeo #82261

Merged
merged 1 commit into from Mar 10, 2020

Conversation

jcpetruzza
Copy link
Contributor

Motivation for this change

We started having issues with pkgs.dockerTools.pullImage, were it would fail with:

FATA[0000] Error loading trust policy: open /etc/containers/policy.json: no such file or directory

It turns out that since skopeo was bumped to 0.1.40, it was accidentally no longer being built with a default policy.

Essentially the same change had to be done for homebrew's version of skopeo: https://github.com/Homebrew/homebrew-core/pull/47766/files

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

We started having issues with `pkgs.dockerTools.pullImage`, were it
would fail with:

```
FATA[0000] Error loading trust policy: open /etc/containers/policy.json: no such file or directory
```

It turns out that since `skopeo` was bumped to `0.1.40`, it was
accidentally no longer being built with a default policy.

This may happen again, see containers/skopeo#787
@adisbladis adisbladis self-requested a review March 10, 2020 16:40
@adisbladis adisbladis self-assigned this Mar 10, 2020
@ofborg ofborg bot requested review from ehmry, vdemeester and nlewo March 10, 2020 16:46
@adisbladis adisbladis merged commit 77a1653 into NixOS:master Mar 10, 2020
@adisbladis
Copy link
Member

Backported to 20.03 in 1cf2c15.

@adisbladis
Copy link
Member

And thank you for your contribution! 🎉

-X github.com/containers/skopeo/vendor/github.com/containers/image/signature.systemDefaultPolicyPath=${defaultPolicyFile}
-X github.com/containers/skopeo/vendor/github.com/containers/image/internal/tmpdir.unixTempDirForBigFiles=/tmp
-X github.com/containers/skopeo/vendor/github.com/containers/image/v5/signature.systemDefaultPolicyPath=${defaultPolicyFile}
-X github.com/containers/skopeo/vendor/github.com/containers/image/v5/internal/tmpdir.unixTempDirForBigFiles=/tmp
Copy link

@glensc glensc Apr 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you probably do not want this override. default is /var/tmp anyway, and it's the path for big temp files according to FHS spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants