[gentoo-commits] repo/proj/guru:master commit in: app-containers/waydroid/

2024-08-06 Thread Lucio Sauer
commit: c267d4087ebd2ed3c4b2986d5ae64e58abeceeab
Author: Denis Reva  gmail  com>
AuthorDate: Tue Aug  6 14:22:00 2024 +
Commit: Lucio Sauer  posteo  net>
CommitDate: Tue Aug  6 14:22:00 2024 +
URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=c267d408

app-containers/waydroid: Added more kernel checks

* CONFIG_NETFILTER_XT_TARGET_MASQUERADE
* CONFIG_NETFILTER_XT_NAT

Closes: https://bugs.gentoo.org/937106
Signed-off-by: Denis Reva  gmail.com>

 app-containers/waydroid/waydroid-1.4.2-r2.ebuild | 96 
 1 file changed, 96 insertions(+)

diff --git a/app-containers/waydroid/waydroid-1.4.2-r2.ebuild 
b/app-containers/waydroid/waydroid-1.4.2-r2.ebuild
new file mode 100644
index 0..89c34aaa8
--- /dev/null
+++ b/app-containers/waydroid/waydroid-1.4.2-r2.ebuild
@@ -0,0 +1,96 @@
+# 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="apparmor +clipboard systemd"
+
+DEPEND="|| ( virtual/linux-sources virtual/dist-kernel )"
+RDEPEND="
+   systemd? ( sys-apps/systemd )
+   app-containers/lxc[systemd?,apparmor?,seccomp]
+   $(python_gen_cond_dep '
+   clipboard? ( 
>=dev-python/pyclip-0.7.0[wayland,${PYTHON_USEDEP}] )
+   dev-python/pygobject[${PYTHON_USEDEP}]
+   >=dev-python/gbinder-1.1.1[${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
+   ~NETFILTER_XT_TARGET_MASQUERADE
+   ~NETFILTER_XT_NAT
+"
+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"
+ERROR_NETFILTER_XT_NAT="CONFIG_NETFILTER_XT_NAT: see bug #937106"
+ERROR_NETFILTER_XT_TARGET_MASQUERADE="CONFIG_NETFILTER_XT_TARGET_MASQUERADE: 
see bug #937106"
+
+
+pkg_setup() {
+   linux-info_pkg_setup
+   python-single-r1_pkg_setup
+}
+
+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
+}



[gentoo-commits] repo/proj/guru:master commit in: app-containers/waydroid-images/

2024-04-22 Thread David Roman
commit: 6a7ac2a3fb18324019b80c76b8a183e1049a4f03
Author: Esteve Varela Colominas  gmail  com>
AuthorDate: Mon Apr 22 12:01:02 2024 +
Commit: David Roman  gmail  com>
CommitDate: Mon Apr 22 12:03:16 2024 +
URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=6a7ac2a3

app-containers/waydroid-images: Add unzip as a BDEPEND

Signed-off-by: Esteve Varela Colominas  gmail.com>

 app-containers/waydroid-images/waydroid-images-.ebuild | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app-containers/waydroid-images/waydroid-images-.ebuild 
b/app-containers/waydroid-images/waydroid-images-.ebuild
index 62fa9c3f4a..b9f54c5ad7 100644
--- a/app-containers/waydroid-images/waydroid-images-.ebuild
+++ b/app-containers/waydroid-images/waydroid-images-.ebuild
@@ -31,6 +31,7 @@ REQUIRED_USE="
 "
 
 RDEPEND="app-containers/waydroid"
+BDEPEND="app-arch/unzip"
 
 if [[ ${PV} ==  ]]; then
BDEPEND+="



[gentoo-commits] repo/proj/guru:master commit in: app-containers/waydroid-images/

2024-03-23 Thread Julien Roy
commit: 727961fbdcfa8bf980d7d11b6db5f8c27cd5db69
Author: Esteve Varela Colominas  gmail  com>
AuthorDate: Fri Mar 22 22:24:09 2024 +
Commit: Julien Roy  jroy  ca>
CommitDate: Fri Mar 22 22:34:16 2024 +
URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=727961fb

app-containers/waydroid-images: new package, add 

Signed-off-by: Esteve Varela Colominas  gmail.com>

 app-containers/waydroid-images/metadata.xml|  18 ++
 .../waydroid-images/waydroid-images-.ebuild| 184 +
 2 files changed, 202 insertions(+)

diff --git a/app-containers/waydroid-images/metadata.xml 
b/app-containers/waydroid-images/metadata.xml
new file mode 100644
index 00..850f77c386
--- /dev/null
+++ b/app-containers/waydroid-images/metadata.xml
@@ -0,0 +1,18 @@
+
+https://www.gentoo.org/dtd/metadata.dtd";>
+
+  
+esteve.var...@gmail.com
+Esteve Varela Colominas
+  
+  
+Use the VANILLA variant of system.img
+Use the GAPPS variant of system.img
+Use the MAINLINE variant of vendor.img
+Use the HALIUM_11 variant of vendor.img
+  
+  
+waydroid/waydroid
+waydroid
+  
+

diff --git a/app-containers/waydroid-images/waydroid-images-.ebuild 
b/app-containers/waydroid-images/waydroid-images-.ebuild
new file mode 100644
index 00..62fa9c3f4a
--- /dev/null
+++ b/app-containers/waydroid-images/waydroid-images-.ebuild
@@ -0,0 +1,184 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..12} )
+
+inherit python-any-r1
+
+DESCRIPTION="Manage images for app-containers/waydroid using portage"
+HOMEPAGE="https://sourceforge.net/projects/waydroid/files/images";
+
+if [[ ${PV} ==  ]]; then
+   PROPERTIES="live"
+else
+   # Generate using:
+   # WAYDROID_GEN_SRC_URI=y ebuild waydroid-images-.ebuild clean unpack
+   #SRC_URI=""
+   KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+fi
+S="${WORKDIR}"
+
+# 
https://source.android.com/docs/setup/about/faqs#what-kind-of-open-source-project-is-android
+LICENSE="Apache-2.0"
+
+SLOT="0"
+IUSE="+system-vanilla system-gapps +vendor-mainline vendor-halium"
+REQUIRED_USE="
+   ^^ ( system-vanilla system-gapps )
+   ^^ ( vendor-mainline vendor-halium )
+"
+
+RDEPEND="app-containers/waydroid"
+
+if [[ ${PV} ==  ]]; then
+   BDEPEND+="
+   net-misc/wget
+   ${PYTHON_DEPS}
+   "
+fi
+
+waydroid_arch() {
+   case "${1:-${ARCH}}" in
+   amd64) echo "x86_64" ;;
+   arm) echo "arm" ;;
+   arm64) echo "arm64" ;;
+   x86) echo "x86" ;;
+   *) die "Unsupported architecture"
+   esac
+}
+
+waydroid_ota_info() {
+   local ota_url="${1}"
+   local ota_file="${2}"
+
+   [[ ${EVCS_OFFLINE} ]] || wget -q -O "${ota_file}" "${ota_url}" || die
+   [[ -f ${ota_file} ]] || die "OTA information unavailable: ${ota_file}"
+
+   cat "${ota_file}" | \
+   python3 -c 'import 
sys,json;j=json.load(sys.stdin)["response"][0];\
+   print(*(j[x] for x in 
["filename","id","url"]),sep="\0",end="")' || die
+}
+
+waydroid_ota_info_system() {
+   local system_channel="https://ota.waydro.id/system";
+   local rom_type="lineage"
+   local system_type="${1}"
+   local 
system_ota="${system_channel}/${rom_type}/waydroid_${MY_ARCH}/${system_type}.json"
+   local 
system_file="${WAYDROID_STORE_DIR}/system_${rom_type}_${system_type}_${MY_ARCH}.json"
+
+   waydroid_ota_info "${system_ota}" "${system_file}"
+}
+
+waydroid_ota_info_vendor() {
+   local vendor_channel="https://ota.waydro.id/vendor";
+   local vendor_type="${1}"
+   local 
vendor_ota="${vendor_channel}/waydroid_${MY_ARCH}/${vendor_type}.json"
+   local 
vendor_file="${WAYDROID_STORE_DIR}/vendor_${vendor_type}_${MY_ARCH}.json"
+
+   waydroid_ota_info "${vendor_ota}" "${vendor_file}"
+}
+
+waydroid_download_image() {
+   local dl_file="${1}"
+   local dl_filename="${2}"
+   local dl_hash="${3}"
+   local dl_url="${4}"
+
+   local newhash=""
+   if [[ -f ${dl_file} ]]; then
+   ebegin "${dl_filename} SHA256"
+   newhash="$(sha256sum "${dl_file}" 2>/dev/null | cut -f1 -d\ )"
+   if [[ ${newhash} == ${dl_hash} ]]; then
+   eend 0
+   return
+   fi
+   eend 1
+   fi
+
+   if [[ ! ${EVCS_OFFLINE} ]]; then
+   wget -O "${dl_file}" "${dl_url}" || die
+
+   ebegin "${dl_filename} SHA256"
+   newhash="$(sha256sum "${dl_file}" 2>/dev/null | cut -f1 -d\ )"
+   if [[ ${newhash} == ${dl_hash} ]]; then
+   eend 0
+   return
+   fi
+   eend 1
+   fi
+
+   [[ -f ${dl_file} ]] || die "File not available: ${dl_file}"
+   eerror "Expected:

[gentoo-commits] repo/proj/guru:master commit in: app-containers/waydroid/

2024-03-22 Thread Julien Roy
commit: ee88ffd54065b23603609c68d84a171440d99d43
Author: Esteve Varela Colominas  gmail  com>
AuthorDate: Fri Mar 22 18:53:15 2024 +
Commit: Julien Roy  jroy  ca>
CommitDate: Fri Mar 22 18:54:42 2024 +
URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=ee88ffd5

Revert "app-containers/waydroid: Require anbox-modules"

This reverts commit fc74f63151bcda8d58d32812b31f2ed639bf8f0b.

Signed-off-by: Esteve Varela Colominas  gmail.com>

 app-containers/waydroid/waydroid-1.4.2-r1.ebuild | 1 -
 1 file changed, 1 deletion(-)

diff --git a/app-containers/waydroid/waydroid-1.4.2-r1.ebuild 
b/app-containers/waydroid/waydroid-1.4.2-r1.ebuild
index 243c183326..fc6157ad25 100644
--- a/app-containers/waydroid/waydroid-1.4.2-r1.ebuild
+++ b/app-containers/waydroid/waydroid-1.4.2-r1.ebuild
@@ -19,7 +19,6 @@ IUSE="apparmor +clipboard systemd"
 DEPEND="|| ( virtual/linux-sources virtual/dist-kernel )"
 RDEPEND="
systemd? ( sys-apps/systemd )
-   app-containers/anbox-modules
app-containers/lxc[systemd?,apparmor?,seccomp]
$(python_gen_cond_dep '
clipboard? ( 
>=dev-python/pyclip-0.7.0[wayland,${PYTHON_USEDEP}] )



[gentoo-commits] repo/proj/guru:master commit in: app-containers/waydroid/

2024-03-21 Thread Julien Roy
commit: 9ea97854383a2ec8dcf8d976db1460b5e716b2df
Author: Esteve Varela Colominas  gmail  com>
AuthorDate: Thu Mar 21 21:10:13 2024 +
Commit: Julien Roy  jroy  ca>
CommitDate: Thu Mar 21 22:10:45 2024 +
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  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 00..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
+}



[gentoo-commits] repo/proj/guru:master commit in: app-containers/waydroid/

2024-03-21 Thread Julien Roy
commit: fc74f63151bcda8d58d32812b31f2ed639bf8f0b
Author: Esteve Varela Colominas  gmail  com>
AuthorDate: Thu Mar 21 22:05:10 2024 +
Commit: Julien Roy  jroy  ca>
CommitDate: Thu Mar 21 22:10:45 2024 +
URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=fc74f631

app-containers/waydroid: Require anbox-modules

This program cannot function without ashmem_linux

Signed-off-by: Esteve Varela Colominas  gmail.com>

 app-containers/waydroid/waydroid-1.4.2-r1.ebuild | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app-containers/waydroid/waydroid-1.4.2-r1.ebuild 
b/app-containers/waydroid/waydroid-1.4.2-r1.ebuild
index fc6157ad25..243c183326 100644
--- a/app-containers/waydroid/waydroid-1.4.2-r1.ebuild
+++ b/app-containers/waydroid/waydroid-1.4.2-r1.ebuild
@@ -19,6 +19,7 @@ IUSE="apparmor +clipboard systemd"
 DEPEND="|| ( virtual/linux-sources virtual/dist-kernel )"
 RDEPEND="
systemd? ( sys-apps/systemd )
+   app-containers/anbox-modules
app-containers/lxc[systemd?,apparmor?,seccomp]
$(python_gen_cond_dep '
clipboard? ( 
>=dev-python/pyclip-0.7.0[wayland,${PYTHON_USEDEP}] )



[gentoo-commits] repo/proj/guru:master commit in: app-containers/waydroid/

2024-03-21 Thread Julien Roy
commit: b559b1f8abaa5eaae342534cf9bb6cba0374ff62
Author: Esteve Varela Colominas  gmail  com>
AuthorDate: Thu Mar 21 21:14:19 2024 +
Commit: Julien Roy  jroy  ca>
CommitDate: Thu Mar 21 22:10:45 2024 +
URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=b559b1f8

app-containers/waydroid: Make dev-python/pyclip optional

Signed-off-by: Esteve Varela Colominas  gmail.com>

 app-containers/waydroid/metadata.xml | 3 +++
 app-containers/waydroid/waydroid-1.4.2-r1.ebuild | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/app-containers/waydroid/metadata.xml 
b/app-containers/waydroid/metadata.xml
index 306c7ad83a..5f133fca2b 100644
--- a/app-containers/waydroid/metadata.xml
+++ b/app-containers/waydroid/metadata.xml
@@ -13,6 +13,9 @@
 
The Android runtime environment ships with a minimal customized 
Android system image based on LineageOS. The image is currently based on 
Android 11.

+   
+   Enable clipboard manager service using 
dev-python/pyclip
+   

waydroid/waydroid


diff --git a/app-containers/waydroid/waydroid-1.4.2-r1.ebuild 
b/app-containers/waydroid/waydroid-1.4.2-r1.ebuild
index 3537a4add7..fc6157ad25 100644
--- a/app-containers/waydroid/waydroid-1.4.2-r1.ebuild
+++ b/app-containers/waydroid/waydroid-1.4.2-r1.ebuild
@@ -14,16 +14,16 @@ LICENSE="GPL-3"
 SLOT="0"
 KEYWORDS="~amd64 ~arm ~arm64 ~x86"
 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-IUSE="systemd apparmor"
+IUSE="apparmor +clipboard systemd"
 
 DEPEND="|| ( virtual/linux-sources virtual/dist-kernel )"
 RDEPEND="
systemd? ( sys-apps/systemd )
app-containers/lxc[systemd?,apparmor?,seccomp]
$(python_gen_cond_dep '
+   clipboard? ( 
>=dev-python/pyclip-0.7.0[wayland,${PYTHON_USEDEP}] )
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



[gentoo-commits] repo/proj/guru:master commit in: app-containers/waydroid/

2024-03-21 Thread Julien Roy
commit: 76976d30748507e71191dff7f4eb19ebc04a039d
Author: Esteve Varela Colominas  gmail  com>
AuthorDate: Thu Mar 21 18:28:46 2024 +
Commit: Julien Roy  jroy  ca>
CommitDate: Thu Mar 21 22:10:44 2024 +
URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=76976d30

app-containers/waydroid: Make important messages more visible

Signed-off-by: Esteve Varela Colominas  gmail.com>

 app-containers/waydroid/waydroid-1.4.0.ebuild | 20 
 app-containers/waydroid/waydroid-1.4.2.ebuild | 20 
 2 files changed, 24 insertions(+), 16 deletions(-)

diff --git a/app-containers/waydroid/waydroid-1.4.0.ebuild 
b/app-containers/waydroid/waydroid-1.4.0.ebuild
index a15188ca37..17e3547703 100644
--- a/app-containers/waydroid/waydroid-1.4.0.ebuild
+++ b/app-containers/waydroid/waydroid-1.4.0.ebuild
@@ -60,6 +60,18 @@ pkg_postinst() {
xdg_desktop_database_update
xdg_mimeinfo_database_update
 
+   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 "If you use app-containers/lxc without apparmor, make 
sure you deleted or commented out in waydroid LXC config"
ewarn "(generated after waydroid init) in 
/var/lib/waydroid/lxc/waydroid/config the following string:"
@@ -69,14 +81,6 @@ pkg_postinst() {
else
ewarn "Apparmor support has not been tested by package 
maintainer yet"
fi
-   ewarn "Make sure you have NFTABLES up and running in your kernel. See"
-   ewarn "https://wiki.gentoo.org/wiki/Nftables for how-to details"
-   einfo "After package installation run ether 'emerge --config 
app-containers/waydroid'"
-   einfo "or 'waydroid init' from root shell to install android container 
runtime"
-   einfo "To run waydroid, 1. Start container: 'rc-service waydroid start'"
-   einfo "2. start wayland channel (from user shell) 'waydroid session 
start'"
-   einfo "Contact https://docs.waydro.id/usage/install-on-desktops for 
how-to guides"
-   einfo "(does not cover Gentoo-specific things sadly)"
 }
 
 pkg_postrm() {

diff --git a/app-containers/waydroid/waydroid-1.4.2.ebuild 
b/app-containers/waydroid/waydroid-1.4.2.ebuild
index cf421efb8e..5d5b8a91f8 100644
--- a/app-containers/waydroid/waydroid-1.4.2.ebuild
+++ b/app-containers/waydroid/waydroid-1.4.2.ebuild
@@ -60,6 +60,18 @@ pkg_postinst() {
xdg_desktop_database_update
xdg_mimeinfo_database_update
 
+   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 "If you use app-containers/lxc without apparmor, make 
sure you deleted or commented out in waydroid LXC config"
ewarn "(generated after waydroid init) in 
/var/lib/waydroid/lxc/waydroid/config the following string:"
@@ -69,14 +81,6 @@ pkg_postinst() {
else
ewarn "Apparmor support has not been tested by package 
maintainer yet"
fi
-   ewarn "Make sure you have NFTABLES up and running in your kernel. See"
-   ewarn "https://wiki.gentoo.org/wiki/Nftables for how-to details"
-   einfo "After package installation run ether 'emerge --config 
app-containers/waydroid'"
-   einfo "or 'waydroid init' from root shell to install android container 
runtime"
-   einfo "To run waydroid, 1. Start container: 'rc-service waydroid start'"
-   einfo "2. start wayland channel (from user shell) 'waydroid session 
start'"
-   einfo "Contact https://docs.waydro.id/usage/install-on-desktops for 
how-to guides"
-   einfo "(does not cover Gentoo-specific things sadly)"
 }
 
 pkg_postrm() {



[gentoo-commits] repo/proj/guru:master commit in: app-containers/waydroid/

2024-03-21 Thread Julien Roy
commit: f235c2515d3f4305d97f39de4cc0794057f02546
Author: Esteve Varela Colominas  gmail  com>
AuthorDate: Thu Mar 21 18:22:56 2024 +
Commit: Julien Roy  jroy  ca>
CommitDate: Thu Mar 21 22:10:44 2024 +
URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=f235c251

app-containers/waydroid: Minor improvements

Use xdg.eclass instead of calling the functions individually, support
Gentoo Prefix by using EROOT.

Signed-off-by: Esteve Varela Colominas  gmail.com>

 app-containers/waydroid/waydroid-1.4.0.ebuild | 12 +++-
 app-containers/waydroid/waydroid-1.4.2.ebuild | 12 +++-
 2 files changed, 6 insertions(+), 18 deletions(-)

diff --git a/app-containers/waydroid/waydroid-1.4.0.ebuild 
b/app-containers/waydroid/waydroid-1.4.0.ebuild
index 17e3547703..64f69da5d3 100644
--- a/app-containers/waydroid/waydroid-1.4.0.ebuild
+++ b/app-containers/waydroid/waydroid-1.4.0.ebuild
@@ -4,7 +4,7 @@
 EAPI=8
 
 PYTHON_COMPAT=( python3_{10..11} )
-inherit linux-info xdg-utils python-single-r1
+inherit linux-info xdg python-single-r1
 
 DESCRIPTION="Container-based approach to boot a full Android system on Linux 
systems"
 HOMEPAGE="https://waydro.id";
@@ -57,8 +57,7 @@ src_install() {
 }
 
 pkg_postinst() {
-   xdg_desktop_database_update
-   xdg_mimeinfo_database_update
+   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"
@@ -83,11 +82,6 @@ pkg_postinst() {
fi
 }
 
-pkg_postrm() {
-   xdg_desktop_database_update
-   xdg_mimeinfo_database_update
-}
-
 pkg_config() {
-   "${ROOT}"/usr/bin/waydroid init
+   "${EROOT}"/usr/bin/waydroid init
 }

diff --git a/app-containers/waydroid/waydroid-1.4.2.ebuild 
b/app-containers/waydroid/waydroid-1.4.2.ebuild
index 5d5b8a91f8..10bd38daf4 100644
--- a/app-containers/waydroid/waydroid-1.4.2.ebuild
+++ b/app-containers/waydroid/waydroid-1.4.2.ebuild
@@ -4,7 +4,7 @@
 EAPI=8
 
 PYTHON_COMPAT=( python3_{10..12} )
-inherit linux-info xdg-utils python-single-r1
+inherit linux-info xdg python-single-r1
 
 DESCRIPTION="Container-based approach to boot a full Android system on Linux 
systems"
 HOMEPAGE="https://waydro.id";
@@ -57,8 +57,7 @@ src_install() {
 }
 
 pkg_postinst() {
-   xdg_desktop_database_update
-   xdg_mimeinfo_database_update
+   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"
@@ -83,11 +82,6 @@ pkg_postinst() {
fi
 }
 
-pkg_postrm() {
-   xdg_desktop_database_update
-   xdg_mimeinfo_database_update
-}
-
 pkg_config() {
-   "${ROOT}"/usr/bin/waydroid init
+   "${EROOT}"/usr/bin/waydroid init
 }



[gentoo-commits] repo/proj/guru:master commit in: app-containers/waydroid/

2024-03-21 Thread Julien Roy
commit: 5acfecdbcbf67e284a318fed880852d0aaaf4dc1
Author: Esteve Varela Colominas  gmail  com>
AuthorDate: Thu Mar 21 18:15:04 2024 +
Commit: Julien Roy  jroy  ca>
CommitDate: Thu Mar 21 22:10:44 2024 +
URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=5acfecdb

app-containers/waydroid: Minor style fixes

Signed-off-by: Esteve Varela Colominas  gmail.com>

 app-containers/waydroid/waydroid-1.4.0.ebuild | 4 ++--
 app-containers/waydroid/waydroid-1.4.2.ebuild | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/app-containers/waydroid/waydroid-1.4.0.ebuild 
b/app-containers/waydroid/waydroid-1.4.0.ebuild
index 25f3025a5d..a15188ca37 100644
--- a/app-containers/waydroid/waydroid-1.4.0.ebuild
+++ b/app-containers/waydroid/waydroid-1.4.0.ebuild
@@ -43,8 +43,8 @@ ERROR_ANDROID_BINDER_IPC="CONFIG_ANDROID_BINDER_IPC: need for 
creating Android-s
 ERROR_MEMFD_CREATE="CONFIG_MEMFD_CREATE: it completely replaced deprecated 
ISHMEM drivers,
therefore it's vital for android-specific memory management"
 
-src_compile(){
-   :;
+src_compile() {
+   :
 }
 
 src_install() {

diff --git a/app-containers/waydroid/waydroid-1.4.2.ebuild 
b/app-containers/waydroid/waydroid-1.4.2.ebuild
index 9a495dd85c..cf421efb8e 100644
--- a/app-containers/waydroid/waydroid-1.4.2.ebuild
+++ b/app-containers/waydroid/waydroid-1.4.2.ebuild
@@ -43,8 +43,8 @@ ERROR_ANDROID_BINDER_IPC="CONFIG_ANDROID_BINDER_IPC: need for 
creating Android-s
 ERROR_MEMFD_CREATE="CONFIG_MEMFD_CREATE: it completely replaced deprecated 
ISHMEM drivers,
therefore it's vital for android-specific memory management"
 
-src_compile(){
-   :;
+src_compile() {
+   :
 }
 
 src_install() {



[gentoo-commits] repo/proj/guru:master commit in: app-containers/waydroid/

2024-02-19 Thread Julien Roy
commit: 4d3ef84881cb7705770020ff2a2634fa318f6823
Author: Denis Reva  gmail  com>
AuthorDate: Mon Feb 19 14:02:45 2024 +
Commit: Julien Roy  jroy  ca>
CommitDate: Mon Feb 19 14:02:45 2024 +
URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=4d3ef848

app-containers/waydroid: added python3.12 support

Signed-off-by: Denis Reva  gmail.com>

 app-containers/waydroid/waydroid-1.4.2-r1.ebuild | 89 
 1 file changed, 89 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 00..9a495dd85c
--- /dev/null
+++ b/app-containers/waydroid/waydroid-1.4.2-r1.ebuild
@@ -0,0 +1,89 @@
+# 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-utils 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_compile(){
+   :;
+}
+
+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_desktop_database_update
+   xdg_mimeinfo_database_update
+
+   if ! use apparmor; then
+   ewarn "If you use app-containers/lxc without apparmor, make 
sure you deleted or commented out in waydroid LXC config"
+   ewarn "(generated after waydroid init) in 
/var/lib/waydroid/lxc/waydroid/config the following string:"
+   ewarn "lxc.apparmor.profile = unconfined"
+   ewarn "or waydroid experiences crash during launch"
+   ewarn "See also https://github.com/waydroid/waydroid/issues/652";
+   else
+   ewarn "Apparmor support has not been tested by package 
maintainer yet"
+   fi
+   ewarn "Make sure you have NFTABLES up and running in your kernel. See"
+   ewarn "https://wiki.gentoo.org/wiki/Nftables for how-to details"
+   einfo "After package installation run ether 'emerge --config 
app-containers/waydroid'"
+   einfo "or 'waydroid init' from root shell to install android container 
runtime"
+   einfo "To run waydroid, 1. Start container: 'rc-service waydroid start'"
+   einfo "2. start wayland channel (from user shell) 'waydroid session 
start'"
+   einfo "Contact https://docs.waydro.id/usage/install-on-desktops for 
how-to guides"
+   einfo "(does not cover Gentoo-specific things sadly)"
+}
+
+pkg_postrm() {
+   xdg_desktop_database_update
+   xdg_mimeinfo_database_update
+}
+
+pkg_config() {
+   "${ROOT}"/usr/bin/waydroid init
+}



[gentoo-commits] repo/proj/guru:master commit in: app-containers/waydroid/, app-containers/waydroid/files/

2022-12-29 Thread Florian Schmaus
commit: 8dad56e14f2339e25ca28be2268428d0228a7451
Author: Denis Reva  gmail  com>
AuthorDate: Wed Dec 28 10:22:57 2022 +
Commit: Florian Schmaus  gentoo  org>
CommitDate: Wed Dec 28 10:23:05 2022 +
URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=8dad56e1

app-containers/waydroid: added openrc daemon and emerge --config

Signed-off-by: Denis Reva  gmail.com>

 app-containers/waydroid/files/waydroid|  9 +
 ...droid-1.3.4-r5.ebuild => waydroid-1.3.4-r6.ebuild} | 19 ++-
 2 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/app-containers/waydroid/files/waydroid 
b/app-containers/waydroid/files/waydroid
new file mode 100755
index 0..82aba2c4e
--- /dev/null
+++ b/app-containers/waydroid/files/waydroid
@@ -0,0 +1,9 @@
+#!/sbin/openrc-run
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+description="Waydroid Container Manager"
+command="/usr/bin/waydroid"
+command_args="container start"
+command_background=true
+pidfile="/run/${RC_SVCNAME}.pid"

diff --git a/app-containers/waydroid/waydroid-1.3.4-r5.ebuild 
b/app-containers/waydroid/waydroid-1.3.4-r6.ebuild
similarity index 81%
rename from app-containers/waydroid/waydroid-1.3.4-r5.ebuild
rename to app-containers/waydroid/waydroid-1.3.4-r6.ebuild
index df767cedc..d38d51203 100644
--- a/app-containers/waydroid/waydroid-1.3.4-r5.ebuild
+++ b/app-containers/waydroid/waydroid-1.3.4-r6.ebuild
@@ -42,16 +42,25 @@ ERROR_ANDROID_BINDER_IPC="CONFIG_ANDROID_BINDER_IPC: need 
for creating Android-s
 ERROR_MEMFD_CREATE="CONFIG_MEMFD_CREATE: it completely replaced deprecated 
ISHMEM drivers,
therefore it's vital for android-specific memory management"
 
+
+src_compile(){
+   einfo "Nothing to compile"
+}
+
 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_desktop_database_update
xdg_mimeinfo_database_update
 
-   if not use apparmor; then
+   if ! use apparmor; then
ewarn "If you use app-containers/lxc without apparmor, make 
sure you deleted or commented out in waydroid LXC config"
ewarn "(generated after waydroid init) in 
/var/lib/waydroid/lxc/waydroid/config the following string:"
ewarn "lxc.apparmor.profile = unconfined"
@@ -62,6 +71,10 @@ pkg_postinst() {
fi
ewarn "Make sure you have NFTABLES up and running in your kernel. See"
ewarn "https://wiki.gentoo.org/wiki/Nftables for how-to details"
+   einfo "After package installation run ether 'emerge --config 
app-containers/waydroid'"
+   einfo "or 'waydroid init' from root shell to install android container 
runtime"
+   einfo "To run waydroid, 1. Start container: 'rc-service waydroid start'"
+   einfo "2. start wayland channel (from user shell) 'waydroid session 
start'"
einfo "Contact https://docs.waydro.id/usage/install-on-desktops for 
how-to guides"
einfo "(does not cover Gentoo-specific things sadly)"
 }
@@ -70,3 +83,7 @@ pkg_postrm() {
xdg_desktop_database_update
xdg_mimeinfo_database_update
 }
+
+pkg_config() {
+   "${ROOT}"/usr/bin/waydroid init
+}



[gentoo-commits] repo/proj/guru:master commit in: app-containers/waydroid/files/

2022-12-29 Thread Florian Schmaus
commit: acdf2c33adfeb34cd41fc941fe586e00952a81f2
Author: Denis Reva  gmail  com>
AuthorDate: Wed Dec 28 09:37:49 2022 +
Commit: Florian Schmaus  gentoo  org>
CommitDate: Wed Dec 28 10:23:05 2022 +
URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=acdf2c33

app-containers/waydroid: deleted accidently added file from index

Signed-off-by: Denis Reva  gmail.com>

 app-containers/waydroid/files/waydroid | 9 -
 1 file changed, 9 deletions(-)

diff --git a/app-containers/waydroid/files/waydroid 
b/app-containers/waydroid/files/waydroid
deleted file mode 100644
index d9e590592..0
--- a/app-containers/waydroid/files/waydroid
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/openrc-run
-description="Waydroid Container Manager"
-start() {
-  waydroid container start &
-}
-stop() {
-  waydroid container stop 
-  waydroid session stop
-}
\ No newline at end of file