Commit Graph

8149 Commits

Author SHA1 Message Date
Jason Rhinelander
b81f7025c9
Replace logging with oxen-logger
Replaces custom logging system with spdlog-based oxen logging.  This
commit mainly replaces the backend logging with the spdlog-based system,
but doesn't (yet) convert all the existing LogWarn, etc. to use the new
format-based logging.

New logging statements will look like:

    llarp::log::warning(cat, "blah: {}", val);

where `cat` should be set up in each .cpp or cluster of .cpp files, as
described in the oxen-logging README.

As part of spdlog we get fmt, which gives us nice format strings, where
are applied generously in this commit.

Making types printable now requires two steps:
- add a ToString() method
- add this specialization:

      template <>
      constexpr inline bool llarp::IsToStringFormattable<llarp::Whatever> = true;

This will then allow the type to be printed as a "{}" value in a
fmt::format string.  This is applied to all our printable types here,
and all of the `operator<<` are removed.

This commit also:
- replaces various uses of `operator<<` to ToString()
- replaces various uses of std::stringstream with either fmt::format or
  plain std::string
- Rename some to_string and toString() methods to ToString() for
  consistency (and to work with fmt)
- Replace `stringify(...)` and `make_exception` usage with fmt::format
  (and remove stringify/make_exception from util/str.hpp).
2022-07-15 22:17:59 -03:00
Jason Rhinelander
43191ec100
Add missing header
Needed for uint_least32_t.
2022-07-15 21:51:32 -03:00
Jeff
a3725284e4
simple keygen script 2022-06-26 10:02:59 -04:00
majestrate
a9a9593128
Merge pull request #1938 from jagerman/no-empty-compilations
Don't build empty cpp files
2022-06-22 17:06:09 -04:00
majestrate
193ab47372
Merge pull request #1941 from jagerman/no-shellhooks
Remove dead code, cmake cleanups
2022-06-22 16:49:57 -04:00
Jason Rhinelander
81f05d63c1
Move destructor back to .cpp file
Having it there (even defaulted, like this) means endpoint.hpp doesn't
have to include endpoint_state.hpp (which it otherwise would need,
because of the std::unique_ptr<EndpointState> default deleter
requirements).
2022-06-22 14:48:45 -03:00
Jason Rhinelander
c37d6ea43b
Remove shadow testing framework
Bitrotten and apparently doesn't work with libuv event loop.
2022-06-22 11:08:07 -03:00
Jason Rhinelander
0edb4435d4
Cmake cleanup: remove unneeded =1 from definitions
We only check for definedness, not truth, in the code so make the cmake
definitions agree with that.

This also avoids warnings when building on macos (because swift only
allowed defined/undefined but not values)
2022-06-21 18:57:36 -03:00
Jason Rhinelander
4a4f16e5c8
Remove dead code: netns, shell hooks
These haven't been activated in a long time and aren't worth
resuscitating.
2022-06-21 18:56:25 -03:00
Jason Rhinelander
8c3d1b3281
Don't build empty cpp files
We shouldn't be compiling these .cpp files at all on other platforms,
rather than compiling empty .cpp files (which later results in "... has
no symbols" warnings).
2022-06-16 13:17:13 -03:00
majestrate
2e0822889a
Merge pull request #1937 from jagerman/print-snode-addr-on-startup
Show router pubkey at startup
2022-06-15 21:07:34 -04:00
Jason Rhinelander
3cd699fa7f
Show router pubkey at startup 2022-06-15 21:23:15 -03:00
majestrate
85cf2dad10
Merge pull request #1926 from jagerman/tag-override
Add -DLOKINET_VERSIONTAG to override version tag
2022-06-14 07:43:18 -04:00
Jason Rhinelander
1de7b070d1
Add -DLOKINET_VERSIONTAG to override version tag
Currently I maintain a patch in the debs to do the same thing here, but
it fails to apply often enough; this change makes the behaviour
consistent with oxen-core/oxen-ss and will let me drop that patch and
just pass in the cmake option.

(Recommend ignore-whitespace for viewing the diff)
2022-06-13 20:00:35 -03:00
majestrate
10db0a0d2d
link to french readme 2022-06-07 16:45:56 -04:00
majestrate
83fe986749
add french readme
this translation was provided from a session user
2022-06-07 16:45:35 -04:00
majestrate
3ef13bab7f
Merge pull request #1931 from pebu1337/patch-1
Update error message
2022-06-06 11:45:15 -04:00
Pebu
9db192079b
Update error message
Message is paths must be >= 2 but condition is checking for < 3
2022-06-06 10:00:20 -04:00
majestrate
f2d7d5eabf
Merge pull request #1925 from jagerman/system-or-submodule
Clean up system-or-submodule handling
2022-06-03 18:53:55 -04:00
Jason Rhinelander
523a8a74ca
Clean up system-or-submodule handling
Fixes a bug on older cmake linking against oxenmq (older cmake hates the
direct oxenmq::oxenmq -> PkgConfig::OXENMQ alias), and also makes it
easier to handle things like nlohmann::json (which we can use from the
system *or* submodule).

Borrowed from oxen-ss/oxen-core.
2022-05-31 19:51:29 -03:00
Jason Rhinelander
eb40f86d4a
cherry-pick 0.0.0.0 bind fallback 2022-05-31 16:32:24 -03:00
Jason Rhinelander
9086d1fa6c
add additional fallback case 2022-05-31 16:32:23 -03:00
Jeff
4a10868f85
add additional fallback case 2022-05-31 15:23:36 -04:00
Jason Rhinelander
e99e7dece0
0.9.9 release 2022-05-30 22:29:45 -03:00
Jason Rhinelander
8aa68c3fdc
bionic workaround 2022-05-30 22:27:09 -03:00
Jason Rhinelander
e4d3299059
Remove arm builds for bionic
kitware doesn't provide a cmake build, and it isn't worth building our
own for such an esoteric distro/arch combination.
2022-05-30 22:20:22 -03:00
Jason Rhinelander
8f763e229e
Rediff patches 2022-05-30 21:37:10 -03:00
Jason Rhinelander
aff9f0738e
Merge remote-tracking branch 'origin/stable' into ubuntu/bionic 2022-05-30 21:13:10 -03:00
Jason Rhinelander
6b8a646526
gbp compat fix 2022-05-30 21:10:02 -03:00
Jason Rhinelander
440b547d2c
Merge pull request #1924 from oxen-io/dev
v0.9.9
2022-05-30 20:42:54 -03:00
majestrate
229e1277fd
Merge pull request #1923 from majestrate/replace-llarp-proto-verison-macros-2022-05-26
final fixups before 0.9.9 tag
2022-05-30 17:49:49 -04:00
Jeff
2576b87c5d
version bump to 0.9.9 2022-05-30 17:08:41 -03:00
Jason Rhinelander
34c3b8d0de
Add oxen repo to bionic for updated cmake version
Also rename the arg from loki_repo to oxen_repo
2022-05-30 17:08:27 -03:00
Jeff
73a49f5473
do not build liblokinet in windows, exe gets too big 2022-05-30 17:08:08 -03:00
Jason Rhinelander
6a2114fa1d
Don't be dynamic for win32 rc crap 2022-05-30 17:08:08 -03:00
Jeff
1dfc2e883b
bump verions of all deps
bump submodules

Fix dynamic version generation

   - GIT_FOUND OR Git_FOUND wasn't available because we hadn't done a
     find_package(Git) yet.
   - required version variables weren't being passed through to the cmake
     script
2022-05-30 17:08:08 -03:00
Jeff
065e52ab80
move windows nsis parts for cpack into external files 2022-05-30 09:27:05 -04:00
Jeff
e480e36f3d
generate windows rc for each executable target so we can set the executable name right for each one 2022-05-30 09:06:48 -04:00
Jeff
f05c2ebc71
macro removals
clean up version cmake stuff

clean up generated cpp version stuff

make all the windows rc stuff get generated by cmake

bump release motto message

properly inject release motto into version
2022-05-30 09:06:48 -04:00
Jeff
1eba0f836e
replace LLARP_PROTO_VERSION macro 2022-05-28 13:18:43 -04:00
majestrate
0331db494e
Merge pull request #1905 from majestrate/connect-out-2022-04-28
connect to routers even if we are decomissioned
2022-05-27 13:39:05 -04:00
Jeff
33a2226079
footcannon prevention: check for invalid address family.
throw if we pass in a bogus af value when getting a sockaddr for all interfaces
2022-05-27 13:26:30 -04:00
Jeff
98b3860655
set source ip on service nodes for outbound link to not use all interfaces 2022-05-27 13:26:30 -04:00
Jeff
60ada470db
format systemd status as time deltas from now 2022-05-27 13:21:09 -04:00
Jeff
18e1272c76
add gossip info to systemd status
* adds next and last gossip datetimes
* adds a few things for time points, like ostream operator overloads for time point
2022-05-27 13:21:08 -04:00
Jeff
3c44a06403
publish our rc out to the network when we regenerate them 2022-05-27 13:21:08 -04:00
Jeff
5f496259b7
if we are decommissioned or deregistered, do not test other routers so we do not spam them.
disambiguiate error message to distinguish between decomissioned and deregistered.
2022-05-27 13:21:08 -04:00
Jeff
706e34c082
connect to routers even if we are decomissioned 2022-05-27 13:21:07 -04:00
majestrate
d9a8710ccf
Merge pull request #1909 from majestrate/bump-ci-ubuntu-debs-2022-05-02
[chore] bump ci to make jammy debs
2022-05-27 13:06:55 -04:00
Jeff
994c6e1a21
remove focal deb build from ci 2022-05-27 11:34:15 -04:00