[Midnightbsd-cvs] mports: mports/comms: add bforce-kst

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sun Aug 17 17:36:35 EDT 2008


Log Message:
-----------
add bforce-kst

Modified Files:
--------------
    mports/comms:
        Makefile (r1.13 -> r1.14)

Added Files:
-----------
    mports/comms/bforce-kst:
        Makefile (r1.1)
        distinfo (r1.1)
        pkg-descr (r1.1)
        pkg-message (r1.1)
        pkg-plist (r1.1)
    mports/comms/bforce-kst/files:
        patch-bforce.c (r1.1)
        patch-bfstat.c (r1.1)
        patch-config.h.in (r1.1)
        patch-daemon.c (r1.1)
        patch-expression.y (r1.1)
        patch-nlookup.c (r1.1)
        patch-prot_binkp.c (r1.1)
        patch-prot_emsi.c (r1.1)
        patch-prot_yoohoo.c (r1.1)
        patch-prot_zmrecv.c (r1.1)
        patch-prot_zmsend.c (r1.1)
        patch-sess_call.c (r1.1)
        patch-sess_stat.c (r1.1)

-------------- next part --------------
Index: Makefile
===================================================================
RCS file: /home/cvs/mports/comms/Makefile,v
retrieving revision 1.13
retrieving revision 1.14
diff -L comms/Makefile -L comms/Makefile -u -r1.13 -r1.14
--- comms/Makefile
+++ comms/Makefile
@@ -8,6 +8,7 @@
     SUBDIR += asmodem
     SUBDIR += atslog
     SUBDIR += bforce
+    SUBDIR += bforce-kst
     SUBDIR += efax
     SUBDIR += libirman
     SUBDIR += libticables
--- /dev/null
+++ comms/bforce-kst/pkg-message
@@ -0,0 +1,4 @@
+Please don't forget to copy and edit configuration files found
+in %%PREFIX%%/%%CONFIGDIR%%.
+
+If you using u-srif, please install lang/python
--- /dev/null
+++ comms/bforce-kst/pkg-descr
@@ -0,0 +1,3 @@
+BinkleyForce is a simple ifcico like FTN mailer. It can works via
+TCP/IP as well as on modem links. Look sample configs for more
+information.
--- /dev/null
+++ comms/bforce-kst/pkg-plist
@@ -0,0 +1,42 @@
+bin/bforce
+bin/bfindex
+bin/bfstat
+bin/nlookup
+etc/fido/bforce/bforce.conf.sample
+etc/fido/bforce/bforce.passwd.sample
+etc/fido/bforce/bforce.subst.sample
+etc/fido/bforce/freq.aliases.sample
+etc/fido/bforce/freq.dirs.sample
+%%DATADIR%%/bfha/README
+%%DATADIR%%/bfha/bfha.pl
+%%DATADIR%%/bflan
+%%DATADIR%%/callout.sh
+%%DATADIR%%/outman
+%%DATADIR%%/timesync.tcl
+%%DATADIR%%/u-srif/conf/report.footer
+%%DATADIR%%/u-srif/conf/report.header
+%%DATADIR%%/u-srif/conf/u-srif.aliases
+%%DATADIR%%/u-srif/conf/u-srif.conf
+%%DATADIR%%/u-srif/conf/u-srif.dirs
+%%DATADIR%%/u-srif/lib/uconfig.py
+%%DATADIR%%/u-srif/lib/udbase.py
+%%DATADIR%%/u-srif/lib/ufido.py
+%%DATADIR%%/u-srif/lib/unodestat.py
+%%DATADIR%%/u-srif/lib/utmpl.py
+%%DATADIR%%/u-srif/lib/uutil.py
+%%DATADIR%%/u-srif/u-srif-index.py
+%%DATADIR%%/u-srif/u-srif-lookup.py
+%%DATADIR%%/u-srif/u-srif.py
+%%PORTDOCS%%%%DOCSDIR%%/CHANGES
+%%PORTDOCS%%%%DOCSDIR%%/CHANGES.kst
+%%PORTDOCS%%%%DOCSDIR%%/COPYING
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%PORTDOCS%%%%DOCSDIR%%/README.kst
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
+ at dirrm etc/fido/bforce
+ at dirrm etc/fido
+ at dirrm %%DATADIR%%/u-srif/lib
+ at dirrm %%DATADIR%%/u-srif/conf
+ at dirrm %%DATADIR%%/u-srif
+ at dirrm %%DATADIR%%/bfha
+ at dirrm %%DATADIR%%
--- /dev/null
+++ comms/bforce-kst/Makefile
@@ -0,0 +1,80 @@
+# New ports collection makefile for:	bforce-kst
+# Date created:		1 May 2002
+# Whom:			Andrew Dolgov <fox at furry.spb.ru>
+#
+# $MidnightBSD: mports/comms/bforce-kst/Makefile,v 1.1 2008/08/17 21:36:33 laffer1 Exp $
+# $FreeBSD: ports/comms/bforce-kst/Makefile,v 1.15 2006/05/03 23:38:34 edwin Exp $
+#
+
+PORTNAME=	bforce
+PORTVERSION=	0.22.8.7
+CATEGORIES=	comms
+MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR=	binkleyforce
+PKGNAMESUFFIX=	-kst
+DISTNAME=	${PORTNAME}-0.22.8.kst7
+
+MAINTAINER=	ports at MidnightBSD.org
+COMMENT=	Simple ifcico like Fidonet technology mailer
+LICENSE=	gpl2
+
+USE_GMAKE=	yes
+GNU_CONFIGURE=	yes
+
+CONTRIBS=	bfha/README bfha/bfha.pl bflan callout.sh outman timesync.tcl \
+		u-srif/conf/report.footer u-srif/conf/report.header u-srif/conf/u-srif.aliases \
+		u-srif/conf/u-srif.conf u-srif/conf/u-srif.dirs u-srif/lib/uconfig.py \
+		u-srif/lib/udbase.py u-srif/lib/ufido.py u-srif/lib/unodestat.py \
+		u-srif/lib/utmpl.py u-srif/lib/uutil.py u-srif/u-srif-index.py \
+		u-srif/u-srif-lookup.py u-srif/u-srif.py
+
+FIXME=		include/bforce.h include/util.h include/logger.h \
+		bforce/bforce.c bforce/conf_proc.c bforce/conf_read.c bforce/daemon.c \
+		bforce/daemon_branch.c bforce/daemon_call.c  bforce/daemon_lines.c \
+		bforce/expression.y bforce/freq_proc.c bforce/freq_wazoo.c bforce/io_modem.c \
+		bforce/io_tcpip.c bforce/io_unix_lock.c bforce/io_unix_modem.c \
+		bforce/io_unix_tio.c bforce/io_unix_tty.c bforce/logger.c bforce/nodelist.c \
+		bforce/os_unix.c bforce/outb_sysqueue.c bforce/prot_common.c bforce/prot_binkp.c \
+		bforce/prot_binkp_misc.c bforce/prot_hydra.c bforce/prot_zmmisc.c \
+		bforce/prot_zmrecv.c bforce/prot_zmsend.c bforce/prot_yoohoo.c \
+		bforce/prot_yoohoo_api.c bforce/prot_emsi.c bforce/prot_emsi_misc.c \
+		bforce/prot_emsi_api.c bforce/sess_call.c bforce/sess_answ.c bforce/sess_init.c \
+		bforce/sess_main.c bforce/u_misc.c bforce/u_time.c bforce/u_recode.c \
+		bforce/u_plock.c bfutil/bfindex.c
+
+WRKSRC=		${WRKDIR}/${DISTNAME}/source
+
+pre-configure:
+	${MKDIR} ${WRKSRC}/bin
+
+post-patch:
+	@${REINPLACE_CMD} -e 's,/etc/bforce,/etc/fido/bforce,g' ${WRKSRC}/Makefile.in
+.for i in ${FIXME}
+	@${REINPLACE_CMD} -e 's,log(,bf_log(,g' ${WRKSRC}/${i}
+.endfor
+
+do-install:
+	${MKDIR} ${PREFIX}/etc/fido/bforce
+	${INSTALL_DATA} ${WRKSRC}/../examples/bforce.conf ${PREFIX}/etc/fido/bforce/bforce.conf.sample
+	${INSTALL_DATA} ${WRKSRC}/../examples/bforce.passwd ${PREFIX}/etc/fido/bforce/bforce.passwd.sample
+	${INSTALL_DATA} ${WRKSRC}/../examples/bforce.subst ${PREFIX}/etc/fido/bforce/bforce.subst.sample
+	${INSTALL_DATA} ${WRKSRC}/../examples/freq.aliases ${PREFIX}/etc/fido/bforce/freq.aliases.sample
+	${INSTALL_DATA} ${WRKSRC}/../examples/freq.dirs ${PREFIX}/etc/fido/bforce/freq.dirs.sample
+
+	${MKDIR} ${DATADIR} ${DATADIR}/bfha ${DATADIR}/u-srif/conf ${DATADIR}/u-srif/lib
+.for i in ${CONTRIBS}
+	${INSTALL_DATA} ${WRKSRC}/../contrib/${i} ${DATADIR}/${i}
+.endfor
+.if !defined(NOPORTDOCS)
+	${MKDIR} ${DOCSDIR}
+.for i in CHANGES CHANGES.kst COPYING README README.kst
+	${INSTALL_DATA} ${WRKSRC}/../${i} ${DOCSDIR}
+.endfor
+.endif
+	${INSTALL_PROGRAM} ${WRKSRC}/bin/bforce ${PREFIX}/bin
+	${INSTALL_PROGRAM} ${WRKSRC}/bin/bfindex ${PREFIX}/bin
+	${INSTALL_PROGRAM} ${WRKSRC}/bin/bfstat ${PREFIX}/bin
+	${INSTALL_PROGRAM} ${WRKSRC}/bin/nlookup ${PREFIX}/bin
+	@${SED} -e 's|%%PREFIX%%|${PREFIX}|' -e 's|%%CONFIGDIR%%|etc/fido/bforce|' ${PKGMESSAGE}
+
+.include <bsd.port.mk>
--- /dev/null
+++ comms/bforce-kst/distinfo
@@ -0,0 +1,3 @@
+MD5 (bforce-0.22.8.kst7.tar.gz) = 03a1e7dfc40ca90656764d25349e7827
+SHA256 (bforce-0.22.8.kst7.tar.gz) = a6ea79a8e23125beb405faa7fe4e8f9f37bb4d5b77c78ac432673bc39a80293a
+SIZE (bforce-0.22.8.kst7.tar.gz) = 250062
--- /dev/null
+++ comms/bforce-kst/files/patch-sess_stat.c
@@ -0,0 +1,20 @@
+--- bforce/sess_stat.c.old	Sat Aug  7 02:06:26 2004
++++ bforce/sess_stat.c	Sat Aug  7 02:11:29 2004
+@@ -75,7 +75,7 @@
+ 	
+ 	memset(stat, '\0', sizeof(s_sess_stat));
+ 	
+-	fscanf(fp, "%u %u %u %u %u %lu %lu %lu %lu",
++	fscanf(fp, "%u %u %u %u %u %u %lu %lu %lu %lu",
+ 			(unsigned int *) &stat->tries,
+ 			(unsigned int *) &stat->tries_noconn,
+ 			(unsigned int *) &stat->tries_noansw,
+@@ -98,7 +98,7 @@
+ 	if( fseek(fp, 0, SEEK_SET) == -1 )
+ 		return -1;
+ 	
+-	fprintf(fp, "%u %u %u %u %u %lu %lu %lu %lu",
++	fprintf(fp, "%u %u %u %u %u %u %lu %lu %lu %lu",
+ 			(unsigned int) stat->tries,
+ 			(unsigned int) stat->tries_noconn,
+ 			(unsigned int) stat->tries_noansw,
--- /dev/null
+++ comms/bforce-kst/files/patch-config.h.in
@@ -0,0 +1,33 @@
+--- include/config.h.in	Thu Aug 30 16:33:52 2001
++++ include/config.h.in	Wed Sep 10 15:36:53 2003
+@@ -84,7 +84,7 @@
+ #undef HAVE_STATFS
+ 
+ /* Define if you have the statvfs function.  */
+-#undef HAVE_STATVFS
++// #undef HAVE_STATVFS
+ 
+ /* Define if you have the strcasecmp function.  */
+ #undef HAVE_STRCASECMP
+@@ -123,10 +123,10 @@
+ #undef HAVE_SYS_SELECT_H
+ 
+ /* Define if you have the <sys/statfs.h> header file.  */
+-#undef HAVE_SYS_STATFS_H
++// #undef HAVE_SYS_STATFS_H
+ 
+ /* Define if you have the <sys/statvfs.h> header file.  */
+-#undef HAVE_SYS_STATVFS_H
++// #undef HAVE_SYS_STATVFS_H
+ 
+ /* Define if you have the <sys/termiox.h> header file.  */
+ #undef HAVE_SYS_TERMIOX_H
+@@ -135,7 +135,7 @@
+ #undef HAVE_SYS_TIME_H
+ 
+ /* Define if you have the <sys/vfs.h> header file.  */
+-#undef HAVE_SYS_VFS_H
++// #undef HAVE_SYS_VFS_H
+ 
+ /* Define if you have the <termios.h> header file.  */
+ #undef HAVE_TERMIOS_H
--- /dev/null
+++ comms/bforce-kst/files/patch-prot_yoohoo.c
@@ -0,0 +1,11 @@
+--- bforce/prot_yoohoo.c.old	Thu Jul 29 23:39:27 2004
++++ bforce/prot_yoohoo.c	Thu Jul 29 23:40:02 2004
+@@ -514,7 +514,7 @@
+ 		case PROT_ZEDZAP: local_data->capabilities |= YOOHOO_ZEDZAP; break;
+ 		case PROT_JANUS:  local_data->capabilities |= YOOHOO_JANUS;  break;
+ 		case PROT_HYDRA:  local_data->capabilities |= YOOHOO_HYDRA;  break;
+-		default:          /* Avoid warnings */
++		default:          break;
+ 		}
+ 	}
+ 	
--- /dev/null
+++ comms/bforce-kst/files/patch-nlookup.c
@@ -0,0 +1,48 @@
+--- bfutil/nlookup.c.orig	Thu Aug 30 16:33:51 2001
++++ bfutil/nlookup.c	Sat Jun 19 07:05:34 2004
+@@ -28,15 +28,34 @@
+ static void usage(void)
+ {
+ 	printf_usage("nodelist lookup utility",
+-		"usage: nlookup [-rh] <address>\n"
++		"usage: nlookup [-rmh] <address>\n"
+ 		"\n"
+ 		"options:\n"
+ 		"  -r                show nodelist string\n"
++		"  -m                show email address\n"
+ 		"  -h                show this help message\n"
+ 		"\n"
+ 	);
+ }
+ 
++void print_nodemail(const s_node *node)
++{
++	char abuf[BF_MAXADDRSTR+1];
++
++	if( node->sysop && *node->sysop && strcmp(node->sysop, "<none>") )
++	{
++		char username[BNI_MAXSYSOP+1];
++		
++		strnxcpy(username, node->sysop, sizeof(node->sysop));
++		string_replchar(username, ' ', '_');
++
++		printf("%s@%s.fidonet.org\n", username,
++			    ftn_addrstr_inet(abuf, node->addr));
++	}
++	
++	fflush(stdout);
++}
++
+ void print_nodeinfo(const s_node *node)
+ {
+ 	char abuf[BF_MAXADDRSTR+1];
+@@ -124,6 +143,9 @@
+ 	}
+ 	else if( nodelist_lookup(&node, addr) == 0 )
+ 	{
++	    if( emailaddr )
++		print_nodemail(&node);
++	    else
+ 		print_nodeinfo(&node);
+ 	}
+ 	
--- /dev/null
+++ comms/bforce-kst/files/patch-prot_zmsend.c
@@ -0,0 +1,20 @@
+--- bforce/prot_zmsend.c.old	Thu Jul 29 23:35:04 2004
++++ bforce/prot_zmsend.c	Thu Jul 29 23:36:26 2004
+@@ -414,7 +414,7 @@
+ 				case ZTX_CRCQACK:   txstate = ZTX_STARTDATA; break;
+ 				case ZTX_EOFACK:    txstate = ZTX_EOF;       break;
+ 				case ZTX_FINACK:    txstate = ZTX_FIN;       break;
+-				default:
++				default:            break;
+ 				}
+ 				break;
+ 				
+@@ -634,7 +634,7 @@
+ 				case ZTX_FINFOACK:  txstate = ZTX_FINFO;  break;
+ 				case ZTX_EOFACK:    txstate = ZTX_EOF;    break;
+ 				case ZTX_FINACK:    txstate = ZTX_FIN;    break;
+-				default:
++				default:            break;
+ 				}
+ 				break;
+ 				
--- /dev/null
+++ comms/bforce-kst/files/patch-prot_zmrecv.c
@@ -0,0 +1,30 @@
+--- bforce/prot_zmrecv.c.old	Thu Jul 29 23:29:04 2004
++++ bforce/prot_zmrecv.c	Thu Jul 29 23:32:23 2004
+@@ -243,7 +243,8 @@
+ 			}
+ 			break;
+ 			
+-		default: /* Ignore */
++		default:
++			break;
+ 		} /* end of switch(rxstate) */
+ 		
+ 		
+@@ -266,7 +267,7 @@
+ 				switch(rxstate) {
+ 				case ZRX_INITACK: rxstate = ZRX_INIT;     break;
+ 				case ZRX_RPOSACK: rxstate = ZRX_SENDRPOS; break;
+-				default:
++				default:	break;
+ 				}
+ 				break;
+ 				
+@@ -356,7 +357,7 @@
+ 				switch(rxstate) {
+ 				case ZRX_INITACK: rxstate = ZRX_INIT;      break;
+ 				case ZRX_RPOSACK: rxstate = ZRX_SENDRPOS;  break;
+-				default:
++				default:          break;
+ 				}
+ 				break;
+ 				
--- /dev/null
+++ comms/bforce-kst/files/patch-bforce.c
@@ -0,0 +1,26 @@
+--- bforce/bforce.c	Thu Nov 21 23:22:55 2002
++++ bforce/bforce.c	Sat Apr  3 21:47:04 2004
+@@ -414,12 +419,12 @@
+ 		}
+ 	}
+ 	
+-	if( (rc = log_open(log_getfilename(LOG_FILE_SESSION), NULL, NULL)) )
++/*	if( (rc = log_open(log_getfilename(LOG_FILE_SESSION), NULL, NULL)) )
+ 	{
+ 		log("can't continue without logging");
+ 		gotoexit(BFERR_FATALERROR);
+ 	}
+-	
++*/	
+ 	/* Process primary config file */
+ 	if( opts.confname && *opts.confname )
+ 		rc = conf_readconf(opts.confname, 0);
+@@ -433,7 +438,7 @@
+ 		(void)conf_readconf(opts.incname, 1);
+ 	
+ 	/* Reopen log file if it was defined in config */
+-	if( log_reopen(log_getfilename(LOG_FILE_SESSION), NULL, NULL) )
++	if( log_open(log_getfilename(LOG_FILE_SESSION), NULL, NULL) )
+ 	{
+ 		log("can't continue without logging");
+ 		gotoexit(BFERR_FATALERROR);
--- /dev/null
+++ comms/bforce-kst/files/patch-prot_emsi.c
@@ -0,0 +1,20 @@
+diff -ruN bforce-0.22.8.kst7/source/bforce/prot_emsi.c bforce-0.22.8.kst8/source/bforce/prot_emsi.c
+--- bforce/prot_emsi.c	Thu Nov 21 23:22:56 2002
++++ bforce/prot_emsi.c	Sat Nov 30 01:41:15 2002
+@@ -829,10 +829,14 @@
+ 	/* ----------------------------------------------------------------- */
+ 	if( state.caller == 0 && hrc != HRC_BAD_PASSWD )
+ 	{
+-		emsi->have_traf = emsi->have_moh = 1;
++		emsi->have_traf = 1;
+ 		emsi->netmail_size = state.traff_send.netmail_size;
+ 		emsi->arcmail_size = state.traff_send.arcmail_size;
+-		emsi->files_size = state.traff_send.files_size;
++		if ( state.traff_send.files_size )
++		{
++			emsi->have_moh = 1;
++			emsi->files_size = state.traff_send.files_size;
++		}	
+ 	}
+ }
+ 
--- /dev/null
+++ comms/bforce-kst/files/patch-expression.y
@@ -0,0 +1,29 @@
+--- bforce/expression.y.old	Thu Aug 30 16:33:48 2001
++++ bforce/expression.y	Thu Feb  6 23:38:32 2003
+@@ -52,6 +52,7 @@
+ #include "logger.h"
+ #include "session.h"
+ #include "nodelist.h"
++#include "io.h"
+ 
+ static struct tm *now    = NULL;
+ static int   expr_result = 0;
+@@ -205,6 +206,7 @@
+ 	{
+ 		$$ = expr_check_logic($1, OR, $3);
+ 	}
++	;
+ %%
+ 
+ #include "expression_lex.c"
+@@ -329,6 +331,10 @@
+ 	else if( state.modemport && state.modemport->name )
+ 	{
+ 		return strstr(state.modemport->name, str) ? 1 : 0;
++	}
++	else if( isatty(0) )
++	{
++		return strstr(ttyname(0), str) ? 1 : 0;
+ 	}
+ 	
+ 	return -1;
--- /dev/null
+++ comms/bforce-kst/files/patch-prot_binkp.c
@@ -0,0 +1,20 @@
+--- bforce/prot_binkp.c.orig	Fri Aug 31 00:31:19 2001
++++ bforce/prot_binkp.c	Thu Jul 29 23:21:03 2004
+@@ -181,7 +181,7 @@
+ 			break;
+ 
+ 		default:
+-			/* Avoid warnings */
++			break;
+ 		}
+ 		
+ 		/*
+@@ -318,7 +318,7 @@
+ 			break;
+ 
+ 		default:
+-			/* Avoid warnings */
++			break;
+ 		}
+ 		
+ 		/*
--- /dev/null
+++ comms/bforce-kst/files/patch-bfstat.c
@@ -0,0 +1,10 @@
+--- bfutil/bfstat.c.orig	Thu Nov 21 23:23:00 2002
++++ bfutil/bfstat.c	Sat Aug  7 02:20:35 2004
+@@ -17,6 +17,7 @@
+ #include "logger.h"
+ #include "util.h"
+ #include "outbound.h"
++#include "session.h"
+ 
+ /*
+  * Command line options storage structure
--- /dev/null
+++ comms/bforce-kst/files/patch-sess_call.c
@@ -0,0 +1,26 @@
+--- bforce/sess_call.c.orig	Thu Nov 21 23:22:56 2002
++++ bforce/sess_call.c	Sat May 29 22:37:30 2004
+@@ -609,10 +609,20 @@
+ 		
+ 		if( !opts->hiddline )
+ 		{
+-			if( timevec_isdefined(&state.override.worktime) )
+-				goodtime = timevec_isnow(&state.override.worktime, now);
++			if( state.override.sFlags && !nodelist_checkflag(state.override.sFlags, "CM") )
++				goodtime = TRUE;
+ 			else
+-				goodtime = timevec_isnow(&state.node.worktime, now);
++			{
++				if( timevec_isdefined(&state.override.worktime) )
++					goodtime = timevec_isnow(&state.override.worktime, now);
++				else
++				{
++					if( !nodelist_checkflag(state.node.flags, "CM") )
++						goodtime = TRUE;
++					else
++						goodtime = timevec_isnow(&state.node.worktime, now);
++				}
++			}
+ 		}
+ 		else
+ 			goodtime = timevec_isnow(&state.override.worktime, now);
--- /dev/null
+++ comms/bforce-kst/files/patch-daemon.c
@@ -0,0 +1,17 @@
+--- bforce/daemon.c.old	Tue Jun  1 16:14:31 2004
++++ bforce/daemon.c	Tue Jun  1 16:20:15 2004
+@@ -772,10 +772,13 @@
+ 				fclose(pf);
+ 
+ 				if (hispid != 0) {
++					if (hispid == mypid)
++						return 0;
+ 					if (kill(hispid, 0) == 0) {
+ 						log("daemon_pidfile: another daemon exist. pid=%d", hispid);
+ 						return (-1);
+-					} else if(errno != ESRCH) {
++					}
++					if (errno != ESRCH) {
+ 						log("daemon_pidfile: error sending signal. pid=%d, errno=%d", hispid, errno);
+ 						return (-1);
+ 					}	


More information about the Midnightbsd-cvs mailing list