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

[Feature]: Is it possible to build termux-app with pacman as the default package manager? #3248

Open
shaunmulligan opened this issue Feb 14, 2023 · 8 comments

Comments

@shaunmulligan
Copy link

Feature description

I have successfully built bootstraps.zip using the pacman option, but now having installed that in my build of termux-app, I get the following error when trying to install apps:

/data/data/com.termux/files/usr/bin/pkg: line 348: pacman: command not found

Or do I just need to include pacman in the bootstraps.zip build?

Additional information

N/A

@Maxython
Copy link
Member

What command did you use to build bootstrap based on pacman?

@shaunmulligan
Copy link
Author

I used your PR termux/termux-packages#14692 to generate the bootstrap

@shaunmulligan
Copy link
Author

@Maxython any tips on getting pacman to work? Your PR with --pm pacman is the only way I have managed to build a workable bootstrap.zip. Everything else fails or creates a zip that is too large to load. I now just need to figure out how to actually get pkg install to work :P

@Maxython
Copy link
Member

So I understand you are using build-bootstraps.sh to create bootstrap, but the thing is that this bootstrap generator does not work correctly. I recommend that you use generate-bootstraps.sh (or use ready-made - https://github.com/termux-pacman/termux-packages/releases).

As far as building bootstrap based on pacman, you need to use the --pm flag, because for bootstrap to work properly (on some basis) need to make settings for the package managers, which is what this flag does. There are no other ways to change the package manager in bootstrap.

@shaunmulligan
Copy link
Author

Yes, I'm currently using build-bootstrap.sh and it definitely doesn't work :( ... Is there a way to configure generate-bootstraps.sh to include my own package? What I am trying to do is just termux with my pre-installed package and scripts, but would prefer not to try setup a whole apt repository just to do that. I don't really need pacman, it was just the only way i managed to get a bootstraps build to actually finish correctly :/

@Maxython
Copy link
Member

If you want to add additional packages to bootstrap, then you can use the --add flag.

@shaunmulligan
Copy link
Author

Yeah I'm using that already but it only works for packages in the official repo, but I need to add in a package and scripts specific to my application. At the moment I'm just hacking the generate script to look in the local output folder for .deb if the package doesn't exist on the repository URL. Its a mess but it looks like its working 👍

@agnostic-apollo
Copy link
Member

agnostic-apollo commented Feb 15, 2023

Set log level to verbose and check logcat after reinstalling app to see if pacman was even installed from the bootstrap.

https://github.com/termux/termux-app#Debugging

Edit: Add a Logger entry for target file.

String zipEntryName = zipEntry.getName();

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

No branches or pull requests

3 participants