Skip to content
Closed
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 39 additions & 6 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1318,9 +1318,6 @@ jobs:
name: dist
- run: tar xf suricata-*.tar.gz --strip-components=1

- name: Update packages and install sudo
run: dnf -y update && dnf install -y sudo

- name: Install AlmaLinux 9 extra repositories
run: |
dnf -y update
Expand Down Expand Up @@ -1431,7 +1428,7 @@ jobs:
autoconf \
automake \
build-essential \
cargo-1.82 \
cargo-1.85 \
cbindgen \
clang-14 \
dpdk-dev \
Expand Down Expand Up @@ -1475,7 +1472,7 @@ jobs:
- run: tar xf prep/suricata-update.tar.gz
- run: tar xf prep/suricata-verify.tar.gz
- run: ./autogen.sh
- run: CARGO=cargo-1.82 RUSTC=rustc-1.82 RUSTDOC=rustdoc-1.82 ./configure --enable-unittests
- run: CARGO=cargo-1.85 RUSTC=rustc-1.85 RUSTDOC=rustdoc-1.85 ./configure --enable-unittests
- run: make -j ${{ env.CPUS }}
- run: make check
- run: python3 ./suricata-verify/run.py -q --debug-failed
Expand Down Expand Up @@ -2831,7 +2828,43 @@ jobs:
- run: apt update -y && apt install -y sudo

- name: Install minimal dependencies
run: ./scripts/docs-ubuntu-debian-minimal-build.sh
run: ./scripts/docs-ubuntu-minimal-build.sh

# Set the path, the export in the example script does not work
# in GitHub actions.
- run: echo "/usr/lib/rust-1.89/bin:$PATH" >> $GITHUB_PATH

- run: CFLAGS="${DEFAULT_CFLAGS}" ./configure
- run: make -j ${{ env.CPUS }}
- run: ./src/suricata --build-info # check if we can run Suricata

debian-13-minimal-recommended-build:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we could remove some builders because they do not bring any value...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we could remove some builders because they do not bring any value...

Yeah, probably. Killed one off a couple weeks ago as its just required a few lines added to another similar build. Probably many more like this.

But this one tests documentation as well for a popular distro, so some are hard to get rid off, even if they don't do much different than another build.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was a general idea, not criticizing this PR

name: Debian 13 (Minimal/Recommended Build)
needs: [ubuntu-22-04-dist]
runs-on: ubuntu-latest
container: debian:13
steps:
# Cache Rust stuff.
- name: Cache cargo registry
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb
with:
path: ~/.cargo/registry
key: cargo-registry

- name: Determine number of CPUs
run: echo CPUS=$(nproc --all) >> $GITHUB_ENV

- name: Download suricata.tar.gz
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3
with:
name: dist
- run: tar xvf suricata-*.tar.gz --strip-components=1

# Install packages required by the install script.
- run: apt update -y && apt install -y sudo

- name: Install minimal dependencies
run: ./scripts/docs-debian-minimal-build.sh

- run: CFLAGS="${DEFAULT_CFLAGS}" ./configure
- run: make -j ${{ env.CPUS }}
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
check-commits:
name: Commit Check
runs-on: ubuntu-latest
container: ubuntu:20.04
container: ubuntu:24.04
steps:
- name: Caching ~/.cargo
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb
Expand All @@ -32,7 +32,7 @@ jobs:
build-essential \
autoconf \
automake \
cargo \
cargo-1.89 \
curl \
git \
jq \
Expand All @@ -52,17 +52,16 @@ jobs:
libjansson-dev \
libevent-dev \
libevent-pthreads-2.1-7 \
libpython2.7 \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we remove all these obsolete libpython2 ?

libssl-dev \
make \
parallel \
pkg-config \
python3-yaml \
rustc \
software-properties-common \
zlib1g \
zlib1g-dev
- run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- run: echo "/usr/lib/rust-1.89/bin" >> $GITHUB_PATH
- name: Installing sccache
run: |
(cd /tmp && curl -OL https://github.com/mozilla/sccache/releases/download/0.2.13/sccache-0.2.13-x86_64-unknown-linux-musl.tar.gz)
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ jobs:
runs-on: ubuntu-22.04
container: ubuntu:22.04
continue-on-error: false
env:
RV: "1.89"
steps:

# Cache Rust stuff.
Expand All @@ -48,7 +50,7 @@ jobs:
build-essential \
autoconf \
automake \
cargo \
cargo-${RV} \
cbindgen \
clang-format-14 \
git \
Expand Down Expand Up @@ -131,7 +133,7 @@ jobs:
fi
shell: bash {0}
- run: ./autogen.sh
- run: ./configure --enable-warnings --enable-unittests
- run: PATH="/usr/lib/rust-${RV}/bin:$PATH" ./configure --enable-warnings --enable-unittests
- name: Check formatting
run: |
./scripts/clang-format.sh check-branch --diffstat --show-commits >> check_formatting_log.txt 2>&1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- uses: actions/checkout@v6.0.2
- uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-24.11
nix_path: nixpkgs=channel:nixos-25.11
- run: nix-shell --run ./scripts/bundle.sh
- run: nix-shell --run ./autogen.sh
- run: nix-shell --run "./configure CC=clang"
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/scan-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
name: Scan-build
runs-on: ubuntu-latest
container: ubuntu:25.04
env:
RV: "1.85"
steps:
- name: Cache scan-build
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb
Expand All @@ -36,7 +38,7 @@ jobs:
build-essential \
autoconf \
automake \
cargo \
cargo-${RV} \
cbindgen \
clang-20 \
clang-tools-20 \
Expand Down Expand Up @@ -65,15 +67,14 @@ jobs:
llvm-20-dev \
make \
python3-yaml \
rustc \
software-properties-common \
zlib1g \
zlib1g-dev
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- run: git config --global --add safe.directory /__w/suricata/suricata
- run: ./scripts/bundle.sh
- run: ./autogen.sh
- run: scan-build-20 ./configure --enable-warnings --enable-dpdk --enable-nfqueue --enable-nflog
- run: PATH="/usr/lib/rust-${RV}/bin:$PATH" scan-build-20 ./configure --enable-warnings --enable-dpdk --enable-nfqueue --enable-nflog
env:
CC: clang-20
# disable security.insecureAPI.DeprecatedOrUnsafeBufferHandling explicitly as
Expand Down
3 changes: 2 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ EXTRA_DIST = ChangeLog COPYING LICENSE suricata.yaml.in \
acsite.m4 \
scripts/generate-images.sh \
scripts/docs-almalinux9-minimal-build.sh \
scripts/docs-ubuntu-debian-minimal-build.sh \
scripts/docs-debian-minimal-build.sh \
scripts/docs-ubuntu-minimal-build.sh \
scripts/evedoc.py \
examples/plugins
SUBDIRS = rust src plugins qa rules doc etc python ebpf \
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2097,7 +2097,7 @@ fi
cargo_version_output=$($CARGO --version)
cargo_version=$(echo "$cargo_version_output" | sed 's/^.*[[^0-9]]\([[0-9]]*\.[[0-9]]*\.[[0-9]]*\).*$/\1/')

MIN_RUSTC_VERSION="1.75.0" # MSRV
MIN_RUSTC_VERSION="1.85.0" # MSRV
AC_MSG_CHECKING(for Rust version $MIN_RUSTC_VERSION or newer)
AS_VERSION_COMPARE([$rustc_version], [$MIN_RUSTC_VERSION],
[
Expand Down
19 changes: 15 additions & 4 deletions doc/userguide/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,24 @@ Common configure options
Dependencies and compilation
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Ubuntu/Debian
"""""""""""""
Debian 13+
""""""""""

.. note:: The following instructions require ``sudo`` to be installed.

.. literalinclude:: ../../scripts/docs-ubuntu-debian-minimal-build.sh
:caption: Minimal dependencies for Ubuntu/Debian
.. literalinclude:: ../../scripts/docs-debian-minimal-build.sh
:caption: Minimal dependencies for Debian
:language: bash
:start-after: # install-guide-documentation tag start: Minimal dependencies
:end-before: # install-guide-documentation tag end: Minimal dependencies

Ubuntu
""""""

.. note:: The following instructions require ``sudo`` to be installed.

.. literalinclude:: ../../scripts/docs-ubuntu-minimal-build.sh
:caption: Minimal dependencies for Ubuntu
:language: bash
:start-after: # install-guide-documentation tag start: Minimal dependencies
:end-before: # install-guide-documentation tag end: Minimal dependencies
Expand Down
2 changes: 1 addition & 1 deletion rust/Cargo.toml.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "@PACKAGE_VERSION@"
license = "GPL-2.0-only"
description = "Suricata Rust components"
edition = "2021"
rust-version = "1.75.0"
rust-version = "1.85.0"

[workspace]
members = [
Expand Down
7 changes: 7 additions & 0 deletions rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@
// just due to FFI.
#![allow(clippy::missing_safety_doc)]

// Disable the clippy warning for not using modern C string
// literals. Ubuntu 24.04 still ships cbindgen 0.26.0 that doesn't
// support these, so migrating to modern C string literals would
// require Ubuntu 24.04 users wishing to build from git to install
// cbindgen with cargo.
#![allow(clippy::manual_c_str_literals)]

// Allow unknown lints, our MSRV doesn't know them all, for
// example static_mut_refs.
#![allow(unknown_lints)]
Expand Down
1 change: 0 additions & 1 deletion scripts/docs-almalinux9-minimal-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# Serves for RPM-based docs and is verified by Github Actions

# install-guide-documentation tag start: Minimal RPM-based dependencies
sudo dnf install -y dnf-plugins-core epel-release
sudo dnf install -y cargo gcc jansson-devel libpcap-devel \
libyaml-devel make pcre2-devel zlib-devel
# install-guide-documentation tag end: Minimal RPM-based dependencies
10 changes: 10 additions & 0 deletions scripts/docs-ubuntu-minimal-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

# Serves for Ubuntu/Debian docs and is verified by Github Actions

# install-guide-documentation tag start: Minimal dependencies
sudo apt -y install autoconf automake build-essential cargo-1.89 \
libjansson-dev libpcap-dev libpcre2-dev libtool \
libyaml-dev make pkg-config zlib1g-dev
export PATH=/usr/lib/rust-1.89/bin:$PATH
# install-guide-documentation tag end: Minimal dependencies