Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/libpod/
Date: Sun, 28 Jun 2020 20:53:11
Message-Id: 1593377583.614d361bbcfd5d112a3d9bf5acb63747e0941f7a.zmedico@gentoo
1 commit: 614d361bbcfd5d112a3d9bf5acb63747e0941f7a
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jun 28 20:42:17 2020 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Sun Jun 28 20:53:03 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=614d361b
7
8 app-emulation/libpod: Bump to version 2.0.1
9
10 Package-Manager: Portage-2.3.103, Repoman-2.3.23
11 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
12
13 app-emulation/libpod/Manifest | 1 +
14 app-emulation/libpod/libpod-2.0.1.ebuild | 150 +++++++++++++++++++++++++++++++
15 2 files changed, 151 insertions(+)
16
17 diff --git a/app-emulation/libpod/Manifest b/app-emulation/libpod/Manifest
18 index 2cf76f594e7..858844b0491 100644
19 --- a/app-emulation/libpod/Manifest
20 +++ b/app-emulation/libpod/Manifest
21 @@ -1,3 +1,4 @@
22 DIST libpod-1.8.2.tar.gz 30065262 BLAKE2B 1bf4ca9b9547a710f1882ac40aee0cf295fecdb9d43dc6fa30633331ca9e19d15e6d671075627939167cdf100d30e8299e50bd51425226ff1994778782cf261b SHA512 c6e1426f66299a21be66be033460c44830b422f8a3319f37bbe53030f6a2bf84b140a29f30b83f6b61199f1df373f81a6d73787d16423ad942fc8a9154c68366
23 DIST libpod-1.9.3.tar.gz 8869143 BLAKE2B 52c049c3a9c96729f32c1b7a9fc4b182614d18edd12ee1d5b19730a870b694f5c4489577bbf547cf86baf51b6fadfdf1a1513ff784a4c549f5b737549187f3a3 SHA512 d85cdf49b740f47a341b7717a4bc22ff326d22234e224bd572a3d879b75eaa33139bebdc293c2e7bc41a9902289d89380b9b56975a0826172324e9a54f8f5e03
24 DIST libpod-2.0.0.tar.gz 9126598 BLAKE2B 3c2d18a921b88ef235b14f069e7571f83b1add39ec4ecd20b98f4879d287c481a525e01969c9b62f8b81e0be43eb864266f32f78af3f1a5ca92c4b1c4a9a16ce SHA512 29f7e365dbd4ab6d20ee3e85939804f74dcfe95f65a6d030d1c10a36512c29d3934907cbb014047d659fd96ed3a2946570ef7922cd77cc729370ac099b4b58a2
25 +DIST libpod-2.0.1.tar.gz 9136153 BLAKE2B 4c60dc047ae7fd6a2918589a30f6dc94c13251ed0002e77919adfb9dbe0a3c7b14e40e204c5879273589673a573aa318a3d5b972c32236143e166cb96a7cc3c8 SHA512 e52d3eef3d698360a0196dca6338c319511b6685c0237bd4d24a3763eb5e46262946d7609d1f36798dec6eb63d4511efdc8b77fa22c06bd55b666505f4fe6730
26
27 diff --git a/app-emulation/libpod/libpod-2.0.1.ebuild b/app-emulation/libpod/libpod-2.0.1.ebuild
28 new file mode 100644
29 index 00000000000..bfded9611d4
30 --- /dev/null
31 +++ b/app-emulation/libpod/libpod-2.0.1.ebuild
32 @@ -0,0 +1,150 @@
33 +# Copyright 1999-2020 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +EGIT_COMMIT="a11c4ead10177a66ef2810a0a92ea8ce2299da07"
39 +
40 +inherit bash-completion-r1 flag-o-matic go-module
41 +
42 +DESCRIPTION="Library and podman tool for running OCI-based containers in Pods"
43 +HOMEPAGE="https://github.com/containers/libpod/"
44 +SRC_URI="https://github.com/containers/libpod/archive/v${PV}.tar.gz -> ${P}.tar.gz"
45 +LICENSE="Apache-2.0 BSD BSD-2 CC-BY-SA-4.0 ISC MIT MPL-2.0"
46 +SLOT="0"
47 +
48 +KEYWORDS="~amd64"
49 +IUSE="apparmor btrfs +fuse +rootless selinux"
50 +RESTRICT="test"
51 +
52 +COMMON_DEPEND="
53 + app-crypt/gpgme:=
54 + >=app-emulation/conmon-2.0.0
55 + || ( >=app-emulation/runc-1.0.0_rc6 app-emulation/crun )
56 + dev-libs/libassuan:=
57 + dev-libs/libgpg-error:=
58 + >=net-misc/cni-plugins-0.8.6
59 + sys-fs/lvm2
60 + sys-libs/libseccomp:=
61 +
62 + apparmor? ( sys-libs/libapparmor )
63 + btrfs? ( sys-fs/btrfs-progs )
64 + rootless? ( app-emulation/slirp4netns )
65 + selinux? ( sys-libs/libselinux:= )
66 +"
67 +DEPEND="
68 + ${COMMON_DEPEND}
69 + dev-go/go-md2man"
70 +RDEPEND="${COMMON_DEPEND}
71 + fuse? ( sys-fs/fuse-overlayfs )"
72 +
73 +src_prepare() {
74 + default
75 +
76 + # Disable installation of python modules here, since those are
77 + # installed by separate ebuilds.
78 + local makefile_sed_args=(
79 + -e '/^GIT_.*/d'
80 + -e 's/$(GO) build/$(GO) build -v -work -x/'
81 + -e 's/^\(install:.*\) install\.python$/\1/'
82 + -e 's|^pkg/varlink/iopodman.go: .gopathok pkg/varlink/io.podman.varlink$|pkg/varlink/iopodman.go: pkg/varlink/io.podman.varlink|'
83 + )
84 +
85 + has_version -b '>=dev-lang/go-1.13.9' || makefile_sed_args+=(-e 's:GO111MODULE=off:GO111MODULE=on:')
86 +
87 + sed "${makefile_sed_args[@]}" -i Makefile || die
88 +
89 + sed -e 's|OUTPUT="${CIRRUS_TAG:.*|OUTPUT='v${PV}'|' \
90 + -i hack/get_release_info.sh || die
91 +}
92 +
93 +src_compile() {
94 + # Filter unsupported linker flags
95 + filter-flags '-Wl,*'
96 +
97 + [[ -f hack/apparmor_tag.sh ]] || die
98 + if use apparmor; then
99 + echo -e "#!/bin/sh\necho apparmor" > hack/apparmor_tag.sh || die
100 + else
101 + echo -e "#!/bin/sh\ntrue" > hack/apparmor_tag.sh || die
102 + fi
103 +
104 + [[ -f hack/btrfs_installed_tag.sh ]] || die
105 + if use btrfs; then
106 + echo -e "#!/bin/sh\ntrue" > hack/btrfs_installed_tag.sh || die
107 + else
108 + echo -e "#!/bin/sh\necho exclude_graphdriver_btrfs" > \
109 + hack/btrfs_installed_tag.sh || die
110 + fi
111 +
112 + [[ -f hack/selinux_tag.sh ]] || die
113 + if use selinux; then
114 + echo -e "#!/bin/sh\necho selinux" > hack/selinux_tag.sh || die
115 + else
116 + echo -e "#!/bin/sh\ntrue" > hack/selinux_tag.sh || die
117 + fi
118 +
119 + # Avoid this error when generating pkg/varlink/iopodman.go:
120 + # cannot find package "github.com/varlink/go/varlink/idl"
121 + mkdir -p _output || die
122 + ln -snf ../vendor _output/src || die
123 + GO111MODULE=off GOPATH=${PWD}/_output go generate ./pkg/varlink/... || die
124 + rm _output/src || die
125 +
126 + export -n GOCACHE GOPATH XDG_CACHE_HOME
127 + GOBIN="${S}/bin" \
128 + emake all \
129 + GIT_BRANCH=master \
130 + GIT_BRANCH_CLEAN=master \
131 + COMMIT_NO="${EGIT_COMMIT}" \
132 + GIT_COMMIT="${EGIT_COMMIT}"
133 +}
134 +
135 +src_install() {
136 + emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
137 +
138 + insinto /etc/containers
139 + newins test/registries.conf registries.conf.example
140 + newins test/policy.json policy.json.example
141 +
142 + insinto /usr/share/containers
143 + doins seccomp.json
144 +
145 + newinitd "${FILESDIR}"/podman.initd podman
146 +
147 + insinto /etc/logrotate.d
148 + newins "${FILESDIR}/podman.logrotated" podman
149 +
150 + dobashcomp completions/bash/*
151 +
152 + keepdir /var/lib/containers
153 +}
154 +
155 +pkg_preinst() {
156 + LIBPOD_ROOTLESS_UPGRADE=false
157 + if use rootless; then
158 + has_version 'app-emulation/libpod[rootless]' || LIBPOD_ROOTLESS_UPGRADE=true
159 + fi
160 +}
161 +
162 +pkg_postinst() {
163 + local want_newline=false
164 + if [[ ! ( -e ${EROOT%/*}/etc/containers/policy.json && -e ${EROOT%/*}/etc/containers/registries.conf ) ]]; then
165 + elog "You need to create the following config files:"
166 + elog "/etc/containers/registries.conf"
167 + elog "/etc/containers/policy.json"
168 + elog "To copy over default examples, use:"
169 + elog "cp /etc/containers/registries.conf{.example,}"
170 + elog "cp /etc/containers/policy.json{.example,}"
171 + want_newline=true
172 + fi
173 + if [[ ${LIBPOD_ROOTLESS_UPGRADE} == true ]] ; then
174 + ${want_newline} && elog ""
175 + elog "For rootless operation, you need to configure subuid/subgid"
176 + elog "for user running podman. In case subuid/subgid has only been"
177 + elog "configured for root, run:"
178 + elog "usermod --add-subuids 1065536-1131071 <user>"
179 + elog "usermod --add-subgids 1065536-1131071 <user>"
180 + want_newline=true
181 + fi
182 +}