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