Merge pull request #26935 from mayflower/upstream-skopeo

skopeo: 0.1.18 -> 0.1.22
This commit is contained in:
Tim Steinbach 2017-06-29 08:37:21 -04:00 committed by GitHub
commit 32a351a0aa
2 changed files with 30 additions and 17 deletions

View File

@ -1,22 +1,22 @@
{ stdenv, lib, buildGoPackage, fetchFromGitHub, gpgme, libgpgerror, devicemapper, btrfs-progs }: { stdenv, lib, buildGoPackage, fetchFromGitHub, gpgme, libgpgerror, devicemapper, btrfs-progs, pkgconfig, ostree }:
with stdenv.lib; with stdenv.lib;
buildGoPackage rec { buildGoPackage rec {
name = "skopeo-${version}"; name = "skopeo-${version}";
version = "0.1.18"; version = "0.1.22";
rev = "v${version}"; rev = "v${version}";
goPackagePath = "github.com/projectatomic/skopeo"; goPackagePath = "github.com/projectatomic/skopeo";
excludedPackages = "integration"; excludedPackages = "integration";
buildInputs = [ gpgme libgpgerror devicemapper btrfs-progs ]; buildInputs = [ gpgme libgpgerror devicemapper btrfs-progs pkgconfig ostree ];
src = fetchFromGitHub { src = fetchFromGitHub {
inherit rev; inherit rev;
owner = "projectatomic"; owner = "projectatomic";
repo = "skopeo"; repo = "skopeo";
sha256 = "13k29i5hx909hvddl2xkyw4qzxq2q20ay9bkal3xi063s6l0sh0z"; sha256 = "0aivs37bcvx3g22a9r3q1vj2ahw323g1vaq9jzbmifm9k0pb07jy";
}; };
patches = [ patches = [

View File

@ -1,5 +1,5 @@
diff --git a/cmd/skopeo/main.go b/cmd/skopeo/main.go diff --git a/cmd/skopeo/main.go b/cmd/skopeo/main.go
index 51f918d..6681d73 100644 index 50e29b2..7108df5 100644
--- a/cmd/skopeo/main.go --- a/cmd/skopeo/main.go
+++ b/cmd/skopeo/main.go +++ b/cmd/skopeo/main.go
@@ -3,6 +3,7 @@ package main @@ -3,6 +3,7 @@ package main
@ -10,7 +10,7 @@ index 51f918d..6681d73 100644
"github.com/Sirupsen/logrus" "github.com/Sirupsen/logrus"
"github.com/containers/image/signature" "github.com/containers/image/signature"
@@ -84,6 +85,12 @@ func getPolicyContext(c *cli.Context) (*signature.PolicyContext, error) { @@ -88,6 +89,11 @@ func getPolicyContext(c *cli.Context) (*signature.PolicyContext, error) {
policyPath := c.GlobalString("policy") policyPath := c.GlobalString("policy")
var policy *signature.Policy // This could be cached across calls, if we had an application context. var policy *signature.Policy // This could be cached across calls, if we had an application context.
var err error var err error
@ -19,7 +19,20 @@ index 51f918d..6681d73 100644
+ dir, err = filepath.Abs(filepath.Dir(os.Args[0])) + dir, err = filepath.Abs(filepath.Dir(os.Args[0]))
+ policyPath = dir + "/../etc/default-policy.json" + policyPath = dir + "/../etc/default-policy.json"
+ } + }
+ if c.GlobalBool("insecure-policy") {
if policyPath == "" { policy = &signature.Policy{Default: []signature.PolicyRequirement{signature.NewPRInsecureAcceptAnything()}}
policy, err = signature.DefaultPolicy(nil) } else if policyPath == "" {
} else { diff --git a/vendor/github.com/containers/image/docker/docker_client.go b/vendor/github.com/containers/image/docker/docker_client.go
index b989770..697d2ee 100644
--- a/vendor/github.com/containers/image/docker/docker_client.go
+++ b/vendor/github.com/containers/image/docker/docker_client.go
@@ -154,6 +154,9 @@ func setupCertificates(dir string, tlsc *tls.Config) error {
if os.IsNotExist(err) {
return nil
}
+ if os.IsPermission(err) {
+ return nil
+ }
return err
}