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: Fri, 18 Oct 2019 05:30:21
Message-Id: 1571376604.dd5b2cef22827af1f16a3121401549fc5cccf60b.zmedico@gentoo
1 commit: dd5b2cef22827af1f16a3121401549fc5cccf60b
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Fri Oct 18 05:15:46 2019 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Fri Oct 18 05:30:04 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dd5b2cef
7
8 app-emulation/libpod: Bump to version 1.6.2
9
10 Package-Manager: Portage-2.3.77, Repoman-2.3.17
11 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
12
13 app-emulation/libpod/Manifest | 1 +
14 app-emulation/libpod/libpod-1.6.2.ebuild | 142 +++++++++++++++++++++++++++++++
15 2 files changed, 143 insertions(+)
16
17 diff --git a/app-emulation/libpod/Manifest b/app-emulation/libpod/Manifest
18 index d81a0348f34..24023149209 100644
19 --- a/app-emulation/libpod/Manifest
20 +++ b/app-emulation/libpod/Manifest
21 @@ -1 +1,2 @@
22 DIST libpod-1.5.1.tar.gz 8010274 BLAKE2B 4928b45a6d86fe14ff7359c856da664d14fc578dcff095c984eb0fa3b4aed42576cf610f19a9015064f406109d79cd6df60eb0b2990e5058de1e4f9f7d9ae7ee SHA512 d9d422c4189adb840cfe3dd8b7e8278412f0ea17e4ccd2cdf4f4b134a87b1add61bbdca1c8d9db3db846c272e2ab3f624bf9e4aac005b78d0c7e161af898dc02
23 +DIST libpod-1.6.2.tar.gz 8270781 BLAKE2B 5d86533ddc821f731292e126102a31d651956c275a22c5c4ab3c57b9351832a1d85d75be877343c60af47716f9d1776315b3bf41fb17037d02fee10cf88efba3 SHA512 68192dda019623e3f3af9f82f946be8efbaf3e2c54acf23f62af67ac1ca093dd4dba11d2a7c1c950b99060393ed7e945752c1eaa9eada0dfc30f3dcaac8e1c04
24
25 diff --git a/app-emulation/libpod/libpod-1.6.2.ebuild b/app-emulation/libpod/libpod-1.6.2.ebuild
26 new file mode 100644
27 index 00000000000..9c1a41555c1
28 --- /dev/null
29 +++ b/app-emulation/libpod/libpod-1.6.2.ebuild
30 @@ -0,0 +1,142 @@
31 +# Copyright 1999-2019 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=7
35 +
36 +EGIT_COMMIT="f3ffda1e08f19e9a6a88484136b5eed76533f21a"
37 +EGO_PN="github.com/containers/${PN}"
38 +
39 +inherit bash-completion-r1 flag-o-matic golang-vcs-snapshot
40 +
41 +DESCRIPTION="Library and podman tool for running OCI-based containers in Pods"
42 +HOMEPAGE="https://github.com/containers/libpod/"
43 +SRC_URI="https://github.com/containers/libpod/archive/v${PV}.tar.gz -> ${P}.tar.gz"
44 +LICENSE="Apache-2.0 BSD BSD-2 CC-BY-SA-4.0 ISC MIT MPL-2.0"
45 +SLOT="0"
46 +
47 +KEYWORDS="~amd64"
48 +IUSE="apparmor btrfs ostree +rootless selinux"
49 +REQUIRED_USE="!selinux? ( !ostree )"
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
56 + dev-libs/libassuan:=
57 + dev-libs/libgpg-error:=
58 + sys-fs/lvm2
59 + sys-libs/libseccomp:=
60 +
61 + apparmor? ( sys-libs/libapparmor )
62 + btrfs? ( sys-fs/btrfs-progs )
63 + ostree? (
64 + dev-libs/glib:=
65 + dev-util/ostree:=
66 + )
67 + rootless? ( app-emulation/slirp4netns )
68 + selinux? ( sys-libs/libselinux:= )
69 +"
70 +DEPEND="
71 + ${COMMON_DEPEND}
72 + dev-go/go-md2man"
73 +RDEPEND="${COMMON_DEPEND}"
74 +S="${WORKDIR}/${P}/src/${EGO_PN}"
75 +
76 +src_prepare() {
77 + default
78 +
79 + # Disable installation of python modules here, since those are
80 + # installed by separate ebuilds.
81 + sed -e '/^GIT_.*/d' \
82 + -e 's/$(GO) build/$(GO) build -v -work -x/' \
83 + -e 's/^\(install:.*\) install\.python$/\1/' \
84 + -i Makefile || die
85 +}
86 +
87 +src_compile() {
88 + # Filter unsupported linker flags
89 + filter-flags '-Wl,*'
90 +
91 + [[ -f hack/apparmor_tag.sh ]] || die
92 + if use apparmor; then
93 + echo -e "#!/bin/sh\necho apparmor" > hack/apparmor_tag.sh || die
94 + else
95 + echo -e "#!/bin/sh\ntrue" > hack/apparmor_tag.sh || die
96 + fi
97 +
98 + [[ -f hack/btrfs_installed_tag.sh ]] || die
99 + if use btrfs; then
100 + echo -e "#!/bin/sh\ntrue" > hack/btrfs_installed_tag.sh || die
101 + else
102 + echo -e "#!/bin/sh\necho exclude_graphdriver_btrfs" > \
103 + hack/btrfs_installed_tag.sh || die
104 + fi
105 +
106 + [[ -f hack/ostree_tag.sh ]] || die
107 + if use ostree; then
108 + echo -e "#!/bin/sh\necho ostree" > hack/ostree_tag.sh || die
109 + else
110 + echo -e "#!/bin/sh\necho containers_image_ostree_stub" > hack/ostree_tag.sh || die
111 + fi
112 +
113 + [[ -f hack/selinux_tag.sh ]] || die
114 + if use selinux; then
115 + echo -e "#!/bin/sh\necho selinux" > hack/selinux_tag.sh || die
116 + else
117 + echo -e "#!/bin/sh\ntrue" > hack/selinux_tag.sh || die
118 + fi
119 +
120 + env -u GOCACHE -u XDG_CACHE_HOME GOPATH="${WORKDIR}/${P}" GOBIN="${WORKDIR}/${P}/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 + newinitd "${FILESDIR}"/podman.initd podman
136 +
137 + insinto /etc/logrotate.d
138 + newins "${FILESDIR}/podman.logrotated" podman
139 +
140 + dobashcomp completions/bash/*
141 +
142 + keepdir /var/lib/containers
143 +}
144 +
145 +pkg_preinst() {
146 + LIBPOD_ROOTLESS_UPGRADE=false
147 + if use rootless; then
148 + has_version 'app-emulation/libpod[rootless]' || LIBPOD_ROOTLESS_UPGRADE=true
149 + fi
150 +}
151 +
152 +pkg_postinst() {
153 + local want_newline=false
154 + if [[ ! ( -e ${EROOT%/*}/etc/containers/policy.json && -e ${EROOT%/*}/etc/containers/registries.conf ) ]]; then
155 + elog "You need to create the following config files:"
156 + elog "/etc/containers/registries.conf"
157 + elog "/etc/containers/policy.json"
158 + elog "To copy over default examples, use:"
159 + elog "cp /etc/containers/registries.conf{.example,}"
160 + elog "cp /etc/containers/policy.json{.example,}"
161 + want_newline=true
162 + fi
163 + if [[ ${LIBPOD_ROOTLESS_UPGRADE} == true ]] ; then
164 + ${want_newline} && elog ""
165 + elog "For rootless operation, you need to configure subuid/subgid"
166 + elog "for user running podman. In case subuid/subgid has only been"
167 + elog "configured for root, run:"
168 + elog "usermod --add-subuids 1065536-1131071 <user>"
169 + elog "usermod --add-subgids 1065536-1131071 <user>"
170 + want_newline=true
171 + fi
172 +}