[Midnightbsd-cvs] mports: mports/comms: While this port has some interesting

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sat Sep 1 04:30:09 EDT 2007


Log Message:
-----------
While this port has some interesting functionality, I couldn't resist adding it just because of the name.  

Let me be the first to say We got tits!

Modified Files:
--------------
    mports/comms:
        Makefile (r1.6 -> r1.7)

Added Files:
-----------
    mports/comms/tits:
        Makefile (r1.1)
        distinfo (r1.1)
        pkg-descr (r1.1)
        pkg-plist (r1.1)
    mports/comms/tits/files:
        patch-Makefile (r1.1)
        patch-dispatcher.c (r1.1)
        patch-listener.c (r1.1)
        patch-tty.c (r1.1)
        tits.in (r1.1)

-------------- next part --------------
Index: Makefile
===================================================================
RCS file: /home/cvs/mports/comms/Makefile,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lcomms/Makefile -Lcomms/Makefile -u -r1.6 -r1.7
--- comms/Makefile
+++ comms/Makefile
@@ -10,5 +10,6 @@
     SUBDIR += ltmdm
     SUBDIR += minicom
     SUBDIR += pr
+    SUBDIR += tits
 
 .include <bsd.port.subdir.mk>
--- /dev/null
+++ comms/tits/pkg-descr
@@ -0,0 +1,10 @@
+The tits command is a server process which provides telnet(1) access
+to one or more tty ports as specified in config-file (or
+/etc/tits.conf if no configuration file is specified on the command
+line).
+
+Any number of telnet(1) clients may connect to a single tits port. 
+Each client will see exactly the same output as well as being able to
+send keystrokes simultaneously.
+
+Author:		steve at mctavish.co.uk
--- /dev/null
+++ comms/tits/pkg-plist
@@ -0,0 +1,2 @@
+etc/tits.conf.default
+sbin/tits
--- /dev/null
+++ comms/tits/Makefile
@@ -0,0 +1,31 @@
+# New ports collection makefile for:	tits
+# Date created:				9 February 2001
+# Whom:					Steve Woodford <scw at netbsd.hut.fi>
+#
+# $MidnightBSD: mports/comms/tits/Makefile,v 1.1 2007/09/01 08:30:07 laffer1 Exp $
+# $FreeBSD: ports/comms/tits/Makefile,v 1.12 2007/04/09 15:43:28 des Exp $
+#
+
+PORTNAME=	tits
+PORTVERSION=	1.1.2
+PORTREVISION=	2
+CATEGORIES=	comms
+MASTER_SITES=	http://www.mctavish.co.uk/tits/
+
+MAINTAINER=	ports at MidnightBSD.org
+COMMENT=	A server which provides telnet(1) access to one or more tty ports
+
+MAKE_ENV=	BINDIR=${PREFIX}/sbin MANDIR=${PREFIX}/man/man
+
+USE_RC_SUBR=	tits
+
+MAN8=		tits.8
+MANCOMPRESSED=	yes
+
+post-patch:
+	${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|g' ${WRKSRC}/tits.8
+
+post-install:
+	${INSTALL_DATA} ${WRKSRC}/tits.conf ${PREFIX}/etc/tits.conf.default
+
+.include <bsd.port.mk>
--- /dev/null
+++ comms/tits/distinfo
@@ -0,0 +1,3 @@
+MD5 (tits-1.1.2.tar.gz) = 78f5f8d3f743950f298aa04b17cb7fe8
+SHA256 (tits-1.1.2.tar.gz) = da82e0ca603dbcb59c4d28353a47a70d228e6b2cd6df23f952abe367850970e0
+SIZE (tits-1.1.2.tar.gz) = 21948
--- /dev/null
+++ comms/tits/files/patch-dispatcher.c
@@ -0,0 +1,11 @@
+--- dispatcher.c.orig	Tue Sep 24 13:21:42 2002
++++ dispatcher.c	Tue Sep 24 13:23:15 2002
+@@ -131,7 +131,7 @@
+ 	struct context *ctx;
+ 	struct client_ctx *cc;
+ 	struct pollfd *pf;
+-	nfds_t pfds;
++	unsigned int pfds;
+ 	int nfds, errcnt = 0;
+ 
+ 	while (!TAILQ_EMPTY(&contexts)) {
--- /dev/null
+++ comms/tits/files/patch-Makefile
@@ -0,0 +1,21 @@
+--- Makefile.orig	Wed Sep 24 16:05:07 2003
++++ Makefile	Wed Sep 24 16:06:52 2003
+@@ -29,15 +29,15 @@
+ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ 
+-WARNS=	2
++NO_WERROR=1
+ 
+ PROG=	tits
+-MAN=	tits.8
++MAN8=	tits.8
+ 
+ SRCS=	main.c buffer.c client.c context.c listener.c telnet.c tty.c
+ SRCS+=	dispatcher.c setup.c config.c server.c logger.c
+ 
+-CPPFLAGS+= -DLIBWRAP -DTITS_DEFAULT_CONFIG_FILE=\"${LOCALBASE}/etc/tits.conf\"
++CFLAGS+= -DLIBWRAP -DTITS_DEFAULT_CONFIG_FILE=\"${LOCALBASE}/etc/tits.conf\"
+ LDADD+=	-lwrap
+ PREFIX?= /usr/local
+ BINDIR?= ${PREFIX}/sbin
--- /dev/null
+++ comms/tits/files/patch-tty.c
@@ -0,0 +1,23 @@
+
+$FreeBSD: ports/comms/tits/files/patch-tty.c,v 1.1 2001/04/18 15:32:59 sobomax Exp $
+
+--- tty.c	2001/04/18 14:43:52	1.1
++++ tty.c	2001/04/18 14:45:57
+@@ -32,6 +32,7 @@
+ #include <sys/types.h>
+ #include <sys/filio.h>
+ #include <sys/ioctl.h>
++#include <sys/stat.h>
+ #include <sys/types.h>
+ 
+ #include <ctype.h>
+@@ -216,8 +217,7 @@
+ 	 * If this is *not* a pseudo tty, ensure DTR is asserted.
+ 	 * Note: This relies on TIOCGFLAGS returning ENOTTY for pty(4)'s.
+ 	 */
+-	if (ioctl(cc->cc_fd, TIOCGFLAGS, &flags) == 0 && errno == ENOTTY &&
+-	    ioctl(cc->cc_fd, TIOCSDTR, 0) < 0) {
++	if (ioctl(cc->cc_fd, TIOCSDTR, 0) < 0 && errno != ENOTTY) {
+ 		(void) close(cc->cc_fd);
+ 		(void) free(tc->tc_to.to_device);
+ 		(void) free(tc);
--- /dev/null
+++ comms/tits/files/tits.in
@@ -0,0 +1,33 @@
+#!/bin/sh
+# $FreeBSD: ports/comms/tits/files/tits.in,v 1.1 2007/04/09 15:43:28 des Exp $
+
+# PROVIDE: tits
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+# KEYWORD: shutdown
+
+# Define these tits_* variables in one of these files:
+#	/etc/rc.conf
+#	/etc/rc.conf.local
+#	/etc/rc.conf.d/tits
+#
+# DO NOT CHANGE THESE DEFAULT VALUES HERE
+#
+tits_enable="${tits_enable-NO}"
+#tits_pidfile="/var/run/tits.pid"
+
+. %%RC_SUBR%%
+
+name="tits"
+rcvar=`set_rcvar`
+command="%%PREFIX%%/sbin/tits"
+
+load_rc_config $name
+
+: ${tits_config="%%PREFIX%%/etc/tits.conf"}
+: ${tits_flags="${tits_config}"}
+
+#pidfile="${tits_pidfile}"
+required_files="${tits_config}"
+
+run_rc_command "$1"
--- /dev/null
+++ comms/tits/files/patch-listener.c
@@ -0,0 +1,16 @@
+
+$FreeBSD: ports/comms/tits/files/patch-listener.c,v 1.1 2006/01/06 15:25:13 mich Exp $
+
+--- listener.c.orig
++++ listener.c
+@@ -189,10 +189,6 @@
+ 	    NULL)
+ 		context_del_client(cc->cc_ctx, ccc);
+ 
+-	if (lc->lc_args.la_address)
+-		(void) free(lc->lc_args.la_address);
+-	(void) free(lc->lc_args.la_port);
+-
+ 	(void) free(lc);
+ }
+ 


More information about the Midnightbsd-cvs mailing list