On Wed Oct 21, 2026 at 5:14 UTC, Bjorn Ketelaars wrote:
> Diff below updates reaction to 2.6.0, which introduces a HTTP ban
> plugin, which is HTTP middleware. Changes:
> https://framagit.org/ppom/reaction/-/releases/v2.6.0
Cool, kinda forgot about this one since I'm also working on it for
FreeBSD lol
>
> No new failures from 'make test', and works for me on amd64. The HTTP
> ban plugin is untested by me, and marked alpha by upstream:
> https://reaction.ppom.me/plugins/httpban/
>
> Couple of crates need to be vendorised. I'm hosting the resulting
> tarball myself.
Why? Also my understanding was that ipset was for Linux only but maybe
I'm missing something
>
> Comments/OK?
>
>
> diff --git Makefile Makefile
> index 99fa7712dcb..a0267ec3253 100644
> --- Makefile
> +++ Makefile
> @@ -1,29 +1,48 @@
>  COMMENT =    scan logs and take action, alternative to fail2ban
>  
> -V =  v2.5.1
> +V =  v2.6.0
>  DISTNAME =   reaction-${V}
>  PKGNAME =    ${DISTNAME:S/-v/-/}
>  
>  SITES =      https://framagit.org/ppom/reaction/-/archive/${V}/
>  
> +SITES.vendor =               https://arcfour.nl/mirror/
> +DISTFILES.vendor =   reaction-vendor-${V}.tgz
> +
>  CATEGORIES = sysutils security
>  HOMEPAGE =   https://reaction.ppom.me/
>  
>  # AGPL-3.0
>  PERMIT_PACKAGE =     yes
>  
> -WANTLIB += ${MODCARGO_WANTLIB} m
> +WANTLIB += ${MODCARGO_WANTLIB} m zstd
>  
>  MODULES =            devel/cargo
> -CONFIGURE_STYLE =    cargo
> +MODCARGO_BUILD_ARGS +=       --package reaction \
> +                     --package reaction-plugin-httpban \
> +                     --package reaction-plugin-virtual
> +MODCARGO_TEST_ARGS +=        --package reaction \
> +                     --package reaction-plugin-httpban \
> +                     --package reaction-plugin-virtual
> +MODCARGO_RUSTFLAGS +=        -L${PREFIX}/lib
>  
> -MODCARGO_BUILD_ARGS +=       --package reaction --package 
> reaction-plugin-virtual
> -MODCARGO_TEST_ARGS +=        --package reaction --package 
> reaction-plugin-virtual
> +LIB_DEPENDS =                archivers/zstd
> +
> +CONFIGURE_STYLE =    cargo
>  
>  .include "crates.inc"
>  
> +SUBST_VARS = WRKSRC
> +
> +post-configure:
> +     mv ${WRKDIR}/vendor ${WRKSRC}
> +     ${SUBST_CMD} -m 644 -c ${FILESDIR}/vendor.toml ${WRKDIR}/vendor.toml
> +     cat ${WRKDIR}/vendor.toml >> ${WRKDIR}/.cargo/config.toml
> +
>  do-install:
>       ${INSTALL_PROGRAM} ${MODCARGO_TARGET_DIR}/release/reaction 
> ${PREFIX}/bin/
> +     ${INSTALL_PROGRAM} 
> ${MODCARGO_TARGET_DIR}/release/reaction-plugin-httpban \
> +             ${PREFIX}/bin/
>       ${INSTALL_PROGRAM} 
> ${MODCARGO_TARGET_DIR}/release/reaction-plugin-virtual \
>               ${PREFIX}/bin/
>       ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/reaction
> diff --git crates.inc crates.inc
> index cc7738a28c9..acdb7bcb268 100644
[...]
> diff --git files/vendor.toml files/vendor.toml
> new file mode 100644
> index 00000000000..227948b3173
> --- /dev/null
> +++ files/vendor.toml
> @@ -0,0 +1,12 @@
> +[source."git+https://github.com/deltarocks/jrsonnet?branch=master";]
> +git = "https://github.com/deltarocks/jrsonnet";
> +branch = "master"
> +replace-with = "vendored-sources"
> +
> +[source."git+https://github.com/ppom0/ipset?branch=fix-ipv6-32cidr";]
> +git = "https://github.com/ppom0/ipset";
> +branch = "fix-ipv6-32cidr"
> +replace-with = "vendored-sources"
> +
> +[source.vendored-sources]
> +directory = "${WRKSRC}/vendor"
> diff --git 
> patches/patch-modcargo-crates_pingora-core-0_8_1_src_server_daemon_rs 
> patches/patch-modcargo-crates_pingora-core-0_8_1_src_server_daemon_rs
> new file mode 100644
> index 00000000000..6cc9e149335
> --- /dev/null
> +++ patches/patch-modcargo-crates_pingora-core-0_8_1_src_server_daemon_rs
> @@ -0,0 +1,12 @@
> +Index: modcargo-crates/pingora-core-0.8.1/src/server/daemon.rs
> +--- modcargo-crates/pingora-core-0.8.1/src/server/daemon.rs.orig
> ++++ modcargo-crates/pingora-core-0.8.1/src/server/daemon.rs
> +@@ -84,7 +84,7 @@ pub fn daemonize(conf: &ServerConf) {
> + 
> +             #[cfg(target_os = "macos")]
> +             let group_id = unsafe { gid_for_username(&user_cstr).map(|gid| 
> gid as i32) };
> +-            #[cfg(target_os = "freebsd")]
> ++            #[cfg(any(target_os = "freebsd", target_os = "openbsd"))]
> +             let group_id = unsafe { gid_for_username(&user_cstr).map(|gid| 
> gid as u32) };
> +             #[cfg(target_os = "linux")]
> +             let group_id = unsafe { gid_for_username(&user_cstr) };
> diff --git pkg/PLIST pkg/PLIST
> index f58a842a228..c52beed0602 100644
> --- pkg/PLIST
> +++ pkg/PLIST
> @@ -1,5 +1,6 @@
>  @rcscript ${RCDIR}/reaction
>  @bin bin/reaction
> +@bin bin/reaction-plugin-httpban
>  @bin bin/reaction-plugin-virtual
>  @man man/man1/reaction-flush.1
>  @man man/man1/reaction-rotate.1


Reply via email to