Discussion:
[bystand] Version 0.7.0 released
(too old to reply)
n***@zzo38computer.org.invalid
2019-10-14 06:53:54 UTC
Permalink
Version 0.7.0 of bystand has now been released. The changes are:

* Add "unset" command, to unset configuration variables.

* Add an export function. Exports one or more articles using mbox format.
(It does implement proper From quoting.) (Later, an import function might
also be added, but currently it isn't.)

* Add "pwd" command to print working directory.

* Make a correction in the example configuration (the declared type of the
"parent" column did not match the type of the data put there).

* Move macros to a separate section in the example configuration.

* Add ,h macro to list all follow-ups of current message, and ,u macro to
go to the message that this one is a follow-up of.

* Now you can mark as read/unread, either manually or automatically.

Download: http://zzo38computer.org/prog/bystand.zip

Please write a follow-up article to this one if you have comments,
complaints, questions, feature requests, bug reports, etc. You can also
post tickets on the Fossil repository if you prefer that.

I think that we should make up a comprehensive list of the NNTP client
software and a table to compare their capabilities. Of course, new
versions of the software will be made, so such table will be changed. Also
some capabilities might not be in the table at first, but later will be
added, or information might be unknown, to be later filled in.
--
Note: I am not always able to read/post messages during Monday-Friday.
Jay
2019-11-08 16:10:12 UTC
Permalink
Post by n***@zzo38computer.org.invalid
* Add "unset" command, to unset configuration variables.
* Add an export function. Exports one or more articles using mbox format. (It
does implement proper From quoting.) (Later, an import function might also be
added, but currently it isn't.)
* Add "pwd" command to print working directory.
* Make a correction in the example configuration (the declared type of the
"parent" column did not match the type of the data put there).
* Move macros to a separate section in the example configuration.
* Add ,h macro to list all follow-ups of current message, and ,u macro to go
to the message that this one is a follow-up of.
* Now you can mark as read/unread, either manually or automatically.
Download: http://zzo38computer.org/prog/bystand.zip
Please write a follow-up article to this one if you have comments, complaints,
questions, feature requests, bug reports, etc. You can also post tickets on
the Fossil repository if you prefer that.
I think that we should make up a comprehensive list of the NNTP client
software and a table to compare their capabilities. Of course, new versions of
the software will be made, so such table will be changed. Also some
capabilities might not be in the table at first, but later will be added, or
information might be unknown, to be later filled in.
For some reason I can't access your site...pinging it gives me a timeout.
Michael Bäuerle
2019-11-22 16:50:07 UTC
Permalink
Post by n***@zzo38computer.org.invalid
Version 0.7.0 of bystand has now been released.
[...]
Please write a follow-up article to this one if you have comments,
complaints, questions, feature requests, bug reports, etc. You can also
post tickets on the Fossil repository if you prefer that.
Looks like the code expects a GNU operating system. It defines:
|
| #define _GNU_SOURCE

and uses some nonstandard GNU extensions that prevent compilation on
non-GNU systems. For NetBSD I have used the following patch:

------------------------------------------------------------------------
diff -ruN bystand-0.7.0/Makefile bystand-0.7.0_netbsd/Makefile
--- bystand-0.7.0/Makefile 2019-07-19 12:56:00.000000000 +0200
+++ bystand-0.7.0_netbsd/Makefile 2019-11-22 17:39:10.000000000 +0100
@@ -1,12 +1,12 @@
# Make file for bystand
# Important: Ensure you are using a recent version of SQLite.

-OBJS= bystand.o
+OBJS= bystand.o gnu_compat.o

# Link executable against shared sqlite library
# -s is omitted, see install rule
bystand: $(OBJS)
- $(CC) -o $@ $(OBJS) $(LDFLAGS) $(LIBS) -lsqlite3 -ldl -lpthread
+ $(CC) -o $@ $(OBJS) $(LDFLAGS) $(LIBS) -lsqlite3

# Install exeutable to ~/bin
# Symbol table is stripped after installation (similar to -s)
diff -ruN bystand-0.7.0/bystand.c bystand-0.7.0_netbsd/bystand.c
--- bystand-0.7.0/bystand.c 2019-10-13 23:43:00.000000000 +0200
+++ bystand-0.7.0_netbsd/bystand.c 2019-11-22 16:34:38.000000000 +0100
@@ -14,9 +14,12 @@
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
+#include <sys/wait.h> // For WEXITSTATUS macro
#include <time.h>
#include <unistd.h>

+#include "gnu_compat.h" // For non-GNU systems like NetBSD
+
#ifndef MSG_MORE
#define MSG_MORE 0
#endif
diff -ruN bystand-0.7.0/gnu_compat.c bystand-0.7.0_netbsd/gnu_compat.c
--- bystand-0.7.0/gnu_compat.c 1970-01-01 01:00:00.000000000 +0100
+++ bystand-0.7.0_netbsd/gnu_compat.c 2019-11-22 17:36:55.000000000 +0100
@@ -0,0 +1,26 @@
+/*
+ * bystand uses at least the following nonstandard functions:
+ * - strchrnul() [GNU extension, in GNU libc >=2.1.1]
+ */
+#include <signal.h>
+#include <string.h>
+#include "gnu_compat.h"
+
+
+/*
+ * From the GNU libc manual page:
+ * The strchrnul() function is like strchr() except that if c is not found in s,
+ * then it returns a pointer to the null byte at the end of s, rather than NULL.
+ */
+char *strchrnul(const char *s, int c)
+{
+ char *r;
+
+ r = strchr(s, c);
+ if (NULL == r)
+ {
+ r = (char*) &s[strlen(s)];
+ }
+
+ return r;
+}
diff -ruN bystand-0.7.0/gnu_compat.h bystand-0.7.0_netbsd/gnu_compat.h
--- bystand-0.7.0/gnu_compat.h 1970-01-01 01:00:00.000000000 +0100
+++ bystand-0.7.0_netbsd/gnu_compat.h 2019-11-22 17:36:43.000000000 +0100
@@ -0,0 +1,8 @@
+/*
+ * bystand uses at least the following nonstandard datatypes:
+ * - sighandler_t [GNU extension]
+ */
+
+typedef void (*sighandler_t) (int);
+
+char *strchrnul(const char *s, int c);
------------------------------------------------------------------------
n***@zzo38computer.org.invalid
2019-11-23 19:46:10 UTC
Permalink
Post by Michael Bäuerle
|
| #define _GNU_SOURCE
and uses some nonstandard GNU extensions that prevent compilation on
[...]
Thank you for this information. Now I have released version 0.7.1, which
adds your patch (slightly modified). There is a new file called
Makefile.BSD which enables the features in your patch.
--
Note: I am not always able to read/post messages during Monday-Friday.
Michael Bäuerle
2019-11-24 10:43:17 UTC
Permalink
Post by n***@zzo38computer.org.invalid
Post by Michael Bäuerle
|
| #define _GNU_SOURCE
and uses some nonstandard GNU extensions that prevent compilation on
[...]
Thank you for this information. Now I have released version 0.7.1, which
adds your patch (slightly modified). There is a new file called
Makefile.BSD which enables the features in your patch.
Thank you for merging the patch.

In "gnu_compat.c" I have overlooked this include line (can be removed):
|
| #include <signal.h>

My original intention was to provide a replacement for the signal()
function too, but eventually the typedef in "gnu_compat.h" was
sufficient.


Suggestion for release scheme:
Is it possible to get versioned archive names like "bystand-0.7.1.zip"?
Packages for operating systems are dedicated to a single version and
use checksums to verify the integrity of the source code. Every update
of the current "bystand.zip" archive will break them, because the
checksum generated after source code review and package generation no
longer matches. What I suggest is a scheme like the one you used here:
<http://zzo38computer.org/prog/PuzzleMesh/>


[Subject updated to current version]
n***@zzo38computer.org.invalid
2019-11-24 18:12:08 UTC
Permalink
Post by Michael Bäuerle
Thank you for merging the patch.
|
| #include <signal.h>
Fixed. (That is the only change in version 0.7.2.)
Post by Michael Bäuerle
Is it possible to get versioned archive names like "bystand-0.7.1.zip"?
Packages for operating systems are dedicated to a single version and
use checksums to verify the integrity of the source code. Every update
of the current "bystand.zip" archive will break them, because the
checksum generated after source code review and package generation no
<http://zzo38computer.org/prog/PuzzleMesh/>
That is now available. Use a URL like:
http://zzo38computer.org/prog/bystand/bystand-0.7.2.zip

The old URL is still available and is a symlink to the newest version.

(P.S. If you are interested in PuzzleMesh, the new project is Free Hero
Mesh, written in C. PuzzleMesh is abandoned.)
--
Note: I am not always able to read/post messages during Monday-Friday.
Michael Bäuerle
2019-11-25 12:59:30 UTC
Permalink
Post by n***@zzo38computer.org.invalid
Post by Michael Bäuerle
[...]
Is it possible to get versioned archive names like "bystand-0.7.1.zip"?
Packages for operating systems are dedicated to a single version and
use checksums to verify the integrity of the source code. Every update
of the current "bystand.zip" archive will break them, because the
checksum generated after source code review and package generation no
<http://zzo38computer.org/prog/PuzzleMesh/>
http://zzo38computer.org/prog/bystand/bystand-0.7.2.zip
Thank you. I have created a pkgsrc package for it:
<https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=tree;f=bystand>

Can you please check whether my patch below is the correct solution for
this problem:
|
| bystand.c:486:11: warning: 'return' with no value, in function returning non-void

------------------------------------------------------------------------
$NetBSD$

Function new_from_template() is defined with return value of type int.
This patch returns -1 to indicate an error.

--- bystand.c.orig<---->2019-11-25 12:10:21.000000000 +0000
+++ bystand.c
@@ -483,7 +483,7 @@ static int new_from_template(const char*
printf("%m\n");
}
sqlite3_free(filename);
- if(!fp) return;
+ if(!fp) return -1;
filename=sqlite3_mprintf("%s/article",home);
if(!filename) errx(1,"Allocation failed");
outfp=fopen(filename,"w");
------------------------------------------------------------------------
n***@zzo38computer.org.invalid
2019-11-25 16:49:59 UTC
Permalink
Post by Michael Bäuerle
Can you please check whether my patch below is the correct solution for
|
| bystand.c:486:11: warning: 'return' with no value, in function returning non-void
Function new_from_template() is defined with return value of type int.
This patch returns -1 to indicate an error.
Fixed; thank you.
--
Note: I am not always able to read/post messages during Monday-Friday.
Loading...