Gentoo Archives: gentoo-commits

From: William Hubbs <williamh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-containers/containerd/
Date: Tue, 17 May 2022 14:52:40
Message-Id: 1652797913.e16ccc7540b50cd9a29101e304770df42a73d768.williamh@gentoo
1 commit: e16ccc7540b50cd9a29101e304770df42a73d768
2 Author: William Hubbs <williamh <AT> gentoo <DOT> org>
3 AuthorDate: Sun May 15 20:06:47 2022 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Tue May 17 14:31:53 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e16ccc75
7
8 app-containers/containerd: add 1.6.4
9
10 Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
11
12 app-containers/containerd/Manifest | 2 +
13 app-containers/containerd/containerd-1.6.4.ebuild | 85 +++++++++++++++++++++++
14 2 files changed, 87 insertions(+)
15
16 diff --git a/app-containers/containerd/Manifest b/app-containers/containerd/Manifest
17 index a74243f69dde..cc91c05a33a2 100644
18 --- a/app-containers/containerd/Manifest
19 +++ b/app-containers/containerd/Manifest
20 @@ -1,3 +1,5 @@
21 DIST containerd-1.5.11.tar.gz 7494477 BLAKE2B 2415e85694e5f4410c8cee7be08d1d304adfcdb95c4078f7a92c710a5a11a29ae011daa70fcfa72c2fabf5b48b7cac962b39121f18bb027931ef77214e86b1aa SHA512 6348f4ae7f9b473aac7d5e7325ca4539345d09f01b95383cec28f09d5e5b0b831e25fe305c3a15050f1e1959948ee8dcad788a1d6dd4780cf3077132d5617ef8
22 DIST containerd-1.6.2-deps.tar.xz 99095488 BLAKE2B a8ab5b2a506cb90cbadba9461d2737b1ac0bea672681e3f940d1dc76fdd2885d1ab287129a2aaa2fab64d19ba049eb7ecdffbafa6b08772430b94428a775a042 SHA512 2a96405c28a6ebaeae523ef36b4721f493332953880bfb7cecc4571b325557f2566141a62c0eb5c981045d498dd18ad18f8e7adfd9d5f17218a5d5d65760b855
23 DIST containerd-1.6.2.tar.gz 8617797 BLAKE2B aaf16dbbd071f4eab45bc94cc50643b33665b5c4a4155ef007b7a974e04660235b69e12d99e78c24b27c09d45c0eb6e9be3d688b41592a54497a0a4e5f577c86 SHA512 3ff280ae0cf5a45b0c21a42290c94bad30d46bf8a5bbcef1024e3c67fde3345a31b23a88cdbb6025d526c93e2a0899e9b341c9b8ccbba381983de3d8a39b1046
24 +DIST containerd-1.6.4-deps.tar.xz 96520056 BLAKE2B 695e26ffc26c0d85350c91412b746f59d7edd556aef2fea71a8947b79e0cdba573503a19b45ddc4a733b721be6cef581ab22e7522d00ab9221a1322d5b9670a4 SHA512 439bad6067939ab97115c0cf85d8eafd1214435f78bc57ee6a3d60e606da1260153d871e50de7b31fb57dc293e2f1ffa083cf89d08a394ee99450effda309678
25 +DIST containerd-1.6.4.tar.gz 8625617 BLAKE2B b3766eec306a4e4b27849aa3131c0adf84e040c9b6b843bc2b231a13f5f1b6222035e4a7d2315170b0a001be60874544bbe2920bf4cda951aac48217efb3de28 SHA512 a913dbfdcf29faebd5617f64e7c5e62b366cb9c80d0dbf55337121601f3c5b7d19c1670f71e9454513b681a1568c7cd1fc28c5daf3ea1c820279f2a2356ff8c6
26
27 diff --git a/app-containers/containerd/containerd-1.6.4.ebuild b/app-containers/containerd/containerd-1.6.4.ebuild
28 new file mode 100644
29 index 000000000000..bcc9928fb160
30 --- /dev/null
31 +++ b/app-containers/containerd/containerd-1.6.4.ebuild
32 @@ -0,0 +1,85 @@
33 +# Copyright 2022 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=8
37 +GIT_REVISION=212e8b6fa2f44b9c21b2798135fc6fb7c53efc16
38 +inherit go-module systemd
39 +
40 +DESCRIPTION="A daemon to control runC"
41 +HOMEPAGE="https://containerd.io/"
42 +SRC_URI="https://github.com/containerd/containerd/archive/v${PV}.tar.gz -> ${P}.tar.gz"
43 +SRC_URI+=" https://dev.gentoo.org/~williamh/dist/${P}-deps.tar.xz"
44 +
45 +LICENSE="Apache-2.0"
46 +SLOT="0"
47 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
48 +IUSE="apparmor btrfs device-mapper +cri hardened +seccomp selinux test"
49 +
50 +DEPEND="
51 + btrfs? ( sys-fs/btrfs-progs )
52 + seccomp? ( sys-libs/libseccomp )
53 +"
54 +
55 +# recommended version of runc is found in script/setup/runc-version
56 +RDEPEND="
57 + ${DEPEND}
58 + ~app-containers/runc-1.1.2
59 +"
60 +
61 +BDEPEND="
62 + dev-go/go-md2man
63 + virtual/pkgconfig
64 +"
65 +
66 +# tests require root or docker
67 +# upstream does not recommend stripping binary
68 +RESTRICT+=" strip test"
69 +
70 +src_prepare() {
71 + default
72 + sed -i \
73 + -e "s/-s -w//" \
74 + Makefile || die
75 + sed -i \
76 + -e "s:/usr/local:/usr:" \
77 + containerd.service || die
78 +}
79 +
80 +src_compile() {
81 + local options=(
82 + $(usev apparmor)
83 + $(usex btrfs "" "no_btrfs")
84 + $(usex cri "" "no_cri")
85 + $(usex device-mapper "" "no_devmapper")
86 + $(usev seccomp)
87 + $(usev selinux)
88 + )
89 +
90 + myemakeargs=(
91 + BUILDTAGS="${options[*]}"
92 + LDFLAGS="$(usex hardened '-extldflags -fno-PIC' '')"
93 + REVISION="${GIT_REVISION}"
94 + VERSION=v${PV}
95 + )
96 +
97 + # race condition in man target https://bugs.gentoo.org/765100
98 + # we need to explicitly specify GOFLAGS for "go run" to use vendor source
99 + emake "${myemakeargs[@]}" man -j1 #nowarn
100 + emake "${myemakeargs[@]}" all
101 +
102 +}
103 +
104 +src_install() {
105 + dobin bin/*
106 + doman man/*
107 + newinitd "${FILESDIR}"/${PN}.initd "${PN}"
108 + systemd_dounit containerd.service
109 + keepdir /var/lib/containerd
110 +
111 + # we already installed manpages, remove markdown source
112 + # before installing docs directory
113 + rm -r docs/man || die
114 +
115 + local DOCS=( ADOPTERS.md README.md RELEASES.md ROADMAP.md SCOPE.md docs/. )
116 + einstalldocs
117 +}