Page MenuHomeFreeBSD

bsdpv: revive dpv atop bsddialog
Needs ReviewPublic

Authored by dteske on Fri, Jul 10, 1:10 AM.

Details

Reviewers
adrian
asiciliano
emaste
des
Group Reviewers
manpages
Installer
Summary

Resurrect the dialog progress view -- disconnected from the build since
the LGPL dialog(3) removal -- as libbsdpv/bsdpv, rooted in bsddialog(3),
with the public API renamed dpv_* to bsdpv_* to mark a clean break from
the code that required GNU dialog.

libdpv depended on dlg_gauge_reallocate(), which bsddialog(3) does not
provide; rather than grow bsddialog, the port adopts the idiom bsddialog
itself uses in bsddialog_progressview() and bsddialog_mixedgauge():
recreate the gauge with bsddialog_gauge() on each update and let curses
compute the minimal screen delta. Terminal styling that previously reached
into dialog's color table now derives from bsddialog_get_theme() and
bsddialog_color_attrs(). The DPV_DISPLAY_DIALOG and DPV_DISPLAY_XDIALOG
spawn modes are removed: the former exec'd the GPL utility this change
exists to shed, and the latter served a long-dead X11 port. libfigpar
stays disconnected because its only consumer here was .dialogrc parsing
and bsddialog has no .dialogrc support; the one general-purpose routine
libdpv used from it, strexpandnl(), is absorbed as a private utility.
Both new components are PRIVATELIB, matching libbsddialog, so no
external ABI is promised.

Three latent bugs inherited from dpv are fixed in the port: the
status-line formats given with -i/-I were unconditionally clobbered
after option parsing (and the many-files default was assigned the
solo-file format); the /dev/stdin descriptor heuristic was applied even
when stdin was a pipe, driving the input descriptor negative when -o or
-x was in use; and a transfer that ended between display updates could
exit without rendering its final Done/Fail state.

While here, fix creation of $INCDIR/private/bsdpv/ directory by
modifying share/mk/bsd.incs.mk

Test Plan

Requires new bsddialog 1.2 here https://reviews.freebsd.org/D58118

Build/install, then ...

  1. yes | bsdpv -l - followed by Ctrl-c to abort when done
  2. yes | bsdpv -lN 1000000000:-

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 74666
Build 71549: arc lint + arc unit

Event Timeline

dteske retitled this revision from commit 1214275b63fee367987c62bda49bf8519353d2ef Author: Devin Teske <dteske@FreeBSD.org> Date: Fri Jul 3 09:48:34 2026 -0700 to bsdpv: revive dpv atop bsddialog.Fri, Jul 10, 1:10 AM
dteske edited the summary of this revision. (Show Details)
dteske added reviewers: adrian, asiciliano, emaste, des.
dteske added reviewers: manpages, Installer.

Worth repeating:

Requires new bsddialog 1.2 here https://reviews.freebsd.org/D58118