From 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 14 Jul 2018 21:03:06 +0100 Subject: gentoo resync : 14.07.2018 --- app-emulation/skopeo/Manifest | 6 + .../files/skopeo-0.1.22-make-ostree-optional.patch | 158 +++++++++++++++++++++ app-emulation/skopeo/metadata.xml | 8 ++ app-emulation/skopeo/skopeo-0.1.22.ebuild | 57 ++++++++ app-emulation/skopeo/skopeo-0.1.30.ebuild | 53 +++++++ 5 files changed, 282 insertions(+) create mode 100644 app-emulation/skopeo/Manifest create mode 100644 app-emulation/skopeo/files/skopeo-0.1.22-make-ostree-optional.patch create mode 100644 app-emulation/skopeo/metadata.xml create mode 100644 app-emulation/skopeo/skopeo-0.1.22.ebuild create mode 100644 app-emulation/skopeo/skopeo-0.1.30.ebuild (limited to 'app-emulation/skopeo') diff --git a/app-emulation/skopeo/Manifest b/app-emulation/skopeo/Manifest new file mode 100644 index 000000000000..010d8b863e8e --- /dev/null +++ b/app-emulation/skopeo/Manifest @@ -0,0 +1,6 @@ +AUX skopeo-0.1.22-make-ostree-optional.patch 7351 BLAKE2B dbb8062f8d88bcc4b7d72863434a6d58c4afee8e591ab69ef20b3ce9d349fe80ee48b8e092c82d9326084b82233074fd9b09f056a8fe7eb89060b298e2b181d0 SHA512 c5292c23d144df89dd1d0ac6de2eb68eb2f852c3b0f095906ab1a9c3a29337ae514a0c754f561729d2b8b645e5c5b3fb18c2bffd3903db754c677667bd58e90f +DIST skopeo-0.1.22.tar.gz 1921286 BLAKE2B 141f78d14cb47494af9e55541eeaa973c9e2065d6dcdc73a6ee296fd160a981b88a4464ebf803df56378f9de7d812721eab877386a4b756e6b914d2c08e44aca SHA512 10ed4e577b07f672540ff86774b5c5b6b7531765fd36313b9e4e6bf974840fee98ede193014977c381b96875cb9147307ee690f4fc8dd4f97d87681d7fa2f4f2 +DIST skopeo-0.1.30.tar.gz 2700275 BLAKE2B d80125e1be32f3b490f5d66caa5b1bd482dc2203d0c37824bd40d06e240c347468f9635623344e6f9badd9dbbeed59383d5ec8ad81a9b8e01284bc48114470f6 SHA512 05ea7c54f1de7ab9676903a973c8039520fa023f295c705e600d01520c0f300d255268e41b9c716dc4a1f01e951d9b73acf24d5a1bc891f694798a3eb085f061 +EBUILD skopeo-0.1.22.ebuild 1341 BLAKE2B 7ad0f306ac63766a536809f9b895bd8a2a677c152f9806b593355cef618efd6aef8b1e2c8f70f979eeb1f99a8ba365b440dc9252f80cbbf0d4e882cef1840fba SHA512 84e7d05d76f896ef62021a80c093df74a575ccf2c79cab2f80e47b01e4d9ee4f60ee4713738d887579eb617a5e95d68a017c026d899c0a4d2d40b9ee5752a0e4 +EBUILD skopeo-0.1.30.ebuild 1292 BLAKE2B 554710ddbd65d0b3930ac4a0e23ce8cd2336cbc640a04e73afd885bfab1e5c84004b3e27e45ba86b19c40907cc4e28f37806cf6cef5c0e863d47da5a849cc3ea SHA512 708996e9c9bd91b474e6b443874d34c5c5752a64835ec7b279ae0c442ccbe28820bb003a1ab90fae8e23a9b8c534250c7f77f8574eef910dd8a64f5fe2449dec +MISC metadata.xml 248 BLAKE2B 5d9c3678c604aac0f24c5d5015e28f02b9ce83bb6a179755a44adeb3d69e4dd50be4acc30a6317649f5be23bcf13ac210bbe4712aa403e9c4cf2de351b39c941 SHA512 dc5b06a888be6367909895d5891a08189f4657bcee602e5ff0021be2ad3677e58ec7387ff244625be66a142138666e7eac790d2a7b1e298f0ad644725b5e57e0 diff --git a/app-emulation/skopeo/files/skopeo-0.1.22-make-ostree-optional.patch b/app-emulation/skopeo/files/skopeo-0.1.22-make-ostree-optional.patch new file mode 100644 index 000000000000..1e81d8bff341 --- /dev/null +++ b/app-emulation/skopeo/files/skopeo-0.1.22-make-ostree-optional.patch @@ -0,0 +1,158 @@ +From a49f22efd84d1cc656242319cca27cbdf8852e05 Mon Sep 17 00:00:00 2001 +From: William Hubbs +Date: Fri, 23 Jun 2017 12:34:25 -0500 +Subject: [PATCH] make ostree optional + +--- + vendor/github.com/containers/image/README.md | 14 ++++++--- + .../transports/alltransports/alltransports.go | 2 +- + .../image/transports/alltransports/ostree.go | 8 +++++ + .../image/transports/alltransports/ostree_stub.go | 9 ++++++ + .../github.com/containers/image/transports/stub.go | 36 ++++++++++++++++++++++ + .../containers/image/transports/stub_test.go | 18 +++++++++++ + 6 files changed, 82 insertions(+), 5 deletions(-) + create mode 100644 vendor/github.com/containers/image/transports/alltransports/ostree.go + create mode 100644 vendor/github.com/containers/image/transports/alltransports/ostree_stub.go + create mode 100644 vendor/github.com/containers/image/transports/stub.go + create mode 100644 vendor/github.com/containers/image/transports/stub_test.go + +diff --git a/vendor/github.com/containers/image/README.md b/vendor/github.com/containers/image/README.md +index ca8afd4..8e812bb 100644 +--- a/vendor/github.com/containers/image/README.md ++++ b/vendor/github.com/containers/image/README.md +@@ -51,14 +51,20 @@ Ensure that the dependencies documented [in vendor.conf](https://github.com/cont + are also available + (using those exact versions or different versions of your choosing). + +-This library, by default, also depends on the GpgME C library. Either install it: ++This library, by default, also depends on the GpgME and libostree C libraries. Either install them: + ```sh +-Fedora$ dnf install gpgme-devel libassuan-devel ++Fedora$ dnf install gpgme-devel libassuan-devel libostree-devel + macOS$ brew install gpgme + ``` +-or use the `containers_image_openpgp` build tag (e.g. using `go build -tags …`) +-This will use a Golang-only OpenPGP implementation for signature verification instead of the default cgo/gpgme-based implementation; ++or use the build tags described below to avoid the dependencies (e.g. using `go build -tags …`) ++ ++### Supported build tags ++ ++- `containers_image_openpgp`: Use a Golang-only OpenPGP implementation for signature verification instead of the default cgo/gpgme-based implementation; + the primary downside is that creating new signatures with the Golang-only implementation is not supported. ++- `containers_image_ostree_stub`: Instead of importing `ostree:` transport in `github.com/containers/image/transports/alltransports`, use a stub which reports that the transport is not supported. This allows building the library without requiring the `libostree` development libraries. ++ ++ (Note that explicitly importing `github.com/containers/image/ostree` will still depend on the `libostree` library, this build tag only affects generic users of …`/alltransports`.) + + ## Contributing + +diff --git a/vendor/github.com/containers/image/transports/alltransports/alltransports.go b/vendor/github.com/containers/image/transports/alltransports/alltransports.go +index dc70fad..dd80b7f 100644 +--- a/vendor/github.com/containers/image/transports/alltransports/alltransports.go ++++ b/vendor/github.com/containers/image/transports/alltransports/alltransports.go +@@ -12,7 +12,7 @@ import ( + _ "github.com/containers/image/docker/daemon" + _ "github.com/containers/image/oci/layout" + _ "github.com/containers/image/openshift" +- _ "github.com/containers/image/ostree" ++ // The ostree transport is registered by ostree*.go + _ "github.com/containers/image/storage" + "github.com/containers/image/transports" + "github.com/containers/image/types" +diff --git a/vendor/github.com/containers/image/transports/alltransports/ostree.go b/vendor/github.com/containers/image/transports/alltransports/ostree.go +new file mode 100644 +index 0000000..0fc5d7e +--- /dev/null ++++ b/vendor/github.com/containers/image/transports/alltransports/ostree.go +@@ -0,0 +1,8 @@ ++// +build !containers_image_ostree_stub ++ ++package alltransports ++ ++import ( ++ // Register the ostree transport ++ _ "github.com/containers/image/ostree" ++) +diff --git a/vendor/github.com/containers/image/transports/alltransports/ostree_stub.go b/vendor/github.com/containers/image/transports/alltransports/ostree_stub.go +new file mode 100644 +index 0000000..8b01afe +--- /dev/null ++++ b/vendor/github.com/containers/image/transports/alltransports/ostree_stub.go +@@ -0,0 +1,9 @@ ++// +build containers_image_ostree_stub ++ ++package alltransports ++ ++import "github.com/containers/image/transports" ++ ++func init() { ++ transports.Register(transports.NewStubTransport("ostree")) ++} +diff --git a/vendor/github.com/containers/image/transports/stub.go b/vendor/github.com/containers/image/transports/stub.go +new file mode 100644 +index 0000000..087f69b +--- /dev/null ++++ b/vendor/github.com/containers/image/transports/stub.go +@@ -0,0 +1,36 @@ ++package transports ++ ++import ( ++ "fmt" ++ ++ "github.com/containers/image/types" ++) ++ ++// stubTransport is an implementation of types.ImageTransport which has a name, but rejects any references with “the transport $name: is not supported in this build”. ++type stubTransport string ++ ++// NewStubTransport returns an implementation of types.ImageTransport which has a name, but rejects any references with “the transport $name: is not supported in this build”. ++func NewStubTransport(name string) types.ImageTransport { ++ return stubTransport(name) ++} ++ ++// Name returns the name of the transport, which must be unique among other transports. ++func (s stubTransport) Name() string { ++ return string(s) ++} ++ ++// ParseReference converts a string, which should not start with the ImageTransport.Name prefix, into an ImageReference. ++func (s stubTransport) ParseReference(reference string) (types.ImageReference, error) { ++ return nil, fmt.Errorf(`The transport "%s:" is not supported in this build`, string(s)) ++} ++ ++// ValidatePolicyConfigurationScope checks that scope is a valid name for a signature.PolicyTransportScopes keys ++// (i.e. a valid PolicyConfigurationIdentity() or PolicyConfigurationNamespaces() return value). ++// It is acceptable to allow an invalid value which will never be matched, it can "only" cause user confusion. ++// scope passed to this function will not be "", that value is always allowed. ++func (s stubTransport) ValidatePolicyConfigurationScope(scope string) error { ++ // Allowing any reference in here allows tools with some transports stubbed-out to still ++ // use signature verification policies which refer to these stubbed-out transports. ++ // See also the treatment of unknown transports in policyTransportScopesWithTransport.UnmarshalJSON . ++ return nil ++} +diff --git a/vendor/github.com/containers/image/transports/stub_test.go b/vendor/github.com/containers/image/transports/stub_test.go +new file mode 100644 +index 0000000..f181a1a +--- /dev/null ++++ b/vendor/github.com/containers/image/transports/stub_test.go +@@ -0,0 +1,18 @@ ++package transports ++ ++import ( ++ "testing" ++ ++ "github.com/stretchr/testify/assert" ++) ++ ++func TestStubTransport(t *testing.T) { ++ const name = "whatever" ++ ++ s := NewStubTransport(name) ++ assert.Equal(t, name, s.Name()) ++ _, err := s.ParseReference("this is rejected regardless of content") ++ assert.Error(t, err) ++ err = s.ValidatePolicyConfigurationScope("this is accepted regardless of content") ++ assert.NoError(t, err) ++} +-- +2.13.0 + diff --git a/app-emulation/skopeo/metadata.xml b/app-emulation/skopeo/metadata.xml new file mode 100644 index 000000000000..c36c37139fad --- /dev/null +++ b/app-emulation/skopeo/metadata.xml @@ -0,0 +1,8 @@ + + + + + williamh@gentoo.org + William Hubbs + + diff --git a/app-emulation/skopeo/skopeo-0.1.22.ebuild b/app-emulation/skopeo/skopeo-0.1.22.ebuild new file mode 100644 index 000000000000..091fb0c410f2 --- /dev/null +++ b/app-emulation/skopeo/skopeo-0.1.22.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +EGO_PN=github.com/projectatomic/skopeo +COMMIT=5d24b67 +inherit golang-vcs-snapshot + +DESCRIPTION="Command line utility foroperations on container images and image repositories" +HOMEPAGE="https://github.com/projectatomic/skopeo" +SRC_URI="https://github.com/projectatomic/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +COMMON_DEPEND=">=app-crypt/gpgme-1.5.5:= + >=dev-libs/libassuan-2.4.3 + >=sys-fs/btrfs-progs-4.0.1 + >=sys-fs/lvm2-2.02.145" +DEPEND="${COMMON_DEPEND} +dev-go/go-md2man" +RDEPEND="${COMMON_DEPEND}" + +PATCHES=( + "${FILESDIR}"/${P}-make-ostree-optional.patch +) + +S="${WORKDIR}/${P}/src/${EGO_PN}" + +RESTRICT="test" + +src_compile() { + local BUILDTAGS="containers_image_ostree_stub" + set -- env GOPATH="${WORKDIR}/${P}" \ + go build -ldflags "-X main.gitCommit=${COMMIT}" \ + -gcflags "${GOGCFLAGS}" -tags "${BUILDTAGS}" \ + -o skopeo ./cmd/skopeo + echo "$@" + "$@" || die + cd docs + for f in *.1.md; do + go-md2man -in ${f} -out ${f%%.md} || die + done +} + +src_install() { + dobin skopeo +doman docs/*.1 + insinto /etc/containers + newins default-policy.json policy.json + insinto /etc/containers/registries.d + doins default.yaml + dodir /var/lib/atomic/sigstore + einstalldocs +} diff --git a/app-emulation/skopeo/skopeo-0.1.30.ebuild b/app-emulation/skopeo/skopeo-0.1.30.ebuild new file mode 100644 index 000000000000..8fc316e1415f --- /dev/null +++ b/app-emulation/skopeo/skopeo-0.1.30.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +EGO_PN=github.com/projectatomic/skopeo +COMMIT=ca3bff6 +inherit golang-vcs-snapshot + +DESCRIPTION="Command line utility foroperations on container images and image repositories" +HOMEPAGE="https://github.com/projectatomic/skopeo" +SRC_URI="https://github.com/projectatomic/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +COMMON_DEPEND=">=app-crypt/gpgme-1.5.5:= + >=dev-libs/libassuan-2.4.3 + >=sys-fs/btrfs-progs-4.0.1 + >=sys-fs/lvm2-2.02.145" +DEPEND="${COMMON_DEPEND} + dev-go/go-md2man" +RDEPEND="${COMMON_DEPEND}" + +S="${WORKDIR}/${P}/src/${EGO_PN}" + +RESTRICT="test" + +src_compile() { + local BUILDTAGS="containers_image_ostree_stub" + set -- env GOPATH="${WORKDIR}/${P}" \ + go build -ldflags "-X main.gitCommit=${COMMIT}" \ + -gcflags "${GOGCFLAGS}" -tags "${BUILDTAGS}" \ + -o skopeo ./cmd/skopeo + echo "$@" + "$@" || die + cd docs || die + for f in *.1.md; do + go-md2man -in ${f} -out ${f%%.md} || die + done +} + +src_install() { + dobin skopeo + doman docs/*.1 + insinto /etc/containers + newins default-policy.json policy.json + insinto /etc/containers/registries.d + doins default.yaml + keepdir /var/lib/atomic/sigstore + einstalldocs +} -- cgit v1.2.3