Commit Graph
1015 Commits
Author SHA1 Message Date
Hamish ColemanandGitHub f5b730baed added some cross-compiled binary outputs to the autobuild (#850)
* Add an example cross compile build

* Harmonise the naming to reflect full architecture and if it is a real package or not

* Add some more example cross compile targets

* Only one RPM package is created, so use the singular word

* Dont use build triplet for OS packages, use the OS prefered arch name

* Add some cross compiling documentation to the Building.md
2021-10-14 02:30:42 +05:45
Hamish ColemanandGitHub 7d4ff08200 added automated binary artifacts (#849)
* Allow an autobuilder with no access to private key material to create testable packages

* Initial dpkg build - will need helpers installed to work

* Start adding required dpkg helpers

* Tweak package artifact names

* Add a windows 'package' builder

* Ensure prefix path handling deals with current directory change when descending to tools dir

* The tools makefile currently only needs the SBINDIR path to install properly

* Add a macos 'package' builder

* Remove unused configure variables

* Without commit history, some of the automatic version numbering will fail

* Add an rpm builder

* Need to set the env var for the rpm build before we change our working dir

* Allow gpg signing to fail for generating test rpm packages

* Unfortunately the rpm spec file hardcodes some path assumptions, so we need to use hacks to work around them

* Return to the top dir before moving things around

* A small change to make actions re-run the pipeline

* Name this workflow file with a nicer looking name
2021-10-11 18:44:28 +05:45
Logan oos EvenandGitHub 5f3c27e3a6 compile fix (#846) 2021-10-07 14:05:29 +05:45
Logan oos EvenandGitHub 50d4273272 disabled federation name output at supernode's management port (#845) 2021-10-07 13:56:03 +05:45
Hamish ColemanandGitHub 2e57663cde increased test coverage (#844)
* Start adding helper functions to the wire tests

* Add tests for two more wire functions

* Update test expects with new test data

* Use the normal mac address format, like a boss
2021-10-07 13:22:00 +05:45
Hamish ColemanandGitHub 4438f1aa2a added mingw test platform (#829)
* Provide a minimal reimplementation of our autoconf, to try windows builds

* Try building with windows

* Fix thinko in spelling

* Ensure shell script runs inside a shell

* Add a hack to aid include discovery

* Just keep adding tech debt...

* Assume that we will have slashes in some of the replacement strings and avoid that char with sed

* Restore one slash

* Hack around the tools makefile interdependancy bug

* A correct cflags include hack for each compile dir

* Ensure we link against winsock (note, even though this says 32bit, it should link the 64bit library ... I think)

* Bad link ordering if we dont use LDLIBS

* Remove unused make variable

* Remove makefile duplication using inheritance (this does mean you can no longer cd tools; make, but must do make tools)

* Add missing library for win32

* Show OS variable

* Make hack autoconf more robust for tests on non gitlab runners

* Remove no longer used substitutions from hack autoconf

* Add missing include path to tools under win32

* Build the win32 subdir when the compiler is Msys

* The different subdirs have different dependancies

* Ensure we can find the include files

* Fix library link ordering

* Ensure the tools dir can find the special win32 lib

* Deal with the differing basic type sizes on both linux/64bit and windows/64bit

* Document the steps to mimic the github windows/mingw build locally - to allow for simpler debugging

* Ensure branch name in instructions matches my test branch name

* Clarify the shell needed to build with mingw

* Since the makefile depends on knowing the OS, raise a fatal error if we cannot determine this

* Handling different compile environments is hard.

- Linux: sane and reasonable results for both uname -s (=Linux) and
  uname -o (=GNU/Linux)
- Windows/Mingw: insane results for uname -s
  (=MSYS_NT-$MAJOR.$MINOR-$BUILDNR) but sane results for uname -o (Msys)
- Macos: sane results for uname -s (=Darwin) but does not support
  uname -o at all

* Revamp the way that Mingw is detected

* Avoid attempting to generate gcovr report when running under windows

* Whoops, isolate the right step

* Fix spelling mistake

* win32/Makefile: Remove unused setting and add comment

* ensure that all win32 includes use the same expected path

* Allow simpler cross compilation by letting configure pass the CC and AR environment through

* Avoid multiple '_CRT_SECURE_NO_WARNINGS redefined' warnings

* Convert to a consolidated CONFIG_TARGET variable to select any different compile options

* Use the more generic printf defines to avoid warnings on mingw

* Update mingw build docs

* English better for reader happy make

* Address a number of mingw compiler warnings

* Fix Visual C compile

* Be sure to document some of the hacky nature of the mingw build
2021-10-06 00:52:15 +05:45
Logan oos EvenandGitHub db5adc2038 fine-tuned REGISTER cookie handling (#837) 2021-10-03 18:19:29 +05:45
Logan oos EvenandGitHub bc65a7f59e added forwarded REGISTER cookie type (#836) 2021-10-03 05:24:33 +05:45
Logan oos EvenandGitHub ebb357245a added a flag field to QUERY_PEER (#835) 2021-10-02 23:17:45 +05:45
Logan oos EvenandGitHub 2d34545304 compile fix (#834) 2021-09-30 12:39:31 +05:45
Logan oos EvenandGitHub 560b16f28f compile fix (#833) 2021-09-30 12:21:26 +05:45
Logan oos EvenandGitHub 16d248d921 fixed MinGW compile (#830) 2021-09-30 02:20:48 +05:45
Hamish ColemanandGitHub dec1771d5f added test platform MacOS (#828)
* Just for a laugh, lets naively throw the same build at non linux OS

* Only run apt commands on linux (yes, this is not actually right, but it is close enough for github actions at the moment)

* Start installing required macOS packages

* Only run apt commands on linux #2

* Ensure that we use a Bourne shell, even on Windows

* Until it is clear how to install autotools on windows in github runners, avoid fighting that bear

* Only try to run gcovr on ubuntu-latest

* Install the right macos dep

* Install gcovr on macos and upload all coverage report artifacts

* Upload a generated tests output artifact, even if the tests failed

* Prepend a quick smoke test to the full matrix and coverage builds

* Use short names for jobs
2021-09-29 16:51:02 +05:45
Logan oos EvenandGitHub 4137441b5e fine-tuned log levels (#827) 2021-09-29 13:38:55 +05:45
Luca Deri 00159d0d01 Compilation fix 2021-09-27 16:38:13 +02:00
Logan oos EvenandGitHub 4aaa5e5522 updated Scratchpad.md 2021-09-27 19:55:21 +05:45
Hamish ColemanandGitHub b735ad6b9e added test framework and code coverage reporting (#797)
* Add a simple test framework

* Add a code coverage report example oneliner

* Move the coverage report into a separate directory

* Add a github action to run tests and publish a branch with the coverage report

* Fix: Missing job separator

* Fix: remember to actually run configure

* Fix: Gotta autogen before I configure

* Dont try to upload coverage report unless this is a push

* Clearly show the git ref tested in the coverage report

* Add a test for the various transforms

* Add tests for the elliptic curve and pearson hash

* Ensure we ignore new generated output

* Remove unneeded boilerplate from the compression tests

* Add an example of a test of the encoded wire packets

* Ensure that correctly testable data is output even when zstd is not compiled

* Factor test runner out into its own script and attempt to add it to the cmake file

* Tell cmake about a new object file

* Stop trying to make Cmake work...

* Stop trying to make cmake work, round 2

* In the middle of a thousand lines of cmake output was one important one - windows could not find assert() - try again

* Try again to plumb the tests into cmake

* Add missing library to our superset install line

* Fix build error when libcap-dev is installed

* Switch to using artifact uploads instead of pages to store/show the coverage report

* Fix artifact upload yaml

* Upload coverage report to codecov

* Fix codecov - clearly it doesnt do a recursive search for coverage files

* Fix codecov - my hopeful use of a list of directories didnt work

* Fix codecov - unfortunately, it doesnt just consume the coverage data and needs us to generate the gcov output

* Fix codecov - nope, it still doesnt recursively search

* Fix codecov - it really helps if I run the gcov data generator

* Add a simple matrix build

* Fix older ubuntu versions of gcovr that do not support the '--html-title' option

* Ensure we use gcover options that are identical on older ubuntu

* Improve coverage generation and required build packages
2021-09-27 15:26:06 +05:45
Logan oos EvenandGitHub f0a4f65067 updated n2n.7 man page (#825) 2021-09-27 14:57:26 +05:45
Logan oos EvenandGitHub 0d39f50051 created space for more REGISTER type cookies 2021-09-27 02:41:14 +05:45
Logan oos EvenandGitHub 5a93fdf166 created space for more REGISTER type cookies
... to allow better differentiation between several (future) REGISTER / ACK transmission paths
2021-09-27 02:29:29 +05:45
Logan oos EvenandGitHub 40f1894956 hid community name at management port if header encryption enabled (#822) 2021-09-26 05:01:53 +05:45
Logan oos EvenandGitHub cc2b0b6b6b added support for N2N_FEDERATION environment variable (#820) 2021-09-26 04:32:12 +05:45
Logan oos EvenandGitHub 56a81f02b8 fixes (#819) 2021-09-26 00:17:47 +05:45
Logan oos EvenandGitHub a09d9ab698 updated Scratchpad.md 2021-09-25 16:10:38 +05:45
Logan oos EvenandGitHub dfe15ad95d added support for N2N_PASSWORD environment variable (#818) 2021-09-25 16:01:11 +05:45
09fdfb0424 added support for COMMUNITY_NAME environment variable (#814)
Co-authored-by: codeneno <qsmy_qin@163.com>
Co-authored-by: Logan oos Even <Logan.00sEven@gmail.com>
2021-09-25 15:15:16 +05:45
Logan oos EvenandGitHub f093996535 moved up 'send_unregister_super()' to happen before 'WaitForSingleObject()' (Windows TAP thread's end) 2021-09-23 15:54:55 +05:45
lucktuandGitHub c4d56574ef polished edge's management port output (#805) 2021-09-20 18:01:07 +05:45
Luca Deri d4e0f5a445 Warnign fixes 2021-09-18 09:39:57 +02:00
Logan oos EvenandGitHub 37c556b57b modified edge's management port output (#801) 2021-09-18 01:04:24 +05:45
skyformat99andGitHub a87a124316 Update supernode.c (#800)
fix #799
2021-09-17 15:22:26 +02:00
Hamish ColemanandGitHub 9caa8902b0 Fix build error when libcap-dev is installed (#798)
* Fix build error when libcap-dev is installed

* Revert 829ba29, allowing LDLIBS based fix to work
2021-09-17 15:20:55 +02:00
Luca Deri 829ba29a2b Fixes regression introduced by https://github.com/ntop/n2n/commit/35ec7336a6dce19c4b670a4ad90620478f2c40d9 that put libraries in wrong order causing edge to fail during linking 2021-09-17 10:14:11 +00:00
Logan oos EvenandGitHub dd41689bb9 added supernode version and uptime information to edge management port output (#796) 2021-09-17 02:34:09 +05:45
Hamish ColemanandGitHub 35ec7336a6 simplified the makefiles (#795)
* Move the makefiles towards a clearer arrangement

* Break circular make dependancy and start using implicit rules for most compilation

* Fix old cmake to compile again after renames
2021-09-16 18:34:04 +05:45
Logan oos EvenandGitHub 593387fe30 compile fix (#794) 2021-09-16 15:07:33 +05:45
Hamish ColemanandGitHub 370ea9bd37 addressed all but one of the remaining compile warnings (#793)
* Fix the mismatched char, uint8_t warnings

* Ensure we leave room for zero termination and then ensure the string is terminated

* GCC has a warning if it thinks your could overflow your snprintf buffer, but dont check for said overflow
2021-09-16 14:45:46 +05:45
Logan oos EvenandGitHub 05f40c64db relocated 'detect_local_ip_address()' (#792) 2021-09-16 14:15:21 +05:45
Logan oos EvenandGitHub 9c22d28562 relocated 'detect_local_ip_address()' (#791) 2021-09-16 12:20:35 +05:45
Hamish ColemanandGitHub 6b353141b4 addressed warnings (#790) 2021-09-15 22:08:45 +05:45
Logan oos EvenandGitHub 72d703c449 disabled edge's multicast peer detection if used with '-e' (#783) 2021-09-13 21:03:35 +05:45
Logan oos EvenandGitHub 8eb13165d4 added another type cast to socket handling 2021-09-13 15:07:34 +05:45
Logan oos EvenandGitHub 46205c6cff added type cast to socket handling 2021-09-13 14:40:28 +05:45
Logan oos EvenandGitHub c5970986f5 replaced 'close()' with 'closesocket()' 2021-09-13 13:39:15 +05:45
Logan oos EvenandGitHub b3bf36f867 separated 'detect_local_ip_address()' function (#781) 2021-09-13 11:33:27 +05:45
Logan oos EvenandGitHub 7f1fe9a499 allowed edge to optionally auto-detetct local IP address ('-e auto') for advertising as preferred (#776) 2021-09-12 00:22:05 +05:45
Logan oos EvenandGitHub defad50f87 removed '-p' cli option requirement for (#775) 2021-09-11 20:54:09 +05:45
Logan oos EvenandGitHub 92aa5ebee6 updated Scratchpad.md 2021-09-10 03:23:48 +05:45
Logan oos EvenandGitHub 52efc6ffad compilation fix 2021-09-09 14:10:01 +05:45
Logan oos EvenandGitHub 7fa0cc1e0a added preferred socket handling (-e) (#765) 2021-09-09 14:07:29 +05:45