Useful tip on nsupdate -- readline support.

Mukund Sivaraman muks at mukund.org
Tue Jun 11 14:58:03 UTC 2019


On Tue, Jun 11, 2019 at 10:03:30AM -0400, Warren Kumari wrote:
> Hi there all,
> 
> I manually use nsupdate to make some changes to some of my zones -
> most recently I had to add a bunch of reverse DNS records. These are
> all very similar - the first octet changes, and then the target name
> changes. Unfortuniatly nsupdate doesn't support readline, and so the
> obvious "press up arrow, edit previous line, press enter" doesn't
> work, and so I end up entering one line, copying that into an editor,
> making changes, pasting, making changes, etc.
> 
> I just stumbled across this --
> https://dnsworkshop.de/nsupdate-history.html by Carsten Strotmann
> 
> Basically, uses rlwrap to wrap readline support into nsupdate - you
> just call `rlwrap nsupdate` and magically nsupdate now supports
> editing.
> 
> 'tis a simple trick, but removes much annoyance.

nsupdate has built-in readline support (when it finds it during build).
(Though, for for some reason, the nsupdate that ships with Fedora
doesn't seem to be linking to readline.)

On that note, buyer beware. A warning to all redistributors who
commercially repackage BIND with modifications (whether with blessing
from ISC or not):

* readline is GPL, and so you'll link your code to GPL if you link to it
  (which can be esp. bad for you if you modify libisc, libdns,
  etc. also). It's best to either remove readline from such build
  environments (libedit may be a suitable drop-in replacement), or
  configure without it, or patch out the code.

  There is some interesting GPL license enforcement history with readline:
  
  https://en.wikipedia.org/wiki/GNU_Readline#Choice_of_the_GPL_as_GNU_Readline's_license
  https://gitlab.com/gnu-clisp/clisp/blob/master/doc/Why-CLISP-is-under-GPL

* libcap (POSIX capablities) is GPL similarly. An alternative is
  libcap-ng which is LGPLv2+, but it has a different API.

I think these are the only two libraries that are copyleft vs. BIND's
ISC (before) and MPL2 (now) licenses, and because they're GPL, your work
will be covered by GPL if you link against them.

This is usually not bad for the general public (and good for free
software), but if you're a commercial re-distributor of BIND and are
linking to GPL, good luck. I'm sure you'll even miss seeing this
thread. :)

		Mukund


More information about the bind-users mailing list