diff options
author | Denis Ovsienko <denis@ovsienko.info> | 2021-07-05 19:37:04 +0100 |
---|---|---|
committer | Denis Ovsienko <denis@ovsienko.info> | 2021-07-05 19:47:29 +0100 |
commit | f5739ad4cab362afdebbf3af588e9f05e0e0009b (patch) | |
tree | dfb43297ff492b9acae4ab6c6ec2232884d6ab54 /build.sh | |
parent | d56f0615004ad251a430623a34268a2ce72ba8a2 (diff) | |
download | tcpdump-f5739ad4cab362afdebbf3af588e9f05e0e0009b.tar.gz |
CI: Get Travis CI vestige sorted in build.sh.
Compiling user-provided source code and running the resulting binary
with sudo was a security problem, thus instead of fixing two no-op
blocks remove them altogether. If anyone later needs to debug features
that require higher privileges, they will need to come up with a better
solution. Simplify the debug output test condition and rephrase the
associated comment for clarity.
Diffstat (limited to 'build.sh')
-rwxr-xr-x | build.sh | 27 |
1 files changed, 5 insertions, 22 deletions
@@ -72,15 +72,6 @@ Darwin) run_after_echo "otool -L $TCPDUMP_BIN" ;; esac -if [ "$TRAVIS" = true ]; then - if [ -n "$LD_LIBRARY_PATH" ]; then - run_after_echo "sudo LD_LIBRARY_PATH=$LD_LIBRARY_PATH $TCPDUMP_BIN -J" - run_after_echo "sudo LD_LIBRARY_PATH=$LD_LIBRARY_PATH $TCPDUMP_BIN -L" - else - run_after_echo "sudo $TCPDUMP_BIN -J" - run_after_echo "sudo $TCPDUMP_BIN -L" - fi -fi if [ "$BUILD_LIBPCAP" = yes ]; then run_after_echo "make check" fi @@ -90,19 +81,11 @@ if [ "$CMAKE" = no ]; then run_after_echo "make releasetar" fi fi -if [ "$TRAVIS" = true ]; then - if [ "$TRAVIS_OS_NAME" = linux ] && [ "$TRAVIS_CPU_ARCH" != ppc64le ] && [ "$TRAVIS_CPU_ARCH" != s390x ] && [ "$TRAVIS_CPU_ARCH" != arm64 ]; then - if [ -n "$LD_LIBRARY_PATH" ]; then - run_after_echo "sudo LD_LIBRARY_PATH=$LD_LIBRARY_PATH $TCPDUMP_BIN -#n -c 10" - else - run_after_echo "sudo $TCPDUMP_BIN -#n -c 10" - fi - fi -fi -# The DEBUG_BUILD variable is not set by default to avoid Travis error message: -# "The job exceeded the maximum log length, and has been terminated." -# Setting it needs to reduce the matrix cases. -if [ "$MATRIX_DEBUG" = true ] && [ -n "$DEBUG_BUILD" ] ; then +# Beware that setting MATRIX_DEBUG will produce A LOT of additional output +# here and in any nested libpcap builds. Multiplied by the matrix size, the +# full output log size might exceed limits of some CI systems (as previously +# happened with Travis CI). Use with caution on a reduced matrix. +if [ "$MATRIX_DEBUG" = true ]; then echo '$ cat Makefile [...]' sed '/DO NOT DELETE THIS LINE -- mkdep uses it/q' < Makefile echo '$ cat config.h' |