If the C library supports these random functions, use them directly
instead of reading the /dev/urandom file. This makes life easier on
platforms that don't have /dev/urandom (like WASM).
Rely on the OS to automatically restart syscalls that were interrupted
by signals. This makes code overall more robust because we don't have
to explicitly handle EINTR everywhere ourselves.
Abseil uses certain compiler extensions intentionally (see abseil/abseil-cpp#157) so it triggers multiple warnings enabled by -pedantic (-Wnullability-extension, -Wgcc-compat, -Wvariadic-macro-arguments-omitted at a minimum) as seen in #1373.
Run clang-format over the Mosh source tree. This is a large change and
has been factored into its own commit for auditability. Reproduce it
with
find . -name \*.cc -or -name \*.h | while read f; do clang-format -i --style=file $f; done
Create .clang-format to describe the current C++ style used in Mosh.
Mark one carefully-formatted array with `// clang-format off`. Also turn
off clang-format in src/crypto/ocb_internal.cc, since it was imported
almost wholesale from another project and is written in a style
different from the rest of Mosh.
Previously, mosh used extensive -I flags and all of the mosh-local
makes it really hard to tell what the proper dependency graph is, so
instead remove the -I arguments in favvor of $(top_srcdir) and qualify
the paths wherever they are used.
Protobuf versions since 3.6.0 have long had a C++11 dependency; even
more recent versions have picked up an Abseil dependency bumping that
to C++14. Since it is now 2023, defaulting to C++17 is reasonable, so
remove the conditional C++ standards version check that mosh
previously had and replace it with an unconditional C++17 check.
This means that all future commits can use C++17 features. According
to https://en.cppreference.com/w/cpp/compiler_support/17 this means
that minimum effective compiler versions for mosh become:
gcc 7 (May 2017)
clang 5 (September 2017)
This, in turn, implies that future versions of mosh will no longer be
available for RHEL/CentOS 7 (June 2014).
Closes: #1267
Per release-team’s recent request that maintainers support the nocheck
profile <E1oit90-0073rh-LX@respighi.debian.org>, annotate build
dependencies that are test-only with <!nocheck>.
tmux 3.3a has a behavior change, since reverted, that is incompatible
with this test. Unfortunately, tmux 3.3a has already made it into some
distributions, so the test has to be disabled when tmux 3.3a is encountered.
This helps to avoid problems when the 1.4.0 release is made and
distributions with version sort order think the rc sorts after
the non-suffixed version
`git fetch --tags --unshallow`, run as part of the CI for `git
describe` to do the right thing, ran into the error:
```
! [rejected] mosh-1.4.0-rc0 -> mosh-1.4.0-rc0 (would clobber existing tag)
```
This is because mosh uses annotated tags, whereas the initial fetch
command run by actions/checkout@v2 ends up creating an *unannotated*
tag of the same name.
This means that any time the release CI runs, it would fail.
The resolution is straightforward: --force so that the line becomes
```
t [tag update] mosh-1.4.0-rc0 -> mosh-1.4.0-rc0
```
and the annotation is brought in.