In news.software.readers, Eric M <
[email protected]> wrote:
[Xpost + Fu2 news.software.readers]
Frank Slootweg a écrit le Tue, 18 Oct 2022
17:42:42 dans news.software.nntp :
How can I install tin on termux on an Android smartphone natively ?
This would be great.
As I mentioned, a news.software.readers regular has built trn under Termux, so it's probably best to ask/cross-post in/to that group, as he
can probably provide some general Termux build advice.
That would be me. I did it as proof of concept, I prefer reading news
ssh'ed in somewhere else (so I always have the same .newsrc on or off
phone).
Ok, so I'm crossposting and putting a Followup there (yes, I already
said it, but I want to be perfectly clear).
It wasn't dead simple, but it wasn't the hardest. Termux provides a
fairly full Linux shell, trn is designed to compile on anything Unix
like. It's a good match, but really some of the trickiest bits might be
solved by compiling a newer newsreader under Termux.
Two gotchas I remember: Termux has bash, which is a good replacment for
/bin/sh and it has a sh, but it does not have /bin/sh.
$ which sh
/data/data/com.termux/files/usr/bin/sh
$
Meanwhile trn is pretty determined to use /bin/sh for lots of things
during config, install, and runtime.
The other thing that I ran into was no /etc/passwd and no getent() for
passwd entries. This comes up when it's trying to figure out the
username or something. But the code has a workaround already, just a bug preventing it from being reached. I edited in a return(-1) (or similar)
and it worked.
Then there were the usual issues of compiling legacy code on modern
compilers.
$ cc --version
clang version 15.0.1
Target: aarch64-unknown-linux-android24
Thread model: posix
InstalledDir: /data/data/com.termux/files/usr/bin
$
It was probably something like adding -std=c89 to options.
But Termux had all the libraries needed, and all the terminal support
required for trn4. There might be a precompiled newsreader already in
Termux packages, I didn't look hard. (There is lynx in packages, I don't
recall if I have ever tested news: links from it, but it works for web browsing.)
I also didn't try to get a sendmail working for reply by email, but it's feasible. I have heirloom-mailx (aka nail) working for reading / sending
email, but I mostly just read crap like "verify your email address" and
mostly just send stuff to myself. Google would probably flag my
self-hosted email stack as super-spammy.
Elijah
------
https://github.com/Eli-the-Bearded/heirloom-mailx
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)