Skip to content

[Bug]: would it be possible to somehow fix proot-distro to be compatible with building packages on-device? #683

Description

@robertkirkman

Problem description

using ./build-package.sh from https://github.com/termux/termux-packages/blob/master/build-package.sh inside termux usually fails with this error if any proot-distro containers are installed

uninstalling all of the proot-distro containers resolves this error, but it is inconvenient for some people, and I'm not completely sure what the best way to fix it is.

usually I just uninstall all proot-distros before building any packages inside Termux, but this is difficult and tedious for a lot of people.

Building dependency libc++ if necessary...
libc++@29 installed - skipping
Building dependency net-tools if necessary...
net-tools@2.10.0-1 installed - skipping
Downloading termux-tailscale@1.0.0 source from 'https://github.com/banyadm/termux-tailscale-package/archive/1.0.0.tar.gz' if necessary...
Downloading https://github.com/banyadm/termux-tailscale-package/archive/1.0.0.tar.gz
  % Total    % Received % Xferd  Average Speed  Time    Time    Time   Current
                                 Dload  Upload  Total   Spent   Left   Speed
  0      0   0      0   0      0      0      0                  0      0   0      0   0      0      0      0                  0      0   0      0   0      0      0      0                              0
  0      0   0      0   0      0      0      0                100   1897 100   1897   0      0   1867      0   00:01   00:01100   1897 100   1897   0      0   1867      0   00:01   00:01100   1897 100   1897   0      0   1866      0   00:01   00:01              0
tar: ./var/lib/proot-distro/containers/ubuntu/rootfs/data/data/com.termux/files/usr: Cannot open: Permission denied
tar: ./var/lib/proot-distro/containers/ubuntu/rootfs/data/data/com.termux/files/home: Cannot open: Permission denied
tar: ./var/lib/proot-distro/containers/ubuntu/rootfs/data/data/com.termux/cache: Cannot open: Permission denied
tar: ./var/lib/proot-distro/containers/ubuntu/rootfs/data/misc/apexdata/com.android.art/dalvik-cache: Cannot open: Permission denied
tar: ./var/lib/proot-distro/containers/ubuntu/rootfs/data/dalvik-cache: Cannot open: Permission denied
tar: ./var/lib/proot-distro/containers/ubuntu/rootfs/data/app: Cannot open: Permission denied
tar: ./var/lib/proot-distro/containers/ubuntu/rootfs/linkerconfig/com.android.art/ld.config.txt: Cannot open: Permission denied
tar: ./var/lib/proot-distro/containers/ubuntu/rootfs/linkerconfig/ld.config.txt: Cannot open: Permission denied
tar: ./var/lib/proot-distro/containers/ubuntu/rootfs/vendor: Cannot open: Permission denied
tar: ./var/lib/proot-distro/containers/ubuntu/rootfs/system_ext: Cannot open: Permission denied
tar: ./var/lib/proot-distro/containers/ubuntu/rootfs/system: Cannot open: Permission denied
tar: ./var/lib/proot-distro/containers/ubuntu/rootfs/product: Cannot open: Permission denied
tar: ./var/lib/proot-distro/containers/ubuntu/rootfs/odm: Cannot open: Permission denied
tar: ./var/lib/proot-distro/containers/ubuntu/rootfs/apex: Cannot open: Permission denied
tar: ./var/lib/proot-distro/containers/ubuntu/rootfs/storage/self/primary: Cannot open: Permission denied
tar: ./var/lib/proot-distro/containers/ubuntu/rootfs/storage/emulated/0: Cannot open: Permission denied
tar: ./var/lib/proot-distro/containers/ubuntu/rootfs/sdcard: Cannot open: Permission denied
tar: ./var/lib/proot-distro/containers/ubuntu/rootfs/dev: Cannot open: Permission denied
tar: ./var/lib/proot-distro/containers/arch/rootfs/run/systemd/dissect-root: Cannot open: Permission denied
tar: ./var/lib/proot-distro/containers/arch/rootfs/usr/lib/dbus-daemon-launch-helper: Cannot open: Permission denied
tar: ./var/lib/proot-distro/containers/arch/rootfs/data/app: Cannot open: Permission denied
tar: ./var/lib/proot-distro/containers/arch/rootfs/data/dalvik-cache: Cannot open: Permission denied
tar: ./var/lib/proot-distro/containers/arch/rootfs/data/misc/apexdata/com.android.art/dalvik-cache: Cannot open: Permission denied
tar: ./var/lib/proot-distro/containers/arch/rootfs/data/data/com.termux/cache: Cannot open: Permission denied
tar: ./var/lib/proot-distro/containers/arch/rootfs/data/data/com.termux/files/home: Cannot open: Permission denied
tar: Exiting with failure status due to previous errors

╭─ [Banyadm 󰀲 localhost] [~/termux-packages]  master
╰─❯

What steps will reproduce the bug?

pkg upgrade
pkg install proot-distro
proot-distro install debian
proot-distro login debian
exit
git clone https://github.com/termux/termux-packages
cd termux-packages
scripts/setup-termux.sh
./build-package.sh -I -f grep

What is the expected behavior?

Maybe termux-packages should exclude proot-distro during termux_step_copy_into_massagedir, but i'm not sure exactly how to do that safely or if there is any better way

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions