1 |
commit: 2487b5c1c4aa0ec1d18cb666c0166418f57b831e |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat May 7 16:06:47 2022 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat May 7 16:09:29 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2487b5c1 |
7 |
|
8 |
app-containers/podman: add 4.1.0 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/838232 |
11 |
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> |
12 |
|
13 |
app-containers/podman/Manifest | 1 + |
14 |
app-containers/podman/podman-4.1.0.ebuild | 164 ++++++++++++++++++++++++++++++ |
15 |
2 files changed, 165 insertions(+) |
16 |
|
17 |
diff --git a/app-containers/podman/Manifest b/app-containers/podman/Manifest |
18 |
index 3124af40ec3b..1e0ae891b628 100644 |
19 |
--- a/app-containers/podman/Manifest |
20 |
+++ b/app-containers/podman/Manifest |
21 |
@@ -1 +1,2 @@ |
22 |
DIST podman-4.0.3.tar.gz 11392523 BLAKE2B 2d69fa8f52b061a931cf3dbe767edcb9eb5baf4f45fa77bcd9dd6e5541c126830c059a2bb97906f4fe9a4fd3257f77c801add06e1da910542ebafeaa2d032768 SHA512 a7c6f9a0f33641520c4143e6a3568129021783557f8ea7c846e4bc3f7da9bf70cb30b19cc7c6527809df2c46e6ded1d162a929dc4f44a5daafcf9d211b43b44a |
23 |
+DIST podman-4.1.0.tar.gz 10904727 BLAKE2B 6d01a65b13494dc948c0667147eca6f250a81056f1bcf6eda6285566b8aa7aa526794ea96a571aecad642a8b1d3d1877cd31683ccf46662f8681a2afac083b5a SHA512 4d5f240423f21b1224ce44853a2265359dacee0d921f0ea53a7fca34f9076ebfaa49f4327a59ac51f5bf5b9dafb47dda3a9bb8e609237cc69f833b42b95bcd0a |
24 |
|
25 |
diff --git a/app-containers/podman/podman-4.1.0.ebuild b/app-containers/podman/podman-4.1.0.ebuild |
26 |
new file mode 100644 |
27 |
index 000000000000..2802720c49c4 |
28 |
--- /dev/null |
29 |
+++ b/app-containers/podman/podman-4.1.0.ebuild |
30 |
@@ -0,0 +1,164 @@ |
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="e4b03902052294d4f342a185bb54702ed5bed8b1" |
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 |
+ selinux? ( sec-policy/selinux-podman )" |
74 |
+ |
75 |
+S=${WORKDIR}/${MY_P} |
76 |
+ |
77 |
+src_prepare() { |
78 |
+ default |
79 |
+ |
80 |
+ # Disable installation of python modules here, since those are |
81 |
+ # installed by separate ebuilds. |
82 |
+ local makefile_sed_args=( |
83 |
+ -e '/^GIT_.*/d' |
84 |
+ -e 's/$(GO) build/$(GO) build -v -work -x/' |
85 |
+ -e 's/^\(install:.*\) install\.python$/\1/' |
86 |
+ -e 's|^pkg/varlink/iopodman.go: .gopathok pkg/varlink/io.podman.varlink$|pkg/varlink/iopodman.go: pkg/varlink/io.podman.varlink|' |
87 |
+ ) |
88 |
+ |
89 |
+ has_version -b '>=dev-lang/go-1.13.9' || makefile_sed_args+=(-e 's:GO111MODULE=off:GO111MODULE=on:') |
90 |
+ |
91 |
+ sed "${makefile_sed_args[@]}" -i Makefile || die |
92 |
+} |
93 |
+ |
94 |
+src_compile() { |
95 |
+ local git_commit=${EGIT_COMMIT} |
96 |
+ |
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="${git_commit}" \ |
135 |
+ GIT_COMMIT="${git_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 |
+ newconfd "${FILESDIR}"/podman.confd podman |
149 |
+ newinitd "${FILESDIR}"/podman.initd podman |
150 |
+ |
151 |
+ insinto /etc/logrotate.d |
152 |
+ newins "${FILESDIR}/podman.logrotated" podman |
153 |
+ |
154 |
+ dobashcomp completions/bash/* |
155 |
+ |
156 |
+ insinto /usr/share/zsh/site-functions |
157 |
+ doins completions/zsh/* |
158 |
+ |
159 |
+ insinto /usr/share/fish/vendor_completions.d |
160 |
+ doins completions/fish/* |
161 |
+ |
162 |
+ keepdir /var/lib/containers |
163 |
+} |
164 |
+ |
165 |
+pkg_preinst() { |
166 |
+ PODMAN_ROOTLESS_UPGRADE=false |
167 |
+ if use rootless; then |
168 |
+ has_version 'app-containers/podman[rootless]' || PODMAN_ROOTLESS_UPGRADE=true |
169 |
+ fi |
170 |
+} |
171 |
+ |
172 |
+pkg_postinst() { |
173 |
+ tmpfiles_process podman.conf |
174 |
+ |
175 |
+ local want_newline=false |
176 |
+ if [[ ! ( -e ${EROOT%/*}/etc/containers/policy.json && -e ${EROOT%/*}/etc/containers/registries.conf ) ]]; then |
177 |
+ elog "You need to create the following config files:" |
178 |
+ elog "/etc/containers/registries.conf" |
179 |
+ elog "/etc/containers/policy.json" |
180 |
+ elog "To copy over default examples, use:" |
181 |
+ elog "cp /etc/containers/registries.conf{.example,}" |
182 |
+ elog "cp /etc/containers/policy.json{.example,}" |
183 |
+ want_newline=true |
184 |
+ fi |
185 |
+ if [[ ${PODMAN_ROOTLESS_UPGRADE} == true ]] ; then |
186 |
+ ${want_newline} && elog "" |
187 |
+ elog "For rootless operation, you need to configure subuid/subgid" |
188 |
+ elog "for user running podman. In case subuid/subgid has only been" |
189 |
+ elog "configured for root, run:" |
190 |
+ elog "usermod --add-subuids 1065536-1131071 <user>" |
191 |
+ elog "usermod --add-subgids 1065536-1131071 <user>" |
192 |
+ want_newline=true |
193 |
+ fi |
194 |
+} |