app-emulation/containers-storage: new package
authorZac Medico <zmedico@gentoo.org>
Sat, 25 Aug 2018 04:24:46 +0000 (21:24 -0700)
committerZac Medico <zmedico@gentoo.org>
Sat, 25 Aug 2018 04:29:15 +0000 (21:29 -0700)
Package-Manager: Portage-2.3.48, Repoman-2.3.10

app-emulation/containers-storage/Manifest [new file with mode: 0644]
app-emulation/containers-storage/containers-storage-0_pre20180730.ebuild [new file with mode: 0644]
app-emulation/containers-storage/metadata.xml [new file with mode: 0644]

diff --git a/app-emulation/containers-storage/Manifest b/app-emulation/containers-storage/Manifest
new file mode 100644 (file)
index 0000000..e79f888
--- /dev/null
@@ -0,0 +1,2 @@
+DIST containers-storage-0_pre20180730.tar.gz 1410155 BLAKE2B 24595693e9f5706130dd5e9bf38d11b2b267a64924cb854ad2d9db8c0a3d7c47fec5a00fa100be67ceaf35ea1a08fada7314d5fbe114fe7508f54e8bfc4f64b4 SHA512 25c5c3c16bb9f0da4e590cf658e56cc2ce1dbc81751f984b426b5e09a95ee816632b0267c8f3028254e88fcd39f5d087f0357862b34379180b33ff38d7028453
+DIST github.com-pquerna-ffjson-af8b230fcd2007c7095168ca8ab94c68b60840c6.tar.gz 103474 BLAKE2B 66b456484cec51106e328a6d2c58a8597c1208956fca0c9f0ea45108b8d0942561882004a1ed5b90daa21509c9e0bc090dc9beed89b5a161f52ee8cf58e5d48f SHA512 243d8aed943dbadf3b127e07ad29a830ecded24aa80bb3bcc101db90ba8f3bfa03832e9d1f452e94b3eaccd683a044d0687a168e7e41979eb470442e689659c9
diff --git a/app-emulation/containers-storage/containers-storage-0_pre20180730.ebuild b/app-emulation/containers-storage/containers-storage-0_pre20180730.ebuild
new file mode 100644 (file)
index 0000000..7b3ebca
--- /dev/null
@@ -0,0 +1,94 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+EGO_VENDOR=(
+       "github.com/pquerna/ffjson af8b230fcd2007c7095168ca8ab94c68b60840c6"
+)
+
+inherit golang-vcs-snapshot
+
+KEYWORDS="~amd64"
+DESCRIPTION="containers/storage library"
+HOMEPAGE="https://github.com/containers/storage"
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="ostree test"
+EGO_PN="${HOMEPAGE#*//}"
+EGIT_COMMIT="17c7d1fee5603ccf6dd97edc14162fc1510e7e23"
+SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz
+       ${EGO_VENDOR_URI}"
+RDEPEND="sys-fs/lvm2:=
+       ostree? ( dev-libs/glib:= )"
+DEPEND="${RDEPEND}
+       dev-go/go-md2man
+       test? ( sys-apps/util-linux )"
+RESTRICT="test? ( userpriv ) !test? ( test )"
+
+src_unpack() {
+       golang-vcs-snapshot_src_unpack
+}
+
+src_prepare() {
+       default
+
+       [[ -f ${S}/src/${EGO_PN}/hack/ostree_tag.sh ]] || die
+       use ostree || { echo -e "#!/bin/sh\ntrue" > \
+               "${S}/src/${EGO_PN}/hack/ostree_tag.sh" || die; }
+
+       sed -e 's:TestChrootUntarPath(:_\0:' \
+               -i "${S}/src/${EGO_PN}/pkg/chrootarchive/archive_test.go" || die
+       sed -e 's:TestTarUntar(:_\0:' \
+               -e 's:TestTarWithOptionsChownOptsAlwaysOverridesIdPair(:_\0:' \
+               -e 's:TestTarWithOptions(:_\0:' \
+               -i "${S}/src/${EGO_PN}/pkg/archive/archive_test.go" || die
+       sed -e 's:TestTarUntarWithXattr(:_\0:' \
+               -e 's:TestTarWithBlockCharFifo(:_\0:' \
+               -i "${S}/src/${EGO_PN}/pkg/archive/archive_unix_test.go" || die
+       sed -e 's:TestTarUntarWithXattr(:_\0:' \
+               -i "${S}/src/${EGO_PN}/pkg/archive/archive_test.go" || die
+       sed -e 's:TestApplyLayer(:_\0:' \
+               -i "${S}/src/${EGO_PN}/pkg/archive/changes_test.go" || die
+       sed -e 's:TestApplyLayerInvalidFilenames(:_\0:' \
+               -e 's:TestApplyLayerInvalidHardlink(:_\0:' \
+               -e 's:TestApplyLayerInvalidSymlink(:_\0:' \
+               -e 's:TestApplyLayerWhiteouts(:_\0:' \
+               -i "${S}/src/${EGO_PN}/pkg/archive/diff_test.go" || die
+       sed -e 's:TestCopyCaseE(:_\0:' \
+               -e 's:TestCopyCaseEFSym(:_\0:' \
+               -e 's:TestCopyCaseG(:_\0:' \
+               -e 's:TestCopyCaseGFSym(:_\0:' \
+               -e 's:TestCopyCaseH(:_\0:' \
+               -e 's:TestCopyCaseHFSym(:_\0:' \
+               -e 's:TestCopyCaseJ(:_\0:' \
+               -e 's:TestCopyCaseEFSym(:_\0:' \
+               -e 's:TestCopyCaseG(:_\0:' \
+               -e 's:TestCopyCaseJFSym(:_\0:' \
+               -i "${S}/src/${EGO_PN}/pkg/archive/copy_unix_test.go" || die
+       sed -e 's:TestMount(:_\0:' \
+               -i "${S}/src/${EGO_PN}/pkg/mount/mounter_linux_test.go" || die
+}
+
+src_compile() {
+       mkdir -p "${S}/src/github.com/pquerna" || die
+       ln -s "${S}/src/${EGO_PN}/vendor/github.com/pquerna/ffjson" "${WORKDIR}/${P}/src/github.com/pquerna/ffjson" || die
+       mkdir -p "${S}/bin" || die
+       cd "${S}/bin" || die
+       GOPATH="${S}" GOBIN="${S}/bin" \
+               go build -v -work -x ${EGO_BUILD_FLAGS} "${S}/src/github.com/pquerna/ffjson/ffjson.go" || die
+       GOPATH="${S}" GOBIN="${S}/bin" PATH="${S}/bin:${PATH}" \
+               emake -C "${S}/src/${EGO_PN}" containers-storage docs
+}
+
+src_install() {
+       dobin "${S}/src/${EGO_PN}/${PN}"
+       while read -r -d ''; do
+               mv "${REPLY}" "${REPLY%.1}" || die
+       done < <(find "${S}/src/${EGO_PN}/docs" -name '*.[[:digit:]].1' -print0)
+       find "${S}/src/${EGO_PN}/docs" -name '*.[[:digit:]]' -exec doman '{}' + || die
+}
+
+src_test() {
+       GOPATH="${S}" unshare -m emake -C "${S}/src/${EGO_PN}" local-test-unit
+}
diff --git a/app-emulation/containers-storage/metadata.xml b/app-emulation/containers-storage/metadata.xml
new file mode 100644 (file)
index 0000000..5bf567e
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+       <maintainer type="person">
+               <email>zmedico@gentoo.org</email>
+               <name>Zac Medico</name>
+       </maintainer>
+       <use>
+               <flag name="ostree">
+                       Enables dependencies for handling of OSTree images.
+               </flag>
+       </use>
+       <upstream>
+               <remote-id type="github">containers/storage</remote-id>
+       </upstream>
+</pkgmetadata>