termux-packages icon indicating copy to clipboard operation
termux-packages copied to clipboard

build-bootstraps: bump to 0.2.0

Open truboxl opened this issue 3 years ago • 8 comments

Supersedes #9382

No longer includes no-Neon build option (will reintroduce later) Add optional build-extra-first option Fix building bootstraps by only including packages for that specific arch and "all" variant

truboxl avatar Apr 23 '22 16:04 truboxl

CC @agnostic-apollo for review

truboxl avatar Apr 23 '22 16:04 truboxl

Thanks for the important fix in 7c5578c. I think before this, the bootstrap archives generated must not be valid since only the first alphabetically sorted arch would get included for all debs as per for loop *.deb expansion and $TERMUX_ARCHITECTURES order, unless a force build was done. This is my fault, I should have tested multiple archs. However, I think a better way would be only loop on correct arch to prevent needless echos.

while IFS= read -r -d '' deb; do
    # code here
done < <(find . -type f \( -name "*_$package_arch.deb" -o -name "*_all.deb" \) -print0 | sort -nz)

But thinking more on it, there are still two issues. Firstly, if the output directory already had debs that weren't supposed to be part of the default packages, they would also get included. Secondly, if the multiple versions of the same package existed, only one would get extracted, which may not even be the required one.

One way would be to check if deb package exists in $PACKAGES array and its version matches the version defined by $TERMUX_PKG_VERSION and $TERMUX_PKG_REVISION in build.sh for the package by using scripts/build/termux_extract_dep_info.sh. But $PACKAGES array won't have dependencies. I think best way is to just always nuke $TERMUX_BUILT_DEBS_DIRECTORY output directory at start of for loop for each architecture instead of just for force builds.

Otherwise pull request looks good. Thanks again!

cc: @simbadMarino

agnostic-apollo avatar Apr 25 '22 04:04 agnostic-apollo

Luckly I've always used the forced way @agnostic-apollo hehe. Thanks @truboxl for the update! It might save a few MB in the future and of course ease the build process =).

simbadMarino avatar Apr 25 '22 12:04 simbadMarino

Luckly I've always used the forced way @agnostic-apollo hehe.

And here I wanted to break even your boostraps after breaking sharedUserId APKs. Really lucky you ;)

@truboxl Let me know if you want to add the fixes yourself or want me to do it.

agnostic-apollo avatar Apr 25 '22 17:04 agnostic-apollo

I am fine with @agnostic-apollo changes since that look simpler.

Though the "pull all the debs inside the output folder and build bootstrap out of it" can be a useful feature for experimenting.

If possible, I like to have some caching mechanism. Nuking all and then rebuild LLVM package took way too long (many packages depends or build depends on this). Maybe we can just use back llvm.deb after nuking? Probably work on this later.

And yeah, there's a long way to go before reaching size equivalent to generate-bootstraps.sh with the non-existant dependency management in build-bootstraps.sh...

truboxl avatar Apr 29 '22 21:04 truboxl

This issue/PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 13 '22 21:06 stale[bot]

This issue/PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 28 '22 22:07 stale[bot]

This issue/PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 12 '22 03:09 stale[bot]