Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

110.4. newsboat-2.44

RSS and Atom feed reader for the terminal

Version 2.44, release 1
Shelf mail — Email clients, fetch and send tools, mail libraries, and feed readers
Phase 41_system (System), 734 of 1047 in build order
Licence MIT
Homepage https://newsboat.org/
Build time 5.4 SBU
Installed size 16.3 MiB in 8 files
Recipe ports/core/mail/newsboat/kpkgbuild

About

newsboat is an RSS and Atom feed reader for the terminal, with podboat, its podcast downloader. It is C++ over a Rust library, libnewsboat, which its makefile builds with cargo and links in statically. The recipe writes a terminal desktop entry for it, named Feeds, with NoDisplay=true: until ~/.config/newsboat/urls lists a feed newsboat exits with “no URLs configured”, so it is started from a prompt.

Sources

Dependencies

Depends on: rust, stfl, sqlite, curl, libxml2, json-c, ncurses, gettext, libintl, openssl, asciidoctor.

Required by: no port names it.

Installation

From the repository root, inside the build container, this is the line kdosbuild runs for the port:

script/chroot/exec.sh bash -c 'source script/phases/41_system/phase.env && kpkg install newsboat'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/mail/newsboat.

1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.

cd /ports/core/mail/newsboat
echo '8cb376b14c44809750a41b74c239a47092edb8e496f657c38af9b852dd8e4ea4  newsboat-2.44.tar.xz' | sha256sum -c -
echo 'b71b4c5ba321df39d6f050c1c03552243dbe9280ea8c5c66bece99f66b2eb770  newsboat-vendor-2.44.tar.xz' | sha256sum -c -

2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.

SRC_ROOT=/var/cache/kpkg/work/newsboat
SRC=$SRC_ROOT/newsboat-2.44
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf newsboat-2.44.tar.xz -C "$SRC" --strip-components=1

Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.

3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:

tar xf $PORT_SRC/${name}-vendor-${version}.tar.xz

export CARGO_NET_OFFLINE=true

export LDFLAGS="$LDFLAGS -lintl"

export CXXFLAGS="$CXXFLAGS -Wno-error=unused-function -g0"

make prefix=/usr newsboat podboat mo-files doc/newsboat.1 doc/podboat.1
make prefix=/usr DESTDIR=$PKG install-newsboat install-podboat install-mo \
	install-completions
install -Dm644 doc/newsboat.1 doc/podboat.1 -t "$PKG/usr/share/man/man1"

install -d "$PKG/usr/share/applications"
cat > "$PKG/usr/share/applications/newsboat.desktop" <<'ENTRY'
[Desktop Entry]
Type=Application
Name=Feeds
GenericName=Feed Reader
Comment=Read RSS and Atom feeds
Exec=newsboat
Icon=mail-message
Terminal=true
NoDisplay=true
Categories=Network;News;
Keywords=rss;atom;feed;news;reader;newsboat;
ENTRY
chmod 644 "$PKG/usr/share/applications/newsboat.desktop"

The switches, and why each is set:

The common switches of each build system are explained in the Flag glossary.

4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/newsboat, prunes what the image does not ship, lints the tree and rolls it reproducibly:

tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
    --mtime=@$SOURCE_DATE_EPOCH \
    --use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
    -cf newsboat-2.44-1.tar.xz -C "$PKG" .

5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/newsboat, and runs the triggers its paths call for.

Contents

Installed programs: newsboat, podboat.

Installed directories: /usr/share/licenses/newsboat.

Short descriptions

newsboat an RSS/Atom feed reader for text terminals
podboat a podcast download manager for text terminals

Notes

The make goals are named rather than running make and make install. The default target’s doc builds the HTML manual and FAQ as well as the two manual pages, and install-docs installs that HTML, the changelog and contrib/. build.sh asks only for doc/newsboat.1 and doc/podboat.1, which asciidoctor builds with upstream’s doc/man.rb converter, and installs them by hand.

The Rust crates come from the vendor bundle, newsboat-vendor-<version>.tar.xz, pinned with its own sha256 = line and unpacked at the top of the tree, where the makefile runs cargo (see Vendoring). The recipe sets no RUSTFLAGS: cargo builds libnewsboat as a static archive, and the final link is the C++ compiler’s, not rustc’s.