Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
security
crowdsec-firewall-bouncer
crowdsec-firewall-bouncer.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File crowdsec-firewall-bouncer.spec of Package crowdsec-firewall-bouncer
# # spec file for package crowdsec-firewall-bouncer # # Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define __arch_install_post export NO_BRP_STRIP_DEBUG=true Name: crowdsec-firewall-bouncer Version: 0.0.29 Release: 0 Summary: Crowdsec bouncer written in golang for firewalls License: MIT URL: https://github.com/crowdsecurity/cs-firewall-bouncer Source: %{name}-%{version}.tar.gz Source1: vendor.tar.gz BuildRequires: go >= 1.21 Recommends: nftables %description Crowdsec bouncer written in golang for firewalls. crowdsec-firewall-bouncer will fetch new and old decisions from a CrowdSec API to add them in a blocklist used by supported firewalls. Supported firewalls: iptables (IPv4 ✔️ / IPv6 ✔️ ) nftables (IPv4 ✔️ / IPv6 ✔️ ) ipset only (IPv4 ✔️ / IPv6 ✔️ ) pf (IPV4 ✔️ / IPV6 ✔️ ) %prep %autosetup -p 1 -a 1 %build # hash will be shortened by COMMIT_HASH:0:8 later COMMIT_HASH="$(sed -n 's/commit: \(.*\)/\1/p' %_sourcedir/%{name}.obsinfo)" DATE_FMT="+%%Y-%%m-%%dT%%H:%%M:%%SZ" BUILD_DATE=$(date -u -d "@${SOURCE_DATE_EPOCH}" "${DATE_FMT}" 2>/dev/null || date -u -r "${SOURCE_DATE_EPOCH}" "${DATE_FMT}" 2>/dev/null || date -u "${DATE_FMT}") go build \ -mod=vendor \ -buildmode=pie \ -trimpath \ -tags='netgo' \ -ldflags=" \ -X github.com/crowdsecurity/go-cs-lib/version.Version=v%{version} \ -X github.com/crowdsecurity/go-cs-lib/version.Tag=${COMMIT_HASH:0:8} \ -X github.com/crowdsecurity/go-cs-lib/version.BuildDate=${BUILD_DATE}" \ -o %{name} %install # Install the binary. install -D -m 0755 %{name} %{buildroot}/%{_bindir}/%{name} # directory in /etc/ install -d -m 0755 %{buildroot}%{_sysconfdir}/crowdsec/bouncers/ install -D -m 0600 config/%{name}.yaml %{buildroot}%{_sysconfdir}/crowdsec/bouncers/%{name}.yaml # directory in /usr/lib/ install -d -m 0755 %{buildroot}%{_usr}/lib/%{name}/ install -D -m 0755 scripts/_bouncer.sh %{buildroot}%{_usr}/lib/%{name}/_bouncer.sh # unit file install -d -m 0755 %{buildroot}%{_unitdir}/ BIN=%{_bindir}/%{name} CFG=%{_sysconfdir}/crowdsec/bouncers envsubst '$BIN $CFG' < config/%{name}.service | \ install -D -m 0644 /dev/stdin %{buildroot}%{_unitdir}/%{name}.service install -d -m 0755 %{buildroot}%{_sbindir}/ ln -sf service %{buildroot}%{_sbindir}/rc%{name} %pre -n %{name} %service_add_pre %{name}.service %post -n %{name} %service_add_post %{name}.service %preun -n %{name} %service_del_preun %{name}.service %postun -n %{name} %service_del_postun %{name}.service %files %doc README.md %license LICENSE %{_bindir}/%{name} %dir %{_usr}/lib/%{name}/ %{_usr}/lib/%{name}/_bouncer.sh %{_unitdir}/%{name}.service %{_sbindir}/rc%{name} %dir %{_sysconfdir}/crowdsec/ %dir %{_sysconfdir}/crowdsec/bouncers/ %config(noreplace) %{_sysconfdir}/crowdsec/bouncers/%{name}.yaml %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor