summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortnn <tnn@pkgsrc.org>2022-04-24 01:35:38 +0000
committertnn <tnn@pkgsrc.org>2022-04-24 01:35:38 +0000
commit3969e8eac7366470788da60d41780ca6057e18ea (patch)
tree8c280df4595cc09c92994d60c93838c6b25db9e4
parentcc949c37ea9288be2c503dc8800d617f3a2f3a0f (diff)
downloadpkgsrc-3969e8eac7366470788da60d41780ca6057e18ea.tar.gz
rinetd: update HOMEPAGE and MASTER_SITE. While here update to 0.73.
Version 0.73 (2021/02/19) improve error reporting fixed another configuration parsing bug Version 0.72 (2021/02/16) fixed a configuration parsing bug making 0.71 almost unusable Version 0.71 (2021/02/14) IPv6 support fixed a display overflow in data usage statistics made the configuration parser more tolerant with service names that contain dashes (e.g. snmp-trap) or hostnames with underscores create the log file if it does not exist new Visual Studio project file Version 0.70 (2017/09/09) UDP support source address binding support use a real grammar for the configuration file and get rid of the hand-made parser Version 0.63 (2017/07/19) added a -f flag to run in the foreground quit cleanly when SIGINT is received increased data buffer size for better performance fixed random uninitialised data accesses fixed a memory leak in connection reallocation fixed a file descriptor leak in configuration reload fixed configuration file parsing (many bugs including a buffer overflow) fixed configuration error reporting (line numbers were wrong) log accepted connections in addition to denied ones log DNS errors code quality refactoring: got rid of a lot of old code, used C library functions instead of custom ones, enforced const correctness
-rw-r--r--net/rinetd/Makefile38
-rw-r--r--net/rinetd/PLIST4
-rw-r--r--net/rinetd/distinfo12
-rw-r--r--net/rinetd/patches/patch-Makefile.in15
-rw-r--r--net/rinetd/patches/patch-ab30
-rw-r--r--net/rinetd/patches/patch-ac42
-rw-r--r--net/rinetd/patches/patch-src_rinetd.c14
7 files changed, 54 insertions, 101 deletions
diff --git a/net/rinetd/Makefile b/net/rinetd/Makefile
index 64546cace2d..b3062f8f10d 100644
--- a/net/rinetd/Makefile
+++ b/net/rinetd/Makefile
@@ -1,38 +1,32 @@
-# $NetBSD: Makefile,v 1.19 2019/05/23 19:23:10 rillig Exp $
+# $NetBSD: Makefile,v 1.20 2022/04/24 01:35:38 tnn Exp $
#
-DISTNAME= rinetd
-PKGNAME= ${DISTNAME}-0.62
-PKGREVISION= 3
+DISTNAME= rinetd-0.73
CATEGORIES= net
-MASTER_SITES= http://www.boutell.com/rinetd/http/
+MASTER_SITES= ${MASTER_SITE_GITHUB:=samhocevar/}
+GITHUB_RELEASE= v${PKGVERSION_NOREV}
MAINTAINER= pkgsrc-users@NetBSD.org
-HOMEPAGE= http://www.boutell.com/rinetd/
+HOMEPAGE= https://github.com/samhocevar/rinetd
COMMENT= Internet redirection server
+LICENSE= gnu-gpl-v2
-NO_CONFIGURE= yes
-BUILD_TARGET= rinetd
+GNU_CONFIGURE= yes
-CPPFLAGS+= -DRINETD_CONF="\"${PKG_SYSCONFDIR}/rinetd.conf\""
-
-INSTALLATION_DIRS= sbin ${PKGMANDIR}/man8
-
-RCD_SCRIPTS= rinetd
+CPPFLAGS.NetBSD+= -D_NETBSD_SOURCE # for SA_RESTART
+CPPFLAGS.SunOS+= -D__EXTENSIONS__ # for SA_RESTART
SUBST_CLASSES+= paths
-SUBST_FILES.paths= rinetd.8
-SUBST_VARS.paths= PREFIX
-SUBST_VARS.paths+= PKG_SYSCONFDIR
+SUBST_FILES.paths= src/rinetd.h
+SUBST_SED.paths= -e 's,/etc/rinetd.conf,${PKG_SYSCONFDIR}/rinetd.conf,'
SUBST_STAGE.paths= pre-configure
-LDFLAGS.SunOS+= -lsocket -lnsl
+RCD_SCRIPTS= rinetd
-do-build:
- cd ${WRKSRC} && env ${MAKE_ENV} ${CC} ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -o rinetd *.c
+INSTALLATION_DIRS= share/examples/rinetd
+EGDIR= ${PREFIX}/share/examples/rinetd
+CONF_FILES= ${EGDIR}/rinetd.conf ${PKG_SYSCONFDIR}/rinetd.conf
-do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/rinetd ${DESTDIR}${PREFIX}/sbin/.
- ${INSTALL_MAN} ${WRKSRC}/rinetd.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8/.
+LDFLAGS.SunOS+= -lsocket -lnsl
.include "../../mk/bsd.pkg.mk"
diff --git a/net/rinetd/PLIST b/net/rinetd/PLIST
index 5bdc8f0ffdd..24a72785eb6 100644
--- a/net/rinetd/PLIST
+++ b/net/rinetd/PLIST
@@ -1,3 +1,5 @@
-@comment $NetBSD: PLIST,v 1.4 2014/03/11 14:05:11 jperkin Exp $
+@comment $NetBSD: PLIST,v 1.5 2022/04/24 01:35:38 tnn Exp $
man/man8/rinetd.8
sbin/rinetd
+share/examples/rinetd/rinetd.conf
+@pkgdir etc
diff --git a/net/rinetd/distinfo b/net/rinetd/distinfo
index ac97078a2f7..921aba9a9cf 100644
--- a/net/rinetd/distinfo
+++ b/net/rinetd/distinfo
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.6 2021/10/26 11:06:48 nia Exp $
+$NetBSD: distinfo,v 1.7 2022/04/24 01:35:38 tnn Exp $
-BLAKE2s (rinetd.tar.gz) = ef14ffc19ef8eccd30cc20caa38660e188138f228ee56681d95ea63f81e94008
-SHA512 (rinetd.tar.gz) = b6ddb496b4542ad46aacaef4b2241b16b9ee43f2f6761a18a4813d83a0a9db23fbd73a554393dcf01ae7350e8b6662571414ca6f93a949ce4effbbeddc198606
-Size (rinetd.tar.gz) = 115541 bytes
-SHA1 (patch-ab) = 9fa5cf00111a56051a40d73293ca071c125802a0
-SHA1 (patch-ac) = 743b979bfc287bb0968e418a06cab8a8d2b6dc64
+BLAKE2s (rinetd-0.73.tar.gz) = 209c299937246e078a9434f8b6c12036d06be645cd01d68c3b729538b9923f3f
+SHA512 (rinetd-0.73.tar.gz) = e4a96f9251707eb130d063a76413beda13c2aebee9756d3b2d0d5987bcb735f8f38be348a41ead128b4177ebab6da9d8344223fcdce7404858944e2c954a4662
+Size (rinetd-0.73.tar.gz) = 140115 bytes
+SHA1 (patch-Makefile.in) = baf3940ae964e534abb674572e1ea711373c23ee
+SHA1 (patch-src_rinetd.c) = 24e600beadd00dc3ede98aa1280c95e498b00176
diff --git a/net/rinetd/patches/patch-Makefile.in b/net/rinetd/patches/patch-Makefile.in
new file mode 100644
index 00000000000..495e0b7e903
--- /dev/null
+++ b/net/rinetd/patches/patch-Makefile.in
@@ -0,0 +1,15 @@
+$NetBSD: patch-Makefile.in,v 1.1 2022/04/24 01:35:38 tnn Exp $
+
+Fix config file installation.
+
+--- Makefile.in.orig 2021-02-19 08:57:40.000000000 +0000
++++ Makefile.in
+@@ -420,7 +420,7 @@ install-sysconfDATA: $(sysconf_DATA)
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sysconfdir)'"; \
+- $(INSTALL_DATA) $$files "$(DESTDIR)$(sysconfdir)" || exit $$?; \
++ $(INSTALL_DATA) $$files "$(DESTDIR)$(PREFIX)/share/examples/rinetd" || exit $$?; \
+ done
+
+ uninstall-sysconfDATA:
diff --git a/net/rinetd/patches/patch-ab b/net/rinetd/patches/patch-ab
deleted file mode 100644
index 84ca2cd235f..00000000000
--- a/net/rinetd/patches/patch-ab
+++ /dev/null
@@ -1,30 +0,0 @@
-$NetBSD: patch-ab,v 1.1.1.1 2003/10/01 01:15:44 grant Exp $
-
---- rinetd.c.orig 2003-04-15 11:19:23.000000000 +1000
-+++ rinetd.c
-@@ -214,7 +214,7 @@ struct _rinetd_options
- };
-
- RinetdOptions options = {
-- "/etc/rinetd.conf"
-+ RINETD_CONF
- };
-
- int readArgs (int argc,
-@@ -1362,8 +1362,6 @@ void RegisterPID(void)
- if (pidLogFileName) {
- pid_file_name = pidLogFileName;
- }
--/* add other systems with wherever they register processes */
--#if defined(LINUX)
- pid_file = fopen(pid_file_name, "w");
- if (pid_file == NULL) {
- /* non-fatal, non-Linux may lack /var/run... */
-@@ -1374,7 +1372,6 @@ void RegisterPID(void)
- fprintf(pid_file, "%d\n", getpid());
- fclose(pid_file);
- }
--#endif /* LINUX */
- }
-
- unsigned char nullAddress[4] = { 0, 0, 0, 0 };
diff --git a/net/rinetd/patches/patch-ac b/net/rinetd/patches/patch-ac
deleted file mode 100644
index 2447c6f428a..00000000000
--- a/net/rinetd/patches/patch-ac
+++ /dev/null
@@ -1,42 +0,0 @@
-$NetBSD: patch-ac,v 1.1.1.1 2003/10/01 01:15:44 grant Exp $
-
---- rinetd.8.orig 2003-04-15 11:19:44.000000000 +1000
-+++ rinetd.8
-@@ -10,14 +10,14 @@
- .Nd internet
- .Dq redirection server
- .Sh SYNOPSIS
--.Nm /usr/sbin/rinetd
-+.Nm @PREFIX@/sbin/rinetd
- .Sh VERSION
- Version 0.62, 04/14/2003.
- .Sh DESCRIPTION
- .Nm rinetd
- redirects TCP connections from one IP address and port to another. rinetd
- is a single-process server which handles any number of connections to
--the address/port pairs specified in the file /etc/rinetd.conf.
-+the address/port pairs specified in the file @PKG_SYSCONFDIR@/rinetd.conf.
- Since rinetd runs as a single process using nonblocking I/O, it is
- able to redirect a large number of connections without a severe
- impact on the machine. This makes it practical to run TCP services
-@@ -26,9 +26,9 @@ redirect FTP, because FTP requires more
- .Pp
- rinetd is typically launched at boot time, using the following syntax:
- .Pp
--/usr/sbin/rinetd
-+@PREFIX@/sbin/rinetd
- .Pp
--The configuration file is found in the file /etc/rinetd.conf, unless
-+The configuration file is found in the file @PKG_SYSCONFDIR@/rinetd.conf, unless
- another file is specified using the -c command line option.
- .Sh FORWARDING RULES
- Most entries in the configuration file are forwarding rules. The
-@@ -157,7 +157,7 @@ The -v command line option displays the
- The kill -1 signal (SIGHUP) can be used to cause rinetd
- to reload its configuration file without interrupting existing
- connections.
--Under Linux\(tm the process id is saved in the file \fI/var/run/rinetd.pid\fR
-+The process id is saved in the file \fI/var/run/rinetd.pid\fR
- to facilitate the kill -HUP. An alternate
- filename can be provided by using the <code>pidlogfile</code>
- configuration file option.
diff --git a/net/rinetd/patches/patch-src_rinetd.c b/net/rinetd/patches/patch-src_rinetd.c
new file mode 100644
index 00000000000..2a88f200256
--- /dev/null
+++ b/net/rinetd/patches/patch-src_rinetd.c
@@ -0,0 +1,14 @@
+$NetBSD: patch-src_rinetd.c,v 1.1 2022/04/24 01:35:39 tnn Exp $
+
+include <netdb.h> for NI_MAXHOST
+
+--- src/rinetd.c.orig 2021-02-19 08:57:10.000000000 +0000
++++ src/rinetd.c
+@@ -37,6 +37,7 @@
+ #include <signal.h>
+ #include <stdlib.h>
+ #include <fcntl.h>
++#include <netdb.h>
+ #if _WIN32 || (!TIME_WITH_SYS_TIME && !HAVE_SYS_TIME_H)
+ # include <time.h>
+ #endif