From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 48F78158089 for ; Fri, 13 Oct 2023 17:22:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5677B2BC015; Fri, 13 Oct 2023 17:22:46 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 39A462BC015 for ; Fri, 13 Oct 2023 17:22:46 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 232C6335C31 for ; Fri, 13 Oct 2023 17:22:45 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 918581186 for ; Fri, 13 Oct 2023 17:22:43 +0000 (UTC) From: "Joonas Niilola" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Joonas Niilola" Message-ID: <1697217705.6e8a4af158691ab67b3172844b382893a206ce07.juippis@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-containers/incus/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-containers/incus/incus-0.1.ebuild X-VCS-Directories: app-containers/incus/ X-VCS-Committer: juippis X-VCS-Committer-Name: Joonas Niilola X-VCS-Revision: 6e8a4af158691ab67b3172844b382893a206ce07 X-VCS-Branch: master Date: Fri, 13 Oct 2023 17:22:43 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: aaf41458-f16f-47d3-a274-660f9100b7dc X-Archives-Hash: 804267d7bc140dd976254cab4464648f commit: 6e8a4af158691ab67b3172844b382893a206ce07 Author: Joonas Niilola gentoo org> AuthorDate: Fri Oct 13 17:21:45 2023 +0000 Commit: Joonas Niilola gentoo 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 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