1 |
commit: e35f7457b207d4dcbd350302989f05dd5f33bad9 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Apr 1 17:51:49 2022 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Apr 1 17:54:37 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e35f7457 |
7 |
|
8 |
app-containers/podman: add 4.0.3 |
9 |
|
10 |
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> |
11 |
|
12 |
app-containers/podman/Manifest | 1 + |
13 |
app-containers/podman/podman-4.0.3.ebuild | 163 ++++++++++++++++++++++++++++++ |
14 |
2 files changed, 164 insertions(+) |
15 |
|
16 |
diff --git a/app-containers/podman/Manifest b/app-containers/podman/Manifest |
17 |
index 89345cfe5ac3..baa757c7e68a 100644 |
18 |
--- a/app-containers/podman/Manifest |
19 |
+++ b/app-containers/podman/Manifest |
20 |
@@ -1,2 +1,3 @@ |
21 |
DIST podman-3.4.4.tar.gz 10945990 BLAKE2B 3de69c9bc3bd1334837d21cb2817a9e9757fbb561a0b047658c7401608ecf1fbe09d5cd0c65497a82150a67a3775c77705d0dbd314a54f7b3a1953733cfb2906 SHA512 cfd295bf50ce86ea70741c3e663b409ed47b1e560c962bc579f319151a0fe2b24cdd3045667660083cce89449a9c5de1508c94a9a02375165a72ce7c16166666 |
22 |
DIST podman-4.0.2.tar.gz 11377152 BLAKE2B ab022c3e7ef40685301f08b2d939e936b07e08231d5b86a84fefa6ea7a60c8f20a5e15b79788d862c263336204a9cd8d7206748b4530f2f42ccdd31df370747f SHA512 f3c42b3b3c75ca451b4c22c2d6f9f1b9ab9437b118b16e19f17f92f28b5849f8e3de4ebc97d8d249f565a61ba187214928c25a031204163a59174e94ce300a59 |
23 |
+DIST podman-4.0.3.tar.gz 11392523 BLAKE2B 2d69fa8f52b061a931cf3dbe767edcb9eb5baf4f45fa77bcd9dd6e5541c126830c059a2bb97906f4fe9a4fd3257f77c801add06e1da910542ebafeaa2d032768 SHA512 a7c6f9a0f33641520c4143e6a3568129021783557f8ea7c846e4bc3f7da9bf70cb30b19cc7c6527809df2c46e6ded1d162a929dc4f44a5daafcf9d211b43b44a |
24 |
|
25 |
diff --git a/app-containers/podman/podman-4.0.3.ebuild b/app-containers/podman/podman-4.0.3.ebuild |
26 |
new file mode 100644 |
27 |
index 000000000000..3b27406e15ab |
28 |
--- /dev/null |
29 |
+++ b/app-containers/podman/podman-4.0.3.ebuild |
30 |
@@ -0,0 +1,163 @@ |
31 |
+# Copyright 1999-2022 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=7 |
35 |
+EGIT_COMMIT="62534053086fdeba7b93117e7c4dc6e797835a3e" |
36 |
+ |
37 |
+inherit bash-completion-r1 flag-o-matic go-module tmpfiles |
38 |
+ |
39 |
+DESCRIPTION="Library and podman tool for running OCI-based containers in Pods" |
40 |
+HOMEPAGE="https://github.com/containers/podman/" |
41 |
+MY_PN=podman |
42 |
+MY_P=${MY_PN}-${PV} |
43 |
+SRC_URI="https://github.com/containers/podman/archive/v${PV}.tar.gz -> ${MY_P}.tar.gz" |
44 |
+LICENSE="Apache-2.0 BSD BSD-2 CC-BY-SA-4.0 ISC MIT MPL-2.0" |
45 |
+SLOT="0" |
46 |
+ |
47 |
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv" |
48 |
+IUSE="apparmor btrfs cgroup-hybrid +fuse +init +rootless selinux" |
49 |
+RESTRICT+=" test" |
50 |
+ |
51 |
+COMMON_DEPEND=" |
52 |
+ app-crypt/gpgme:= |
53 |
+ >=app-containers/conmon-2.0.0 |
54 |
+ cgroup-hybrid? ( >=app-containers/runc-1.0.0_rc6 ) |
55 |
+ !cgroup-hybrid? ( app-containers/crun ) |
56 |
+ dev-libs/libassuan:= |
57 |
+ dev-libs/libgpg-error:= |
58 |
+ >=net-misc/cni-plugins-0.8.6 |
59 |
+ sys-fs/lvm2 |
60 |
+ sys-libs/libseccomp:= |
61 |
+ |
62 |
+ apparmor? ( sys-libs/libapparmor ) |
63 |
+ btrfs? ( sys-fs/btrfs-progs ) |
64 |
+ init? ( app-containers/catatonit ) |
65 |
+ rootless? ( app-containers/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 |
+ |
93 |
+src_compile() { |
94 |
+ local git_commit=${EGIT_COMMIT} |
95 |
+ |
96 |
+ # Filter unsupported linker flags |
97 |
+ filter-flags '-Wl,*' |
98 |
+ |
99 |
+ [[ -f hack/apparmor_tag.sh ]] || die |
100 |
+ if use apparmor; then |
101 |
+ echo -e "#!/bin/sh\necho apparmor" > hack/apparmor_tag.sh || die |
102 |
+ else |
103 |
+ echo -e "#!/bin/sh\ntrue" > hack/apparmor_tag.sh || die |
104 |
+ fi |
105 |
+ |
106 |
+ [[ -f hack/btrfs_installed_tag.sh ]] || die |
107 |
+ if use btrfs; then |
108 |
+ echo -e "#!/bin/sh\ntrue" > hack/btrfs_installed_tag.sh || die |
109 |
+ else |
110 |
+ echo -e "#!/bin/sh\necho exclude_graphdriver_btrfs" > \ |
111 |
+ hack/btrfs_installed_tag.sh || die |
112 |
+ fi |
113 |
+ |
114 |
+ [[ -f hack/selinux_tag.sh ]] || die |
115 |
+ if use selinux; then |
116 |
+ echo -e "#!/bin/sh\necho selinux" > hack/selinux_tag.sh || die |
117 |
+ else |
118 |
+ echo -e "#!/bin/sh\ntrue" > hack/selinux_tag.sh || die |
119 |
+ fi |
120 |
+ |
121 |
+ # Avoid this error when generating pkg/varlink/iopodman.go: |
122 |
+ # cannot find package "github.com/varlink/go/varlink/idl" |
123 |
+ mkdir -p _output || die |
124 |
+ ln -snf ../vendor _output/src || die |
125 |
+ GO111MODULE=off GOPATH=${PWD}/_output go generate ./pkg/varlink/... || die |
126 |
+ rm _output/src || die |
127 |
+ |
128 |
+ export -n GOCACHE GOPATH XDG_CACHE_HOME |
129 |
+ GOBIN="${S}/bin" \ |
130 |
+ emake all \ |
131 |
+ GIT_BRANCH=master \ |
132 |
+ GIT_BRANCH_CLEAN=master \ |
133 |
+ COMMIT_NO="${git_commit}" \ |
134 |
+ GIT_COMMIT="${git_commit}" |
135 |
+} |
136 |
+ |
137 |
+src_install() { |
138 |
+ emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install |
139 |
+ |
140 |
+ insinto /etc/containers |
141 |
+ newins test/registries.conf registries.conf.example |
142 |
+ newins test/policy.json policy.json.example |
143 |
+ |
144 |
+ insinto /usr/share/containers |
145 |
+ doins vendor/github.com/containers/common/pkg/seccomp/seccomp.json |
146 |
+ |
147 |
+ newconfd "${FILESDIR}"/podman.confd podman |
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 |
+ insinto /usr/share/zsh/site-functions |
156 |
+ doins completions/zsh/* |
157 |
+ |
158 |
+ insinto /usr/share/fish/vendor_completions.d |
159 |
+ doins completions/fish/* |
160 |
+ |
161 |
+ keepdir /var/lib/containers |
162 |
+} |
163 |
+ |
164 |
+pkg_preinst() { |
165 |
+ PODMAN_ROOTLESS_UPGRADE=false |
166 |
+ if use rootless; then |
167 |
+ has_version 'app-containers/podman[rootless]' || PODMAN_ROOTLESS_UPGRADE=true |
168 |
+ fi |
169 |
+} |
170 |
+ |
171 |
+pkg_postinst() { |
172 |
+ tmpfiles_process podman.conf |
173 |
+ |
174 |
+ local want_newline=false |
175 |
+ if [[ ! ( -e ${EROOT%/*}/etc/containers/policy.json && -e ${EROOT%/*}/etc/containers/registries.conf ) ]]; then |
176 |
+ elog "You need to create the following config files:" |
177 |
+ elog "/etc/containers/registries.conf" |
178 |
+ elog "/etc/containers/policy.json" |
179 |
+ elog "To copy over default examples, use:" |
180 |
+ elog "cp /etc/containers/registries.conf{.example,}" |
181 |
+ elog "cp /etc/containers/policy.json{.example,}" |
182 |
+ want_newline=true |
183 |
+ fi |
184 |
+ if [[ ${PODMAN_ROOTLESS_UPGRADE} == true ]] ; then |
185 |
+ ${want_newline} && elog "" |
186 |
+ elog "For rootless operation, you need to configure subuid/subgid" |
187 |
+ elog "for user running podman. In case subuid/subgid has only been" |
188 |
+ elog "configured for root, run:" |
189 |
+ elog "usermod --add-subuids 1065536-1131071 <user>" |
190 |
+ elog "usermod --add-subgids 1065536-1131071 <user>" |
191 |
+ want_newline=true |
192 |
+ fi |
193 |
+} |