First release

This commit is contained in:
Daniel Demus 2024-07-14 02:43:20 +02:00
parent a6cbfd61af
commit 9785f9ff1a
2 changed files with 53 additions and 0 deletions

View File

@ -0,0 +1,52 @@
%define plugin_id openhab-proxy
%define plugin_name %{plugin_id}-rule-exclusions
Name: mod_security_crs_plugin_%{gsub %{plugin_id} - _}
Version: 1.0.0
Release: 1%{?dist}
Summary: CRS OpenHAB proxy rule exclusions plugin
License: Apache-2.0
URL: https://git.demus.dk/demus/%{plugin_name}-plugin/
Source0: https://git.demus.dk/demus/%{plugin_name}-plugin/archive/%{version}.tar.gz
BuildArch: noarch
Requires: mod_security_crs > 4.2.0-2
%description
This CRS plugin contains rule exclusions for proxying an external address to OpenHAB, a vendor and
technology agnostic open source automation software for your home, so it can be run together with
OWASP CRS (CRS).
%prep
%setup -q -n %{plugin_name}-plugin
%build
%install
%{__install} -Dm0644 plugins/%{plugin_name}-before.conf %{buildroot}%{_datarootdir}/mod_modsecurity_crs/plugins/%{plugin_id}/%{plugin_name}-before.conf
%{__install} -m0644 plugins/%{plugin_name}-config.conf %{buildroot}%{_datarootdir}/mod_modsecurity_crs/plugins/%{plugin_id}/%{plugin_name}-config.conf.example
%{__install} -Dm0644 plugins/%{plugin_name}-config.conf %{buildroot}%{_sysconfdir}/httpd/modsecurity.d/plugins/%{plugin_name}-config.conf
%post
if [ $1 == 1 ]; then
%{__ln_s} %{_datarootdir}/mod_modsecurity_crs/plugins/%{plugin_id}/%{plugin_name}-before.conf %{_sysconfdir}/httpd/modsecurity.d/plugins/%{plugin_name}-before.conf
fi
exit 0
%preun
if [ $1 == 0 ]; then
%{__rm} %{_sysconfdir}/httpd/modsecurity.d/plugins/%{plugin_name}-before.conf
fi
exit 0
%files
%license LICENSE
%doc README.md
%config(noreplace) %{_sysconfdir}/httpd/modsecurity.d/plugins/%{plugin_name}-config.conf
%ghost %config(noreplace) %{_sysconfdir}/httpd/modsecurity.d/plugins/%{plugin_name}-before.conf
%{_datarootdir}/mod_modsecurity_crs/plugins/%{plugin_id}/
%changelog
* Sat Jul 13 2024 Daniel Demus <daniel-github@demus.dk>
- First release

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (1.0.0.tar.gz) = 85eb08504b33aa1a8a3f71ee612735137d5c1c9929bbea05d3b7551451c8ff0952573e4b5b6cd7701de2ea3cf066a23f4e0e61ac46ff62d9f1bf259601dd0c42