git: 5af0ec07983e - main - security/xinetd: Make it fetchable and fix WWW

From: Renato Botelho <garga_at_FreeBSD.org>
Date: Tue, 21 Mar 2023 14:27:11 UTC
The branch main has been updated by garga:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5af0ec07983e27d6c4cfea2bf43672981e7fbfb9

commit 5af0ec07983e27d6c4cfea2bf43672981e7fbfb9
Author:     Renato Botelho <garga@FreeBSD.org>
AuthorDate: 2023-03-21 14:24:33 +0000
Commit:     Renato Botelho <garga@FreeBSD.org>
CommitDate: 2023-03-21 14:27:02 +0000

    security/xinetd: Make it fetchable and fix WWW
    
    Original site is gone but code is still available on github.  Changed
    WWW to point to github and also consumes source code from there.
    
    I've compared content of current github code and original tarball and it
    was just missing one function from xgetloadavg.c, now added using patch.
    
    While here, re-generate patches.
    
    PR:             270345
    Reported by:    diizzy
---
 security/xinetd/Makefile                           | 16 +++++++++------
 security/xinetd/distinfo                           |  5 +++--
 security/xinetd/files/patch-Makefile.in            |  2 +-
 ...-xinetd__builtins.c => patch-xinetd_builtins.c} |  4 ++--
 security/xinetd/files/patch-xinetd_child.c         | 12 +++++------
 ...ch-xinetd__xconfig.h => patch-xinetd_xconfig.h} |  2 +-
 security/xinetd/files/patch-xinetd_xgetloadavg.c   | 24 ++++++++++++++++++++++
 security/xinetd/files/patch-xinetd_xinetd.conf.man |  4 ++--
 8 files changed, 49 insertions(+), 20 deletions(-)

diff --git a/security/xinetd/Makefile b/security/xinetd/Makefile
index d0dd9ccc45ed..a68de54b5fb9 100644
--- a/security/xinetd/Makefile
+++ b/security/xinetd/Makefile
@@ -2,25 +2,29 @@ PORTNAME=	xinetd
 PORTVERSION=	2.3.15
 PORTREVISION=	2
 CATEGORIES=	security
-MASTER_SITES=	GENTOO
 
 MAINTAINER=	garga@FreeBSD.org
 COMMENT=	Replacement for inetd with better control and logging
-WWW=		http://www.xinetd.org/
+WWW=		https://github.com/xinetd-org/xinetd
 
 LICENSE=	XINETD
 LICENSE_NAME=	xinetd license
 LICENSE_FILE=	${WRKSRC}/COPYRIGHT
 LICENSE_PERMS=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
 
-GNU_CONFIGURE=	yes
+USES=		cpe shebangfix
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	xinetd-org
+GH_TAGNAME=	xinetd-2-3-15
 USE_RC_SUBR=	xinetd
-ALL_TARGET=	build
-CONFIGURE_ARGS=	--with-loadavg
 
-USES=		cpe shebangfix
 SHEBANG_FILES=	${WRKSRC}/xinetd/xconv.pl
 
+GNU_CONFIGURE=	yes
+CONFIGURE_ARGS=	--with-loadavg
+ALL_TARGET=	build
+
 OPTIONS_DEFINE=	IPV6 LIBWRAP XCONV
 OPTIONS_DEFAULT=	LIBWRAP XCONV
 OPTIONS_SUB=	yes
diff --git a/security/xinetd/distinfo b/security/xinetd/distinfo
index 5f710c9aeb3b..4cb935d7b310 100644
--- a/security/xinetd/distinfo
+++ b/security/xinetd/distinfo
@@ -1,2 +1,3 @@
-SHA256 (xinetd-2.3.15.tar.gz) = bf4e060411c75605e4dcbdf2ac57c6bd9e1904470a2f91e01ba31b50a80a5be3
-SIZE (xinetd-2.3.15.tar.gz) = 309774
+TIMESTAMP = 1679407850
+SHA256 (xinetd-org-xinetd-2.3.15-xinetd-2-3-15_GH0.tar.gz) = 620b25f4ab4d72fdf32b13797156ea40df2049f1c07e640177e5fec544e9a94c
+SIZE (xinetd-org-xinetd-2.3.15-xinetd-2-3-15_GH0.tar.gz) = 300870
diff --git a/security/xinetd/files/patch-Makefile.in b/security/xinetd/files/patch-Makefile.in
index 18a06b907550..c0b4c4812503 100644
--- a/security/xinetd/files/patch-Makefile.in
+++ b/security/xinetd/files/patch-Makefile.in
@@ -1,4 +1,4 @@
---- Makefile.in.orig	2007-09-20 17:01:52 UTC
+--- Makefile.in.orig	2012-05-09 16:03:17 UTC
 +++ Makefile.in
 @@ -77,16 +77,14 @@ install: build
  	for i in $(DAEMONDIR) $(BINDIR) $(MANDIR)/man5 $(MANDIR)/man8 ; do \
diff --git a/security/xinetd/files/patch-xinetd__builtins.c b/security/xinetd/files/patch-xinetd_builtins.c
similarity index 57%
rename from security/xinetd/files/patch-xinetd__builtins.c
rename to security/xinetd/files/patch-xinetd_builtins.c
index c16e17e0e151..a1de03b946fa 100644
--- a/security/xinetd/files/patch-xinetd__builtins.c
+++ b/security/xinetd/files/patch-xinetd_builtins.c
@@ -1,6 +1,6 @@
---- xinetd/builtins.c.orig	2012-05-09 15:40:29 UTC
+--- xinetd/builtins.c.orig	2012-05-09 16:03:17 UTC
 +++ xinetd/builtins.c
-@@ -617,7 +617,7 @@ static void tcpmux_handler( const struct
+@@ -617,7 +617,7 @@ static void tcpmux_handler( const struct server *serp 
     if( SC_IS_INTERNAL( scp ) ) {
        SC_INTERNAL(scp, nserp);
     } else {
diff --git a/security/xinetd/files/patch-xinetd_child.c b/security/xinetd/files/patch-xinetd_child.c
index 6ddbf9125988..82a0d106a878 100644
--- a/security/xinetd/files/patch-xinetd_child.c
+++ b/security/xinetd/files/patch-xinetd_child.c
@@ -1,6 +1,6 @@
---- xinetd/child.c.orig	2016-07-13 19:00:31 UTC
+--- xinetd/child.c.orig	2012-05-09 16:03:17 UTC
 +++ xinetd/child.c
-@@ -168,7 +168,8 @@ void exec_server( const struct server *s
+@@ -168,7 +168,8 @@ void exec_server( const struct server *serp )
     }
  #endif
  
@@ -10,15 +10,15 @@
  
  #ifndef solaris
  #if !defined(HAVE_SETSID)
-@@ -321,11 +322,6 @@ void child_process( struct server *serp 
+@@ -320,11 +321,6 @@ void child_process( struct server *serp )
+    }
     signals_pending[0] = -1;
     signals_pending[1] = -1;
- 
+-
 -   Sclose(0);
 -   Sclose(1);
 -   Sclose(2);
 -
--
+ 
  #ifdef DEBUG_SERVER
     if ( debug.on )
-    {
diff --git a/security/xinetd/files/patch-xinetd__xconfig.h b/security/xinetd/files/patch-xinetd_xconfig.h
similarity index 82%
rename from security/xinetd/files/patch-xinetd__xconfig.h
rename to security/xinetd/files/patch-xinetd_xconfig.h
index 187fb37bf752..eade8946086f 100644
--- a/security/xinetd/files/patch-xinetd__xconfig.h
+++ b/security/xinetd/files/patch-xinetd_xconfig.h
@@ -1,4 +1,4 @@
---- xinetd/xconfig.h.orig	2003-02-19 17:29:28 UTC
+--- xinetd/xconfig.h.orig	2012-05-09 16:03:17 UTC
 +++ xinetd/xconfig.h
 @@ -29,7 +29,7 @@
  #endif
diff --git a/security/xinetd/files/patch-xinetd_xgetloadavg.c b/security/xinetd/files/patch-xinetd_xgetloadavg.c
new file mode 100644
index 000000000000..a7473d55121a
--- /dev/null
+++ b/security/xinetd/files/patch-xinetd_xgetloadavg.c
@@ -0,0 +1,24 @@
+--- xinetd/xgetloadavg.c.orig	2012-05-09 16:03:17 UTC
++++ xinetd/xgetloadavg.c
+@@ -87,6 +87,21 @@ double xgetloadavg(void)
+ #endif /* HAVE_KSTAT */
+ #endif /* solaris */
+ 
++#ifdef __FreeBSD__
++
++#include <stdio.h>
++#include <sys/param.h>
++#include <sys/fcntl.h>
++
++double xgetloadavg ()
++{
++	double ret[3];
++
++	getloadavg (ret, sizeof (ret) / sizeof (ret[0]));
++
++	return ret[0];
++}
++#endif /* __FreeBSD__ */
+ 
+ #if defined(bsdi) || defined(__APPLE__)
+ #include <stdlib.h>
diff --git a/security/xinetd/files/patch-xinetd_xinetd.conf.man b/security/xinetd/files/patch-xinetd_xinetd.conf.man
index f736ae54d719..d46143e7aee6 100644
--- a/security/xinetd/files/patch-xinetd_xinetd.conf.man
+++ b/security/xinetd/files/patch-xinetd_xinetd.conf.man
@@ -1,6 +1,6 @@
---- xinetd/xinetd.conf.man.orig	2015-05-23 15:05:32 UTC
+--- xinetd/xinetd.conf.man.orig	2012-05-09 16:03:17 UTC
 +++ xinetd/xinetd.conf.man
-@@ -233,7 +233,7 @@ determines the program to execute for th
+@@ -233,7 +233,7 @@ the server name should \fInot\fP be included in \fIser
  determines the arguments passed to the server. In contrast to \fBinetd\fP,
  the server name should \fInot\fP be included in \fIserver_args\fP.
  .TP