FreeBSD Bugzilla – Attachment 231255 Details for
Bug 261304
security/crowdsec: upgrade to 1.2.3_1; crowdsec-firewall-bouncer: update to 0.0.22_1
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
portrevision 1: restart service after upgrade if it was running before
0002-keep-service-running-across-package-upgrade-increate.patch (text/plain), 6.37 KB, created by
marco
on 2022-01-23 23:10:49 UTC
(
hide
)
Description:
portrevision 1: restart service after upgrade if it was running before
Filename:
MIME Type:
Creator:
marco
Created:
2022-01-23 23:10:49 UTC
Size:
6.37 KB
patch
obsolete
>From e1dfb939aa2e7b46445eb88269504de4a6929d1f Mon Sep 17 00:00:00 2001 >From: Marco Mariani <marco@crowdsec.net> >Date: Mon, 24 Jan 2022 00:06:40 +0100 >Subject: [PATCH 2/2] keep service running across package upgrade; increate log > retention > >--- > security/crowdsec-firewall-bouncer/Makefile | 3 ++- > .../crowdsec-firewall-bouncer/files/pkg-deinstall.in | 3 ++- > .../crowdsec-firewall-bouncer/files/pkg-install.in | 10 ++++++++++ > security/crowdsec/Makefile | 4 +++- > security/crowdsec/files/crowdsec.conf-newsyslog | 4 ++-- > security/crowdsec/files/crowdsec.in | 2 +- > security/crowdsec/files/pkg-deinstall.in | 3 ++- > security/crowdsec/files/pkg-install.in | 10 ++++++++++ > security/crowdsec/pkg-plist | 3 --- > 9 files changed, 32 insertions(+), 10 deletions(-) > mode change 100644 => 100755 security/crowdsec-firewall-bouncer/files/pkg-deinstall.in > create mode 100755 security/crowdsec-firewall-bouncer/files/pkg-install.in > mode change 100644 => 100755 security/crowdsec/files/crowdsec.in > mode change 100644 => 100755 security/crowdsec/files/pkg-deinstall.in > create mode 100755 security/crowdsec/files/pkg-install.in > >diff --git a/security/crowdsec-firewall-bouncer/Makefile b/security/crowdsec-firewall-bouncer/Makefile >index e6e8a0cfa707..946958157306 100644 >--- a/security/crowdsec-firewall-bouncer/Makefile >+++ b/security/crowdsec-firewall-bouncer/Makefile >@@ -1,6 +1,6 @@ > PORTNAME= crowdsec-firewall-bouncer > PORTVERSION= 0.0.22 # NOTE: change BUILD_VERSION and BUILD_TAG as well >-#PORTREVISION= >+PORTREVISION= 1 > DISTVERSIONPREFIX= v > CATEGORIES= security > >@@ -26,6 +26,7 @@ GH_TAGNAME= v0.0.22-freebsd > USE_RC_SUBR= crowdsec_firewall > > SUB_FILES= pkg-message \ >+ pkg-install \ > pkg-deinstall > > # BUILD_VERSION=$(git describe --tags $(git rev-list --tags --max-count=1)) >diff --git a/security/crowdsec-firewall-bouncer/files/pkg-deinstall.in b/security/crowdsec-firewall-bouncer/files/pkg-deinstall.in >old mode 100644 >new mode 100755 >index 0324401c6e19..8167b3f0167f >--- a/security/crowdsec-firewall-bouncer/files/pkg-deinstall.in >+++ b/security/crowdsec-firewall-bouncer/files/pkg-deinstall.in >@@ -1,7 +1,8 @@ > #!/bin/sh > > case $2 in >- DEINSTALL) >+ "DEINSTALL") >+ service crowdsec_firewall status && touch /var/run/crowdsec_firewall.running > service crowdsec_firewall stop || : > ;; > esac >diff --git a/security/crowdsec-firewall-bouncer/files/pkg-install.in b/security/crowdsec-firewall-bouncer/files/pkg-install.in >new file mode 100755 >index 000000000000..f75e58ce4685 >--- /dev/null >+++ b/security/crowdsec-firewall-bouncer/files/pkg-install.in >@@ -0,0 +1,10 @@ >+#!/bin/sh >+ >+case $2 in >+ "POST-INSTALL") >+ if [ -e /var/run/crowdsec_firewall.running ]; then >+ service crowdsec_firewall start >+ rm -f /var/run/crowdsec_firewall.running >+ fi >+ ;; >+esac >diff --git a/security/crowdsec/Makefile b/security/crowdsec/Makefile >index dbc74172642a..6fad13f10378 100644 >--- a/security/crowdsec/Makefile >+++ b/security/crowdsec/Makefile >@@ -1,5 +1,6 @@ > PORTNAME= crowdsec > PORTVERSION= 1.2.3 # NOTE: change BUILD_VERSION and BUILD_TAG as well >+PORTREVISION= 1 > DISTVERSIONPREFIX= v > CATEGORIES= security > >@@ -24,6 +25,7 @@ GH_TAGNAME= v1.2.3-freebsd > USE_RC_SUBR= crowdsec > > SUB_FILES= pkg-message \ >+ pkg-install \ > pkg-deinstall > > # BUILD_VERSION=$(git describe --tags $(git rev-list --tags --max-count=1)) >@@ -129,5 +131,5 @@ do-install: > > @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} > ${INSTALL_DATA} ${FILESDIR}/crowdsec.conf-newsyslog ${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d/crowdsec.conf.sample >- >+ > .include <bsd.port.mk> >diff --git a/security/crowdsec/files/crowdsec.conf-newsyslog b/security/crowdsec/files/crowdsec.conf-newsyslog >index a32cf4d567d7..560519c5a99f 100644 >--- a/security/crowdsec/files/crowdsec.conf-newsyslog >+++ b/security/crowdsec/files/crowdsec.conf-newsyslog >@@ -1,3 +1,3 @@ > # logfilename [owner:group] mode count size(kb) when flags [/pid_file] [sig_num] >-/var/log/crowdsec.log root:wheel 644 10 5120 * JC /var/run/crowdsec.pid >-/var/log/crowdsec_api.log root:wheel 644 10 5120 * JC /var/run/crowdsec.pid >+/var/log/crowdsec.log root:wheel 644 10 20480 * JC /var/run/crowdsec.pid >+/var/log/crowdsec_api.log root:wheel 644 10 20480 * JC /var/run/crowdsec.pid >diff --git a/security/crowdsec/files/crowdsec.in b/security/crowdsec/files/crowdsec.in >old mode 100644 >new mode 100755 >index ac0f384a9572..113d66aed599 >--- a/security/crowdsec/files/crowdsec.in >+++ b/security/crowdsec/files/crowdsec.in >@@ -72,7 +72,7 @@ crowdsec_precmd() { > crowdsec_start() > { > /usr/sbin/daemon -f -p ${pidfile} -t "${desc}" -- \ >- ${command} -c ${crowdsec_config} ${crowdsec_flags} >+ ${command} -c "${crowdsec_config}" ${crowdsec_flags} > } > > crowdsec_configtest() >diff --git a/security/crowdsec/files/pkg-deinstall.in b/security/crowdsec/files/pkg-deinstall.in >old mode 100644 >new mode 100755 >index 1f067c828536..4fdfd0b04d72 >--- a/security/crowdsec/files/pkg-deinstall.in >+++ b/security/crowdsec/files/pkg-deinstall.in >@@ -1,7 +1,8 @@ > #!/bin/sh > > case $2 in >- DEINSTALL) >+ "DEINSTALL") >+ service crowdsec status && touch /var/run/crowdsec.running > service crowdsec stop || : > ;; > esac >diff --git a/security/crowdsec/files/pkg-install.in b/security/crowdsec/files/pkg-install.in >new file mode 100755 >index 000000000000..9c13af959b40 >--- /dev/null >+++ b/security/crowdsec/files/pkg-install.in >@@ -0,0 +1,10 @@ >+#!/bin/sh >+ >+case $2 in >+ "POST-INSTALL") >+ if [ -e /var/run/crowdsec.running ]; then >+ service crowdsec start >+ rm -f /var/run/crowdsec.running >+ fi >+ ;; >+esac >diff --git a/security/crowdsec/pkg-plist b/security/crowdsec/pkg-plist >index a8e54a73df13..635dcc3da591 100644 >--- a/security/crowdsec/pkg-plist >+++ b/security/crowdsec/pkg-plist >@@ -14,9 +14,6 @@ bin/crowdsec-cli > @sample %%ETCDIR%%/notifications/http/http.yaml.sample > @sample %%ETCDIR%%/notifications/slack/slack.yaml.sample > @sample %%ETCDIR%%/notifications/splunk/splunk.yaml.sample >-%%ETCDIR%%/dev.yaml >-%%ETCDIR%%/user.yaml >-%%ETCDIR%%/crowdsec.service > %%ETCDIR%%/patterns/aws > %%ETCDIR%%/patterns/bacula > %%ETCDIR%%/patterns/bro >-- >2.32.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 261304
:
231126
| 231255