1 |
commit: 9f74bc7b91e0489f8aa81deb650a857eedf0aabd |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jun 14 17:38:28 2021 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jun 14 17:38:28 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f74bc7b |
7 |
|
8 |
app-emulation/podman: Bump to version 3.2.1 |
9 |
|
10 |
Package-Manager: Portage-3.0.20, 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.2.1.ebuild | 162 +++++++++++++++++++++++++++++++ |
15 |
2 files changed, 163 insertions(+) |
16 |
|
17 |
diff --git a/app-emulation/podman/Manifest b/app-emulation/podman/Manifest |
18 |
index f297759d5ef..232a6f84918 100644 |
19 |
--- a/app-emulation/podman/Manifest |
20 |
+++ b/app-emulation/podman/Manifest |
21 |
@@ -1 +1,2 @@ |
22 |
DIST podman-3.1.2.tar.gz 10488539 BLAKE2B 8536f6856e436467541f7714e75d5055545e1514604d6541671894117e752609a9e791355c162ef8fcdbc0cbd992823ecab8a3ab760bab3a469d9768b6b008e4 SHA512 fdc26368f3cce6a11fe9adeae34a2f04396a554bb5f245e07fc98d1ce21dff66faba5549e9e0b94793d67768ff03fea2990e7a2759dd41ed2b72778431f5dd9d |
23 |
+DIST podman-3.2.1.tar.gz 10754823 BLAKE2B 6c4e7292ba30969ef8632ad514a87650131a05baafab65d49fe182bddaa1b106de5766ec6677b73d0a2e5166c56f1439de6c800ca7de8ac59e026de1286bf2d4 SHA512 8fa4e2a72d1e655c600fa4dc7ad2366975314a154ff9fa7496622da6042e54c6fe93aca0344e6615e2ce3d400c1bc5de7d8462df45f950a119c3303b3ae520e4 |
24 |
|
25 |
diff --git a/app-emulation/podman/podman-3.2.1.ebuild b/app-emulation/podman/podman-3.2.1.ebuild |
26 |
new file mode 100644 |
27 |
index 00000000000..b3bba4b764c |
28 |
--- /dev/null |
29 |
+++ b/app-emulation/podman/podman-3.2.1.ebuild |
30 |
@@ -0,0 +1,162 @@ |
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="152952fe6b18581615c3efd1fafef2d8142738e8" |
36 |
+ |
37 |
+inherit bash-completion-r1 flag-o-matic go-module |
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" |
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 |
+ local want_newline=false |
174 |
+ if [[ ! ( -e ${EROOT%/*}/etc/containers/policy.json && -e ${EROOT%/*}/etc/containers/registries.conf ) ]]; then |
175 |
+ elog "You need to create the following config files:" |
176 |
+ elog "/etc/containers/registries.conf" |
177 |
+ elog "/etc/containers/policy.json" |
178 |
+ elog "To copy over default examples, use:" |
179 |
+ elog "cp /etc/containers/registries.conf{.example,}" |
180 |
+ elog "cp /etc/containers/policy.json{.example,}" |
181 |
+ want_newline=true |
182 |
+ fi |
183 |
+ if [[ ${PODMAN_ROOTLESS_UPGRADE} == true ]] ; then |
184 |
+ ${want_newline} && elog "" |
185 |
+ elog "For rootless operation, you need to configure subuid/subgid" |
186 |
+ elog "for user running podman. In case subuid/subgid has only been" |
187 |
+ elog "configured for root, run:" |
188 |
+ elog "usermod --add-subuids 1065536-1131071 <user>" |
189 |
+ elog "usermod --add-subgids 1065536-1131071 <user>" |
190 |
+ want_newline=true |
191 |
+ fi |
192 |
+} |