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, 13 Mar 2019 16:52:54
Message-Id: 1552495960.c369c88e9ba3e1c18740fa6d705b9a078d67c254.zmedico@gentoo
1 commit: c369c88e9ba3e1c18740fa6d705b9a078d67c254
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Wed Mar 13 16:49:11 2019 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Wed Mar 13 16:52:40 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c369c88e
7
8 app-emulation/libpod: version bump to 1.1.2
9
10 Reported-by: Dennis Schridde <devurandom <AT> gmx.net>
11 Closes: https://bugs.gentoo.org/680228
12 Package-Manager: Portage-2.3.62, Repoman-2.3.12
13 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
14
15 app-emulation/libpod/Manifest | 1 +
16 app-emulation/libpod/libpod-1.1.2.ebuild | 139 +++++++++++++++++++++++++++++++
17 2 files changed, 140 insertions(+)
18
19 diff --git a/app-emulation/libpod/Manifest b/app-emulation/libpod/Manifest
20 index 75ea1c1bff5..ce3196b69d4 100644
21 --- a/app-emulation/libpod/Manifest
22 +++ b/app-emulation/libpod/Manifest
23 @@ -1,2 +1,3 @@
24 DIST libpod-0.12.1.2.tar.gz 5987875 BLAKE2B 11381c53e768c94bfadcb2013a028f64058b0001cd985ef289d1618163225cdf10bd608cff0cd6f7fc1c094497184fc6d0cedea32fde54f3581ebb51eb5eabdd SHA512 9abb46d7880c4577d22b48aed01baeae29662dc3dbbdbc297f1eebe8324fb734d9bac6cd105dc93f7600753874c0fa581142d1b16f7490175cea80b8f62b34ce
25 DIST libpod-1.0.1.tar.gz 6088749 BLAKE2B 64e28c6c7b60e226cae6a302e6e26ca5c2659d3c61910cc6fd2bbceec20485d7f2106d32da0472bc18a08bd611a6f0bf851b5c46066b47613783768c53a4c034 SHA512 23515fa3934ba2ec174011362ab1b67c747a7bf3122e606677ed40eb18aad28f79da30d09b6e1d0b74384286ff600fd1441fa4b6424e8bf3e410e867b57d92ef
26 +DIST libpod-1.1.2.tar.gz 7878228 BLAKE2B 8974949843c6f966d48715df320e47b814e442e374e1393dd5a116c6f7222e9ce29f480205f6a58e213e6cead58e5b4f31fd776865911b22e517607349654d35 SHA512 55456fe03da0873d3f6c67ced25dbe98f6a5a14c3da64ab2b4a9c6161c1d727ec8cdfe5414b534531e440e8c86f909449f4026d66898b909924aba1744ec0682
27
28 diff --git a/app-emulation/libpod/libpod-1.1.2.ebuild b/app-emulation/libpod/libpod-1.1.2.ebuild
29 new file mode 100644
30 index 00000000000..0d80616d4c5
31 --- /dev/null
32 +++ b/app-emulation/libpod/libpod-1.1.2.ebuild
33 @@ -0,0 +1,139 @@
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="0ad9b6bf2aea4ba37e8c9738feabec61343ba175"
40 +EGO_PN="github.com/containers/${PN}"
41 +
42 +inherit golang-vcs-snapshot systemd
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/cri-o-1.13.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 + [[ -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 LDFLAGS -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="${D}${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 + systemd_dounit "${S}"/contrib/varlink/*.service "${S}"/contrib/varlink/*.socket
138 +
139 + insinto /etc/logrotate.d
140 + newins "${FILESDIR}/podman.logrotated" podman
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 +}