Subject: CVS commit: pkgsrc/news/sfeed
From: Leonardo Taccari
Date: 2023-04-28 15:42:01
Message id: 20230428134201.3E523FA87@cvs.NetBSD.org

Log Message:
sfeed: Update to 1.8

Changes:
1.8
---
Fixes:
* sfeed_update: fail early if creating a temporary directory or status file fails.
* sfeed_atom, sfeed_json, sfeed_mbox:
  Fix reading past the buffer with an escaped NUL byte (\ NUL).
  Note that this could not happen with output from sfeed itself. Only if it was
  manipulated.
* sfeed_curses: fix (very hard to trigger) memleak when getline() returns EOF
  for lazyloaded items.
* sfeed parser:
  * Improve parsing RFC2822 obsolete short year.
  * Use errno ENOMEM instead of EOVERFLOW.
    This matches the behaviour of setting errno for malloc/calloc on the following
    systems too: glibc, musl libc, OpenBSD libc.
  * date to unix timestamp: fix incorrect int type to long.
    Found while testing sfeed on 16-bit MS-DOS with Open Watcom (for \ 
"fun" :)).
* Makefile: remove duplicate CPPFLAGS for sfeed_curses

Features:
* sfeed_json: add JSON output format tool. This formats the TSV data to JSON.
  It uses a subset of JSON Feed 1.1: https://www.jsonfeed.org/version/1.1/

Optimizations:
* sfeed_atom: save a few bytes in the output by removing the type="text"
  attribute, because for Atom the default for the type is text.
* Slightly reduce stack size for translating XML entities.
  A numeric entity could use 5 bytes, so use a round number of 8 bytes.

Misc:
* sfeed: simplify time calculation and make it slightly easier to read.
  This also fixes a calculation (possibly a compiler bug) with Open Watcom 1.9.
* Remove the sfeed name in some outputs ("branding").

Documentation:
* Fix some typos and improve code comments, in particular about the time parsing.
* README: sfeed_download example: change youtube-dl to yt-dlp:
  this is an active maintained fork.
* README: add error checking for temporary files in the examples.

Aside from the above changes there have been lots of testing on different and
strange systems and the test-cases have been expanded to cover some cases.
These tests are in a separate repo.

Some tested strange systems:

* SerenityOS: gophers://codemadness.org/9/paste/sfeed-serenityos.webm partially
  works.  The core base utilities like sort are limited and non-POSIX though, so
  sfeed_update doesn't work directly there.

* MS-DOS (16-bit and 32-bit extender) using Open Watcom 1.9. Works fine using a
  32-bit extender.  No 2038-support with 64-bit time_t though, just _unsigned_
  32-bit :)

Tested these less-used systems or compilers can be fun and also discover
(pedantic) bugs.

While adding JSON Feed output support (sfeed_json) I also wrote a parser for it
to read the data.  It can convert from JSON Feed to Atom. It can also convert
directly from JSON Feed to sfeed(5). It is available at:

        https://git.codemadness.org/jfconvert/files.html

1.7
---
Changes:
sfeed_curses:
* Add SCO keys for next, prior (CSI I and CSI G).
  Tested on DragonFlyBSD (cons25 console).
* Add SUN keys support.
  Tested on OpenIndiana.

sfeed_gopher:
* Remove unnecesary PATH_MAX restricting the path length.
  This also makes it compile cleanly on GNU/Hurd.

* Man page and documentation improvements.

Files:
RevisionActionfile
1.26modifypkgsrc/news/sfeed/Makefile
1.7modifypkgsrc/news/sfeed/PLIST
1.25modifypkgsrc/news/sfeed/distinfo