Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-containers/podman/
Date: Thu, 24 Feb 2022 03:03:11
Message-Id: 1645671704.91c5acbbe9f7970368e6780112f8fa59177db6b3.zmedico@gentoo
1 commit: 91c5acbbe9f7970368e6780112f8fa59177db6b3
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Thu Feb 24 03:01:44 2022 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Thu Feb 24 03:01:44 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91c5acbb
7
8 app-containers/podman: Bump to version 4.0.1
9
10 Package-Manager: Portage-3.0.30, Repoman-3.0.3
11 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
12
13 app-containers/podman/Manifest | 1 +
14 app-containers/podman/podman-4.0.1.ebuild | 161 ++++++++++++++++++++++++++++++
15 2 files changed, 162 insertions(+)
16
17 diff --git a/app-containers/podman/Manifest b/app-containers/podman/Manifest
18 index 191466995a97..ec4925d02bb8 100644
19 --- a/app-containers/podman/Manifest
20 +++ b/app-containers/podman/Manifest
21 @@ -1,2 +1,3 @@
22 DIST podman-3.4.4.tar.gz 10945990 BLAKE2B 3de69c9bc3bd1334837d21cb2817a9e9757fbb561a0b047658c7401608ecf1fbe09d5cd0c65497a82150a67a3775c77705d0dbd314a54f7b3a1953733cfb2906 SHA512 cfd295bf50ce86ea70741c3e663b409ed47b1e560c962bc579f319151a0fe2b24cdd3045667660083cce89449a9c5de1508c94a9a02375165a72ce7c16166666
23 DIST podman-4.0.0.tar.gz 11379640 BLAKE2B 2d68b95206ef59873c2a5c434aa3901c33a3526f840805ab42ac4dad4ed5861824a6b2142d02b500e087d56f4da3255c2b156af4d835a6427c2ebfae34278a75 SHA512 2e25f303d143bc4e265f0f8998ea1c4af3d6da8b35452cf6b27a4eb204805a9b5f75f4b6430921b42c80b76a6b5c9cf35a732c265727a11261fca25cc96f57e7
24 +DIST podman-4.0.1.tar.gz 11379467 BLAKE2B dc9785c6ff85ba2f2279b7b8fb820f402fa347c4af70e3c3a6119a7a79f19f1dc4e2048c0682f7751e701005e2966e806537630f6efd69d336bce560ad5053a4 SHA512 b333c91f1c04ef084df05dc6f31717e89078a3e5c6b620c403c29e4a3c9db30bbd15537334a645206d85bfb9679b1f4748c46936d9ca21c1f77066e8cf0f25c8
25
26 diff --git a/app-containers/podman/podman-4.0.1.ebuild b/app-containers/podman/podman-4.0.1.ebuild
27 new file mode 100644
28 index 000000000000..a3427504010b
29 --- /dev/null
30 +++ b/app-containers/podman/podman-4.0.1.ebuild
31 @@ -0,0 +1,161 @@
32 +# Copyright 1999-2022 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +EGIT_COMMIT="c8b9a2e3ec3630e9172499e15205c11b823c8107"
37 +
38 +inherit bash-completion-r1 flag-o-matic go-module tmpfiles
39 +
40 +DESCRIPTION="Library and podman tool for running OCI-based containers in Pods"
41 +HOMEPAGE="https://github.com/containers/podman/"
42 +MY_PN=podman
43 +MY_P=${MY_PN}-${PV}
44 +SRC_URI="https://github.com/containers/podman/archive/v${PV}.tar.gz -> ${MY_P}.tar.gz"
45 +LICENSE="Apache-2.0 BSD BSD-2 CC-BY-SA-4.0 ISC MIT MPL-2.0"
46 +SLOT="0"
47 +
48 +KEYWORDS="~amd64 ~arm64 ~ppc64"
49 +IUSE="apparmor btrfs +fuse +rootless selinux"
50 +RESTRICT+=" test"
51 +
52 +COMMON_DEPEND="
53 + app-crypt/gpgme:=
54 + >=app-containers/conmon-2.0.0
55 + || ( >=app-containers/runc-1.0.0_rc6 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 + rootless? ( app-containers/slirp4netns )
65 + selinux? ( sys-libs/libselinux:= )
66 +"
67 +DEPEND="
68 + ${COMMON_DEPEND}
69 + dev-go/go-md2man"
70 +RDEPEND="${COMMON_DEPEND}
71 + fuse? ( sys-fs/fuse-overlayfs )"
72 +
73 +S=${WORKDIR}/${MY_P}
74 +
75 +src_prepare() {
76 + default
77 +
78 + # Disable installation of python modules here, since those are
79 + # installed by separate ebuilds.
80 + local makefile_sed_args=(
81 + -e '/^GIT_.*/d'
82 + -e 's/$(GO) build/$(GO) build -v -work -x/'
83 + -e 's/^\(install:.*\) install\.python$/\1/'
84 + -e 's|^pkg/varlink/iopodman.go: .gopathok pkg/varlink/io.podman.varlink$|pkg/varlink/iopodman.go: pkg/varlink/io.podman.varlink|'
85 + )
86 +
87 + has_version -b '>=dev-lang/go-1.13.9' || makefile_sed_args+=(-e 's:GO111MODULE=off:GO111MODULE=on:')
88 +
89 + sed "${makefile_sed_args[@]}" -i Makefile || die
90 +}
91 +
92 +src_compile() {
93 + local git_commit=${EGIT_COMMIT}
94 +
95 + # Filter unsupported linker flags
96 + filter-flags '-Wl,*'
97 +
98 + [[ -f hack/apparmor_tag.sh ]] || die
99 + if use apparmor; then
100 + echo -e "#!/bin/sh\necho apparmor" > hack/apparmor_tag.sh || die
101 + else
102 + echo -e "#!/bin/sh\ntrue" > hack/apparmor_tag.sh || die
103 + fi
104 +
105 + [[ -f hack/btrfs_installed_tag.sh ]] || die
106 + if use btrfs; then
107 + echo -e "#!/bin/sh\ntrue" > hack/btrfs_installed_tag.sh || die
108 + else
109 + echo -e "#!/bin/sh\necho exclude_graphdriver_btrfs" > \
110 + hack/btrfs_installed_tag.sh || die
111 + fi
112 +
113 + [[ -f hack/selinux_tag.sh ]] || die
114 + if use selinux; then
115 + echo -e "#!/bin/sh\necho selinux" > hack/selinux_tag.sh || die
116 + else
117 + echo -e "#!/bin/sh\ntrue" > hack/selinux_tag.sh || die
118 + fi
119 +
120 + # Avoid this error when generating pkg/varlink/iopodman.go:
121 + # cannot find package "github.com/varlink/go/varlink/idl"
122 + mkdir -p _output || die
123 + ln -snf ../vendor _output/src || die
124 + GO111MODULE=off GOPATH=${PWD}/_output go generate ./pkg/varlink/... || die
125 + rm _output/src || die
126 +
127 + export -n GOCACHE GOPATH XDG_CACHE_HOME
128 + GOBIN="${S}/bin" \
129 + emake all \
130 + GIT_BRANCH=master \
131 + GIT_BRANCH_CLEAN=master \
132 + COMMIT_NO="${git_commit}" \
133 + GIT_COMMIT="${git_commit}"
134 +}
135 +
136 +src_install() {
137 + emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
138 +
139 + insinto /etc/containers
140 + newins test/registries.conf registries.conf.example
141 + newins test/policy.json policy.json.example
142 +
143 + insinto /usr/share/containers
144 + doins vendor/github.com/containers/common/pkg/seccomp/seccomp.json
145 +
146 + newconfd "${FILESDIR}"/podman.confd podman
147 + newinitd "${FILESDIR}"/podman.initd podman
148 +
149 + insinto /etc/logrotate.d
150 + newins "${FILESDIR}/podman.logrotated" podman
151 +
152 + dobashcomp completions/bash/*
153 +
154 + insinto /usr/share/zsh/site-functions
155 + doins completions/zsh/*
156 +
157 + insinto /usr/share/fish/vendor_completions.d
158 + doins completions/fish/*
159 +
160 + keepdir /var/lib/containers
161 +}
162 +
163 +pkg_preinst() {
164 + PODMAN_ROOTLESS_UPGRADE=false
165 + if use rootless; then
166 + has_version 'app-containers/podman[rootless]' || PODMAN_ROOTLESS_UPGRADE=true
167 + fi
168 +}
169 +
170 +pkg_postinst() {
171 + tmpfiles_process podman.conf
172 +
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 +}