chore: rebrand backone names, add lint gate + agent docs
- CI: build/validate use backone selftest + binary names, add lint.yml - make-*.mk: emit/install backone binaries, drop zerotier-one paths - doc/debian/ext.installfiles: backone manpages, service, init, te - rule-compiler: npm test runs test.js; attic world planet files - AGENTS.md repository guidelines, tools/lint.sh changed-lines gate - gitignore: /backone-selftest, *.gcno, *.gcda
This commit is contained in:
1 parent
104d781614
commit
c550fe0684
37 files changed
+881
-565
No files matched your search
@@ -31,14 +31,14 @@ jobs:
|
||||
- name: selftest
|
||||
run: |
|
||||
make selftest
|
||||
./zerotier-selftest
|
||||
./backone-selftest
|
||||
- name: 'Tar files' # keeps permissions (execute)
|
||||
run: tar -cvf zerotier-one.tar zerotier-one
|
||||
run: tar -cvf backone.tar backone
|
||||
- name: Archive production artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: zerotier-one-ubuntu-x64
|
||||
path: zerotier-one.tar
|
||||
name: backone-ubuntu-x64
|
||||
path: backone.tar
|
||||
retention-days: 7
|
||||
|
||||
build_macos:
|
||||
@@ -75,14 +75,14 @@ jobs:
|
||||
- name: selftest
|
||||
run: |
|
||||
make selftest
|
||||
./zerotier-selftest
|
||||
./backone-selftest
|
||||
- name: 'Tar files' # keeps permissions (execute)
|
||||
run: tar -cvf zerotier-one.tar zerotier-one
|
||||
run: tar -cvf backone.tar backone
|
||||
- name: Archive production artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: zerotier-one-mac
|
||||
path: zerotier-one.tar
|
||||
name: backone-mac
|
||||
path: backone.tar
|
||||
retention-days: 7
|
||||
|
||||
|
||||
@@ -118,6 +118,6 @@ jobs:
|
||||
- name: Archive production artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: zerotier-one-windows
|
||||
name: backone-windows
|
||||
path: windows/Build
|
||||
retention-days: 7
|
||||
@@ -0,0 +1,25 @@
|
||||
name: Lint
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
clang-format:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
# Pin: format results differ across clang-format versions.
|
||||
- run: pip install --user clang-format==23.1.1 && echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
||||
- name: Check changed lines
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" = "pull_request" ]; then
|
||||
BASE="${{ github.event.pull_request.base.sha }}"
|
||||
elif [ "${{ github.event.before }}" != "" ] && [ "${{ github.event.before }}" != "0000000000000000000000000000000000000000" ]; then
|
||||
BASE="${{ github.event.before }}"
|
||||
else
|
||||
BASE="$(git merge-base HEAD "origin/${{ github.event.repository.default_branch }}" || echo HEAD~1)"
|
||||
fi
|
||||
./tools/lint.sh "$BASE"
|
||||
@@ -38,9 +38,9 @@ test() {
|
||||
export NS1="ip netns exec ns1"
|
||||
export NS2="ip netns exec ns2"
|
||||
|
||||
export ZT1="$NS1 ./zerotier-cli -p9996 -D$(pwd)/node1"
|
||||
export ZT1="$NS1 ./backone-cli -p9996 -D$(pwd)/node1"
|
||||
# Specify custom port on one node to ensure that feature works
|
||||
export ZT2="$NS2 ./zerotier-cli -p9997 -D$(pwd)/node2"
|
||||
export ZT2="$NS2 ./backone-cli -p9997 -D$(pwd)/node2"
|
||||
|
||||
echo -e "\nSetting up network namespaces..."
|
||||
echo "Setting up ns1"
|
||||
@@ -102,13 +102,13 @@ test() {
|
||||
--xml=yes \
|
||||
--xml-file=$FILENAME_MEMORY_LOG \
|
||||
--leak-check=full \
|
||||
./zerotier-one node1 -p$ZT_PORT_NODE_1 -U >>node_1.log 2>&1 &
|
||||
./backone node1 -p$ZT_PORT_NODE_1 -U >>node_1.log 2>&1 &
|
||||
|
||||
# Second instance, not run in memory profiler
|
||||
# Don't set up internet access until _after_ zerotier is running
|
||||
# This has been a source of stuckness in the past.
|
||||
$NS2 ip addr del 192.168.1.2/24 dev veth3
|
||||
$NS2 sudo ./zerotier-one node2 -U -p$ZT_PORT_NODE_2 >>node_2.log 2>&1 &
|
||||
$NS2 sudo ./backone node2 -U -p$ZT_PORT_NODE_2 >>node_2.log 2>&1 &
|
||||
|
||||
sleep 10; # New HTTP control plane is a bit sluggish, so we delay here
|
||||
|
||||
@@ -170,9 +170,9 @@ test() {
|
||||
|
||||
echo -e "\n\nRunning ZeroTier processes:"
|
||||
echo -e "\nNode 1:\n"
|
||||
$NS1 ps aux | grep zerotier-one
|
||||
$NS1 ps aux | grep backone
|
||||
echo -e "\nNode 2:\n"
|
||||
$NS2 ps aux | grep zerotier-one
|
||||
$NS2 ps aux | grep backone
|
||||
|
||||
echo -e "\n\nStatus of each instance:"
|
||||
|
||||
@@ -319,10 +319,10 @@ exit_test_and_generate_report() {
|
||||
node2_id=$($ZT2 -j status | jq -r .address)
|
||||
|
||||
$ZT1 dump
|
||||
mv zerotier_dump.txt "$TEST_FILEPATH_PREFIX-node-dump-$node1_id.txt"
|
||||
mv backone_dump.txt "$TEST_FILEPATH_PREFIX-node-dump-$node1_id.txt"
|
||||
|
||||
$ZT2 dump
|
||||
mv zerotier_dump.txt "$TEST_FILEPATH_PREFIX-node-dump-$node2_id.txt"
|
||||
mv backone_dump.txt "$TEST_FILEPATH_PREFIX-node-dump-$node2_id.txt"
|
||||
|
||||
# Copy ZeroTier stdout/stderr logs
|
||||
|
||||
@@ -386,7 +386,7 @@ exit_test_and_generate_report() {
|
||||
"commit":"$ZTO_COMMIT",
|
||||
"arch_m":"$(uname -m)",
|
||||
"arch_a":"$(uname -a)",
|
||||
"binary_size":"$(stat -c %s zerotier-one)",
|
||||
"binary_size":"$(stat -c %s backone)",
|
||||
"time_length_test":$time_length_test,
|
||||
"time_to_both_nodes_online":$time_to_both_nodes_online,
|
||||
"num_possible_bytes_lost": $POSSIBLY_LOST,
|
||||
@@ -448,7 +448,7 @@ spam_cli() {
|
||||
check_exit_on_invalid_identity() {
|
||||
echo "Checking ZeroTier exits on invalid identity..."
|
||||
mkdir -p $(pwd)/exit_test
|
||||
ZT1="sudo ./zerotier-one -p9999 $(pwd)/exit_test"
|
||||
ZT1="sudo ./backone -p9999 $(pwd)/exit_test"
|
||||
echo "asdfasdfasdfasdf" > $(pwd)/exit_test/identity.secret
|
||||
echo "asdfasdfasdfasdf" > $(pwd)/exit_test/authtoken.secret
|
||||
|
||||
@@ -473,20 +473,20 @@ check_exit_on_invalid_identity() {
|
||||
check_bind_to_correct_ports() {
|
||||
PORT_NUMBER=$1
|
||||
echo "Checking bound ports:"
|
||||
sudo netstat -anp | grep "$PORT_NUMBER" | grep "zerotier"
|
||||
if [[ $(sudo netstat -anp | grep "$PORT_NUMBER" | grep "zerotier" | grep "tcp") ]];
|
||||
sudo netstat -anp | grep "$PORT_NUMBER" | grep "backone"
|
||||
if [[ $(sudo netstat -anp | grep "$PORT_NUMBER" | grep "backone" | grep "tcp") ]];
|
||||
then
|
||||
:
|
||||
else
|
||||
exit_test_and_generate_report $TEST_FAIL "ZeroTier did not bind to tcp/$1"
|
||||
fi
|
||||
if [[ $(sudo netstat -anp | grep "$PORT_NUMBER" | grep "zerotier" | grep "tcp6") ]];
|
||||
if [[ $(sudo netstat -anp | grep "$PORT_NUMBER" | grep "backone" | grep "tcp6") ]];
|
||||
then
|
||||
:
|
||||
else
|
||||
exit_test_and_generate_report $TEST_FAIL "ZeroTier did not bind to tcp6/$1"
|
||||
fi
|
||||
if [[ $(sudo netstat -anp | grep "$PORT_NUMBER" | grep "zerotier" | grep "udp") ]];
|
||||
if [[ $(sudo netstat -anp | grep "$PORT_NUMBER" | grep "backone" | grep "udp") ]];
|
||||
then
|
||||
:
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user