]> The Tcpdump Group git mirrors - tcpdump/commitdiff
CI: Get Travis CI vestige sorted in build.sh.
authorDenis Ovsienko <[email protected]>
Mon, 5 Jul 2021 18:37:04 +0000 (19:37 +0100)
committerDenis Ovsienko <[email protected]>
Mon, 5 Jul 2021 18:47:29 +0000 (19:47 +0100)
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.

build.sh

index cb1771fcc91b2cf1b8e0f28f4407ec81af12a220..10cdd0817556bf48dab97cab2e5555544efdaa0e 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -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'