]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
github-ci: fedora non-root: remove external script usage
authorJason Ish <jason.ish@oisf.net>
Mon, 6 Feb 2023 22:28:49 +0000 (16:28 -0600)
committerVictor Julien <vjulien@oisf.net>
Mon, 24 Apr 2023 14:59:52 +0000 (16:59 +0200)
In the end, its not needed and makes it easier to copy and paste to a
new test.

.github/workflows/builds.yml
.github/workflows/scripts/fedora-non-root.sh [deleted file]

index 4510ea74a688810e6f81ba592925c78123f8b5fd..d4b02fb9a9db2861ae640bba08e3696572e1b3b8 100644 (file)
@@ -809,17 +809,33 @@ jobs:
       - run: mkdir /home/suricata/suricata
       - run: cp -a . /home/suricata/suricata
       - run: chown -R suricata:suricata /home/suricata
-      - run: sudo -u suricata -s ./.github/workflows/scripts/fedora-non-root.sh cbindgen
-        working-directory: /home/suricata/suricata
-      - run: sudo -u suricata -s ./.github/workflows/scripts/fedora-non-root.sh autogen
+
+      - run: sudo -u suricata -s mkdir -p .cargo/bin
+        working-directory: /home/suricata
+      - run: sudo -u suricata -s cp suricata/prep/cbindgen .cargo/bin
+        working-directory: /home/suricata
+      - run: sudo -u suricata -s chmod 755 .cargo/bin/cbindgen
+        working-directory: /home/suricata
+
+      - run: sudo -u suricata -s ./autogen.sh
         working-directory: /home/suricata/suricata
-      - run: sudo -u suricata -s ./.github/workflows/scripts/fedora-non-root.sh configure
+
+      - run: sudo -u suricata -s env PATH="/home/suricata/.cargo/bin:$PATH" ./configure --enable-debug --enable-unittests --disable-shared --enable-rust-strict --enable-hiredis --enable-nfqueue
         working-directory: /home/suricata/suricata
-      - run: sudo -u suricata -s ./.github/workflows/scripts/fedora-non-root.sh make
+        env:
+          ac_cv_func_realloc_0_nonnull: "yes"
+          ac_cv_func_malloc_0_nonnull: "yes"
+          LDFLAGS: "-fsanitize=address"
+          CC: "clang"
+          CFLAGS: "${{ env.DEFAULT_CFLAGS }} -Wshadow -fsanitize=address -fno-omit-frame-pointer"
+
+      - run: sudo -u suricata -s env PATH="/home/suricata/.cargo/bin:$PATH" make -j2
         working-directory: /home/suricata/suricata
-      - run: sudo -u suricata -s ./.github/workflows/scripts/fedora-non-root.sh unit-test
+
+      - run: sudo -u suricata -s make check
         working-directory: /home/suricata/suricata
-      - run: sudo -u suricata -s ./.github/workflows/scripts/fedora-non-root.sh verify
+
+      - run: sudo -u suricata -s python3 ./suricata-verify/run.py -q
         working-directory: /home/suricata/suricata
 
   fedora-35:
diff --git a/.github/workflows/scripts/fedora-non-root.sh b/.github/workflows/scripts/fedora-non-root.sh
deleted file mode 100755 (executable)
index 3624f61..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#! /usr/bin/env bash
-#
-# Helper script for Fedora build as a non-root user.
-#
-# We break the build up into parts that need to be called individually
-# to avoid outputting too much data in a single step so we can see the
-# output in the UI.
-
-set -e
-set -x
-
-export PATH="$HOME/.cargo/bin:$PATH"
-
-case "$1" in
-    cbindgen)
-        # Setup cbindgen.
-        mkdir -p $HOME/.cargo/bin
-        cp prep/cbindgen $HOME/.cargo/bin
-        chmod 755 $HOME/.cargo/bin/cbindgen
-        ;;
-    autogen)
-        ./autogen.sh
-        ;;
-    configure)
-        ac_cv_func_realloc_0_nonnull="yes" \
-            ac_cv_func_malloc_0_nonnull="yes" \
-            LDFLAGS="-fsanitize=address" \
-            CC="clang" \
-            CFLAGS="$DEFAULT_CFLAGS -Wshadow -fsanitize=address -fno-omit-frame-pointer" \
-            ./configure \
-            --enable-debug \
-            --enable-unittests \
-            --disable-shared \
-            --enable-rust-strict \
-            --enable-hiredis \
-            --enable-nfqueue
-        ;;
-    make)
-        make -j2
-        ;;
-    unit-test)
-        ASAN_OPTIONS="detect_leaks=0" ./src/suricata -u -l .
-        ;;
-    verify)
-        python3 ./suricata-verify/run.py -q
-        ;;
-esac