1 |
commit: 6e9c5d6021132e680208d532cdfce2e72f3120b4 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Oct 13 03:56:12 2021 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Oct 13 03:57:41 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e9c5d60 |
7 |
|
8 |
app-emulation/podman: Bump to version 3.4.0 |
9 |
|
10 |
Package-Manager: Portage-3.0.28, Repoman-3.0.3 |
11 |
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> |
12 |
|
13 |
app-emulation/podman/Manifest | 1 + |
14 |
app-emulation/podman/podman-3.4.0.ebuild | 164 +++++++++++++++++++++++++++++++ |
15 |
2 files changed, 165 insertions(+) |
16 |
|
17 |
diff --git a/app-emulation/podman/Manifest b/app-emulation/podman/Manifest |
18 |
index 6d43cfe945f..0dd22e79044 100644 |
19 |
--- a/app-emulation/podman/Manifest |
20 |
+++ b/app-emulation/podman/Manifest |
21 |
@@ -1 +1,2 @@ |
22 |
DIST podman-3.3.1.tar.gz 10917305 BLAKE2B fe7856c2ad8893e40ec42fb242a088794ea18910388d5e8089885013cab45c98e03bef99a5e911749f95ce469518e6fa5b6d30400f52696645c9ba8c140ba445 SHA512 19003f63c17c1c5788f34d0d6426a366035fc76aa2312e6355464d204d6536e5f78652abaf01643d4be7c2ee5224c25717b41760a4be4f6de8031cca9b06efaa |
23 |
+DIST podman-3.4.0.tar.gz 10950594 BLAKE2B 4a96b9be980f336bc7cfa6efa0f955da90b67e1ff3e45c34097b9eb4fcd611b3454860048410238aeb1063331b246e9c156f738813e7f585d2254a1568d20642 SHA512 195354b15beaaed19b4d5f71f5dbfcd1ebfc5c80c07db91043b76e3254d62b5fd001c52c536773656e5eba65954511c1639a50b955a9992fa4d18a55e573c2a1 |
24 |
|
25 |
diff --git a/app-emulation/podman/podman-3.4.0.ebuild b/app-emulation/podman/podman-3.4.0.ebuild |
26 |
new file mode 100644 |
27 |
index 00000000000..2b32a24eb19 |
28 |
--- /dev/null |
29 |
+++ b/app-emulation/podman/podman-3.4.0.ebuild |
30 |
@@ -0,0 +1,164 @@ |
31 |
+# Copyright 1999-2021 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=7 |
35 |
+EGIT_COMMIT="6e8de00bb224f9931d7402648f0177e7357ed079" |
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" |
48 |
+IUSE="apparmor btrfs +fuse +rootless selinux" |
49 |
+RESTRICT+=" test" |
50 |
+ |
51 |
+COMMON_DEPEND=" |
52 |
+ app-crypt/gpgme:= |
53 |
+ >=app-emulation/conmon-2.0.0 |
54 |
+ || ( >=app-emulation/runc-1.0.0_rc6 app-emulation/crun ) |
55 |
+ dev-libs/libassuan:= |
56 |
+ dev-libs/libgpg-error:= |
57 |
+ >=net-misc/cni-plugins-0.8.6 |
58 |
+ sys-fs/lvm2 |
59 |
+ sys-libs/libseccomp:= |
60 |
+ |
61 |
+ apparmor? ( sys-libs/libapparmor ) |
62 |
+ btrfs? ( sys-fs/btrfs-progs ) |
63 |
+ rootless? ( app-emulation/slirp4netns ) |
64 |
+ selinux? ( sys-libs/libselinux:= ) |
65 |
+" |
66 |
+DEPEND=" |
67 |
+ ${COMMON_DEPEND} |
68 |
+ dev-go/go-md2man" |
69 |
+RDEPEND="${COMMON_DEPEND} |
70 |
+ fuse? ( sys-fs/fuse-overlayfs )" |
71 |
+ |
72 |
+S=${WORKDIR}/${MY_P} |
73 |
+ |
74 |
+src_prepare() { |
75 |
+ default |
76 |
+ |
77 |
+ # Disable installation of python modules here, since those are |
78 |
+ # installed by separate ebuilds. |
79 |
+ local makefile_sed_args=( |
80 |
+ -e '/^GIT_.*/d' |
81 |
+ -e 's/$(GO) build/$(GO) build -v -work -x/' |
82 |
+ -e 's/^\(install:.*\) install\.python$/\1/' |
83 |
+ -e 's|^pkg/varlink/iopodman.go: .gopathok pkg/varlink/io.podman.varlink$|pkg/varlink/iopodman.go: pkg/varlink/io.podman.varlink|' |
84 |
+ ) |
85 |
+ |
86 |
+ has_version -b '>=dev-lang/go-1.13.9' || makefile_sed_args+=(-e 's:GO111MODULE=off:GO111MODULE=on:') |
87 |
+ |
88 |
+ sed "${makefile_sed_args[@]}" -i Makefile || die |
89 |
+ |
90 |
+ sed -e 's|OUTPUT="${CIRRUS_TAG:.*|OUTPUT='v${PV}'|' \ |
91 |
+ -i hack/get_release_info.sh || 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-emulation/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 |
+} |