Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • ferivoz/tor
  • saysayo/tor
  • arma/tor
  • sebastian/tor
  • eighthave/tor
  • nickm/tor
  • aliraheem/tor
  • thompsonb/tor
  • sysrqb/tor
  • dgoulet/tor
  • appveyor/tor
  • gaba/tor
  • ZerXes/tor
  • dzwdz/tor
  • Spydar007/tor
  • ashuio/tor
  • guinness/tor
  • MacroFake/tor
  • Jigsaw52/tor
  • emilybones/tor
  • acidsys/tor
  • pedbap/tor
  • cohosh/tor
  • rhatto/tor
  • gus/tor
  • anonym/tor
  • delroth/tor
  • anarcat/tor
  • hirenpatel/tor
  • ValdikSS/tor
  • yanmaani/tor
  • ammarfaizi2/tor
  • gk/tor
  • Hello71/tor
  • pseudonymisaTor/tor
  • tpo/core/tor
  • lavamind/tor
  • c/tor
  • pastly/tor
  • ahf-test/tor
  • asn/tor
  • mikeperry/tor
  • sickcodes/tor
  • oliver/tor
  • haxxpop/tor
  • 0x00A5/tor
  • qontinuum/tor
  • landloard/tor
  • sergi/tor
  • gabi-250/tor
  • orbea/tor
  • TheEnbyperor/tor
  • friendly73/tor
  • trinity-1686a/tor
  • gotlou/tor
  • n0toose/tor
  • agowa338/tor
  • morgan/tor
  • juga/tor
  • eas/tor
  • Vort/tor
  • NeonVapor/tor
  • Gedsh/tor
  • nonameformee/tor
  • jnewsome/tor-core
  • thesamesam/tor
  • ZachLiebl/zach-liebl-tor
  • hiro/tor
  • excurso/tor
  • kpcyrd/tor
  • ahf/tor
  • pierov/tor
  • DanWin/tor
  • muellerrAtDickinsonDotedu/tor
  • ldqr/tor
  • r0cket/tor
  • neel/tor
  • twofaktor/tor
  • gogo2464/tor
  • meskio/tor
80 results
Show changes
Commits on Source (4729)
......@@ -8,8 +8,6 @@ clone_depth: 50
image:
# Windows Server 2019
- Visual Studio 2019
# Windows Server 2012 R2
- Visual Studio 2015
environment:
compiler: mingw
......@@ -18,7 +16,7 @@ environment:
- target: i686-w64-mingw32
compiler_path: mingw32
mingw_prefix: mingw-w64-i686
hardening:
hardening: --enable-all-bugs-are-fatal
- target: x86_64-w64-mingw32
compiler_path: mingw64
mingw_prefix: mingw-w64-x86_64
......@@ -36,13 +34,7 @@ matrix:
target: i686-w64-mingw32
compiler_path: mingw32
mingw_prefix: mingw-w64-i686
hardening:
- image: Visual Studio 2015
target: x86_64-w64-mingw32
compiler_path: mingw64
mingw_prefix: mingw-w64-x86_64
# hardening doesn't work with mingw-w64-x86_64-gcc, because it's gcc 8
hardening: --disable-gcc-hardening
hardening: --enable-all-bugs-are-fatal
install:
- ps: >-
......@@ -61,7 +53,12 @@ install:
# unprefixed packages are from MSYS2, which is like Cygwin. Avoid them.
#
# Use pacman --debug to show package downloads and install locations
#
# All installed library dlls must be copied to the test and app
# directories, before running tor's tests. (See below.)
#>
Execute-Command "C:\msys64\usr\bin\pacman" -Syu --verbose --noconfirm pacman ;
- ps: >-
Execute-Command "C:\msys64\usr\bin\pacman" -Sy --verbose --needed --noconfirm ${env:mingw_prefix}-libevent ${env:mingw_prefix}-openssl ${env:mingw_prefix}-pkg-config ${env:mingw_prefix}-xz ${env:mingw_prefix}-zstd ;
build_script:
......@@ -82,7 +79,7 @@ build_script:
# mingw zstd doesn't come with a pkg-config file, so we manually
# configure its flags. liblzma just works.
#>
Execute-Bash "ZSTD_CFLAGS='-L/${env:compiler_path}/include' ZSTD_LIBS='-L/${env:compiler_path}/lib -lzstd' ../configure --prefix=/${env:compiler_path} --build=${env:target} --host=${env:target} --with-openssl-dir=/${env:compiler_path} --disable-asciidoc --enable-fatal-warnings ${env:hardening}"
Execute-Bash "ZSTD_CFLAGS='-L/${env:compiler_path}/include' ZSTD_LIBS='-L/${env:compiler_path}/lib -lzstd' ../configure --prefix=/${env:compiler_path} --build=${env:target} --host=${env:target} --with-openssl-dir=/${env:compiler_path} --disable-asciidoc --enable-fatal-warnings ${env:hardening} CFLAGS='-D__USE_MINGW_ANSI_STDIO=0'"
Execute-Bash "V=1 make -k -j2"
Execute-Bash "V=1 make -k -j2 install"
}
......@@ -95,9 +92,18 @@ test_script:
$buildpath = @("C:\msys64\${env:compiler_path}\bin") + $oldpath
$env:Path = $buildpath -join ';'
Set-Location "${env:build}"
Copy-Item "C:/msys64/${env:compiler_path}/bin/libssp-0.dll" -Destination "${env:build}/src/test"
Copy-Item "C:/msys64/${env:compiler_path}/bin/zlib1.dll" -Destination "${env:build}/src/test"
Execute-Bash "VERBOSE=1 make -k -j2 check"
<# Some compiler dlls must be copied to the test and app
# directories, before running tor's tests.
#>
Copy-Item "C:/msys64/${env:compiler_path}/bin/libssp-0.dll","C:/msys64/${env:compiler_path}/bin/zlib1.dll" -Destination "${env:build}/src/test"
Copy-Item "C:/msys64/${env:compiler_path}/bin/libssp-0.dll","C:/msys64/${env:compiler_path}/bin/zlib1.dll" -Destination "${env:build}/src/app"
<# All installed library dlls must be copied to the test and app
# directories, before running tor's tests.
# (See install command above.)
#>
Copy-Item "C:/${env:compiler_path}/bin/libcrypto*.dll","C:/${env:compiler_path}/bin/libssl*.dll","C:/${env:compiler_path}/bin/liblzma*.dll","C:/${env:compiler_path}/bin/libevent*.dll","C:/${env:compiler_path}/bin/libzstd*.dll" -Destination "${env:build}/src/test"
Copy-Item "C:/${env:compiler_path}/bin/libcrypto*.dll","C:/${env:compiler_path}/bin/libssl*.dll","C:/${env:compiler_path}/bin/liblzma*.dll","C:/${env:compiler_path}/bin/libevent*.dll","C:/${env:compiler_path}/bin/libzstd*.dll" -Destination "${env:build}/src/app"
Execute-Bash "VERBOSE=1 TOR_SKIP_TESTCASES=crypto/openssl_version make -k -j2 check"
}
on_finish:
......
# DO NOT COMMIT OR MERGE CODE THAT IS RUN THROUGH THIS TOOL YET.
#
# WE ARE STILL DISCUSSING OUR DESIRED STYLE AND ITERATING ON IT.
# (12 Feb 2020)
---
Language: Cpp
# Out of all supported styles, LLVM seems closest to our own.
BasedOnStyle: LLVM
################
#
# Deviations from LLVM's style.
#
################
# We prefer an indentation width of 4 columns; LLVM likes 2.
## OVERRIDE FOR COMPARISON
IndentWidth: 2
## OVERRIDE FOR COMPARISON
## for now i'm not sorting includes, since that makes every file get touched.
SortIncludes: false
# We prefer 79; llvm likes 80.
ColumnLimit: 79
# Where do we want to put backslashes on multiline macros? Our choices are
# "as far left as possible", "as far right as possible", and "make no changes."
# LLVM defaults to right, but we don't dig that.
AlignEscapedNewlines: Left
# When we see a bunch of things in a row with comments after them, should we
# try to align those comments? Doing so makes some of our code pretty ugly.
AlignTrailingComments: false
# We use a function declaration style much closer to BSD KNF than to LLVM's.
# We say:
# int foo(int x);
# int
# foo(int x)
# {
# ...
# }
# whereas llvm prefers:
# int foo(int x);
# int foo(int x) {
# ...
# }
# or even:
# int foo(int x) { ... }
#
BreakBeforeBraces: Custom
BraceWrapping:
AfterFunction: true
AllowShortFunctionsOnASingleLine: None
AlwaysBreakAfterReturnType: AllDefinitions
# We don't like blocks to start with an empty line.
#
KeepEmptyLinesAtTheStartOfBlocks: false
################
#
# Tor-specific magic
#
################
#
# These comments are magical, and should not be changed.
#
CommentPragmas: 'LCOV_EXCL|COVERITY'
#
# Remove duplicate empty lines.
#
MaxEmptyLinesToKeep: 1
#
# Indent preprocessor directives, for clarity.
#
IndentPPDirectives: AfterHash
#
# These introduce an iteration, and work a bit like a for loop.
#
# Note that we can NOT include ones that don't work like "for". For example,
# if the body is an argument to the macro, we can't list it here.
#
ForEachMacros:
- MAP_FOREACH
- MAP_FOREACH_MODIFY
- TOR_SIMPLEQ_FOREACH
- TOR_SIMPLEQ_FOREACH_SAFE
- TOR_SLIST_FOREACH
- TOR_SLIST_FOREACH_SAFE
- TOR_LIST_FOREACH
- TOR_LIST_FOREACH_SAFE
- TOR_TAILQ_FOREACH
- TOR_TAILQ_FOREACH_SAFE
- TOR_TAILQ_FOREACH_REVERSE
- TOR_TAILQ_FOREACH_REVERSE_SAFE
- TOR_CIRCLEQ_FOREACH
- TOR_CIRCLEQ_FOREACH_SAFE
- TOR_CIRCLEQ_FOREACH_REVERSE
- TOR_CIRCLEQ_FOREACH_REVERSE_SAFE
- HT_FOREACH
- SMARTLIST_FOREACH_BEGIN
- DIGESTMAP_FOREACH
- DIGESTMAP_FOREACH_MODIFY
- DIGEST256MAP_FOREACH
- DIGEST256MAP_FOREACH_MODIFY
- SDMAP_FOREACH
- RIMAP_FOREACH
- EIMAP_FOREACH
#
# Omitting:
#
# - SMARTLIST_FOREACH, since the body of the loop is an argument.
#
# This explains how to sort our headers.
#
# This is more complex than it truly should be, but I've edited this till
# compilation still mostly passes.
#
# I'm disabling this, however, since it's a distraction from the other
# formatting issues. See SortIncludes above.
#
IncludeCategories:
- Regex: '^"orconfig.h'
Priority: -30
- Regex: '^"ext/'
Priority: -18
- Regex: '^"lib/'
Priority: -10
- Regex: '^"core/or/or.h'
Priority: -5
- Regex: '^"core/'
Priority: 5
- Regex: '^"feature/'
Priority: 10
- Regex: '^"app/'
Priority: 20
#
# These macros should always cause indentation, as though they were { and }.
#
# Do NOT put macros here unless you want an extra level of indentation between
# them whenever they appear.
#
MacroBlockBegin: "^STMT_BEGIN|TT_STMT_BEGIN$"
MacroBlockEnd: "^STMT_END|TT_STMT_END$"
#
# These macros are interpreted as types.
# (Not supported in my clang-format)
#
# TypenameMacros:
# - "STACK_OF"
...
......@@ -6,6 +6,7 @@
*.swo
# C stuff
*.o
*.a
*.obj
# Diff droppings
*.orig
......@@ -36,6 +37,14 @@ details-*.json
uptime-*.json
*.full_url
*.last_modified
# Core files
core
core.*
!core/
# ccls file that can be per directory.
*.ccls
# clangd uses that for LSP caching.
/.cache
# /
/Makefile
......@@ -45,7 +54,6 @@ uptime-*.json
/autom4te.cache
/build-stamp
/compile
/config.rust
/configure
/Doxyfile
/orconfig.h
......@@ -56,13 +64,14 @@ uptime-*.json
/config.guess
/config.sub
/conftest*
/link_rust.sh
/micro-revision.*
/patch-stamp
/stamp-h
/stamp-h.in
/stamp-h1
/tags
/TAGS
/target
/test-driver
/tor.sh
/tor.spec
......@@ -73,17 +82,15 @@ uptime-*.json
/Tor*Bundle.dmg
/tor-*-win32.exe
/warning_flags
/compile_commands.json
/coverage_html/
/callgraph/
# /contrib/
/contrib/dist/tor.sh
/contrib/dist/torctl
/contrib/dist/tor.service
/contrib/operator-tools/tor.logrotate
/contrib/dist/suse/tor.sh
# /debian/
/debian/files
......@@ -99,31 +106,31 @@ uptime-*.json
/doc/Makefile
/doc/Makefile.in
/doc/doxygen
/doc/tor.1
/doc/tor.1.in
/doc/tor.html
/doc/tor.html.in
/doc/tor.1.xml
/doc/tor-gencert.1
/doc/tor-gencert.1.in
/doc/tor-gencert.html
/doc/tor-gencert.html.in
/doc/tor-gencert.1.xml
/doc/tor-resolve.1
/doc/tor-resolve.1.in
/doc/tor-resolve.html
/doc/tor-resolve.html.in
/doc/tor-resolve.1.xml
/doc/torify.1
/doc/torify.1.in
/doc/torify.html
/doc/torify.html.in
/doc/torify.1.xml
/doc/tor-print-ed-signing-cert.1
/doc/tor-print-ed-signing-cert.1.in
/doc/tor-print-ed-signing-cert.html
/doc/tor-print-ed-signing-cert.html.in
/doc/tor-print-ed-signing-cert.1.xml
/doc/man/tor.1
/doc/man/tor.1.in
/doc/man/tor.html
/doc/man/tor.html.in
/doc/man/tor.1.xml
/doc/man/tor-gencert.1
/doc/man/tor-gencert.1.in
/doc/man/tor-gencert.html
/doc/man/tor-gencert.html.in
/doc/man/tor-gencert.1.xml
/doc/man/tor-resolve.1
/doc/man/tor-resolve.1.in
/doc/man/tor-resolve.html
/doc/man/tor-resolve.html.in
/doc/man/tor-resolve.1.xml
/doc/man/torify.1
/doc/man/torify.1.in
/doc/man/torify.html
/doc/man/torify.html.in
/doc/man/torify.1.xml
/doc/man/tor-print-ed-signing-cert.1
/doc/man/tor-print-ed-signing-cert.1.in
/doc/man/tor-print-ed-signing-cert.html
/doc/man/tor-print-ed-signing-cert.html.in
/doc/man/tor-print-ed-signing-cert.1.xml
# /doc/spec/
/doc/spec/Makefile
......@@ -132,14 +139,13 @@ uptime-*.json
# /scripts
/scripts/maint/checkOptionDocs.pl
/scripts/maint/updateVersions.pl
scripts/maint/geoip/geoip
scripts/maint/geoip/geoip6
# /src/
/src/Makefile
/src/Makefile.in
# /src/trace
/src/trace/libor-trace.a
# /src/config/
/src/config/Makefile
/src/config/Makefile.in
......@@ -149,99 +155,16 @@ uptime-*.json
/src/config/torrc.minimal
# /src/ext/
/src/ext/ed25519/ref10/libed25519_ref10.a
/src/ext/ed25519/ref10/libed25519_ref10.lib
/src/ext/ed25519/donna/libed25519_donna.a
/src/ext/ed25519/donna/libed25519_donna.lib
/src/ext/keccak-tiny/libkeccak-tiny.a
/src/ext/keccak-tiny/libkeccak-tiny.lib
# /src/lib
/src/lib/libcurve25519_donna.a
/src/lib/libtor-buf.a
/src/lib/libtor-buf-testing.a
/src/lib/libtor-compress.a
/src/lib/libtor-compress-testing.a
/src/lib/libtor-confmgt.a
/src/lib/libtor-confmgt-testing.a
/src/lib/libtor-container.a
/src/lib/libtor-container-testing.a
/src/lib/libtor-crypt-ops.a
/src/lib/libtor-crypt-ops-testing.a
/src/lib/libtor-ctime.a
/src/lib/libtor-ctime-testing.a
/src/lib/libtor-dispatch.a
/src/lib/libtor-dispatch-testing.a
/src/lib/libtor-encoding.a
/src/lib/libtor-encoding-testing.a
/src/lib/libtor-evloop.a
/src/lib/libtor-evloop-testing.a
/src/lib/libtor-err.a
/src/lib/libtor-err-testing.a
/src/lib/libtor-fdio.a
/src/lib/libtor-fdio-testing.a
/src/lib/libtor-fs.a
/src/lib/libtor-fs-testing.a
/src/lib/libtor-geoip.a
/src/lib/libtor-geoip-testing.a
/src/lib/libtor-intmath.a
/src/lib/libtor-intmath-testing.a
/src/lib/libtor-lock.a
/src/lib/libtor-lock-testing.a
/src/lib/libtor-log.a
/src/lib/libtor-log-testing.a
/src/lib/libtor-malloc.a
/src/lib/libtor-malloc-testing.a
/src/lib/libtor-math.a
/src/lib/libtor-math-testing.a
/src/lib/libtor-memarea.a
/src/lib/libtor-memarea-testing.a
/src/lib/libtor-meminfo.a
/src/lib/libtor-meminfo-testing.a
/src/lib/libtor-net.a
/src/lib/libtor-net-testing.a
/src/lib/libtor-osinfo.a
/src/lib/libtor-osinfo-testing.a
/src/lib/libtor-process.a
/src/lib/libtor-process-testing.a
/src/lib/libtor-pubsub.a
/src/lib/libtor-pubsub-testing.a
/src/lib/libtor-sandbox.a
/src/lib/libtor-sandbox-testing.a
/src/lib/libtor-string.a
/src/lib/libtor-string-testing.a
/src/lib/libtor-smartlist-core.a
/src/lib/libtor-smartlist-core-testing.a
/src/lib/libtor-term.a
/src/lib/libtor-term-testing.a
/src/lib/libtor-thread.a
/src/lib/libtor-thread-testing.a
/src/lib/libtor-time.a
/src/lib/libtor-time-testing.a
/src/lib/libtor-tls.a
/src/lib/libtor-tls-testing.a
/src/lib/libtor-trace.a
/src/lib/libtor-version.a
/src/lib/libtor-version-testing.a
/src/lib/libtor-wallclock.a
/src/lib/libtor-wallclock-testing.a
# /src/tor
/src/core/libtor-app.a
/src/core/libtor-app-testing.a
# /src/app
/src/app/tor
/src/app/tor.exe
/src/app/tor-cov
/src/app/tor-cov.exe
# /src/rust
/src/rust/.cargo/config
/src/rust/.cargo/registry
/src/rust/target
/src/rust/registry
# /src/test
/src/test/Makefile
/src/test/Makefile.in
......@@ -275,7 +198,6 @@ uptime-*.json
/src/test/fuzz/lf-fuzz-*
# /src/tools/
/src/tools/libtorrunner.a
/src/tools/tor-checkkey
/src/tools/tor-resolve
/src/tools/tor-cov-resolve
......@@ -291,10 +213,6 @@ uptime-*.json
/src/tools/Makefile
/src/tools/Makefile.in
# /src/trunnel/
/src/trunnel/libor-trunnel-testing.a
/src/trunnel/libor-trunnel.a
# /src/win32/
/src/win32/Makefile
/src/win32/Makefile.in
before_script:
- apt-get update -qq
- apt-get upgrade -qy
build:
script:
- apt-get install -qy --fix-missing automake build-essential
libevent-dev libssl-dev zlib1g-dev
libseccomp-dev liblzma-dev libscrypt-dev
- ./autogen.sh
- ./configure --disable-asciidoc --enable-fatal-warnings
--disable-silent-rules
- make check || (e=$?; cat test-suite.log; exit $e)
- make install
update:
only:
- schedules
script:
- "apt-get install -y --fix-missing git openssh-client"
# Run ssh-agent (inside the build environment)
- eval $(ssh-agent -s)
# Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store
- ssh-add <(echo "$DEPLOY_KEY")
# For Docker builds disable host key checking. Be aware that by adding that
# you are susceptible to man-in-the-middle attacks.
# WARNING: Use this only with the Docker executor, if you use it with shell
# you will overwrite your user's SSH config.
- mkdir -p ~/.ssh
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
# In order to properly check the server's host key, assuming you created the
# SSH_SERVER_HOSTKEYS variable previously, uncomment the following two lines
# instead.
- mkdir -p ~/.ssh
- '[[ -f /.dockerenv ]] && echo "$SSH_SERVER_HOSTKEYS" > ~/.ssh/known_hosts'
- echo "merging from torgit"
- git config --global user.email "labadmin@oniongit.eu"
- git config --global user.name "gitadmin"
- "mkdir tor"
- "cd tor"
- git clone --bare https://git.torproject.org/tor.git
- git push --mirror git@oniongit.eu:network/tor.git
####
# DO NOT EDIT THIS FILE IN MASTER. ONLY EDIT IT IN THE OLDEST SUPPORTED
# BRANCH, THEN MERGE FORWARD.
####
# This file controls how gitlab validates Tor commits and merge requests.
#
# It is primarily based on a set of scripts and configurations by
# Hans-Christoph Steiner. It only copies parts of those scripts and
# configurations for now. If you want a new piece of functionality
# (more debians, more fedoras, android support) then you shouldn't
# start from scratch: have a look at the original ticket, at
# https://gitlab.torproject.org/tpo/core/tor/-/issues/32193 !
#
# The file to copy from is
# https://gitlab.torproject.org/tpo/core/tor/-/merge_requests/96/diffs#diff-content-587d266bb27a4dc3022bbed44dfa19849df3044c
#
# Having said that, if there is anything really stupid here, don't
# blame it on Hans-Christoph! Tor probably added it on their own.
#
# Copyright 2020, The Tor Project, Inc.
# See LICENSE for licence information.
# These variables are set everywhere, unconditionally.
variables:
TERM: "ansi"
DEBUG_CI: "yes"
# This template is for exporting ephemeral things from the scripts. By
# convention we expect our scripts to copy stuff into artifacts/, rather than
# having a big list of files that be treated as artifacts.
.artifacts-template: &artifacts-template
artifacts:
name: "${CI_PROJECT_PATH}_${CI_JOB_STAGE}_${CI_COMMIT_REF_NAME}_${CI_COMMIT_SHA}"
expire_in: 1 week
when: always
paths:
- artifacts/
# This template is used for x86-64 builds.
.x86-64-template: &x86-64-template
tags:
- amd64
- physical
# This template should be usable on any system that's based on apt.
.apt-template: &apt-template |
export LC_ALL=C.UTF-8
echo Etc/UTC > /etc/timezone
mkdir -p apt-cache
export APT_CACHE_DIR="$(pwd)/apt-cache"
rm -f /etc/apt/apt.conf.d/docker-clean
echo 'quiet "1";' \
'Acquire::Retries "20";' \
'APT::Install-Recommends "0";' \
'APT::Install-Suggests "0";' \
'APT::Get::Assume-Yes "true";' \
'Dpkg::Use-Pty "0";' \
"Dir::Cache::Archives \"${APT_CACHE_DIR}\"; " \
>> /etc/apt/apt.conf.d/99gitlab
apt-get update -qq
apt-get upgrade -qy
# This template sets us up for Debian system in particular.
.debian-template: &debian-template
<<: *artifacts-template
<<: *x86-64-template
variables:
DEBIAN_FRONTEND: "noninteractive"
# TODO: Using "cache" in this way speeds up our downloads. It would be
# even better, though, to start with a pre-upgraded debian image.
#
# TODO: Will we have to do this differently once we have more than one
# debian version that we're using?
cache:
key: apt
paths:
- apt-cache
before_script:
- *apt-template
# Install patches unconditionally.
- apt-get install
apt-utils
automake
build-essential
ca-certificates
file
git
libevent-dev
liblzma-dev
libscrypt-dev
libseccomp-dev
libssl-dev
pkg-config
python3
zlib1g-dev
# Install patches that we only need for some use cases.
- if [ "$ASCIIDOC" = yes ]; then apt-get install asciidoc xmlto; fi
- if [ "$DOXYGEN" = yes ]; then apt-get install doxygen; fi
- if [ "$STEM" = yes ]; then apt-get install timelimit; fi
- if [ "$CC" = clang ]; then apt-get install clang; fi
- if [ "$NSS" = yes ]; then apt-get install libnss3 libnss3-dev; fi
# llvm-symbolizer for sanitizer backtrace
- if [ "$HARDENING" = yes ]; then apt-get install llvm; fi
# TODO: This next line should not be debian-only.
- if [ "$STEM" = yes ]; then git clone --depth 1 https://gitlab.torproject.org/tpo/network-health/stem.git ; export STEM_PATH="$(pwd)/stem"; fi
# TODO: This next line should not be debian-only.
- |
if [ "$CHUTNEY" = yes ]; then
# Use a fixed version of chutney to avoid surprise breakage.
CHUTNEY_SHALLOW_SINCE=2024-10-28
CHUTNEY_COMMIT=be881a1e7c4bc8038fa13fde4a7b24e5c56349c4
git clone --shallow-since "$CHUTNEY_SHALLOW_SINCE" https://gitlab.torproject.org/tpo/core/chutney.git
git -C ./chutney checkout "$CHUTNEY_COMMIT"
export CHUTNEY_PATH="$(pwd)/chutney"
# Have pip install chutney's python dependencies by installing chutney
# itself.
apt-get install python3-pip
pip3 install --user ./chutney
fi
- if [ "$TRACING" = yes ]; then apt install liblttng-ust-dev; fi
# Minimal check on debian: just make, make check.
#
debian-minimal:
image: containers.torproject.org/tpo/tpa/base-images/debian:bullseye
<<: *debian-template
script:
- ./scripts/ci/ci-driver.sh
# Minimal check on debian/i386: just make, make check.
#
debian-i386-minimal:
# TODO: Use a TPA-maintained image when there is one.
# See https://gitlab.torproject.org/tpo/tpa/base-images/-/issues/3
image:
name: i386/debian:bullseye
docker:
platform: linux/386
<<: *debian-template
script:
- ./scripts/ci/ci-driver.sh
tags:
- physical
#####
# Run "make check" with a hardened clang on debian stable. This takes
# care of a hardening check, and a compile-with-clang check.
#
# TODO: This will be faster once we merge #40098 and #40099.
debian-hardened:
image: containers.torproject.org/tpo/tpa/base-images/debian:bullseye
<<: *debian-template
variables:
ALL_BUGS_ARE_FATAL: "yes"
HARDENING: "yes"
CC: "clang"
script:
- ./scripts/ci/ci-driver.sh
#####
# Distcheck on debian stable
debian-distcheck:
image: containers.torproject.org/tpo/tpa/base-images/debian:bullseye
<<: *debian-template
variables:
DISTCHECK: "yes"
CHECK: "no"
script:
- ./scripts/ci/ci-driver.sh
#####
# Documentation tests on debian stable: doxygen and asciidoc.
debian-docs:
image: containers.torproject.org/tpo/tpa/base-images/debian:bullseye
<<: *debian-template
variables:
DOXYGEN: "yes"
ASCIIDOC: "yes"
CHECK: "no"
RUN_STAGE_BUILD: "no"
script:
- ./scripts/ci/ci-driver.sh
#####
# Integration tests on debian stable: chutney and stem.
#
# TODO: It would be cool if this target didn't have to re-build tor, and
# could instead re-use Tor from debian-minimal. That can be done
# with the 'artifacts' mechanism, in theory, but it would be good to
# avoid having to have a system with hundreds of artifacts.
debian-integration:
image: containers.torproject.org/tpo/tpa/base-images/debian:bullseye
<<: *debian-template
variables:
CHECK: "no"
CHUTNEY: "yes"
CHUTNEY_MAKE_TARGET: "test-network-all"
STEM: "yes"
ALL_BUGS_ARE_FATAL: "yes"
script:
- ./scripts/ci/ci-driver.sh
#####
# Tracing build on Debian stable.
debian-tracing:
image: containers.torproject.org/tpo/tpa/base-images/debian:bullseye
<<: *debian-template
variables:
TRACING: "yes"
CHECK: "no"
DISTCHECK: "yes"
script:
- ./scripts/ci/ci-driver.sh
#####
# No-authority mode
debian-disable-dirauth:
image: containers.torproject.org/tpo/tpa/base-images/debian:bullseye
<<: *debian-template
variables:
DISABLE_DIRAUTH: "yes"
script:
- ./scripts/ci/ci-driver.sh
#####
# No-relay mode
debian-disable-relay:
image: containers.torproject.org/tpo/tpa/base-images/debian:bullseye
<<: *debian-template
variables:
DISABLE_RELAY: "yes"
script:
- ./scripts/ci/ci-driver.sh
#####
# GPL licensed mode, enables pow module
debian-gpl:
image: containers.torproject.org/tpo/tpa/base-images/debian:bullseye
<<: *debian-template
variables:
GPL: "yes"
script:
- ./scripts/ci/ci-driver.sh
#####
# NSS check on debian
debian-nss:
image: containers.torproject.org/tpo/tpa/base-images/debian:bullseye
<<: *debian-template
variables:
NSS: "yes"
script:
- ./scripts/ci/ci-driver.sh
#####
# Debian packaging triggers for maintenance branches
debian-packaging-0.4.5:
stage: deploy
trigger:
project: tpo/core/debian/tor
branch: debian-0.4.5
rules:
- if: $CI_PROJECT_NAMESPACE == "tpo/core" &&
$CI_COMMIT_BRANCH == "maint-0.4.5"
debian-packaging-0.4.6:
stage: deploy
trigger:
project: tpo/core/debian/tor
branch: debian-0.4.6
rules:
- if: $CI_PROJECT_NAMESPACE == "tpo/core" &&
$CI_COMMIT_BRANCH == "maint-0.4.6"
#####
# Run tests written in Rust, and run clippy on all Rust code here.
rust-latest:
image: rust:latest
<<: *debian-template
script:
- apt-get install llvm-dev libclang-dev clang
- rustup show
- cargo build --locked --verbose
- cargo test --verbose
- rustup component add clippy
- rustup show
- cargo clippy --all-features --all-targets -- -D warnings
after_script:
- cargo clean
### Summary
### Steps to reproduce:
1. Step 1
2. ...
### What is the current bug behavior?
### What is the expected behavior?
### Environment
- Which version of Tor are you using? Run `tor --version` to get the version if you are unsure.
- Which operating system are you using? For example: Debian GNU/Linux 10.1, Windows 10, Ubuntu Xenial, FreeBSD 12.2, etc.
- Which installation method did you use? Distribution package (apt, pkg, homebrew), from source tarball, from Git, etc.
### Relevant logs and/or screenshots
### Possible fixes
/label ~Bug
### Summary
### What is the expected behavior?
/label ~Feature
[submodule "src/ext/rust"]
path = src/ext/rust
url = https://git.torproject.org/tor-rust-dependencies
......@@ -2,13 +2,6 @@ language: c
cache:
ccache: true
## cargo: true
directories:
- $HOME/.cargo
## caching CARGO_TARGET_DIR actually slows down the build over time,
## because old build products are never deleted.
## where we point CARGO_TARGET_DIR in all our cargo invocations
#- $TRAVIS_BUILD_DIR/src/rust/target
compiler:
- gcc
......@@ -26,11 +19,14 @@ env:
- MAKEFLAGS="-k -j 2"
## We turn on hardening by default
## Also known as --enable-fragile-hardening in 0.3.0.3-alpha and later
- HARDENING_OPTIONS="--enable-expensive-hardening"
- HARDENING_OPTIONS="--enable-all-bugs-are-fatal --enable-expensive-hardening"
## We turn off asciidoc by default, because it's slow
- ASCIIDOC_OPTIONS="--disable-asciidoc"
## Our default rust version is the minimum supported version
- RUST_VERSION="1.31.0"
## Turn off tor's sandbox in chutney, until we fix sandbox errors that are
## triggered by Ubuntu Xenial and Bionic. See #32722.
- CHUTNEY_TOR_SANDBOX="0"
## The default target for chutney jobs
- CHUTNEY_MAKE="test-network-all"
matrix:
## This matrix entry is required, but it doesn't actually create any jobs
-
......@@ -38,51 +34,45 @@ env:
matrix:
## include creates builds with gcc, linux, unless we override those defaults
include:
## We run basic tests on macOS
## We run chutney on macOS, because macOS Travis has IPv6
## But we only run the IPv6 chutney tests, to speed up the job
- env: CHUTNEY_MAKE="test-network-ipv6" CHUTNEY="yes" CHUTNEY_ALLOW_FAILURES="2" SKIP_MAKE_CHECK="yes"
os: osx
## We also run basic tests on macOS
- compiler: clang
os: osx
## Turn off some newer features, turn on clang's -Wtypedef-redefinition
env: C_DIALECT_OPTIONS="-std=gnu99"
## We check NSS
## Use -std=gnu99 to turn off some newer features, and maybe turn on some
## extra gcc warnings?
- env: NSS_OPTIONS="--enable-nss" C_DIALECT_OPTIONS="-std=gnu99"
## Also, disable ALL_BUGS_ARE_FATAL macro.
env: C_DIALECT_OPTIONS="-std=gnu99" HARDENING_OPTIONS="--enable-expensive-hardening"
## We run chutney on Linux, because it's faster than chutney on macOS
## Chutney is a fast job, clang is slower on Linux, so we do Chutney clang
- env: CHUTNEY="yes" CHUTNEY_ALLOW_FAILURES="2" SKIP_MAKE_CHECK="yes"
compiler: clang
## (Linux only) Use an older Linux image (Ubuntu Trusty)
## The Xenial and Bionic images cause permissions issues for chutney,
## this is a workaround, until we fix #32240.
dist: trusty
## We check asciidoc with distcheck, to make sure we remove doc products
## We use Linux clang, because there are no other Linux clang jobs
- env: DISTCHECK="yes" ASCIIDOC_OPTIONS="" SKIP_MAKE_CHECK="yes"
compiler: clang
## We include a single coverage build with the best options for coverage
- env: COVERAGE_OPTIONS="--enable-coverage" HARDENING_OPTIONS="" TOR_TEST_RNG_SEED="636f766572616765"
## We run rust on Linux, because it's faster than rust on macOS
## We check rust offline
- env: RUST_OPTIONS="--enable-rust" TOR_RUST_DEPENDENCIES=true
## We check asciidoc with distcheck, to make sure we remove doc products
- env: DISTCHECK="yes" ASCIIDOC_OPTIONS="" SKIP_MAKE_CHECK="yes"
## We check disable module relay
- env: MODULES_OPTIONS="--disable-module-relay"
- env: MODULES_OPTIONS="--disable-module-relay" HARDENING_OPTIONS="--enable-expensive-hardening"
## We check disable module dirauth
- env: MODULES_OPTIONS="--disable-module-dirauth"
## macOS builds are very slow, and we have a limited number of
## concurrent macOS jobs. We're not actively developing Rust, so it is
## the lowest priority.
## We run rust on macOS, because we have seen macOS rust failures before
#- env: RUST_VERSION="nightly" RUST_OPTIONS="--enable-rust --enable-cargo-online-mode"
# compiler: clang
# os: osx
## We run chutney on macOS, because macOS Travis has IPv6
- env: CHUTNEY="yes" CHUTNEY_ALLOW_FAILURES="2" SKIP_MAKE_CHECK="yes"
os: osx
- env: MODULES_OPTIONS="--disable-module-dirauth" HARDENING_OPTIONS="--enable-expensive-hardening"
## We check NSS
## Use -std=gnu99 to turn off some newer features, and maybe turn on some
## extra gcc warnings?
- env: NSS_OPTIONS="--enable-nss" C_DIALECT_OPTIONS="-std=gnu99" HARDENING_OPTIONS="--enable-expensive-hardening"
## We include a single coverage build with the best options for coverage
- env: COVERAGE_OPTIONS="--enable-coverage" HARDENING_OPTIONS="" TOR_TEST_RNG_SEED="636f766572616765"
## We clone our stem repo and run `make test-stem`
- env: TEST_STEM="yes" SKIP_MAKE_CHECK="yes"
## We run `make doxygen` without `make check`.
- env: SKIP_MAKE_CHECK="yes" DOXYGEN="yes"
## Allow the build to report success (with non-required sub-builds
## continuing to run) if all required sub-builds have succeeded.
fast_finish: true
......@@ -90,16 +80,10 @@ matrix:
## Careful! We use global envs, which makes it hard to allow failures by env:
## https://docs.travis-ci.com/user/customizing-the-build#matching-jobs-with-allow_failures
allow_failures:
## macOS rust and chutney are very slow, so we let the build finish before
## they are done. We'd like to fast finish, but still eventually show
## any failures in the build status. But Travis doesn't have that ability.
- env: RUST_VERSION="nightly" RUST_OPTIONS="--enable-rust --enable-cargo-online-mode"
compiler: clang
os: osx
- env: CHUTNEY="yes" CHUTNEY_ALLOW_FAILURES="2" SKIP_MAKE_CHECK="yes"
os: osx
## test-stem sometimes hangs on Travis
- env: TEST_STEM="yes" SKIP_MAKE_CHECK="yes"
## Since we're actively developing IPv6, we want to require the IPv6
## chutney tests
#- env: CHUTNEY_MAKE="test-network-ipv6" CHUTNEY="yes" CHUTNEY_ALLOW_FAILURES="2" SKIP_MAKE_CHECK="yes"
# os: osx
## (Linux only) Use a recent Linux image (Ubuntu Bionic)
dist: bionic
......@@ -120,8 +104,7 @@ addons:
- libnss3-dev
- libscrypt-dev
- libseccomp-dev
## zstd doesn't exist in Ubuntu Trusty
#- libzstd
- libzstd-dev
## Optional build dependencies
- coccinelle
- shellcheck
......@@ -131,6 +114,7 @@ addons:
- docbook-xsl
- docbook-xml
- xmlto
- doxygen
## Utilities
## preventing or diagnosing hangs
- timelimit
......@@ -172,8 +156,6 @@ osx_image: xcode11.2
before_install:
## Set pipefail: we use pipes
- set -o pipefail || echo "pipefail failed"
## Create empty rust directories for non-Rust builds, so caching succeeds
- if [[ "$RUST_OPTIONS" == "" ]]; then mkdir -p $HOME/.cargo $TRAVIS_BUILD_DIR/src/rust/target; fi
install:
## If we're on OSX, configure ccache (ccache is automatically installed and configured on Linux)
......@@ -185,13 +167,6 @@ install:
- if [[ "$COVERAGE_OPTIONS" != "" ]]; then pip install --user cpp-coveralls; fi
## If we're on OSX, and using asciidoc, configure asciidoc
- if [[ "$ASCIIDOC_OPTIONS" == "" ]] && [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export XML_CATALOG_FILES="/usr/local/etc/xml/catalog"; fi
## If we're using Rust, download rustup
- if [[ "$RUST_OPTIONS" != "" ]]; then curl -Ssf -o rustup.sh https://sh.rustup.rs; fi
## Install the stable channels of rustc and cargo and setup our toolchain environment
- if [[ "$RUST_OPTIONS" != "" ]]; then sh rustup.sh -y --default-toolchain $RUST_VERSION; fi
- if [[ "$RUST_OPTIONS" != "" ]]; then source $HOME/.cargo/env; fi
## If we're testing rust builds in offline-mode, then set up our vendored dependencies
- if [[ "$TOR_RUST_DEPENDENCIES" == "true" ]]; then export TOR_RUST_DEPENDENCIES=$PWD/src/ext/rust/crates; fi
## If we're running chutney, install it.
- if [[ "$CHUTNEY" != "" ]]; then git clone --depth 1 https://github.com/torproject/chutney.git ; export CHUTNEY_PATH="$(pwd)/chutney"; fi
## If we're running stem, install it.
......@@ -200,13 +175,6 @@ install:
## Finally, list installed package versions
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then dpkg-query --show; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew list --versions; fi
## Get some info about rustup, rustc and cargo
- if [[ "$RUST_OPTIONS" != "" ]]; then which rustup; fi
- if [[ "$RUST_OPTIONS" != "" ]]; then which rustc; fi
- if [[ "$RUST_OPTIONS" != "" ]]; then which cargo; fi
- if [[ "$RUST_OPTIONS" != "" ]]; then rustup --version; fi
- if [[ "$RUST_OPTIONS" != "" ]]; then rustc --version; fi
- if [[ "$RUST_OPTIONS" != "" ]]; then cargo --version; fi
## Get python version
- python --version
## If we're running chutney, show the chutney commit
......@@ -222,19 +190,20 @@ install:
- dd ibs=1 count=1024 if=/dev/urandom > ~/.torrc
script:
# Skip test_rebind on macOS
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export TOR_SKIP_TEST_REBIND=true; fi
# Skip test_rebind and test_include on macOS
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export TOR_SKIP_TEST_REBIND=true; export TOR_SKIP_TEST_INCLUDE=true; fi
- ./autogen.sh
- CONFIGURE_FLAGS="$ASCIIDOC_OPTIONS $COVERAGE_OPTIONS $HARDENING_OPTIONS $MODULES_OPTIONS $NSS_OPTIONS $OPENSSL_OPTIONS $RUST_OPTIONS --enable-fatal-warnings --disable-silent-rules"
- CONFIGURE_FLAGS="$ASCIIDOC_OPTIONS $COVERAGE_OPTIONS $HARDENING_OPTIONS $MODULES_OPTIONS $NSS_OPTIONS $OPENSSL_OPTIONS --enable-fatal-warnings --disable-silent-rules"
- echo "Configure flags are $CONFIGURE_FLAGS CC=\"$CC $C_DIALECT_OPTIONS\""
- ./configure $CONFIGURE_FLAGS CC="$CC $C_DIALECT_OPTIONS"
- ./configure $CONFIGURE_FLAGS CC="$CC $C_DIALECT_OPTIONS";
## We run `make check` because that's what https://jenkins.torproject.org does.
- if [[ "$SKIP_MAKE_CHECK" == "" ]]; then make check; fi
- if [[ "$DISTCHECK" != "" ]]; then make distcheck DISTCHECK_CONFIGURE_FLAGS="$CONFIGURE_FLAGS"; fi
- if [[ "$CHUTNEY" != "" ]]; then make test-network-all; fi
- if [[ "$CHUTNEY" != "" ]]; then make "$CHUTNEY_MAKE"; fi
## Diagnostic for bug 29437: kill stem if it hangs for 9.5 minutes
## Travis will kill the job after 10 minutes with no output
- if [[ "$TEST_STEM" != "" ]]; then make src/app/tor; timelimit -p -t 540 -s USR1 -T 30 -S ABRT python3 "$STEM_SOURCE_DIR"/run_tests.py --tor src/app/tor --integ --test control.controller --test control.base_controller --test process --log TRACE --log-file stem.log; fi
- if [[ "$DOXYGEN" != "" ]]; then make doxygen; fi
## If this build was one that produced coverage, upload it.
- if [[ "$COVERAGE_OPTIONS" != "" ]]; then coveralls -b . --exclude src/test --exclude src/trunnel --gcov-options '\-p' || echo "Coverage failed"; fi
......@@ -247,16 +216,13 @@ after_failure:
## `make distcheck` puts it somewhere different.
- if [[ "$DISTCHECK" != "" ]]; then make show-distdir-testlog || echo "make failed"; fi
- if [[ "$DISTCHECK" != "" ]]; then make show-distdir-core || echo "make failed"; fi
- if [[ "$CHUTNEY" != "" ]]; then ls test_network_log || echo "ls failed"; cat test_network_log/* || echo "cat failed"; fi
- if [[ "$CHUTNEY" != "" ]]; then "$CHUTNEY_PATH/tools/diagnostics.sh" || echo "diagnostics failed"; ls test_network_log || echo "ls failed"; cat test_network_log/* || echo "cat failed"; fi
- if [[ "$TEST_STEM" != "" ]]; then tail -1000 "$STEM_SOURCE_DIR"/test/data/tor_log || echo "tail failed"; fi
- if [[ "$TEST_STEM" != "" ]]; then grep -v "SocketClosed" stem.log | tail -1000 || echo "grep | tail failed"; fi
before_cache:
## Delete all gcov files.
- if [[ "$COVERAGE_OPTIONS" != "" ]]; then make reset-gcov; fi
## Delete the cargo registry before caching .cargo, because it's cheaper to
## download the registry and throw it away, rather than caching it
- rm -rf $HOME/.cargo/registry
notifications:
irc:
......
......@@ -3,5 +3,4 @@ where people feel safe to engage, share their points of view, and
participate. For the latest version of our Code of Conduct, please
see
https://gitweb.torproject.org/community/policies.git/plain/code_of_conduct.txt
https://community.torproject.org/policies/code_of_conduct/
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "aho-corasick"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6748e8def348ed4d14996fa801f4122cd763fff530258cdc03f64b25f89d3a5a"
dependencies = [
"memchr",
]
[[package]]
name = "argh"
version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7e7e4aa7e40747e023c0761dafcb42333a9517575bbf1241747f68dd3177a62"
dependencies = [
"argh_derive",
"argh_shared",
]
[[package]]
name = "argh_derive"
version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69f2bd7ff6ed6414f4e5521bd509bae46454bbd513801767ced3f21a751ab4bc"
dependencies = [
"argh_shared",
"heck",
"proc-macro2",
"quote",
"syn 1.0.99",
]
[[package]]
name = "argh_shared"
version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "47253b98986dafc7a3e1cf3259194f1f47ac61abb57a57f46ec09e48d004ecda"
[[package]]
name = "bindgen"
version = "0.66.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2b84e06fc203107bfbad243f4aba2af864eb7db3b1cf46ea0a023b0b433d2a7"
dependencies = [
"bitflags",
"cexpr",
"clang-sys",
"lazy_static",
"lazycell",
"log",
"peeking_take_while",
"prettyplease",
"proc-macro2",
"quote",
"regex",
"rustc-hash",
"shlex",
"syn 2.0.28",
"which",
]
[[package]]
name = "bitflags"
version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635"
[[package]]
name = "cc"
version = "1.0.82"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "305fe645edc1442a0fa8b6726ba61d422798d37a52e12eaecf4b022ebbb88f01"
dependencies = [
"jobserver",
"libc",
]
[[package]]
name = "cexpr"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
dependencies = [
"nom",
]
[[package]]
name = "cfg-if"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "clang-sys"
version = "1.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f"
dependencies = [
"glob",
"libc",
"libloading",
]
[[package]]
name = "either"
version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07"
[[package]]
name = "geoip-db-tool"
version = "0.1.0"
dependencies = [
"argh",
"ipnetwork",
"rangemap",
]
[[package]]
name = "glob"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
[[package]]
name = "heck"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c"
dependencies = [
"unicode-segmentation",
]
[[package]]
name = "hex-literal"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46"
[[package]]
name = "ipnetwork"
version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "02c3eaab3ac0ede60ffa41add21970a7df7d91772c03383aac6c2c3d53cc716b"
dependencies = [
"serde",
]
[[package]]
name = "jobserver"
version = "0.1.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2"
dependencies = [
"libc",
]
[[package]]
name = "lazy_static"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]]
name = "lazycell"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
[[package]]
name = "libc"
version = "0.2.147"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3"
[[package]]
name = "libloading"
version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f"
dependencies = [
"cfg-if",
"winapi",
]
[[package]]
name = "log"
version = "0.4.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"
[[package]]
name = "memchr"
version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
[[package]]
name = "minimal-lexical"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
[[package]]
name = "nom"
version = "7.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
dependencies = [
"memchr",
"minimal-lexical",
]
[[package]]
name = "once_cell"
version = "1.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
[[package]]
name = "peeking_take_while"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
[[package]]
name = "prettyplease"
version = "0.2.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c64d9ba0963cdcea2e1b2230fbae2bab30eb25a174be395c41e764bfb65dd62"
dependencies = [
"proc-macro2",
"syn 2.0.28",
]
[[package]]
name = "proc-macro2"
version = "1.0.66"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
version = "1.0.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965"
dependencies = [
"proc-macro2",
]
[[package]]
name = "rangemap"
version = "0.1.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3929836cb64d09ee7deee59635c3d9bffbc1c0373e247efff6272abd62a11baa"
[[package]]
name = "regex"
version = "1.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "81bc1d4caf89fac26a70747fe603c130093b53c773888797a6329091246d651a"
dependencies = [
"aho-corasick",
"memchr",
"regex-automata",
"regex-syntax",
]
[[package]]
name = "regex-automata"
version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fed1ceff11a1dddaee50c9dc8e4938bd106e9d89ae372f192311e7da498e3b69"
dependencies = [
"aho-corasick",
"memchr",
"regex-syntax",
]
[[package]]
name = "regex-syntax"
version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2"
[[package]]
name = "rustc-hash"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
[[package]]
name = "serde"
version = "1.0.143"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "53e8e5d5b70924f74ff5c6d64d9a5acd91422117c60f48c4e07855238a254553"
[[package]]
name = "shlex"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
[[package]]
name = "syn"
version = "1.0.99"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "58dbef6ec655055e20b86b15a8cc6d439cca19b667537ac6a1369572d151ab13"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "syn"
version = "2.0.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "tor-c-equix"
version = "0.2.0"
dependencies = [
"bindgen",
"cc",
"hex-literal",
]
[[package]]
name = "unicode-ident"
version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4f5b37a154999a8f3f98cc23a628d850e154479cd94decf3414696e12e31aaf"
[[package]]
name = "unicode-segmentation"
version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99"
[[package]]
name = "which"
version = "4.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269"
dependencies = [
"either",
"libc",
"once_cell",
]
[[package]]
name = "winapi"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
dependencies = [
"winapi-i686-pc-windows-gnu",
"winapi-x86_64-pc-windows-gnu",
]
[[package]]
name = "winapi-i686-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
[[package]]
name = "winapi-x86_64-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
# See doc/HACKING/Rust.md
#
# There is no plan to offer a stable Rust API to the C implementation of Tor.
# This workspace is for wrapper crates that are used internally by Arti for
# cross-compatibility and comparison testing.
[workspace]
members = [
"src/ext/equix",
"scripts/maint/geoip/geoip-db-tool",
]
resolver = "2"
This diff is collapsed.
......@@ -863,10 +863,9 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
EXCLUDE = ./src/ext \
EXCLUDE = ./src/ext/ed25519 \
./src/trunnel \
./src/test \
./src/rust/registry
./src/test
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded
......
......@@ -187,39 +187,16 @@ getdelim.c is distributed under this license:
POSSIBILITY OF SUCH DAMAGE.
===============================================================================
src/config/geoip is licensed under the following license:
OPEN DATA LICENSE (GeoLite Country and GeoLite City databases)
Copyright (c) 2008 MaxMind, Inc. All Rights Reserved.
All advertising materials and documentation mentioning features or use of
this database must display the following acknowledgment:
"This product includes GeoLite data created by MaxMind, available from
http://maxmind.com/"
Redistribution and use with or without modification, are permitted provided
that the following conditions are met:
1. Redistributions must retain the above copyright notice, this list of
conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.
2. All advertising materials and documentation mentioning features or use of
this database must display the following acknowledgement:
"This product includes GeoLite data created by MaxMind, available from
http://maxmind.com/"
3. "MaxMind" may not be used to endorse or promote products derived from this
database without specific prior written permission.
THIS DATABASE IS PROVIDED BY MAXMIND, INC ``AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL MAXMIND BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
DATABASE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
src/config/geoip and src/config/geoip6:
These files are based on the IPFire Location Database. For more
information, see https://location.ipfire.org/.
The data is distributed under a creative commons "BY-SA 4.0" license.
Find the full license terms at:
https://creativecommons.org/licenses/by-sa/4.0/
===============================================================================
m4/pc_from_ucontext.m4 is available under the following license. Note that
it is *not* built into the Tor software.
......
......@@ -14,6 +14,7 @@ CLEANFILES=
TESTS=
noinst_PROGRAMS=
DISTCLEANFILES=
MOSTLYCLEANFILES=
bin_SCRIPTS=
AM_CPPFLAGS=\
-I$(top_srcdir)/src \
......@@ -35,12 +36,6 @@ else
TESTING_TOR_BINARY=$(top_builddir)/src/app/tor$(EXEEXT)
endif
if USE_RUST
rust_ldadd=$(top_builddir)/$(TOR_RUST_LIB_PATH)
else
rust_ldadd=
endif
# "Common" libraries used to link tor's utility code.
TOR_UTIL_LIBS = \
src/lib/libtor-geoip.a \
......@@ -70,8 +65,10 @@ TOR_UTIL_LIBS = \
src/lib/libtor-wallclock.a \
src/lib/libtor-err.a \
src/lib/libtor-version.a \
src/lib/libtor-llharden.a \
src/lib/libtor-intmath.a \
src/lib/libtor-ctime.a
src/lib/libtor-ctime.a \
src/lib/libtor-metrics.a
# Variants of the above for linking the testing variant of tor (for coverage
# and tests)
......@@ -104,8 +101,10 @@ TOR_UTIL_TESTING_LIBS = \
src/lib/libtor-wallclock-testing.a \
src/lib/libtor-err-testing.a \
src/lib/libtor-version-testing.a \
src/lib/libtor-llharden-testing.a \
src/lib/libtor-intmath.a \
src/lib/libtor-ctime-testing.a
src/lib/libtor-ctime-testing.a \
src/lib/libtor-metrics-testing.a
endif
# Internal crypto libraries used in Tor
......@@ -115,6 +114,10 @@ TOR_CRYPTO_LIBS = \
$(LIBKECCAK_TINY) \
$(LIBDONNA)
if BUILD_MODULE_POW
TOR_CRYPTO_LIBS += $(EQUIX_LIBS)
endif
# Variants of the above for linking the testing variant of tor (for coverage
# and tests)
if UNITTESTS_ENABLED
......@@ -122,7 +125,8 @@ TOR_CRYPTO_TESTING_LIBS = \
src/lib/libtor-tls-testing.a \
src/lib/libtor-crypt-ops-testing.a \
$(LIBKECCAK_TINY) \
$(LIBDONNA)
$(LIBDONNA) \
$(EQUIX_LIBS)
endif
# All static libraries used to link tor.
......@@ -135,6 +139,14 @@ TOR_INTERNAL_LIBS = \
src/trunnel/libor-trunnel.a \
src/lib/libtor-trace.a
libtor.a: $(TOR_INTERNAL_LIBS)
$(AM_V_AR) export AR="$(AR)"; \
export ARFLAGS="$(ARFLAGS)"; \
export RANLIB="$(RANLIB)"; \
$(top_srcdir)/scripts/build/combine_libs libtor.a $(TOR_INTERNAL_LIBS)
MOSTLYCLEANFILES += libtor.a
# Variants of the above for linking the testing variant of tor (for coverage
# and tests)
if UNITTESTS_ENABLED
......@@ -146,6 +158,14 @@ TOR_INTERNAL_TESTING_LIBS = \
$(TOR_UTIL_TESTING_LIBS) \
src/trunnel/libor-trunnel-testing.a \
src/lib/libtor-trace.a
src/test/libtor-testing.a: $(TOR_INTERNAL_TESTING_LIBS)
$(AM_V_AR) export AR="$(AR)"; \
export ARFLAGS="$(ARFLAGS)"; \
export RANLIB="$(RANLIB)"; \
$(top_srcdir)/scripts/build/combine_libs src/test/libtor-testing.a $(TOR_INTERNAL_TESTING_LIBS)
MOSTLYCLEANFILES += src/test/libtor-testing.a
endif
TOR_LDFLAGS_CRYPTLIB=@TOR_LDFLAGS_openssl@
......@@ -162,15 +182,17 @@ include src/include.am
include doc/include.am
include contrib/include.am
manpages: $(nodist_man1_MANS)
EXTRA_DIST+= \
ChangeLog \
CONTRIBUTING \
CODE_OF_CONDUCT \
INSTALL \
LICENSE \
Makefile.nmake \
README \
README.md \
ReleaseNotes \
scripts/build/combine_libs \
scripts/maint/checkIncludes.py \
scripts/maint/checkSpace.pl \
scripts/maint/checkSpaceTest.sh \
......@@ -196,6 +218,8 @@ EXTRA_DIST+= \
scripts/maint/practracker/testdata/ex1-expected.txt \
scripts/maint/practracker/testdata/ex1.txt \
scripts/maint/practracker/testdata/ex1-overbroad-expected.txt \
scripts/maint/practracker/testdata/ex1-regen-expected.txt \
scripts/maint/practracker/testdata/ex1-regen-overbroad-expected.txt \
scripts/maint/practracker/testdata/ex.txt \
scripts/maint/practracker/testdata/header.h \
scripts/maint/practracker/testdata/not_c_file \
......@@ -227,7 +251,7 @@ endif
TEST_NETWORK_SHOW_WARNINGS_FOR_LAST_RUN_FLAGS=--quiet --only-warnings
if LIBFUZZER_ENABLED
TEST_CFLAGS += -fsanitize-coverage=trace-pc-guard,trace-cmp,trace-div
TEST_CFLAGS += -fsanitize=fuzzer-no-link
# not "edge"
endif
......@@ -269,69 +293,175 @@ check-local: \
check-spaces \
check-changes \
check-includes \
check-best-practices \
shellcheck \
check-cocci
shellcheck
# test-network requires a copy of Chutney in $CHUTNEY_PATH.
# Chutney can be cloned from https://gitlab.torproject.org/tpo/core/chutney.git .
.PHONY: need-chutney-path
need-chutney-path:
@if test ! -d "$$CHUTNEY_PATH"; then \
echo '$$CHUTNEY_PATH was not set.'; \
if test -d $(top_srcdir)/../chutney -a -x $(top_srcdir)/../chutney/chutney; then \
echo "Assuming test-network.sh will find" $(top_srcdir)/../chutney; \
if test -d "$(top_srcdir)/../chutney" && \
test -x "$(top_srcdir)/../chutney/chutney"; then \
echo "Assuming test-network.sh will find" \
"$(top_srcdir)/../chutney"; \
else \
echo; \
echo "To run these tests, git clone https://git.torproject.org/chutney.git ; export CHUTNEY_PATH=\`pwd\`/chutney"; \
echo "To run these tests," \
"git clone" \
"https://gitlab.torproject.org/tpo/core/chutney.git ;" \
"export CHUTNEY_PATH=\`pwd\`/chutney"; \
exit 1; \
fi \
fi
# Note that test-network requires a copy of Chutney in $CHUTNEY_PATH.
# Chutney can be cloned from https://git.torproject.org/chutney.git .
test-network: need-chutney-path $(TESTING_TOR_BINARY) src/tools/tor-gencert
$(top_srcdir)/src/test/test-network.sh $(TEST_NETWORK_FLAGS)
# Run some basic tests using automake's test-driver
.PHONY: test-network
# Hide directory path logs from submakes using $(MAKE) -s
test-network:
@$(MAKE) -s test-network-mkdir
@$(MAKE) -s test-network-clean
@$(MAKE) -s test-network-run \
ipv4_flavors="$(TEST_CHUTNEY_FLAVOR_QUICK)" \
ipv6_flavors="$(TEST_CHUTNEY_FLAVOR_QUICK_IPV6)"
@$(MAKE) -s test-network-results
# Run all available tests using automake's test-driver
# - only run IPv6 tests if we can ping6 or ping -6 ::1 (localhost)
# we try the syntax for BSD ping6, Linux ping6, and Linux ping -6,
# because they're incompatible
.PHONY: test-network-all
# Hide directory path logs from submakes using $(MAKE) -s
test-network-all:
@$(MAKE) -s test-network-mkdir
@$(MAKE) -s test-network-clean
@$(MAKE) -s test-network-run \
ipv4_flavors="$(TEST_CHUTNEY_FLAVORS)" \
mixed_flavors="$(TEST_CHUTNEY_FLAVORS_MIXED)" \
ipv6_flavors="$(TEST_CHUTNEY_FLAVORS_IPV6)" \
ipv6_mixed_flavors="$(TEST_CHUTNEY_FLAVORS_IPV6_MIXED)"
@$(MAKE) -s test-network-results
# Run IPv4 and mixed tests using automake's test-driver
.PHONY: test-network-ipv4
# Hide directory path logs from submakes using $(MAKE) -s
test-network-ipv4:
@$(MAKE) -s test-network-mkdir
@$(MAKE) -s test-network-clean
@$(MAKE) -s test-network-run \
ipv4_flavors="$(TEST_CHUTNEY_FLAVORS)" \
mixed_flavors="$(TEST_CHUTNEY_FLAVORS_MIXED)"
@$(MAKE) -s test-network-results
# Run IPv6 tests using automake's test-driver
.PHONY: test-network-ipv6
# Hide directory path logs from submakes using $(MAKE) -s
test-network-ipv6:
@$(MAKE) -s test-network-mkdir
@$(MAKE) -s test-network-clean
@$(MAKE) -s test-network-run \
ipv6_flavors="$(TEST_CHUTNEY_FLAVORS_IPV6)" \
ipv6_mixed_flavors="$(TEST_CHUTNEY_FLAVORS_IPV6_MIXED)"
@$(MAKE) -s test-network-results
# Make the test network log directory, if it does not exist
.PHONY: test-network-mkdir
test-network-mkdir:
@mkdir -p "$(TEST_NETWORK_ALL_LOG_DIR)"
# Clean the test network log directory
.PHONY: test-network-clean
# We need to remove all matching files, so we can't quote the glob part of the
# rm arguments
test-network-clean:
rm -f "$(TEST_NETWORK_ALL_LOG_DIR)"/*.log \
"$(TEST_NETWORK_ALL_LOG_DIR)"/*.trs
# Run tests using automake's test-driver
# When checking if a set of test can be run, log the type of test, and the
# list of tests that will be run (or skipped).
#
# Run the IPv4 tests in $(ipv4_flavors), unconditionally
# - tor relays and directory authorities require IPv4.
# Run the IPv6 tests in $(ipv6_flavors), unconditionally
# - clients don't technically require IPv6, but it's not worth
# supporting running this test suite on such systems.
# - some IPv6 tests may fail without an IPv6 DNS server
# (see #16971 and #17011)
# Run the mixed tests in $(mixed_flavors), if a tor-stable binary is available
# - only run mixed tests if we have a tor-stable binary
# - show tor warnings on the console after each network run
# (otherwise, warnings go to the logs, and people don't see them unless
# there is a network failure)
test-network-all: need-chutney-path test-driver $(TESTING_TOR_BINARY) src/tools/tor-gencert
mkdir -p $(TEST_NETWORK_ALL_LOG_DIR)
rm -f $(TEST_NETWORK_ALL_LOG_DIR)/*.log $(TEST_NETWORK_ALL_LOG_DIR)/*.trs
@flavors="$(TEST_CHUTNEY_FLAVORS)"; \
if ping6 -q -c 1 -o ::1 >/dev/null 2>&1 || ping6 -q -c 1 -W 1 ::1 >/dev/null 2>&1 || ping -6 -c 1 -W 1 ::1 >/dev/null 2>&1; then \
echo "ping6 ::1 or ping ::1 succeeded, running IPv6 flavors: $(TEST_CHUTNEY_FLAVORS_IPV6)."; \
flavors="$$flavors $(TEST_CHUTNEY_FLAVORS_IPV6)"; \
else \
echo "ping6 ::1 and ping ::1 failed, skipping IPv6 flavors: $(TEST_CHUTNEY_FLAVORS_IPV6)."; \
skip_flavors="$$skip_flavors $(TEST_CHUTNEY_FLAVORS_IPV6)"; \
# Run the IPv6 mixed tests in $(ipv6_mixed_flavors), if IPv6 and mixed are run
# - see above for details about IPv6 and mixed
.PHONY: test-network-run
# We need the word splitting in the "for" lines, so we can't quote
# $(skip_flavors) or $(flavors)
test-network-run: need-chutney-path test-driver $(TESTING_TOR_BINARY) src/tools/tor-gencert
@flavors=""; \
skip_flavors=""; \
if test -n "$(ipv4_flavors)"; then \
echo "Running IPv4 flavors: $(ipv4_flavors)."; \
flavors="$$flavors $(ipv4_flavors)"; \
fi; \
if command -v tor-stable >/dev/null 2>&1; then \
echo "tor-stable found, running mixed flavors: $(TEST_CHUTNEY_FLAVORS_MIXED)."; \
flavors="$$flavors $(TEST_CHUTNEY_FLAVORS_MIXED)"; \
else \
echo "tor-stable not found, skipping mixed flavors: $(TEST_CHUTNEY_FLAVORS_MIXED)."; \
skip_flavors="$$skip_flavors $(TEST_CHUTNEY_FLAVORS_MIXED)"; \
if test -n "$(ipv6_flavors)"; then \
echo "Running IPv6 flavors: $(ipv6_flavors)."; \
flavors="$$flavors $(ipv6_flavors)"; \
fi; \
test_network_mixed=false; \
if test -n "$(mixed_flavors)" || \
test -n "$(ipv6_mixed_flavors)"; then \
if command -v tor-stable >/dev/null 2>&1; then \
test_network_mixed=true; \
fi; \
fi; \
if test -n "$(mixed_flavors)"; then \
if test "$$test_network_mixed" = "true"; then \
echo "tor-stable found, running mixed flavors:" \
"$(mixed_flavors)."; \
flavors="$$flavors $(mixed_flavors)"; \
else \
echo "tor-stable not found, skipping mixed flavors:" \
"$(mixed_flavors)."; \
skip_flavors="$$skip_flavors $(mixed_flavors)"; \
fi; \
fi; \
if test -n "$(ipv6_mixed_flavors)"; then \
if test "$$test_network_mixed" = "true"; then \
echo "Running IPv6 mixed flavors:" \
"$(ipv6_mixed_flavors)."; \
flavors="$$flavors $(ipv6_mixed_flavors)"; \
else \
echo "Skipping IPv6 mixed flavors:" \
"$(ipv6_mixed_flavors)."; \
skip_flavors="$$skip_flavors $(ipv6_mixed_flavors)"; \
fi; \
fi; \
for f in $$skip_flavors; do \
echo "SKIP: $$f"; \
done; \
for f in $$flavors; do \
$(SHELL) $(top_srcdir)/test-driver --test-name $$f --log-file $(TEST_NETWORK_ALL_LOG_DIR)/$$f.log --trs-file $(TEST_NETWORK_ALL_LOG_DIR)/$$f.trs $(TEST_NETWORK_ALL_DRIVER_FLAGS) $(top_srcdir)/src/test/test-network.sh --flavor $$f $(TEST_NETWORK_FLAGS); \
$(top_srcdir)/src/test/test-network.sh $(TEST_NETWORK_SHOW_WARNINGS_FOR_LAST_RUN_FLAGS); \
done; \
echo "Log and result files are available in $(TEST_NETWORK_ALL_LOG_DIR)."; \
! grep -q FAIL $(TEST_NETWORK_ALL_LOG_DIR)/*.trs
$(SHELL) "$(top_srcdir)/test-driver" --test-name "$$f" \
--log-file "$(TEST_NETWORK_ALL_LOG_DIR)/$$f.log" \
--trs-file "$(TEST_NETWORK_ALL_LOG_DIR)/$$f.trs" \
$(TEST_NETWORK_ALL_DRIVER_FLAGS) \
"$(top_srcdir)/src/test/test-network.sh" \
--flavor "$$f" $(TEST_NETWORK_FLAGS); \
"$(top_srcdir)/src/test/test-network.sh" \
$(TEST_NETWORK_SHOW_WARNINGS_FOR_LAST_RUN_FLAGS); \
done
# Print the results from automake's test-driver
# - show tor warnings on the console after each network run
# (otherwise, warnings go to the logs, and people don't see them unless
# there is a network failure)
.PHONY: test-network-results
# We need to grep all matching files, so we can't quote the glob part of the
# grep arguments
test-network-results:
@echo \
"Log and result files are available in $(TEST_NETWORK_ALL_LOG_DIR)."
@! grep -q FAIL "$(TEST_NETWORK_ALL_LOG_DIR)"/*.trs
need-stem-path:
@if test ! -d "$$STEM_SOURCE_DIR"; then \
echo '$$STEM_SOURCE_DIR was not set.'; echo; \
echo "To run these tests, git clone https://git.torproject.org/stem.git/ ; export STEM_SOURCE_DIR=\`pwd\`/stem"; \
echo "To run these tests, git clone https://gitlab.torproject.org/tpo/network-health/stem ; export STEM_SOURCE_DIR=\`pwd\`/stem"; \
exit 1; \
fi
......@@ -389,6 +519,10 @@ coverage-html-full: all
genhtml --branch-coverage -o "$(HTML_COVER_DIR)" "$(HTML_COVER_DIR)/lcov.info"
# For scripts: avoid src/ext and src/trunnel.
# Keep these lists consistent:
# - OWNED_TOR_C_FILES in Makefile.am
# - CHECK_FILES in pre-commit.git-hook and pre-push.git-hook
# - try_parse in check_cocci_parse.sh
OWNED_TOR_C_FILES=\
$(top_srcdir)/src/lib/*/*.[ch] \
$(top_srcdir)/src/core/*/*.[ch] \
......@@ -436,7 +570,7 @@ check-typos:
$(top_srcdir)/doc \
$(top_srcdir)/contrib \
$(top_srcdir)/scripts \
$(top_srcdir)/README \
$(top_srcdir)/README.md \
$(top_srcdir)/ChangeLog \
$(top_srcdir)/INSTALL \
$(top_srcdir)/ReleaseNotes \
......@@ -447,51 +581,6 @@ check-typos:
echo "You can install the latest version of misspell here: https://github.com/client9/misspell#install"; \
fi
.PHONY: rustfmt
rustfmt:
if USE_RUST
@if test -x "`which cargo-fmt 2>&1;true`"; then \
echo "Formatting Rust code ..."; \
(cd "$(top_srcdir)/src/rust" && cargo fmt --all --); \
else \
echo "Tor uses rustfmt (via cargo-fmt) to format Rust code."; \
echo "However, it seems that you don't have rustfmt installed."; \
printf "You can install rustfmt by following the directions here:"; \
echo " https://github.com/rust-lang-nursery/rustfmt"; \
fi
endif
.PHONY: check-rustfmt
check-rustfmt:
if USE_RUST
@if test -x "`which cargo-fmt 2>&1;true`"; then \
printf "Running rustfmt..."; \
(cd "$(top_srcdir)/src/rust" && cargo fmt --all -- --check && echo "done.") || \
(echo "**************** check-rustfmt failed. ****************"; \
echo " Run \`make rustfmt\` to apply the above changes."; \
exit 1); \
else \
echo "Tor uses rustfmt (via cargo-fmt) to format Rust code."; \
echo "However, it seems that you don't have rustfmt installed."; \
printf "You can install rustfmt by following the directions here:"; \
echo " https://github.com/rust-lang-nursery/rustfmt"; \
fi
endif
.PHONY: clippy
clippy:
if USE_RUST
@if test -x "`which cargo-clippy 2>&1;true`"; then \
echo "Running cargo clippy ..."; \
echo "Prepare yourself for the onslaught of suggestions ..."; \
(cd "$(top_srcdir)/src/rust" && cargo clippy); \
else \
echo "Tor can use clippy to lint Rust code."; \
echo "However, it seems that you don't have clippy installed."; \
echo "You can install the latest version of clippy by following the directions here: https://github.com/rust-lang-nursery/rust-clippy"; \
fi
endif
.PHONY: check-changes
check-changes:
if USEPYTHON
......@@ -532,7 +621,7 @@ update-copyright:
$(PERL) $(top_srcdir)/scripts/maint/updateCopyright.pl $(OWNED_TOR_C_FILES)
.PHONY: autostyle
autostyle: update-versions rustfmt autostyle-ifdefs rectify-includes
autostyle: update-versions autostyle-ifdefs rectify-includes
mostlyclean-local:
rm -f $(top_builddir)/src/*/*.gc{da,no} $(top_builddir)/src/*/*/*.gc{da,no}
......@@ -540,14 +629,6 @@ mostlyclean-local:
rm -rf $(top_builddir)/doc/doxygen
rm -rf $(TEST_NETWORK_ALL_LOG_DIR)
clean-local:
rm -rf $(top_builddir)/src/rust/target
rm -rf $(top_builddir)/src/rust/.cargo/registry
if USE_RUST
distclean-local: distclean-rust
endif
# This relies on some internal details of how automake implements
# distcheck. We check two directories because automake-1.15 changed
# from $(distdir)/_build to $(distdir)/_build/sub.
......@@ -567,7 +648,25 @@ show-distdir-core:
file $(distdir)/_build/core; fi
show-libs:
@echo $(TOR_INTERNAL_LIBS)
@echo libtor.a
show-testing-libs:
@echo $(TOR_INTERNAL_TESTING_LIBS)
@echo src/test/libtor-testing.a
# Note here that we hardcode this -j2 because if the user would pass too many
# cores, bear actually chockes and dies :S. For this to work, a make clean
# needs to be done else bear will miss some compile flags.
lsp:
@if test -x "`which bear 2>&1;true`"; then \
echo "Generating LSP compile_commands.json. Might take few minutes..."; \
$(MAKE) clean 2>&1 >/dev/null; \
bear >/dev/null 2>&1 -- $(MAKE) -j2 2>&1 >/dev/null; \
echo "Generating .ccls file..."; \
./scripts/maint/gen_ccls_file.sh \
else \
echo "No bear command found. On debian, apt install bear"; \
fi
# Reproducible tarball. We change the tar options for this.
dist-reprod:
$(MAKE) dist am__tar="$${TAR-tar} --format=gnu --owner=root --group=root --sort=name --mtime=\"`git show --no-patch --format='%ci'`\" -chof - $(distdir)"
all:
cd src/common
$(MAKE) /F Makefile.nmake
cd ../../src/ext
$(MAKE) /F Makefile.nmake
cd ../../src/or
$(MAKE) /F Makefile.nmake
cd ../../src/test
$(MAKE) /F Makefile.nmake
clean:
cd src/common
$(MAKE) /F Makefile.nmake clean
cd ../../src/ext
$(MAKE) /F Makefile.nmake clean
cd ../../src/or
$(MAKE) /F Makefile.nmake clean
cd ../../src/test
$(MAKE) /F Makefile.nmake clean
Tor protects your privacy on the internet by hiding the connection
between your Internet address and the services you use. We believe Tor
is reasonably secure, but please ensure you read the instructions and
configure it properly.
To build Tor from source:
./configure && make && make install
To build Tor from a just-cloned git repository:
sh autogen.sh && ./configure && make && make install
Home page:
https://www.torproject.org/
Download new versions:
https://www.torproject.org/download/download.html
Documentation, including links to installation and setup instructions:
https://www.torproject.org/docs/documentation.html
Making applications work with Tor:
https://wiki.torproject.org/projects/tor/wiki/doc/TorifyHOWTO
Frequently Asked Questions:
https://www.torproject.org/docs/faq.html
To get started working on Tor development:
See the doc/HACKING directory.
Release timeline:
https://trac.torproject.org/projects/tor/wiki/org/teams/NetworkTeam/CoreTorReleases
Tor protects your privacy on the internet by hiding the connection between
your Internet address and the services you use. We believe Tor is reasonably
secure, but please ensure you read the instructions and configure it properly.
## Build
To build Tor from source:
```
./configure
make
make install
```
To build Tor from a just-cloned git repository:
```
./autogen.sh
./configure
make
make install
```
## Releases
The tarballs, checksums and signatures can be found here: https://dist.torproject.org
- Checksum: `<tarball-name>.sha256sum`
- Signatures: `<tarball-name>.sha256sum.asc`
### Schedule
You can find our release schedule here:
- https://gitlab.torproject.org/tpo/core/team/-/wikis/NetworkTeam/CoreTorReleases
### Keys that CAN sign a release
The following keys are the maintainers of this repository. One or many of
these keys can sign the releases, do NOT expect them all:
- Alexander Færøy:
[514102454D0A87DB0767A1EBBE6A0531C18A9179](https://keys.openpgp.org/vks/v1/by-fingerprint/1C1BC007A9F607AA8152C040BEA7B180B1491921)
- David Goulet:
[B74417EDDF22AC9F9E90F49142E86A2A11F48D36](https://keys.openpgp.org/vks/v1/by-fingerprint/B74417EDDF22AC9F9E90F49142E86A2A11F48D36)
- Nick Mathewson:
[2133BC600AB133E1D826D173FE43009C4607B1FB](https://keys.openpgp.org/vks/v1/by-fingerprint/2133BC600AB133E1D826D173FE43009C4607B1FB)
## Development
See our hacking documentation in [doc/HACKING/](./doc/HACKING).
## Resources
Home page:
- https://www.torproject.org/
Download new versions:
- https://www.torproject.org/download/tor
How to verify Tor source:
- https://support.torproject.org/little-t-tor/
Documentation and Frequently Asked Questions:
- https://support.torproject.org/
How to run a Tor relay:
- https://community.torproject.org/relay/
This diff is collapsed.
......@@ -166,7 +166,7 @@ AC_CACHE_CHECK([for $1 directory], tor_cv_library_$1_dir, [
for tor_trydir in "$try$1dir" "(system)" "$prefix" /usr/local /usr/pkg $8; do
LDFLAGS="$tor_saved_LDFLAGS"
LIBS="$tor_saved_LIBS $3"
LIBS="$3 $tor_saved_LIBS"
CPPFLAGS="$tor_saved_CPPFLAGS"
if test -z "$tor_trydir" ; then
......@@ -219,7 +219,7 @@ AC_CACHE_CHECK([for $1 directory], tor_cv_library_$1_dir, [
CPPFLAGS="$tor_saved_CPPFLAGS"
]) dnl end cache check
LIBS="$LIBS $3"
LIBS="$3 $LIBS"
if test "$tor_cv_library_$1_dir" != "(system)"; then
TOR_EXTEND_CODEPATH($tor_cv_library_$1_dir)
fi
......