termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
13.11k stars 3.01k forks source link

Busybox missing mount umount and other binaries #3594

Closed agnostic-apollo closed 4 years ago

agnostic-apollo commented 5 years ago

Busybox is missing a lot of applets including mount and umount. The /packages/busybox/busybox.config has CONFIG_MOUNT unset, most likely thats why its not being compiled. Is there some specific reason mount and others are disabled or is it just to save space? The default android configs in busybox source also has them disabled. My system busybox v1.28.1-Stericson has them and kernel or lib compatibility shouldn't be an issue i think. The util-linux package is also missing mount and umount binaries. A lot of users need these binaries and it would be nice to have them inside termux rather than having to refer /system/bin or xbin binaries. Others could request other binaries too, there is another issue opened in root packages requesting mount,umount and chroot... The following applets are in my system busybox with only a size of 1.19MB, so space shouldn't be an issue.

BusyBox is copyrighted by many authors between 1998-2015.
Licensed under GPLv2. See source distribution for detailed
copyright notices.  

Currently defined functions:
    [, [[, acpid, addgroup, adduser, adjtimex, arch, arp, arping,
    ash, awk, base64, basename, beep, blkdiscard, blkid, blockdev,
    bootchartd, brctl, bunzip2, bzcat, bzip2, cal, cat, chat, chattr,
    chgrp, chmod, chown, chpasswd, chpst, chroot, chrt, chvt, cksum,
    clear, cmp, comm, conspy, cp, cpio, crond, crontab, cryptpw,
    cttyhack, cut, date, dc, dd, deallocvt, delgroup, deluser,
    depmod, devmem, df, dhcprelay, diff, dirname, dmesg, dnsd,
    dnsdomainname, dos2unix, dpkg, dpkg-deb, du, dumpkmap,
    dumpleases, echo, ed, egrep, eject, env, envdir, envuidgid,
    ether-wake, expand, expr, factor, fakeidentd, fallocate, false,
    fatattr, fbset, fbsplash, fdflush, fdformat, fdisk, fgconsole,
    fgrep, find, findfs, flock, fold, free, freeramdisk, fsck,
    fsck.minix, fsfreeze, fstrim, fsync, ftpd, ftpget, ftpput, fuser,
    getopt, getty, grep, groups, gunzip, gzip, halt, hd, hdparm,
    head, hexdump, hexedit, hostid, hostname, httpd, hush, hwclock,
    i2cdetect, i2cdump, i2cget, i2cset, id, ifconfig, ifdown,
    ifenslave, ifplugd, ifup, inetd, init, insmod, install, ionice,
    iostat, ip, ipaddr, ipcalc, ipcrm, ipcs, iplink, ipneigh,
    iproute, iprule, iptunnel, kbd_mode, kill, killall, killall5,
    klogd, last, less, link, linux32, linux64, linuxrc, ln, loadfont,
    loadkmap, logger, logname, logread, losetup, ls, lsattr, lsmod,
    lsof, lspci, lsscsi, lsusb, lzcat, lzma, lzop, makedevs, man,
    md5sum, mdev, mesg, microcom, mkdir, mkdosfs, mke2fs, mkfifo,
    mkfs.ext2, mkfs.minix, mkfs.vfat, mknod, mkpasswd, mkswap,
    mktemp, modinfo, modprobe, more, mount, mountpoint, mpstat, mt,
    mv, nameif, nanddump, nandwrite, nbd-client, nc, netstat, nice,
    nl, nmeter, nohup, nproc, nsenter, nslookup, ntpd, od, openvt,
    partprobe, passwd, paste, patch, pgrep, pidof, ping, ping6,
    pipe_progress, pivot_root, pkill, pmap, poweroff, powertop,
    printenv, printf, ps, pscan, pstree, pwd, pwdx, raidautorun,
    rdate, rdev, readahead, readlink, readprofile, realpath, reboot,
    renice, reset, resize, rev, rm, rmdir, rmmod, route, rpm,
    rpm2cpio, rtcwake, run-init, run-parts, runlevel, runsv,
    runsvdir, rx, script, scriptreplay, sed, sendmail, seq, setarch,
    setconsole, setfattr, setfont, setkeycodes, setlogcons, setpriv,
    setserial, setsid, setuidgid, sh, sha1sum, sha256sum, sha3sum,
    sha512sum, showkey, shred, shuf, slattach, sleep, smemcap,
    softlimit, sort, split, ssl_client, start-stop-daemon, stat,
    strings, stty, sum, sv, svc, svlogd, swapoff, swapon,
    switch_root, sysctl, syslogd, tac, tail, tar, taskset, tcpsvd,
    tee, telnet, telnetd, test, tftp, tftpd, time, timeout, top,
    touch, tr, traceroute, traceroute6, true, truncate, tty, ttysize,
    tunctl, ubiattach, ubidetach, ubimkvol, ubirename, ubirmvol,
    ubirsvol, ubiupdatevol, udhcpc, udhcpd, udpsvd, uevent, umount,
    uname, unexpand, uniq, unix2dos, unlink, unlzma, unshare, unxz,
    unzip, uptime, users, usleep, uudecode, uuencode, vconfig, vi,
    volname, w, wall, watch, watchdog, wc, wget, which, who, whoami,
    whois, xargs, xxd, xz, xzcat, yes, zcat, zcip

The applets in termux busybox

BusyBox is copyrighted by many authors between 1998-2015.
Licensed under GPLv2. See source distribution for detailed
copyright notices.  

Currently defined functions:
    ar, arp, awk, base64, basename, bbconfig, bunzip2, bzip2, cal,
    cat, chattr, chgrp, chmod, chown, chpst, chrt, cksum, clear, cmp,
    comm, cp, cpio, crond, crontab, cut, date, dc, dd, diff, dirname,
    dos2unix, du, echo, egrep, env, envdir, expand, expr, false,
    find, fold, free, fsync, ftpd, ftpget, ftpput, fuser, getopt,
    grep, gunzip, gzip, hd, head, hexdump, hostname, httpd, id,
    ifconfig, inotifyd, install, iostat, ipcalc, kill, killall, less,
    linux32, linux64, ln, ls, lsattr, lsof, lsusb, lzma, makemime,
    md5sum, mkdir, mkfifo, mknod, mktemp, more, mpstat, mv, nc,
    netstat, nice, nmeter, nohup, nproc, od, patch, pgrep, pidof,
    pipe_progress, pkill, pmap, popmaildir, printenv, printf, ps,
    pscan, pstree, pwd, pwdx, readlink, realpath, reformime, renice,
    reset, resize, rev, rm, rmdir, route, run-parts, runsv, runsvdir,
    rx, script, scriptreplay, sed, sendmail, seq, setsid, setuidgid,
    sha1sum, sha256sum, sha3sum, sha512sum, shuf, sleep, smemcap,
    softlimit, sort, split, start-stop-daemon, strings, stty, sum,
    sv, svlogd, sync, sysctl, tac, tail, tar, tcpsvd, tee, telnet,
    telnetd, test, tftp, tftpd, time, timeout, touch, tr, true, tty,
    ttysize, udpsvd, uname, uncompress, unexpand, uniq, unix2dos,
    unlink, unlzma, unxz, unzip, uptime, usleep, uudecode, uuencode,
    vi, watch, wc, wget, which, whoami, whois, xargs, xz, yes

Another unrelated request, gpg-zip should also be added to encrypt multiple files or directories but its a low priority request, alteast for me.

Thanks

ghost commented 5 years ago

My system busybox v1.28.1-Stericson has them and kernel or lib compatibility shouldn't be an issue i think.

Stericson's busybox highly patched and supposed to be used by custom/rooted ROMs.

It also compiled against glibc which provides all necessary functions for specific applets, here you are incorrect that enabling specific applets shouldn't cause issue.

Applets mount and umount should be okay, at least busybox compiles with them successfully for me. Some others have problems.

agnostic-apollo commented 5 years ago

oh ok i wasn't aware of that, i hadn't much looked into how stericson was doing it, his github readme didn't have any info, but i just checked and in an issue he mentions there are indeed issues with ndk compilation and uses uclibc instead. I guess i was wrong about issues not being raised. But if mount and umount are compiling then that's good, i can test them as well if you can send them. Other binaries can be tested too if they compile. Thanks for looking into this

agnostic-apollo commented 5 years ago

@xeffyr thanks for adding mount and umount to termux-tools package. Working fine till now.

Edit: lolz just noticed, mount and umount are just scripts calling /system/bin mount and umount...alas...

ghost commented 4 years ago

Fixed by https://github.com/termux/termux-packages/commit/fbd388f695eeacaf5c3895d8f91953ba218664b9.

agnostic-apollo commented 4 years ago

Thanks a lot.