Skip to content

Commit

Permalink
comms/ser2net: update to 4.6.4 and take maintainership
Browse files Browse the repository at this point in the history
Changelog: https://sourceforge.net/p/ser2net/news

Major changes since 3.5.1 (2017)
    * massive rewrite of ser2net
    * Configuration has been converted over to use YAML
    * supports encrypted and authenticated connections using
      gensio gtlssh
    * ability to "connect back" to a remote address data comes
      in on a device
    * new gensio dependency to manage data streams, SSL,
      TELNET and so
    * add mDNS support
    * DSR/RTS line controls on the serialdev gensio
    * 2-factor authentication support to gtlssh
    * use PAM passwords to authenticate ser2net connections
    * ed25519 end elliptical key support for gtlssh and certauth
    * ratelimit - limit the data throughput on the write side of the
      gensio stack
    * AFSK modem gensio has been added to implements the 1200 baud
      modem used for AX.25 in ham radio

This version breaks the existing ser2net configuration who has to be
converted over using YAML. Please see the examples on ser2net.yaml sample
configuration and read the ser2net.yaml manpage on how to configure
the new version. Additional links and resources have been provided on the
pkg-message.
  • Loading branch information
rosorio committed Feb 19, 2025
1 parent 5db06dc commit 7c26676
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 26 deletions.
24 changes: 14 additions & 10 deletions comms/ser2net/Makefile
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
PORTNAME= ser2net
PORTVERSION= 3.5.1
PORTREVISION= 1
PORTVERSION= 4.6.4
CATEGORIES= comms net
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}

MAINTAINER= ports@FreeBSD.org
MAINTAINER= rodrigo@FreeBSD.org
COMMENT= Allows to access serial ports over IP
WWW= https://www.sourceforge.net/projects/ser2net/

LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/COPYING

LIB_DEPENDS= libgensio.so:comms/gensio \
libyaml.so:textproc/libyaml

USES= libtool
USE_RC_SUBR= ${PORTNAME}

GNU_CONFIGURE= yes

CFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib

PORTDOCS= AUTHORS ChangeLog NEWS README
PLIST_FILES= sbin/${PORTNAME} etc/${PORTNAME}.conf.sample \
share/man/man8/${PORTNAME}.8.gz

OPTIONS_DEFINE= DOCS

Expand All @@ -27,20 +30,21 @@ post-patch:
@${REINPLACE_CMD} -e \
's!/etc!${PREFIX}/etc!g' ${WRKSRC}/${i}
.endfor
.for i in ${PORTNAME}.conf
.for i in ${PORTNAME}.yaml
@${REINPLACE_CMD} -e \
's!ttyS!cuad!g' ${WRKSRC}/${i}
.endfor
@${REINPLACE_CMD} -e '/#include <values\.h>/d' \
${WRKSRC}/readconfig.c

do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} \
${STAGEDIR}${PREFIX}/sbin
${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.8 \
${STAGEDIR}${PREFIX}/share/man/man8
${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.conf \
${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample
${MKDIR} ${STAGEDIR}${PREFIX}/etc/${PORTNAME}/ && \
${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.yaml \
${STAGEDIR}${PREFIX}/etc/${PORTNAME}/${PORTNAME}.yaml.sample
${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.yaml.5 \
${STAGEDIR}${PREFIX}/share/man/man5

do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
Expand Down
6 changes: 3 additions & 3 deletions comms/ser2net/distinfo
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
TIMESTAMP = 1545042767
SHA256 (ser2net-3.5.1.tar.gz) = 02f5dd0abbef5a17b80836b0de1ef0588e257106fb5e269b86822bfd001dc862
SIZE (ser2net-3.5.1.tar.gz) = 437254
TIMESTAMP = 1739622108
SHA256 (ser2net-4.6.4.tar.gz) = 75864434c4f002fa3570daaffeb6f794354fca6d8b5814b8386977a3b1416be9
SIZE (ser2net-4.6.4.tar.gz) = 477746
11 changes: 0 additions & 11 deletions comms/ser2net/files/patch-devcfg.c

This file was deleted.

10 changes: 10 additions & 0 deletions comms/ser2net/files/patch-port.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- ./port.h.orig 2025-02-16 11:47:28 UTC
+++ ./port.h
@@ -32,6 +32,7 @@
#include <netdb.h>
#endif

+#include <netinet/in.h>
#include <gensio/gensio.h>

#include "gbuf.h"
3 changes: 1 addition & 2 deletions comms/ser2net/files/ser2net.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ load_rc_config $name
: ${ser2net_enable="NO"}
: ${ser2net_pidfile="/var/run/ser2net.pid"}

start_cmd="/usr/sbin/daemon -p ${ser2net_pidfile} $command $rc_flags $command_args"
stop_postcmd="rm -f /var/lock/subsys/ser2net"
start_cmd="$command -P ${ser2net_pidfile} $ser2net_flags"

run_rc_command "$1"
14 changes: 14 additions & 0 deletions comms/ser2net/pkg-message
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
type: upgrade
maximum_version: "4.6.4"
message: <<EOM
Upgrading from before 4.6.4, old ser2net configuration is not supported anymore.
You must convert the existing configuration into the new YAML format.
See ser2net.yaml.sample and ser2net.yaml manpage for more details.

Additional resources can be found on the following wiki page:
https://wiki.freebsd.org/RodrigoOsorio/HowTo/Ser2Net
EOM
}
]

0 comments on commit 7c26676

Please sign in to comment.