summaryrefslogtreecommitdiff
path: root/app-emulation/libpod
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-06-29 11:38:31 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-06-29 11:38:31 +0100
commit90c88731bd036e5698b281fbc0a5f3aa4c9983ac (patch)
tree83fc5facb6b12be510a37bc3d241cc63e965b13a /app-emulation/libpod
parentfeb0daf81d888e9160f9f94502de09b66f2a63fd (diff)
gentoo resync : 29.06.2020
Diffstat (limited to 'app-emulation/libpod')
-rw-r--r--app-emulation/libpod/Manifest2
-rw-r--r--app-emulation/libpod/libpod-2.0.1.ebuild150
2 files changed, 152 insertions, 0 deletions
diff --git a/app-emulation/libpod/Manifest b/app-emulation/libpod/Manifest
index d180ff9e8de2..a8406942dc29 100644
--- a/app-emulation/libpod/Manifest
+++ b/app-emulation/libpod/Manifest
@@ -3,7 +3,9 @@ AUX podman.logrotated 85 BLAKE2B 730899f93ee354e476629276b69224cfeaaa1603b6690ca
DIST libpod-1.8.2.tar.gz 30065262 BLAKE2B 1bf4ca9b9547a710f1882ac40aee0cf295fecdb9d43dc6fa30633331ca9e19d15e6d671075627939167cdf100d30e8299e50bd51425226ff1994778782cf261b SHA512 c6e1426f66299a21be66be033460c44830b422f8a3319f37bbe53030f6a2bf84b140a29f30b83f6b61199f1df373f81a6d73787d16423ad942fc8a9154c68366
DIST libpod-1.9.3.tar.gz 8869143 BLAKE2B 52c049c3a9c96729f32c1b7a9fc4b182614d18edd12ee1d5b19730a870b694f5c4489577bbf547cf86baf51b6fadfdf1a1513ff784a4c549f5b737549187f3a3 SHA512 d85cdf49b740f47a341b7717a4bc22ff326d22234e224bd572a3d879b75eaa33139bebdc293c2e7bc41a9902289d89380b9b56975a0826172324e9a54f8f5e03
DIST libpod-2.0.0.tar.gz 9126598 BLAKE2B 3c2d18a921b88ef235b14f069e7571f83b1add39ec4ecd20b98f4879d287c481a525e01969c9b62f8b81e0be43eb864266f32f78af3f1a5ca92c4b1c4a9a16ce SHA512 29f7e365dbd4ab6d20ee3e85939804f74dcfe95f65a6d030d1c10a36512c29d3934907cbb014047d659fd96ed3a2946570ef7922cd77cc729370ac099b4b58a2
+DIST libpod-2.0.1.tar.gz 9136153 BLAKE2B 4c60dc047ae7fd6a2918589a30f6dc94c13251ed0002e77919adfb9dbe0a3c7b14e40e204c5879273589673a573aa318a3d5b972c32236143e166cb96a7cc3c8 SHA512 e52d3eef3d698360a0196dca6338c319511b6685c0237bd4d24a3763eb5e46262946d7609d1f36798dec6eb63d4511efdc8b77fa22c06bd55b666505f4fe6730
EBUILD libpod-1.8.2.ebuild 3881 BLAKE2B 4555be189f9d335b03b6eb074155c039d604395b5ae0772cf3da1502b6a626266c80b9a2ec997dc4c13b31bdfb9f30877da749a0810ec2beac594ee4c0502f1f SHA512 001f631f58a2e0d11f07c5739ed7e2a3c36b0de5dfbe0637e3cb06d31ba68e730de59e05e0e155c92702f39bcd4da05d43e795c1030b800d50198158fd06bed4
EBUILD libpod-1.9.3.ebuild 3920 BLAKE2B d65bd39116779af1c238061b5d8696615a789c2a5874a0aec558d67d5f760be6785c84be56f75a310cd312078db14b937a4695b7432a50b1236296af4155600b SHA512 e9f823ad0f4a513e760ce0108af2621a1f9f029a603cc87be4f743e99cde57c44bd28242c89f3702d2ddef3af65cfe51ecce5ea552e5320f8bd27f34c1c6777a
EBUILD libpod-2.0.0.ebuild 4335 BLAKE2B 7d9c3f7bbbc09135dfb63034d24ffd7b23b06a107a5d00967ce4a1ec978a7d6e647e2fac818289ca5cff060f46d93075e7d8dc01762e4a0a616885d668ccad4c SHA512 cf72840fde4a723ccb39573fb6ffc460195c7fe8a056241003de385dda9e3a48a0af4e9d8130d58c70614f1d7ea84fbe5e7d1ef3a3329f725d6464688e64796c
+EBUILD libpod-2.0.1.ebuild 4335 BLAKE2B 3d031ce218cd8b0f258c3caaab69e6c337f0a54e8c4507e85cd8fe4d77a2d95ed3ab4047850584a5a0a095c82755d67a9965be93d8c0978f11b3a95e636cec3d SHA512 182349484588aa6c169fee9af2d615b7102d9fc7deae0e9cf0ebffbf853b3e7c99b82d6bf3e4407cb746daf067205263dbed6211f753b068e696622878064979
MISC metadata.xml 999 BLAKE2B 4cc701468adb97983a347a94a76ad7966a54a5d4d5e3dcdae0a87e6bc81a45eac46ff120c576d16ea1f8145d6ab86b51b3671d9baa35945d4f104a7f8237854e SHA512 679b1a932037e7f7d209e7f6485dac8c3f2cd7be161fd342dc8158567f03c5692e487d23de4dda62c4ff629c96f0e2ea715dd9c8523e457b090bae5824bd3646
diff --git a/app-emulation/libpod/libpod-2.0.1.ebuild b/app-emulation/libpod/libpod-2.0.1.ebuild
new file mode 100644
index 000000000000..bfded9611d46
--- /dev/null
+++ b/app-emulation/libpod/libpod-2.0.1.ebuild
@@ -0,0 +1,150 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+EGIT_COMMIT="a11c4ead10177a66ef2810a0a92ea8ce2299da07"
+
+inherit bash-completion-r1 flag-o-matic go-module
+
+DESCRIPTION="Library and podman tool for running OCI-based containers in Pods"
+HOMEPAGE="https://github.com/containers/libpod/"
+SRC_URI="https://github.com/containers/libpod/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="Apache-2.0 BSD BSD-2 CC-BY-SA-4.0 ISC MIT MPL-2.0"
+SLOT="0"
+
+KEYWORDS="~amd64"
+IUSE="apparmor btrfs +fuse +rootless selinux"
+RESTRICT="test"
+
+COMMON_DEPEND="
+ app-crypt/gpgme:=
+ >=app-emulation/conmon-2.0.0
+ || ( >=app-emulation/runc-1.0.0_rc6 app-emulation/crun )
+ dev-libs/libassuan:=
+ dev-libs/libgpg-error:=
+ >=net-misc/cni-plugins-0.8.6
+ sys-fs/lvm2
+ sys-libs/libseccomp:=
+
+ apparmor? ( sys-libs/libapparmor )
+ btrfs? ( sys-fs/btrfs-progs )
+ rootless? ( app-emulation/slirp4netns )
+ selinux? ( sys-libs/libselinux:= )
+"
+DEPEND="
+ ${COMMON_DEPEND}
+ dev-go/go-md2man"
+RDEPEND="${COMMON_DEPEND}
+ fuse? ( sys-fs/fuse-overlayfs )"
+
+src_prepare() {
+ default
+
+ # Disable installation of python modules here, since those are
+ # installed by separate ebuilds.
+ local makefile_sed_args=(
+ -e '/^GIT_.*/d'
+ -e 's/$(GO) build/$(GO) build -v -work -x/'
+ -e 's/^\(install:.*\) install\.python$/\1/'
+ -e 's|^pkg/varlink/iopodman.go: .gopathok pkg/varlink/io.podman.varlink$|pkg/varlink/iopodman.go: pkg/varlink/io.podman.varlink|'
+ )
+
+ has_version -b '>=dev-lang/go-1.13.9' || makefile_sed_args+=(-e 's:GO111MODULE=off:GO111MODULE=on:')
+
+ sed "${makefile_sed_args[@]}" -i Makefile || die
+
+ sed -e 's|OUTPUT="${CIRRUS_TAG:.*|OUTPUT='v${PV}'|' \
+ -i hack/get_release_info.sh || die
+}
+
+src_compile() {
+ # Filter unsupported linker flags
+ filter-flags '-Wl,*'
+
+ [[ -f hack/apparmor_tag.sh ]] || die
+ if use apparmor; then
+ echo -e "#!/bin/sh\necho apparmor" > hack/apparmor_tag.sh || die
+ else
+ echo -e "#!/bin/sh\ntrue" > hack/apparmor_tag.sh || die
+ fi
+
+ [[ -f hack/btrfs_installed_tag.sh ]] || die
+ if use btrfs; then
+ echo -e "#!/bin/sh\ntrue" > hack/btrfs_installed_tag.sh || die
+ else
+ echo -e "#!/bin/sh\necho exclude_graphdriver_btrfs" > \
+ hack/btrfs_installed_tag.sh || die
+ fi
+
+ [[ -f hack/selinux_tag.sh ]] || die
+ if use selinux; then
+ echo -e "#!/bin/sh\necho selinux" > hack/selinux_tag.sh || die
+ else
+ echo -e "#!/bin/sh\ntrue" > hack/selinux_tag.sh || die
+ fi
+
+ # Avoid this error when generating pkg/varlink/iopodman.go:
+ # cannot find package "github.com/varlink/go/varlink/idl"
+ mkdir -p _output || die
+ ln -snf ../vendor _output/src || die
+ GO111MODULE=off GOPATH=${PWD}/_output go generate ./pkg/varlink/... || die
+ rm _output/src || die
+
+ export -n GOCACHE GOPATH XDG_CACHE_HOME
+ GOBIN="${S}/bin" \
+ emake all \
+ GIT_BRANCH=master \
+ GIT_BRANCH_CLEAN=master \
+ COMMIT_NO="${EGIT_COMMIT}" \
+ GIT_COMMIT="${EGIT_COMMIT}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
+
+ insinto /etc/containers
+ newins test/registries.conf registries.conf.example
+ newins test/policy.json policy.json.example
+
+ insinto /usr/share/containers
+ doins seccomp.json
+
+ newinitd "${FILESDIR}"/podman.initd podman
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/podman.logrotated" podman
+
+ dobashcomp completions/bash/*
+
+ keepdir /var/lib/containers
+}
+
+pkg_preinst() {
+ LIBPOD_ROOTLESS_UPGRADE=false
+ if use rootless; then
+ has_version 'app-emulation/libpod[rootless]' || LIBPOD_ROOTLESS_UPGRADE=true
+ fi
+}
+
+pkg_postinst() {
+ local want_newline=false
+ if [[ ! ( -e ${EROOT%/*}/etc/containers/policy.json && -e ${EROOT%/*}/etc/containers/registries.conf ) ]]; then
+ elog "You need to create the following config files:"
+ elog "/etc/containers/registries.conf"
+ elog "/etc/containers/policy.json"
+ elog "To copy over default examples, use:"
+ elog "cp /etc/containers/registries.conf{.example,}"
+ elog "cp /etc/containers/policy.json{.example,}"
+ want_newline=true
+ fi
+ if [[ ${LIBPOD_ROOTLESS_UPGRADE} == true ]] ; then
+ ${want_newline} && elog ""
+ elog "For rootless operation, you need to configure subuid/subgid"
+ elog "for user running podman. In case subuid/subgid has only been"
+ elog "configured for root, run:"
+ elog "usermod --add-subuids 1065536-1131071 <user>"
+ elog "usermod --add-subgids 1065536-1131071 <user>"
+ want_newline=true
+ fi
+}