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