1 |
commit: 7e8177dc7322dae84a7f496f545edbfd672b5c71 |
2 |
Author: William Hubbs <williamh <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jan 29 19:24:38 2023 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 29 19:29:01 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e8177dc |
7 |
|
8 |
app-containers/containerd: add 1.6.16 |
9 |
|
10 |
This version adds the ability to adjust the delay time used in |
11 |
start_post to conf.d/containerd. |
12 |
|
13 |
Closes: https://bugs.gentoo.org/892015 |
14 |
Signed-off-by: William Hubbs <williamh <AT> gentoo.org> |
15 |
|
16 |
app-containers/containerd/Manifest | 1 + |
17 |
app-containers/containerd/containerd-1.6.16.ebuild | 85 ++++++++++++++++++++++ |
18 |
app-containers/containerd/files/containerd.confd | 3 + |
19 |
app-containers/containerd/files/containerd.initd | 2 +- |
20 |
4 files changed, 90 insertions(+), 1 deletion(-) |
21 |
|
22 |
diff --git a/app-containers/containerd/Manifest b/app-containers/containerd/Manifest |
23 |
index df2d51420de0..37a411b138c1 100644 |
24 |
--- a/app-containers/containerd/Manifest |
25 |
+++ b/app-containers/containerd/Manifest |
26 |
@@ -1,2 +1,3 @@ |
27 |
DIST containerd-1.6.14-deps.tar.xz 95727780 BLAKE2B 15782df59512ee66eacbbb65b21520edfe1ae13bf4324a7262b0731c9bf650b328c328a72cb3113d31f23ef87a74e45292a6282f8f07e79db750c1238943e203 SHA512 8db408f87924741b80b55f8e9099ab64da41021f1708ed3c156716de17dd92b2ca6cfa469b3c8d5545fbebd51f9eefcf62c57139de545762815a73eb772fbbec |
28 |
DIST containerd-1.6.14.tar.gz 8698335 BLAKE2B 5f088faa35ffbcfd2e62334c12f9c741e23199d6d9999e28c69ad21b760fb85f514ef70cfdeebbdfaab914a8905ea7dae989d9fc8da36f3e077196e14dd6a220 SHA512 d29e2fb4a43f12d7e196f95b59b2c55793a1848177fb64b8bd9a4fd299fe54680a26f8a809b1d63f653ed9f0b30c209fc39d46b78ac0914d3253a10e5d3b015b |
29 |
+DIST containerd-1.6.16.tar.gz 8699293 BLAKE2B ed56712ba3400c070a94b411ecff50f8c639bdbec3d55372e155dc0868e96e4285731dc5ce18deaf132696d03fc8067dbe0c41ce66ee3d675ee33f960a8ee4d3 SHA512 f10fd7d4ca1f089d0dc0044f192a8faed4c96ac589c58f969074eba299b85fca4361c74d5ef49532c34e297016ee8dab3734f315a22586fa1b8f2eb84f9f08d3 |
30 |
|
31 |
diff --git a/app-containers/containerd/containerd-1.6.16.ebuild b/app-containers/containerd/containerd-1.6.16.ebuild |
32 |
new file mode 100644 |
33 |
index 000000000000..51f35f544572 |
34 |
--- /dev/null |
35 |
+++ b/app-containers/containerd/containerd-1.6.16.ebuild |
36 |
@@ -0,0 +1,85 @@ |
37 |
+# Copyright 2022-2023 Gentoo Authors |
38 |
+# Distributed under the terms of the GNU General Public License v2 |
39 |
+ |
40 |
+EAPI=8 |
41 |
+GIT_REVISION=31aa4358a36870b21a992d3ad2bef29e1d693bec |
42 |
+inherit go-module systemd |
43 |
+ |
44 |
+DESCRIPTION="A daemon to control runC" |
45 |
+HOMEPAGE="https://containerd.io/" |
46 |
+SRC_URI="https://github.com/containerd/containerd/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
47 |
+ |
48 |
+LICENSE="Apache-2.0" |
49 |
+SLOT="0" |
50 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" |
51 |
+IUSE="apparmor btrfs device-mapper +cri hardened +seccomp selinux test" |
52 |
+ |
53 |
+DEPEND=" |
54 |
+ btrfs? ( sys-fs/btrfs-progs ) |
55 |
+ seccomp? ( sys-libs/libseccomp ) |
56 |
+" |
57 |
+ |
58 |
+# recommended version of runc is found in script/setup/runc-version |
59 |
+RDEPEND=" |
60 |
+ ${DEPEND} |
61 |
+ ~app-containers/runc-1.1.4 |
62 |
+" |
63 |
+ |
64 |
+BDEPEND=" |
65 |
+ dev-go/go-md2man |
66 |
+ virtual/pkgconfig |
67 |
+" |
68 |
+ |
69 |
+# tests require root or docker |
70 |
+RESTRICT+="test" |
71 |
+ |
72 |
+src_prepare() { |
73 |
+ default |
74 |
+ sed -i \ |
75 |
+ -e "s/-s -w//" \ |
76 |
+ -e "s/-mod=readonly//" \ |
77 |
+ Makefile || die |
78 |
+ sed -i \ |
79 |
+ -e "s:/usr/local:/usr:" \ |
80 |
+ containerd.service || die |
81 |
+} |
82 |
+ |
83 |
+src_compile() { |
84 |
+ local options=( |
85 |
+ $(usev apparmor) |
86 |
+ $(usex btrfs "" "no_btrfs") |
87 |
+ $(usex cri "" "no_cri") |
88 |
+ $(usex device-mapper "" "no_devmapper") |
89 |
+ $(usev seccomp) |
90 |
+ $(usev selinux) |
91 |
+ ) |
92 |
+ |
93 |
+ myemakeargs=( |
94 |
+ BUILDTAGS="${options[*]}" |
95 |
+ LDFLAGS="$(usex hardened '-extldflags -fno-PIC' '')" |
96 |
+ REVISION="${GIT_REVISION}" |
97 |
+ VERSION=v${PV} |
98 |
+ ) |
99 |
+ |
100 |
+ # race condition in man target https://bugs.gentoo.org/765100 |
101 |
+ # we need to explicitly specify GOFLAGS for "go run" to use vendor source |
102 |
+ emake "${myemakeargs[@]}" man -j1 #nowarn |
103 |
+ emake "${myemakeargs[@]}" all |
104 |
+ |
105 |
+} |
106 |
+ |
107 |
+src_install() { |
108 |
+ dobin bin/* |
109 |
+ doman man/* |
110 |
+ newconfd "${FILESDIR}"/${PN}.confd "${PN}" |
111 |
+ newinitd "${FILESDIR}"/${PN}.initd "${PN}" |
112 |
+ systemd_dounit containerd.service |
113 |
+ keepdir /var/lib/containerd |
114 |
+ |
115 |
+ # we already installed manpages, remove markdown source |
116 |
+ # before installing docs directory |
117 |
+ rm -r docs/man || die |
118 |
+ |
119 |
+ local DOCS=( ADOPTERS.md README.md RELEASES.md ROADMAP.md SCOPE.md docs/. ) |
120 |
+ einstalldocs |
121 |
+} |
122 |
|
123 |
diff --git a/app-containers/containerd/files/containerd.confd b/app-containers/containerd/files/containerd.confd |
124 |
new file mode 100644 |
125 |
index 000000000000..22ef83205e26 |
126 |
--- /dev/null |
127 |
+++ b/app-containers/containerd/files/containerd.confd |
128 |
@@ -0,0 +1,3 @@ |
129 |
+# This is the delay to be used in the start_post function to wait for |
130 |
+# the socket to be active. |
131 |
+#containerd_socket_delay=5 |
132 |
|
133 |
diff --git a/app-containers/containerd/files/containerd.initd b/app-containers/containerd/files/containerd.initd |
134 |
index 6536fc9ef209..143305c03336 100644 |
135 |
--- a/app-containers/containerd/files/containerd.initd |
136 |
+++ b/app-containers/containerd/files/containerd.initd |
137 |
@@ -22,5 +22,5 @@ start_pre() { |
138 |
} |
139 |
|
140 |
start_post() { |
141 |
- ewaitfile 5 /run/containerd/containerd.sock |
142 |
+ ewaitfile ${containerd_socket_delay:-5} /run/containerd/containerd.sock |
143 |
} |