Dave Royal <
da...@dave123royal.com> wrote
I was involved in some of those conversations long ago as Frank had made
the exact same Termux build suggestion a little more than a year ago.
<
https://groups.google.com/g/news.software.readers/c/hN9OvnFFbZc/m/3URuX_PPAQAJ>
Here's a snippet of those discussions from the past...
FWIW, I got trn to compile and run in the Termux shell today. It needed
a very small amount of code fiddling.
Gotcha 1:
Added the termux include and lib paths to glibpth and locincpth in
config.sh (/data/data/com.termux/files/usr/lib and
/data/data/com.termux/files/usr/include).
Gotcha 2:
Can't use /bin/sh, the sh to use is in a different directory. This is
one of the more tedious things to fix, since it was ingrained in the
authors that /bin/sh would just work. I used
/data/data/com.termux/files/bin/sh instead. This needs to be fixed in
the Makefile after running Configure and might need fixing in the
various shell scripts created.
Gotcha 3:
Needed a b*-to-mem* patch, stick it in a a new file and modify Makefile,
or stick it in an existing .c file. Make sure -lc is used during link.
/*
* strings.h functions bcopy / bcmp / bzero are obsolete,
* replaced with string.h memcpy / memcmp / memset
* A fix file for older software.
*/
#include <string.h>
/* compares two strings and returns 0 if the same, non-zero otherwise.
* memcmp is more explicit about what the non-zero value is than bcmp
*/
int bcmp(const void *sa, const void *sb, size_t sl) {
int result = memcmp(sa, sb, sl);
if(result) {
return(1);
}
return(0);
}
/* memcpy returns the old value of dst, bcopy returns nothing.
* the two also switch src/dst order
*/
void bcopy(const void *src, void *dst, size_t sl) {
(void)memcpy(dst, src, sl);
return;
}
/* bzero sets everything to zero. memset can set any value */
void bzero(void *nuke, size_t sl) {
(void)memset(nuke, 0, sl);
return;
}
Gotcha 4:
The bison provided in Termux doesn't like the parsedate.y source. I
built the parsedate.c file on another system with bison, and then it
compiled and linked just fine. YMMV.
Gotcha 5:
There are no password file functions, so a judicious return() from
the setusername() function in env.c was necessary (right before first
#ifdef). The code is designed to cope with that function failing to do
anything useful.
Gotcha 6:
Hard links don't work. In util.c, I changed a call to finalize(1) to
return() to prevent hard links failing causing trn to quit early.
Gotcha 7:
Pnews isn't working, so posting doesn't work. This is probably an easy
fix once I look at it. (Pnews is a shell script.)
Gotcha N:
I haven't tested Rnmail, but I fully expect that to not work. For one
thing, I don't have a sendmail tool to actually send mail.
Gotcha N+1:
I haven't tested authenticated NNTP. I know that trn supports this, but
I recall having to replace the included inews for that in the past. (The
inews tool is used by Pnews to actually post the posts.)
The Good:
But the compile I had zero issues reading posts off of the test NNTP
server I used.
NNTPSERVER=
news.mozilla.org ./trn
Get termux, compile tin on it, connect to Eternal September?
I've compiled trn4 on termux and used it very briefly, but I find
termux -> ssh -> tmux -> trn4 to be a better set up for maintaining
my read state consistently.