From 75149c56c297f66801e72e8c5942aa93fab2cc67 Mon Sep 17 00:00:00 2001 From: Rolf Neugebauer Date: Tue, 24 Jul 2018 14:00:19 +0100 Subject: [PATCH] cmd/pkg: Add 'extra-source' field to the pkg schema And 'sources' to the Pkg structure Signed-off-by: Rolf Neugebauer --- src/cmd/linuxkit/pkglib/pkglib.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/cmd/linuxkit/pkglib/pkglib.go b/src/cmd/linuxkit/pkglib/pkglib.go index 1954a504e..ad4b07368 100644 --- a/src/cmd/linuxkit/pkglib/pkglib.go +++ b/src/cmd/linuxkit/pkglib/pkglib.go @@ -17,6 +17,7 @@ type pkgInfo struct { Image string `yaml:"image"` Org string `yaml:"org"` Arches []string `yaml:"arches"` + ExtraSources []string `yaml:"extra-sources"` GitRepo string `yaml:"gitrepo"` // ?? Network bool `yaml:"network"` DisableContentTrust bool `yaml:"disable-content-trust"` @@ -32,12 +33,19 @@ type pkgInfo struct { } `yaml:"depends"` } +// Specifies the source directory for a package and their destination in the build context. +type pkgSource struct { + src string + dst string +} + // Pkg encapsulates information about a package's source type Pkg struct { // These correspond to pkgInfo fields image string org string arches []string + sources []pkgSource gitRepo string network bool trust bool @@ -199,6 +207,7 @@ func NewFromCLI(fs *flag.FlagSet, args ...string) (Pkg, error) { hash: hash, commitHash: hashCommit, arches: pi.Arches, + sources: pi.Sources, gitRepo: pi.GitRepo, network: pi.Network, trust: !pi.DisableContentTrust,