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

android-5: add generate-bootstrap script #10330

Merged
merged 10 commits into from
Apr 27, 2022

Conversation

Grimler91
Copy link
Member

Adapted from the one on master branch. Not tested on an actual device yet, the list of packages probably have to be adjusted a bit.

@agnostic-apollo
Copy link
Member

Yeah, list of packages may need adjustment.

The termux-am-socket should be added for both master and android-5 branch.

$ termux-am --am-help
CANNOT LINK EXECUTABLE: empty/missing DT_HASH in "termux-am-socket" (built with --hash-style=gnu?)

The termux-keyring also needs to be synced with master. Currently, xeffyr's deprecated key exists there too.

https://github.com/termux/termux-packages/tree/android-5/packages/termux-keyring

@Grimler91
Copy link
Member Author

Grimler91 commented Apr 26, 2022

$ termux-am --am-help
CANNOT LINK EXECUTABLE: empty/missing DT_HASH in "termux-am-socket" (built with --hash-style=gnu?)

Was this on android 5 or 6? Did you compile it on device?

It's the same error as for frida on master branch, though perhaps more or less a coincidence. This old cryptsetup issue also has the same error.

The termux-keyring also needs to be synced with master. Currently, xeffyr's deprecated key exists there too.

Some mirror out there somewhere might have a copy of x11-repo or unstable-repo for android-5, from before xeffyr removed them. I think keeping fornwall's and xeffyr's keys make sense just in case some user somehow is subscribed to such repos

@agnostic-apollo
Copy link
Member

agnostic-apollo commented Apr 26, 2022

Was this on android 5 or 6? Did you compile it on device?

It was run on android 5 avd but was compiled from master branch in docker. Since it was a simple c file, I was hoping it would run, but I guess it may need to be compiled with android-5 branch. I didn't get time to look into the error or build locally.

Some mirror out there somewhere might have a copy of x11-repo or unstable-repo for android-5, from before xeffyr removed them. I think keeping fornwall's and xeffyr's keys make sense just in case some user somehow is subscribed to such repos

I don't think it's really safe to keep xeffyr's key since he removed it from master branch and asked us to not use it anymore. fornwall is apparently not interested in termux anymore either. We can be notified of any such mirrors that exist and they can be resigned or users can manually add untrusted key themselves. It should not be default behaviour basically from a security perspective.

tareksander and others added 10 commits April 26, 2022 19:53
Client to use the new am implementation from this PR: termux/termux-app#2458
…all") package list optional

It is not available in some repository types, e.g. in built with "aptly".
The science-repo and game-repo were recently removed and their packages were added to the main repo.
During this their dependencies were removed from bootstrap zips in generate-bootstrap.sh script.
However, both these packages were dependent on termux-keyring package and the script did not have an entry itself for termux-keyring, so their removal resulted in missing termux-keyring package in bootstrap, which resulted in no keys to exist in `$TERMUX_PREFIX/etc/apt/trusted.gpg.d/` on fresh install, which resulted in `The following signatures couldn't be verified because the public key is not available: NO_PUBKEY*` errors when running `apt update` command for any bootstrap generated after Dec 14, 2021.

https://github.com/termux/termux-packages/commits/master/scripts/generate-bootstraps.sh
87b9cd3cf
758ec3a92

a3307822
f8746124
busybox, dpkg, gpgv, libc++, libiconv, termux-am-socket and
termux-licenses are also necessary to get a usable terminal on android-5
devices.
@Grimler91 Grimler91 force-pushed the android-5-generate-bootstraps branch from 6db37c4 to 626e4ad Compare April 27, 2022 10:01
@Grimler91 Grimler91 merged commit 626e4ad into android-5 Apr 27, 2022
@Grimler91 Grimler91 deleted the android-5-generate-bootstraps branch April 27, 2022 10:01
@Grimler91
Copy link
Member Author

xeffyr and fornwalls keys have been removed as well, and list of bootstrap packages updated to give a working terminal (tested on an android 5 samsung tabled).

Haven't uploaded updated packages and re-signed {game,science,root}-repo, but will do that later today

@agnostic-apollo
Copy link
Member

Cool, thanks. Take your time.

And any reason for termux-keyring not synced with master in case some other maintainer signs repos instead of you?

@Grimler91
Copy link
Member Author

Was mostly thinking that support has been dropped, and that there hasn't been much interest in maintaining it, but yeah, can add all keys in case that changes.

The repos are not set up to work with aptly, so for now any package update would have to be built, uploaded and the repo signed manually. If someone wants to maintain the repos for real they should probably create new repos that are handled by aptly instead (I haven't done that since users that are subscribed to the current repos would get a warning/prompt when the repo metadata changes, and plan seem to still be to only do the bare minimum for android 5)

@agnostic-apollo
Copy link
Member

Fair enough.

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.

3 participants