From: "Esteve Varela Colominas" <esteve.varela@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/guru:dev commit in: app-containers/waydroid/
Date: Thu, 21 Mar 2024 22:11:02 +0000 (UTC) [thread overview]
Message-ID: <1711059045.9ea97854383a2ec8dcf8d976db1460b5e716b2df.esteve.varela@gentoo> (raw)
commit: 9ea97854383a2ec8dcf8d976db1460b5e716b2df
Author: Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com>
AuthorDate: Thu Mar 21 21:10:13 2024 +0000
Commit: Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com>
CommitDate: Thu Mar 21 22:10:45 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=9ea97854
app-containers/waydroid: Add patch for -apparmor
Instead of having convoluted instructions, have the ebuild do this.
Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
app-containers/waydroid/waydroid-1.4.2-r1.ebuild | 86 ++++++++++++++++++++++++
1 file changed, 86 insertions(+)
diff --git a/app-containers/waydroid/waydroid-1.4.2-r1.ebuild b/app-containers/waydroid/waydroid-1.4.2-r1.ebuild
new file mode 100644
index 0000000000..3537a4add7
--- /dev/null
+++ b/app-containers/waydroid/waydroid-1.4.2-r1.ebuild
@@ -0,0 +1,86 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit linux-info xdg python-single-r1
+
+DESCRIPTION="Container-based approach to boot a full Android system on Linux systems"
+HOMEPAGE="https://waydro.id"
+SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+IUSE="systemd apparmor"
+
+DEPEND="|| ( virtual/linux-sources virtual/dist-kernel )"
+RDEPEND="
+ systemd? ( sys-apps/systemd )
+ app-containers/lxc[systemd?,apparmor?,seccomp]
+ $(python_gen_cond_dep '
+ dev-python/pygobject[${PYTHON_USEDEP}]
+ >=dev-python/gbinder-1.1.1[${PYTHON_USEDEP}]
+ >=dev-python/pyclip-0.7.0[wayland,${PYTHON_USEDEP}]
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ ')
+ net-firewall/nftables
+ net-dns/dnsmasq
+ >=dev-libs/libglibutil-1.0.67
+ >=dev-libs/gbinder-1.1.21
+ ${PYTHON_DEPS}
+"
+
+CONFIG_CHECK="
+ ~ANDROID_BINDER_IPC
+ ~ANDROID_BINDERFS
+ ~MEMFD_CREATE
+"
+ERROR_ANDROID_BINDERFS="CONFIG_ANDROID_BINDERFS: need for creating Android-specific binder IPC channels"
+ERROR_ANDROID_BINDER_IPC="CONFIG_ANDROID_BINDER_IPC: need for creating Android-specific binder IPC channels"
+ERROR_MEMFD_CREATE="CONFIG_MEMFD_CREATE: it completely replaced deprecated ISHMEM drivers,
+ therefore it's vital for android-specific memory management"
+
+src_prepare() {
+ if ! use apparmor; then
+ # https://github.com/waydroid/waydroid/issues/652
+ sed -e '/^lxc\.apparmor\.profile =/d' \
+ -i data/configs/config_3 || die
+ fi
+ default
+}
+
+src_install() {
+ python_fix_shebang waydroid.py
+ emake install DESTDIR="${D}" USE_NFTABLES=1 USE_SYSTEMD=$(usex systemd 1 0)
+ if ! use systemd; then
+ elog "Installing waydroid OpenRC daemon"
+ doinitd "${FILESDIR}"/waydroid
+ fi
+}
+
+pkg_postinst() {
+ xdg_pkg_postinst
+
+ elog "After package installation run either 'emerge --config app-containers/waydroid'"
+ elog "or 'waydroid init' from root shell to install android container runtime"
+ elog "To run waydroid, 1. Start container: 'rc-service waydroid start'"
+ elog "2. start wayland channel (from user shell) 'waydroid session start'"
+ elog "Contact https://docs.waydro.id/usage/install-on-desktops for how-to guides"
+ elog "(does not cover Gentoo-specific things sadly)"
+ elog
+
+ ewarn "Make sure you have NFTABLES up and running in your kernel. See"
+ ewarn "https://wiki.gentoo.org/wiki/Nftables for how-to details"
+ ewarn
+
+ if use apparmor; then
+ ewarn "Apparmor support has not been tested by package maintainer yet"
+ fi
+}
+
+pkg_config() {
+ "${EROOT}"/usr/bin/waydroid init
+}
next reply other threads:[~2024-03-21 22:11 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-21 22:11 Esteve Varela Colominas [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-08-06 14:22 [gentoo-commits] repo/proj/guru:dev commit in: app-containers/waydroid/ Denis Reva
2024-07-20 9:27 Takuya Wakazono
2024-05-15 17:00 [gentoo-commits] repo/proj/guru:master " Julien Roy
2024-05-15 16:55 ` [gentoo-commits] repo/proj/guru:dev " Julien Roy
2024-03-22 18:55 Esteve Varela Colominas
2024-03-21 22:11 Esteve Varela Colominas
2024-03-21 22:11 Esteve Varela Colominas
2024-03-21 22:11 Esteve Varela Colominas
2024-03-21 22:11 Esteve Varela Colominas
2024-03-21 22:11 Esteve Varela Colominas
2024-02-19 22:00 [gentoo-commits] repo/proj/guru:master " Julien Roy
2024-02-19 21:47 ` [gentoo-commits] repo/proj/guru:dev " Julien Roy
2024-02-19 21:47 Julien Roy
2024-02-19 14:03 Denis Reva
2024-02-18 19:53 Julien Roy
2024-02-18 19:53 Julien Roy
2023-10-30 11:30 David Roman
2023-02-18 7:16 Denis Reva
2022-12-29 11:33 [gentoo-commits] repo/proj/guru:master " Florian Schmaus
2022-12-29 11:33 ` [gentoo-commits] repo/proj/guru:dev " Florian Schmaus
2022-12-29 11:33 Florian Schmaus
2022-12-29 11:28 Florian Schmaus
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=1711059045.9ea97854383a2ec8dcf8d976db1460b5e716b2df.esteve.varela@gentoo \
--to=esteve.varela@gmail.com \
--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