Rename swatch to swatchdog, update to 3.2.4, unbreak build

Reported by:	Andrea Venturoli <ml@netfence.it>
This commit is contained in:
Michael Gmelin 2020-03-15 18:44:01 +00:00
parent 9f2315a106
commit 3a9096e598
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=528497
19 changed files with 144 additions and 111 deletions

1
MOVED
View file

@ -14479,3 +14479,4 @@ devel/openmp||2020-03-08|Has expired: Part of base system since FreeBSD 11.3/12.
www/node8|www/node10|2020-03-10|Has expired: Node.js 8.x has reached end-of-life, see https://github.com/nodejs/Release www/node8|www/node10|2020-03-10|Has expired: Node.js 8.x has reached end-of-life, see https://github.com/nodejs/Release
www/npm-node8|www/npm-node10|2020-03-10|Removed, slave of www/node8 www/npm-node8|www/npm-node10|2020-03-10|Removed, slave of www/node8
www/yarn-node8|www/yarn-node10|2020-03-10|Removed, slave of www/node8 www/yarn-node8|www/yarn-node10|2020-03-10|Removed, slave of www/node8
security/swatch|security/swatchdog|2020-03-15|Rename to match upstream naming

View file

@ -84,6 +84,24 @@ reload_precmd() {
fi fi
} }
icinga2_checkfib () {
echo "Checkfib called"
exit 1
if command -v check_namevarlist > /dev/null 2>&1; then
check_namevarlist fib && return 0
fi
$SYSCTL net.fibs >/dev/null 2>&1 || return 0
icinga2_fib=${icinga2_fib:-"NONE"}
if [ "x$icinga2_fib" != "xNONE" ]
then
command="/usr/sbin/setfib -F ${icinga2_fib} ${command}"
else
return 0
fi
}
start_precmd() { start_precmd() {
# Create necessary directories / change ownership # Create necessary directories / change ownership
# While this is also done through pkg-plist, /var might be on a ramdisk, # While this is also done through pkg-plist, /var might be on a ramdisk,

View file

@ -1227,7 +1227,7 @@
SUBDIR += super SUBDIR += super
SUBDIR += suricata SUBDIR += suricata
SUBDIR += suricata5 SUBDIR += suricata5
SUBDIR += swatch SUBDIR += swatchdog
SUBDIR += switzerland SUBDIR += switzerland
SUBDIR += symbion-sslproxy SUBDIR += symbion-sslproxy
SUBDIR += tclsasl SUBDIR += tclsasl

View file

@ -1,30 +0,0 @@
# Created by: jfitz
# $FreeBSD$
PORTNAME= swatch
PORTVERSION= 3.2.3
PORTREVISION= 3
CATEGORIES= security sysutils
MASTER_SITES= SF
MAINTAINER= joseph@randomnetworks.com
COMMENT= The Simple WATCHer and filter
BROKEN= unfetchable
BUILD_DEPENDS= \
p5-TimeDate>=0:devel/p5-TimeDate \
p5-Date-Manip>=0:devel/p5-Date-Manip \
p5-Date-Calc>=0:devel/p5-Date-Calc \
p5-File-Tail>=0:devel/p5-File-Tail
RUN_DEPENDS:= ${BUILD_DEPENDS}
USES= perl5
USE_PERL5= configure
CONFIGURE_ARGS= INSTALLMAN1DIR=${PREFIX}/man/man1
USE_RC_SUBR= ${PORTNAME}
post-patch:
${FIND} ${WRKSRC} -name "*.orig" -delete
.include <bsd.port.mk>

View file

@ -1,2 +0,0 @@
SHA256 (swatch-3.2.3.tar.gz) = e29480993e52f245f3abec079b3103d8e97244dafe754f8c2d37e7b0b3b58077
SIZE (swatch-3.2.3.tar.gz) = 31199

View file

@ -1,45 +0,0 @@
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: swatch
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# To enable multiple instance of swatch, add lines like below to
# /etc/rc.conf.
#
# swatch_enable="YES"
# swatch_rules="1 2 3"
# swatch_1_flags="--config-file=/rc --tail-file=/log --daemon --pid-file=/pid"
# swatch_1_user="nobody"
# swatch_1_chdir="/var/tmp"
# swatch_1_pidfile="/pid"
# swatch_2_flags="blah, blah"
# swatch_3_flags="blah, blah"
. /etc/rc.subr
name=swatch
rcvar=swatch_enable
load_rc_config ${name}
# set some defaults
: ${swatch_enable:="NO"}
command=%%PREFIX%%/bin/swatch
if [ -n "${swatch_rules}" ]; then
for i in ${swatch_rules}; do
eval swatch_flags=\$swatch_${i}_flags
len=`echo "0${command} ${swatch_flags} (perl)0" | wc -c`
if [ $len -ge 255 ];then
procname=%%LOCALBASE%%/bin/perl
fi
eval swatch_user=\$swatch_${i}_user
eval swatch_chdir=\$swatch_${i}_chdir
eval pidfile=\$swatch_${i}_pidfile
run_rc_command "$1"
done
fi

View file

@ -1,7 +0,0 @@
SWATCH - The Simple WATCHer and filter
Swatch is designed to monitor system activity. Swatch
requires a configuration file which contains pattern(s) to
look for and action(s) to do when each pattern is found.
WWW: http://swatch.sourceforge.net/

View file

@ -1,9 +0,0 @@
bin/swatch
%%SITE_PERL%%/Swatch/Actions.pm
%%SITE_PERL%%/Swatch/Threshold.pm
%%SITE_PERL%%/Swatch/Throttle.pm
%%SITE_PERL%%/auto/Swatch/Actions/autosplit.ix
%%PERL5_MAN3%%/Swatch::Actions.3.gz
%%PERL5_MAN3%%/Swatch::Threshold.3.gz
%%PERL5_MAN3%%/Swatch::Throttle.3.gz
%%PERL5_MAN1%%/swatch.1.gz

View file

@ -0,0 +1,29 @@
# Created by: jfitz
# $FreeBSD$
PORTNAME= swatchdog
PORTVERSION= 3.2.4
CATEGORIES= security sysutils
MASTER_SITES= SF/swatch/${PORTNAME}
MAINTAINER= joseph@randomnetworks.com
COMMENT= Simple log watcher formerly known as swatch
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
BUILD_DEPENDS= p5-Date-Calc>=0:devel/p5-Date-Calc \
p5-Date-Manip>=0:devel/p5-Date-Manip \
p5-File-Tail>=0:devel/p5-File-Tail \
p5-TimeDate>=0:devel/p5-TimeDate
RUN_DEPENDS:= ${BUILD_DEPENDS}
USES= perl5
USE_PERL5= configure
CONFIGURE_ARGS= INSTALLMAN1DIR=${PREFIX}/man/man1
USE_RC_SUBR= ${PORTNAME}
post-patch:
${FIND} ${WRKSRC} -name "*.orig" -delete
.include <bsd.port.mk>

View file

@ -0,0 +1,3 @@
TIMESTAMP = 1584293936
SHA256 (swatchdog-3.2.4.tar.gz) = 5bb644d3750ee89b9aecab797df66b28b9fd174a5f0f96cd62367af8975b4f63
SIZE (swatchdog-3.2.4.tar.gz) = 30122

View file

@ -1,6 +1,6 @@
--- lib/Swatch/Actions.pm.orig 2010-05-19 15:46:19.000000000 -0300 --- lib/Swatchdog/Actions.pm.orig 2015-09-29 16:39:26 UTC
+++ lib/Swatch/Actions.pm 2010-05-19 15:47:15.000000000 -0300 +++ lib/Swatchdog/Actions.pm
@@ -96,7 +96,7 @@ @@ -96,7 +96,7 @@ sub exec_command {
EXECFORK: { EXECFORK: {
if ($exec_pid = fork) { if ($exec_pid = fork) {

View file

@ -1,6 +1,6 @@
--- lib/Swatch/Throttle.pm.orig 2010-01-16 00:54:35.478307464 +0900 --- lib/Swatchdog/Throttle.pm.orig 2015-09-29 16:39:26 UTC
+++ lib/Swatch/Throttle.pm 2010-01-16 00:58:31.814303601 +0900 +++ lib/Swatchdog/Throttle.pm
@@ -95,6 +95,7 @@ @@ -95,6 +95,7 @@ sub throttle {
@_ @_
); );
@ -8,7 +8,7 @@
my @dmyhms; my @dmyhms;
my $key; my $key;
my $cur_rec; my $cur_rec;
@@ -134,30 +135,61 @@ @@ -134,30 +135,61 @@ sub throttle {
$rec->{FIRST} = [ @dmyhms ]; $rec->{FIRST} = [ @dmyhms ];
$rec->{LAST} = [ @dmyhms ]; $rec->{LAST} = [ @dmyhms ];
$rec->{HOLD_DHMS} = $opts{HOLD_DHMS} if defined $opts{HOLD_DHMS}; $rec->{HOLD_DHMS} = $opts{HOLD_DHMS} if defined $opts{HOLD_DHMS};

View file

@ -0,0 +1,45 @@
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: swatchdog
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# To enable multiple instances of swatchdog, add lines like below to
# /etc/rc.conf.
#
# swatchdog_enable="YES"
# swatchdog_rules="1 2 3"
# swatchdog_1_flags="--config-file=/rc --tail-file=/log --daemon --pid-file=/pid"
# swatchdog_1_user="nobody"
# swatchdog_1_chdir="/var/tmp"
# swatchdog_1_pidfile="/pid"
# swatchdog_2_flags="blah, blah"
# swatchdog_3_flags="blah, blah"
. /etc/rc.subr
name=swatchdog
rcvar=swatchdog_enable
load_rc_config ${name}
# set some defaults
: ${swatchdog_enable:="NO"}
command=%%PREFIX%%/bin/swatchdog
if [ -n "${swatchdog_rules}" ]; then
for i in ${swatchdog_rules}; do
eval swatchdog_flags=\$swatchdog_${i}_flags
len=`echo "0${command} ${swatchdog_flags} (perl)0" | wc -c`
if [ $len -ge 255 ];then
procname=%%LOCALBASE%%/bin/perl
fi
eval swatchdog_user=\$swatchdog_${i}_user
eval swatchdog_chdir=\$swatchdog_${i}_chdir
eval pidfile=\$swatchdog_${i}_pidfile
run_rc_command "$1"
done
fi

View file

@ -0,0 +1,10 @@
swatchdog - the Simple WATCHdog formerly known as swatch.
Swatchdog was originally written to actively monitor messages as they are
written to a log file via the UNIX syslog utility. For a simple
demonstration type "perl swatchdog --examine=FILENAME" with FILENAME being
the file that you would like to see the contents of. All this example will
do is demonstrate the different text modes that are available with to the
echo action.
WWW: http://swatch.sourceforge.net/

View file

@ -0,0 +1,17 @@
[
{ type: upgrade
message: <<EOM
WARNING:
This port was formerly known as sysutils/swatch and was renamed to swatchdog,
the executable was renamed from swatch to swatchdog and the startup script
too.
This means you need to update all settings in rc.conf, e.g.,
swatch_enable="YES" => swatchdog_enable="YES"
swatch_rules="1 2 3" => swatchdog_rules="123"
etc.
EOM
}
]

View file

@ -0,0 +1,9 @@
bin/swatchdog
%%SITE_PERL%%/Swatchdog/Actions.pm
%%SITE_PERL%%/Swatchdog/Threshold.pm
%%SITE_PERL%%/Swatchdog/Throttle.pm
%%SITE_PERL%%/auto/Swatchdog/Actions/autosplit.ix
%%PERL5_MAN1%%/swatchdog.1.gz
%%PERL5_MAN3%%/Swatchdog::Actions.3.gz
%%PERL5_MAN3%%/Swatchdog::Threshold.3.gz
%%PERL5_MAN3%%/Swatchdog::Throttle.3.gz

View file

@ -32,8 +32,8 @@ post-patch:
.include <bsd.port.pre.mk> .include <bsd.port.pre.mk>
.if ${OSVERSION} < 1201000 .if ${OSREL} < 12.1
IGNORE= requires FreeBSD versions 12.1+, this system is running ${OSREL} IGNORE= requires FreeBSD versions 12.1+, this system is running ${OSVERSION}
.endif .endif
.include <bsd.port.post.mk> .include <bsd.port.post.mk>

View file

@ -1,3 +1,3 @@
TIMESTAMP = 1581662226 TIMESTAMP = 1581675377
SHA256 (wulf7-iichid-0.0.1_GH0.tar.gz) = 282540487df1eb3f202f7beb440f68f43801662cb8f817931f09879c1f007a98 SHA256 (wulf7-iichid-0.0.1_GH0.tar.gz) = 282540487df1eb3f202f7beb440f68f43801662cb8f817931f09879c1f007a98
SIZE (wulf7-iichid-0.0.1_GH0.tar.gz) = 51001 SIZE (wulf7-iichid-0.0.1_GH0.tar.gz) = 51001

View file

@ -1,7 +1 @@
FreeBSD driver for I2C HID touchscreens (and may be other devices) Test
A complete discussion about how to use this tool can be found at:
https://larastechlab.blogspot.com/2020/01/i2c-touchpads-on-freebsd-130-current.html
WWW: https://github.com/wulf7/iichid