*BSD News Article 18014


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!elroy.jpl.nasa.gov!swrinde!cs.utexas.edu!uunet!math.fu-berlin.de!news.th-darmstadt.de!iti.informatik.th-darmstadt.de!deeken
From: deeken@iti.informatik.th-darmstadt.de (Hannes Deeken)
Newsgroups: comp.os.386bsd.questions
Subject: Re: Has anyone tried to build SMAIL-3.1.28 on NetBSD?
Date: 6 Jul 1993 18:00:07 +0200
Organization: TU Darmstadt, ITI
Lines: 249
Message-ID: <deeken.741974194@iti.informatik.th-darmstadt.de>
References: <1993Jun17.143045.18225@news.weeg.uiowa.edu> <1993Jun25.202631.153@ebc.ee>
NNTP-Posting-Host: spelunke.iti.informatik.th-darmstadt.de

ekasak@ebc.ee (Enn Kasak) writes:

>Well, I did it, but believe, it wasn't easy. I had to make the
>defs.* files on an other machine (running SCO Unix) and then
>modified some programs nthat wanted to make new defs.* files.
>Then I had to install these files everywhere by hand and finally
>made some fixes to the code (I think config had to do them because
>on SCO it compiled fine...). But now it works and if you want,
>I can email you the binariy.

I don't know why you had to do that. I just used bash as /bin/sh, a make
with the fix for single '-' on the command line (provided by the patch kit)
and the diffs you find below. No other machines/operating systems involved.

Hannes

------------------------------ cut here ------------------------------
diff -crN smail-3.1.28-orig/conf/EDITME-dist smail-3.1.28/conf/EDITME-dist
*** smail-3.1.28-orig/conf/EDITME-dist	Thu Sep 10 10:07:19 1992
--- smail-3.1.28/conf/EDITME-dist	Sun Sep 27 17:22:46 1992
***************
*** 171,176 ****
--- 171,177 ----
  #OS_TYPE=delta				# Motorola delta
  #OS_TYPE=mips-bsd4.3			# MIPS Risc/OS in bsd universe
  #OS_TYPE=3b2-s5.3+win			# 3b2 with SVR3.2 and WIN TCP/IP
+ OS_TYPE=386bsd				# 386BSD 0.1
  
  
  # ARCH_TYPE - architecture type
***************
*** 702,707 ****
--- 703,709 ----
  # installing it as $SMAIL_BIN_DIR/smail twice.
  
  SMAIL_NAME=/usr/lib/sendmail			# common convention
+ #SMAIL_NAME=/usr/sbin/sendmail			# 386BSD 0.1
  #SMAIL_NAME=					# use smail in bin directory
  
  
***************
*** 780,785 ****
--- 782,788 ----
  #NEWALIASES=$UTIL_BIN_DIR/newaliases
  #NEWALIASES=/usr/local/bin/newaliases
  NEWALIASES=/usr/ucb/newaliases			# BSD location
+ #NEWALIASES=/usr/bin/newaliases			# 386BSD location
  #NEWALIASES=/usr/lib/newaliases			# UTS/580 location
  
  
***************
*** 864,869 ****
--- 867,873 ----
  #	environment.
  
  ALIASES_FILE=/usr/lib/aliases			# compatible with sendmail
+ #ALIASES_FILE=/etc/aliases			# compatible with 386BSD
  #ALIASES_FILE=aliases				# for file under LIB_DIR
  #ALIASES_FILE=mail.aliases			# YP (NIS)
  #ALIASES_FILE=NetInfo				# for NeXT NetInfo aliases
diff -crN smail-3.1.28-orig/conf/os/386bsd smail-3.1.28/conf/os/386bsd
*** smail-3.1.28-orig/conf/os/386bsd
--- smail-3.1.28/conf/os/386bsd	Sat Sep 26 18:05:59 1992
***************
*** 0 ****
--- 1,71 ----
+ # @(#)conf/os/386bsd	1.0 9/12/92 23:20:31
+ #
+ # 386bsd - define the characteristics of 386BSD 0.1
+ 
+ # OSNAMES - Names defining this operating system
+ OSNAMES=UNIX_386BSD:UNIX_BSD4_3:UNIX_BSD4_2:UNIX_BSD:UNIX
+ 
+ # LOCKING_PROTOCOL - macros for efficient file locking
+ LOCKING_PROTOCOL="\
+ #define lock_fd(fd)	      (flock((fd), LOCK_EX|LOCK_NB) < 0? FAIL: SUCCEED)
+ #define lock_fd_wait(fd)	(flock((fd), LOCK_EX) < 0? FAIL: SUCCEED)
+ #define unlock_fd(fd)		((void) flock((fd), LOCK_UN))
+ #define unlock_fd_wait(fd)	((void) flock((fd), LOCK_UN))
+ #define lock_fd_rd_wait(fd)	(flock((fd), LOCK_SH) < 0? FAIL: SUCCEED)
+ "
+ 
+ # FLOCK_MAILBOX - should mailbox files be locked with lock_fd_wait
+ FLOCK_MAILBOX=yes
+ 
+ # MAILBOX_DIR - in which directory are user mailbox files
+ MAILBOX_DIR=/var/mail
+ 
+ # CONSOLE - name of the console device file
+ CONSOLE=/dev/console
+ 
+ # DECLARE_STRINGS - declare string routines, using macros as needed
+ DECLARE_STRINGS="\
+ #include <strings.h>
+ "
+ 
+ # SECURE_PATH - directories containing system-supplied user programs
+ SECURE_PATH=/bin:/usr/bin
+ 
+ # OSLIBS - name any object libraries containing routines we will need
+ #OSLIBS=
+ 
+ # DRIVER_CONFIGURATION - configuration file describing smail drivers
+ DRIVER_CONFIGURATION=arpa-network
+ 
+ # RANLIB - how do we organize an existing object archive library
+ RANLIB=ranlib
+ 
+ # CHOWN - command to use for accessing the chown program
+ CHOWN=/usr/sbin/chown
+ 
+ # HAVE - what features should be used with this operating system
+ #
+ # 386BSD does not really have HDB UUCP. But uux (Taylor UUCP) understands
+ # -g and -a options.
+ HAVE=BIND:BSD_NETWORKING:BSTRING:COMSAT:DUP2:FSYNC:FTRUNCATE:GETHOSTNAME:GETOPT
+ HAVE=$HAVE:HASH_BANG:HDB_UUCP:MKDIR:READDIR:RENAME:RLIMIT:SETEUID
+ HAVE=$HAVE:SETGROUPS:SYS5_STRLIB:SYSEXITS:VFORK:VFPRINTF:MEMMOVE
+ 
+ # MISC_DEFINES - miscellaneous definitions
+ MISC_DEFINES=INET_NTOA_USE_STRUCT
+ 
+ # COMPRESS(variable) - an executable that compresses files
+ # COMP_FLAG(variable) - flag to use to force compression
+ # DOT_Z(variable) - suffix generated by compression program
+ # UNCOMPRESS(variable) - program to uncompress files
+ # ZCAT(variable) - program to write contents of compressed files to stdout
+ COMPRESS=compress
+ COMP_FLAG=-f
+ DOT_Z=.Z
+ UNCOMPRESS=uncompress
+ ZCAT=zcat
+ 
+ # UUCP_SYSTEM_FILE - path to UUCP file containing remote systems
+ UUCP_SYSTEM_FILE=/etc/uucp/sys
+ 
+ CASE_NO_NEWLINES=true
diff -crN smail-3.1.28-orig/conf/os/Makefile smail-3.1.28/conf/os/Makefile
*** smail-3.1.28-orig/conf/os/Makefile	Mon Sep 21 01:35:52 1992
--- smail-3.1.28/conf/os/Makefile	Sat Sep 26 18:06:49 1992
***************
*** 19,25 ****
  
  ROOT=../..
  OSSRC=	template \
! 	386ix \
  	3b2-s5.3+win \
  	aix-ps2 aix3.1 aix3.2 \
  	aux2.0 \
--- 19,25 ----
  
  ROOT=../..
  OSSRC=	template \
! 	386ix 386bsd \
  	3b2-s5.3+win \
  	aix-ps2 aix3.1 aix3.2 \
  	aux2.0 \
diff -crN smail-3.1.28-orig/pd/pathalias/Makefile smail-3.1.28/pd/pathalias/Makefile
*** smail-3.1.28-orig/pd/pathalias/Makefile	Mon Sep 21 01:46:14 1992
--- smail-3.1.28/pd/pathalias/Makefile	Sat Sep 26 20:27:12 1992
***************
*** 91,97 ****
  
  parse.c: parse.y $(HDRS)
  	$(YACC) $(YFLAGS) parse.y
! 	mv y.tab.c parse.c
  
  makedb: makedb.o ${DEFS_SH} ${COMPAT_LIB}
  	@. ./${DEFS_SH}; ${XEXEC} $$CC ${CFLAGS} $$LDFLAGS makedb.o ${GETOPT} \
--- 91,98 ----
  
  parse.c: parse.y $(HDRS)
  	$(YACC) $(YFLAGS) parse.y
! 	sed -e 's/"y.tab.c"/"parse.c"/' y.tab.c >parse.c
! 	rm y.tab.c
  
  makedb: makedb.o ${DEFS_SH} ${COMPAT_LIB}
  	@. ./${DEFS_SH}; ${XEXEC} $$CC ${CFLAGS} $$LDFLAGS makedb.o ${GETOPT} \
diff -crN smail-3.1.28-orig/src/main.c smail-3.1.28/src/main.c
*** smail-3.1.28-orig/src/main.c	Sun Sep 20 21:54:55 1992
--- smail-3.1.28/src/main.c	Sat Sep 26 18:01:48 1992
***************
*** 189,194 ****
--- 189,197 ----
      }
  #endif	/* HAVE_SETGROUPS */
  
+     /* compute the uid and gid for nobody */
+     compute_nobody();
+ 
      /* get rid of any limits that might affect operation */
  #if defined(HAVE_ULIMIT) && !defined(HAVE_RLIMIT)
      /* kill limits on file size */
diff -crN smail-3.1.28-orig/src/mkdriv.awk smail-3.1.28/src/mkdriv.awk
*** smail-3.1.28-orig/src/mkdriv.awk	Sat Jul 11 20:53:32 1992
--- smail-3.1.28/src/mkdriv.awk	Sat Sep 26 18:01:48 1992
***************
*** 156,162 ****
  		print "%LC%" lname[i] "_close" "();"
  		print "%LL%" lname[i] "_lookup" "();"
  	}
! 	print
  	if (n_director) {
  		print "struct direct_driver direct_drivers[] = {"
  		for (i = 1; i <= n_director; i++) {
--- 156,162 ----
  		print "%LC%" lname[i] "_close" "();"
  		print "%LL%" lname[i] "_lookup" "();"
  	}
! 	print ""
  	if (n_director) {
  		print "struct direct_driver direct_drivers[] = {"
  		for (i = 1; i <= n_director; i++) {
diff -crN smail-3.1.28-orig/src/sysdep.c smail-3.1.28/src/sysdep.c
*** smail-3.1.28-orig/src/sysdep.c	Thu Sep 10 07:30:32 1992
--- smail-3.1.28/src/sysdep.c	Sat Sep 26 18:01:48 1992
***************
*** 26,31 ****
--- 26,34 ----
  #include <ctype.h>
  #include <sys/stat.h>
  #include <errno.h>
+ #ifdef __386BSD__
+ #include <utime.h>
+ #endif /* __386BSD__ */
  #include "smail.h"
  #include "child.h"
  #include "dys.h"
diff -crN smail-3.1.28-orig/util/dbm_compat.h smail-3.1.28/util/dbm_compat.h
*** smail-3.1.28-orig/util/dbm_compat.h	Sun Sep  6 10:09:15 1992
--- smail-3.1.28/util/dbm_compat.h	Sat Sep 26 18:01:47 1992
***************
*** 7,12 ****
--- 7,16 ----
  
  #undef NULL		/* dbm.h often defines NULL */
  
+ #if defined(__386BSD__)
+ #include <sys/types.h>	/* need this for u_{char,long} */
+ #endif
+ 
  #ifdef HAVE_DBM
  
  #ifdef DBM_INCLUDE_FILE
------------------------------ cut here ------------------------------
-- 
Hans-Christoph Deeken | hannes@flinx.{RoBIN.de,hotb.sub.org} (home)
Gerauer Str. 20       | deeken@iti.informatik.th-darmstadt.de (university)
6000 Frankfurt/M 71   | IRC: Glenlivet