From: Jason Ish Date: Mon, 6 Feb 2023 22:28:49 +0000 (-0600) Subject: github-ci: fedora non-root: remove external script usage X-Git-Tag: suricata-7.0.0-rc2~352 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=497a6e7ab7296e210aa6a0866f3ac559ac687fda;p=thirdparty%2Fsuricata.git github-ci: fedora non-root: remove external script usage In the end, its not needed and makes it easier to copy and paste to a new test. --- diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index 4510ea74a6..d4b02fb9a9 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -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 index 3624f61e6f..0000000000 --- a/.github/workflows/scripts/fedora-non-root.sh +++ /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