summaryrefslogtreecommitdiff
path: root/app-containers/lxd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-01-19 17:59:37 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-01-19 17:59:37 +0000
commit150a86a9cb006b4800d6517d58532b8a556fec1e (patch)
tree0cea769c7bef669c4dfe19e7805593f6f34033fb /app-containers/lxd
parent1cb0dd91756f77b25d6cc22318dc85187ed084cb (diff)
gentoo auto-resync : 19:01:2023 - 17:59:37
Diffstat (limited to 'app-containers/lxd')
-rw-r--r--app-containers/lxd/Manifest4
-rw-r--r--app-containers/lxd/files/lxd-5.0.2-remove-shellcheck-buildsystem-checks.patch32
-rw-r--r--app-containers/lxd/lxd-5.0.2.ebuild204
3 files changed, 240 insertions, 0 deletions
diff --git a/app-containers/lxd/Manifest b/app-containers/lxd/Manifest
index abe06f944d73..67a5eb7efafb 100644
--- a/app-containers/lxd/Manifest
+++ b/app-containers/lxd/Manifest
@@ -4,11 +4,15 @@ AUX lxd-4.0.9-r1.service 612 BLAKE2B e44029b6f615afc0daf8abfccd7d2e472291d9b1f85
AUX lxd-4.0.9.initd 1333 BLAKE2B 72a27d38527b4f0dcca3b111ae0d112bd128cf83ff6261561c5a3bf1c619a2e36672b5eb06ff643660d3cee05a545991ed565be257a56452cbd498a202e1b197 SHA512 933a09e72dbf3bbab8e2148549b6bc08ac0caf2088bd44c3e378ac6041fa861845bfae351c83fcd0920655ceb29ea6ca8023163c52a2fb7499c9bf2958d4dc86
AUX lxd-5.0.2-fix-btrfs-driver-to-support-btrfs-6.0.patch 1169 BLAKE2B a590a4f958270509fa2787837992f5a0c16e689713fea13f15c120902a822b6e662b1658cabc4ba4b4c0d1d9fe5feab73a077f2ac751383e9408c436bbc599b1 SHA512 0fb90748070d8376e62af3dec5ae793b0b6e8c678c226eafce014e978a4e16c4fbcb30a1a98ce8ca1b67436ca603f0531522da1905fbbb79824222a3241806a5
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-containers-4.0.0.service 322 BLAKE2B a38cffd4b5809946abdac858564dcab2c2967c295d671df0d315d790df1849e25f0bc052e20cd0d9e4c23403289050b4538f5a52437ab8ae9ca3b40c6a9a1571 SHA512 a55f2c1a367c5c3c5eb6880e01893977de18c6e9463949236ee3247715fbf53641bbe1b69404362dd6cb6ba2a30ac6539fd362b21059e529dc4dac4ec5ca6718
DIST lxd-5.0.1.tar.gz 14640923 BLAKE2B 81bdf3301c0eecc719864cd8e18fd886113f83d1980e13ee4d4ccb6641ee4a7e33f0b859a21abd8a0a9956d1c2f3dfa6e7eb1ae454fbb580c23b5558ef51168e SHA512 b04b7329bdeb17ca384cc2d931a1510d5f03521fd247eab93904bbcb6139cc0daf28f9aeb6416268ccf15affdd15b26598f3e280fb5eefe5c59be6918f092bed
DIST lxd-5.0.1.tar.gz.asc 833 BLAKE2B d233c8ebfb5b71f66ff08b4d74861a42bf45ef3e9622d4f113603a7a6c1a29b5aa3422c075ad5250a7d5ab7526a49dd676672d0a73194024af477fa762e02b12 SHA512 bf22f26b6688420e843e9e24eb731a2068eae3d90c77787e0f4a279d4cb7a8a2df38b7e9c8ea79f604c1d54743238cb36474baf018ea6bf72e6f37838b252294
DIST lxd-5.0.2-move-shellcheck-version-call-into-static-analysis.patch 882 BLAKE2B 4c4cb8b19709939c0c14ed87e5d9c917ac967471400de07c14ea049c0a8aae9a2ed0e3755d554cb1077ee7c607fcdc71431d57a55becd0a46c1f177bc9b33aed SHA512 266788186ca9aabda4ad0fe5fa47ef3acfa31bee64c742c011c58a39f4da833f768e8bb71ec81b57af8d4f124d733f2c22ab33f9ee1bc4ecbd21f5bbbae1f6e7
+DIST lxd-5.0.2.tar.gz 16258766 BLAKE2B a0d4e3108664724c064fb8c16031ff7dfa3f49735c81290c78fca1dd8c95774e8d8faf131a9de0961a51fb3f1fb1e3a1219d325e6c440dc42d077bfb6550df0b SHA512 e44b210828251ef2bbdcca332f605294a9258572a52a8e94f5c8dcf8d5c2b3d4cdaf46f85236d9c963de5654d3a0437b5f177ea908a6dac3b5b03fb721be6eaa
+DIST lxd-5.0.2.tar.gz.asc 833 BLAKE2B 606cae1439148060acd3fb04fdb108654a351ce2b7484081f7874ab2b0af8de2b5befc5a5409a94af0da25308622234db2e3b411edb20324df458fe85f46ac21 SHA512 884c921a263a8baf2d94958c72e232a0a47d0747f5a9d36ed8fc270edfa18dfc240d1e858e75dcc03eae921dae08d3ddfd34d9146d1510de6a09031da26aaccc
DIST lxd-5.8-add-tcp-keepalives-to-exec-channels.patch 15702 BLAKE2B ee834b86284e36f87ad3e54df04eb2968dc0fefdf81b116bd640e611ac4ca2eb93763ed2c2f3cfd1e9473da1a3e66bd90858eb4bab08a47f86306a0903a19e6e SHA512 5e7c56f5ffbc8cecb27c6916abbbf4bb3d268c0936b9fdb2b80b4b306c911bdcf782059290243988feb49c9209e55de9ea168ea7041636bf9ae1b7d88ff541c9
EBUILD lxd-5.0.1-r2.ebuild 5268 BLAKE2B b0d0d8601fe9dfda083f98078aa404e04cc4c82098583bc3b8bcee76b4f46f1eadd097a05ffb62111ab929a42f3af2377de9302f3acaeeca5056d85ef460715f SHA512 540ef775bc0558a59dad52220d1f8d9de6f0dd4aa57eff7e18beefefc2263651d9edf5fb0e993d724b4e03145f0250efa074cfb11d0e5e9997dcd5b968a2997c
EBUILD lxd-5.0.1-r5.ebuild 6235 BLAKE2B 95efb03e4ad618bd92d6a22311a135a9a096bb0742a15a3191254620f05604ae5e10fddc97883e06d6dabfa4972fa62899751e23a98f53d3235733f37ddd2ec2 SHA512 6d39152adabe406e568d39e6a3d696e4d3f554d66b063a4827f596ebc6e034f346a086faaedbc6de7a3e7a94c01b9d412533e81e1d5f1671e2fb75074ba52d61
+EBUILD lxd-5.0.2.ebuild 5735 BLAKE2B efd35039e5b0663cf5b1bfa8d6d46d8072d9f60c3719dd8797fa5eb1640c0717493da343b43013623d27e0f74f33b11142a7e3f345b015c094a76c94ee8e2bb5 SHA512 e247131eddcd3d866f67e28978f02ea6fd19280e3a7913afddc7f57a49e36e199ae8faef5bcecd739c632a203077e412aeb640408380a4c82bb97f950261d000
MISC metadata.xml 1403 BLAKE2B 4bff140bc9282b41631293b9cc28a5f85bec2b0f923c762c6572e75b752aba113632747142bd3b3a87322ce8d2ba10fd15afe3f1a7c1384e49c408ca176f267d SHA512 38fb2faa661a8473d0221117299baea01c06f46e5fbf5bd7e32f26b7d0a433ab35c5e0e5dde42c7478b7118489d619fdacca29b3a9b0e89cf432c5bccd3ffba3
diff --git a/app-containers/lxd/files/lxd-5.0.2-remove-shellcheck-buildsystem-checks.patch b/app-containers/lxd/files/lxd-5.0.2-remove-shellcheck-buildsystem-checks.patch
new file mode 100644
index 000000000000..a8e457387ee6
--- /dev/null
+++ b/app-containers/lxd/files/lxd-5.0.2-remove-shellcheck-buildsystem-checks.patch
@@ -0,0 +1,32 @@
+diff -Naur a/Makefile b/Makefile
+--- a/Makefile 2023-01-16 21:10:45.000000000 -0000
++++ b/Makefile 2023-01-19 14:52:28.488204725 -0000
+@@ -248,28 +248,6 @@
+ .PHONY: build-mo
+ build-mo: $(MOFILES)
+
+-.PHONY: static-analysis
+-static-analysis:
+-ifeq ($(shell command -v golangci-lint 2> /dev/null),)
+- go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.46.2
+-endif
+-ifeq ($(shell command -v shellcheck 2> /dev/null),)
+- echo "Please install shellcheck"
+- exit 1
+-endif
+-ifneq "$(shell shellcheck --version | grep version: | cut -d ' ' -f2)" "0.8.0"
+- @echo "WARN: shellcheck version is not 0.8.0"
+-endif
+-ifeq ($(shell command -v flake8 2> /dev/null),)
+- echo "Please install flake8"
+- exit 1
+-endif
+- golangci-lint run --timeout 5m
+- flake8 test/deps/import-busybox
+- shellcheck --shell sh test/*.sh test/includes/*.sh test/suites/*.sh test/backends/*.sh test/lint/*.sh
+- shellcheck test/extras/*.sh
+- run-parts --regex '.sh' test/lint
+-
+ .PHONY: tags
+ tags: *.go lxd/*.go shared/*.go lxc/*.go
+ find . -type f -name '*.go' | xargs gotags > tags
diff --git a/app-containers/lxd/lxd-5.0.2.ebuild b/app-containers/lxd/lxd-5.0.2.ebuild
new file mode 100644
index 000000000000..4ce69e48b15f
--- /dev/null
+++ b/app-containers/lxd/lxd-5.0.2.ebuild
@@ -0,0 +1,204 @@
+# Copyright 1999-2023 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://linuxcontainers.org/lxd/introduction/ https://github.com/lxc/lxd"
+SRC_URI="https://linuxcontainers.org/downloads/lxd/${P}.tar.gz
+ verify-sig? ( https://linuxcontainers.org/downloads/lxd/${P}.tar.gz.asc )"
+
+LICENSE="Apache-2.0 BSD LGPL-3 MIT"
+SLOT="0"
+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,ipv6(+)]
+ sys-libs/libcap
+ virtual/udev"
+RDEPEND="${DEPEND}
+ net-firewall/ebtables
+ net-firewall/iptables[ipv6(+)]
+ sys-apps/iproute2[ipv6(+)]
+ 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-linuxcontainers )"
+
+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=${BROOT}/usr/share/openpgp-keys/linuxcontainers.asc
+
+# The testsuite must be run as root.
+# make: *** [Makefile:156: check] Error 1
+RESTRICT="test"
+
+GOPATH="${S}/_dist"
+
+PATCHES=( "${FILESDIR}"/lxd-5.0.2-remove-shellcheck-buildsystem-checks.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 "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
+}