public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-containers/lxd/, app-containers/lxd/files/
@ 2021-12-22  6:22 Joonas Niilola
  0 siblings, 0 replies; 14+ messages in thread
From: Joonas Niilola @ 2021-12-22  6:22 UTC (permalink / raw
  To: gentoo-commits

commit:     a05b3092dc61c390e599b33e29d508dd81827a9f
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 22 06:10:25 2021 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Wed Dec 22 06:22:00 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a05b3092

app-containers/lxd: drop 4.0.7-r2

Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 app-containers/lxd/Manifest                        |   2 -
 ...appers-don-t-conflict-with-glibc-provided.patch |  58 -------
 app-containers/lxd/lxd-4.0.7-r2.ebuild             | 175 ---------------------
 3 files changed, 235 deletions(-)

diff --git a/app-containers/lxd/Manifest b/app-containers/lxd/Manifest
index 2295b2e0b2c5..5aa9fa7a435c 100644
--- a/app-containers/lxd/Manifest
+++ b/app-containers/lxd/Manifest
@@ -1,4 +1,2 @@
-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

diff --git a/app-containers/lxd/files/lxd-syscall_wrappers-don-t-conflict-with-glibc-provided.patch b/app-containers/lxd/files/lxd-syscall_wrappers-don-t-conflict-with-glibc-provided.patch
deleted file mode 100644
index 0b471688cc0d..000000000000
--- a/app-containers/lxd/files/lxd-syscall_wrappers-don-t-conflict-with-glibc-provided.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 9a128f32fc277dd0c07bc85c71dc25d123f8a831 Mon Sep 17 00:00:00 2001
-From: Christian Brauner <christian.brauner@ubuntu.com>
-Date: Wed, 4 Aug 2021 21:34:11 +0200
-Subject: [PATCH] syscall_wrappers: don't conflict with glibc provided
- close_range()
-
-Newer glibc version's provide a wrapper for close_range().
-
-Fixes: #9084
-Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
----
- lxd/include/syscall_wrappers.h | 2 +-
- lxd/main_checkfeature.go       | 2 +-
- lxd/main_forkexec.go           | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/lxd/include/syscall_wrappers.h b/lxd/include/syscall_wrappers.h
-index 4405a622b801..25e56a5cefac 100644
---- a/lxd/include/syscall_wrappers.h
-+++ b/lxd/include/syscall_wrappers.h
-@@ -16,7 +16,7 @@
- #define CLOSE_RANGE_UNSHARE (1U << 1)
- #endif
- 
--static inline int close_range(unsigned int fd, unsigned int max_fd, unsigned int flags)
-+static inline int lxd_close_range(unsigned int fd, unsigned int max_fd, unsigned int flags)
- {
- 	return syscall(__NR_close_range, fd, max_fd, flags);
- }
-diff --git a/lxd/main_checkfeature.go b/lxd/main_checkfeature.go
-index 9511b684fa5d..0cc89207158d 100644
---- a/lxd/main_checkfeature.go
-+++ b/lxd/main_checkfeature.go
-@@ -496,7 +496,7 @@ static void is_close_range_aware(void)
- 	if (fd < 0)
- 		return;
- 
--	if (close_range(fd, fd, CLOSE_RANGE_UNSHARE))
-+	if (lxd_close_range(fd, fd, CLOSE_RANGE_UNSHARE))
- 		return;
- 
- 	close_range_aware = true;
-diff --git a/lxd/main_forkexec.go b/lxd/main_forkexec.go
-index 574f25eeb988..cfa4cd6bcda8 100644
---- a/lxd/main_forkexec.go
-+++ b/lxd/main_forkexec.go
-@@ -290,7 +290,7 @@ __attribute__ ((noinline)) static int __forkexec(void)
- 	if (!argvp || !*argvp)
- 		return log_error(EXIT_FAILURE, "No command specified");
- 
--	ret = close_range(EXEC_PIPE_FD + 1, UINT_MAX, CLOSE_RANGE_UNSHARE);
-+	ret = lxd_close_range(EXEC_PIPE_FD + 1, UINT_MAX, CLOSE_RANGE_UNSHARE);
- 	if (ret) {
- 		// Fallback to close_inherited() when the syscall is not
- 		// available or when CLOSE_RANGE_UNSHARE isn't supported.
--- 
-2.32.0
-

diff --git a/app-containers/lxd/lxd-4.0.7-r2.ebuild b/app-containers/lxd/lxd-4.0.7-r2.ebuild
deleted file mode 100644
index 0d725dd9c643..000000000000
--- a/app-containers/lxd/lxd-4.0.7-r2.ebuild
+++ /dev/null
@@ -1,175 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit 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 ~x86"
-IUSE="apparmor ipv6 nls verify-sig"
-
-DEPEND="acct-group/lxd
-	app-arch/xz-utils
-	>=app-containers/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}
-	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? ( sec-keys/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
-
-PATCHES=(
-	"${FILESDIR}/${PN}-syscall_wrappers-don-t-conflict-with-glibc-provided.patch"
-	"${FILESDIR}"/lxd-4.0.7-no-werror.patch
-)
-
-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."
-
-	cp "${FILESDIR}"/lxd-4.0.7-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
-}
-
-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
-
-	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
-
-	# Temporary fix for #817287
-	keepdir /var/log/lxd
-	fowners root:lxd /var/log/lxd
-
-	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."
-}


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-containers/lxd/, app-containers/lxd/files/
@ 2022-02-20  6:37 Joonas Niilola
  0 siblings, 0 replies; 14+ messages in thread
From: Joonas Niilola @ 2022-02-20  6:37 UTC (permalink / raw
  To: gentoo-commits

commit:     5a48ee50d19a4ed58b32bbe35b6246a1c295ae7e
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 20 06:34:46 2022 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sun Feb 20 06:34:46 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5a48ee50

app-containers/lxd: fix systemd service file for 4.0.9

 - the previous settings caused some runtime issues, with apparently
   mixed process ownerships.

Reported-by: telans
Thanks-to: telans
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 app-containers/lxd/files/{lxd-4.0.9.service => lxd-4.0.9-r1.service} | 2 --
 app-containers/lxd/{lxd-4.0.9-r1.ebuild => lxd-4.0.9-r2.ebuild}      | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/app-containers/lxd/files/lxd-4.0.9.service b/app-containers/lxd/files/lxd-4.0.9-r1.service
similarity index 96%
rename from app-containers/lxd/files/lxd-4.0.9.service
rename to app-containers/lxd/files/lxd-4.0.9-r1.service
index 6a218d2c43a7..480940dab7a3 100644
--- a/app-containers/lxd/files/lxd-4.0.9.service
+++ b/app-containers/lxd/files/lxd-4.0.9-r1.service
@@ -5,8 +5,6 @@ Requires=network-online.target lxcfs.service lxd.socket
 Documentation=man:lxd(1)
 
 [Service]
-Group=lxd
-User=root
 EnvironmentFile=-/etc/environment
 ExecStart=/usr/sbin/lxd --group lxd --syslog
 ExecStartPost=/usr/sbin/lxd waitready --timeout=600

diff --git a/app-containers/lxd/lxd-4.0.9-r1.ebuild b/app-containers/lxd/lxd-4.0.9-r2.ebuild
similarity index 98%
rename from app-containers/lxd/lxd-4.0.9-r1.ebuild
rename to app-containers/lxd/lxd-4.0.9-r2.ebuild
index 999b833af717..83a03cabf801 100644
--- a/app-containers/lxd/lxd-4.0.9-r1.ebuild
+++ b/app-containers/lxd/lxd-4.0.9-r2.ebuild
@@ -99,7 +99,7 @@ src_prepare() {
 		lxd/apparmor/instance_qemu.go \
 		lxd/instance/drivers/driver_qemu.go || die "Failed to fix hardcoded ovmf paths."
 
-	cp "${FILESDIR}"/lxd-4.0.9.service "${T}"/lxd.service || die
+	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' \


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-containers/lxd/, app-containers/lxd/files/
@ 2022-04-14 11:51 Joonas Niilola
  0 siblings, 0 replies; 14+ messages in thread
From: Joonas Niilola @ 2022-04-14 11:51 UTC (permalink / raw
  To: gentoo-commits

commit:     3e890ba449027d1b9d2dbe2db33432ce0672d4a2
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 14 11:49:21 2022 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Thu Apr 14 11:51:22 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e890ba4

app-containers/lxd: drop 4.0.8-r3

Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 app-containers/lxd/Manifest                        |   2 -
 app-containers/lxd/files/lxd-4.0.7-no-werror.patch | 108 ------------
 ...d-4.0.8-btrfs-progs-5.14-safety-check-fix.patch |  75 --------
 app-containers/lxd/lxd-4.0.8-r3.ebuild             | 190 ---------------------
 4 files changed, 375 deletions(-)

diff --git a/app-containers/lxd/Manifest b/app-containers/lxd/Manifest
index 97017785ab20..0a5674f099fa 100644
--- a/app-containers/lxd/Manifest
+++ b/app-containers/lxd/Manifest
@@ -1,4 +1,2 @@
-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
 DIST lxd-4.0.9.tar.gz 9117078 BLAKE2B aa6689c1e958258484fba5c060765dd71d5406cb4375d3132cdc38633277e6c95322e8e3aed5e9dd251140c6868ec42470e797639dde4af42848e138f3b45ee2 SHA512 657949311753895f3941deaabae2d03092fc67490d2de78db48b296fdd3e9df4c5844467dd6913814426ca423a6ee1da9705bb1a2652ea99fe1356eb7da97ebb
 DIST lxd-4.0.9.tar.gz.asc 833 BLAKE2B 7cd0d3ab518d947ca3ea6dc804c6a59b592e4e568152c078fdd3c102420bcd94d2f0b2c335b8b4ecdb19dc3c9a10f665a1510903f395247da956717beaa172a3 SHA512 79a4111571ab43e79cf669e416ed50f3ccae0fbceb86d73757d23c778035e827f47643bc87ff6a2fc64b095345a3d53cbd0c4eb245c75364e907d7449f3a0886

diff --git a/app-containers/lxd/files/lxd-4.0.7-no-werror.patch b/app-containers/lxd/files/lxd-4.0.7-no-werror.patch
deleted file mode 100644
index 50a916356019..000000000000
--- a/app-containers/lxd/files/lxd-4.0.7-no-werror.patch
+++ /dev/null
@@ -1,108 +0,0 @@
-diff -Naur lxd-4.0.7/lxd/cgo.go lxd-4.0.7-no-werror/lxd/cgo.go
---- lxd-4.0.7/lxd/cgo.go	2021-07-16 23:33:23.000000000 +0300
-+++ lxd-4.0.7-no-werror/lxd/cgo.go	2021-11-16 15:16:23.575299112 +0200
-@@ -3,7 +3,7 @@
- 
- package main
- 
--// #cgo CFLAGS: -std=gnu11 -Wvla -Werror -fvisibility=hidden -Winit-self
-+// #cgo CFLAGS: -std=gnu11 -Wvla -fvisibility=hidden -Winit-self
- // #cgo CFLAGS: -Wformat=2 -Wshadow -Wendif-labels -fasynchronous-unwind-tables
- // #cgo CFLAGS: -pipe --param=ssp-buffer-size=4 -g -Wunused
- // #cgo CFLAGS: -Werror=implicit-function-declaration
-diff -Naur lxd-4.0.7/lxd/seccomp/cgo.go lxd-4.0.7-no-werror/lxd/seccomp/cgo.go
---- lxd-4.0.7/lxd/seccomp/cgo.go	2021-07-16 23:33:23.000000000 +0300
-+++ lxd-4.0.7-no-werror/lxd/seccomp/cgo.go	2021-11-16 15:16:34.928629720 +0200
-@@ -3,7 +3,7 @@
- 
- package seccomp
- 
--// #cgo CFLAGS: -std=gnu11 -Wvla -Werror -fvisibility=hidden -Winit-self
-+// #cgo CFLAGS: -std=gnu11 -Wvla -fvisibility=hidden -Winit-self
- // #cgo CFLAGS: -Wformat=2 -Wshadow -Wendif-labels -fasynchronous-unwind-tables
- // #cgo CFLAGS: -pipe --param=ssp-buffer-size=4 -g -Wunused
- // #cgo CFLAGS: -Werror=implicit-function-declaration
-diff -Naur lxd-4.0.7/lxd/storage/cgo.go lxd-4.0.7-no-werror/lxd/storage/cgo.go
---- lxd-4.0.7/lxd/storage/cgo.go	2021-07-16 23:33:23.000000000 +0300
-+++ lxd-4.0.7-no-werror/lxd/storage/cgo.go	2021-11-16 15:16:44.585294068 +0200
-@@ -3,7 +3,7 @@
- 
- package storage
- 
--// #cgo CFLAGS: -std=gnu11 -Wvla -Werror -fvisibility=hidden -Winit-self
-+// #cgo CFLAGS: -std=gnu11 -Wvla -fvisibility=hidden -Winit-self
- // #cgo CFLAGS: -Wformat=2 -Wshadow -Wendif-labels -fasynchronous-unwind-tables
- // #cgo CFLAGS: -pipe --param=ssp-buffer-size=4 -g -Wunused
- // #cgo CFLAGS: -Werror=implicit-function-declaration
-diff -Naur lxd-4.0.7/lxd/storage/quota/cgo.go lxd-4.0.7-no-werror/lxd/storage/quota/cgo.go
---- lxd-4.0.7/lxd/storage/quota/cgo.go	2021-07-16 23:33:23.000000000 +0300
-+++ lxd-4.0.7-no-werror/lxd/storage/quota/cgo.go	2021-11-16 15:16:54.231958418 +0200
-@@ -3,7 +3,7 @@
- 
- package quota
- 
--// #cgo CFLAGS: -std=gnu11 -Wvla -Werror -fvisibility=hidden -Winit-self
-+// #cgo CFLAGS: -std=gnu11 -Wvla -fvisibility=hidden -Winit-self
- // #cgo CFLAGS: -Wformat=2 -Wshadow -Wendif-labels -fasynchronous-unwind-tables
- // #cgo CFLAGS: -pipe --param=ssp-buffer-size=4 -g -Wunused
- // #cgo CFLAGS: -Werror=implicit-function-declaration
-diff -Naur lxd-4.0.7/lxd-p2c/cgo.go lxd-4.0.7-no-werror/lxd-p2c/cgo.go
---- lxd-4.0.7/lxd-p2c/cgo.go	2021-07-16 23:33:23.000000000 +0300
-+++ lxd-4.0.7-no-werror/lxd-p2c/cgo.go	2021-11-16 15:17:06.185288881 +0200
-@@ -2,7 +2,7 @@
- 
- package main
- 
--// #cgo CFLAGS: -std=gnu11 -Wvla -Werror -fvisibility=hidden -Winit-self
-+// #cgo CFLAGS: -std=gnu11 -Wvla -fvisibility=hidden -Winit-self
- // #cgo CFLAGS: -Wformat=2 -Wshadow -Wendif-labels -fasynchronous-unwind-tables
- // #cgo CFLAGS: -pipe --param=ssp-buffer-size=4 -g -Wunused
- // #cgo CFLAGS: -Werror=implicit-function-declaration
-diff -Naur lxd-4.0.7/shared/cgo.go lxd-4.0.7-no-werror/shared/cgo.go
---- lxd-4.0.7/shared/cgo.go	2021-07-16 23:33:23.000000000 +0300
-+++ lxd-4.0.7-no-werror/shared/cgo.go	2021-11-16 15:17:15.238620041 +0200
-@@ -3,7 +3,7 @@
- 
- package shared
- 
--// #cgo CFLAGS: -std=gnu11 -Wvla -Werror -fvisibility=hidden -Winit-self
-+// #cgo CFLAGS: -std=gnu11 -Wvla -fvisibility=hidden -Winit-self
- // #cgo CFLAGS: -Wformat=2 -Wshadow -Wendif-labels -fasynchronous-unwind-tables
- // #cgo CFLAGS: -pipe --param=ssp-buffer-size=4 -g -Wunused
- // #cgo CFLAGS: -Werror=implicit-function-declaration
-diff -Naur lxd-4.0.7/shared/idmap/cgo.go lxd-4.0.7-no-werror/shared/idmap/cgo.go
---- lxd-4.0.7/shared/idmap/cgo.go	2021-07-16 23:33:23.000000000 +0300
-+++ lxd-4.0.7-no-werror/shared/idmap/cgo.go	2021-11-16 15:17:25.768617513 +0200
-@@ -3,7 +3,7 @@
- 
- package idmap
- 
--// #cgo CFLAGS: -std=gnu11 -Wvla -Werror -fvisibility=hidden -Winit-self
-+// #cgo CFLAGS: -std=gnu11 -Wvla -fvisibility=hidden -Winit-self
- // #cgo CFLAGS: -Wformat=2 -Wshadow -Wendif-labels -fasynchronous-unwind-tables
- // #cgo CFLAGS: -pipe --param=ssp-buffer-size=4 -g -Wunused
- // #cgo CFLAGS: -Werror=implicit-function-declaration
-diff -Naur lxd-4.0.7/shared/netutils/cgo.go lxd-4.0.7-no-werror/shared/netutils/cgo.go
---- lxd-4.0.7/shared/netutils/cgo.go	2021-07-16 23:33:23.000000000 +0300
-+++ lxd-4.0.7-no-werror/shared/netutils/cgo.go	2021-11-16 15:17:34.598615393 +0200
-@@ -3,7 +3,7 @@
- 
- package netutils
- 
--// #cgo CFLAGS: -std=gnu11 -Wvla -Werror -fvisibility=hidden -Winit-self
-+// #cgo CFLAGS: -std=gnu11 -Wvla -fvisibility=hidden -Winit-self
- // #cgo CFLAGS: -Wformat=2 -Wshadow -Wendif-labels -fasynchronous-unwind-tables
- // #cgo CFLAGS: -pipe --param=ssp-buffer-size=4 -g -Wunused
- // #cgo CFLAGS: -Werror=implicit-function-declaration
-diff -Naur lxd-4.0.7/shared/termios/cgo.go lxd-4.0.7-no-werror/shared/termios/cgo.go
---- lxd-4.0.7/shared/termios/cgo.go	2021-07-16 23:33:23.000000000 +0300
-+++ lxd-4.0.7-no-werror/shared/termios/cgo.go	2021-11-16 15:17:43.568613239 +0200
-@@ -3,7 +3,7 @@
- 
- package termios
- 
--// #cgo CFLAGS: -std=gnu11 -Wvla -Werror -fvisibility=hidden -Winit-self
-+// #cgo CFLAGS: -std=gnu11 -Wvla -fvisibility=hidden -Winit-self
- // #cgo CFLAGS: -Wformat=2 -Wshadow -Wendif-labels -fasynchronous-unwind-tables
- // #cgo CFLAGS: -pipe --param=ssp-buffer-size=4 -g -Wunused
- // #cgo CFLAGS: -Werror=implicit-function-declaration

diff --git a/app-containers/lxd/files/lxd-4.0.8-btrfs-progs-5.14-safety-check-fix.patch b/app-containers/lxd/files/lxd-4.0.8-btrfs-progs-5.14-safety-check-fix.patch
deleted file mode 100644
index f32debff5e3b..000000000000
--- a/app-containers/lxd/files/lxd-4.0.8-btrfs-progs-5.14-safety-check-fix.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-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-containers/lxd/lxd-4.0.8-r3.ebuild b/app-containers/lxd/lxd-4.0.8-r3.ebuild
deleted file mode 100644
index f301c886cd62..000000000000
--- a/app-containers/lxd/lxd-4.0.8-r3.ebuild
+++ /dev/null
@@ -1,190 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit 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 ~x86"
-IUSE="apparmor ipv6 nls verify-sig"
-
-DEPEND="acct-group/lxd
-	app-arch/xz-utils
-	>=app-containers/lxc-3.0.0[apparmor?,seccomp(+)]
-	dev-db/sqlite:3
-	dev-libs/dqlite
-	dev-libs/lzo
-	dev-libs/raft[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
-	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-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
-
-# The testsuite must be run as root.
-# make: *** [Makefile:156: check] Error 1
-RESTRICT="test"
-
-PATCHES=( "${FILESDIR}"/lxd-4.0.8-btrfs-progs-5.14-safety-check-fix.patch
-	"${FILESDIR}"/lxd-4.0.7-no-werror.patch )
-
-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.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/disk.go || die "Failed to fix virtfs-proxy-helper path."
-
-	cp "${FILESDIR}"/lxd-4.0.7-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
-}
-
-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() {
-	emake check
-}
-
-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
-
-	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
-
-	# Temporary fix for #817287
-	keepdir /var/log/lxd
-	fowners root:lxd /var/log/lxd
-
-	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 "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."
-}


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-containers/lxd/, app-containers/lxd/files/
@ 2022-12-08  9:55 Joonas Niilola
  0 siblings, 0 replies; 14+ messages in thread
From: Joonas Niilola @ 2022-12-08  9:55 UTC (permalink / raw
  To: gentoo-commits

commit:     0fcc7c7e18b0e57e53c5aaf487744ca426dc949c
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Thu Dec  8 09:17:18 2022 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Thu Dec  8 09:55:38 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0fcc7c7e

app-containers/lxd: add backported fixes etc before 5.0.2

 - update init file to create necessary paths to run systemd containers on
   openrc host. NOTE: Last this was enabled, some openrc on openrc containers
   were broken. Haven't had this happen in a while, let's try again. I'm aware
   some more expert setups, such as lxd-in-lxd (nested) needs _more_ manual
   tweaking now.

   As majority of containers are systemd based, I feel like it's more
   important to support that out-of-the-box and figure other issues
   case-by-case when they arise.

 - fix calling non-existent commands, upstream issue 10795,
 - fix timeouts on exec channels, upstream issue 10034.

Closes: https://bugs.gentoo.org/865467
Closes: https://github.com/gentoo/gentoo/pull/28566
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 app-containers/lxd/Manifest              |   2 +
 app-containers/lxd/files/lxd-5.0.2.initd |  54 ++++++++
 app-containers/lxd/lxd-5.0.1-r3.ebuild   | 203 +++++++++++++++++++++++++++++++
 3 files changed, 259 insertions(+)

diff --git a/app-containers/lxd/Manifest b/app-containers/lxd/Manifest
index 637337b043a2..8f71fcdedb69 100644
--- a/app-containers/lxd/Manifest
+++ b/app-containers/lxd/Manifest
@@ -1,2 +1,4 @@
 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.8-add-tcp-keepalives-to-exec-channels.patch 15702 BLAKE2B ee834b86284e36f87ad3e54df04eb2968dc0fefdf81b116bd640e611ac4ca2eb93763ed2c2f3cfd1e9473da1a3e66bd90858eb4bab08a47f86306a0903a19e6e SHA512 5e7c56f5ffbc8cecb27c6916abbbf4bb3d268c0936b9fdb2b80b4b306c911bdcf782059290243988feb49c9209e55de9ea168ea7041636bf9ae1b7d88ff541c9

diff --git a/app-containers/lxd/files/lxd-5.0.2.initd b/app-containers/lxd/files/lxd-5.0.2.initd
new file mode 100644
index 000000000000..575129a8f7e8
--- /dev/null
+++ b/app-containers/lxd/files/lxd-5.0.2.initd
@@ -0,0 +1,54 @@
+#!/sbin/openrc-run
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+DAEMON=/usr/sbin/lxd
+PIDFILE=/run/lxd.pid
+
+depend() {
+	need net
+	need lxcfs
+}
+
+start() {
+	ebegin "Starting lxd service"
+
+	modprobe -f loop > /dev/null 2>&1
+
+	# Fix permissions on /var/lib/lxd and make sure it exists.
+	# Create a log directory for lxd with correct permissions.
+	install -d /var/lib/lxd --group lxd --owner root --mode 0775
+	install -d /var/log/lxd --group lxd --owner root
+
+	start-stop-daemon --start \
+		--pidfile ${PIDFILE} \
+		--exec ${DAEMON} \
+		--background \
+		--make-pidfile \
+		-- \
+		${LXD_OPTIONS}
+	eend ${?}
+
+	# Create necessary systemd paths in order for systemd containers to work on openrc host.
+	install -d /sys/fs/cgroup/systemd --group lxd --owner root
+	mount -t cgroup -o none,name=systemd systemd /sys/fs/cgroup/systemd
+}
+
+stop() {
+	if [ "${RC_CMD}" = restart ]; then
+		ebegin "Stopping lxd service (but not containers)"
+		# start-stop-daemon sends SIGTERM with a timeout of 5s by default.
+		# SIGTERM indicates to LXD that it will be stopped temporarily.
+		# Instances will keep running.
+		start-stop-daemon --stop --quiet -p "${PIDFILE}"
+		eend ${?}
+	else
+		ebegin "Stopping lxd service and containers, waiting 40s"
+		# SIGPWR indicates to LXD that the host is going down.
+		# LXD will do a clean shutdown of all instances.
+		# After 30s all remaining instances will be killed.
+		# We wait up to 40s for LXD.
+		start-stop-daemon --stop --quiet -R SIGPWR/40 -p "${PIDFILE}"
+		eend ${?}
+	fi
+}

diff --git a/app-containers/lxd/lxd-5.0.1-r3.ebuild b/app-containers/lxd/lxd-5.0.1-r3.ebuild
new file mode 100644
index 000000000000..703f56669164
--- /dev/null
+++ b/app-containers/lxd/lxd-5.0.1-r3.ebuild
@@ -0,0 +1,203 @@
+# Copyright 1999-2022 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
+	https://github.com/lxc/lxd/commit/d55a590ea50a75c3cb2ea67894be8253074d6093.patch -> lxd-5.0.2-move-shellcheck-version-call-into-static-analysis.patch
+	https://patch-diff.githubusercontent.com/raw/lxc/lxd/pull/11011.patch -> lxd-5.8-add-tcp-keepalives-to-exec-channels.patch
+	verify-sig? ( https://linuxcontainers.org/downloads/lxd/${P}.tar.gz.asc )"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="apparmor ipv6 nls"
+
+DEPEND="acct-group/lxd
+	app-arch/xz-utils
+	>=app-containers/lxc-3.0.0[apparmor?,seccomp(+)]
+	dev-db/sqlite:3
+	dev-libs/dqlite:=
+	dev-libs/lzo
+	dev-libs/raft[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=( "${DISTDIR}"/lxd-5.0.2-move-shellcheck-version-call-into-static-analysis.patch
+	"${DISTDIR}"/lxd-5.8-add-tcp-keepalives-to-exec-channels.patch )
+
+src_unpack() {
+	if use verify-sig; then
+		verify-sig_verify_detached "${DISTDIR}"/${P}.tar.gz{,.asc}
+	fi
+
+	default
+}
+
+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.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 [[ -n ${REPLACING_VERSIONS} ]] && 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
+}


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-containers/lxd/, app-containers/lxd/files/
@ 2023-01-09 12:51 Joonas Niilola
  0 siblings, 0 replies; 14+ messages in thread
From: Joonas Niilola @ 2023-01-09 12:51 UTC (permalink / raw
  To: gentoo-commits

commit:     b63796659bcdbafbc03d6bc45cad15ef9b6cd1d9
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Mon Jan  9 12:49:43 2023 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Mon Jan  9 12:49:43 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b6379665

app-containers/lxd: drop 5.0.1-r3

Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 app-containers/lxd/files/lxd-5.0.2.initd |  54 --------
 app-containers/lxd/lxd-5.0.1-r3.ebuild   | 203 -------------------------------
 2 files changed, 257 deletions(-)

diff --git a/app-containers/lxd/files/lxd-5.0.2.initd b/app-containers/lxd/files/lxd-5.0.2.initd
deleted file mode 100644
index 575129a8f7e8..000000000000
--- a/app-containers/lxd/files/lxd-5.0.2.initd
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-DAEMON=/usr/sbin/lxd
-PIDFILE=/run/lxd.pid
-
-depend() {
-	need net
-	need lxcfs
-}
-
-start() {
-	ebegin "Starting lxd service"
-
-	modprobe -f loop > /dev/null 2>&1
-
-	# Fix permissions on /var/lib/lxd and make sure it exists.
-	# Create a log directory for lxd with correct permissions.
-	install -d /var/lib/lxd --group lxd --owner root --mode 0775
-	install -d /var/log/lxd --group lxd --owner root
-
-	start-stop-daemon --start \
-		--pidfile ${PIDFILE} \
-		--exec ${DAEMON} \
-		--background \
-		--make-pidfile \
-		-- \
-		${LXD_OPTIONS}
-	eend ${?}
-
-	# Create necessary systemd paths in order for systemd containers to work on openrc host.
-	install -d /sys/fs/cgroup/systemd --group lxd --owner root
-	mount -t cgroup -o none,name=systemd systemd /sys/fs/cgroup/systemd
-}
-
-stop() {
-	if [ "${RC_CMD}" = restart ]; then
-		ebegin "Stopping lxd service (but not containers)"
-		# start-stop-daemon sends SIGTERM with a timeout of 5s by default.
-		# SIGTERM indicates to LXD that it will be stopped temporarily.
-		# Instances will keep running.
-		start-stop-daemon --stop --quiet -p "${PIDFILE}"
-		eend ${?}
-	else
-		ebegin "Stopping lxd service and containers, waiting 40s"
-		# SIGPWR indicates to LXD that the host is going down.
-		# LXD will do a clean shutdown of all instances.
-		# After 30s all remaining instances will be killed.
-		# We wait up to 40s for LXD.
-		start-stop-daemon --stop --quiet -R SIGPWR/40 -p "${PIDFILE}"
-		eend ${?}
-	fi
-}

diff --git a/app-containers/lxd/lxd-5.0.1-r3.ebuild b/app-containers/lxd/lxd-5.0.1-r3.ebuild
deleted file mode 100644
index 703f56669164..000000000000
--- a/app-containers/lxd/lxd-5.0.1-r3.ebuild
+++ /dev/null
@@ -1,203 +0,0 @@
-# Copyright 1999-2022 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
-	https://github.com/lxc/lxd/commit/d55a590ea50a75c3cb2ea67894be8253074d6093.patch -> lxd-5.0.2-move-shellcheck-version-call-into-static-analysis.patch
-	https://patch-diff.githubusercontent.com/raw/lxc/lxd/pull/11011.patch -> lxd-5.8-add-tcp-keepalives-to-exec-channels.patch
-	verify-sig? ( https://linuxcontainers.org/downloads/lxd/${P}.tar.gz.asc )"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="~amd64 ~arm64 ~x86"
-IUSE="apparmor ipv6 nls"
-
-DEPEND="acct-group/lxd
-	app-arch/xz-utils
-	>=app-containers/lxc-3.0.0[apparmor?,seccomp(+)]
-	dev-db/sqlite:3
-	dev-libs/dqlite:=
-	dev-libs/lzo
-	dev-libs/raft[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=( "${DISTDIR}"/lxd-5.0.2-move-shellcheck-version-call-into-static-analysis.patch
-	"${DISTDIR}"/lxd-5.8-add-tcp-keepalives-to-exec-channels.patch )
-
-src_unpack() {
-	if use verify-sig; then
-		verify-sig_verify_detached "${DISTDIR}"/${P}.tar.gz{,.asc}
-	fi
-
-	default
-}
-
-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.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 [[ -n ${REPLACING_VERSIONS} ]] && 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
-}


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-containers/lxd/, app-containers/lxd/files/
@ 2023-01-19 15:10 Joonas Niilola
  0 siblings, 0 replies; 14+ messages in thread
From: Joonas Niilola @ 2023-01-19 15:10 UTC (permalink / raw
  To: gentoo-commits

commit:     e92f93c57aadbd458501110e79a467d806dae91e
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 19 15:09:59 2023 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Thu Jan 19 15:10:21 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e92f93c5

app-containers/lxd: add 5.0.2

Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 app-containers/lxd/Manifest                        |   2 +
 ....0.2-remove-shellcheck-buildsystem-checks.patch |  32 ++++
 app-containers/lxd/lxd-5.0.2.ebuild                | 204 +++++++++++++++++++++
 3 files changed, 238 insertions(+)

diff --git a/app-containers/lxd/Manifest b/app-containers/lxd/Manifest
index 8f71fcdedb69..8c94a3ceb31e 100644
--- a/app-containers/lxd/Manifest
+++ b/app-containers/lxd/Manifest
@@ -1,4 +1,6 @@
 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

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
+}


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-containers/lxd/, app-containers/lxd/files/
@ 2023-01-31 10:35 Joonas Niilola
  0 siblings, 0 replies; 14+ messages in thread
From: Joonas Niilola @ 2023-01-31 10:35 UTC (permalink / raw
  To: gentoo-commits

commit:     d16b97d50adcc81c90a0035365310594e7b19a1f
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 31 10:30:57 2023 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Tue Jan 31 10:30:57 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d16b97d5

app-containers/lxd: re-add 4.0.9 to the tree

 - it's needed, and it's only purpose is to provide an update path
   from lxd-3 to lxd-5. lxd-3 is supported until June 2023.

Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 app-containers/lxd/Manifest                        |   2 +
 .../lxd/files/lxd-4.0.9-glibc-2.36-fix.patch       |  74 +++++++++
 app-containers/lxd/lxd-4.0.9-r3.ebuild             | 181 +++++++++++++++++++++
 3 files changed, 257 insertions(+)

diff --git a/app-containers/lxd/Manifest b/app-containers/lxd/Manifest
index 8c94a3ceb31e..fd079b683160 100644
--- a/app-containers/lxd/Manifest
+++ b/app-containers/lxd/Manifest
@@ -1,3 +1,5 @@
+DIST lxd-4.0.9.tar.gz 9117078 BLAKE2B aa6689c1e958258484fba5c060765dd71d5406cb4375d3132cdc38633277e6c95322e8e3aed5e9dd251140c6868ec42470e797639dde4af42848e138f3b45ee2 SHA512 657949311753895f3941deaabae2d03092fc67490d2de78db48b296fdd3e9df4c5844467dd6913814426ca423a6ee1da9705bb1a2652ea99fe1356eb7da97ebb
+DIST lxd-4.0.9.tar.gz.asc 833 BLAKE2B 7cd0d3ab518d947ca3ea6dc804c6a59b592e4e568152c078fdd3c102420bcd94d2f0b2c335b8b4ecdb19dc3c9a10f665a1510903f395247da956717beaa172a3 SHA512 79a4111571ab43e79cf669e416ed50f3ccae0fbceb86d73757d23c778035e827f47643bc87ff6a2fc64b095345a3d53cbd0c4eb245c75364e907d7449f3a0886
 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

diff --git a/app-containers/lxd/files/lxd-4.0.9-glibc-2.36-fix.patch b/app-containers/lxd/files/lxd-4.0.9-glibc-2.36-fix.patch
new file mode 100644
index 000000000000..d05ff2c81bd9
--- /dev/null
+++ b/app-containers/lxd/files/lxd-4.0.9-glibc-2.36-fix.patch
@@ -0,0 +1,74 @@
+From cc7bab602e6b967fdd31c5feed0f3f6321c0a0a7 Mon Sep 17 00:00:00 2001
+From: Luca Barbato <lu_zero@gentoo.org>
+Date: Fri, 13 Jan 2023 21:43:22 +0000
+Subject: [PATCH] Fix syscall wrappers
+
+---
+ lxd/include/syscall_wrappers.h | 7 ++++---
+ lxd/main_nsexec.go             | 2 +-
+ shared/idmap/shift_linux.go    | 2 +-
+ 3 files changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/lxd/include/syscall_wrappers.h b/lxd/include/syscall_wrappers.h
+index 2c28133a8..a6975ab4d 100644
+--- a/lxd/include/syscall_wrappers.h
++++ b/lxd/include/syscall_wrappers.h
+@@ -26,10 +26,10 @@ static inline int lxd_close_range(unsigned int fd, unsigned int max_fd, unsigned
+ 	return syscall(__NR_close_range, fd, max_fd, flags);
+ }
+ 
+-static inline int open_tree(int dfd, const char *filename, unsigned int flags)
++/* static inline int open_tree(int dfd, const char *filename, unsigned int flags)
+ {
+ 	return syscall(__NR_open_tree, dfd, filename, flags);
+-}
++}*/
+ 
+ /*
+  * mount_setattr()
+@@ -40,7 +40,7 @@ struct lxc_mount_attr {
+ 	__u64 propagation;
+ 	__u64 userns_fd;
+ };
+-
++/*
+ static inline int mount_setattr(int dfd, const char *path, unsigned int flags,
+ 				struct lxc_mount_attr *attr, size_t size)
+ {
+@@ -53,6 +53,7 @@ static inline int move_mount(int from_dfd, const char *from_pathname, int to_dfd
+ 	return syscall(__NR_move_mount, from_dfd, from_pathname, to_dfd,
+ 		       to_pathname, flags);
+ }
++*/
+ 
+ /* arg1 of prctl() */
+ #ifndef PR_SCHED_CORE
+diff --git a/lxd/main_nsexec.go b/lxd/main_nsexec.go
+index f11c0d4cb..753024283 100644
+--- a/lxd/main_nsexec.go
++++ b/lxd/main_nsexec.go
+@@ -298,7 +298,7 @@ static char *file_to_buf(char *path, ssize_t *length)
+ int mount_detach_idmap(const char *path, int fd_userns)
+ {
+ 	__do_close int fd_tree = -EBADF;
+-	struct lxc_mount_attr attr = {
++	struct mount_attr attr = {
+ 	    .attr_set		= MOUNT_ATTR_IDMAP,
+ 
+ 	};
+diff --git a/shared/idmap/shift_linux.go b/shared/idmap/shift_linux.go
+index daaf37275..e219ac01c 100644
+--- a/shared/idmap/shift_linux.go
++++ b/shared/idmap/shift_linux.go
+@@ -314,7 +314,7 @@ static int get_userns_fd(void)
+ static int create_detached_idmapped_mount(const char *path)
+ {
+ 	__do_close int fd_tree = -EBADF, fd_userns = -EBADF;
+-	struct lxc_mount_attr attr = {
++	struct mount_attr attr = {
+ 	    .attr_set		= MOUNT_ATTR_IDMAP,
+ 	    .propagation	= MS_SLAVE,
+ 
+-- 
+2.39.0
+

diff --git a/app-containers/lxd/lxd-4.0.9-r3.ebuild b/app-containers/lxd/lxd-4.0.9-r3.ebuild
new file mode 100644
index 000000000000..f8d5b8f837b9
--- /dev/null
+++ b/app-containers/lxd/lxd-4.0.9-r3.ebuild
@@ -0,0 +1,181 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit bash-completion-r1 go-module 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 ~arm64 ~x86"
+IUSE="apparmor ipv6 nls verify-sig"
+
+DEPEND="acct-group/lxd
+	app-arch/xz-utils
+	>=app-containers/lxc-3.0.0[apparmor?,seccomp(+)]
+	dev-db/sqlite:3
+	dev-libs/dqlite
+	dev-libs/lzo
+	dev-libs/raft[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
+	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-p2c
+	/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-4.0.9-glibc-2.36-fix.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.secboot.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-p2c
+	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-p2c 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-4.0.9.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 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."
+}


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-containers/lxd/, app-containers/lxd/files/
@ 2023-03-03  7:15 Joonas Niilola
  0 siblings, 0 replies; 14+ messages in thread
From: Joonas Niilola @ 2023-03-03  7:15 UTC (permalink / raw
  To: gentoo-commits

commit:     c6f02344816966e98f4f41d014b30855e9355410
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Fri Mar  3 06:40:04 2023 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Fri Mar  3 07:14:58 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6f02344

app-containers/lxd: drop 5.0.1-r7

Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 app-containers/lxd/Manifest                        |   4 -
 ...0.2-fix-btrfs-driver-to-support-btrfs-6.0.patch |  27 ---
 app-containers/lxd/lxd-5.0.1-r7.ebuild             | 217 ---------------------
 3 files changed, 248 deletions(-)

diff --git a/app-containers/lxd/Manifest b/app-containers/lxd/Manifest
index fd079b683160..7a4e3af6d38c 100644
--- a/app-containers/lxd/Manifest
+++ b/app-containers/lxd/Manifest
@@ -1,8 +1,4 @@
 DIST lxd-4.0.9.tar.gz 9117078 BLAKE2B aa6689c1e958258484fba5c060765dd71d5406cb4375d3132cdc38633277e6c95322e8e3aed5e9dd251140c6868ec42470e797639dde4af42848e138f3b45ee2 SHA512 657949311753895f3941deaabae2d03092fc67490d2de78db48b296fdd3e9df4c5844467dd6913814426ca423a6ee1da9705bb1a2652ea99fe1356eb7da97ebb
 DIST lxd-4.0.9.tar.gz.asc 833 BLAKE2B 7cd0d3ab518d947ca3ea6dc804c6a59b592e4e568152c078fdd3c102420bcd94d2f0b2c335b8b4ecdb19dc3c9a10f665a1510903f395247da956717beaa172a3 SHA512 79a4111571ab43e79cf669e416ed50f3ccae0fbceb86d73757d23c778035e827f47643bc87ff6a2fc64b095345a3d53cbd0c4eb245c75364e907d7449f3a0886
-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

diff --git a/app-containers/lxd/files/lxd-5.0.2-fix-btrfs-driver-to-support-btrfs-6.0.patch b/app-containers/lxd/files/lxd-5.0.2-fix-btrfs-driver-to-support-btrfs-6.0.patch
deleted file mode 100644
index c6cf6c97b013..000000000000
--- a/app-containers/lxd/files/lxd-5.0.2-fix-btrfs-driver-to-support-btrfs-6.0.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 37779fd75dbcd02fab03a8327a1ec7a6f3273371 Mon Sep 17 00:00:00 2001
-From: Thomas Parrott <thomas.parrott@canonical.com>
-Date: Wed, 4 Jan 2023 09:59:37 +0000
-Subject: [PATCH] lxd/storage/drivers/driver/btrfs/utils: Fix getQGroup to
- suport BTRFS >= 6.0.1
-
-Fixes #11210
-
-Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
----
- lxd/storage/drivers/driver_btrfs_utils.go | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/lxd/storage/drivers/driver_btrfs_utils.go b/lxd/storage/drivers/driver_btrfs_utils.go
-index 8f0846d2fc9f..e1468e4b1a59 100644
---- a/lxd/storage/drivers/driver_btrfs_utils.go
-+++ b/lxd/storage/drivers/driver_btrfs_utils.go
-@@ -247,7 +247,8 @@ func (d *btrfs) getQGroup(path string) (string, int64, error) {
- 	var qgroup string
- 	usage := int64(-1)
- 	for _, line := range strings.Split(output, "\n") {
--		if line == "" || strings.HasPrefix(line, "qgroupid") || strings.HasPrefix(line, "---") {
-+		// Use case-insensitive field title match because BTRFS tooling changed casing between versions.
-+		if line == "" || strings.HasPrefix(strings.ToLower(line), "qgroupid") || strings.HasPrefix(line, "-") {
- 			continue
- 		}
- 

diff --git a/app-containers/lxd/lxd-5.0.1-r7.ebuild b/app-containers/lxd/lxd-5.0.1-r7.ebuild
deleted file mode 100644
index fb1952e6d9c7..000000000000
--- a/app-containers/lxd/lxd-5.0.1-r7.ebuild
+++ /dev/null
@@ -1,217 +0,0 @@
-# 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
-	https://github.com/lxc/lxd/commit/d55a590ea50a75c3cb2ea67894be8253074d6093.patch -> lxd-5.0.2-move-shellcheck-version-call-into-static-analysis.patch
-	https://patch-diff.githubusercontent.com/raw/lxc/lxd/pull/11011.patch -> lxd-5.8-add-tcp-keepalives-to-exec-channels.patch
-	verify-sig? ( https://linuxcontainers.org/downloads/lxd/${P}.tar.gz.asc )"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="amd64 ~arm64 ~x86"
-IUSE="apparmor nls"
-
-DEPEND="acct-group/lxd
-	app-arch/xz-utils
-	>=app-containers/lxc-3.0.0[apparmor?,seccomp(+)]
-	dev-db/sqlite:3
-	dev-libs/dqlite:=
-	dev-libs/lzo
-	dev-libs/raft:=[lz4]
-	>=dev-util/xdelta-3.0[lzma(+)]
-	net-dns/dnsmasq[dhcp]
-	sys-libs/libcap
-	virtual/udev"
-RDEPEND="${DEPEND}
-	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-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=( "${DISTDIR}"/lxd-5.0.2-move-shellcheck-version-call-into-static-analysis.patch
-	"${DISTDIR}"/lxd-5.8-add-tcp-keepalives-to-exec-channels.patch
-	"${FILESDIR}"/lxd-5.0.2-fix-btrfs-driver-to-support-btrfs-6.0.patch )
-
-src_unpack() {
-	if use verify-sig; then
-		verify-sig_verify_detached "${DISTDIR}"/${P}.tar.gz{,.asc}
-	fi
-
-	default
-}
-
-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 "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
-}


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-containers/lxd/, app-containers/lxd/files/
@ 2023-09-10 13:23 Joonas Niilola
  0 siblings, 0 replies; 14+ messages in thread
From: Joonas Niilola @ 2023-09-10 13:23 UTC (permalink / raw
  To: gentoo-commits

commit:     9e4cb55e7bf022bb3e37e069472543fdb11e4797
Author:     Brahmajit Das <brahmajit.xyz <AT> gmail <DOT> com>
AuthorDate: Mon Sep  4 15:32:05 2023 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sun Sep 10 13:20:05 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e4cb55e

app-containers/lxd: add 5.17

Closes: https://bugs.gentoo.org/903870
Signed-off-by: Brahmajit Das <brahmajit.xyz <AT> gmail.com>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 app-containers/lxd/Manifest                        |   2 +
 ...5.17-remove-shellcheck-buildsystem-checks.patch |  31 ++++
 app-containers/lxd/lxd-5.17.ebuild                 | 187 +++++++++++++++++++++
 app-containers/lxd/metadata.xml                    |   8 +
 4 files changed, 228 insertions(+)

diff --git a/app-containers/lxd/Manifest b/app-containers/lxd/Manifest
index 7a4e3af6d38c..798dacc3f7da 100644
--- a/app-containers/lxd/Manifest
+++ b/app-containers/lxd/Manifest
@@ -2,3 +2,5 @@ DIST lxd-4.0.9.tar.gz 9117078 BLAKE2B aa6689c1e958258484fba5c060765dd71d5406cb43
 DIST lxd-4.0.9.tar.gz.asc 833 BLAKE2B 7cd0d3ab518d947ca3ea6dc804c6a59b592e4e568152c078fdd3c102420bcd94d2f0b2c335b8b4ecdb19dc3c9a10f665a1510903f395247da956717beaa172a3 SHA512 79a4111571ab43e79cf669e416ed50f3ccae0fbceb86d73757d23c778035e827f47643bc87ff6a2fc64b095345a3d53cbd0c4eb245c75364e907d7449f3a0886
 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.17.tar.gz 22319517 BLAKE2B b9dfd934fad6b21b6f2b1d25291b4201f647b2b09a1ae155577a88257c021cc36b43a08802411d0f3268b726da7fa38b8627302696f670a1747e3795db0b0efe SHA512 f5feca34fff0b01a9db8041dd18fde82ad089f36ab171cf338556ebec9b2accfa450b0734d72b25bbb7296aaaeafed247aac2117c32f3ebfce5ae716e4b196bf
+DIST lxd-5.17.tar.gz.asc 833 BLAKE2B bc781d520b8314261b6681603f17fcb82d045bb969ebf8eec64c82ef73f493892d48d50c870f72e9f4f1f6c7dd4b63239a5039949e4f7bb49539c69538b4a2f2 SHA512 7e76a6cfcb1bf5b7b864125b412d5bd4766b4af6cdab40d70324c4103d1a716c39dfa5cf0eccf2cb7862f182c7c469f18ca46b981a1be3fc0fac8c47537d6c1c

diff --git a/app-containers/lxd/files/lxd-5.17-remove-shellcheck-buildsystem-checks.patch b/app-containers/lxd/files/lxd-5.17-remove-shellcheck-buildsystem-checks.patch
new file mode 100644
index 000000000000..b0e3a7500b89
--- /dev/null
+++ b/app-containers/lxd/files/lxd-5.17-remove-shellcheck-buildsystem-checks.patch
@@ -0,0 +1,31 @@
+--- a/Makefile
++++ b/Makefile
+@@ -249,28 +249,6 @@ endif
+ .PHONY: build-mo
+ build-mo: $(MOFILES)
+ 
+-.PHONY: static-analysis
+-static-analysis:
+-ifeq ($(shell command -v golangci-lint),)
+-	curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $$(go env GOPATH)/bin
+-endif
+-ifeq ($(shell command -v shellcheck),)
+-	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),)
+-	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 --exit-on-error --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.17.ebuild b/app-containers/lxd/lxd-5.17.ebuild
new file mode 100644
index 000000000000..76c54a54d503
--- /dev/null
+++ b/app-containers/lxd/lxd-5.17.ebuild
@@ -0,0 +1,187 @@
+# 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://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/stable"
+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/ebtables
+	net-firewall/iptables
+	sys-apps/iproute2
+	sys-fs/fuse:3
+	>=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=${BROOT}/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.17-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 "ipv6 support" net-dns/dnsmasq[ipv6]
+	optfeature "full lxd-migrate support"
+	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-containers/lxd/metadata.xml b/app-containers/lxd/metadata.xml
index 0367880cdf4c..fd92d5b3194e 100644
--- a/app-containers/lxd/metadata.xml
+++ b/app-containers/lxd/metadata.xml
@@ -5,10 +5,18 @@
     <email>juippis@gentoo.org</email>
     <name>Joonas Niilola</name>
   </maintainer>
+  <maintainer type="person" proxied="yes">
+    <email>brahmajit.xyz@gmail.com</email>
+    <name>Brahmajit Das</name>
+  </maintainer>
   <maintainer type="project">
     <email>virtualization@gentoo.org</email>
     <name>Gentoo Virtualization Project</name>
   </maintainer>
+  <maintainer type="project" proxied="proxy">
+    <email>proxy-maint@gentoo.org</email>
+    <name>Proxy Maintainers</name>
+  </maintainer>
   <longdescription>
     LXD is a modern, secure and powerful system container and virtual machine manager.
 


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-containers/lxd/, app-containers/lxd/files/
@ 2023-10-19 16:06 Joonas Niilola
  0 siblings, 0 replies; 14+ messages in thread
From: Joonas Niilola @ 2023-10-19 16:06 UTC (permalink / raw
  To: gentoo-commits

commit:     54e26b24956184b52b6aae02802b95af4168af3c
Author:     Brahmajit Das <brahmajit.xyz <AT> gmail <DOT> com>
AuthorDate: Thu Oct 19 13:03:41 2023 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Thu Oct 19 16:03:03 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=54e26b24

app-containers/lxd: drop 5.17

Signed-off-by: Brahmajit Das <brahmajit.xyz <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/33408
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 app-containers/lxd/Manifest                        |   2 -
 ...5.17-remove-shellcheck-buildsystem-checks.patch |  31 ----
 app-containers/lxd/lxd-5.17.ebuild                 | 192 ---------------------
 3 files changed, 225 deletions(-)

diff --git a/app-containers/lxd/Manifest b/app-containers/lxd/Manifest
index ecf436ba8e57..76125c249aa7 100644
--- a/app-containers/lxd/Manifest
+++ b/app-containers/lxd/Manifest
@@ -2,8 +2,6 @@ DIST lxd-4.0.9.tar.gz 9117078 BLAKE2B aa6689c1e958258484fba5c060765dd71d5406cb43
 DIST lxd-4.0.9.tar.gz.asc 833 BLAKE2B 7cd0d3ab518d947ca3ea6dc804c6a59b592e4e568152c078fdd3c102420bcd94d2f0b2c335b8b4ecdb19dc3c9a10f665a1510903f395247da956717beaa172a3 SHA512 79a4111571ab43e79cf669e416ed50f3ccae0fbceb86d73757d23c778035e827f47643bc87ff6a2fc64b095345a3d53cbd0c4eb245c75364e907d7449f3a0886
 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.17.tar.gz 22319517 BLAKE2B b9dfd934fad6b21b6f2b1d25291b4201f647b2b09a1ae155577a88257c021cc36b43a08802411d0f3268b726da7fa38b8627302696f670a1747e3795db0b0efe SHA512 f5feca34fff0b01a9db8041dd18fde82ad089f36ab171cf338556ebec9b2accfa450b0734d72b25bbb7296aaaeafed247aac2117c32f3ebfce5ae716e4b196bf
-DIST lxd-5.17.tar.gz.asc 833 BLAKE2B bc781d520b8314261b6681603f17fcb82d045bb969ebf8eec64c82ef73f493892d48d50c870f72e9f4f1f6c7dd4b63239a5039949e4f7bb49539c69538b4a2f2 SHA512 7e76a6cfcb1bf5b7b864125b412d5bd4766b4af6cdab40d70324c4103d1a716c39dfa5cf0eccf2cb7862f182c7c469f18ca46b981a1be3fc0fac8c47537d6c1c
 DIST lxd-5.18.tar.gz 22536474 BLAKE2B 44dabd50c137adde794ed266484a071d1aecff9300f8710d748a550415bd5f21b5f4ab40602f7b648cc05f9acc403782209636bdb8fe9720ff2808e8816aa27b SHA512 a9bdc276fb040413bad47579fb420951a007d725319c89abfde14062933267c7e5c67c546f2222905232231997a8f47fa097ed603d93dde2b9990b3e7018103f
 DIST lxd-5.18.tar.gz.asc 833 BLAKE2B 2eee2786d2930bce45b5f23943d3e9b0dab61595608a38077429585c3191476915d0ba7ef5eb05633a014dd92542cc5a5bfa70c4c0a63b94733297d37d78717e SHA512 959911019bffeca1cddae6b44c65b2cdbd71658cf9f714e41dd3de755629aedc0e8de196dac6ba0de0f27247e859f7090dc23edf4896e7a6c028b87e3665a5e2
 DIST lxd-5.19.tar.gz 22506800 BLAKE2B 94940a9e886d005495f8888d4491e5a8f8beee60c44051c767d32fd3dead9a93c1e546c0117207aefb60280a289d464615fba7e80385df23f397388a88be1386 SHA512 11d712245fc9cb77e7eabc748cfac38c1936be1c49b8dc4a2a7ebc06d0797f4d0d728b275cee27f9c2c64bc13275fc29ac57fc8d0dce9c24d6636b51248e9b4f

diff --git a/app-containers/lxd/files/lxd-5.17-remove-shellcheck-buildsystem-checks.patch b/app-containers/lxd/files/lxd-5.17-remove-shellcheck-buildsystem-checks.patch
deleted file mode 100644
index b0e3a7500b89..000000000000
--- a/app-containers/lxd/files/lxd-5.17-remove-shellcheck-buildsystem-checks.patch
+++ /dev/null
@@ -1,31 +0,0 @@
---- a/Makefile
-+++ b/Makefile
-@@ -249,28 +249,6 @@ endif
- .PHONY: build-mo
- build-mo: $(MOFILES)
- 
--.PHONY: static-analysis
--static-analysis:
--ifeq ($(shell command -v golangci-lint),)
--	curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $$(go env GOPATH)/bin
--endif
--ifeq ($(shell command -v shellcheck),)
--	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),)
--	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 --exit-on-error --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.17.ebuild b/app-containers/lxd/lxd-5.17.ebuild
deleted file mode 100644
index ea17b562f52c..000000000000
--- a/app-containers/lxd/lxd-5.17.ebuild
+++ /dev/null
@@ -1,192 +0,0 @@
-# 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://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/stable"
-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:3
-	>=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=${BROOT}/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.17-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 "ipv6 support" net-dns/dnsmasq[ipv6]
-	optfeature "full lxd-migrate support"
-	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."
-}


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-containers/lxd/, app-containers/lxd/files/
@ 2023-12-08  6:50 Joonas Niilola
  0 siblings, 0 replies; 14+ messages in thread
From: Joonas Niilola @ 2023-12-08  6:50 UTC (permalink / raw
  To: gentoo-commits

commit:     b56e3dd559943516619fffa88fef7f99a8dcad73
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Fri Dec  8 06:48:12 2023 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Fri Dec  8 06:48:12 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b56e3dd5

app-containers/lxd: drop 5.18

Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 app-containers/lxd/Manifest                        |   2 -
 ...egression-in-lxd_combined.tar.gz-handling.patch |  21 ---
 app-containers/lxd/lxd-5.18.ebuild                 | 192 ---------------------
 3 files changed, 215 deletions(-)

diff --git a/app-containers/lxd/Manifest b/app-containers/lxd/Manifest
index 76125c249aa7..dd8673ce2dd6 100644
--- a/app-containers/lxd/Manifest
+++ b/app-containers/lxd/Manifest
@@ -2,7 +2,5 @@ DIST lxd-4.0.9.tar.gz 9117078 BLAKE2B aa6689c1e958258484fba5c060765dd71d5406cb43
 DIST lxd-4.0.9.tar.gz.asc 833 BLAKE2B 7cd0d3ab518d947ca3ea6dc804c6a59b592e4e568152c078fdd3c102420bcd94d2f0b2c335b8b4ecdb19dc3c9a10f665a1510903f395247da956717beaa172a3 SHA512 79a4111571ab43e79cf669e416ed50f3ccae0fbceb86d73757d23c778035e827f47643bc87ff6a2fc64b095345a3d53cbd0c4eb245c75364e907d7449f3a0886
 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.18.tar.gz 22536474 BLAKE2B 44dabd50c137adde794ed266484a071d1aecff9300f8710d748a550415bd5f21b5f4ab40602f7b648cc05f9acc403782209636bdb8fe9720ff2808e8816aa27b SHA512 a9bdc276fb040413bad47579fb420951a007d725319c89abfde14062933267c7e5c67c546f2222905232231997a8f47fa097ed603d93dde2b9990b3e7018103f
-DIST lxd-5.18.tar.gz.asc 833 BLAKE2B 2eee2786d2930bce45b5f23943d3e9b0dab61595608a38077429585c3191476915d0ba7ef5eb05633a014dd92542cc5a5bfa70c4c0a63b94733297d37d78717e SHA512 959911019bffeca1cddae6b44c65b2cdbd71658cf9f714e41dd3de755629aedc0e8de196dac6ba0de0f27247e859f7090dc23edf4896e7a6c028b87e3665a5e2
 DIST lxd-5.19.tar.gz 22506800 BLAKE2B 94940a9e886d005495f8888d4491e5a8f8beee60c44051c767d32fd3dead9a93c1e546c0117207aefb60280a289d464615fba7e80385df23f397388a88be1386 SHA512 11d712245fc9cb77e7eabc748cfac38c1936be1c49b8dc4a2a7ebc06d0797f4d0d728b275cee27f9c2c64bc13275fc29ac57fc8d0dce9c24d6636b51248e9b4f
 DIST lxd-5.19.tar.gz.asc 833 BLAKE2B 591f12c8e93199061b588bdffded5d159f714d91c68a0d8003590bc672cec787418611f0597fe8e137b3c2b61e8171ca6393db912b8f55ded39db934d55d3df1 SHA512 2337d42f0a7dfdbb2870511442f05e1dd9c214e1b0d96b20ee677a3a345bf41c15c0b1cb0d42ddd15766813e4ae405577f8b49fa60fdc541fb3db35c0bc569ed

diff --git a/app-containers/lxd/files/lxd-5.18-handle-regression-in-lxd_combined.tar.gz-handling.patch b/app-containers/lxd/files/lxd-5.18-handle-regression-in-lxd_combined.tar.gz-handling.patch
deleted file mode 100644
index 025a9e6a8e6c..000000000000
--- a/app-containers/lxd/files/lxd-5.18-handle-regression-in-lxd_combined.tar.gz-handling.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-https://github.com/canonical/lxd/commit/2d8481712055d0cbb3bd952e25a1df469939990d.patch
-From: Thomas Parrott <thomas.parrott@canonical.com>
-Date: Thu, 21 Sep 2023 22:12:19 +0100
-Subject: [PATCH] shared/simplestreams/products: Fix regression in
- lxd_combined.tar.gz handling
-
-For reasons that are likely lost to history simplestreams uses lxd.tar.xz
-whereas the combined file is lxd_combined.tar.gz (not xz).
-
-Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
---- a/shared/simplestreams/products.go
-+++ b/shared/simplestreams/products.go
-@@ -10,7 +10,7 @@ import (
- 	"github.com/canonical/lxd/shared/osarch"
- )
- 
--var lxdCompatCombinedItems = []string{"lxd_combined.tar.xz", "incus_combined.tar.xz"}
-+var lxdCompatCombinedItems = []string{"lxd_combined.tar.gz", "incus_combined.tar.gz"}
- var lxdCompatItems = []string{"lxd.tar.xz", "incus.tar.xz"}
- 
- // Products represents the base of download.json.

diff --git a/app-containers/lxd/lxd-5.18.ebuild b/app-containers/lxd/lxd-5.18.ebuild
deleted file mode 100644
index 4dd097200fa7..000000000000
--- a/app-containers/lxd/lxd-5.18.ebuild
+++ /dev/null
@@ -1,192 +0,0 @@
-# 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://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/stable"
-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:3
-	>=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}"/${P}-handle-regression-in-lxd_combined.tar.gz-handling.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."
-}


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-containers/lxd/, app-containers/lxd/files/
@ 2024-02-03  8:17 Joonas Niilola
  0 siblings, 0 replies; 14+ messages in thread
From: Joonas Niilola @ 2024-02-03  8:17 UTC (permalink / raw
  To: gentoo-commits

commit:     e287403e01c9ebbbd9a5ee96cce419ca3d0798b5
Author:     Brahmajit Das <brahmajit.xyz <AT> gmail <DOT> com>
AuthorDate: Fri Feb  2 19:58:09 2024 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sat Feb  3 08:17:51 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e287403e

app-containers/lxd: add 5.0.3

Signed-off-by: Brahmajit Das <brahmajit.xyz <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/35153
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 app-containers/lxd/Manifest                        |   2 +
 ....0.3-remove-shellcheck-buildsystem-checks.patch |  33 ++++
 app-containers/lxd/lxd-5.0.3.ebuild                | 214 +++++++++++++++++++++
 3 files changed, 249 insertions(+)

diff --git a/app-containers/lxd/Manifest b/app-containers/lxd/Manifest
index 4a4a8cde8103..4a6f6672e70e 100644
--- a/app-containers/lxd/Manifest
+++ b/app-containers/lxd/Manifest
@@ -2,6 +2,8 @@ DIST lxd-4.0.9.tar.gz 9117078 BLAKE2B aa6689c1e958258484fba5c060765dd71d5406cb43
 DIST lxd-4.0.9.tar.gz.asc 833 BLAKE2B 7cd0d3ab518d947ca3ea6dc804c6a59b592e4e568152c078fdd3c102420bcd94d2f0b2c335b8b4ecdb19dc3c9a10f665a1510903f395247da956717beaa172a3 SHA512 79a4111571ab43e79cf669e416ed50f3ccae0fbceb86d73757d23c778035e827f47643bc87ff6a2fc64b095345a3d53cbd0c4eb245c75364e907d7449f3a0886
 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.0.3.tar.gz 16628656 BLAKE2B d24b4b2e40635b109b69196995a434fac26e1ffb023bfd2181588ff7543a9022fcd82a0a4ac84d40a7a3f0dceda0167a55e64c40b91c3719dbbeac6e102dd211 SHA512 87f5d9fbe2cef5970c0a95f61dc615f26e4168202d39f53c7323787a246fa1d6a378c7b957d90f6afd02e048fb3080a06f7202d02652973fb33421f18680d9bf
+DIST lxd-5.0.3.tar.gz.asc 833 BLAKE2B c6ef26dc8ba4033dbc98367609826389640bfd31da25113f9285dc67b2a69da4fe06a3cacbb83fe5b1b984b5eed8ff3a373d5f88693c2999c10b25a7cfd4cd8d SHA512 424e969de30e4fcfabf65062f387d15bd1cc99ed2c984944c529df92d520b3d5de306a8d444850b3916889d318a88e521d275c62353b25853471efb713d58d18
 DIST lxd-5.19.tar.gz 22506800 BLAKE2B 94940a9e886d005495f8888d4491e5a8f8beee60c44051c767d32fd3dead9a93c1e546c0117207aefb60280a289d464615fba7e80385df23f397388a88be1386 SHA512 11d712245fc9cb77e7eabc748cfac38c1936be1c49b8dc4a2a7ebc06d0797f4d0d728b275cee27f9c2c64bc13275fc29ac57fc8d0dce9c24d6636b51248e9b4f
 DIST lxd-5.19.tar.gz.asc 833 BLAKE2B 591f12c8e93199061b588bdffded5d159f714d91c68a0d8003590bc672cec787418611f0597fe8e137b3c2b61e8171ca6393db912b8f55ded39db934d55d3df1 SHA512 2337d42f0a7dfdbb2870511442f05e1dd9c214e1b0d96b20ee677a3a345bf41c15c0b1cb0d42ddd15766813e4ae405577f8b49fa60fdc541fb3db35c0bc569ed
 DIST lxd-5.20.tar.gz 22825821 BLAKE2B 616e6659c75e87027883dc6643c8c42cce75f69e7781b93371ca8d00078a7c5086679d70dfd5497ec6be9f917f07d81ef826fc0bdd09317d7b98e435f053c465 SHA512 cf593f967d9d595577ab9b05bad99d04b9c30031461fdd4769f4746e651b3aa8e94fca53548da1aec22ff312a91ff46710ab88043a633fbd78ffafe130fed3e3

diff --git a/app-containers/lxd/files/lxd-5.0.3-remove-shellcheck-buildsystem-checks.patch b/app-containers/lxd/files/lxd-5.0.3-remove-shellcheck-buildsystem-checks.patch
new file mode 100644
index 000000000000..d3efd72ecb37
--- /dev/null
+++ b/app-containers/lxd/files/lxd-5.0.3-remove-shellcheck-buildsystem-checks.patch
@@ -0,0 +1,33 @@
+diff --git a/Makefile b/Makefile
+index 8061227..c9b85d2 100644
+--- a/Makefile
++++ b/Makefile
+@@ -258,28 +258,6 @@ endif
+ .PHONY: build-mo
+ build-mo: $(MOFILES)
+ 
+-.PHONY: static-analysis
+-static-analysis:
+-ifeq ($(shell command -v golangci-lint),)
+-	curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $$(go env GOPATH)/bin
+-endif
+-ifeq ($(shell command -v shellcheck),)
+-	echo "Please install shellcheck"
+-	exit 1
+-else
+-ifneq "$(shell shellcheck --version | grep version: | cut -d ' ' -f2)" "0.8.0"
+-	@echo "WARN: shellcheck version is not 0.8.0"
+-endif
+-endif
+-ifeq ($(shell command -v flake8),)
+-	echo "Please install flake8"
+-	exit 1
+-endif
+-	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 --exit-on-error --regex '.sh' test/lint
+-
+ .PHONY: staticcheck
+ staticcheck:
+ ifeq ($(shell command -v staticcheck),)

diff --git a/app-containers/lxd/lxd-5.0.3.ebuild b/app-containers/lxd/lxd-5.0.3.ebuild
new file mode 100644
index 000000000000..ff98d497f293
--- /dev/null
+++ b/app-containers/lxd/lxd-5.0.3.ebuild
@@ -0,0 +1,214 @@
+# 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
+)
+
+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
+}


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-containers/lxd/, app-containers/lxd/files/
@ 2024-02-13 12:58 Joonas Niilola
  0 siblings, 0 replies; 14+ messages in thread
From: Joonas Niilola @ 2024-02-13 12:58 UTC (permalink / raw
  To: gentoo-commits

commit:     a85b57f6ae5fa4ee0a703d6bc18ea904a4eed4aa
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 13 12:57:17 2024 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Tue Feb 13 12:57:17 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a85b57f6

app-containers/lxd: allow 5.0.3 to pull images from lxc image server

 - the LTS version of LXD is still allowed to pull images. Add upstream
   (Canonical) fixes to lxd-5.0.3.

Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 ...0.3-pr-12834-dont-stop-parsing-image-info.patch |  79 ++++++++
 .../lxd-5.0.3-pr-12847-ignore-incus-archives.patch |  26 +++
 app-containers/lxd/lxd-5.0.3-r1.ebuild             | 216 +++++++++++++++++++++
 3 files changed, 321 insertions(+)

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
+}


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-containers/lxd/, app-containers/lxd/files/
@ 2024-06-01  6:38 Joonas Niilola
  0 siblings, 0 replies; 14+ messages in thread
From: Joonas Niilola @ 2024-06-01  6:38 UTC (permalink / raw
  To: gentoo-commits

commit:     5763c7144b4624c28255e3b84f2e2a7387e352cd
Author:     Brahmajit Das <brahmajit.xyz <AT> gmail <DOT> com>
AuthorDate: Fri May 31 21:27:13 2024 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sat Jun  1 06:37:46 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5763c714

app-containers/lxd: drop old

Closes: https://github.com/gentoo/gentoo/pull/36933
Signed-off-by: Brahmajit Das <brahmajit.xyz <AT> gmail.com>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 app-containers/lxd/Manifest                        |   6 -
 app-containers/lxd/files/lxd-4.0.0.confd           |  23 ---
 app-containers/lxd/files/lxd-4.0.0.socket          |  12 --
 .../lxd/files/lxd-4.0.9-glibc-2.36-fix.patch       |  74 --------
 app-containers/lxd/files/lxd-4.0.9-r1.service      |  23 ---
 app-containers/lxd/files/lxd-4.0.9.initd           |  49 -----
 app-containers/lxd/files/lxd-5.0.2-r1.initd        |  59 ------
 ....0.2-remove-shellcheck-buildsystem-checks.patch |  32 ----
 .../lxd/files/lxd-containers-4.0.0.service         |  16 --
 app-containers/lxd/lxd-4.0.9-r4.ebuild             | 186 ------------------
 app-containers/lxd/lxd-5.0.2-r4.ebuild             | 211 ---------------------
 app-containers/lxd/lxd-5.19-r1.ebuild              | 187 ------------------
 12 files changed, 878 deletions(-)

diff --git a/app-containers/lxd/Manifest b/app-containers/lxd/Manifest
index 224db03baf4c..e528a0b2e764 100644
--- a/app-containers/lxd/Manifest
+++ b/app-containers/lxd/Manifest
@@ -1,11 +1,5 @@
-DIST lxd-4.0.9.tar.gz 9117078 BLAKE2B aa6689c1e958258484fba5c060765dd71d5406cb4375d3132cdc38633277e6c95322e8e3aed5e9dd251140c6868ec42470e797639dde4af42848e138f3b45ee2 SHA512 657949311753895f3941deaabae2d03092fc67490d2de78db48b296fdd3e9df4c5844467dd6913814426ca423a6ee1da9705bb1a2652ea99fe1356eb7da97ebb
-DIST lxd-4.0.9.tar.gz.asc 833 BLAKE2B 7cd0d3ab518d947ca3ea6dc804c6a59b592e4e568152c078fdd3c102420bcd94d2f0b2c335b8b4ecdb19dc3c9a10f665a1510903f395247da956717beaa172a3 SHA512 79a4111571ab43e79cf669e416ed50f3ccae0fbceb86d73757d23c778035e827f47643bc87ff6a2fc64b095345a3d53cbd0c4eb245c75364e907d7449f3a0886
-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.0.3.tar.gz 16628656 BLAKE2B d24b4b2e40635b109b69196995a434fac26e1ffb023bfd2181588ff7543a9022fcd82a0a4ac84d40a7a3f0dceda0167a55e64c40b91c3719dbbeac6e102dd211 SHA512 87f5d9fbe2cef5970c0a95f61dc615f26e4168202d39f53c7323787a246fa1d6a378c7b957d90f6afd02e048fb3080a06f7202d02652973fb33421f18680d9bf
 DIST lxd-5.0.3.tar.gz.asc 833 BLAKE2B c6ef26dc8ba4033dbc98367609826389640bfd31da25113f9285dc67b2a69da4fe06a3cacbb83fe5b1b984b5eed8ff3a373d5f88693c2999c10b25a7cfd4cd8d SHA512 424e969de30e4fcfabf65062f387d15bd1cc99ed2c984944c529df92d520b3d5de306a8d444850b3916889d318a88e521d275c62353b25853471efb713d58d18
-DIST lxd-5.19.tar.gz 22506800 BLAKE2B 94940a9e886d005495f8888d4491e5a8f8beee60c44051c767d32fd3dead9a93c1e546c0117207aefb60280a289d464615fba7e80385df23f397388a88be1386 SHA512 11d712245fc9cb77e7eabc748cfac38c1936be1c49b8dc4a2a7ebc06d0797f4d0d728b275cee27f9c2c64bc13275fc29ac57fc8d0dce9c24d6636b51248e9b4f
-DIST lxd-5.19.tar.gz.asc 833 BLAKE2B 591f12c8e93199061b588bdffded5d159f714d91c68a0d8003590bc672cec787418611f0597fe8e137b3c2b61e8171ca6393db912b8f55ded39db934d55d3df1 SHA512 2337d42f0a7dfdbb2870511442f05e1dd9c214e1b0d96b20ee677a3a345bf41c15c0b1cb0d42ddd15766813e4ae405577f8b49fa60fdc541fb3db35c0bc569ed
 DIST lxd-5.20.tar.gz 22825821 BLAKE2B 616e6659c75e87027883dc6643c8c42cce75f69e7781b93371ca8d00078a7c5086679d70dfd5497ec6be9f917f07d81ef826fc0bdd09317d7b98e435f053c465 SHA512 cf593f967d9d595577ab9b05bad99d04b9c30031461fdd4769f4746e651b3aa8e94fca53548da1aec22ff312a91ff46710ab88043a633fbd78ffafe130fed3e3
 DIST lxd-5.20.tar.gz.asc 833 BLAKE2B 03d469429fee81e6b061de458eeffe7aacf19ccc1dacb73e2e9cf3530439c82fcd016496aa7757d3ff54af2da7372c5ecf0642b3adddff950065b1ceb1e64103 SHA512 e48af466194523903a472a246dfa81cd67ec4ad7b1be6edb1ce9135945be8a810fca3f98de5a4d8b93390119cb0e4eda78a323d5dea0330b0c92e755781982a3
 DIST lxd-5.21.1.tar.gz 23753867 BLAKE2B 102f3c83faa956f6a5f052912417f595a7374c13ff1da21e43b76e267908323f3db05aed8b83fb99a0b70ee03af9b1df0551a2c535db146d5ea6f415f7671e7a SHA512 809099d16ffd12b785a03ad3ed527fa6f0c7503a41b7c93d41fd3418d18f8c68c79e5a689c8df2ed4157d434742bfb5cc267a5afb9734091b224be644a3a6958

diff --git a/app-containers/lxd/files/lxd-4.0.0.confd b/app-containers/lxd/files/lxd-4.0.0.confd
deleted file mode 100644
index 68cf344995be..000000000000
--- a/app-containers/lxd/files/lxd-4.0.0.confd
+++ /dev/null
@@ -1,23 +0,0 @@
-# Group which owns the shared socket
-LXD_OPTIONS+=" --group lxd"
-
-# Enable cpu profiling into the specified file
-#LXD_OPTIONS+=" --cpuprofile /tmp/lxc_cpu_profile"
-
-# Enable memory profiling into the specified file
-#LXD_OPTIONS+=" --memprofile /tmp/lxc_mem_profile"
-
-# Enable debug mode
-#LXD_OPTIONS+=" --debug"
-
-# For debugging, print a complete stack trace every n seconds
-#LXD_OPTIONS+=" --print-goroutines-every 5"
-
-# Enable verbose mode
-#LXD_OPTIONS+=" -v"
-
-# Logfile to log to
-#LXD_OPTIONS+=" --logfile /var/log/lxd/lxd.log"
-
-# Enable syslog logging
-#LXD_OPTIONS+=" --syslog"

diff --git a/app-containers/lxd/files/lxd-4.0.0.socket b/app-containers/lxd/files/lxd-4.0.0.socket
deleted file mode 100644
index 3207c9453d11..000000000000
--- a/app-containers/lxd/files/lxd-4.0.0.socket
+++ /dev/null
@@ -1,12 +0,0 @@
-[Unit]
-Description=LXD - unix socket
-Documentation=man:lxd(1)
-
-[Socket]
-ListenStream=/var/lib/lxd/unix.socket
-SocketGroup=lxd
-SocketMode=0660
-Service=lxd.service
-
-[Install]
-WantedBy=sockets.target

diff --git a/app-containers/lxd/files/lxd-4.0.9-glibc-2.36-fix.patch b/app-containers/lxd/files/lxd-4.0.9-glibc-2.36-fix.patch
deleted file mode 100644
index d05ff2c81bd9..000000000000
--- a/app-containers/lxd/files/lxd-4.0.9-glibc-2.36-fix.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From cc7bab602e6b967fdd31c5feed0f3f6321c0a0a7 Mon Sep 17 00:00:00 2001
-From: Luca Barbato <lu_zero@gentoo.org>
-Date: Fri, 13 Jan 2023 21:43:22 +0000
-Subject: [PATCH] Fix syscall wrappers
-
----
- lxd/include/syscall_wrappers.h | 7 ++++---
- lxd/main_nsexec.go             | 2 +-
- shared/idmap/shift_linux.go    | 2 +-
- 3 files changed, 6 insertions(+), 5 deletions(-)
-
-diff --git a/lxd/include/syscall_wrappers.h b/lxd/include/syscall_wrappers.h
-index 2c28133a8..a6975ab4d 100644
---- a/lxd/include/syscall_wrappers.h
-+++ b/lxd/include/syscall_wrappers.h
-@@ -26,10 +26,10 @@ static inline int lxd_close_range(unsigned int fd, unsigned int max_fd, unsigned
- 	return syscall(__NR_close_range, fd, max_fd, flags);
- }
- 
--static inline int open_tree(int dfd, const char *filename, unsigned int flags)
-+/* static inline int open_tree(int dfd, const char *filename, unsigned int flags)
- {
- 	return syscall(__NR_open_tree, dfd, filename, flags);
--}
-+}*/
- 
- /*
-  * mount_setattr()
-@@ -40,7 +40,7 @@ struct lxc_mount_attr {
- 	__u64 propagation;
- 	__u64 userns_fd;
- };
--
-+/*
- static inline int mount_setattr(int dfd, const char *path, unsigned int flags,
- 				struct lxc_mount_attr *attr, size_t size)
- {
-@@ -53,6 +53,7 @@ static inline int move_mount(int from_dfd, const char *from_pathname, int to_dfd
- 	return syscall(__NR_move_mount, from_dfd, from_pathname, to_dfd,
- 		       to_pathname, flags);
- }
-+*/
- 
- /* arg1 of prctl() */
- #ifndef PR_SCHED_CORE
-diff --git a/lxd/main_nsexec.go b/lxd/main_nsexec.go
-index f11c0d4cb..753024283 100644
---- a/lxd/main_nsexec.go
-+++ b/lxd/main_nsexec.go
-@@ -298,7 +298,7 @@ static char *file_to_buf(char *path, ssize_t *length)
- int mount_detach_idmap(const char *path, int fd_userns)
- {
- 	__do_close int fd_tree = -EBADF;
--	struct lxc_mount_attr attr = {
-+	struct mount_attr attr = {
- 	    .attr_set		= MOUNT_ATTR_IDMAP,
- 
- 	};
-diff --git a/shared/idmap/shift_linux.go b/shared/idmap/shift_linux.go
-index daaf37275..e219ac01c 100644
---- a/shared/idmap/shift_linux.go
-+++ b/shared/idmap/shift_linux.go
-@@ -314,7 +314,7 @@ static int get_userns_fd(void)
- static int create_detached_idmapped_mount(const char *path)
- {
- 	__do_close int fd_tree = -EBADF, fd_userns = -EBADF;
--	struct lxc_mount_attr attr = {
-+	struct mount_attr attr = {
- 	    .attr_set		= MOUNT_ATTR_IDMAP,
- 	    .propagation	= MS_SLAVE,
- 
--- 
-2.39.0
-

diff --git a/app-containers/lxd/files/lxd-4.0.9-r1.service b/app-containers/lxd/files/lxd-4.0.9-r1.service
deleted file mode 100644
index 480940dab7a3..000000000000
--- a/app-containers/lxd/files/lxd-4.0.9-r1.service
+++ /dev/null
@@ -1,23 +0,0 @@
-[Unit]
-Description=LXD - main daemon
-After=network-online.target lxcfs.service lxd.socket
-Requires=network-online.target lxcfs.service lxd.socket
-Documentation=man:lxd(1)
-
-[Service]
-EnvironmentFile=-/etc/environment
-ExecStart=/usr/sbin/lxd --group lxd --syslog
-ExecStartPost=/usr/sbin/lxd waitready --timeout=600
-ExecStartPre=/bin/mkdir -p /var/log/lxd
-ExecStartPre=/bin/chown -R root:lxd /var/log/lxd
-KillMode=process
-PermissionsStartOnly=true
-TimeoutStartSec=600s
-TimeoutStopSec=30s
-Restart=on-failure
-LimitNOFILE=1048576
-LimitNPROC=infinity
-TasksMax=infinity
-
-[Install]
-Also=lxd-containers.service lxd.socket

diff --git a/app-containers/lxd/files/lxd-4.0.9.initd b/app-containers/lxd/files/lxd-4.0.9.initd
deleted file mode 100644
index 7b3d464ea367..000000000000
--- a/app-containers/lxd/files/lxd-4.0.9.initd
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-DAEMON=/usr/sbin/lxd
-PIDFILE=/run/lxd.pid
-
-depend() {
-	need net
-	need lxcfs
-}
-
-start() {
-	ebegin "Starting lxd service"
-
-	modprobe -f loop > /dev/null 2>&1
-
-	# Fix permissions on /var/lib/lxd and make sure it exists.
-	# Create a log directory for lxd with correct permissions.
-	install -d /var/lib/lxd --group lxd --owner root --mode 0775
-	install -d /var/log/lxd --group lxd --owner root 
-	start-stop-daemon --start \
-		--pidfile ${PIDFILE} \
-		--exec ${DAEMON} \
-		--background \
-		--make-pidfile \
-		-- \
-		${LXD_OPTIONS}
-	eend ${?}
-}
-
-stop() {
-	if [ "${RC_CMD}" = restart ]; then
-		ebegin "Stopping lxd service (but not containers)"
-		# start-stop-daemon sends SIGTERM with a timeout of 5s by default.
-		# SIGTERM indicates to LXD that it will be stopped temporarily.
-		# Instances will keep running.
-		start-stop-daemon --stop --quiet -p "${PIDFILE}"
-		eend ${?}
-	else
-		ebegin "Stopping lxd service and containers, waiting 40s"
-		# SIGPWR indicates to LXD that the host is going down.
-		# LXD will do a clean shutdown of all instances.
-		# After 30s all remaining instances will be killed.
-		# We wait up to 40s for LXD.
-		start-stop-daemon --stop --quiet -R SIGPWR/40 -p "${PIDFILE}"
-		eend ${?}
-	fi
-}

diff --git a/app-containers/lxd/files/lxd-5.0.2-r1.initd b/app-containers/lxd/files/lxd-5.0.2-r1.initd
deleted file mode 100644
index 7c74c0fdc308..000000000000
--- a/app-containers/lxd/files/lxd-5.0.2-r1.initd
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-DAEMON=/usr/sbin/lxd
-PIDFILE=/run/lxd.pid
-
-depend() {
-	need net
-	need lxcfs
-}
-
-start() {
-	ebegin "Starting lxd service"
-
-	modprobe -f loop > /dev/null 2>&1
-
-	# Fix permissions on /var/lib/lxd and make sure it exists.
-	# Create a log directory for lxd with correct permissions.
-	install -d /var/lib/lxd --group lxd --owner root --mode 0775
-	install -d /var/log/lxd --group lxd --owner root
-
-	start-stop-daemon --start \
-		--pidfile ${PIDFILE} \
-		--exec ${DAEMON} \
-		--background \
-		--make-pidfile \
-		-- \
-		${LXD_OPTIONS}
-	eend ${?}
-
-	# Create necessary systemd paths in order for systemd containers to work on openrc host.
-	# /etc/rc.conf should have following values:
-	#   rc_cgroup_mode="hybrid"
-	if [ -d /sys/fs/cgroup/unified ] &&
-	[ ! -d /sys/fs/cgroup/systemd ]; then
-		install -d /sys/fs/cgroup/systemd --group lxd --owner root
-		mount -t cgroup -o none,name=systemd systemd /sys/fs/cgroup/systemd
-	fi
-}
-
-stop() {
-	if [ "${RC_CMD}" = restart ]; then
-		ebegin "Stopping lxd service (but not containers)"
-		# start-stop-daemon sends SIGTERM with a timeout of 5s by default.
-		# SIGTERM indicates to LXD that it will be stopped temporarily.
-		# Instances will keep running.
-		start-stop-daemon --stop --quiet -p "${PIDFILE}"
-		eend ${?}
-	else
-		ebegin "Stopping lxd service and containers, waiting 40s"
-		# SIGPWR indicates to LXD that the host is going down.
-		# LXD will do a clean shutdown of all instances.
-		# After 30s all remaining instances will be killed.
-		# We wait up to 40s for LXD.
-		start-stop-daemon --stop --quiet -R SIGPWR/40 -p "${PIDFILE}"
-		eend ${?}
-	fi
-}

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
deleted file mode 100644
index a8e457387ee6..000000000000
--- a/app-containers/lxd/files/lxd-5.0.2-remove-shellcheck-buildsystem-checks.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-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/files/lxd-containers-4.0.0.service b/app-containers/lxd/files/lxd-containers-4.0.0.service
deleted file mode 100644
index 894760c3506b..000000000000
--- a/app-containers/lxd/files/lxd-containers-4.0.0.service
+++ /dev/null
@@ -1,16 +0,0 @@
-[Unit]
-Description=LXD - container startup/shutdown
-Documentation=man:lxd(1)
-After=lxd.socket lxd.service
-Requires=lxd.socket
-
-[Service]
-Type=oneshot
-ExecStart=/usr/sbin/lxd activateifneeded
-ExecStop=/usr/sbin/lxd shutdown
-TimeoutStartSec=600s
-TimeoutStopSec=600s
-RemainAfterExit=yes
-
-[Install]
-WantedBy=multi-user.target

diff --git a/app-containers/lxd/lxd-4.0.9-r4.ebuild b/app-containers/lxd/lxd-4.0.9-r4.ebuild
deleted file mode 100644
index efb4546488c2..000000000000
--- a/app-containers/lxd/lxd-4.0.9-r4.ebuild
+++ /dev/null
@@ -1,186 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit bash-completion-r1 go-module 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/lts"
-KEYWORDS="~amd64 ~arm64 ~x86"
-IUSE="apparmor ipv6 nls verify-sig"
-
-DEPEND="acct-group/lxd
-	app-arch/xz-utils
-	>=app-containers/lxc-3.0.0[apparmor?,seccomp(+)]
-	dev-db/sqlite:3
-	dev-libs/dqlite
-	dev-libs/lzo
-	dev-libs/raft[lz4]
-	>=dev-util/xdelta-3.0[lzma(+)]
-	net-dns/dnsmasq[dhcp,ipv6(+)?]
-	sys-libs/libcap
-	virtual/udev"
-RDEPEND="${DEPEND}
-	|| (
-			net-firewall/nftables[json]
-			(
-				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? ( 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-p2c
-	/usr/sbin/lxd"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=/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-4.0.9-glibc-2.36-fix.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.secboot.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-p2c
-	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-p2c 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-4.0.9.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 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."
-}

diff --git a/app-containers/lxd/lxd-5.0.2-r4.ebuild b/app-containers/lxd/lxd-5.0.2-r4.ebuild
deleted file mode 100644
index f74e0a523ad9..000000000000
--- a/app-containers/lxd/lxd-5.0.2-r4.ebuild
+++ /dev/null
@@ -1,211 +0,0 @@
-# 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://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/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.16.4:=[lz4]
-	dev-libs/lzo
-	>=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-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=/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
-	"${FILESDIR}"/lxd-5.0.3-btrfs-quota-group-fix.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
-}

diff --git a/app-containers/lxd/lxd-5.19-r1.ebuild b/app-containers/lxd/lxd-5.19-r1.ebuild
deleted file mode 100644
index 43ca84883aa1..000000000000
--- a/app-containers/lxd/lxd-5.19-r1.ebuild
+++ /dev/null
@@ -1,187 +0,0 @@
-# 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/stable"
-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.16.4:=[lz4]
-	dev-libs/lzo
-	>=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:3
-	>=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"
-
-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."
-}


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2024-06-01  6:38 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-22  6:22 [gentoo-commits] repo/gentoo:master commit in: app-containers/lxd/, app-containers/lxd/files/ Joonas Niilola
  -- strict thread matches above, loose matches on Subject: below --
2022-02-20  6:37 Joonas Niilola
2022-04-14 11:51 Joonas Niilola
2022-12-08  9:55 Joonas Niilola
2023-01-09 12:51 Joonas Niilola
2023-01-19 15:10 Joonas Niilola
2023-01-31 10:35 Joonas Niilola
2023-03-03  7:15 Joonas Niilola
2023-09-10 13:23 Joonas Niilola
2023-10-19 16:06 Joonas Niilola
2023-12-08  6:50 Joonas Niilola
2024-02-03  8:17 Joonas Niilola
2024-02-13 12:58 Joonas Niilola
2024-06-01  6:38 Joonas Niilola

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox