diff --git a/security/xinetd/Makefile b/security/xinetd/Makefile index d0dd9ccc45ed..a68de54b5fb9 100644 --- a/security/xinetd/Makefile +++ b/security/xinetd/Makefile @@ -1,46 +1,50 @@ 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 XCONV_DESC= Install xconv utility (requires perl) IPV6_CONFIGURE_WITH= ipv6 LIBWRAP_CONFIGURE_WITH= libwrap XCONV_USES= perl5 XCONV_USE= PERL5=run post-patch: @${REINPLACE_CMD} 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/xinetd/xconfig.h do-install: ${INSTALL_PROGRAM} ${WRKSRC}/xinetd/xinetd ${STAGEDIR}${PREFIX}/sbin/xinetd ${INSTALL_SCRIPT} ${WRKSRC}/xinetd/xconv.pl ${STAGEDIR}${PREFIX}/bin/xconv ${INSTALL_MAN} ${WRKSRC}/xinetd/xinetd.conf.man ${STAGEDIR}${PREFIX}/man/man5/xinetd.conf.5 ${INSTALL_MAN} ${WRKSRC}/xinetd/xconv.pl.8 ${STAGEDIR}${PREFIX}/man/man8/xconv.8 ${INSTALL_MAN} ${WRKSRC}/xinetd/xinetd.man ${STAGEDIR}${PREFIX}/man/man8/xinetd.8 ${INSTALL_MAN} ${WRKSRC}/xinetd/xinetd.log.man ${STAGEDIR}${PREFIX}/man/man8/xinetd.log.8 .include 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,22 +1,22 @@ ---- 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 \ test -d $$i || mkdir -p $$i ; done $(INSTALL_CMD) -m 755 xinetd/xinetd $(DAEMONDIR) - $(INSTALL_CMD) -m 755 xinetd/itox $(DAEMONDIR) - $(INSTALL_CMD) -m 755 $(SRCDIR)/xinetd/xconv.pl $(DAEMONDIR) + $(INSTALL_CMD) -m 755 $(SRCDIR)/xinetd/xconv.pl $(prefix)/bin/xconv $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.conf.man $(MANDIR)/man5/xinetd.conf.5 $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.log.man $(MANDIR)/man8/xinetd.log.8 $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.man $(MANDIR)/man8/xinetd.8 - $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/itox.8 $(MANDIR)/man8/itox.8 - $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xconv.pl.8 $(MANDIR)/man8/xconv.pl.8 + $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xconv.pl.8 $(MANDIR)/man8/xconv.8 @echo "You must put your xinetd.conf in /etc/xinetd.conf" @echo "There is a sample config file in xinetd/sample.conf and you can" - @echo "use xconv.pl to convert your old inetd.conf file to an xinetd format" + @echo "use xconv to convert your old inetd.conf file to an xinetd format" uninstall: rm -f $(DAEMONDIR)/xinetd 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,11 +1,11 @@ ---- 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 { - exec_server(nserp); + child_process(nserp); } } 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,24 +1,24 @@ ---- 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 - (void) Sclose( descriptor ) ; + if ( descriptor > MAX_PASS_FD ) + (void) Sclose( descriptor ) ; #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,11 +1,11 @@ ---- 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 -#define DEFAULT_CONFIG_FILE "/etc/xinetd.conf" +#define DEFAULT_CONFIG_FILE "%%PREFIX%%/etc/xinetd.conf" /* * This is the facility used by xinetd to log syslog messages 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 ++#include ++#include ++ ++double xgetloadavg () ++{ ++ double ret[3]; ++ ++ getloadavg (ret, sizeof (ret) / sizeof (ret[0])); ++ ++ return ret[0]; ++} ++#endif /* __FreeBSD__ */ + + #if defined(bsdi) || defined(__APPLE__) + #include 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,11 +1,11 @@ ---- 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 -+.B libwrap +.B libwrap overrides the service name passed to libwrap (which defaults to the server name, the first server_args component with NAMEINARGS, the id for internal services and the service name for redirected services).