mordak / Term48

50 stars 20 forks source link

Provide other binaries like wget, curl, ... #12

Closed stmblfrcr closed 7 years ago

stmblfrcr commented 8 years ago

Hi, it would be great, if programs like wget could be bundled within the application. Sure, it is possible to compile those yourself (https://gist.github.com/Paxa/8916618) and put them on the device but it is a rather cumbersome process nonetheless (need to be dev-user to make them executable). I do not know if this is out of the applications scope but maybe something you might consider. Thanks anyways for your work :)!

mordak commented 8 years ago

Thanks for the vote - noted. I will definitely consider adding more useful things in the future. I've always been a bit reluctant to bundle extra binaries for a variety of reasons, but I did it recently for ssh after several requests. As for compiling yourself, you shouldn't need to be dev-user to chmod +x. I've been compiling things on the device without any issue for awhile, and haven't had any issues making things executable. Regardless, have you checked out the dev tools? It does make filling out the userland a bit easier (though is certainly more cumbersome than not compiling yourself). Anyway, I'll keep the request in mind. I happen to have a curl binary on my phone, so it might not be too much effort to add it to the bundle. Thanks!

stmblfrcr commented 7 years ago

Well, I gave the dev-tools another try and it was actually quite easy to set this up. I had to substitute the mirror for file in the respective build.sh with another one since I could not reach the server. But otherwise everything else went smoothly. Compiling curl on device with --prefix=$NATIVE_TOOLS worked without a hitch. Almost too easy, if you ask me ^^. Still, I’m only able to download with the -k option, since there seems to be a problem with HTTPS, although it says, it’s compiled with OpenSSL support. Maybe some certificates need to be bundled, not sure. I recently got a similar issue where youtube-dl wouldn’t work any longer due to some hickup with X.509, don’t know if it’s related anyhow. I’m still not able getting wget to compile regardless which version I tried. Older versions at least did configure cleanly but choked during make. The issue seems to resolve around strerror-override which I couldn’t get my head around. With recent versions configure would not finish due to missing OpenSSL. Maybe some patches are needed. Would you maybe have a look? Otherwise thank you, thank you very much for your hard work, it’s highly appreciated. Oh and sorry for the long and broad post.

mordak commented 7 years ago

That's great that you got curl working. I tried getting wget to compile awhile ago and gave up in frustration. Fortunately curl -O does the same thing as wget.

I have had issues with the certificate bundle that BlackBerry is shipping not including some common roots (most notably LetsEncrypt), so SSL validation errors are not unusual. If you do not feel like using -k all the time, you can pull down an updated CA bundle from curl and set CURL_CA_BUNDLE in your ENV to point to it.

stmblfrcr commented 7 years ago

Alright, due to your suggestion, I set the environment variable and curl now works sufficiently enough for me. Thanks for your input!