public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Joonas Niilola" <juippis@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-containers/incus/
Date: Fri, 13 Oct 2023 17:22:43 +0000 (UTC)	[thread overview]
Message-ID: <1697217705.6e8a4af158691ab67b3172844b382893a206ce07.juippis@gentoo> (raw)

commit:     6e8a4af158691ab67b3172844b382893a206ce07
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 13 17:21:45 2023 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Fri Oct 13 17:21:45 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e8a4af1

app-containers/incus: add/fix apparmor & qemu support

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

 app-containers/incus/incus-0.1.ebuild | 27 ++++++++++++++++++++++++---
 1 file changed, 24 insertions(+), 3 deletions(-)

diff --git a/app-containers/incus/incus-0.1.ebuild b/app-containers/incus/incus-0.1.ebuild
index 440af29096a6..5a73572d6bc5 100644
--- a/app-containers/incus/incus-0.1.ebuild
+++ b/app-containers/incus/incus-0.1.ebuild
@@ -13,12 +13,12 @@ SRC_URI="https://linuxcontainers.org/downloads/incus/${P}.tar.gz
 LICENSE="Apache-2.0 BSD LGPL-3 MIT"
 SLOT="0"
 KEYWORDS="~amd64"
-IUSE="nls"
+IUSE="apparmor nls"
 
 # incus conflicts with lxd due to fuidshift binary. Even if you replace the package, containers will remain.
 DEPEND="acct-group/incus
 	app-arch/xz-utils
-	>=app-containers/lxc-5.0.0:=[seccomp(+)]
+	>=app-containers/lxc-5.0.0:=[apparmor?,seccomp(+)]
 	dev-db/sqlite:3
 	dev-libs/cowsql
 	dev-libs/lzo
@@ -92,6 +92,27 @@ src_prepare() {
 		-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 \
+		internal/server/apparmor/instance.go \
+		internal/server/apparmor/instance_qemu.go \
+		internal/server/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" \
+		internal/server/device/device_utils_disk.go || die "Failed to fix virtfs-proxy-helper path."
+
+	cp "${FILESDIR}"/incus-0.1.service "${T}"/incus.service || die
+	if use apparmor; then
+		sed -i \
+			'/^EnvironmentFile=.*/a ExecStartPre=\/usr\/libexec\/lxc\/lxc-apparmor-load' \
+			"${T}"/incus.service || die
+	fi
+
 	# Disable -Werror's from go modules.
 	find "${S}" -name "cgo.go" -exec sed -i "s/ -Werror / /g" {} + || die
 }
@@ -135,7 +156,7 @@ src_install() {
 	newconfd "${FILESDIR}"/incus-0.1.confd incus
 	newinitd "${FILESDIR}"/incus-0.1.initd incus
 
-	systemd_newunit "${FILESDIR}"/incus-0.1.service incus.service
+	systemd_dounit "${T}"/incus.service
 	systemd_newunit "${FILESDIR}"/incus-containers-0.1.service incus-containers.service
 	systemd_newunit "${FILESDIR}"/incus-0.1.socket incus.socket
 


             reply	other threads:[~2023-10-13 17:22 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-13 17:22 Joonas Niilola [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-10-14 11:12 [gentoo-commits] repo/gentoo:master commit in: app-containers/incus/ Joonas Niilola
2023-10-14 19:28 Joonas Niilola
2023-10-19 16:06 Joonas Niilola
2023-10-29  9:05 Joonas Niilola
2023-11-01 13:17 Joonas Niilola
2023-11-27  7:18 Joonas Niilola
2023-12-27 17:21 Joonas Niilola
2024-01-04  7:03 Joonas Niilola
2024-01-06  9:32 Joonas Niilola
2024-01-07  9:05 Sam James
2024-01-29  7:43 Joonas Niilola
2024-02-13  6:28 Joonas Niilola
2024-02-23  7:50 Joonas Niilola
2024-03-26  6:38 Joonas Niilola
2024-03-26  8:28 Joonas Niilola
2024-04-05  7:57 Joonas Niilola
2024-04-22 17:02 Joonas Niilola
2024-04-22 17:02 Joonas Niilola
2024-04-22 17:02 Joonas Niilola
2024-04-23 10:43 Joonas Niilola
2024-05-05  6:28 Joonas Niilola
2024-05-08  7:13 Joonas Niilola
2024-06-01  6:38 Joonas Niilola
2024-06-08  6:39 Joonas Niilola
2024-06-29  6:22 Joonas Niilola
2024-07-12  8:58 Joonas Niilola
2024-07-12  8:58 Joonas Niilola
2024-08-01  4:53 Joonas Niilola
2024-08-03  7:18 Joonas Niilola
2024-08-10  6:08 Joonas Niilola
2024-08-27  7:00 Joonas Niilola
2024-09-09 15:15 Joonas Niilola
2024-09-10 16:14 Joonas Niilola
2024-09-10 16:14 Joonas Niilola
2024-09-18  7:29 Joonas Niilola
2024-09-28 12:46 Joonas Niilola
2024-10-04 12:57 Joonas Niilola
2024-10-10 16:33 James Le Cuirot
2024-10-20  6:27 Joonas Niilola
2024-10-25 11:09 Joonas Niilola
2024-10-27 12:43 Maciej Barć
2024-11-17  7:10 Joonas Niilola
2024-12-14  7:13 Joonas Niilola
2024-12-15  7:23 Joonas Niilola
2024-12-15  7:23 Joonas Niilola
2024-12-21 16:19 Joonas Niilola
2025-01-26  7:33 Joonas Niilola
2025-02-08  8:00 Joonas Niilola
2025-02-21 14:31 Joonas Niilola
2025-02-28  8:41 Joonas Niilola
2025-03-03  7:37 Joonas Niilola
2025-03-03  7:37 Joonas Niilola

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1697217705.6e8a4af158691ab67b3172844b382893a206ce07.juippis@gentoo \
    --to=juippis@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox