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: Mon, 25 May 2020 22:53:13
Message-Id: 1590446938.7eb078e546b1c76a13c6f3b195afb6f7eabd5102.zmedico@gentoo
1 commit: 7eb078e546b1c76a13c6f3b195afb6f7eabd5102
2 Author: Bruce Guenter <bruce <AT> untroubled <DOT> org>
3 AuthorDate: Mon May 25 22:06:37 2020 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Mon May 25 22:48:58 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7eb078e5
7
8 app-emulation/libpod: Bump version to 1.9.3
9
10 Closes: https://github.com/gentoo/gentoo/pull/15970
11 Package-Manager: Portage-2.3.99, Repoman-2.3.22
12 Signed-off-by: Bruce Guenter <bruce <AT> untroubled.org>
13 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
14
15 app-emulation/libpod/Manifest | 1 +
16 app-emulation/libpod/libpod-1.9.3.ebuild | 142 +++++++++++++++++++++++++++++++
17 2 files changed, 143 insertions(+)
18
19 diff --git a/app-emulation/libpod/Manifest b/app-emulation/libpod/Manifest
20 index c8593e08407..f1f66469e8e 100644
21 --- a/app-emulation/libpod/Manifest
22 +++ b/app-emulation/libpod/Manifest
23 @@ -1,2 +1,3 @@
24 DIST libpod-1.8.2.tar.gz 30065262 BLAKE2B 1bf4ca9b9547a710f1882ac40aee0cf295fecdb9d43dc6fa30633331ca9e19d15e6d671075627939167cdf100d30e8299e50bd51425226ff1994778782cf261b SHA512 c6e1426f66299a21be66be033460c44830b422f8a3319f37bbe53030f6a2bf84b140a29f30b83f6b61199f1df373f81a6d73787d16423ad942fc8a9154c68366
25 DIST libpod-1.9.0.tar.gz 8865279 BLAKE2B 70b83f7c0482f0cbf94f235752b241aec61790d2ec01abed6ab3eb98c5de4a338e84e70c7d5fbcb239f33a7a209160c8c4868b3b86797ac8be58f08ddde5d35d SHA512 ba7de72e03dc55896025b698465745873f3030547e19133b835e4f47c1cd1c0261f17845d50cbe7b824db2a9ed77def7883405637333e141f7abecada644b5be
26 +DIST libpod-1.9.3.tar.gz 8869143 BLAKE2B 52c049c3a9c96729f32c1b7a9fc4b182614d18edd12ee1d5b19730a870b694f5c4489577bbf547cf86baf51b6fadfdf1a1513ff784a4c549f5b737549187f3a3 SHA512 d85cdf49b740f47a341b7717a4bc22ff326d22234e224bd572a3d879b75eaa33139bebdc293c2e7bc41a9902289d89380b9b56975a0826172324e9a54f8f5e03
27
28 diff --git a/app-emulation/libpod/libpod-1.9.3.ebuild b/app-emulation/libpod/libpod-1.9.3.ebuild
29 new file mode 100644
30 index 00000000000..14807bcc355
31 --- /dev/null
32 +++ b/app-emulation/libpod/libpod-1.9.3.ebuild
33 @@ -0,0 +1,142 @@
34 +# Copyright 1999-2020 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=7
38 +
39 +EGIT_COMMIT="5d44534fff6877b1cb15b760242279ae6293154c"
40 +
41 +inherit bash-completion-r1 flag-o-matic go-module
42 +
43 +DESCRIPTION="Library and podman tool for running OCI-based containers in Pods"
44 +HOMEPAGE="https://github.com/containers/libpod/"
45 +SRC_URI="https://github.com/containers/libpod/archive/v${PV}.tar.gz -> ${P}.tar.gz"
46 +LICENSE="Apache-2.0 BSD BSD-2 CC-BY-SA-4.0 ISC MIT MPL-2.0"
47 +SLOT="0"
48 +
49 +KEYWORDS="~amd64"
50 +IUSE="apparmor btrfs +fuse +rootless selinux"
51 +RESTRICT="test"
52 +
53 +COMMON_DEPEND="
54 + app-crypt/gpgme:=
55 + >=app-emulation/conmon-2.0.0
56 + || ( >=app-emulation/runc-1.0.0_rc6 app-emulation/crun )
57 + dev-libs/libassuan:=
58 + dev-libs/libgpg-error:=
59 + net-misc/cni-plugins
60 + sys-fs/lvm2
61 + sys-libs/libseccomp:=
62 +
63 + apparmor? ( sys-libs/libapparmor )
64 + btrfs? ( sys-fs/btrfs-progs )
65 + rootless? ( app-emulation/slirp4netns )
66 + selinux? ( sys-libs/libselinux:= )
67 +"
68 +DEPEND="
69 + ${COMMON_DEPEND}
70 + dev-go/go-md2man"
71 +RDEPEND="${COMMON_DEPEND}
72 + fuse? ( sys-fs/fuse-overlayfs )"
73 +
74 +src_prepare() {
75 + default
76 +
77 + # Disable installation of python modules here, since those are
78 + # installed by separate ebuilds.
79 + local makefile_sed_args=(
80 + -e '/^GIT_.*/d'
81 + -e 's/$(GO) build/$(GO) build -v -work -x/'
82 + -e 's/^\(install:.*\) install\.python$/\1/'
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 + export -n GOCACHE GOPATH XDG_CACHE_HOME
120 + GOBIN="${S}/bin" \
121 + emake all \
122 + GIT_BRANCH=master \
123 + GIT_BRANCH_CLEAN=master \
124 + COMMIT_NO="${EGIT_COMMIT}" \
125 + GIT_COMMIT="${EGIT_COMMIT}"
126 +}
127 +
128 +src_install() {
129 + emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
130 +
131 + insinto /etc/containers
132 + newins test/registries.conf registries.conf.example
133 + newins test/policy.json policy.json.example
134 +
135 + insinto /usr/share/containers
136 + doins seccomp.json
137 +
138 + newinitd "${FILESDIR}"/podman.initd podman
139 +
140 + insinto /etc/logrotate.d
141 + newins "${FILESDIR}/podman.logrotated" podman
142 +
143 + dobashcomp completions/bash/*
144 +
145 + keepdir /var/lib/containers
146 +}
147 +
148 +pkg_preinst() {
149 + LIBPOD_ROOTLESS_UPGRADE=false
150 + if use rootless; then
151 + has_version 'app-emulation/libpod[rootless]' || LIBPOD_ROOTLESS_UPGRADE=true
152 + fi
153 +}
154 +
155 +pkg_postinst() {
156 + local want_newline=false
157 + if [[ ! ( -e ${EROOT%/*}/etc/containers/policy.json && -e ${EROOT%/*}/etc/containers/registries.conf ) ]]; then
158 + elog "You need to create the following config files:"
159 + elog "/etc/containers/registries.conf"
160 + elog "/etc/containers/policy.json"
161 + elog "To copy over default examples, use:"
162 + elog "cp /etc/containers/registries.conf{.example,}"
163 + elog "cp /etc/containers/policy.json{.example,}"
164 + want_newline=true
165 + fi
166 + if [[ ${LIBPOD_ROOTLESS_UPGRADE} == true ]] ; then
167 + ${want_newline} && elog ""
168 + elog "For rootless operation, you need to configure subuid/subgid"
169 + elog "for user running podman. In case subuid/subgid has only been"
170 + elog "configured for root, run:"
171 + elog "usermod --add-subuids 1065536-1131071 <user>"
172 + elog "usermod --add-subgids 1065536-1131071 <user>"
173 + want_newline=true
174 + fi
175 +}