1 |
commit: cbb066060d8024488fd94466f690adfe5f2d270b |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Dec 28 23:57:36 2020 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Dec 29 00:02:44 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cbb06606 |
7 |
|
8 |
app-emulation/libpod: Bump to version 2.2.1 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/762283 |
11 |
Package-Manager: Portage-3.0.12, Repoman-3.0.2 |
12 |
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> |
13 |
|
14 |
app-emulation/libpod/Manifest | 1 + |
15 |
app-emulation/libpod/libpod-2.2.1.ebuild | 154 +++++++++++++++++++++++++++++++ |
16 |
2 files changed, 155 insertions(+) |
17 |
|
18 |
diff --git a/app-emulation/libpod/Manifest b/app-emulation/libpod/Manifest |
19 |
index 6afb95c4974..62494a75e86 100644 |
20 |
--- a/app-emulation/libpod/Manifest |
21 |
+++ b/app-emulation/libpod/Manifest |
22 |
@@ -1 +1,2 @@ |
23 |
DIST podman-2.1.0.tar.gz 9444707 BLAKE2B 62dacd316a8d6ae8aab0523338d818c69cf1228120e828a89301c9fdbb98082b85328c03c61f9f2a36c7a50105ce5fd025ad2b0e9ba2705c86b0d7e263fc92a6 SHA512 eb9b0cb184138af022e6d8e145fc6c4188c75c0695e0c6e62d54112a6b143424dd0caf9686f83637d08ff1fdbc24afca564c89f8cb4ab68b8f8d07345856398e |
24 |
+DIST podman-2.2.1.tar.gz 9653842 BLAKE2B 4e86903fc8fb51b9b1aa2b46704c1828b4ea11b738eccf198260c678b175e0a8699120e0280a2803f7898c9b28040a75d489ccd09ebd9c1f45d10a86e2a26c8f SHA512 4c6eda9320daf18b5f0e892c0f3019a5658d983936c25a195bcb1fbc28c18a9a65e87043faddeb47e9f62c9b445efc2906a2b7ccedca877941fadb21b1b68367 |
25 |
|
26 |
diff --git a/app-emulation/libpod/libpod-2.2.1.ebuild b/app-emulation/libpod/libpod-2.2.1.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..8335388f9f6 |
29 |
--- /dev/null |
30 |
+++ b/app-emulation/libpod/libpod-2.2.1.ebuild |
31 |
@@ -0,0 +1,154 @@ |
32 |
+# Copyright 1999-2020 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=7 |
36 |
+ |
37 |
+EGIT_COMMIT="d8868746fd3f45b9bfd79e37bf2aa0c7103245fd" |
38 |
+ |
39 |
+inherit bash-completion-r1 flag-o-matic go-module |
40 |
+ |
41 |
+DESCRIPTION="Library and podman tool for running OCI-based containers in Pods" |
42 |
+HOMEPAGE="https://github.com/containers/podman/" |
43 |
+MY_PN=podman |
44 |
+MY_P=${MY_PN}-${PV} |
45 |
+SRC_URI="https://github.com/containers/podman/archive/v${PV}.tar.gz -> ${MY_P}.tar.gz" |
46 |
+LICENSE="Apache-2.0 BSD BSD-2 CC-BY-SA-4.0 ISC MIT MPL-2.0" |
47 |
+SLOT="0" |
48 |
+ |
49 |
+KEYWORDS="~amd64 ~arm64" |
50 |
+IUSE="apparmor btrfs +fuse +rootless selinux" |
51 |
+RESTRICT="test" |
52 |
+ |
53 |
+COMMON_DEPEND=" |
54 |
+ app-crypt/gpgme:= |
55 |
+ >=app-emulation/conmon-2.0.0 |
56 |
+ || ( >=app-emulation/runc-1.0.0_rc6 app-emulation/crun ) |
57 |
+ dev-libs/libassuan:= |
58 |
+ dev-libs/libgpg-error:= |
59 |
+ >=net-misc/cni-plugins-0.8.6 |
60 |
+ sys-fs/lvm2 |
61 |
+ sys-libs/libseccomp:= |
62 |
+ |
63 |
+ apparmor? ( sys-libs/libapparmor ) |
64 |
+ btrfs? ( sys-fs/btrfs-progs ) |
65 |
+ rootless? ( app-emulation/slirp4netns ) |
66 |
+ selinux? ( sys-libs/libselinux:= ) |
67 |
+" |
68 |
+DEPEND=" |
69 |
+ ${COMMON_DEPEND} |
70 |
+ dev-go/go-md2man" |
71 |
+RDEPEND="${COMMON_DEPEND} |
72 |
+ fuse? ( sys-fs/fuse-overlayfs )" |
73 |
+ |
74 |
+S=${WORKDIR}/${MY_P} |
75 |
+ |
76 |
+src_prepare() { |
77 |
+ default |
78 |
+ |
79 |
+ # Disable installation of python modules here, since those are |
80 |
+ # installed by separate ebuilds. |
81 |
+ local makefile_sed_args=( |
82 |
+ -e '/^GIT_.*/d' |
83 |
+ -e 's/$(GO) build/$(GO) build -v -work -x/' |
84 |
+ -e 's/^\(install:.*\) install\.python$/\1/' |
85 |
+ -e 's|^pkg/varlink/iopodman.go: .gopathok pkg/varlink/io.podman.varlink$|pkg/varlink/iopodman.go: pkg/varlink/io.podman.varlink|' |
86 |
+ ) |
87 |
+ |
88 |
+ has_version -b '>=dev-lang/go-1.13.9' || makefile_sed_args+=(-e 's:GO111MODULE=off:GO111MODULE=on:') |
89 |
+ |
90 |
+ sed "${makefile_sed_args[@]}" -i Makefile || die |
91 |
+ |
92 |
+ sed -e 's|OUTPUT="${CIRRUS_TAG:.*|OUTPUT='v${PV}'|' \ |
93 |
+ -i hack/get_release_info.sh || die |
94 |
+} |
95 |
+ |
96 |
+src_compile() { |
97 |
+ # Filter unsupported linker flags |
98 |
+ filter-flags '-Wl,*' |
99 |
+ |
100 |
+ [[ -f hack/apparmor_tag.sh ]] || die |
101 |
+ if use apparmor; then |
102 |
+ echo -e "#!/bin/sh\necho apparmor" > hack/apparmor_tag.sh || die |
103 |
+ else |
104 |
+ echo -e "#!/bin/sh\ntrue" > hack/apparmor_tag.sh || die |
105 |
+ fi |
106 |
+ |
107 |
+ [[ -f hack/btrfs_installed_tag.sh ]] || die |
108 |
+ if use btrfs; then |
109 |
+ echo -e "#!/bin/sh\ntrue" > hack/btrfs_installed_tag.sh || die |
110 |
+ else |
111 |
+ echo -e "#!/bin/sh\necho exclude_graphdriver_btrfs" > \ |
112 |
+ hack/btrfs_installed_tag.sh || die |
113 |
+ fi |
114 |
+ |
115 |
+ [[ -f hack/selinux_tag.sh ]] || die |
116 |
+ if use selinux; then |
117 |
+ echo -e "#!/bin/sh\necho selinux" > hack/selinux_tag.sh || die |
118 |
+ else |
119 |
+ echo -e "#!/bin/sh\ntrue" > hack/selinux_tag.sh || die |
120 |
+ fi |
121 |
+ |
122 |
+ # Avoid this error when generating pkg/varlink/iopodman.go: |
123 |
+ # cannot find package "github.com/varlink/go/varlink/idl" |
124 |
+ mkdir -p _output || die |
125 |
+ ln -snf ../vendor _output/src || die |
126 |
+ GO111MODULE=off GOPATH=${PWD}/_output go generate ./pkg/varlink/... || die |
127 |
+ rm _output/src || die |
128 |
+ |
129 |
+ export -n GOCACHE GOPATH XDG_CACHE_HOME |
130 |
+ GOBIN="${S}/bin" \ |
131 |
+ emake all \ |
132 |
+ GIT_BRANCH=master \ |
133 |
+ GIT_BRANCH_CLEAN=master \ |
134 |
+ COMMIT_NO="${EGIT_COMMIT}" \ |
135 |
+ GIT_COMMIT="${EGIT_COMMIT}" |
136 |
+} |
137 |
+ |
138 |
+src_install() { |
139 |
+ emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install |
140 |
+ |
141 |
+ insinto /etc/containers |
142 |
+ newins test/registries.conf registries.conf.example |
143 |
+ newins test/policy.json policy.json.example |
144 |
+ |
145 |
+ insinto /usr/share/containers |
146 |
+ doins vendor/github.com/containers/common/pkg/seccomp/seccomp.json |
147 |
+ |
148 |
+ newinitd "${FILESDIR}"/podman.initd podman |
149 |
+ |
150 |
+ insinto /etc/logrotate.d |
151 |
+ newins "${FILESDIR}/podman.logrotated" podman |
152 |
+ |
153 |
+ dobashcomp completions/bash/* |
154 |
+ |
155 |
+ keepdir /var/lib/containers |
156 |
+} |
157 |
+ |
158 |
+pkg_preinst() { |
159 |
+ LIBPOD_ROOTLESS_UPGRADE=false |
160 |
+ if use rootless; then |
161 |
+ has_version 'app-emulation/libpod[rootless]' || LIBPOD_ROOTLESS_UPGRADE=true |
162 |
+ fi |
163 |
+} |
164 |
+ |
165 |
+pkg_postinst() { |
166 |
+ local want_newline=false |
167 |
+ if [[ ! ( -e ${EROOT%/*}/etc/containers/policy.json && -e ${EROOT%/*}/etc/containers/registries.conf ) ]]; then |
168 |
+ elog "You need to create the following config files:" |
169 |
+ elog "/etc/containers/registries.conf" |
170 |
+ elog "/etc/containers/policy.json" |
171 |
+ elog "To copy over default examples, use:" |
172 |
+ elog "cp /etc/containers/registries.conf{.example,}" |
173 |
+ elog "cp /etc/containers/policy.json{.example,}" |
174 |
+ want_newline=true |
175 |
+ fi |
176 |
+ if [[ ${LIBPOD_ROOTLESS_UPGRADE} == true ]] ; then |
177 |
+ ${want_newline} && elog "" |
178 |
+ elog "For rootless operation, you need to configure subuid/subgid" |
179 |
+ elog "for user running podman. In case subuid/subgid has only been" |
180 |
+ elog "configured for root, run:" |
181 |
+ elog "usermod --add-subuids 1065536-1131071 <user>" |
182 |
+ elog "usermod --add-subgids 1065536-1131071 <user>" |
183 |
+ want_newline=true |
184 |
+ fi |
185 |
+} |