1 |
commit: 3dbc37a8acc6ff9ebeef53461f727c5bef2ba5bf |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Apr 11 22:52:19 2019 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Apr 11 22:52:19 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3dbc37a8 |
7 |
|
8 |
app-emulation/libpod: version bump to 1.2.0 |
9 |
|
10 |
Package-Manager: Portage-2.3.62, Repoman-2.3.12 |
11 |
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> |
12 |
|
13 |
app-emulation/libpod/Manifest | 1 + |
14 |
app-emulation/libpod/libpod-1.2.0.ebuild | 139 +++++++++++++++++++++++++++++++ |
15 |
2 files changed, 140 insertions(+) |
16 |
|
17 |
diff --git a/app-emulation/libpod/Manifest b/app-emulation/libpod/Manifest |
18 |
index 78c20acb7e4..a653916cdbd 100644 |
19 |
--- a/app-emulation/libpod/Manifest |
20 |
+++ b/app-emulation/libpod/Manifest |
21 |
@@ -1 +1,2 @@ |
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 |
|
25 |
diff --git a/app-emulation/libpod/libpod-1.2.0.ebuild b/app-emulation/libpod/libpod-1.2.0.ebuild |
26 |
new file mode 100644 |
27 |
index 00000000000..526d4b90cde |
28 |
--- /dev/null |
29 |
+++ b/app-emulation/libpod/libpod-1.2.0.ebuild |
30 |
@@ -0,0 +1,139 @@ |
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="3bd528e583182b4249f3e6bbd8497a8831d89950" |
37 |
+EGO_PN="github.com/containers/${PN}" |
38 |
+ |
39 |
+inherit golang-vcs-snapshot systemd |
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" |
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/cri-o-1.13.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 |
+ [[ -f hack/apparmor_tag.sh ]] || die |
89 |
+ if use apparmor; then |
90 |
+ echo -e "#!/bin/sh\necho apparmor" > hack/apparmor_tag.sh || die |
91 |
+ else |
92 |
+ echo -e "#!/bin/sh\ntrue" > hack/apparmor_tag.sh || die |
93 |
+ fi |
94 |
+ |
95 |
+ [[ -f hack/btrfs_installed_tag.sh ]] || die |
96 |
+ if use btrfs; then |
97 |
+ echo -e "#!/bin/sh\ntrue" > hack/btrfs_installed_tag.sh || die |
98 |
+ else |
99 |
+ echo -e "#!/bin/sh\necho exclude_graphdriver_btrfs" > \ |
100 |
+ hack/btrfs_installed_tag.sh || die |
101 |
+ fi |
102 |
+ |
103 |
+ [[ -f hack/ostree_tag.sh ]] || die |
104 |
+ if use ostree; then |
105 |
+ echo -e "#!/bin/sh\necho ostree" > hack/ostree_tag.sh || die |
106 |
+ else |
107 |
+ echo -e "#!/bin/sh\necho containers_image_ostree_stub" > hack/ostree_tag.sh || die |
108 |
+ fi |
109 |
+ |
110 |
+ [[ -f hack/selinux_tag.sh ]] || die |
111 |
+ if use selinux; then |
112 |
+ echo -e "#!/bin/sh\necho selinux" > hack/selinux_tag.sh || die |
113 |
+ else |
114 |
+ echo -e "#!/bin/sh\ntrue" > hack/selinux_tag.sh || die |
115 |
+ fi |
116 |
+ |
117 |
+ env -u GOCACHE -u LDFLAGS -u XDG_CACHE_HOME GOPATH="${WORKDIR}/${P}" GOBIN="${WORKDIR}/${P}/bin" \ |
118 |
+ emake all \ |
119 |
+ GIT_BRANCH=master \ |
120 |
+ GIT_BRANCH_CLEAN=master \ |
121 |
+ COMMIT_NO="${EGIT_COMMIT}" \ |
122 |
+ GIT_COMMIT="${EGIT_COMMIT}" |
123 |
+} |
124 |
+ |
125 |
+src_install() { |
126 |
+ emake DESTDIR="${D}" PREFIX="${D}${EPREFIX}/usr" install |
127 |
+ |
128 |
+ insinto /etc/containers |
129 |
+ newins test/registries.conf registries.conf.example |
130 |
+ newins test/policy.json policy.json.example |
131 |
+ |
132 |
+ newinitd "${FILESDIR}"/podman.initd podman |
133 |
+ |
134 |
+ systemd_dounit "${S}"/contrib/varlink/*.service "${S}"/contrib/varlink/*.socket |
135 |
+ |
136 |
+ insinto /etc/logrotate.d |
137 |
+ newins "${FILESDIR}/podman.logrotated" podman |
138 |
+ |
139 |
+ keepdir /var/lib/containers |
140 |
+} |
141 |
+ |
142 |
+pkg_preinst() { |
143 |
+ LIBPOD_ROOTLESS_UPGRADE=false |
144 |
+ if use rootless; then |
145 |
+ has_version 'app-emulation/libpod[rootless]' || LIBPOD_ROOTLESS_UPGRADE=true |
146 |
+ fi |
147 |
+} |
148 |
+ |
149 |
+pkg_postinst() { |
150 |
+ local want_newline=false |
151 |
+ if [[ ! ( -e ${EROOT%/*}/etc/containers/policy.json && -e ${EROOT%/*}/etc/containers/registries.conf ) ]]; then |
152 |
+ elog "You need to create the following config files:" |
153 |
+ elog "/etc/containers/registries.conf" |
154 |
+ elog "/etc/containers/policy.json" |
155 |
+ elog "To copy over default examples, use:" |
156 |
+ elog "cp /etc/containers/registries.conf{.example,}" |
157 |
+ elog "cp /etc/containers/policy.json{.example,}" |
158 |
+ want_newline=true |
159 |
+ fi |
160 |
+ if [[ ${LIBPOD_ROOTLESS_UPGRADE} == true ]] ; then |
161 |
+ ${want_newline} && elog "" |
162 |
+ elog "For rootless operation, you need to configure subuid/subgid" |
163 |
+ elog "for user running podman. In case subuid/subgid has only been" |
164 |
+ elog "configured for root, run:" |
165 |
+ elog "usermod --add-subuids 1065536-1131071 <user>" |
166 |
+ elog "usermod --add-subgids 1065536-1131071 <user>" |
167 |
+ want_newline=true |
168 |
+ fi |
169 |
+} |