Diff lxd-4.0.9-r4 with a lxd-5.0.2-r3

/usr/portage/app-containers/lxd/lxd-5.0.2-r3.ebuild 2023-10-09 14:52:28.224368318 +0300
1 1
# Copyright 1999-2023 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=7
4
EAPI=8
5 5

  
6 6
inherit bash-completion-r1 go-module linux-info optfeature systemd verify-sig
7 7

  
8
DESCRIPTION="Fast, dense and secure container management"
9
HOMEPAGE="https://linuxcontainers.org/lxd/introduction/ https://github.com/lxc/lxd"
8
DESCRIPTION="Modern, secure and powerful system container and virtual machine manager"
9
HOMEPAGE="https://ubuntu.com/lxd https://github.com/canonical/lxd"
10 10
SRC_URI="https://linuxcontainers.org/downloads/lxd/${P}.tar.gz
11 11
	verify-sig? ( https://linuxcontainers.org/downloads/lxd/${P}.tar.gz.asc )"
12 12

  
13
LICENSE="Apache-2.0"
13
LICENSE="Apache-2.0 BSD LGPL-3 MIT"
14 14
SLOT="0/lts"
15
KEYWORDS="~amd64 ~arm64 ~x86"
16
IUSE="apparmor ipv6 nls verify-sig"
15
KEYWORDS="amd64 ~arm64 ~x86"
16
IUSE="apparmor nls"
17 17

  
18 18
DEPEND="acct-group/lxd
19 19
	app-arch/xz-utils
20
	>=app-containers/lxc-3.0.0[apparmor?,seccomp(+)]
20
	>=app-containers/lxc-5.0.0:=[apparmor?,seccomp(+)]
21 21
	dev-db/sqlite:3
22
	dev-libs/dqlite
22
	>=dev-libs/dqlite-1.13.0:=
23 23
	dev-libs/lzo
24
	dev-libs/raft[lz4]
24
	>=dev-libs/raft-0.17.1:=[lz4]
25 25
	>=dev-util/xdelta-3.0[lzma(+)]
26
	net-dns/dnsmasq[dhcp,ipv6(+)?]
26
	net-dns/dnsmasq[dhcp]
27 27
	sys-libs/libcap
28 28
	virtual/udev"
29 29
RDEPEND="${DEPEND}
30 30
	net-firewall/ebtables
31
	net-firewall/iptables[ipv6(+)?]
32
	sys-apps/iproute2[ipv6(+)?]
31
	net-firewall/iptables
32
	sys-apps/iproute2
33 33
	sys-fs/fuse:*
34
	sys-fs/lxcfs
34
	>=sys-fs/lxcfs-5.0.0
35 35
	sys-fs/squashfs-tools[lzma]
36 36
	virtual/acl"
37 37
BDEPEND="dev-lang/go
......
69 69
	/usr/bin/lxc-to-lxd
70 70
	/usr/bin/lxd-agent
71 71
	/usr/bin/lxd-benchmark
72
	/usr/bin/lxd-p2c
72
	/usr/bin/lxd-migrate
73 73
	/usr/sbin/lxd"
74 74

  
75 75
VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/linuxcontainers.asc
......
80 80

  
81 81
GOPATH="${S}/_dist"
82 82

  
83
PATCHES=( "${FILESDIR}"/lxd-4.0.9-glibc-2.36-fix.patch )
83
PATCHES=( "${FILESDIR}"/lxd-5.0.2-remove-shellcheck-buildsystem-checks.patch
84
	"${FILESDIR}"/lxd-5.0.3-btrfs-quota-group-fix.patch )
84 85

  
85 86
src_prepare() {
86 87
	export GOPATH="${S}/_dist"
......
95 96
	# Fix hardcoded ovmf file path, see bug 763180
96 97
	sed -i \
97 98
		-e "s:/usr/share/OVMF:/usr/share/edk2-ovmf:g" \
98
		-e "s:OVMF_VARS.ms.fd:OVMF_VARS.secboot.fd:g" \
99
		-e "s:OVMF_VARS.ms.fd:OVMF_VARS.fd:g" \
99 100
		doc/environment.md \
100 101
		lxd/apparmor/instance.go \
101 102
		lxd/apparmor/instance_qemu.go \
......
130 131
	go install -v -x -tags libsqlite3 "${S}"/lxd || die "Failed to build the daemon"
131 132

  
132 133
	# Needs to be built statically
133
	CGO_ENABLED=0 go install -v -tags netgo "${S}"/lxd-p2c
134
	CGO_ENABLED=0 go install -v -tags netgo "${S}"/lxd-migrate
134 135
	CGO_ENABLED=0 go install -v -tags agent,netgo "${S}"/lxd-agent
135 136

  
136 137
	use nls && emake build-mo
......
146 147

  
147 148
	dosbin ${bindir}/lxd
148 149

  
149
	for l in fuidshift lxd-agent lxd-benchmark lxd-p2c lxc lxc-to-lxd; do
150
	for l in fuidshift lxd-agent lxd-benchmark lxd-migrate lxc lxc-to-lxd; do
150 151
		dobin ${bindir}/${l}
151 152
	done
152 153

  
153 154
	newbashcomp scripts/bash/lxd-client lxc
154 155

  
155 156
	newconfd "${FILESDIR}"/lxd-4.0.0.confd lxd
156
	newinitd "${FILESDIR}"/lxd-4.0.9.initd lxd
157
	newinitd "${FILESDIR}"/lxd-5.0.2-r1.initd lxd
157 158

  
158 159
	systemd_dounit "${T}"/lxd.service
159 160
	systemd_newunit "${FILESDIR}"/lxd-containers-4.0.0.service lxd-containers.service
160 161
	systemd_newunit "${FILESDIR}"/lxd-4.0.0.socket lxd.socket
161 162

  
162
	dodoc AUTHORS doc/*
163
	dodoc AUTHORS
164
	dodoc -r doc/*
163 165
	use nls && domo po/*.mo
164 166
}
165 167

  
......
174 176
	elog
175 177
	optfeature "virtual machine support" app-emulation/qemu[spice,usbredir,virtfs]
176 178
	optfeature "btrfs storage backend" sys-fs/btrfs-progs
179
	optfeature "ipv6 support" net-dns/dnsmasq[ipv6]
180
	optfeature "full lxd-migrate support"
177 181
	optfeature "lvm2 storage backend" sys-fs/lvm2
178 182
	optfeature "zfs storage backend" sys-fs/zfs
179 183
	elog
180 184
	elog "Be sure to add your local user to the lxd group."
185

  
186
	if [[ ${REPLACING_VERSIONS} ]] &&
187
	ver_test ${REPLACING_VERSIONS} -lt 5.0.1 &&
188
	has_version app-emulation/qemu[spice,usbredir,virtfs]; then
189
		ewarn ""
190
		ewarn "You're updating from <5.0.1. Due to incompatible API updates in the lxd-agent"
191
		ewarn "product, you'll have to restart any running virtual machines before they work"
192
		ewarn "properly."
193
		ewarn ""
194
		ewarn "Run: 'lxc restart your-vm' after the update for your vm's managed by lxd."
195
		ewarn ""
196
	fi
197

  
198
	if [[ ${REPLACING_VERSIONS} ]] &&
199
	has_version "sys-apps/openrc"; then
200
		elog ""
201
		elog "The new init.d script will attempt to mount "
202
		elog "  /sys/fs/cgroup/systemd"
203
		elog "by default, which is needed to run systemd containers with openrc host."
204
		elog "See the /etc/init.d/lxd file for requirements."
205
		elog ""
206
	fi
181 207
}
Thank you!