Make this look like an OpenBSD port.

Mark as unbroken.
This commit is contained in:
espie 2000-09-03 16:25:04 +00:00
parent 2d6babc490
commit 08f15f7fab
17 changed files with 235 additions and 236 deletions

View File

@ -1,21 +1,21 @@
# $OpenBSD: Makefile,v 1.12 2000/09/03 04:10:43 turan Exp $
BROKEN= does not fake and install correctly
# $OpenBSD: Makefile,v 1.13 2000/09/03 16:25:04 espie Exp $
DISTNAME= xcept-2.1.2
CATEGORIES= comms
NEED_VERSION= 1.191
NEED_VERSION= 1.317
MAINTAINER= ports@openbsd.org
LICENSE_TYPE= BSD
PERMIT_PACKAGE_CDROM= YES
PERMIT_PACKAGE_FTP= YES
PERMIT_DISTFILES_CDROM= YES
PERMIT_DISTFILES_FTP= YES
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
MASTER_SITES= ${MASTER_SITE_LOCAL}
MAKE_FLAGS=SYSCONFDIR=${SYSCONFDIR}
WRKDIST= ${WRKDIR}/XCept-2.1.2
SUBST_VARS=SYSCONFDIR
.include <bsd.port.mk>

View File

@ -0,0 +1,7 @@
$OpenBSD: patch-Makefile,v 1.1 2000/09/03 16:25:04 espie Exp $
--- Makefile.orig Sun Sep 3 17:29:34 2000
+++ Makefile Sun Sep 3 17:29:34 2000
@@ -0,0 +1,3 @@
+SUBDIR= ceptd xcept lib etc
+
+.include <bsd.subdir.mk>

View File

@ -1,6 +0,0 @@
--- /dev/null Sun Sep 1 12:14:31 1996
+++ Makefile Sun Sep 1 14:43:35 1996
@@ -0,0 +1,3 @@
+SUBDIR= ceptd xcept lib etc
+
+.include <bsd.subdir.mk>

View File

@ -1,10 +0,0 @@
--- ./xcept/scripts.c.org Thu Apr 14 10:21:58 1994
+++ ./xcept/scripts.c Wed Apr 23 19:08:32 1997
@@ -36,6 +36,7 @@
#include <stdio.h>
#include <errno.h>
#include <string.h>
+#include <sys/types.h>
#include <dirent.h>
#include "scripts.h"

View File

@ -1,31 +1,22 @@
--- ceptd/config.h.orig Wed Jul 27 10:28:38 1994
+++ ceptd/config.h Sun Sep 1 12:37:09 1996
@@ -49,7 +49,7 @@
#undef NO_STRERROR /* define NO_STRERROR if you don't have strerror func. */
#define HASTERMIOS /* define HASTERMIOS if system has termios.h */
-#undef ASCIIPID /* define if your system writes pid in ascii to
+#define ASCIIPID /* define if your system writes pid in ascii to
uucp-lock */
#endif /* __bsdi__ */
$OpenBSD: patch-ceptd_Makefile,v 1.1 2000/09/03 16:25:05 espie Exp $
--- ceptd/Makefile.orig Wed Jun 15 17:10:59 1994
+++ ceptd/Makefile Sun Sep 1 14:17:11 1996
@@ -1,21 +1,30 @@
+++ ceptd/Makefile Sun Sep 3 18:05:22 2000
@@ -1,21 +1,24 @@
# directories:
OWNER= root
-GROUP= sys
-EXECMODE= 6750
+GROUP= bin
+EXECMODE= 04750
+MANMODE= 0644
-
-BINDIR= /usr/local/bin# directory for the executable ceptd
-MANDIR= /usr/local/man/manl# directory for the ceptds manpage
-ETCDIR= /usr/local/etc# directory for 'init file' and 'users file'
+GROUP= bin
+EXECMODE= 04755
+MANMODE= 0644
+
+BINDIR= ${PREFIX}/libexec# directory for the executable ceptd
+MANDIR= ${PREFIX}/man/man8# directory for the ceptds manpage
+ETCDIR= ${PREFIX}/etc# directory for 'init file' and 'users file'
+ETCDIR= ${SYSCONFDIR}# directory for 'init file' and 'users file'
# defaults for the ceptd :
@ -41,17 +32,11 @@
-LOCKDIR= /var/spool/locks# lock dir for uucp-locks
+LOCKDIR= /var/spool/lock# lock dir for uucp-locks
+
+.ifdef NOMANCOMPRESS
+MANPAGE= ceptd.8
+MANCOMPRESS= cat
+.else
+MANPAGE= ceptd.8.gz
+MANCOMPRESS= gzip -c -9
+.endif
# define these flags in $(DEFS):
@@ -54,86 +63,49 @@
@@ -54,86 +57,49 @@ DEFS= -DDEFAULTSOCKETPORT=$(DEFAULTSOCKE
-DDEFAULTINITFILENAME=\"$(DEFAULTINITFILENAME)\"\
-DDEFAULTUSERSFILENAME=\"$(DEFAULTUSERSFILENAME)\"\
-DDEFAULTLOGFILENAME=\"$(DEFAULTLOGFILENAME)\"\
@ -146,7 +131,7 @@
-e 's|--- The initalization file.|$(DEFAULTINITFILENAME)|g'\
-e 's|--- The log file.|$(DEFAULTLOGFILENAME)|g'\
- ceptd.8.template > ceptd.8
+ ceptd.8.template | ${MANCOMPRESS} > ${MANPAGE}
+ ceptd.8.template >${MANPAGE}
clean:
@ -155,76 +140,3 @@
veryclean:
rm -f ceptd.8 *.o TAGS ceptd lex.yy.c *.zoo
--- ceptd/ceptd.8.template.orig Wed May 25 19:36:11 1994
+++ ceptd/ceptd.8.template Sun Sep 1 15:33:16 1996
@@ -17,8 +17,8 @@
.I ceptd
can be started from the \fIinetd\fR. If not started from inetd,
\fIceptd\fR will deal with connection request forking on connects.
-If the standard input of ceptd
-is not a tty, ceptd assumes being started from inetd.
+If standard input and output of ceptd
+are sockets, ceptd assumes being started from inetd.
.PP
.I Available options:
.PP
--- ceptd/ceptd.c.orig Wed May 25 19:36:11 1994
+++ ceptd/ceptd.c Sun Sep 1 15:36:13 1996
@@ -67,12 +67,12 @@
static int endtime();
static void exit_btx_server(); /* signal routine for parent */
static pid_t childpid = -1; /* pid of child process */
-static int modem = -1, inetd = 0;
+static int modem = -1;
int debug =0;
static char *userlogfilename = DEFAULTLOGFILENAME;
static int connected;
static char *caller;
-int connectstatus, isdnflag = 0;
+int connectstatus, isdnflag = 0, inetd = 0;
main(argc,argv)
int argc;char *argv[];
@@ -220,12 +220,8 @@
#else
{
struct sigaction act;
+ memset(&act, 0, sizeof act);
act.sa_handler = hang_childs;
- act.sa_mask.sa_sigbits[0] = 0;
- act.sa_mask.sa_sigbits[1] = 0;
- act.sa_mask.sa_sigbits[2] = 0;
- act.sa_mask.sa_sigbits[3] = 0;
- act.sa_flags =0;
sigaction(SIGCHLD, &act, NULL); /* POSIX */
}
#endif
--- ceptd/modeminit.c.orig Wed May 25 19:36:12 1994
+++ ceptd/modeminit.c Sun Sep 1 15:35:42 1996
@@ -82,6 +82,7 @@
extern int errno;
extern int connectstatus, isdnflag;
+extern int inetd;
#ifdef USE_LOCK
#include <string.h>
@@ -134,7 +135,8 @@
*/
modemclose()
{
- (void) setsid (); /* give up controling terminal modem */
+ if (!inetd)
+ (void) setsid (); /* give up controling terminal modem */
if(modem != -1){
sendmodem(hangupstring);
termflush(modem); /* get rid of garbage */
@@ -163,7 +165,7 @@
#endif
int s;
- if(-1 == setsid())
+ if(!inetd && -1 == setsid())
log(LOG_ERR,"Can't setsid : %m");
#ifdef USE_LOCK
device = strrchr(devname, '/');

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-ceptd_ceptd_8_template,v 1.1 2000/09/03 16:25:05 espie Exp $
--- ceptd/ceptd.8.template.orig Wed May 25 19:36:11 1994
+++ ceptd/ceptd.8.template Sun Sep 3 17:29:35 2000
@@ -17,8 +17,8 @@ specification; see services(5).
.I ceptd
can be started from the \fIinetd\fR. If not started from inetd,
\fIceptd\fR will deal with connection request forking on connects.
-If the standard input of ceptd
-is not a tty, ceptd assumes being started from inetd.
+If standard input and output of ceptd
+are sockets, ceptd assumes being started from inetd.
.PP
.I Available options:
.PP

View File

@ -0,0 +1,32 @@
$OpenBSD: patch-ceptd_ceptd_c,v 1.1 2000/09/03 16:25:05 espie Exp $
--- ceptd/ceptd.c.orig Wed May 25 19:36:11 1994
+++ ceptd/ceptd.c Sun Sep 3 17:29:35 2000
@@ -67,12 +67,12 @@ static void starttime(), initlog();
static int endtime();
static void exit_btx_server(); /* signal routine for parent */
static pid_t childpid = -1; /* pid of child process */
-static int modem = -1, inetd = 0;
+static int modem = -1;
int debug =0;
static char *userlogfilename = DEFAULTLOGFILENAME;
static int connected;
static char *caller;
-int connectstatus, isdnflag = 0;
+int connectstatus, isdnflag = 0, inetd = 0;
main(argc,argv)
int argc;char *argv[];
@@ -220,12 +220,8 @@ FILE *initfile,*usersfile; int port;
#else
{
struct sigaction act;
+ memset(&act, 0, sizeof act);
act.sa_handler = hang_childs;
- act.sa_mask.sa_sigbits[0] = 0;
- act.sa_mask.sa_sigbits[1] = 0;
- act.sa_mask.sa_sigbits[2] = 0;
- act.sa_mask.sa_sigbits[3] = 0;
- act.sa_flags =0;
sigaction(SIGCHLD, &act, NULL); /* POSIX */
}
#endif

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-ceptd_config_h,v 1.1 2000/09/03 16:25:05 espie Exp $
--- ceptd/config.h.orig Wed Jul 27 10:28:38 1994
+++ ceptd/config.h Sun Sep 3 17:29:34 2000
@@ -49,7 +49,7 @@
#undef NO_STRERROR /* define NO_STRERROR if you don't have strerror func. */
#define HASTERMIOS /* define HASTERMIOS if system has termios.h */
-#undef ASCIIPID /* define if your system writes pid in ascii to
+#define ASCIIPID /* define if your system writes pid in ascii to
uucp-lock */
#endif /* __bsdi__ */

View File

@ -0,0 +1,30 @@
$OpenBSD: patch-ceptd_modeminit_c,v 1.1 2000/09/03 16:25:05 espie Exp $
--- ceptd/modeminit.c.orig Wed May 25 19:36:12 1994
+++ ceptd/modeminit.c Sun Sep 3 17:29:36 2000
@@ -82,6 +82,7 @@ static dial_btx(), changestring(), sendm
extern int errno;
extern int connectstatus, isdnflag;
+extern int inetd;
#ifdef USE_LOCK
#include <string.h>
@@ -134,7 +135,8 @@ FILE *initfile;
*/
modemclose()
{
- (void) setsid (); /* give up controling terminal modem */
+ if (!inetd)
+ (void) setsid (); /* give up controling terminal modem */
if(modem != -1){
sendmodem(hangupstring);
termflush(modem); /* get rid of garbage */
@@ -163,7 +165,7 @@ char *devname; int devspeed;
#endif
int s;
- if(-1 == setsid())
+ if(!inetd && -1 == setsid())
log(LOG_ERR,"Can't setsid : %m");
#ifdef USE_LOCK
device = strrchr(devname, '/');

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-etc_Makefile,v 1.1 2000/09/03 16:25:05 espie Exp $
--- etc/Makefile.orig Sun Sep 3 18:02:19 2000
+++ etc/Makefile Sun Sep 3 18:04:14 2000
@@ -0,0 +1,11 @@
+DEST = ${PREFIX}/share/cept
+MODE= 644
+OWNER= root
+GROUP= bin
+
+all:
+
+install:
+ mkdir -p ${DEST}
+ ${INSTALL} -c -m ${MODE} -o ${OWNER} -g ${GROUP} init.cept ${DEST}/cept.init.sample
+ ${INSTALL} -c -m ${MODE} -o ${OWNER} -g ${GROUP} users.cept ${DEST}/cept.users.sample

View File

@ -0,0 +1,39 @@
$OpenBSD: patch-etc_init_cept,v 1.1 2000/09/03 16:25:05 espie Exp $
--- etc/init.cept.orig Tue Jun 28 16:09:20 1994
+++ etc/init.cept Sun Sep 3 17:29:38 2000
@@ -26,30 +26,16 @@
# '\' = quote character e.g. \^ \~ \\
# '^' = control character e.g. ^M = return ^J = line_feed
#############################################################################
-opendevice 38400 "/dev/ttyF00"
-hangupstring "~+++~ATH0^M"
-connectstring "CONNECT 2400"
+opendevice 38400 "/dev/cuaa0"
+hangupstring "~+++~ATH0^M~ATZ"
+connectstring "CONNECT"
nodialtonestring "NO DIALTONE^M"
nocarrierstring "NO CARRIER^M"
busystring "BUSY^M"
-send "at^M"
-sleep 10
send "ATZ^M" # reset
-sleep 20
-send "AT&D2^M" # hangup when DTR off
-sleep 4
-send "ATQ0^M" #
-sleep 4
-send "ATV1^M"
-sleep 4
-send "AT^M" # dial-in/out modem
-sleep 4
-send "ATS21=24^M" # CD from phone line
-sleep 4
-send "ATS2=255^M" # no +++ allowed
-sleep 4
-send "~ATDT01300190^M"
+sleep 10
+send "~ATD01910^M" # Btx service Deutsche Telekom
wait 100 # wait 100 sec for BUSY, CONNECT, NO CARRIER, ....

View File

@ -1,57 +1,6 @@
--- /dev/null Sun Sep 1 12:14:31 1996
+++ etc/Makefile Sun Sep 1 14:38:51 1996
@@ -0,0 +1,11 @@
+DESTDIR = ${PREFIX}/etc
+MODE= 644
+OWNER= root
+GROUP= bin
+
+all:
+
+install:
+ mkdir -p ${DESTDIR}
+ ${INSTALL} -c -m ${MODE} -o ${OWNER} -g ${GROUP} init.cept ${DESTDIR}/cept.init
+ ${INSTALL} -c -m ${MODE} -o ${OWNER} -g ${GROUP} users.cept ${DESTDIR}/cept.users
--- etc/init.cept.orig Tue Jun 28 16:09:20 1994
+++ etc/init.cept Sun Sep 1 15:14:18 1996
@@ -26,30 +26,16 @@
# '\' = quote character e.g. \^ \~ \\
# '^' = control character e.g. ^M = return ^J = line_feed
#############################################################################
-opendevice 38400 "/dev/ttyF00"
+opendevice 38400 "/dev/cuaa0"
-hangupstring "~+++~ATH0^M"
-connectstring "CONNECT 2400"
+hangupstring "~+++~ATH0^M~ATZ"
+connectstring "CONNECT"
nodialtonestring "NO DIALTONE^M"
nocarrierstring "NO CARRIER^M"
busystring "BUSY^M"
-send "at^M"
-sleep 10
send "ATZ^M" # reset
-sleep 20
-send "AT&D2^M" # hangup when DTR off
-sleep 4
-send "ATQ0^M" #
-sleep 4
-send "ATV1^M"
-sleep 4
-send "AT^M" # dial-in/out modem
-sleep 4
-send "ATS21=24^M" # CD from phone line
-sleep 4
-send "ATS2=255^M" # no +++ allowed
-sleep 4
-send "~ATDT01300190^M"
+sleep 10
+send "~ATD01910^M" # Btx service Deutsche Telekom
wait 100 # wait 100 sec for BUSY, CONNECT, NO CARRIER, ....
$OpenBSD: patch-etc_users_cept,v 1.1 2000/09/03 16:25:05 espie Exp $
--- etc/users.cept.orig Tue Jun 28 16:09:30 1994
+++ etc/users.cept Sun Sep 1 15:14:41 1996
+++ etc/users.cept Sun Sep 3 17:29:38 2000
@@ -16,223 +16,7 @@
# (every user is allowed on every machine)
############################################################################

View File

@ -1,5 +1,6 @@
--- /dev/null Sun Sep 1 12:14:31 1996
+++ lib/Makefile Sun Sep 1 14:33:06 1996
$OpenBSD: patch-lib_Makefile,v 1.1 2000/09/03 16:25:05 espie Exp $
--- lib/Makefile.orig Sun Sep 3 17:29:38 2000
+++ lib/Makefile Sun Sep 3 17:29:39 2000
@@ -0,0 +1,14 @@
+#
+# Makefile for scripts

View File

@ -1,6 +1,7 @@
$OpenBSD: patch-xcept_makefile,v 1.1 2000/09/03 16:25:05 espie Exp $
--- xcept/makefile.orig Fri May 13 12:19:55 1994
+++ xcept/makefile Sun Sep 1 14:27:37 1996
@@ -48,23 +48,31 @@
+++ xcept/makefile Sun Sep 3 17:41:23 2000
@@ -48,24 +48,25 @@ SERVERPORT = 20005
# should be displayed in the scripts menu. (Only used when not
# overridden by enironment variable XCEPTSCRIPTS or by command line
# option '-S').
@ -22,25 +23,20 @@
OWNER = bin
-GROUP = uucp
-MODE = 755
+GROUP = bin
+BINMODE = 755
-BINDIR = /usr/local/bin
-MANDIR = /usr/local/man/manl
-
+GROUP = bin
+BINMODE = 755
+BINDIR = ${PREFIX}/bin
+MANDIR = ${PREFIX}/man/man1
+MANMODE = 644
+.ifdef NOMANCOMPRESS
+MANPAGE = xcept.1
+.else
+MANPAGE = xcept.1.gz
+MANCOMPRESS = gzip -c -9
+MANCLEAN = ${MANPAGE}
+.endif
@@ -73,7 +81,7 @@
######### definitions below should not need to be modified ###############
@@ -73,7 +74,7 @@ MANDIR = /usr/local/man/manl
DEFS = -DDEFAULTCEPTHOSTNAME=\"$(SERVERHOST)\" \
-DDEFAULTSOCKETPORT=$(SERVERPORT) \
-DXCEPTSCRIPTS_DEFAULTPATH=\"$(SCRIPTSDIR)\"
@ -49,7 +45,7 @@
SRCS = xcept.c xfont.c rawfont.c xwin.c layer6.c socket.c buttons.c \
@@ -84,34 +92,31 @@
@@ -84,34 +85,26 @@ OBJS = xcept.o xfont.o rawfont.o xwin.o
@ -81,11 +77,6 @@
- -chgrp $(GROUP) $(MANDIR)/xcept.1
- chmod 644 $(MANDIR)/xcept.1
-
+.ifndef NOMANCOMPRESS
+${MANPAGE}: xcept.1
+ ${MANCOMPRESS} < xcept.1 > ${MANPAGE}
+.endif
+
+install: all
+ ${INSTALL} -c -o ${OWNER} -g ${GROUP} -m ${BINMODE} xcept\
+ ${BINDIR}/xcept
@ -98,43 +89,3 @@
--- xcept/script.c.orig Fri Sep 24 16:07:29 1993
+++ xcept/script.c Sun Sep 1 14:08:13 1996
@@ -809,7 +809,6 @@
if(a->value == b->value)
return error("pc: %d - variables don't differ!\n",pc);
len = strlen(a->value) + strlen(b->value) + 1;
- free(a->value);
if(!(a->value = ralloc(a->value,len))) return errorp("realloc\n");
strcat(a->value,b->value);
@@ -1082,7 +1082,8 @@
printf( "%s", b->value );
fflush(stdout);
}
- gets(tmpstr);
+ fgets(tmpstr, 300, stdin);
+ if ((ptr = strchr(tmpstr, '\n'))) *ptr = '\0';
}
else if(visible) {
if(echo) {
@@ -1105,7 +1106,8 @@
}
printf("? ");
fflush(stdout);
- gets(tmpstr);
+ fgets(tmpstr, 300, stdin);
+ if ((ptr = strchr(tmpstr, '\n'))) *ptr = '\0';
if( !strlen(tmpstr) ) strncpy( tmpstr, c->value, sizeof(tmpstr)-1 );
}
}
--- xcept/xcept.c.orig Mon Apr 25 16:13:26 1994
+++ xcept/xcept.c Sun Sep 1 14:01:54 1996
@@ -945,7 +945,6 @@
int perr, p1, p2, p3, p4, p5, p6, p7, p8;
{
extern int errno;
- extern char *sys_errlist[];
static char errstr[200];
if(!visible) {

View File

@ -0,0 +1,31 @@
$OpenBSD: patch-xcept_script_c,v 1.1 2000/09/03 16:25:05 espie Exp $
--- xcept/script.c.orig Fri Sep 24 16:07:29 1993
+++ xcept/script.c Sun Sep 3 17:29:40 2000
@@ -809,7 +809,6 @@ static s_strcat()
if(a->value == b->value)
return error("pc: %d - variables don't differ!\n",pc);
len = strlen(a->value) + strlen(b->value) + 1;
- free(a->value);
if(!(a->value = ralloc(a->value,len))) return errorp("realloc\n");
strcat(a->value,b->value);
@@ -1082,7 +1081,8 @@ static s_input()
printf( "%s", b->value );
fflush(stdout);
}
- gets(tmpstr);
+ fgets(tmpstr, 300, stdin);
+ if ((ptr = strchr(tmpstr, '\n'))) *ptr = '\0';
}
else if(visible) {
if(echo) {
@@ -1105,7 +1105,8 @@ static s_input()
}
printf("? ");
fflush(stdout);
- gets(tmpstr);
+ fgets(tmpstr, 300, stdin);
+ if ((ptr = strchr(tmpstr, '\n'))) *ptr = '\0';
if( !strlen(tmpstr) ) strncpy( tmpstr, c->value, sizeof(tmpstr)-1 );
}
}

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-xcept_scripts_c,v 1.1 2000/09/03 16:25:05 espie Exp $
--- xcept/scripts.c.orig Thu Apr 14 19:21:58 1994
+++ xcept/scripts.c Sun Sep 3 17:29:41 2000
@@ -36,6 +36,7 @@
#include <stdio.h>
#include <errno.h>
#include <string.h>
+#include <sys/types.h>
#include <dirent.h>
#include "scripts.h"

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-xcept_xcept_c,v 1.1 2000/09/03 16:25:05 espie Exp $
--- xcept/xcept.c.orig Mon Apr 25 16:13:26 1994
+++ xcept/xcept.c Sun Sep 3 17:29:40 2000
@@ -945,7 +945,6 @@ char *str;
int perr, p1, p2, p3, p4, p5, p6, p7, p8;
{
extern int errno;
- extern char *sys_errlist[];
static char errstr[200];
if(!visible) {