Compare commits

...

11 Commits

Author SHA1 Message Date
yo
dab14fbbbf Update to v1.0.0-rc4 2022-05-17 15:55:38 +02:00
yo
3a1153818e update distinfo 2022-05-17 14:07:45 +02:00
yo
25292f6c65 Fix rc file 2022-05-17 13:44:30 +02:00
yo
8a6f77211a update sums 2022-05-17 11:47:49 +02:00
yo
eea43ff798 Update to v1.0.0-rc3 2022-05-17 11:44:58 +02:00
yo
54c250e4c8 Fetch go depends from github 2022-05-17 11:02:12 +02:00
yo
9716855536 update to mynettcptable-1.0.0-rc2 2022-05-16 13:59:53 +02:00
yo
1cd0e1bb24 Form 2022-05-16 10:57:03 +02:00
yo
323f0091f8 Add configuration sample 2022-05-16 10:51:32 +02:00
yo
d4850c945a nothing to see here 2022-05-16 10:51:14 +02:00
yo
a8ca8410a8 Service handles rights on pid and logfile 2022-05-16 10:50:52 +02:00
4 changed files with 73 additions and 26 deletions

View File

@ -1,12 +1,24 @@
# Makefile 2022-05-13 10:36:39Z yo $
PORTNAME= mynettcptable
DISTVERSIONPREFIX=v
DISTVERSION= 1.0.0-rc1
DISTVERSIONPREFIX= v
DISTVERSION= 1.0.0-rc4
CATEGORIES= mail
MASTER_SITES= https://git.nosd.in/yo/mynettcptable/archive/
MASTER_SITES= https://git.nosd.in/yo/mynettcptable/archive/ \
https://codeload.github.com/Azure/go-ntlmssp/tar.gz/48547f28849e?dummy=/:SRC2 \
https://codeload.github.com/go-asn1-ber/asn1-ber/tar.gz/v1.5.4?dummy=/:SRC3 \
https://codeload.github.com/go-ldap/ldap/tar.gz/v3.4.3?dummy=/:SRC4 \
https://codeload.github.com/golang/crypto/tar.gz/ae2d96664a29?dummy=/:SRC5 \
https://codeload.github.com/golang/sys/tar.gz/665e8c7367d1?dummy=/:SRC6 \
https://codeload.github.com/peterbourgon/ff/tar.gz/v1.7.1?dummy=/:SRC7 \
https://codeload.github.com/sirupsen/logrus/tar.gz/v1.8.1?dummy=/:SRC8 \
https://codeload.github.com/tabalt/pidfile/tar.gz/v1.1.0?dummy=/:SRC9
# Gitea packaging need some tweaks
DISTNAME= ${DISTVERSIONPREFIX}${DISTVERSION}
DISTNAME= ${DISTVERSIONPREFIX}${DISTVERSION}${EXTRACT_SUFX} Azure-go-ntlmssp-48547f28849e_GH0.tar.gz:SRC2 \
go-asn1-ber-asn1-ber-v1.5.4_GH0.tar.gz:SRC3 go-ldap-ldap-v3.4.3_GH0.tar.gz:SRC4 \
golang-crypto-ae2d96664a29_GH0.tar.gz:SRC5 golang-sys-665e8c7367d1_GH0.tar.gz:SRC6 \
peterbourgon-ff-v1.7.1_GH0.tar.gz:SRC7 sirupsen-logrus-v1.8.1_GH0.tar.gz:SRC8 \
tabalt-pidfile-v1.1.0_GH0.tar.gz:SRC9
MAINTAINER= johan@nosd.in
COMMENT= Postfix tcp_table service to get mynetworks from LDAP
@ -17,27 +29,33 @@ USES= go
# Gitea packaging need some tweaks
WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION}
EXTRACT_AFTER_ARGS= && ${MV} ${PORTNAME} ${PORTNAME}-${DISTVERSION}
EXTRACT_AFTER_ARGS= && ( [ -d ${PORTNAME} ] && ${MV} ${PORTNAME} ${PORTNAME}-${DISTVERSION} || /usr/bin/true ) \
&& ( [ -d go-ntlmssp-48547f28849e ] && ( ${MKDIR} ${PORTNAME}-${DISTVERSION}/vendor/github.com/Azure && \
${MV} go-ntlmssp-48547f28849e ${PORTNAME}-${DISTVERSION}/vendor/github.com/Azure/go-ntlmssp ) || /usr/bin/true ) \
&& ( [ -d asn1-ber-1.5.4 ] && ( ${MKDIR} ${PORTNAME}-${DISTVERSION}/vendor/github.com/go-asn1-ber && \
${MV} asn1-ber-1.5.4 ${PORTNAME}-${DISTVERSION}/vendor/github.com/go-asn1-ber/asn1-ber ) || /usr/bin/true ) \
&& ( [ -d ldap-3.4.3 ] && ( ${MKDIR} ${PORTNAME}-${DISTVERSION}/vendor/github.com/go-ldap && \
${MV} ldap-3.4.3 ${PORTNAME}-${DISTVERSION}/vendor/github.com/go-ldap/ldap ) || /usr/bin/true ) \
&& ( [ -d crypto-ae2d96664a29 ] && ( ${MKDIR} ${PORTNAME}-${DISTVERSION}/vendor/golang.org/x && \
${MV} crypto-ae2d96664a29 ${PORTNAME}-${DISTVERSION}/vendor/golang.org/x/crypto ) || /usr/bin/true ) \
&& ( [ -d sys-665e8c7367d1 ] && ( ${MKDIR} ${PORTNAME}-${DISTVERSION}/vendor/golang.org/x && \
${MV} sys-665e8c7367d1 ${PORTNAME}-${DISTVERSION}/vendor/golang.org/x/sys ) || /usr/bin/true ) \
&& ( [ -d ff-1.7.1 ] && ( ${MKDIR} ${PORTNAME}-${DISTVERSION}/vendor/github.com/peterbourgon && \
${MV} ff-1.7.1 ${PORTNAME}-${DISTVERSION}/vendor/github.com/peterbourgon/ff ) || /usr/bin/true ) \
&& ( [ -d logrus-1.8.1 ] && ( ${MKDIR} ${PORTNAME}-${DISTVERSION}/vendor/github.com/sirupsen && \
${MV} logrus-1.8.1 ${PORTNAME}-${DISTVERSION}/vendor/github.com/sirupsen/logrus ) || /usr/bin/true ) \
&& ( [ -d pidfile-1.1.0 ] && ( ${MKDIR} ${PORTNAME}-${DISTVERSION}/vendor/github.com/tabalt && \
${MV} pidfile-1.1.0 ${PORTNAME}-${DISTVERSION}/vendor/github.com/tabalt/pidfile ) || /usr/bin/true ) \
USERS= nobody
GROUPS= nogroup
GH_TUPLE= \
Azure:go-ntlmssp:48547f28849e:azure_go_ntlmssp/vendor/github.com/Azure/go-ntlmssp \
go-asn1-ber:asn1-ber:v1.5.4:go_asn1_ber_asn1_ber/vendor/github.com/go-asn1-ber/asn1-ber \
go-ldap:ldap:v3.4.3:go_ldap_ldap_v3/vendor/github.com/go-ldap/ldap \
golang:crypto:ae2d96664a29:golang_crypto/vendor/golang.org/x/crypto \
golang:sys:665e8c7367d1:golang_sys/vendor/golang.org/x/sys \
peterbourgon:ff:v1.7.1:peterbourgon_ff/vendor/github.com/peterbourgon/ff \
sirupsen:logrus:v1.8.1:sirupsen_logrus/vendor/github.com/sirupsen/logrus \
tabalt:pidfile:v1.1.0:tabalt_pidfile/vendor/github.com/tabalt/pidfile
USE_RC_SUBR= mynettcptable
pre-test:
${SETENV} GOPATH="${WRKDIR}"
post-install:
${INSTALL_DATA} ${WRKSRC}/mynettcptable.conf.sample ${STAGEDIR}${PREFIX}/etc
${INSTALL_DATA} ${WRKSRC}/mynettcptable.conf.sample ${STAGEDIR}${PREFIX}/etc/
.include <bsd.port.mk>

View File

@ -1,3 +1,19 @@
TIMESTAMP = 1652519865
SHA256 (v1.0.0-rc1.tar.gz) = 20668e2612fd64759ebbc495202ab716728224b3cfdf793757a0495ee944ed2f
SIZE (v1.0.0-rc1.tar.gz) = 7744
TIMESTAMP = 1652795722
SHA256 (v1.0.0-rc4.tar.gz) = b7f111054adb7990e66e3d6473bbbca510833b0fa52c976e987d87cfeddacf91
SIZE (v1.0.0-rc4.tar.gz) = 7790
SHA256 (Azure-go-ntlmssp-48547f28849e_GH0.tar.gz) = ea089572abc1827301490e4fdb0def4047a26de60602b282bcdcb7798d35e898
SIZE (Azure-go-ntlmssp-48547f28849e_GH0.tar.gz) = 8218
SHA256 (go-asn1-ber-asn1-ber-v1.5.4_GH0.tar.gz) = 749c6318225eb3905f3ea7a05560019977755aaaaa2058b9c7f8a6c673484c4e
SIZE (go-asn1-ber-asn1-ber-v1.5.4_GH0.tar.gz) = 16483
SHA256 (go-ldap-ldap-v3.4.3_GH0.tar.gz) = 6ca165f47acd91d1c3abc0bed31fd13aa210143c5b449f7e4ab099d6cebdcb18
SIZE (go-ldap-ldap-v3.4.3_GH0.tar.gz) = 91166
SHA256 (golang-crypto-ae2d96664a29_GH0.tar.gz) = 6b2031688c3ae29f96032c0e3e99a21858b8e5cbd4e9903441eec52cae9a698f
SIZE (golang-crypto-ae2d96664a29_GH0.tar.gz) = 1630594
SHA256 (golang-sys-665e8c7367d1_GH0.tar.gz) = 19c3498496d91ac9c0c0226c9b832c23a0b042b9a707be811ef976e801d373f4
SIZE (golang-sys-665e8c7367d1_GH0.tar.gz) = 1200405
SHA256 (peterbourgon-ff-v1.7.1_GH0.tar.gz) = 745cc13513f04ba5bb69ab0ed857c5a297a9a5e67e70ff0d7fe2884d90ea7944
SIZE (peterbourgon-ff-v1.7.1_GH0.tar.gz) = 19100
SHA256 (sirupsen-logrus-v1.8.1_GH0.tar.gz) = e9492c08ac8f202b438ccfb992bf81b7860739cf8f2266958e0c574c7abfdd74
SIZE (sirupsen-logrus-v1.8.1_GH0.tar.gz) = 47161
SHA256 (tabalt-pidfile-v1.1.0_GH0.tar.gz) = 893a2cf199c48fef6f43969db23d987bec8290f080aff59820c851b82ddd3bac
SIZE (tabalt-pidfile-v1.1.0_GH0.tar.gz) = 2158

View File

@ -24,17 +24,29 @@
name=mynettcptable
rcvar=mynettcptable_enable
load_rc_config $name
load_rc_config ${name}
: ${mynettcptable_enable="NO"}
: ${mynettcptable_config="/usr/local/etc/mynettcptable.conf"}
: ${mynettcptable_loglevel="warn"}
: ${mynettcptable_user:="mynettcptable"}
: ${mynettcptable_pidfile:="/var/run/mynettcptable.pid"}
: ${mynettcptable_user:="nobody"}
: ${mynettcptable_logfile="/var/log/mynettcptable.log"}
command="/usr/local/bin/mynettcptable"
command_args="-config=\${mynettcptable_config} -logLevel=\${mynettcptable_loglevel} -logLevel=\${mynettcptable_loglevel} > ${mynettcptable_logfile} 2>&1"
start_cmd="/usr/sbin/daemon -u ${mynettcptable_user} ${command} ${command_args}"
command="/usr/local/bin/${name}"
pidfile="/var/run/${name}/${name}.pid"
command_args="-pidfile=${pidfile} -config=${mynettcptable_config} -logLevel=${mynettcptable_loglevel}"
start_precmd="mynettcptable_prestart"
start_cmd="/usr/sbin/daemon -u ${mynettcptable_user} ${command} ${command_args} >> ${mynettcptable_logfile} 2>&1"
mynettcptable_prestart()
{
mkdir /var/run/${name} >/dev/null 2>&1
touch ${mynettcptable_logfile}
chown ${mynettcptable_user} /var/run/${name}
chown ${mynettcptable_user} ${mynettcptable_logfile}
}
run_rc_command "$1"

View File

@ -1 +1,2 @@
bin/mynettcptable
@sample etc/mynettcptable.conf.sample