mhn.defaults: make fetch less agressive on FreeBSD.
Drop the -a flag to fetch. Its retry logic has a bug where it will
go into an endless loop when trying to re-fetch an object behind
an https:// link when it is unable to validate the X.509 certificate
chain.
On FreeBSD, use fetch(1) to retrieve external content through URLs.
fetch(1) is part of the base system, so it's guaranteed to always be there.
And it is more likely to have been configured for any local site
customizations (local caches, proxies, etc).
New locations for config files and support binaries, and smarter default for install root directory.
The default locations for config files and back-end executables has
changed.
Config files have moved from ${sysconfdir} to ${sysconfdir}/nmh, and
the back-end programs from ${libdir} to ${libexecdir}/nmh.
The only user-visible change is the addition of a new mhparam(1)
component 'libexecdir', which replaces the previous 'libdir'. User
scripts invoking 'mhparam libdir' will need an update. 'libdir'
has been kept around for the time being, to give people a chance
to update their scripts. It returns the same value as 'libexecdir'.
'libdir' has been marked deprecated in the mhparam(1) manpage and
the release notes; it will be removed in a couple of releases.
In conjunction with this change there was an opportunity to do a
bit of Makefile cleanup. The old 'auxexec' construct has been
replaced with a new scheme that leverages automake's templating.
The auxexec_* references have been replaced with nmhlibexec_* forms,
and a corresponding nmhlibexecdir variable defined as ${libexecdir}/nmh.
Likewise, etcdir has been replaced with nmhetcdir.
These name changes have percolated downstream to some extent, primarily
in the man pages and test scripts.
Finally, configure has been made a bit smarter about setting the
default ${prefix}. If it finds an existing nmh installation, it
will set the default ${prefix} to match, falling back to /usr/local/nmh.
configure looks for an existing installation by searching $PATH for
a viable mhparam binary.
If we ever find more than one acme user working on the source,
the single-guide-file premise might need a review.
Ultimately, there should be a way for the configure script to
search for and import a personal guide file from the developer's
$HOME or some such. The next person to come along can figure
that out.
atags is the output from a ctags variant that generates its
output in a format recognized by Plan 9's acme editor.
(ftp://orthanc.ca/unix/atags/ for details.)
David Levine [Sat, 13 Sep 2014 03:12:33 +0000 (22:12 -0500)]
Fixed all anomalies detected by clang static analyzer (with
default checkers on Linux). One was notable: there was a break
missing from a switch case in fmt_scan.c, which caused the result
of the sday function escape to be garbage.
David Levine [Sun, 7 Sep 2014 14:56:21 +0000 (09:56 -0500)]
On some platforms, -D_FORTIFY_SOURCE=2 warns about ignoring the
return value from mbtowc() even when it is called to reset the
shift state. So wrap that in an if statement with a null body.
David Levine [Sun, 7 Sep 2014 14:18:20 +0000 (09:18 -0500)]
Added -D_FORTIFY_SOURCE=2 now that the build is clean with it.
Removed -Wno-unused-result because it shold no longer be necessary.
Adjusting all settings of CPPFLAGS to have consistent form.
David Levine [Tue, 2 Sep 2014 02:09:04 +0000 (21:09 -0500)]
Doubled size of buffers used by m_getfld(), scan, and fmttest to
8192, on any platform, so that -width 0 and -outsize max are
likely to include at least some part of the body of each message.
David Levine [Sun, 31 Aug 2014 20:40:57 +0000 (15:40 -0500)]
A value of 0 for the width switch of scan(1), inc(1), ap(1), dp(1),
fmttest(1), and mhl(1) now means as many characters as the format
engine can produce [Bug #15274]. That amount is limited by internal
buffers.
David Levine [Fri, 29 Aug 2014 13:50:51 +0000 (08:50 -0500)]
fmt_scan() no longer subtracts 1 from the width. This has the effect
of no longer counting the trailing newline in the output of scan(1),
inc(1), and the other programs that rely on it.
David Levine [Tue, 26 Aug 2014 03:06:11 +0000 (22:06 -0500)]
Check return values of system calls in several sbr .c files, found
with gcc's -D_FORTIFY_SOURCE=2. Updated checks added previously to
mhfixmsg.c to be consistent.
David Levine [Mon, 25 Aug 2014 02:19:10 +0000 (21:19 -0500)]
Dynamically allocate space for the output of fmt_scan(), using
charstring_t, so a fixed sized output buffer is no longer needed.
Also got rid of scanl global.
This prints some basic information about the build environment.
It's intended use is to print some information about the specific
build environment for each of the builds in the buildbot cluster.
In particular, the patch level of the OS, and the versions of
3rd-party packages installed on the system, compiler versions, etc.
David Levine [Mon, 4 Aug 2014 02:05:03 +0000 (21:05 -0500)]
Here's a better fix to m_Eom() in m_getfld.c than commit d2520ac7054ad75d60342606bf13c821305d958c. The comparison
of the return value of Getc() with EOF must be as an
integer, not a char.
David Levine [Mon, 4 Aug 2014 01:10:45 +0000 (20:10 -0500)]
Removed m_eomsbr() from m_getfld.c, and its scan_eom_action()
wrapper. It was only used by msh, which was removed by commit e6917522a770cf2dba9997ca047977bc55fac061.
David Levine [Wed, 23 Jul 2014 02:17:54 +0000 (21:17 -0500)]
Updated test-spoollocking to restore mts.conf when it's finished
(successfully) so as to not upset subsequent tests. Also fixed
removal of existing spoollocking option each time through.
David Levine [Wed, 9 Jul 2014 00:58:12 +0000 (19:58 -0500)]
If the user didn't specify any of the tls switches to post(8), try to
help them by implying -initialtls if they're using port 465 (smtps,
until IANA revoked that registration in 1998).
David Levine [Mon, 16 Jun 2014 03:43:16 +0000 (22:43 -0500)]
Fix to commit 0d3875d020fb17d34918f5e81ee7f87fbc5d1565: it seems
that only Linux uses the locale name of en_US.utf8, so added check
for the more common en_US.utf-8 to the tests that use it.
Ken Hornstein [Tue, 10 Jun 2014 23:06:54 +0000 (19:06 -0400)]
Use variable-size (but in one case, fixed but larger) buffers for the SASL
exchange to deal with larger SASL messages (specifically, when doing GSSAPI
with certain ticket extensions).
Paul Fox [Wed, 4 Jun 2014 16:18:12 +0000 (12:18 -0400)]
mhlist: don't truncate anything when -verbose
without this change to the -verbose output, there's no easy way to use
mhlist to get an unmodified content-type or content-description. (the
non-verbose output isn't changed.)
David Levine [Fri, 30 May 2014 02:05:36 +0000 (21:05 -0500)]
Undid commit 475fef2edee9db3c63fc089df76f8e93e3d598cd, it didn't
seem popular. We'd be better off with a proper method, or using
formail(1), to extract the addresses from a message.
David Levine [Mon, 26 May 2014 14:17:34 +0000 (09:17 -0500)]
Added context_find_by_type(), helper function to search first, if
subtype is non-NULL, for invoname-string-type/subtype and then
invoname-string-type. Also gets rid of some fixed-size temp buffers.