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