mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-26 08:01:14 +02:00
app-containers/accelerated-container-image: Add package to use overlaybd
* A custom CTR for pulling accelerated container images * An image converter * A snapshotter Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
This commit is contained in:
parent
4d37be74ee
commit
65913a94f6
@ -0,0 +1 @@
|
||||
accelerated-container-image-9999.ebuild
|
@ -0,0 +1,50 @@
|
||||
# Copyright 2025 The Flatcar Container Linux Maintainers
|
||||
# Distributed under the terms of the Apache License 2.0
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit git-r3 go-module systemd tmpfiles
|
||||
|
||||
DESCRIPTION="Remote container image format (overlaybd) and snapshotter based on block-device"
|
||||
HOMEPAGE="https://github.com/containerd/accelerated-container-image"
|
||||
EGIT_REPO_URI="https://github.com/containerd/accelerated-container-image.git"
|
||||
|
||||
if [[ ${PV} == 9999* ]]; then
|
||||
KEYWORDS="~amd64 ~arm64"
|
||||
else
|
||||
EGIT_COMMIT="v${PV}"
|
||||
KEYWORDS="amd64 arm64"
|
||||
fi
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
|
||||
# FIXME HACK ALERT: the build pulls go modules during src_compile.
|
||||
# This fails if network sandbox is enabled.
|
||||
RESTRICT="${RESTRICT} network-sandbox"
|
||||
|
||||
|
||||
RDEPEND="sys-fs/overlaybd"
|
||||
|
||||
src_unpack() {
|
||||
git-r3_src_unpack
|
||||
go-module_src_unpack
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake install \
|
||||
DESTDIR="${ED}" \
|
||||
SN_DESTDIR="${ED}/usr/local/overlaybd/snapshotter" \
|
||||
SN_CFGDIR="${ED}/usr/local/overlaybd/snapshotter/etc"
|
||||
|
||||
sed -i 's,/opt/overlaybd,/usr/local/overlaybd,' \
|
||||
"${ED}/usr/local/overlaybd/snapshotter/overlaybd-snapshotter.service" || die
|
||||
|
||||
# tmpfiles will take care of symlinking /usr/local/overlaybd/snapshotter
|
||||
# to /opt/overlaybd/snapshotter, where upstream expects the binaries.
|
||||
# (we need them in /usr to be used in a sysext)
|
||||
dotmpfiles "${FILESDIR}/10-overlaybd-snapshotter.conf"
|
||||
|
||||
systemd_dounit "${ED}/usr/local/overlaybd/snapshotter/overlaybd-snapshotter.service"
|
||||
systemd_enable_service "multi-user.target" "overlaybd-snapshotter.service"
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
C /etc/overlaybd-snapshotter/config.json - - - - /usr/local/overlaybd/snapshotter/etc/config.json
|
||||
L /opt/overlaybd/snapshotter - - - - /usr/local/overlaybd/snapshotter
|
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>maintainers@flatcar-linux.org</email>
|
||||
<name>The Flatcar Container Linux Maintainers</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="github">containerd/accelerated-container-image</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
Loading…
x
Reference in New Issue
Block a user