This change adds autoconf/automake support for building all of mosh
with gcov, and generates an lcov html report. This allows seeing which
parts ofthe source tree have good test coverage, and which can be
shored up. Eventually, it would be good to hook this up to Github
Actions to be generated automatically.
Fixes#1051, mosh fails to build on case-insensitive filesystems.
XXX This isn't perfect because autoconf/automake drop several extra
files in the directory anyway.
The uninitialized variable warning from T x; broke the test if the
user passed CXXFLAGS='-O2 -Wall -Werror'. (Users shouldn’t do that;
our own --enable-compile-warnings=error option was unaffected.)
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Change the openssl-devel package to libssl-devel. Cygwin still has an
"obsolete" (essentially virtual) package for openssl-devel, but it
doesn't seem to work properly on Appveyor's Cygwin install.
Protobuf >= 3.6.0 requires C++11, which I added support for last year.
But when I did that, I requested strict ANSI C++ compatibility, which
causes Cygwin/newlib's libc feature test macros to be set to disable
(at least) POSIX.1 extensions. Let the Autoconf macro use its default
instead (prefer GNU/extended C++, accept anything).
Statically linking mosh-server with glibc isn’t a great idea for
various reasons (nsswitch modules, locale format incompatibilities).
But we can provide most of the benefits of static linking by allowing
specific library dependencies to be linked statically using -Bstatic
and -Bdynamic. The full set is enabled by
./configure --enable-static-libraries
which is equivalent to
./configure --enable-static-libstdc++ --enable-static-libgcc \
--enable-static-utempter --enable-static-zlib --enable-static-curses \
--enable-static-crypto --enable-static-protobuf
and results in binaries whose only runtime library dependencies are
provided with libc:
$ ldd src/frontend/mosh-server
linux-vdso.so.1 (0x00007ffe0b377000)
libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007fa0d9970000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fa0d97e3000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fa0d97c2000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa0d95d8000)
/lib64/ld-linux-x86-64.so.2 (0x00007fa0d9f6a000)
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This shouldn't require C++11 when not required.
This hack may not always detect when C++11 *is* required,
in which case a little autoconf tweaking may be needed
to get a good compile.
Log connection change events to syslog in the auth log, logging the PID,
username and remote host.
Also log session begin and end.
Co-Authored-By: John Hood <cgull@glup.org>
These should output to stdout and exit with status 0. Passing
std-options to AM_INIT_AUTOMAKE causes ‘make installcheck’ (hence also
‘make distcheck’) to verify this.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
There are (broken) compilers out there that accept -fstack-protector-*
parameters, but do not provide the needed ssp library. As a result,
build does not fail, but link does. Use the local check_link_flag
autoconf function to correctly test for SSP availability.
Required for the Imagination Technologies Codescape IMG MIPS
toolchain, version 2015.10 (and who knows what else).
Fixes#744.
protobuf uses an obsolete automake pthreads detection macro,
which results in "pkgconfig --libs protobuf" returning
"-lprotobuf -pthread -lpthread" on Linux. Remove
the unnecessary and dangerous -lpthread in that case.
Fixes#727, mosh-server crash in libutempter on Debian Sid.
This helps to catch inconsistent declarations in headers that weren’t
included, and local functions that are not marked static.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>