From 08ccf9e0595147c03a37de6529008b95f839cac9 Mon Sep 17 00:00:00 2001 From: Christian Albrecht Date: Wed, 28 Jun 2017 18:38:05 +0200 Subject: [PATCH] skopeo: 0.1.18 -> 0.1.22 --- pkgs/development/tools/skopeo/default.nix | 8 ++++---- pkgs/development/tools/skopeo/path.patch | 25 +++++++++++------------ 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/pkgs/development/tools/skopeo/default.nix b/pkgs/development/tools/skopeo/default.nix index d1ea6a2e12b..f9c5ee1b7b9 100644 --- a/pkgs/development/tools/skopeo/default.nix +++ b/pkgs/development/tools/skopeo/default.nix @@ -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; buildGoPackage rec { name = "skopeo-${version}"; - version = "0.1.18"; + version = "0.1.22"; rev = "v${version}"; goPackagePath = "github.com/projectatomic/skopeo"; excludedPackages = "integration"; - buildInputs = [ gpgme libgpgerror devicemapper btrfs-progs ]; + buildInputs = [ gpgme libgpgerror devicemapper btrfs-progs pkgconfig ostree ]; src = fetchFromGitHub { inherit rev; owner = "projectatomic"; repo = "skopeo"; - sha256 = "13k29i5hx909hvddl2xkyw4qzxq2q20ay9bkal3xi063s6l0sh0z"; + sha256 = "0aivs37bcvx3g22a9r3q1vj2ahw323g1vaq9jzbmifm9k0pb07jy"; }; patches = [ diff --git a/pkgs/development/tools/skopeo/path.patch b/pkgs/development/tools/skopeo/path.patch index deb63b27945..22a74ac944b 100644 --- a/pkgs/development/tools/skopeo/path.patch +++ b/pkgs/development/tools/skopeo/path.patch @@ -1,25 +1,24 @@ 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 +++ b/cmd/skopeo/main.go @@ -3,6 +3,7 @@ package main import ( "fmt" "os" -+ "path/filepath" - ++ "path/filepath" + "github.com/Sirupsen/logrus" "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") var policy *signature.Policy // This could be cached across calls, if we had an application context. var err error -+ var dir string -+ if policyPath == "" { -+ dir, err = filepath.Abs(filepath.Dir(os.Args[0])) -+ policyPath = dir + "/../etc/default-policy.json" -+ } -+ - if policyPath == "" { - policy, err = signature.DefaultPolicy(nil) - } else { ++ var dir string ++ if policyPath == "" { ++ dir, err = filepath.Abs(filepath.Dir(os.Args[0])) ++ policyPath = dir + "/../etc/default-policy.json" ++ } + if c.GlobalBool("insecure-policy") { + policy = &signature.Policy{Default: []signature.PolicyRequirement{signature.NewPRInsecureAcceptAnything()}} + } else if policyPath == "" {