Added relayd
This commit is contained in:
63
net/relayd/Makefile
Normal file
63
net/relayd/Makefile
Normal file
@ -0,0 +1,63 @@
|
||||
PORTNAME= relayd
|
||||
DISTVERSION= 7.3.2024.01.15
|
||||
CATEGORIES= net
|
||||
#MASTER_SITES= https://github.com/KlaraSystems/freebsd-relayd/releases/download/${DISTVERSION}/
|
||||
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= 0mp
|
||||
GH_PROJECT= freebsd-relayd
|
||||
GH_TAGNAME= 44c1ed0
|
||||
|
||||
MAINTAINER= 0mp@FreeBSD.org
|
||||
COMMENT= OpenBSD relay daemon
|
||||
WWW= https://github.com/KlaraSystems/freebsd-relayd
|
||||
|
||||
LICENSE= ISCL
|
||||
|
||||
LIB_DEPENDS= libpfctl.so:net/libpfctl
|
||||
|
||||
USES= localbase:ldflags ssl uidfix
|
||||
USE_RC_SUBR= relayd
|
||||
|
||||
HAS_CONFIGURE= yes
|
||||
|
||||
LDFLAGS+= -lpfctl
|
||||
|
||||
USERS= _relayd
|
||||
GROUPS= _relayd
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if !${SSL_DEFAULT:Mlibressl*}
|
||||
_LIBRESSL_ORIGIN= security/libressl
|
||||
. ifnmake describe
|
||||
STAGEDIR_libressl!= ${MAKE} -V STAGEDIR -C ${PORTSDIR}/${_LIBRESSL_ORIGIN}
|
||||
. endif
|
||||
BUILD_DEPENDS+= ${NONEXISTENT}:${_LIBRESSL_ORIGIN}:stage
|
||||
.endif # SSL_DEFAULT
|
||||
|
||||
MAKE_ENV= LIBCRYPTO=${STAGEDIR_libressl}${LOCALBASE}/lib/libcrypto.a \
|
||||
LIBSSL=${STAGEDIR_libressl}${LOCALBASE}/lib/libssl.a \
|
||||
LIBTLS=${STAGEDIR_libressl}${LOCALBASE}/lib/libtls.a \
|
||||
OPENSSLINCDIR=${STAGEDIR_libressl}${LOCALBASE}/include
|
||||
|
||||
post-patch:
|
||||
${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
|
||||
${WRKSRC}/usr.sbin/relayd/relayd.conf.5 \
|
||||
${WRKSRC}/usr.sbin/relayd/relayd.8
|
||||
|
||||
do-install:
|
||||
${INSTALL_DATA} ${WRKSRC}/etc/examples/relayd.conf \
|
||||
${STAGEDIR}${PREFIX}/etc/relayd.conf.sample
|
||||
${INSTALL_MAN} ${WRKSRC}/usr.sbin/relayctl/relayctl.8 \
|
||||
${STAGEDIR}${PREFIX}/share/man/man8/
|
||||
${INSTALL_MAN} ${WRKSRC}/usr.sbin/relayd/relayd.8 \
|
||||
${STAGEDIR}${PREFIX}/share/man/man8/
|
||||
${INSTALL_MAN} ${WRKSRC}/usr.sbin/relayd/relayd.conf.5 \
|
||||
${STAGEDIR}${PREFIX}/share/man/man5/
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/usr.sbin/relayctl/relayctl \
|
||||
${STAGEDIR}${PREFIX}/sbin/
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/usr.sbin/relayd/relayd \
|
||||
${STAGEDIR}${PREFIX}/sbin/
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
3
net/relayd/distinfo
Normal file
3
net/relayd/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
TIMESTAMP = 1709219928
|
||||
SHA256 (0mp-freebsd-relayd-7.3.2024.01.15-44c1ed0_GH0.tar.gz) = 3f155b63141b9143a9f57cac1536a81b1592c9d5b5c0d5716912edf3169ab812
|
||||
SIZE (0mp-freebsd-relayd-7.3.2024.01.15-44c1ed0_GH0.tar.gz) = 257538830
|
||||
11
net/relayd/files/patch-share_mk_bsd.own.mk
Normal file
11
net/relayd/files/patch-share_mk_bsd.own.mk
Normal file
@ -0,0 +1,11 @@
|
||||
--- share/mk/bsd.own.mk.orig 2023-11-02 07:25:02 UTC
|
||||
+++ share/mk/bsd.own.mk
|
||||
@@ -15,7 +15,7 @@ SKEY?= yes
|
||||
# Set `YP' to `yes' to build with support for NIS/YP.
|
||||
YP?= yes
|
||||
|
||||
-CLANG_ARCH=aarch64 amd64 arm i386 mips64 mips64el powerpc powerpc64 riscv64 sparc64
|
||||
+CLANG_ARCH=aarch64 amd64 arm armv6 armv7 i386 mips64 mips64el powerpc powerpc64 riscv64 sparc64
|
||||
GCC4_ARCH=alpha hppa sh sparc64
|
||||
GCC3_ARCH=m88k
|
||||
LLD_ARCH=aarch64 amd64 arm i386 powerpc powerpc64 riscv64
|
||||
39
net/relayd/files/relayd.in
Normal file
39
net/relayd/files/relayd.in
Normal file
@ -0,0 +1,39 @@
|
||||
#!/bin/sh
|
||||
|
||||
# PROVIDE: relayd
|
||||
# REQUIRE: NETWORKING syslogd
|
||||
# BEFORE: DAEMON
|
||||
# KEYWORD: shutdown
|
||||
|
||||
# Add the following lines to /etc/rc.conf to enable relayd:
|
||||
# relayd_enable="YES"
|
||||
# relayd_flags="<set as needed>"
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name=relayd
|
||||
rcvar=relayd_enable
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
: ${relayd_enable="NO"}
|
||||
|
||||
command="%%PREFIX%%/sbin/relayd"
|
||||
relayctl="%%PREFIX%%/sbin/relayctl"
|
||||
start_precmd="relayd_checkconfig"
|
||||
reload_precmd="relayd_checkconfig"
|
||||
restart_precmd="relayd_checkconfig"
|
||||
reload_cmd="relayd_reload_cmd"
|
||||
extra_commands="reload"
|
||||
|
||||
relayd_checkconfig()
|
||||
{
|
||||
echo "Performing sanity check on relayd configuration:"
|
||||
eval ${command} ${relayd_flags} -n
|
||||
}
|
||||
|
||||
relayd_reload_cmd () {
|
||||
${relayctl} reload
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
||||
18
net/relayd/pkg-descr
Normal file
18
net/relayd/pkg-descr
Normal file
@ -0,0 +1,18 @@
|
||||
This is the FreeBSD port of the OpenBSD relayd and relayctl.
|
||||
|
||||
relayd is a daemon to relay and dynamically redirect incoming connections
|
||||
to a target host. Its main purposes are to run as a load-balancer,
|
||||
application layer gateway, or transparent proxy. The daemon is able to
|
||||
monitor groups of hosts for availability, which is determined by checking
|
||||
for a specific service common to a host group. When availability is con-
|
||||
firmed, Layer 3 and/or layer 7 forwarding services are set up by relayd.
|
||||
|
||||
Layer 3 redirection happens at the packet level; to configure it, relayd
|
||||
communicates with pf(4).
|
||||
|
||||
The following relayd functionality is not (yet) implemented in FreeBSD:
|
||||
- carp demote
|
||||
- modifying routing tables
|
||||
- snmp traps
|
||||
|
||||
The relayctl program controls the relayd(8) daemon.
|
||||
6
net/relayd/pkg-plist
Normal file
6
net/relayd/pkg-plist
Normal file
@ -0,0 +1,6 @@
|
||||
@sample etc/relayd.conf.sample
|
||||
share/man/man5/relayd.conf.5.gz
|
||||
share/man/man8/relayctl.8.gz
|
||||
share/man/man8/relayd.8.gz
|
||||
sbin/relayctl
|
||||
sbin/relayd
|
||||
Reference in New Issue
Block a user