summaryrefslogtreecommitdiff
path: root/app-emulation/lxd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2021-11-13 13:10:00 +0000
committerV3n3RiX <venerix@koprulu.sector>2021-11-13 13:10:00 +0000
commite9d044d4b9b71200a96adfa280848858c0f468c9 (patch)
tree1bd8ef816043a8cd340f1d774e79553a1a7d31d8 /app-emulation/lxd
parentfc2f1018fc323ef2c6572734a9b130427cba76a6 (diff)
gentoo resync : 13.11.2021
Diffstat (limited to 'app-emulation/lxd')
-rw-r--r--app-emulation/lxd/Manifest6
-rw-r--r--app-emulation/lxd/files/lxd-4.0.8-btrfs-progs-5.14-safety-check-fix.patch75
-rw-r--r--app-emulation/lxd/lxd-4.0.7-r2.ebuild2
-rw-r--r--app-emulation/lxd/lxd-4.0.7.ebuild163
-rw-r--r--app-emulation/lxd/lxd-4.0.8-r1.ebuild (renamed from app-emulation/lxd/lxd-4.0.8.ebuild)2
5 files changed, 81 insertions, 167 deletions
diff --git a/app-emulation/lxd/Manifest b/app-emulation/lxd/Manifest
index b7036b850d88..51591d8773a1 100644
--- a/app-emulation/lxd/Manifest
+++ b/app-emulation/lxd/Manifest
@@ -4,13 +4,13 @@ AUX lxd-4.0.0.service 519 BLAKE2B 5314820c25e52449aad8db6584739cbe0f2654111e4b42
AUX lxd-4.0.0.socket 197 BLAKE2B 8c0d2dee71c14ee5f34b2bd0804adfa06ab3ae2a73bcf8d122184434c42b7f91f66fe610bddda93c458e0f171b505fe79a4f268d8243aabdf226f47e95027e71 SHA512 d70dc867b2e92b69928c83fc5feca4e387808adbc267b9fe4ecf0c8befdf3ca13366b229c6eefcb5667e51405fb0aa4e6bb8f59a0b5b5fb3895c46b4aaab0661
AUX lxd-4.0.0_apparmor.service 567 BLAKE2B e5951c31f90b842f5b625060326d9611ed67fb50360b11791cbd1ab1953fdfe5eb726e22b7091bb8e45c294b772e6b00e9ca65833512eb5b570627fa3234812e SHA512 364764d007f4800138c712fce70fe28b096b6e35dc6d2e4f8aa9aff4b335ecec7dfc9600a1a16cd38e69a96534b7462daf5f6e946a2ee81bce17977b8d5911db
AUX lxd-4.0.7-r1.service 497 BLAKE2B 90141dce8dbef52521c5f9c2924111904f8b0528e8555afb8a2eb8d9dc8b4c6b32b543a6ee3caf42dc0a90f20d35d40810a3f0828a88377e91424f7b00e589a8 SHA512 91fa16a9e9de2eda34c06ec66c144a43fe1cb23c99137cbd830ff9621c7362989404ca9906e4f53b3c10ba84c3cc950713cb69ed7a81bd66f07935312f8f75f8
+AUX lxd-4.0.8-btrfs-progs-5.14-safety-check-fix.patch 2184 BLAKE2B ee6b371694a594606b25ac6950032f3613be4da470c9b991bf30f0f1911b563844f20180009c7049f1e5ad461e83025f82764ae00777bc811e05b26a2b6690b8 SHA512 7d126f4c59007862dce8dd4273b1b335a6f29e1631012adb7f1486778179dc03a2e94aa3fed38b7ad075fd65bf2efb580800b9450dac21c088778d0cef32fcff
AUX lxd-containers-4.0.0.service 322 BLAKE2B a38cffd4b5809946abdac858564dcab2c2967c295d671df0d315d790df1849e25f0bc052e20cd0d9e4c23403289050b4538f5a52437ab8ae9ca3b40c6a9a1571 SHA512 a55f2c1a367c5c3c5eb6880e01893977de18c6e9463949236ee3247715fbf53641bbe1b69404362dd6cb6ba2a30ac6539fd362b21059e529dc4dac4ec5ca6718
AUX lxd-syscall_wrappers-don-t-conflict-with-glibc-provided.patch 2055 BLAKE2B 4f17aeb03e6022b6e88c4279865215fbecb699b9cc112a8e1fe16d9cda113e41d39faf448d17f9810bb65efb37d37b74b3c20ffb65329e012820f46705235f6f SHA512 1f0846ab9aa3ebfd96e79a91bc17be871f0ac3af44ddd3f9ba2a17570b2d800407a76634476e61d6d1f8bfbb880f5df37ad3b435a139e62f4c1c786c002d29d4
DIST lxd-4.0.7.tar.gz 15454709 BLAKE2B 6278fa058efa15a689a982dcf0bce58bf320ac500bc8bd6cd4227f5f126a03dd85a65363d4d36b3437a0a2fd8e08e8a7332b96f9aba8e8eb2aa508d1129fec13 SHA512 dd99db21a4de95d95e6bd53dcbd68f4d9f0ffbd9e60d994340cd0b1e820068e671507a9718d1c56488c79ad49019f86637a4a8b9c945cdd3f70d59c9e2026fb1
DIST lxd-4.0.7.tar.gz.asc 833 BLAKE2B a28e43d1fd0d5851a62121069703637e7ba25cbeb142507e4e162b254eddce2b5a13a100eedb202fbf3d8aa40f6e20b4fd587ef38f6c73a07d2bd9d8d9d00c8f SHA512 561d7cbf94a37e7ed03828ac98a2022dc1a4e11b80cdee3ad925bf4226b78b9e1d1b9c51ed070e60fba881b69e06dc70be2713026285b10de5cca59549ac5f82
DIST lxd-4.0.8.tar.gz 8898153 BLAKE2B c02bea1019079f59fff5fbb2c3d3ebf13e01751fd1c18b9aa44a9306a8f631cb0c0a55f77eb17945e44c040dfdad5c790bb2c2e3ab165356e3900c3d6cccec0e SHA512 9bf5ee91438bc14e916410254979838a110d21d8329c0eaa0a5eecfd378039a3ac10291197d2f680dc12484866f21ef724618e88e6c02038e6d2484d33571dd6
DIST lxd-4.0.8.tar.gz.asc 833 BLAKE2B 2073b113f34b2ab052e6e4f406016ac04631ec63269b79dd1e85ca5191aa73ed1f47f0e87f5155b6e5c6659138a182c4c403a66e20925cdb347f49e542e8139b SHA512 9b5f00f9d4a601e718ca91f623dd31e864963b7b8a9e9be6af8da2288b775c4fc8c60b0d6fcefa2a347d733d1e002a3714ac3dbfadf9a1188f9747e9682fe8b9
-EBUILD lxd-4.0.7-r2.ebuild 4445 BLAKE2B 4cb00d02df28930c549617e2b2e2b0633ac6d59a97f6d28cfa5071a96a5004a4448401a9c7ab46237981a9f8dc2d0b3c87e5e89a8a4db3c2ef200f63a80d303a SHA512 b75e872370ed56205ff1517f4eca96f895eab2cb4364ee3402d14b5d61cd7cc7ba14aa5afc7387c7d7d87ae5c2a6f899422b23b52f02edcbb72cd9ed04cb9a00
-EBUILD lxd-4.0.7.ebuild 4190 BLAKE2B 2938b717899c7ad9199b13265c4f250959d1b353ea4e591b8e77470c31e2cb72da47733dd823bcfbd842c26bcca9a9e820fb56784c0aca048b8221ac5ba7fbd6 SHA512 5699cdbb47c6752012f5500abae8d0ff655111d6d7843583e97e3ebd000bb63745e77dc7f3d4099c80d60939cf5d1972f74e8f90012c195ff135d7e9e3b6e749
-EBUILD lxd-4.0.8.ebuild 4425 BLAKE2B d6ec738161c45a7eaebaeb49b876dc38e4f3925952755e8f3fc99381c628c7aa72298bf10d9c7ac1fcc42aaebe74e7fdbe2bc4e2f67f5d4cfcc4a6ecb5c81fd2 SHA512 f6d63d28229b7db892311cfa5a722a3e0b8f957ef3f231575bd505848973318c32fa2cc288059a9395d22d56041dae0f37bf98057466b8f5ad532793c838924e
+EBUILD lxd-4.0.7-r2.ebuild 4444 BLAKE2B 848852a0d5478f6b116b70c2f1637851a26c9f59c2961c86fec585c5b2470cf351f3a03963edd1ee0964d481d73a72789415f7ba291ef732717d306d054d7629 SHA512 5f2de1d5b825d38d4e89152555a2ffa25c149546c00d349cb04656c0fba9f83326e232b6de5adceb281118a1c0f915723577af8e1dbb80065a4af173de8bdace
+EBUILD lxd-4.0.8-r1.ebuild 4502 BLAKE2B ecbac318c16a60b23c22fb8c9c6376ded45705939be6481b4e735c91057481acfcd6bf459e38dab5ca92dbe253fb28f84962aefc33beeed1d775214715c60247 SHA512 4170251014be93ac7b145c343f772329d76f3f409bf53e011476759605922781c77028fbfbe8803200f0104dbc6cc8e93d42d694f829d094fb86c9b1bde4eb4b
MISC metadata.xml 777 BLAKE2B e25ff2ac780143763e40917f2570bbe8244c2a2a9eac1a9761199e7ea19df9863ade968ca8218f62da9fe41f3b9e7110ef86abff764c2a3d85f02ae102951a16 SHA512 e39a06e8b838990a9b0019f52e1d0c7dd83527c6a15bc8a14f0aa9fec2ee86c914de52f1ba48e7a586c3866d9da46dc32c2d6e1ea3e2c42ca985fdfe0783b40c
diff --git a/app-emulation/lxd/files/lxd-4.0.8-btrfs-progs-5.14-safety-check-fix.patch b/app-emulation/lxd/files/lxd-4.0.8-btrfs-progs-5.14-safety-check-fix.patch
new file mode 100644
index 000000000000..f32debff5e3b
--- /dev/null
+++ b/app-emulation/lxd/files/lxd-4.0.8-btrfs-progs-5.14-safety-check-fix.patch
@@ -0,0 +1,75 @@
+From 5efac9cfed92a890dc1a073fe60b1c814c305267 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber@ubuntu.com>
+Date: Thu, 4 Nov 2021 14:05:27 -0400
+Subject: [PATCH] lxd/storage/btrfs: Support 5.14.2
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Closes #9418
+
+Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
+---
+ lxd/storage/drivers/driver_btrfs.go | 18 ++++++++++++++++++
+ lxd/storage/drivers/driver_btrfs_utils.go | 8 +++++++-
+ 2 files changed, 25 insertions(+), 1 deletion(-)
+
+diff --git a/lxd/storage/drivers/driver_btrfs.go b/lxd/storage/drivers/driver_btrfs.go
+index e6a64bf8136..a47be766f8f 100644
+--- a/lxd/storage/drivers/driver_btrfs.go
++++ b/lxd/storage/drivers/driver_btrfs.go
+@@ -17,10 +17,12 @@ import (
+ "github.com/lxc/lxd/shared/api"
+ "github.com/lxc/lxd/shared/units"
+ "github.com/lxc/lxd/shared/validate"
++ "github.com/lxc/lxd/shared/version"
+ )
+
+ var btrfsVersion string
+ var btrfsLoaded bool
++var btrfsPropertyForce bool
+
+ type btrfs struct {
+ common
+@@ -64,6 +66,22 @@ func (d *btrfs) load() error {
+ }
+ }
+
++ // Check if we need --force to set properties.
++ ver5142, err := version.Parse("5.14.2")
++ if err != nil {
++ return err
++ }
++
++ ourVer, err := version.Parse(btrfsVersion)
++ if err != nil {
++ return err
++ }
++
++ // If running 5.14.2 or older, we need --force.
++ if ourVer.Compare(ver5142) > 0 {
++ btrfsPropertyForce = true
++ }
++
+ btrfsLoaded = true
+ return nil
+ }
+diff --git a/lxd/storage/drivers/driver_btrfs_utils.go b/lxd/storage/drivers/driver_btrfs_utils.go
+index e1a359e8490..0618e29e6f2 100644
+--- a/lxd/storage/drivers/driver_btrfs_utils.go
++++ b/lxd/storage/drivers/driver_btrfs_utils.go
+@@ -308,7 +308,13 @@ func (d *btrfs) setSubvolumeReadonlyProperty(path string, readonly bool) error {
+ return nil
+ }
+
+- _, err := shared.RunCommand("btrfs", "property", "set", "-ts", path, "ro", fmt.Sprintf("%t", readonly))
++ args := []string{"property", "set"}
++ if btrfsPropertyForce {
++ args = append(args, "-f")
++ }
++ args = append(args, "-ts", path, "ro", fmt.Sprintf("%t", readonly))
++
++ _, err := shared.RunCommand("btrfs", args...)
+ return err
+ }
+
diff --git a/app-emulation/lxd/lxd-4.0.7-r2.ebuild b/app-emulation/lxd/lxd-4.0.7-r2.ebuild
index 70a7841f123b..b83c5ea48258 100644
--- a/app-emulation/lxd/lxd-4.0.7-r2.ebuild
+++ b/app-emulation/lxd/lxd-4.0.7-r2.ebuild
@@ -12,7 +12,7 @@ SRC_URI="https://linuxcontainers.org/downloads/lxd/${P}.tar.gz
LICENSE="Apache-2.0"
SLOT="0"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="amd64 ~x86"
IUSE="apparmor ipv6 nls verify-sig"
DEPEND="acct-group/lxd
diff --git a/app-emulation/lxd/lxd-4.0.7.ebuild b/app-emulation/lxd/lxd-4.0.7.ebuild
deleted file mode 100644
index 6171e0fbf21c..000000000000
--- a/app-emulation/lxd/lxd-4.0.7.ebuild
+++ /dev/null
@@ -1,163 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit autotools bash-completion-r1 linux-info optfeature systemd verify-sig
-
-DESCRIPTION="Fast, dense and secure container management"
-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"
-SLOT="0"
-KEYWORDS="amd64"
-IUSE="apparmor ipv6 nls verify-sig"
-
-DEPEND="app-arch/xz-utils
- >=app-emulation/lxc-3.0.0[apparmor?,seccomp(+)]
- dev-libs/dqlite
- dev-libs/lzo
- dev-libs/raft[lz4]
- >=dev-util/xdelta-3.0[lzma(+)]
- net-dns/dnsmasq[dhcp,ipv6?]"
-RDEPEND="${DEPEND}
- acct-group/lxd
- net-firewall/ebtables
- net-firewall/iptables[ipv6?]
- sys-apps/iproute2[ipv6?]
- sys-fs/fuse:*
- sys-fs/lxcfs
- sys-fs/squashfs-tools[lzma]
- virtual/acl"
-BDEPEND="dev-lang/go
- nls? ( sys-devel/gettext )
- verify-sig? ( app-crypt/openpgp-keys-linuxcontainers )"
-
-CONFIG_CHECK="
- ~CGROUPS
- ~IPC_NS
- ~NET_NS
- ~PID_NS
-
- ~SECCOMP
- ~USER_NS
- ~UTS_NS
-"
-
-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."
-
-# 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-p2c
- /usr/sbin/lxd"
-
-EGO_PN="github.com/lxc/lxd"
-GOPATH="${S}/_dist" # this seems to reset every now and then, though
-
-VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/linuxcontainers.asc
-
-src_prepare() {
- default
-
- export GOPATH="${S}/_dist"
-
- 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.secboot.fd:g" \
- doc/environment.md \
- 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/disk.go || die "Failed to fix virtfs-proxy-helper path."
-}
-
-src_configure() { :; }
-
-src_compile() {
- export GOPATH="${S}/_dist"
- export GO111MODULE=auto
- export CGO_LDFLAGS_ALLOW="-Wl,-z,now"
-
- cd "${S}" || die
-
- for k in fuidshift lxd-benchmark lxc lxc-to-lxd; do
- go install -v -x "${EGO_PN}/${k}" || die "failed compiling ${k}"
- done
-
- go install -v -x -tags libsqlite3 ${EGO_PN}/lxd || die "Failed to build the daemon"
-
- # Needs to be built statically
- CGO_ENABLED=0 go install -v -tags netgo "${EGO_PN}"/lxd-p2c
- CGO_ENABLED=0 go install -v -tags agent,netgo "${EGO_PN}"/lxd-agent
-
- use nls && emake build-mo
-}
-
-src_test() {
- export GOPATH="${S}/_dist"
- export GO111MODULE=off
- go test -v ${EGO_PN}/lxd || die
-}
-
-src_install() {
- local bindir="_dist/bin"
- export GOPATH="${S}/_dist"
-
- dosbin ${bindir}/lxd
-
- for l in fuidshift lxd-agent lxd-benchmark lxd-p2c lxc lxc-to-lxd; do
- dobin ${bindir}/${l}
- done
-
- cd "${S}" || die
-
- newbashcomp scripts/bash/lxd-client lxc
-
- newconfd "${FILESDIR}"/lxd-4.0.0.confd lxd
- newinitd "${FILESDIR}"/lxd-4.0.0.initd lxd
-
- if use apparmor; then
- systemd_newunit "${FILESDIR}"/lxd-4.0.0_apparmor.service lxd.service
- else
- systemd_newunit "${FILESDIR}"/lxd-4.0.0.service lxd.service
- fi
-
- systemd_newunit "${FILESDIR}"/lxd-containers-4.0.0.service lxd-containers.service
- systemd_newunit "${FILESDIR}"/lxd-4.0.0.socket lxd.socket
-
- dodoc AUTHORS 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
- elog "Please run 'lxc-checkconfig' to see all optional kernel features."
- elog
- 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."
-}
diff --git a/app-emulation/lxd/lxd-4.0.8.ebuild b/app-emulation/lxd/lxd-4.0.8-r1.ebuild
index df0bb65646fb..feceaec92267 100644
--- a/app-emulation/lxd/lxd-4.0.8.ebuild
+++ b/app-emulation/lxd/lxd-4.0.8-r1.ebuild
@@ -73,6 +73,8 @@ VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/linuxcontainers.asc
# make: *** [Makefile:156: check] Error 1
RESTRICT="test"
+PATCHES=( "${FILESDIR}"/lxd-4.0.8-btrfs-progs-5.14-safety-check-fix.patch )
+
src_prepare() {
default