update systemd, add cri-o

master
Alexander Miroshnichenko 2021-08-01 10:20:11 +03:00
parent 5c6db58efc
commit 02b9b2de86
Signed by: alex
GPG Key ID: E93720C6C73A77F4
10 changed files with 4199 additions and 43 deletions

1941
app-emulation/cri-o/Manifest Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,99 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
EGIT_COMMIT=2af9ecf8e2494fd1bd24db12c1ca2f77dab7b5d5
inherit go-module
DESCRIPTION="OCI-based implementation of Kubernetes Container Runtime Interface"
HOMEPAGE="https://cri-o.io/"
SRC_URI="https://github.com/cri-o/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="Apache-2.0 BSD BSD-2 CC-BY-SA-4.0 ISC MIT MPL-2.0"
SLOT="0"
KEYWORDS="~amd64 ~arm64"
IUSE="btrfs +device-mapper selinux systemd"
COMMON_DEPEND="
app-crypt/gpgme:=
app-emulation/conmon
app-emulation/runc
dev-libs/glib:=
dev-libs/libassuan:=
dev-libs/libgpg-error:=
net-firewall/conntrack-tools
net-firewall/iptables
net-misc/cni-plugins
net-misc/socat
sys-apps/iproute2
sys-libs/libseccomp:=
btrfs? ( sys-fs/btrfs-progs )
device-mapper? ( sys-fs/lvm2:= )
selinux? ( sys-libs/libselinux:= )
systemd? ( sys-apps/systemd:= )"
DEPEND="
${COMMON_DEPEND}"
RDEPEND="${COMMON_DEPEND}
!<app-emulation/libpod-1.3.2-r1"
PATCHES=(
"${FILESDIR}"/0001-Fix-pinns-compilation-for-TEMP_FAILURE_RETRY.patch
)
src_prepare() {
default
sed -e '/^GIT_.*/d' \
-e '/ git diff --exit-code/d' \
-e 's/$(GO) build -i/$(GO) build -v -work -x/' \
-e 's/\${GIT_COMMIT}/'${EGIT_COMMIT}'/' \
-e "s|^GIT_COMMIT := .*|GIT_COMMIT := ${EGIT_COMMIT}|" \
-e "s|^COMMIT_NO := .*|COMMIT_NO := ${EGIT_COMMIT}|" \
-i Makefile || die
echo ".NOTPARALLEL: binaries docs" >> Makefile || die
sed -e 's:/usr/local/bin:/usr/bin:' \
-i contrib/systemd/* || die
}
src_compile() {
[[ -f hack/btrfs_installed_tag.sh ]] || die
use btrfs || { echo -e "#!/bin/sh\necho exclude_graphdriver_btrfs" > \
hack/btrfs_installed_tag.sh || die; }
[[ -f hack/libdm_installed.sh ]] || die
use device-mapper || { echo -e "#!/bin/sh\necho exclude_graphdriver_devicemapper" > \
hack/libdm_installed.sh || die; }
[[ -f hack/selinux_tag.sh ]] || die
use selinux || { echo -e "#!/bin/sh\ntrue" > \
hack/selinux_tag.sh || die; }
mkdir -p bin || die
GOBIN="${S}/bin" \
emake all
}
src_install() {
emake DESTDIR="${D}" PREFIX="${D}${EPREFIX}/usr" install install.config install.systemd
keepdir /etc/crio
mv "${ED}/etc/crio/crio.conf"{,.example} || die
newinitd "${FILESDIR}/crio.initd" crio
insinto /etc/logrotate.d
newins "${FILESDIR}/${PN}.logrotated" "${PN}"
# Suppress crio log error messages triggered if these don't exist.
keepdir /etc/containers/oci/hooks.d
keepdir /usr/share/containers/oci/hooks.d
# Suppress crio "Missing CNI default network" log message.
keepdir /etc/cni/net.d
insinto /etc/cni/net.d
doins contrib/cni/99-loopback.conf
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,39 @@
From c59fd827138efb66226811fb312be41ef1a15e3c Mon Sep 17 00:00:00 2001
From: Alexander Miroshnichenko <alex@millerson.name>
Date: Tue, 26 Jan 2021 12:34:11 +0300
Subject: [PATCH] Fix pinns compilation for TEMP_FAILURE_RETRY
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
In case the macro is not available we now define it on our own in the utils.
Signed-off-by: Alexander Miroshnichenko <alex@millerson.name>
---
pinns/src/utils.h | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/pinns/src/utils.h b/pinns/src/utils.h
index 2bb0479c05cf..c213320bfd4d 100644
--- a/pinns/src/utils.h
+++ b/pinns/src/utils.h
@@ -11,6 +11,17 @@
#include <syslog.h>
#include <unistd.h>
+#ifndef TEMP_FAILURE_RETRY
+#define TEMP_FAILURE_RETRY(expression) \
+ (__extension__({ \
+ long int __result; \
+ do \
+ __result = (long int)(expression); \
+ while (__result == -1L && errno == EINTR); \
+ __result; \
+ }))
+#endif
+
#define _pexit(s) \
do { \
fprintf(stderr, "[pinns:e]: %s: %s\n", s, strerror(errno)); \
--
2.26.2

View File

@ -0,0 +1,7 @@
/var/log/crio/crio.log {
missingok
size 5M
rotate 3
compress
copytruncate
}

View File

@ -0,0 +1,35 @@
#!/sbin/openrc-run
# Copyright 2015-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
description="OCI Kubernetes Container Runtime daemon"
pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"}
extra_started_commands="reload"
command="/usr/bin/${RC_SVCNAME}"
command_args="${command_args}"
command_background="true"
start_stop_daemon_args=" \
--stdout /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log \
--stderr /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log"
depend() {
need net
}
checkconfig() {
checkpath --directory --owner root:root --mode 0775 \
/var/log/${RC_SVCNAME}
checkpath --file --owner root:root --mode 0644 \
/var/log/${RC_SVCNAME}/${RC_SVCNAME}.log
}
start() {
checkconfig
default_start
}
reload() {
ebegin "Reloading ${RC_SVCNAME}"
start-stop-daemon --signal HUP --pidfile "${pidfile}"
eend $?
}

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>zmedico@gentoo.org</email>
<name>Zac Medico</name>
</maintainer>
<longdescription lang="en">
CRI-O is meant to provide an integration path between
OCI conformant runtimes and the kubelet. Specifically, it
implements the Kubelet Container Runtime Interface (CRI)
using OCI conformant runtimes. The scope of CRI-O is tied to
the scope of the CRI.
</longdescription>
<use>
<flag name="btrfs">
Enables dependencies for the "btrfs" graph driver, including
necessary kernel flags.
</flag>
<flag name="device-mapper">
Enables dependencies for the "devicemapper" graph driver, including
necessary kernel flags.
</flag>
</use>
<upstream>
<remote-id type="github">cri-o/cri-o</remote-id>
</upstream>
</pkgmetadata>

View File

@ -1,9 +1 @@
AUX 0001-Allow-building-on-musl-libc.patch 99748 BLAKE2B f3556996debaf72d38873e444187dd3fe431a9dfad0a22a500f90c02d087ab170d4b0eee36cd34fd45b5caa44d7bf5c434ee9dfa527f4391cfbd41ee8ddc0399 SHA512 5b3b3d165c293d54f96c4566b1bf30d29a743499c7bdbc82db581e6b613a56895d32dedc47db4c1f5eb13bc98749d33e0e050c9cb735804b43abcb28feb04511
AUX gentoo-generator-path-r2.patch 994 BLAKE2B 2bfb42623221291030fa9f7310e9bf747351a26f6ffd842628298787b74d4ec562bacaa9fc5365f7e854f695dab5f74bc06883fefc1f210dce4fd415926817ac SHA512 98054222ea232e120625573b6a532c312eccc02fe657152610b7d056b964bb2165fffae9d17fd986cf547af885d44c26b117fe68df5b24e2607d37f3729d0ada
AUX gentoo-journald-audit.patch 1485 BLAKE2B 9cba28ce907330bbc1eafcf04a837987ed68272fcfa9cc34a309ff5d4cc2230f71a6f7fed42c79afb1c96605df141e8e40b2d8290d12ad3c18038269814f2df8 SHA512 d77d4dae9f8a7819c6d4855476f3163ee19f52b20f66a93e25818f0747404462c47e3cafbd82ba85ce1b3d2fdbabdd96a0398b71149b318c540d82403f8ad0ad
AUX gentoo-pam.patch 974 BLAKE2B 48e292bd37a32709e459c41b04fdf8dc0e51962cb72896b4bdcdf4a8a9dd87031abce6bec2a6ed1578520f61a014de2c0127a5f96e8feec11b120e7e91b09c89 SHA512 69e50d1cec1e2d927365a97aebffe1024f600a8e5779e214fdc6fa35499786382375edb645d4c8c7c1745b96cd1e5cf83b4b9fc4daffdc1977bf7c7a50891db0
AUX gentoo-systemctl-disable-sysv-sync-r1.patch 821 BLAKE2B f5ef796725e023bb1ed83b34a3e4d45bb008de9a134892a5321b37b56809c7a44530d18e33c7877177e8b64b2d89dfc2de844bed433db6d5e57831d20fbfb456 SHA512 8d697dbd305f6b95a4ddc47cf9d99a0e954f54e161bd59164917b62a78ff5c23fa2d5be2614569c0a2297595dae59e1ee71bb04da72cbe0c0807e1abd7da974d
AUX nsswitch.conf 734 BLAKE2B 5f5a7821a84f6c8aa31fe9a68c29a1a0f24be578d427a623f14a9ef795e7da481f226efe5511d92932b5edf5638fa719808a0c3a0b8fd340799dd6bcb703a0a1 SHA512 dcbd51dacaaebdff32edb3840cc7b9b47b6521009b8786690e3673a2e78bc60bfd8e591b1048c5d452117c6659b9917ae2864462f5057cc39b704b0130522e60
DIST systemd-stable-248.3.tar.gz 10320940 BLAKE2B 725494e0197dd182de55e4967088f4b4b709e6b2242723368b6cd95606582e01a57322b1f18fa194149055140a90993696734ad3c004843bfaceb72cd04a3a84 SHA512 8e7ff0d5e63cc933e4dc23f7e0bef9707fde90396605eb8822d34de90d7abe8fd37e5739e33b657868218aa7281147cc944c096c007324c3e6fb54d833a83485
EBUILD systemd-248.3.ebuild 15747 BLAKE2B 2a1db512d04b2de566fbb40248e54b6f08e9d21021a74f1ef716beb37afe020d6def0ae573b62597c0ff9c61beaceac4ac9c4f4b869450c22b7e473c2abab169 SHA512 a1a0c4fadd784a9f176d7220b8801b95cf4a929e78148ec45788e3c1050177fee3db6c9292e2f040746553f187d57b7a52c61c31ebeab5999f2d532584617ff8
MISC metadata.xml 2373 BLAKE2B fac7a9db4c217998f84bcbb5bc490eee748a35f9d991962d5aa21c6ec562d494af06b67fe35879ee2b245445d22ea7eadc4db6305215f393c4565b86665b3130 SHA512 e2d999684255f6c6509af7dca1b9e1411eac9a4cde6f30d9631c5b9d2bbe749a40f3d08c067d2cad5eb1cdd8ad823c3afb6844cc5e3c1d455fbd8cd20d87a696
DIST systemd-stable-248.6.tar.gz 10388927 SHA256 3ce1801937c00a7cf1a2a23f0fea2889b89cb0e67c0ae7461353064f6b31fe1a SHA512 35a9d4a9ae04423959c71ad0175d04a1792b9ab39897a497776b93cea166de58b8fb111207c104c0e747d3ffbd85480d8b0cab38e3dc0defbbf09b15211954ce WHIRLPOOL 17b61e2f703f2dc8290b093a68f0c5cdf2859d993befa9322505bd93fe2c28d2482ee94191d6faadeda6a7d741760dcfc26cfb223c57590b324ead2874760df2

View File

@ -1,33 +0,0 @@
From b744751e2ced66c2ec191e8bd490cb9bdffc630a Mon Sep 17 00:00:00 2001
From: Mike Gilbert <floppym@gentoo.org>
Date: Tue, 3 Nov 2020 10:42:51 -0500
Subject: [PATCH] pam: include system-auth for systemd --user
---
src/login/systemd-user.m4 | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/login/systemd-user.m4 b/src/login/systemd-user.m4
index f6313f79fe..bcf84b4c64 100644
--- a/src/login/systemd-user.m4
+++ b/src/login/systemd-user.m4
@@ -5,7 +5,7 @@
m4_ifdef(`ENABLE_HOMED',
-account sufficient pam_systemd_home.so
)m4_dnl
-account sufficient pam_unix.so
+account include system-auth
account required pam_permit.so
m4_ifdef(`HAVE_SELINUX',
@@ -13,6 +13,7 @@ session required pam_selinux.so close
session required pam_selinux.so nottys open
)m4_dnl
session required pam_loginuid.so
+session include system-auth
session optional pam_keyinit.so force revoke
m4_ifdef(`ENABLE_HOMED',
-session optional pam_systemd_home.so
--
2.29.0

View File

@ -229,7 +229,6 @@ src_prepare() {
"${FILESDIR}/gentoo-generator-path-r2.patch"
"${FILESDIR}/gentoo-systemctl-disable-sysv-sync-r1.patch"
"${FILESDIR}/gentoo-journald-audit.patch"
"${FILESDIR}/gentoo-pam.patch"
)
fi