Discussion:
Re. Test: NNTP via nc ?
Add Reply
q***@outlook.com
2018-11-29 12:45:59 UTC
Reply
Permalink
Lost my WiFi for a month & now posting via lynx.
n alt.os.linux.slackware,
Chris Vine <***@cvine--nospam--.freeserve.co.uk> wrote:
]> And it doesn't work because it is stripping out the references field.
]> Each of your posts starts a new "thread" on a news reader with a
]> threaded display. Much better if you stopped.

Eli the Bearded wrote/l
]In threaded rn (trn), it shows as the same thread but with an unknown
]parent:

I'm interested to know what happens when I include [from the parent]:
References: <ptkopn$hgg$***@dont-email.me> <***@cvine--nospam--.freeserve.co.uk>
Xref: reader01.eternal-september.org alt.os.linux.slackware:30628
and if both of these fields are needed to achieve correct threading ?
------
I didn't yet locate your <year old NewsReader article>.
Your description of <installing NNTPability to Android 6> matches KBox4;
who's author wrote a competent description, but NOW had a death-in-the-
family and can't contribute - hopefully, just for a while.
Could I install a precompiled binary of your proven <NNTP for Andr6>?
BTW my Tablet runs X86 - not ARM.
Eli the Bearded
2018-11-29 19:30:22 UTC
Reply
Permalink
That is the important header for threading. You didn't include any
references header in your post, however.
Post by q***@outlook.com
Xref: reader01.eternal-september.org alt.os.linux.slackware:30628
The Xref header is NNTP server specific, not for general use. It allows
a newsreader to know which posts you've already read if they appear in
two or more groups you subscribe to. If say it said:

Xref: reader01.eternal-september.org alt.os.linux.slackware:30628 news.software.readers:461733

That would mean a.o.l.s:30628 is the same (by message-ID) as n.s.r:461733
and reading one should mark the article as read in both groups. But only
if both are coming from reader01.eternal-september.org.
Post by q***@outlook.com
I didn't yet locate your <year old NewsReader article>.
Your description of <installing NNTPability to Android 6> matches KBox4;
who's author wrote a competent description, but NOW had a death-in-the-
family and can't contribute - hopefully, just for a while.
Could I install a precompiled binary of your proven <NNTP for Andr6>?
BTW my Tablet runs X86 - not ARM.
I will not contribute binaries at this time. I can repost the content of
my year old article, which describes the method without giving exact
steps. My post was to encourage others to work on the effort by showing
how it could be done.

Quoting from: Message-ID: <eli$***@qz.little-neck.ny.us>
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

Later I figured out why posts where not working. There were two important
issues:

1) Pnews aws Yet Another place to replace /bin/sh with
/data/data/com.termux/files/usr/bin/sh (used by trn for running other
programs).
2) Pnews.header could not find the 'who' command (because it doesn't exist)

Separately I ported my inews to the system, that code needed a
replacement getpwuid() to be happy.

On NNTPSERVER=news.mozilla.org

Posted with my inews:

Article: 13861 of mozilla.test
subject: phone post test
message-id: <***@qaz.wtf>

Posted with Pnews / trn (using trn pass-through instead of inews):

Article: 13863 of mozilla.test
Subject: Re: phone post test
message-id: <***@qaz.wtf>

Elijah
------
generally prefers the connect to shell account and post from there method
q***@outlook.com
2018-11-30 05:24:41 UTC
Reply
Permalink
Just testing HOW2 *REPLY* with this <NNTP via lynx>.
BTW I found a dir of your <Android & NNTP> which I had previously
downloaded.
Is your android X86 or ARM ?
==crg
Eli the Bearded
2018-11-30 20:01:27 UTC
Reply
Permalink
Post by q***@outlook.com
Just testing HOW2 *REPLY* with this <NNTP via lynx>.
I don't know if I've ever posted via lynx. I do sometimes use it for
reading, since it lets me quickly find a recent article without
switching to the "already read articles" view which can be slow on
a large group.
Post by q***@outlook.com
Is your android X86 or ARM ?
ARM.

Elijah
------
qualcomm snapdragon 617
Michael Black
2018-12-01 00:19:34 UTC
Reply
Permalink
Post by Eli the Bearded
Post by q***@outlook.com
Just testing HOW2 *REPLY* with this <NNTP via lynx>.
I don't know if I've ever posted via lynx. I do sometimes use it for
reading, since it lets me quickly find a recent article without
switching to the "already read articles" view which can be slow on
a large group.
I might have, but it was 20 years ago or so. Now that it's mentioned, I
remember using lynx with newsgroups for some reason, but I can't remember
why. It was more than just to try it, but maybe no further than reading
some messages. There was some advantage to doing it at the time, again I
can't remember what. I probably posted to some test newsgroups, but
I'mnot sure I ever used it for normal use. I recall no quoting facility,
but it's been so long, I might be wrong about it.

Lynx really is a neat thing. It did do all those things like gopher and
ftp and newsgroups, it must still do it, but some of those protocols
aren't used much.

I always have lynx running in at least one console, often more than one.
It's a good way of dealing with files, I never got into MC since by the
time I was running linux on my own computer, I'd gotten used to using lynx
for files.

I got a Kindle Fire in August, and one of the first things I checked was
whether there was a version of lynx at the "app store", but I didn't find
it.

Michael
Eli the Bearded
2018-12-01 07:45:01 UTC
Reply
Permalink
Post by Michael Black
Post by Eli the Bearded
I don't know if I've ever posted via lynx. I do sometimes use it for
reading, since it lets me quickly find a recent article without
Lynx really is a neat thing. It did do all those things like gopher and
ftp and newsgroups, it must still do it, but some of those protocols
aren't used much.
I've used it for gopher this year. Still there.
Post by Michael Black
I got a Kindle Fire in August, and one of the first things I checked was
whether there was a version of lynx at the "app store", but I didn't find
it.
https://www.technipages.com/kindle-fire-how-to-install-apk-files
https://f-droid.org/en/packages/com.termux/

Open the Termux shell and type "pkg up; pkg install lynx"

Termux is the environment in which I compiled trn4 in on my phone a year
ago, and "heirloom" mailx today. Had to tweak the methods in openssl.c,
Termux doesn't support old stuff like SSLv2_client_method().

Elijah
------
rather likes having a compiler on his phone

Loading...