git: 2c6ad754f623 - main - net/mpd5: install dictionary.mpd and add fix r2441 from upstream

From: Eugene Grosbein <eugen_at_FreeBSD.org>
Date: Wed, 27 Apr 2022 11:30:08 UTC
The branch main has been updated by eugen:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2c6ad754f623bc68636202835929cc159f0d65c0

commit 2c6ad754f623bc68636202835929cc159f0d65c0
Author:     Eugene Grosbein <eugen@FreeBSD.org>
AuthorDate: 2022-04-27 11:19:11 +0000
Commit:     Eugene Grosbein <eugen@FreeBSD.org>
CommitDate: 2022-04-27 11:19:11 +0000

    net/mpd5: install dictionary.mpd and add fix r2441 from upstream
    
    * Add dictionary.mpd to default package build and install it
    to /usr/local/share/mpd/dictionary.mpd.
    
    Thanks Dmitry Luhtionov who noted this omission.
    
    * If parent interface of PPPoE link (vlan, detachable USB ethernet etc.)
    got destroyed and re-added, detect that and continue automatically;
    manual interference was required before this import of upstream r2441.
---
 net/mpd5/Makefile              | 12 +++++++++---
 net/mpd5/files/patch-fixparent | 15 +++++++++++++++
 2 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/net/mpd5/Makefile b/net/mpd5/Makefile
index e0ed5e8ac0c8..344ea9198ce7 100644
--- a/net/mpd5/Makefile
+++ b/net/mpd5/Makefile
@@ -2,7 +2,7 @@
 
 PORTNAME=	mpd
 DISTVERSION=	5.9
-PORTREVISION=	8
+PORTREVISION=	9
 CATEGORIES=	net
 MASTER_SITES=	SF/${PORTNAME}/Mpd5/Mpd-${PORTVERSION}
 PKGNAMESUFFIX=	5
@@ -41,7 +41,13 @@ CONFIGURE_ENV+=	USE_NG_IPACCT=no
 MAKE_ARGS+=	USE_NG_IPACCT=no
 .endif
 
-.if ! ${PORT_OPTIONS:MRADIUS}
+.if ${PORT_OPTIONS:MRADIUS}
+PLIST_FILES=	${DATADIR}/dictionary.mpd
+
+post-install:
+		${MKDIR} ${STAGEDIR}${DATADIR}
+		${INSTALL_DATA} ${WRKSRC}/conf/dictionary.mpd ${STAGEDIR}${DATADIR}
+.else
 CONFIGURE_ENV+=	USE_RADIUS=no
 MAKE_ARGS+=	USE_RADIUS=no
 .endif
@@ -50,7 +56,7 @@ USE_RC_SUBR=	mpd5
 CONFSUF=	conf secret script
 DOCSDIR=	${PREFIX}/share/doc/mpd5
 PORTDOCS=	README mpd*
-PLIST_FILES=	${CONFSUF:C|(.*)|"@sample etc/mpd5/mpd.\1.sample"|} \
+PLIST_FILES+=	${CONFSUF:C|(.*)|"@sample etc/mpd5/mpd.\1.sample"|} \
 		sbin/mpd5
 
 .if !defined(WITHOUT_MAN)
diff --git a/net/mpd5/files/patch-fixparent b/net/mpd5/files/patch-fixparent
new file mode 100644
index 000000000000..a21ddf72ff6d
--- /dev/null
+++ b/net/mpd5/files/patch-fixparent
@@ -0,0 +1,15 @@
+Index: pppoe.c
+===================================================================
+--- src/pppoe.c	(revision 2430)
++++ src/pppoe.c	(working copy)
+@@ -408,6 +408,10 @@ PppoeOpen(Link l)
+ 	    &cn, sizeof(cn)) < 0) {
+ 		Perror("[%s] PPPoE: can't connect \"%s\"->\"%s\" and \"%s\"->\"%s\"",
+     		    l->name, path, cn.ourhook, cn.path, cn.peerhook);
++		if (errno == ENOENT) {
++		    PppoeReleaseNode(l);
++		    goto fail;
++		}
+ 		goto fail2;
+ 	}
+