termux / proot-distro

An utility for managing installations of the Linux distributions in Termux.
GNU General Public License v3.0
1.8k stars 209 forks source link

[Distribution]: gentoo prefix #149

Closed zxq432 closed 3 years ago

zxq432 commented 3 years ago

Description

the gentoo prefix is for aarch64. and only use the config file will not work.

DISTRO_ARCH=aarch64
DISTRO_NAME="Gentoo-prefix /data/gentoo64"
TARBALL_STRIP_OPT="/data"
TARBALL_URL['aarch64']="https://mirror.tuna.tsinghua.edu.cn/gentoo/experimental/prefix/arm/prefix-stage3-arm64-latest.tar.xz"
TARBALL_SHA256['aarch64']="b93cd8da4fab5fa97dc23aeb19b583317f6c5cc55d5f3cb2ffaba4d52987176e"

using the config file as in etc/proot-distro, the proot-distro install will install it into the root / of the distro. but the distro use /data/gentoo64 as its root. and parameters for proot should use /data/gentoo64/usr/bin/env , and use "/data/gentoo64/bin/bash -l" instead of "/bin/su root" as there's no su command.

TARBALL_STRIP_OPT should be enhanced to suport string value of path like "/data", with the following logic:

[[ ${TARBALL_STRIP_OPT} == /* ]] && {
    [[ -d ${TARBALL_STRIP_OPT} ]] || mkdir -p ${TARBALL_STRIP_OPT}
    tar_cmd +="-C ${TARBALL_STRIP_OPT}"
}

Home page URL

https://wiki.gentoo.org/wiki/Project:Android/tarball

Root file system archive URL

http://distfiles.gentoo.org/experimental/prefix/arm/prefix-stage3-arm64-latest.tar.xz

ghost commented 3 years ago

I'm packaging only normal distributions and only one version per distribution. So wontfix.

zxq432 commented 3 years ago

but the normal distributions of gentoo does not work for the bug https://github.com/termux/proot/issues/182