summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/netkit-base')
-rw-r--r--sys-apps/netkit-base/Manifest1
-rw-r--r--sys-apps/netkit-base/files/003_all_netkit-base-0.17-gcc4.patch11
-rw-r--r--sys-apps/netkit-base/files/004_all_netkit-base-0.17-misc-fixes.patch54
-rw-r--r--sys-apps/netkit-base/files/005_all_netkit-base-0.17-no-rpc.patch26
-rw-r--r--sys-apps/netkit-base/files/inetd.rc624
-rw-r--r--sys-apps/netkit-base/metadata.xml5
-rw-r--r--sys-apps/netkit-base/netkit-base-0.17-r9.ebuild43
7 files changed, 164 insertions, 0 deletions
diff --git a/sys-apps/netkit-base/Manifest b/sys-apps/netkit-base/Manifest
new file mode 100644
index 000000000000..568da5e34489
--- /dev/null
+++ b/sys-apps/netkit-base/Manifest
@@ -0,0 +1 @@
+DIST netkit-base-0.17.tar.gz 56473 SHA256 16dd81625ebfc8f5dcb0dfd2e6bac223aad325a9405d66a556fe349446b3c332
diff --git a/sys-apps/netkit-base/files/003_all_netkit-base-0.17-gcc4.patch b/sys-apps/netkit-base/files/003_all_netkit-base-0.17-gcc4.patch
new file mode 100644
index 000000000000..266df811fd77
--- /dev/null
+++ b/sys-apps/netkit-base/files/003_all_netkit-base-0.17-gcc4.patch
@@ -0,0 +1,11 @@
+--- netkit-base-0.17/inetd/servtab.c
++++ netkit-base-0.17/inetd/servtab.c
+@@ -771,7 +771,7 @@
+ return;
+ }
+
+-#define SWAP(type, a, b) {type c=(type)a; (type)a=(type)b; (type)b=(type)c;}
++#define SWAP(type, a, b) {type c=(type)a; a=(type)b; b=(type)c;}
+
+ /*
+ * sep->se_wait may be holding the pid of a daemon
diff --git a/sys-apps/netkit-base/files/004_all_netkit-base-0.17-misc-fixes.patch b/sys-apps/netkit-base/files/004_all_netkit-base-0.17-misc-fixes.patch
new file mode 100644
index 000000000000..9492d715e20f
--- /dev/null
+++ b/sys-apps/netkit-base/files/004_all_netkit-base-0.17-misc-fixes.patch
@@ -0,0 +1,54 @@
+--- netkit-base-0.17/inetd/builtins.c
++++ netkit-base-0.17/inetd/builtins.c
+@@ -12,6 +12,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
++#include <time.h>
+
+ #include "servtab.h"
+ #include "builtins.h"
+--- netkit-base-0.17/inetd/inetd.c
++++ netkit-base-0.17/inetd/inetd.c
+@@ -869,8 +869,8 @@
+ int on = 1;
+
+ if ((sep->se_fd = socket(sep->se_family, sep->se_socktype, 0)) < 0) {
+- syslog(LOG_ERR, "%s: socket: %m", service_name(sep),
+- sep->se_service, sep->se_proto);
++ syslog(LOG_ERR, "%s: socket: %m", service_name(sep));
++/* sep->se_service, sep->se_proto); */
+
+ if (errno == EMFILE) {
+ syslog(LOG_ALERT,
+@@ -888,8 +888,8 @@
+ syslog(LOG_ERR, "setsockopt (SO_REUSEADDR): %m");
+ #undef turnon
+ if (bind(sep->se_fd, &sep->se_ctrladdr, sep->se_ctrladdr_size) < 0) {
+- syslog(LOG_ERR, "%s: bind: %m", service_name(sep),
+- sep->se_service, sep->se_proto);
++ syslog(LOG_ERR, "%s: bind: %m", service_name(sep));
++/* sep->se_service, sep->se_proto); */
+ (void) close(sep->se_fd);
+ sep->se_fd = -1;
+ if (!timingout) {
+@@ -938,8 +938,8 @@
+ }
+ m = sizeof(sn);
+ if (getsockname(sep->se_fd, (struct sockaddr *)&sn, &m) < 0) {
+- syslog(LOG_ERR, "%s: getsockname: %m", service_name(sep),
+- sep->se_service, sep->se_proto);
++ syslog(LOG_ERR, "%s: getsockname: %m", service_name(sep));
++/* sep->se_service, sep->se_proto); */
+ return;
+ }
+
+@@ -1026,7 +1026,7 @@
+ if (rl.rlim_cur <= rlim_ofile_cur) {
+ syslog(LOG_ERR,
+ "bump_nofile: cannot extend file limit, max = %d",
+- rl.rlim_cur);
++ (int)rl.rlim_cur);
+ return -1;
+ }
+
diff --git a/sys-apps/netkit-base/files/005_all_netkit-base-0.17-no-rpc.patch b/sys-apps/netkit-base/files/005_all_netkit-base-0.17-no-rpc.patch
new file mode 100644
index 000000000000..3981b50e76e1
--- /dev/null
+++ b/sys-apps/netkit-base/files/005_all_netkit-base-0.17-no-rpc.patch
@@ -0,0 +1,26 @@
+the rpc logic here isn't terribly useful, so just punt it
+
+http://bugs.gentoo.org/371395
+
+--- a/inetd/inetd.c
++++ b/inetd/inetd.c
+@@ -158,8 +158,8 @@
+ #include <rpc/rpc.h>
+ #include <rpc/pmap_clnt.h>
+ #undef __wait
+-#endif
+ #include <rpc/pmap_clnt.h>
++#endif
+
+ #ifndef MIN
+ #define MIN(a, b) ((a) < (b) ? (a) : (b))
+--- a/inetd/inetd.h
++++ b/inetd/inetd.h
+@@ -4,7 +4,6 @@
+
+ #define RETRYTIME (60*10) /* retry time after bind/server fail */
+
+-#define RPC /* Use SunRPC */
+
+
+ /* globals */
diff --git a/sys-apps/netkit-base/files/inetd.rc6 b/sys-apps/netkit-base/files/inetd.rc6
new file mode 100644
index 000000000000..652362507fc3
--- /dev/null
+++ b/sys-apps/netkit-base/files/inetd.rc6
@@ -0,0 +1,24 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ use net
+}
+
+start() {
+ ebegin "Starting inetd"
+ (
+ # workaround for #25754
+ unset -f `declare -F | sed 's:declare -f::g'`
+ start-stop-daemon --start --quiet --pidfile /var/run/inetd.pid --exec /usr/sbin/inetd
+ )
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping inetd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/inetd.pid
+ eend $?
+}
diff --git a/sys-apps/netkit-base/metadata.xml b/sys-apps/netkit-base/metadata.xml
new file mode 100644
index 000000000000..96a2d586367d
--- /dev/null
+++ b/sys-apps/netkit-base/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+</pkgmetadata>
diff --git a/sys-apps/netkit-base/netkit-base-0.17-r9.ebuild b/sys-apps/netkit-base/netkit-base-0.17-r9.ebuild
new file mode 100644
index 000000000000..f40d8f0ce8ea
--- /dev/null
+++ b/sys-apps/netkit-base/netkit-base-0.17-r9.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Old-style inetd"
+HOMEPAGE="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/"
+SRC_URI="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ia64 ~mips ppc ppc64 sparc x86"
+IUSE=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/*.patch
+}
+
+src_configure() {
+ tc-export CC
+ ./configure || die
+ sed -i \
+ -e "/^CFLAGS=/s:=.*:=${CFLAGS} -Wall -Wbad-function-cast -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline:" \
+ -e "/^LDFLAGS=/s:=.*:=${LDFLAGS}:" \
+ MCONFIG || die
+}
+
+src_install() {
+ sed -i \
+ -e 's:in\.telnetd$:in.telnetd -L /usr/sbin/telnetlogin:' \
+ etc.sample/inetd.conf
+
+ dosbin inetd/inetd
+ doman inetd/inetd.8
+ newinitd "${FILESDIR}"/inetd.rc6 inetd
+
+ dodoc BUGS ChangeLog README
+ docinto samples
+ dodoc etc.sample/*
+}