From dbb9d0947606943d4d8fbfe8ba03a8da3f477f10 Mon Sep 17 00:00:00 2001 From: Fernando Ayats Date: Mon, 22 Nov 2021 16:18:55 +0100 Subject: [PATCH 1/2] app-emulation/anbox: anbox-session-manager as user service instead of system --- app-emulation/anbox/anbox-0_pre20201129.ebuild | 3 ++- app-emulation/anbox/anbox-0_pre20210320.ebuild | 3 ++- app-emulation/anbox/anbox-9999.ebuild | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app-emulation/anbox/anbox-0_pre20201129.ebuild b/app-emulation/anbox/anbox-0_pre20201129.ebuild index fe81677..d742b59 100644 --- a/app-emulation/anbox/anbox-0_pre20201129.ebuild +++ b/app-emulation/anbox/anbox-0_pre20201129.ebuild @@ -95,7 +95,8 @@ src_install() { cmake_src_install newbin "${FILESDIR}"/anbox-launch.sh anbox-launch if use systemd; then - systemd_dounit "${FILESDIR}"/anbox-{{container,session}-manager.service,bridge.net{dev,work}} + systemd_dounit "${FILESDIR}"/anbox-{container-manager.service,bridge.net{dev,work}} + systemd_douserunit "${FILESDIR}"/anbox-session-manager.service else exeinto /usr/share/anbox doexe "scripts/anbox-bridge.sh" diff --git a/app-emulation/anbox/anbox-0_pre20210320.ebuild b/app-emulation/anbox/anbox-0_pre20210320.ebuild index 99b81cb..d5ac360 100644 --- a/app-emulation/anbox/anbox-0_pre20210320.ebuild +++ b/app-emulation/anbox/anbox-0_pre20210320.ebuild @@ -97,7 +97,8 @@ src_install() { cmake_src_install newbin "${FILESDIR}"/anbox-launch.sh anbox-launch if use systemd; then - systemd_dounit "${FILESDIR}"/anbox-{{container,session}-manager.service,bridge.net{dev,work}} + systemd_dounit "${FILESDIR}"/anbox-{container-manager.service,bridge.net{dev,work}} + systemd_douserunit "${FILESDIR}"/anbox-session-manager.service else exeinto /usr/share/anbox doexe "scripts/anbox-bridge.sh" diff --git a/app-emulation/anbox/anbox-9999.ebuild b/app-emulation/anbox/anbox-9999.ebuild index 99b81cb..d5ac360 100644 --- a/app-emulation/anbox/anbox-9999.ebuild +++ b/app-emulation/anbox/anbox-9999.ebuild @@ -97,7 +97,8 @@ src_install() { cmake_src_install newbin "${FILESDIR}"/anbox-launch.sh anbox-launch if use systemd; then - systemd_dounit "${FILESDIR}"/anbox-{{container,session}-manager.service,bridge.net{dev,work}} + systemd_dounit "${FILESDIR}"/anbox-{container-manager.service,bridge.net{dev,work}} + systemd_douserunit "${FILESDIR}"/anbox-session-manager.service else exeinto /usr/share/anbox doexe "scripts/anbox-bridge.sh" From 72348ae77aeed7a92d52d92fe545319763ab45a2 Mon Sep 17 00:00:00 2001 From: Fernando Ayats Date: Mon, 22 Nov 2021 16:31:04 +0100 Subject: [PATCH 2/2] app-emulation/anbox: lxc patch to use correct config_item's --- app-emulation/anbox/anbox-0_pre20201129.ebuild | 2 +- app-emulation/anbox/anbox-0_pre20210320.ebuild | 2 +- app-emulation/anbox/anbox-9999.ebuild | 2 +- app-emulation/anbox/files/lxc.patch | 16 ++++++++++++++++ 4 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 app-emulation/anbox/files/lxc.patch diff --git a/app-emulation/anbox/anbox-0_pre20201129.ebuild b/app-emulation/anbox/anbox-0_pre20201129.ebuild index d742b59..b48cc32 100644 --- a/app-emulation/anbox/anbox-0_pre20201129.ebuild +++ b/app-emulation/anbox/anbox-0_pre20201129.ebuild @@ -60,7 +60,7 @@ CONFIG_CHECK=" ~TMPFS_XATTR " -PATCHES=( ""${FILESDIR}"/no_bundled_sdbus.patch" ) +PATCHES=( ""${FILESDIR}"/no_bundled_sdbus.patch" ""${FILESDIR}"/lxc.patch" ) pkg_pretend() { if use !systemd; then diff --git a/app-emulation/anbox/anbox-0_pre20210320.ebuild b/app-emulation/anbox/anbox-0_pre20210320.ebuild index d5ac360..0323f33 100644 --- a/app-emulation/anbox/anbox-0_pre20210320.ebuild +++ b/app-emulation/anbox/anbox-0_pre20210320.ebuild @@ -60,7 +60,7 @@ CONFIG_CHECK=" ~TMPFS_XATTR " -PATCHES=( ""${FILESDIR}"/no_bundled_sdbus-r1.patch" ) +PATCHES=( ""${FILESDIR}"/no_bundled_sdbus-r1.patch" ""${FILESDIR}"/lxc.patch" ) pkg_pretend() { if use !systemd; then diff --git a/app-emulation/anbox/anbox-9999.ebuild b/app-emulation/anbox/anbox-9999.ebuild index d5ac360..0323f33 100644 --- a/app-emulation/anbox/anbox-9999.ebuild +++ b/app-emulation/anbox/anbox-9999.ebuild @@ -60,7 +60,7 @@ CONFIG_CHECK=" ~TMPFS_XATTR " -PATCHES=( ""${FILESDIR}"/no_bundled_sdbus-r1.patch" ) +PATCHES=( ""${FILESDIR}"/no_bundled_sdbus-r1.patch" ""${FILESDIR}"/lxc.patch" ) pkg_pretend() { if use !systemd; then diff --git a/app-emulation/anbox/files/lxc.patch b/app-emulation/anbox/files/lxc.patch new file mode 100644 index 0000000..553a987 --- /dev/null +++ b/app-emulation/anbox/files/lxc.patch @@ -0,0 +1,16 @@ +https://github.com/anbox/anbox/pull/1827 +--- a/src/anbox/container/lxc_container.cpp ++++ b/src/anbox/container/lxc_container.cpp +@@ -343,8 +343,10 @@ void LxcContainer::start(const Configuration &configuration) { + set_config_item(lxc_config_tty_max_key, "0"); + set_config_item(lxc_config_uts_name_key, "anbox"); + +- set_config_item("lxc.group.devices.deny", ""); +- set_config_item("lxc.group.devices.allow", ""); ++ set_config_item("lxc.cgroup.devices.deny", ""); ++ set_config_item("lxc.cgroup.devices.allow", ""); ++ set_config_item("lxc.cgroup2.devices.deny", ""); ++ set_config_item("lxc.cgroup2.devices.allow", ""); + + // We can't move bind-mounts, so don't use /dev/lxc/ + set_config_item(lxc_config_tty_dir_key, "");