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

bump(main/bionic-host),addpkg(main/{boringssl,iputils,mksh,toybox}-host): 9.0.0-r76 #22906

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

robertkirkman
Copy link
Contributor

@robertkirkman robertkirkman commented Jan 12, 2025

PoC dependencies that would hypothetically be very helpful and idiomatic for:

  • deblobbify, replacing the system folder with several other components termux-docker#72

  • bumping is required because the /system/lib/libc.so file of AOSP 8.0.0 is bugged and freezes when run inside Docker on 32-bit devices, but the same file in AOSP 9.0.0 is unaffected

  • mksh provides /system/bin/sh for termux-docker

  • iputils provides /system/bin/ping for termux-docker which is a dependency of $PREFIX/bin/ping

  • toybox provides /system/bin/su which is used as a crucial component of termux-docker to switch to the system user during its entrypoint.sh

  • boringssl is a dependency of iputils and toybox

@robertkirkman robertkirkman changed the title addpkg(main/{dnsmasq,iputils,mksh,toybox}-host): 8.0.0-r51 bump(main/bionic-host),addpkg(main/{boringssl,iputils,mksh,toybox}-host): 9.0.0-r76 Jan 21, 2025
@robertkirkman robertkirkman force-pushed the bionic-host-deblobbify-termux-docker branch from daeb42b to d380f68 Compare January 21, 2025 01:24
@robertkirkman robertkirkman marked this pull request as ready for review January 21, 2025 12:42
Copy link
Member

@Grimler91 Grimler91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, nice work!

Does any of the subpackages need to:

TERMUX_SUBPKG_BREAKS="bionic-host (<< 9.0.0-r76)"
TERMUX_SUBPKG_REPLACES="bionic-host (<< 9.0.0-r76)"

or are all of the subpackage files freshly added in this version?

If for example $PREFIX/opt/bionic-host/lib/libcrypto.so was part of bionic-host 8.0.0-r51 then we would get a file conflict when trying to install the subpackage without BREAKS and REPLACES.

tar xf "${TERMUX_PKG_CACHEDIR}/python2.tar.xz" --strip-components=1 -C "${PYTHON2_WORKDIR}"
pushd "${PYTHON2_WORKDIR}"
./configure --prefix="${TERMUX_PKG_SRCDIR}/prefix/usr"
make install
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move this to a termux_step_host_build step.

${TERMUX_PKG_SRCDIR}/prefix/usr is not added to path, so python2 and pip2 further down are probably not using the compiled {python,pip}2?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move this to a termux_step_host_build step.

Ok, yes I will try to move that code, thank you for the feedback!

${TERMUX_PKG_SRCDIR}/prefix/usr is not added to path, so python2 and pip2 further down are probably not using the compiled {python,pip}2?

If you look closely, ${TERMUX_PKG_SRCDIR}/prefix/usr/bin actually is already in $PATH at that point due to preexisting code written by someone else for a different section of the package:

export PATH="${TERMUX_PKG_SRCDIR}/prefix/usr/bin:${PATH//$HOME\/.cargo\/bin/}"

However, I completely understand how it's confusing and hard to notice that happening, so I will try to make sure this is redundantly specified, to make it as clear as possible what is happening.

Additionally, because the prebuilt version of Python 2 used by the 8.0.0 version of this package was not working successfully when I bumped the package to 9.0.0, to prevent the error I saw from happening anymore, I removed the original instance of Python 2 from the default.xml, making this recompiled Python 2 the only one present in the whole environment.

@robertkirkman robertkirkman marked this pull request as draft January 21, 2025 13:46
@robertkirkman
Copy link
Contributor Author

robertkirkman commented Jan 21, 2025

are all of the subpackage files freshly added in this version?

  • Yes, all of the subpackage files do not exist in the previous version
  • libcrypto.so is added to a subpackage because it is not used by anything that is in the main package, it is only a dependency of some of the subpackages, so it seemed appropriate to do that
  • On the other hand, there are some other freshly added files that appeared that I did not add to subpackages because they seemed to become dependencies of one of the components that was explicitly included within the original bionic-host package for some other purpose, crash_dump64. Here is one of the dependency chains I noticed between the newer crash_dump64 and some of the newly added files, that did not seem to happen in the 8.0.0 version:
    • /system/bin/crash_dump64 is dynamically linked to /system/lib64/libunwindstack.so
    • /system/lib64/libunwindstack.so is dynamically linked to /system/lib64/libdexfile.so
    • /system/lib64/libdexfile.so is dynamically linked to /system/lib64/libz.so

If the crash_dump64 created by make crash_dump is still wanted or needed and isn't meant to be in a subpackage, then these additional libraries probably belong with it in the main package, but if the original user of crash_dump64 thinks it's a good idea for it to be a subpackage instead, then maybe it and those other libraries should be in subpackages as well.

@robertkirkman robertkirkman force-pushed the bionic-host-deblobbify-termux-docker branch from d380f68 to 29bc357 Compare January 21, 2025 15:18
@robertkirkman robertkirkman marked this pull request as ready for review January 21, 2025 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants