Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replacing busybox-based utilities in bootstrap archives #4070

Closed
ghost opened this issue Jul 19, 2019 · 3 comments
Closed

Replacing busybox-based utilities in bootstrap archives #4070

ghost opened this issue Jul 19, 2019 · 3 comments
Labels
discussion enhancement information Informational post packaging Issue related to building packages, not affecting end users directly

Comments

@ghost
Copy link

ghost commented Jul 19, 2019

As we decided to change default package set, e.g. by replacing busybox applets by full versions of package, I did some work to see what we can do.

If we still want to keep busybox in bootstrap package set, I'm suggesting to replace only following basic utilities by their full version and removing corresponding applets from busybox:

  • coreutils
  • findutils
  • grep
  • procps
  • psmisc
  • sed
  • util-linux

Resulting size of bootstrap packages is less than 11 MB, which I think shouldn't cause issues users.

A preview of bootstrap archives with packages listed above:
bootstrap-aarch64.zip
bootstrap-arm.zip
bootstrap-i686.zip
bootstrap-x86_64.zip


Alternatively, we can go strightforward and completely remove busybox (at least from bootstrapping). In such case we need following packages:

  • bzip2
  • coreutils
  • ed
  • diffutils
  • dos2unix
  • findutils
  • gawk
  • grep
  • gzip
  • less
  • net-tools
  • patch
  • procps
  • psmisc
  • sed
  • tar
  • unzip
  • util-linux
  • xz-utils

Note that additional packages won't increase size too much - about 11-12.5 MB.

Complete bootstraps for preview (still include busybox !):
bootstrap-aarch64.zip
bootstrap-arm.zip
bootstrap-i686.zip
bootstrap-x86_64.zip

Also, to go without busybox in bootstrap archives we will need to fix dependencies and revert one commit from dpkg.

@ghost ghost added enhancement packaging Issue related to building packages, not affecting end users directly information Informational post discussion labels Jul 19, 2019
@ghost ghost self-assigned this Jul 19, 2019
@ghost
Copy link
Author

ghost commented Jul 21, 2019

Variant 2 is selected, but with small change: busybox will exist in bootstrap, but without symlinks.

ghost pushed a commit that referenced this issue Jul 21, 2019
ghost pushed a commit that referenced this issue Jul 21, 2019
ghost pushed a commit to termux/termux-packaging that referenced this issue Jul 21, 2019
ghost pushed a commit that referenced this issue Jul 21, 2019
@ghost
Copy link
Author

ghost commented Jul 21, 2019

Currently package upgrade causes following errors:

(Reading database ... 516 files and directories currently installed.)
Preparing to unpack .../busybox_1.30.1-4_aarch64.deb ...
Unpacking busybox (1.30.1-4) over (1.30.1-2) ...
dpkg: warning: 'diff' not found in PATH or not executable
dpkg: error: 1 expected program not found in PATH or not executable
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin
E: Sub-process /data/data/com.termux/files/usr/bin/dpkg returned an error code (2)

Since we can't make coreutils installed before busybox update due to conflict (both have /bin/env), some applets still will be left in busybox package.

@ghost ghost closed this as completed Jul 21, 2019
@ghost ghost locked as resolved and limited conversation to collaborators Jul 21, 2019
@ghost
Copy link
Author

ghost commented Jul 22, 2019

Added inetutils & moved clear/tset/reset from ncurses-utils to ncurses package. Slightely affected resulting bootstrap archives size:

13M	bootstrap-aarch64-v12.zip
13M	bootstrap-arm-v12.zip
13M	bootstrap-i686-v12.zip
14M	bootstrap-x86_64-v12.zip

Complete list of packages and their dependencies installed in bootstrap (for reference):

apt
bash
busybox
bzip2
ca-certificates
command-not-found
coreutils
curl
dash
diffutils
dos2unix
dpkg
ed
findutils
game-repo
gawk
gpgv
grep
gzip
inetutils
less
libandroid-glob
libandroid-support
libbz2
libc++
libcrypt
libcurl
libgcrypt
libgmp
libgpg-error
libiconv
liblzma
libmpfr
libnghttp2
ncurses
net-tools
openssl
patch
pcre
procps
psmisc
readline
science-repo
sed
tar
termux-am
termux-exec
termux-keyring
termux-licenses
termux-tools
unzip
util-linux
xz-utils
zlib

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
discussion enhancement information Informational post packaging Issue related to building packages, not affecting end users directly
Projects
None yet
Development

No branches or pull requests

0 participants