mirror of
https://github.com/flatcar/scripts.git
synced 2025-10-20 20:01:09 +02:00
app-containers/lxc: Sync with Gentoo
It's from Gentoo commit 98228404d87c96702113702085c7d218ad8f06bf. Signed-off-by: Flatcar Buildbot <buildbot@flatcar-linux.org>
This commit is contained in:
parent
8fdbfe9cb1
commit
a63aec610c
@ -4,3 +4,5 @@ DIST lxc-6.0.3.tar.gz 964210 BLAKE2B 8d5dec7f088111a2ca82aadd6cd90eb30a3a1b61900
|
||||
DIST lxc-6.0.3.tar.gz.asc 833 BLAKE2B 3a23eacfdd248a95c9fa41a6edcb55abb07abc81314fa227649663ac264a9e5fdcf81cb38b79f1bd51b9172a70a0aee5bf65ecfdaf438c944c25f11c882ab562 SHA512 5de32e772bd2864e3b688a90fd9f08d98829d61ba3e1cc76a9b403fc005256149f55ad034e186c3329f3abe52a8815f60c5027b16de46be0bc81b14d0134babd
|
||||
DIST lxc-6.0.4.tar.gz 964064 BLAKE2B f8911993ce333300e68fe3d817cceb49d6c18f83e5fec1ab2da8ba6f0820808883cf73ce1f7dea2725c6279d87e6fcc0a3feeaeadad76112a47ef69265dbef50 SHA512 8ccdd9cf37b8b75e1e58021bc9bd7841faf3a2790d07f0214b6c8bde7a23e579345f576079a541dba5e71361bf5672af9d482a9e82323068ca0f7291f6063aaf
|
||||
DIST lxc-6.0.4.tar.gz.asc 833 BLAKE2B 4600373e9534515fe3ec0c41ebe5b17ee8c4e7ab125e3a211ed300f0fdd79a04a9c183b903e1b6600d7b7ce4d9f2e66451326c473beb02b4a83a7200764e56e7 SHA512 2efe6e06b33a34fdf7ba1393b5e07aa1a18f189b2e43673b4f9bbdc7cf0fcb9ad47b99ebbd08e910e139047d54b1104f098cbbef586796767b9dd1a4a99ca748
|
||||
DIST lxc-6.0.5.tar.gz 958966 BLAKE2B 74ee775f8a23467049f38f0973a24eb12b34b7c758549294342470b7b6b8e95eaef118c493f62b6394c435a5c86389fde4454199107e90743dd40d3a5bf373fd SHA512 3674397e789ed9eda7e37d4e22c42ab02687c0ab6a12f6c234a3393bdfb3f048aa0ded419c5c2f435d653d3dd70f47ae19d28b7a46838f12004d00b05c54a26d
|
||||
DIST lxc-6.0.5.tar.gz.asc 833 BLAKE2B ac1480c0b5588b290ab1ec81bf7bf85990df98a650832363529e9ede8afb7594bd21b58a4a79e7fe9519c381d4860d7a33f4090582612ffff7c448c77e641929 SHA512 8c28da0ebc280ae491bab815105f3c58f2c9cd742586ce86f9b1d2032724db4893811d689f7278bfc8c5570dc45ca6071e4c25b77647d762c77eca59249a15b5
|
||||
|
168
sdk_container/src/third_party/portage-stable/app-containers/lxc/lxc-6.0.5.ebuild
vendored
Normal file
168
sdk_container/src/third_party/portage-stable/app-containers/lxc/lxc-6.0.5.ebuild
vendored
Normal file
@ -0,0 +1,168 @@
|
||||
# Copyright 2022-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit bash-completion-r1 linux-info meson optfeature systemd verify-sig
|
||||
|
||||
DESCRIPTION="A userspace interface for the Linux kernel containment features"
|
||||
HOMEPAGE="https://linuxcontainers.org/ https://github.com/lxc/lxc"
|
||||
SRC_URI="https://linuxcontainers.org/downloads/lxc/${P}.tar.gz
|
||||
verify-sig? ( https://linuxcontainers.org/downloads/lxc/${P}.tar.gz.asc )"
|
||||
|
||||
LICENSE="GPL-2 LGPL-2.1 LGPL-3"
|
||||
SLOT="0/1.8" # SONAME liblxc.so.1 + ${PV//./} _if_ breaking ABI change while bumping.
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
|
||||
IUSE="apparmor +caps examples io-uring man pam seccomp selinux ssl systemd test +tools"
|
||||
|
||||
RDEPEND="acct-group/lxc
|
||||
acct-user/lxc
|
||||
apparmor? ( sys-libs/libapparmor )
|
||||
caps? ( sys-libs/libcap )
|
||||
io-uring? ( >=sys-libs/liburing-2:= )
|
||||
pam? ( sys-libs/pam )
|
||||
seccomp? ( sys-libs/libseccomp )
|
||||
selinux? ( sys-libs/libselinux )
|
||||
ssl? ( dev-libs/openssl:0= )
|
||||
systemd? (
|
||||
sys-apps/dbus
|
||||
sys-apps/systemd:=
|
||||
)
|
||||
tools? ( sys-libs/libcap )"
|
||||
DEPEND="${RDEPEND}
|
||||
caps? ( sys-libs/libcap[static-libs] )
|
||||
tools? ( sys-libs/libcap[static-libs] )
|
||||
sys-kernel/linux-headers"
|
||||
BDEPEND="virtual/pkgconfig
|
||||
man? ( app-text/docbook2X )
|
||||
verify-sig? ( sec-keys/openpgp-keys-linuxcontainers )"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
CONFIG_CHECK="~!NETPRIO_CGROUP
|
||||
~CGROUPS
|
||||
~CGROUP_CPUACCT
|
||||
~CGROUP_DEVICE
|
||||
~CGROUP_FREEZER
|
||||
|
||||
~CGROUP_SCHED
|
||||
~CPUSETS
|
||||
~IPC_NS
|
||||
~MACVLAN
|
||||
|
||||
~MEMCG
|
||||
~NAMESPACES
|
||||
~NET_NS
|
||||
~PID_NS
|
||||
|
||||
~POSIX_MQUEUE
|
||||
~USER_NS
|
||||
~UTS_NS
|
||||
~VETH"
|
||||
|
||||
ERROR_CGROUP_FREEZER="CONFIG_CGROUP_FREEZER: needed to freeze containers"
|
||||
ERROR_MACVLAN="CONFIG_MACVLAN: needed for internal (inter-container) networking"
|
||||
ERROR_MEMCG="CONFIG_MEMCG: needed for memory resource control in containers"
|
||||
ERROR_NET_NS="CONFIG_NET_NS: needed for unshared network"
|
||||
ERROR_POSIX_MQUEUE="CONFIG_POSIX_MQUEUE: needed for lxc-execute command"
|
||||
ERROR_UTS_NS="CONFIG_UTS_NS: needed to unshare hostnames and uname info"
|
||||
ERROR_VETH="CONFIG_VETH: needed for internal (host-to-container) networking"
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/linuxcontainers.asc
|
||||
|
||||
DOCS=( AUTHORS CONTRIBUTING MAINTAINERS README.md doc/FAQ.txt )
|
||||
|
||||
pkg_setup() {
|
||||
linux-info_pkg_setup
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
|
||||
# -Dtools-multicall=false: will create a single binary called 'lxc' that conflicts with LXD.
|
||||
local emesonargs=(
|
||||
--localstatedir "${EPREFIX}/var"
|
||||
|
||||
-Dcoverity-build=false
|
||||
-Dinstall-state-dirs=false
|
||||
-Doss-fuzz=false
|
||||
-Dspecfile=false
|
||||
-Dtools-multicall=false
|
||||
|
||||
-Dcommands=true
|
||||
-Dinstall-init-files=true
|
||||
-Dmemfd-rexec=true
|
||||
-Dthread-safety=true
|
||||
|
||||
$(meson_use apparmor)
|
||||
$(meson_use caps capabilities)
|
||||
$(meson_use examples)
|
||||
$(meson_use io-uring io-uring-event-loop)
|
||||
$(meson_use man)
|
||||
$(meson_use pam pam-cgroup)
|
||||
$(meson_use seccomp)
|
||||
$(meson_use selinux)
|
||||
$(meson_use ssl openssl)
|
||||
$(meson_use test tests)
|
||||
$(meson_use tools)
|
||||
|
||||
$(usex systemd -Ddbus=true -Ddbus=false)
|
||||
$(usex systemd -Dinit-script="systemd" -Dinit-script="sysvinit")
|
||||
|
||||
-Ddata-path=/var/lib/lxc
|
||||
-Ddoc-path=/usr/share/doc/${PF}
|
||||
-Dlog-path=/var/log/lxc
|
||||
-Drootfs-mount-path=/var/lib/lxc/rootfs
|
||||
-Druntime-path=/run
|
||||
)
|
||||
|
||||
use tools && local emesonargs+=( -Dcapabilities=true )
|
||||
|
||||
meson_src_configure
|
||||
}
|
||||
|
||||
src_install() {
|
||||
meson_src_install
|
||||
|
||||
# The main bash-completion file will collide with lxd, need to relocate and update symlinks.
|
||||
local lxcbashcompdir="${D}/$(get_bashcompdir)"
|
||||
mkdir -p "${lxcbashcompdir}" || die "Failed to create bashcompdir."
|
||||
mv "${lxcbashcompdir}"/_lxc "${lxcbashcompdir}"/lxc-start || die "Failed to move _lxc bash completion file."
|
||||
|
||||
# Build system will install all bash completion files regardless of our 'tools' use flag.
|
||||
# Though installing them all will add bash completions for commands that don't exist, it's
|
||||
# cleaner than dealing with individual files based on the use flag status.
|
||||
bashcomp_alias lxc-start lxc-{attach,autostart,cgroup,checkpoint,config,console,copy,create,destroy,device,execute,freeze,info,ls,monitor,snapshot,stop,top,unfreeze,unshare,update-config,usernsexec,wait}
|
||||
|
||||
find "${ED}" -name '*.la' -delete -o -name '*.a' -delete || die
|
||||
|
||||
# Replace upstream sysvinit/systemd files.
|
||||
if use systemd ; then
|
||||
rm -r "${D}$(systemd_get_systemunitdir)" || die "Failed to remove systemd lib dir"
|
||||
else
|
||||
rm "${ED}"/etc/init.d/lxc-{containers,net} || die "Failed to remove sysvinit scripts"
|
||||
fi
|
||||
|
||||
newinitd "${FILESDIR}/${PN}.initd.9" ${PN}
|
||||
systemd_newunit "${FILESDIR}"/lxc-monitord.service.5.0.0 lxc-monitord.service
|
||||
systemd_newunit "${FILESDIR}"/lxc-net.service.5.0.0 lxc-net.service
|
||||
systemd_newunit "${FILESDIR}"/lxc.service-5.0.0 lxc.service
|
||||
systemd_newunit "${FILESDIR}"/lxc_at.service.5.0.0 "lxc@.service"
|
||||
|
||||
if ! use apparmor; then
|
||||
sed -i '/lxc-apparmor-load/d' "${D}$(systemd_get_systemunitdir)/lxc.service" ||
|
||||
die "Failed to remove apparmor references from lxc.service systemd unit."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "Please refer to "
|
||||
elog "https://wiki.gentoo.org/wiki/LXC for introduction and usage guide."
|
||||
elog
|
||||
elog "Run 'lxc-checkconfig' to see optional kernel features."
|
||||
elog
|
||||
|
||||
optfeature "creating your own LXC containers" app-containers/distrobuilder
|
||||
optfeature "automatic template scripts" app-containers/lxc-templates
|
||||
optfeature "Debian-based distribution container image support" dev-util/debootstrap
|
||||
optfeature "snapshot & restore functionality" sys-process/criu
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user