summaryrefslogtreecommitdiff
path: root/app-containers
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-02-13 17:36:25 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-02-13 17:36:25 +0000
commit8234174b0455dd6d6656a24155014c4fba8fad49 (patch)
tree897e5b46b4ec1370d82a27959dac849e67093b58 /app-containers
parentc06ab4b7bc60f01a7bd8c233ba4697157f30315f (diff)
gentoo auto-resync : 13:02:2024 - 17:36:25
Diffstat (limited to 'app-containers')
-rw-r--r--app-containers/Manifest.gzbin8734 -> 8728 bytes
-rw-r--r--app-containers/lxd/Manifest3
-rw-r--r--app-containers/lxd/files/lxd-5.0.3-pr-12834-dont-stop-parsing-image-info.patch79
-rw-r--r--app-containers/lxd/files/lxd-5.0.3-pr-12847-ignore-incus-archives.patch26
-rw-r--r--app-containers/lxd/lxd-5.0.3-r1.ebuild216
5 files changed, 324 insertions, 0 deletions
diff --git a/app-containers/Manifest.gz b/app-containers/Manifest.gz
index 34a61dfc01c4..140d28b06fb7 100644
--- a/app-containers/Manifest.gz
+++ b/app-containers/Manifest.gz
Binary files differ
diff --git a/app-containers/lxd/Manifest b/app-containers/lxd/Manifest
index 6aa3996472ec..a2fbf96293aa 100644
--- a/app-containers/lxd/Manifest
+++ b/app-containers/lxd/Manifest
@@ -6,6 +6,8 @@ AUX lxd-4.0.9.initd 1333 BLAKE2B 72a27d38527b4f0dcca3b111ae0d112bd128cf83ff62615
AUX lxd-5.0.2-r1.initd 1710 BLAKE2B a9597d32e88502f521f3ae784e4f653ab6d3ab144537b27f5e9b84eb36e5688b13d74968c865153d6e442f77a67b5794fb429705bea8b40cdef00768102de55b SHA512 73ea4aaee39061565524a378b9317bee4b850f0c28ae3f8a47e905b9dffc4452e71736880391bb74b88ea70bda12874699a1eff56400ac9d7949738f3aa3ebce
AUX lxd-5.0.2-remove-shellcheck-buildsystem-checks.patch 1059 BLAKE2B 2f75a4825584bfb864702f6d5b7023850ca19601014a0f594c2909b892c94b355013eac32d430caf7600e3fdc85fe5140d1e01bd6c26d3cb80df52ccf5cb3ee2 SHA512 026847b13dee7b92e718ea4c6697483d115cc452a9f129acedf7aa8df78f9f67c2b9ff72bec959560d1baabce9d5cf8c9b791fbd5b829cca18a488e8572e6872
AUX lxd-5.0.3-btrfs-quota-group-fix.patch 1762 BLAKE2B c26a2cfe479cace5dda6bccf09c4c67d5e787fb0595da58959c182ec866b7a22ebed11856b29feb77a24d4b44fed213dae649f3b74fd55f6211c8c98f3a8d55d SHA512 0438c12eb728a968ec80562e6ca839ab14cb7c09294ae527a8e20e24e927e8941f87ffc8a145f4931bb8867f5ad2cdf61c965f29f0320e5716aa387dbd3e5880
+AUX lxd-5.0.3-pr-12834-dont-stop-parsing-image-info.patch 3091 BLAKE2B d21b6bbc168579fdb43845bdfadf1fa4514b3e8abb9e49d171fc5a576eef73a827a573e75d4ced65225659db998cce7eb3eb90f3c2a558dc0c83255c799c582b SHA512 6a5d1c64045266697ecfa6cf970640e7dc705436af71c2d20fb1f0c978020b2a20698f8ddd43f60d444c3f460d9520d644fe9bf8c8ed28aba77f88ff7349053c
+AUX lxd-5.0.3-pr-12847-ignore-incus-archives.patch 1052 BLAKE2B 13f360b09a9bf3224f23f1d95ca9b4ee714a3c8e32c981acaededdfce3833d51e700a2e7b12c79b4d79ad99925d156ec57159114c6668d5a2261316a14ed4581 SHA512 4e34878214d96a165b4762f0c39bfa7279677af65a6a9452da2d19e6b1f87d8a4cd1fe5c3cb55e20662c82e1682ac5ae9848bf5c4c61b5ca2f1d58e2f9e62cfb
AUX lxd-5.0.3-remove-shellcheck-buildsystem-checks.patch 992 BLAKE2B 861128f47f9ad4e3e1ed6ec06f563339c58c8ad1f8d30a25c2ae043d34b519c6b6e1a17dc77bfccc37e65ffc1f72ed8dfd455292ce3b5bf2c00496edb5dad675 SHA512 af551a0461d0fb7044bf6f12a0d4f66d96215f05009a1a096b361824b63170e7e08b9065a310dcc885a73c5f1eea99ee52f7680fb94d3dacffaf6e38d5a26472
AUX lxd-containers-4.0.0.service 322 BLAKE2B a38cffd4b5809946abdac858564dcab2c2967c295d671df0d315d790df1849e25f0bc052e20cd0d9e4c23403289050b4538f5a52437ab8ae9ca3b40c6a9a1571 SHA512 a55f2c1a367c5c3c5eb6880e01893977de18c6e9463949236ee3247715fbf53641bbe1b69404362dd6cb6ba2a30ac6539fd362b21059e529dc4dac4ec5ca6718
DIST lxd-4.0.9.tar.gz 9117078 BLAKE2B aa6689c1e958258484fba5c060765dd71d5406cb4375d3132cdc38633277e6c95322e8e3aed5e9dd251140c6868ec42470e797639dde4af42848e138f3b45ee2 SHA512 657949311753895f3941deaabae2d03092fc67490d2de78db48b296fdd3e9df4c5844467dd6913814426ca423a6ee1da9705bb1a2652ea99fe1356eb7da97ebb
@@ -20,6 +22,7 @@ DIST lxd-5.20.tar.gz 22825821 BLAKE2B 616e6659c75e87027883dc6643c8c42cce75f69e77
DIST lxd-5.20.tar.gz.asc 833 BLAKE2B 03d469429fee81e6b061de458eeffe7aacf19ccc1dacb73e2e9cf3530439c82fcd016496aa7757d3ff54af2da7372c5ecf0642b3adddff950065b1ceb1e64103 SHA512 e48af466194523903a472a246dfa81cd67ec4ad7b1be6edb1ce9135945be8a810fca3f98de5a4d8b93390119cb0e4eda78a323d5dea0330b0c92e755781982a3
EBUILD lxd-4.0.9-r4.ebuild 4910 BLAKE2B e49519f08b5214bf26ac9859f4fc514361aae85f6e6ac9bc80463e23b54547ce724682eba8dcbf34bb9a024d615f58fc717b20612c2a97db4c974b339df7cad1 SHA512 85b77939031b81a5bfa544d04b2274ed45abb6337faa0db9bde6a6ac4624230b5c69eb469ae1035e7e79a2219e0d4538d07122cf5c803a90c6ae5df26f1bce5b
EBUILD lxd-5.0.2-r3.ebuild 5899 BLAKE2B b4e6beb45164e5bed163cba3bf1cd12d5431ce32d1bf009a4d4b698da08d95f933e18d19b774ea480e5ca0ad3164b1ec1c316ca7a4fc88109aea033382cf326f SHA512 e264f5fc588460fa670bba08cb22e8dbba1cd42aa0dc72414a4893e299d8ec50f7733880b8605374755e0ff26b3b45a03e3d46ae1b6fd3cd815f32f0408b35f1
+EBUILD lxd-5.0.3-r1.ebuild 5995 BLAKE2B e5836d918fd654dfce318f3cc2cda5773fdab36d550631051e696988ae9ab56aa01ed2bb0a6e6d1d5d90034fc060431c9a03c25e501bc295bd9d7eb71ffac340 SHA512 ab65a0ff7cd9bdab4ac725bd5c3e60e56f744c4f4d122232a961994f00a85b72d99ec95af1ac47f5b5cb49a1cccf78eea52c46b50d5a47300dbd8ce49d66792c
EBUILD lxd-5.0.3.ebuild 5864 BLAKE2B 352df199d004976bae3bf86f5d34b998fcebac6a0c6d19d6dca188d0b66f4faf96024120d7b8b5f98b802da66ed715b0af42839d4fd0e1f0361a512d5bcc308b SHA512 35571d216ee72df722bcaa997dc0549ad3a3adf88b3e9728395593e9b0c9c5b94fe6a648e80926303b23fc9fcaf66f6c4491b08c4f69ac0c1617d655e6f3c629
EBUILD lxd-5.19.ebuild 5005 BLAKE2B a371a53672b07efa199bae9495f04053898a9c970e371492f5043c5e992b786411fa9a3d8a8a0484abb3e8332edf01f25334b282cc92ebe57b9756fe55caea39 SHA512 87ffbcc2800fad290c9d95ed654b56e2ac8341863c01555c34d524a49877d47f32abd12bda30cbbca6eabd9bc5129c0219319c0e1afd6b35f41b65b455931c0e
EBUILD lxd-5.20.ebuild 5020 BLAKE2B 734801638d1567d7200e7e3f3c890d37c820eaf51521f10b5e03d422cbf724e7491e25e31860f8b1cd4d431ce95de7dbd71a417c8176d19bc0653d07172e5d58 SHA512 bd6635b11cbdb71ec8efe29a22d4273937c51887f4abcfdb9eb181f12f2aea35c1b1584c3d9feaf118176da9f7caf64e9cf6de62f12de78243c5c2205c8cab83
diff --git a/app-containers/lxd/files/lxd-5.0.3-pr-12834-dont-stop-parsing-image-info.patch b/app-containers/lxd/files/lxd-5.0.3-pr-12834-dont-stop-parsing-image-info.patch
new file mode 100644
index 000000000000..768e4d160132
--- /dev/null
+++ b/app-containers/lxd/files/lxd-5.0.3-pr-12834-dont-stop-parsing-image-info.patch
@@ -0,0 +1,79 @@
+From fe71f2135bdc3aa6ea28de7ed1ac324f7d689ed6 Mon Sep 17 00:00:00 2001
+From: Thomas Parrott <thomas.parrott@canonical.com>
+Date: Wed, 7 Feb 2024 16:53:29 +0000
+Subject: [PATCH 1/2] shared/simplestreams/products: Fix regression in parsing
+ version files
+
+Don't stop when finding first matching version file because the index is parsed
+in random order and LXD calls it multiple times when figuring out which image
+file to download and so stopping early can cause mismatches when trying to match
+a converted alias to a specific file fingerprint.
+
+Introduced with 3e9acc4
+
+Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
+(cherry picked from commit 3681d5e54649fcc2fc9375b6820c1133f140228d)
+---
+ shared/simplestreams/products.go | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/shared/simplestreams/products.go b/shared/simplestreams/products.go
+index a07e4d5b1b5b..542051403899 100644
+--- a/shared/simplestreams/products.go
++++ b/shared/simplestreams/products.go
+@@ -279,8 +279,6 @@ func (s *Products) ToLXD() ([]api.Image, map[string][][]string) {
+ if err != nil {
+ continue
+ }
+-
+- break // Stop at first compatible item found.
+ } else if shared.StringInSlice(item.FileType, lxdCompatItems) {
+ // Locate the root files
+ for _, subItem := range version.Items {
+@@ -291,8 +289,6 @@ func (s *Products) ToLXD() ([]api.Image, map[string][][]string) {
+ }
+ }
+ }
+-
+- break // Stop at first compatible item found.
+ }
+ }
+ }
+
+From d3253e4cbc85b97e3bc6dba9a27fd2ab0c4d8685 Mon Sep 17 00:00:00 2001
+From: Thomas Parrott <thomas.parrott@canonical.com>
+Date: Wed, 7 Feb 2024 10:28:36 +0000
+Subject: [PATCH 2/2] shared/simplestreams/simplestreams: Improve error
+ messages
+
+Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
+(cherry picked from commit 56364f5a97373155d5e6a5a6b10d06d16a25fb3c)
+---
+ shared/simplestreams/simplestreams.go | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/shared/simplestreams/simplestreams.go b/shared/simplestreams/simplestreams.go
+index 3f3255cac913..68e1d96278a3 100644
+--- a/shared/simplestreams/simplestreams.go
++++ b/shared/simplestreams/simplestreams.go
+@@ -377,7 +377,7 @@ func (s *SimpleStreams) GetFiles(fingerprint string) (map[string]DownloadableFil
+ }
+ }
+
+- return nil, fmt.Errorf("Couldn't find the requested image")
++ return nil, fmt.Errorf("Couldn't find the requested image for fingerprint %q", fingerprint)
+ }
+
+ // ListAliases returns a list of image aliases for the provided image fingerprint.
+@@ -501,9 +501,9 @@ func (s *SimpleStreams) GetImage(fingerprint string) (*api.Image, error) {
+ }
+
+ if len(matches) == 0 {
+- return nil, fmt.Errorf("The requested image couldn't be found")
++ return nil, fmt.Errorf("The requested image couldn't be found for fingerprint %q", fingerprint)
+ } else if len(matches) > 1 {
+- return nil, fmt.Errorf("More than one match for the provided partial fingerprint")
++ return nil, fmt.Errorf("More than one match for the provided partial fingerprint %q", fingerprint)
+ }
+
+ return &matches[0], nil
diff --git a/app-containers/lxd/files/lxd-5.0.3-pr-12847-ignore-incus-archives.patch b/app-containers/lxd/files/lxd-5.0.3-pr-12847-ignore-incus-archives.patch
new file mode 100644
index 000000000000..76a6a1476de8
--- /dev/null
+++ b/app-containers/lxd/files/lxd-5.0.3-pr-12847-ignore-incus-archives.patch
@@ -0,0 +1,26 @@
+From 55bd4024dbfc315c0f57da57f2f9bd9c5c97dad1 Mon Sep 17 00:00:00 2001
+From: Din Music <din.music@canonical.com>
+Date: Thu, 18 Jan 2024 17:08:36 +0100
+Subject: [PATCH] shared/simplestreams/products: Search only for lxd archives
+
+Signed-off-by: Din Music <din.music@canonical.com>
+(cherry picked from commit 0c9253da9448475e6de60dd345c67c0179884f13)
+---
+ shared/simplestreams/products.go | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/shared/simplestreams/products.go b/shared/simplestreams/products.go
+index 542051403899..d80d8e7be251 100644
+--- a/shared/simplestreams/products.go
++++ b/shared/simplestreams/products.go
+@@ -10,8 +10,8 @@ import (
+ "github.com/canonical/lxd/shared/osarch"
+ )
+
+-var lxdCompatCombinedItems = []string{"lxd_combined.tar.gz", "incus_combined.tar.gz"}
+-var lxdCompatItems = []string{"lxd.tar.xz", "incus.tar.xz"}
++var lxdCompatCombinedItems = []string{"lxd_combined.tar.gz"}
++var lxdCompatItems = []string{"lxd.tar.xz"}
+
+ // Products represents the base of download.json.
+ type Products struct {
diff --git a/app-containers/lxd/lxd-5.0.3-r1.ebuild b/app-containers/lxd/lxd-5.0.3-r1.ebuild
new file mode 100644
index 000000000000..0cb951baf4e3
--- /dev/null
+++ b/app-containers/lxd/lxd-5.0.3-r1.ebuild
@@ -0,0 +1,216 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit bash-completion-r1 go-module linux-info optfeature systemd verify-sig
+
+DESCRIPTION="Modern, secure and powerful system container and virtual machine manager"
+HOMEPAGE="https://ubuntu.com/lxd https://github.com/canonical/lxd"
+SRC_URI="https://github.com/canonical/lxd/releases/download/${P}/${P}.tar.gz
+ verify-sig? ( https://github.com/canonical/lxd/releases/download/${P}/${P}.tar.gz.asc
+)"
+
+LICENSE="Apache-2.0 BSD LGPL-3 MIT"
+SLOT="0/lts"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="apparmor nls"
+
+DEPEND="acct-group/lxd
+ app-arch/xz-utils
+ >=app-containers/lxc-5.0.0:=[apparmor?,seccomp(+)]
+ dev-db/sqlite:3
+ >=dev-libs/dqlite-1.13.0:=
+ dev-libs/lzo
+ >=dev-libs/raft-0.17.1:=[lz4]
+ >=dev-util/xdelta-3.0[lzma(+)]
+ net-dns/dnsmasq[dhcp]
+ sys-libs/libcap
+ virtual/udev"
+RDEPEND="${DEPEND}
+ || (
+ net-firewall/nftables[json]
+ (
+ net-firewall/ebtables
+ net-firewall/iptables
+ )
+ )
+ sys-apps/iproute2
+ sys-fs/fuse:*
+ >=sys-fs/lxcfs-5.0.0
+ sys-fs/squashfs-tools[lzma]
+ virtual/acl"
+BDEPEND="dev-lang/go
+ nls? ( sys-devel/gettext )
+ verify-sig? ( sec-keys/openpgp-keys-canonical )"
+
+CONFIG_CHECK="
+ ~CGROUPS
+ ~IPC_NS
+ ~NET_NS
+ ~PID_NS
+
+ ~SECCOMP
+ ~USER_NS
+ ~UTS_NS
+
+ ~KVM
+ ~MACVTAP
+ ~VHOST_VSOCK
+"
+
+ERROR_IPC_NS="CONFIG_IPC_NS is required."
+ERROR_NET_NS="CONFIG_NET_NS is required."
+ERROR_PID_NS="CONFIG_PID_NS is required."
+ERROR_SECCOMP="CONFIG_SECCOMP is required."
+ERROR_UTS_NS="CONFIG_UTS_NS is required."
+
+WARNING_KVM="CONFIG_KVM and CONFIG_KVM_AMD/-INTEL is required for virtual machines."
+WARNING_MACVTAP="CONFIG_MACVTAP is required for virtual machines."
+WARNING_VHOST_VSOCK="CONFIG_VHOST_VSOCK is required for virtual machines."
+
+# Go magic.
+QA_PREBUILT="/usr/bin/fuidshift
+ /usr/bin/lxc
+ /usr/bin/lxc-to-lxd
+ /usr/bin/lxd-agent
+ /usr/bin/lxd-benchmark
+ /usr/bin/lxd-migrate
+ /usr/sbin/lxd"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/canonical.asc
+
+# The testsuite must be run as root.
+# make: *** [Makefile:156: check] Error 1
+RESTRICT="test"
+
+GOPATH="${S}/_dist"
+
+PATCHES=(
+ "${FILESDIR}"/lxd-5.0.3-remove-shellcheck-buildsystem-checks.patch
+ "${FILESDIR}"/lxd-5.0.3-pr-12834-dont-stop-parsing-image-info.patch
+ "${FILESDIR}"/lxd-5.0.3-pr-12847-ignore-incus-archives.patch
+)
+
+src_prepare() {
+ export GOPATH="${S}/_dist"
+
+ default
+
+ sed -i \
+ -e "s:\./configure:./configure --prefix=/usr --libdir=${EPREFIX}/usr/lib/lxd:g" \
+ -e "s:make:make ${MAKEOPTS}:g" \
+ Makefile || die
+
+ # Fix hardcoded ovmf file path, see bug 763180
+ sed -i \
+ -e "s:/usr/share/OVMF:/usr/share/edk2-ovmf:g" \
+ -e "s:OVMF_VARS.ms.fd:OVMF_VARS.fd:g" \
+ doc/environment.md \
+ lxd/apparmor/instance.go \
+ lxd/apparmor/instance_qemu.go \
+ lxd/instance/drivers/driver_qemu.go || die "Failed to fix hardcoded ovmf paths."
+
+ # Fix hardcoded virtfs-proxy-helper file path, see bug 798924
+ sed -i \
+ -e "s:/usr/lib/qemu/virtfs-proxy-helper:/usr/libexec/virtfs-proxy-helper:g" \
+ lxd/device/device_utils_disk.go || die "Failed to fix virtfs-proxy-helper path."
+
+ cp "${FILESDIR}"/lxd-4.0.9-r1.service "${T}"/lxd.service || die
+ if use apparmor; then
+ sed -i \
+ '/^EnvironmentFile=.*/a ExecStartPre=\/usr\/libexec\/lxc\/lxc-apparmor-load' \
+ "${T}"/lxd.service || die
+ fi
+
+ # Disable -Werror's from go modules.
+ find "${S}" -name "cgo.go" -exec sed -i "s/ -Werror / /g" {} + || die
+}
+
+src_configure() { :; }
+
+src_compile() {
+ export GOPATH="${S}/_dist"
+ export CGO_LDFLAGS_ALLOW="-Wl,-z,now"
+
+ for k in fuidshift lxd-benchmark lxc lxc-to-lxd; do
+ go install -v -x "${S}/${k}" || die "failed compiling ${k}"
+ done
+
+ go install -v -x -tags libsqlite3 "${S}"/lxd || die "Failed to build the daemon"
+
+ # Needs to be built statically
+ CGO_ENABLED=0 go install -v -tags netgo "${S}"/lxd-migrate
+ CGO_ENABLED=0 go install -v -tags agent,netgo "${S}"/lxd-agent
+
+ use nls && emake build-mo
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ export GOPATH="${S}/_dist"
+ local bindir="_dist/bin"
+
+ dosbin ${bindir}/lxd
+
+ for l in fuidshift lxd-agent lxd-benchmark lxd-migrate lxc lxc-to-lxd; do
+ dobin ${bindir}/${l}
+ done
+
+ newbashcomp scripts/bash/lxd-client lxc
+
+ newconfd "${FILESDIR}"/lxd-4.0.0.confd lxd
+ newinitd "${FILESDIR}"/lxd-5.0.2-r1.initd lxd
+
+ systemd_dounit "${T}"/lxd.service
+ systemd_newunit "${FILESDIR}"/lxd-containers-4.0.0.service lxd-containers.service
+ systemd_newunit "${FILESDIR}"/lxd-4.0.0.socket lxd.socket
+
+ dodoc AUTHORS
+ dodoc -r doc/*
+ use nls && domo po/*.mo
+}
+
+pkg_postinst() {
+ elog
+ elog "Consult https://wiki.gentoo.org/wiki/LXD for more information,"
+ elog "including a Quick Start."
+ elog "For virtual machine support, see:"
+ elog "https://wiki.gentoo.org/wiki/LXD#Virtual_machines"
+ elog
+ elog "Please run 'lxc-checkconfig' to see all optional kernel features."
+ elog
+ optfeature "virtual machine support" app-emulation/qemu[spice,usbredir,virtfs]
+ optfeature "btrfs storage backend" sys-fs/btrfs-progs
+ optfeature "ipv6 support" net-dns/dnsmasq[ipv6]
+ optfeature "full lxd-migrate support" net-misc/rsync
+ optfeature "lvm2 storage backend" sys-fs/lvm2
+ optfeature "zfs storage backend" sys-fs/zfs
+ elog
+ elog "Be sure to add your local user to the lxd group."
+
+ if [[ ${REPLACING_VERSIONS} ]] &&
+ ver_test ${REPLACING_VERSIONS} -lt 5.0.1 &&
+ has_version app-emulation/qemu[spice,usbredir,virtfs]; then
+ ewarn ""
+ ewarn "You're updating from <5.0.1. Due to incompatible API updates in the lxd-agent"
+ ewarn "product, you'll have to restart any running virtual machines before they work"
+ ewarn "properly."
+ ewarn ""
+ ewarn "Run: 'lxc restart your-vm' after the update for your vm's managed by lxd."
+ ewarn ""
+ fi
+
+ if [[ ${REPLACING_VERSIONS} ]] &&
+ has_version "sys-apps/openrc"; then
+ elog ""
+ elog "The new init.d script will attempt to mount "
+ elog " /sys/fs/cgroup/systemd"
+ elog "by default, which is needed to run systemd containers with openrc host."
+ elog "See the /etc/init.d/lxd file for requirements."
+ elog ""
+ fi
+}