Skip to content

Commit

Permalink
app-emulation/buildah: revbump to 1.3-r1 for issue 966
Browse files Browse the repository at this point in the history
Add patch for "layer not known" corruption issue 966.

See: containers/buildah#966
Package-Manager: Portage-2.3.48, Repoman-2.3.10
  • Loading branch information
zmedico committed Aug 29, 2018
1 parent 33aa064 commit 9bfb166
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
1 change: 1 addition & 0 deletions app-emulation/buildah/Manifest
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
DIST buildah-1.2.tar.gz 4403310 BLAKE2B df3a1d12a41e9d585d3191103140fc232a2c247283996f394bd151f61615057b15d934e165be47794465c30217c32b3e6b53fbf4d2ef5a2f3349840dadad8171 SHA512 0aac0a80c3c50f0171199e549c0321ce1a756ca838dd9d92b0b0d58bd6b4e212390642c8a4a2aea794616292058624ab0c8707d2ea0cdcbcc555b387df611dc2
DIST buildah-1.3-issue-966-containers-storage-c7ba5749d44a65fde2daf114c16fb0272d82d73b.patch 4507 BLAKE2B 85a02751a91a73f1f99a1ae138e712304feeb46a40c792f4ec4ac895ce074d15eab4d76bf5e9be759254d0a023371c074a633607a689b42d238ac3f32b4e1d3d SHA512 63c74989dc649582170fc6657c9bfc805bcec6c4aa31017d53c4fa0f86acf00986adf05a8101605963eb3a358d237aad43c124ebcb5be635cff85efe4aa1eaa4
DIST buildah-1.3.tar.gz 4486873 BLAKE2B 35fb62626d2466495da47579cf4ab23603797ef42a9308245fa97c87a91fcb978f4d02724ce79c2b4ac620d9868ca8974e4701ba6a96ccf739e5ccb4e6d9693a SHA512 c8e161254495cb652caf9a54a051155008e41575487d26aacd38355f0a447ae0e8973b33a978e6a2d5a6c8105400d49dae46878c5f3631ab51aa3556d5033ccd
64 changes: 64 additions & 0 deletions app-emulation/buildah/buildah-1.3-r1.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6
inherit bash-completion-r1 golang-vcs-snapshot

KEYWORDS="~amd64"
DESCRIPTION="A tool that facilitates building OCI images"
HOMEPAGE="https://github.com/projectatomic/buildah"
LICENSE="Apache-2.0"
SLOT="0"
IUSE="ostree selinux"
EGO_PN="${HOMEPAGE#*//}"
EGIT_COMMIT="v${PV}"
GIT_COMMIT="4888163"
CONTAINERS_STORAGE_PATCH=c7ba5749d44a65fde2daf114c16fb0272d82d73b.patch
SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz
https://github.com/containers/storage/commit/${CONTAINERS_STORAGE_PATCH} -> buildah-1.3-issue-966-containers-storage-${CONTAINERS_STORAGE_PATCH}"
RDEPEND="app-crypt/gpgme:=
app-emulation/skopeo
dev-libs/libgpg-error:=
dev-libs/libassuan:=
sys-fs/lvm2:=
sys-libs/libseccomp:=
selinux? ( sys-libs/libselinux:= )"
DEPEND="${RDEPEND}"
RESTRICT="test"
REQUIRED_USE="!selinux? ( !ostree )"
S="${WORKDIR}/${P}/src/${EGO_PN}"

src_prepare() {
# Apply "layer not known" corruption fix for https://github.com/projectatomic/buildah/issues/966.
sed 's:[ab]/:\0vendor/github.com/containers/storage/:g' < \
"${DISTDIR}/buildah-1.3-issue-966-containers-storage-${CONTAINERS_STORAGE_PATCH}" > \
"${T}/buildah-1.3-issue-966-containers-storage-${CONTAINERS_STORAGE_PATCH}" || die
eapply "${T}/buildah-1.3-issue-966-containers-storage-${CONTAINERS_STORAGE_PATCH}"

default
sed -e 's|^\(GIT_COMMIT := \).*|\1'${GIT_COMMIT}'|' -i Makefile || die

[[ -f ostree_tag.sh ]] || die
use ostree || { echo -e "#!/bin/sh\necho containers_image_ostree_stub" > \
ostree_tag.sh || die; }

[[ -f selinux_tag.sh ]] || die
use selinux || { echo -e "#!/bin/sh\ntrue" > \
selinux_tag.sh || die; }
}

src_compile() {
GOPATH="${WORKDIR}/${P}" emake all
}

src_install() {
dodoc CHANGELOG.md CONTRIBUTING.md README.md install.md troubleshooting.md
doman docs/*.1
dodoc -r docs/tutorials
dobin ${PN} imgtype
dobashcomp contrib/completions/bash/buildah
}

src_test() {
GOPATH="${WORKDIR}/${P}" emake test-unit
}

0 comments on commit 9bfb166

Please sign in to comment.