From owner-freebsd-ports Fri Jan 28 23:10:30 2000 Delivered-To: freebsd-ports@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 3503A15E86 for ; Fri, 28 Jan 2000 23:10:04 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id XAA75534; Fri, 28 Jan 2000 23:10:03 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from cornflake.nickelkid.com (cornflake.nickelkid.com [216.116.135.26]) by hub.freebsd.org (Postfix) with ESMTP id AAFA915257 for ; Fri, 28 Jan 2000 23:02:21 -0800 (PST) (envelope-from jooji@cornflake.nickelkid.com) Received: (from jooji@localhost) by cornflake.nickelkid.com (8.9.3/8.9.3) id CAA17392; Sat, 29 Jan 2000 02:02:20 -0500 (EST) (envelope-from jooji) Message-Id: <200001290702.CAA17392@cornflake.nickelkid.com> Date: Sat, 29 Jan 2000 02:02:20 -0500 (EST) From: jooji@nickelkid.com Reply-To: jooji@nickelkid.com To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: ports/16437: Update port: news/nn Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 16437 >Category: ports >Synopsis: Overhaul of the nn port: version upgrade, removed interactive build >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Jan 28 23:10:02 PST 2000 >Closed-Date: >Last-Modified: >Originator: Jasper O'Malley >Release: FreeBSD 3.4-RC i386 >Organization: Three Weirdos >Environment: >Description: >How-To-Repeat: >Fix: Removed files/s-freebsd.h Removed patches/patch-aa Removed patches/patch-af Added patches/patch-aj Added patches/patch-ak Added patches/patch-al Added patches/patch-am Added patches/patch-an Removed scripts/configure Removed scripts/ Modified others as shown in diff -ruN output below: diff -ruN nn-old/Makefile nn/Makefile --- nn-old/Makefile Tue Aug 31 06:17:03 1999 +++ nn/Makefile Sat Jan 29 01:37:42 2000 @@ -1,39 +1,30 @@ # New ports collection makefile for: nn -# Version required: 6.5.3 +# Version required: 6.5.5 # Date created: 24 September 1994 # Whom: adam # # $FreeBSD: ports/news/nn/Makefile,v 1.22 1999/08/31 06:49:35 mharo Exp $ # -DISTNAME= nn-6.5.3 +DISTNAME= nn-6.5.5 CATEGORIES= news -MASTER_SITES= ftp://ftp.visi.com/users/mtpins/ \ - ftp://maroon.webmaster.com/pub/nn/ +MASTER_SITES= ftp://ftp.visi.com/users/mtpins/ EXTRACT_SUFX= .tar.Z -MAINTAINER= ports@FreeBSD.org -MAINTAINER= jooji@webnology.com - -IS_INTERACTIVE= yes -NO_PACKAGE= posting depends on inews utility, which has poster\'s domain compiled in +MAINTAINER= jooji@nickelkid.com MAN1= nn.1 nncheck.1 nngoback.1 nngrab.1 nngrep.1 nnpost.1 \ nntidy.1 nnview.1 nnacct.1m nnadmin.1m nnstats.1m nnusage.1m MAN8= nnmaster.8 nnspew.8 pre-patch: - @${CP} ${WRKSRC}/config.h-dist ${WRKSRC}/config.h + @${CP} ${WRKSRC}/config.h-dist ${WRKSRC}/config.h.unparsed pre-build: - @${CP} ${FILESDIR}/s-freebsd.h ${WRKSRC}/conf - -pre-install: - @${MKDIR} ${PREFIX}/news - [ ! -f ${WRKDIR}/.install_inews ] || (cd ${WRKSRC}/inews; ${MAKE} all) - [ ! -f ${WRKDIR}/.install_inews ] || (cd ${WRKSRC}/inews; ${MAKE} install) + @${CAT} ${WRKSRC}/config.h.unparsed | sed -e "s#SUB_PREFIX#${PREFIX}#" \ + | sed -e "s#SUB_MANPREFIX#${MANPREFIX}#" > ${WRKSRC}/config.h post-install: - @${CP} ${WRKDIR}/nntp_server ${PREFIX}/etc/nntp_server + @PKG_PREFIX=${PREFIX} pkg/INSTALL ${DISTNAME} POST-INSTALL .include diff -ruN nn-old/files/md5 nn/files/md5 --- nn-old/files/md5 Fri Apr 16 06:35:25 1999 +++ nn/files/md5 Thu Jan 27 02:04:59 2000 @@ -1 +1 @@ -MD5 (nn-6.5.3.tar.Z) = 20d983d62b2f89deda855485405099ed +MD5 (nn-6.5.5.tar.Z) = f347700f2c916d66071dae04c1981952 diff -ruN nn-old/files/s-freebsd.h nn/files/s-freebsd.h --- nn-old/files/s-freebsd.h Fri Apr 14 23:11:51 1995 +++ nn/files/s-freebsd.h Wed Dec 31 19:00:00 1969 @@ -1,159 +0,0 @@ -/* - * This version is for FreeBSD 2.1 - * Done by "Andrey A. Chernov" - */ - - -/* - * Include header files containing the following definitions: - * - * off_t, time_t, struct stat - */ - -#include -#include /* for S_IFREG */ -#include /* for O_RDONLY */ - -#define HAVE_STDLIB_H -#define HAVE_STRING_H -#define HAVE_UNISTD_H -#define HAVE_FCNTL_H - -#define HAVE_TERMIOS - -/* - * Define if your system has system V like ioctls - */ - -#undef HAVE_TERMIO /* */ - -/* - * Define to use terminfo database. - * Otherwise, termcap is used - */ - -#undef USE_TERMINFO /* */ - -/* - * Specify the library (or libraries) containing the termcap/terminfo - * routines. - * - * Notice: nn only uses the low-level terminal access routines - * (i.e. it does not use curses). - */ - -#define TERMLIB -ltermcap - -/* - * Define HAVE_STRCHR if strchr() and strrchr() are available - */ - -#define HAVE_STRCHR /* */ - -/* - * Define if a signal handler has type void (see signal.h) - */ - -#define SIGNAL_HANDLERS_ARE_VOID /* */ - -/* - * Define HAVE_UALARM if your system has a 4.3 BSD like ualarm() call. - * Else define MICRO_ALARM(n) to timeout in n/10 seconds if possible. - * Don't define either if system only has the standard alarm() call. - */ - -#define HAVE_UALARM /* */ - - -/* - * Define if your system has BSD like job control (SIGTSTP works) - */ - -#define HAVE_JOBCONTROL /* */ - - -/* - * Define if your system has a 4.3BSD like syslog library. - */ - -#define HAVE_SYSLOG - -/* - * Define if your system provides the "directory(3X)" access routines - * - * If true, include the header file(s) required by the package below - * (remember that or equivalent is included above) - * Also typedef Direntry to the proper struct type. - */ - -#define HAVE_DIRECTORY /* */ - -#include /* POSIX */ - -typedef struct dirent Direntry; /* POSIX */ - -/* - * Define if your system has a mkdir() library routine - */ - -#define HAVE_MKDIR /* */ - -/* - * Pick one: - * Define HAVE_GETHOSTNAME if you have a BSD like gethostname routine. - * Define HAVE_UNAME if a system V compatible uname() is available. - * Define HOSTNAME_FILE "...." to a file containing the hostname. - * Define HOSTNAME_WHOAMI if sysname is defined in . - * - * As a final resort, define HOSTNAME to the name of your system - * (in config.h). - */ - -#define HAVE_GETHOSTNAME /* BSD systems */ - -/* - * Define HAVE_MULTIGROUP if system has simultaneous multiple group - * membership capability (BSD style). - * Also define NGROUPS or include the proper .h file if NGROUPS is - * not defined in . - * Also define GIDSET_TYPE to the type of the elements in the array - * initialized by getgroups() if different from "int" (many systems - * have a gid_t, but very few use it for getgroups()). - */ - -#define HAVE_MULTIGROUP /* BSD */ -#define GIDSET_TYPE gid_t - -/* - * Define DETATCH_TERMINAL to be a command sequence which - * will detatch a process from the control terminal - * Also include system files needed to perform this HERE. - * If not possible, just define it (empty) - */ - -#define DETATCH_TERMINAL setsid(); - -/* - * Specify where the Bourne Shell is. - */ - -#define SHELL "/bin/sh" - -/* - * Specify the default mailer to be invoked by nnmail - */ - -#define MAILX "/usr/bin/mail" /* */ - -/* - * Define the maximum length of any pathname that may occur - */ - -#define FILENAME 256 - -#define RESIZING - -#define HAVE_8BIT_CTYPE - -#define HAVE_WORKING_COLLATE - diff -ruN nn-old/patches/patch-aa nn/patches/patch-aa --- nn-old/patches/patch-aa Fri Apr 16 06:35:25 1999 +++ nn/patches/patch-aa Wed Dec 31 19:00:00 1969 @@ -1,14 +0,0 @@ ---- nntp.c.orig Tue Jul 14 07:21:36 1998 -+++ nntp.c Fri Apr 16 01:30:09 1999 -@@ -88,9 +88,11 @@ - - import int sys_nerr; - #ifndef __NetBSD__ -+#ifndef __FreeBSD__ - #ifndef __linux__ - import char *sys_errlist[]; - #endif /* __linux__ */ -+#endif /* __FreeBSD__ */ - #endif /* __NetBSD__ */ - extern void nn_exitmsg(); - extern void sys_error(); diff -ruN nn-old/patches/patch-ab nn/patches/patch-ab --- nn-old/patches/patch-ab Fri Apr 16 06:35:25 1999 +++ nn/patches/patch-ab Thu Jan 27 02:05:30 2000 @@ -1,10 +1,10 @@ ---- chset.c.orig Fri Apr 28 22:34:04 1995 -+++ chset.c Fri Apr 16 01:30:09 1999 +--- chset.c.orig Tue Jan 25 09:33:52 2000 ++++ chset.c Tue Jan 25 09:34:51 2000 @@ -18,6 +18,7 @@ "iso-8859-7", 8, "iso-8859-8", 8, "iso-8859-9", 8, -+ "koi8-r", 8, ++ "koi8-r", 8, "unknown", 0, NULL, 0, }; diff -ruN nn-old/patches/patch-ac nn/patches/patch-ac --- nn-old/patches/patch-ac Fri Apr 16 04:52:25 1999 +++ nn/patches/patch-ac Thu Jan 27 02:38:36 2000 @@ -1,5 +1,5 @@ ---- inst.sh.orig Fri Apr 28 22:34:49 1995 -+++ inst.sh Fri Apr 16 01:30:09 1999 +--- inst.sh.orig Thu Jan 27 02:36:07 2000 ++++ inst.sh Thu Jan 27 02:29:51 2000 @@ -1,8 +1,8 @@ # (Large) prefix inserted above by Make @@ -20,3 +20,35 @@ ( if $NNTP +@@ -89,8 +89,8 @@ + if [ -s ErrorCheck ] + then + cat ErrorCheck +- echo "Hit return to continue" +- read X ++# echo "Hit return to continue" ++# read X + fi + rm -f ErrorCheck + +@@ -188,7 +188,7 @@ + OPT=master + ;; + n) +- OPT="bin aux help online man" ++ OPT="bin aux help online man inews" + ;; + 2|c) + OPT=bin +@@ -357,6 +357,11 @@ + fi + done + ;; ++ ++inews) ++ cd inews/ && make install || exit 1 ++ ;; ++ + + online) + ./inst mkdir $HELP 755 || exit 1 diff -ruN nn-old/patches/patch-ae nn/patches/patch-ae --- nn-old/patches/patch-ae Fri Apr 16 04:52:25 1999 +++ nn/patches/patch-ae Thu Jan 27 02:09:13 2000 @@ -1,28 +1,29 @@ ---- config.h.orig Fri Apr 16 01:30:09 1999 -+++ config.h Fri Apr 16 01:30:09 1999 +--- config.h.unparsed.orig Wed Jan 26 23:16:25 2000 ++++ config.h.unparsed Thu Jan 27 01:23:30 2000 @@ -51,10 +51,10 @@ - #define DO_NOV_DIGEST /* */ + #define DO_NOV_DIGEST /* Optional */ --/* #define NOV_DIRECTORY "/usr/spool/news" /* */ -+#define NOV_DIRECTORY "/var/news/over.view" /* */ +-/* #define NOV_DIRECTORY "/usr/spool/news" */ ++#define NOV_DIRECTORY "/var/news/over.view" /* Optional */ --/* #define NOV_FILENAME ".overview" /* */ -+#define NOV_FILENAME ".overview" /* */ +-/* #define NOV_FILENAME ".overview" */ ++#define NOV_FILENAME ".overview" /*********************** NETWORK DEPENDENT DEFINITIONS ********************** -@@ -107,7 +107,7 @@ +@@ -107,7 +107,8 @@ * NOTE: If you plan to use the included inews, it MUST be a full pathname */ --#define NNTP_SERVER "/usr/lib/nntp_server" /* */ -+#define NNTP_SERVER "/usr/local/etc/nntp_server" /* */ +-#define NNTP_SERVER "/usr/local/lib/nntp_server" ++#define NNTP_SERVER "SUB_PREFIX/etc/nntp_server" ++#define NNTP_DOMAIN "SUB_PREFIX/etc/nntp_domain" /* * Define NNTP_POST if you want nn to reject attempts to post via -@@ -149,7 +149,7 @@ +@@ -149,7 +150,7 @@ * conf/s-template.h as a starting point for writing you own. */ @@ -31,7 +32,7 @@ /* * Define DEFAULT_PAGER as the initial value of the 'pager' variable. -@@ -210,7 +210,7 @@ +@@ -210,7 +211,7 @@ * conf/m-template.h as a starting point for writing you own. */ @@ -40,76 +41,82 @@ /***************************** OWNERSHIP *************************** -@@ -263,7 +263,7 @@ +@@ -261,9 +262,9 @@ + * (= LIB_DIRECTORY/Log if undefined). + */ - #define BIN_DIRECTORY "/usr/local/bin" - #define LIB_DIRECTORY "/usr/local/lib/nn" +-#define BIN_DIRECTORY "/usr/local/bin" +-#define LIB_DIRECTORY "/usr/local/lib/nn" - -+#define TMP_DIRECTORY "/var/tmp" ++#define BIN_DIRECTORY "SUB_PREFIX/bin" ++#define LIB_DIRECTORY "SUB_PREFIX/lib/nn" ++#define TMP_DIRECTORY "/var/tmp" /**************************** DATABASE LOCATION ************************** * -@@ -294,7 +294,7 @@ +@@ -294,7 +295,7 @@ * (The file system must support long file names!!) */ --/* #define DB_DIRECTORY "/usr/spool/nn" /* */ -+#define DB_DIRECTORY "/var/spool/nn" /* */ +-/* #define DB_DIRECTORY "/usr/spool/nn" */ ++#define DB_DIRECTORY "/var/spool/nn" /*************************** NEWS TRANSPORT ************************** -@@ -316,8 +316,8 @@ +@@ -316,9 +317,9 @@ * Default: NEWS_LIB_DIR/{rm,del}group */ --/* #define NEWS_DIRECTORY "/usr/spool/news" /* */ --/* #define NEWS_LIB_DIRECTORY "/usr/lib/news" /* */ -+#define NEWS_DIRECTORY "/var/news" /* */ -+#define NEWS_LIB_DIRECTORY "/usr/local/news/lib" /* */ - /* #define INEWS_PATH "/usr/lib/news/inews" /* */ +-/* #define NEWS_DIRECTORY "/usr/spool/news" */ +-/* #define NEWS_LIB_DIRECTORY "/usr/lib/news" */ +-/* #define INEWS_PATH "/usr/lib/news/inews" */ ++#define NEWS_DIRECTORY "/var/news" ++#define NEWS_LIB_DIRECTORY "SUB_PREFIX/news/lib" ++#define INEWS_PATH "SUB_PREFIX/bin/nn-inews" -@@ -341,7 +341,7 @@ + /* +@@ -341,7 +342,7 @@ */ - /* #define REC_MAIL "/usr/lib/news/recmail" /* non-sendmail */ + /* #define REC_MAIL "/usr/lib/news/recmail" */ /* non-sendmail */ -#define REC_MAIL "/usr/lib/sendmail -t" /* sendmail */ +#define REC_MAIL "/usr/sbin/sendmail -t" /* sendmail */ /* -@@ -403,13 +403,13 @@ +@@ -403,13 +404,13 @@ * DAEMON_MAN - nnmaster */ --#define USER_MAN_DIR "/usr/man/man1" -+#define USER_MAN_DIR "/usr/local/man/man1" +-#define USER_MAN_DIR "/usr/local/man/man1" ++#define USER_MAN_DIR "SUB_MANPREFIX/man/man1" #define USER_MAN_SECTION "1" --#define SYS_MAN_DIR "/usr/man/man1" -+#define SYS_MAN_DIR "/usr/local/man/man1" +-#define SYS_MAN_DIR "/usr/local/man/man1" ++#define SYS_MAN_DIR "SUB_MANPREFIX/man/man1" #define SYS_MAN_SECTION "1m" --#define DAEMON_MAN_DIR "/usr/man/man8" -+#define DAEMON_MAN_DIR "/usr/local/man/man8" +-#define DAEMON_MAN_DIR "/usr/local/man/man8" ++#define DAEMON_MAN_DIR "SUB_MANPREFIX/man/man8" #define DAEMON_MAN_SECTION "8" -@@ -469,7 +469,7 @@ +@@ -469,7 +470,7 @@ * was accepted, whereas with INN, it only takes seconds. */ -#define INEWS_IS_FAST /* comment out for C-News */ -+/*#define INEWS_IS_FAST*/ /* comment out for C-News */ ++/* #define INEWS_IS_FAST /* comment out for C-News */ /* * Synchronous posting: If set this will cause NN to wait until a -@@ -481,7 +481,7 @@ +@@ -481,7 +482,7 @@ * via some sort of NNTP. */ -#define SYNCHRONOUS_POSTING /* comment out for C-News */ -+/*#define SYNCHRONOUS_POSTING /* comment out for C-News */ ++/* #define SYNCHRONOUS_POSTING /* comment out for C-News */ /* * PUT_TIMESTAMP_IN_SCRIPTS diff -ruN nn-old/patches/patch-af nn/patches/patch-af --- nn-old/patches/patch-af Fri Apr 16 04:52:25 1999 +++ nn/patches/patch-af Wed Dec 31 19:00:00 1969 @@ -1,11 +0,0 @@ ---- libnov.c.orig Wed Jul 15 13:40:57 1998 -+++ libnov.c Fri Apr 16 01:30:09 1999 -@@ -323,7 +323,7 @@ - if (gp->g_dir == NULL && gp->g_stream == NULL) - return 0; - if (gp->g_stream == NULL) { -- line = str3save(gp->g_dir, "/", "overviewfiles"); -+ line = str3save(gp->g_dir, "/", overviewfiles); - if (line == NULL) - return 0; - gp->g_stream = fopen(line, "r"); diff -ruN nn-old/patches/patch-ag nn/patches/patch-ag --- nn-old/patches/patch-ag Fri Apr 16 04:52:25 1999 +++ nn/patches/patch-ag Thu Jan 27 02:05:30 2000 @@ -1,16 +1,12 @@ ---- Makefile.orig Mon Aug 19 17:28:12 1996 -+++ Makefile Fri Apr 16 01:28:02 1999 -@@ -19,15 +19,15 @@ - # Use /lib/cpp or /usr/ccs/lib/cpp for CPP on Solaris or SVR4 machines. - +--- Makefile.orig Sat Jun 5 00:07:14 1999 ++++ Makefile Thu Jan 27 01:56:38 2000 +@@ -21,13 +21,13 @@ CC = cc --#CPP = $(CC) -E --CPP = /lib/cpp + CPP = $(CC) -E + #CPP = /lib/cpp -#CFLAGS = -O2 # -g # -I/usr/local/lib/malloc-debug -DMALLOC_FUNC_CHECK -CFLAGS = -O -+CPP = $(CC) -E -+#CPP = /lib/cpp -+CFLAGS += -O2 # -g # -I/usr/local/lib/malloc-debug -DMALLOC_FUNC_CHECK ++CFLAGS = -O2 # -g # -I/usr/local/lib/malloc-debug -DMALLOC_FUNC_CHECK +#CFLAGS = -O #-Wall -Wcomment \ #-Wtraditional -Wshadow \ @@ -21,7 +17,16 @@ MAKE = make -@@ -97,3 +97,5 @@ +@@ -36,6 +36,8 @@ + all: ymakefile + $(MAKE) $(MFLAGS) -f ymakefile all + ++inews: ymakefile ++ $(MAKE) $(MFLAGS) -f ymakefile inews + touch: ymakefile + $(MAKE) -f ymakefile -t all + +@@ -97,3 +99,5 @@ man/nn.1.D: man/nn.1 sh SPLITNN1 diff -ruN nn-old/patches/patch-ai nn/patches/patch-ai --- nn-old/patches/patch-ai Sun May 2 22:31:56 1999 +++ nn/patches/patch-ai Sat Jan 29 01:27:16 2000 @@ -1,13 +1,8 @@ -*** inews/version.c Sun Jan 24 23:44:03 1999 ---- inews/version.c.new Sun Jan 24 23:44:36 1999 -*************** -*** 2,5 **** - * Provide the version number of this release. - */ - -! char nntp_version[] = "1.5.8 (11 March 90)"; ---- 2,5 ---- - * Provide the version number of this release. - */ - -! char nntp_version[] = "1.5.8.MINI (MINI-INEWS)"; +--- inews/version.c.orig Sat Apr 29 01:34:47 1995 ++++ inews/version.c Fri Jan 28 15:53:13 2000 +@@ -2,4 +2,4 @@ + * Provide the version number of this release. + */ + +-char nntp_version[] = "1.5.8 (11 March 90)"; ++char nntp_version[] = "1.5.8.MINI (MINI-INEWS)"; diff -ruN nn-old/patches/patch-aj nn/patches/patch-aj --- nn-old/patches/patch-aj Wed Dec 31 19:00:00 1969 +++ nn/patches/patch-aj Thu Jan 27 02:05:30 2000 @@ -0,0 +1,27 @@ +--- xmakefile.orig Wed Jan 26 12:30:07 2000 ++++ xmakefile Wed Jan 26 12:47:18 2000 +@@ -103,12 +103,15 @@ + MAIL = nnmail.o reroute.o hostname.o global.o options.o + + +-all: $(BIN_PROG) $(LIB_PROG) $(MASTER_PROG) inst ++all: $(BIN_PROG) $(LIB_PROG) $(MASTER_PROG) inst inews + + client: $(BIN_PROG) $(LIB_PROG) inst + + master: $(MASTER_PROG) inst + ++inews:: ++ @cd inews && $(MAKE) all ++ + nn: PARALLEL $(NN) $(NOVOBJ) + @echo linking nn + @$(CC) -o nn $(CFLAGS) $(NN) $(NOVOBJ) $(LDFLAGS) TERMLIB NNTP_EXTRA_LIB +@@ -195,6 +198,7 @@ + rm -f $(BIN_PROG) $(LIB_PROG) $(MASTER_PROG) cvt-help usercheck + rm -f prefix mkprefix inst + rm -f man/nn.1 man/nn.1~ ++ cd inews && $(MAKE) clean + + * + * dependencies diff -ruN nn-old/patches/patch-ak nn/patches/patch-ak --- nn-old/patches/patch-ak Wed Dec 31 19:00:00 1969 +++ nn/patches/patch-ak Fri Jan 28 15:51:30 2000 @@ -0,0 +1,27 @@ +--- inews/conf.h.orig Sat Apr 29 01:34:46 1995 ++++ inews/conf.h Fri Jan 28 15:04:03 2000 +@@ -30,6 +30,7 @@ + #define NNINEWSCONF_H + + #include "config.h" ++#include + + #ifndef NNTP + /* WHY DO YOU WANT TO MAKE MINI-INEWS WHEN YOU DONT USE NNTP */ +@@ -59,7 +60,7 @@ + * DOMAIN as defined above). If you don't want this, comment it out. + */ + +-#define HIDDENNET ++/* #define HIDDENNET */ + + /* + * There are a number of ways that inews will try to figure out the +@@ -92,6 +93,7 @@ + */ + + #define SERVER_FILE NNTP_SERVER ++#define DOMAIN_FILE NNTP_DOMAIN + + /* + * Reverse engineering (nn got this the other way around).... diff -ruN nn-old/patches/patch-al nn/patches/patch-al --- nn-old/patches/patch-al Wed Dec 31 19:00:00 1969 +++ nn/patches/patch-al Fri Jan 28 14:46:51 2000 @@ -0,0 +1,39 @@ +--- inews/inews.c.orig Tue Jan 25 13:42:08 2000 ++++ inews/inews.c Wed Jan 26 11:16:19 2000 +@@ -32,7 +32,7 @@ + + extern FILE *ser_wr_fp; + +-char host_name[256]; ++char host_name[MAXHOSTNAMELEN]; + + main(argc, argv) + int argc; +@@ -248,6 +248,8 @@ + char *cp; + struct passwd *passwd; + char *index(), *getenv(); ++ char *getdomainbyfile(); ++ char *domain; + + passwd = getpwuid(getuid()); + +@@ -279,9 +281,15 @@ + DOMAIN); + #endif /* HIDDENNET */ + #else +- fprintf(ser_wr_fp, "From: %s@%s (", +- passwd->pw_name, +- host_name); ++ domain = getdomainbyfile(DOMAIN_FILE); ++ if (domain == NULL) ++ fprintf(ser_wr_fp, "From: %s@%s (", ++ passwd->pw_name, ++ host_name); ++ else ++ fprintf(ser_wr_fp, "From: %s@%s (", ++ passwd->pw_name, ++ domain); + #endif + + for (cp = full_name; *cp != '\0'; ++cp) diff -ruN nn-old/patches/patch-am nn/patches/patch-am --- nn-old/patches/patch-am Wed Dec 31 19:00:00 1969 +++ nn/patches/patch-am Fri Jan 28 14:47:07 2000 @@ -0,0 +1,10 @@ +--- inews/clientlib.h.orig Wed Jan 26 10:50:26 2000 ++++ inews/clientlib.h Wed Jan 26 10:50:44 2000 +@@ -5,6 +5,7 @@ + */ + + extern char *getserverbyfile(); ++extern char *getdomainbyfile(); + extern int server_init(); + extern void put_server(); + extern int get_server(); diff -ruN nn-old/patches/patch-an nn/patches/patch-an --- nn-old/patches/patch-an Wed Dec 31 19:00:00 1969 +++ nn/patches/patch-an Fri Jan 28 14:47:20 2000 @@ -0,0 +1,69 @@ +--- inews/clientlib.c.orig Wed Jan 26 10:17:34 2000 ++++ inews/clientlib.c Wed Jan 26 10:37:27 2000 +@@ -76,7 +76,7 @@ + { + register FILE *fp; + register char *cp; +- static char buf[256]; ++ static char buf[MAXHOSTNAMELEN]; + char *index(); + char *getenv(); + char *strcpy(); +@@ -107,6 +107,48 @@ + return (NULL); /* No entry */ + } + ++/* ++ * getdomainbyfile Get the domain name for posting from a named file. ++ * Handle blank lines and comments. ++ * ++ * Parameters: "file" is the name of the file to read. ++ * ++ * Returns: Pointer to static data area containing the ++ * first non-blank/comment line in the file. ++ * NULL on error (or lack of entry in file). ++ * ++ * Side effects: None. ++ */ ++ ++char * ++getdomainbyfile(file) ++char *file; ++{ ++ register FILE *fp; ++ register char *cp; ++ static char buf[MAXHOSTNAMELEN]; ++ char *index(); ++ ++ if (file == NULL) ++ return (NULL); ++ ++ fp = fopen(file, "r"); ++ if (fp == NULL) ++ return (NULL); ++ ++ while (fgets(buf, sizeof (buf), fp) != NULL) { ++ if (*buf == '\n' || *buf == '#') ++ continue; ++ cp = index(buf, '\n'); ++ if (cp) ++ *cp = '\0'; ++ (void) fclose(fp); ++ return (buf); ++ } ++ ++ (void) fclose(fp); ++ return (NULL); ++} + + /* + * server_init Get a connection to the remote news server. +@@ -211,7 +253,7 @@ + static struct hostent def; + static struct in_addr defaddr; + static char *alist[1]; +- static char namebuf[ 256 ]; ++ static char namebuf[MAXHOSTNAMELEN]; + defaddr.s_addr = inet_addr( machine ); + if( defaddr.s_addr != -1 ) { + strcpy( namebuf, machine ); diff -ruN nn-old/pkg/DESCR nn/pkg/DESCR --- nn-old/pkg/DESCR Mon May 3 06:40:44 1999 +++ nn/pkg/DESCR Thu Jan 27 02:02:44 2000 @@ -1,4 +1,4 @@ No News is good news. This version of nn has NOV support. - Jasper O'Malley - jooji@webnology.com + jooji@nickelkid.com diff -ruN nn-old/pkg/INSTALL nn/pkg/INSTALL --- nn-old/pkg/INSTALL Wed Dec 31 19:00:00 1969 +++ nn/pkg/INSTALL Thu Jan 27 02:47:14 2000 @@ -0,0 +1,60 @@ +#!/bin/sh + +if [ "x$2" != "xPOST-INSTALL" ]; then + exit +fi + +cat << xxENDxx +******************************************************************* +You have just installed the $1 package + +Please set your NNTP server address or hostname in the file: + +xxENDxx + +echo "${PKG_PREFIX}/etc/nntp_server" +echo "" + +cat << xxENDxx +If desired, please set your domain name for From: addresses when +posting in the file (default is to use your hostname): + +xxENDxx + +echo "${PKG_PREFIX}/etc/nntp_domain" +echo "" + +cat << xxENDxx +******************************************************************* +xxENDxx + +if [ ! -f ${PKG_PREFIX}/etc/nntp_server ]; then + cat << xxENDxx > ${PKG_PREFIX}/etc/nntp_server +# nntp_server: Configuration file for NN newsreader +# +# Set your NNTP server address or hostname in this file. +# +# If this file is left blank, NN will use the server set in the +# NNTP_SERVER environment variable. +# +# news.myisp.com +xxENDxx +fi + +if [ ! -f ${PKG_PREFIX}/etc/nntp_domain ]; then + cat << xxENDxx > ${PKG_PREFIX}/etc/nntp_domain +# nntp_domain: Configuration file for NN newsreader +# +# Set the default domain name portion of user e-mail addresses as you +# would like them to appear in the From: line of articles posted +# with NN. +# +# For example, setting the name to foobar.com in this file will cause +# the From: line for joeuser to look like something like this: +# +# From: joeuser@foobar.com (Joe User) +# +# If this file is left blank, NN will use the hostname of this +# computer as the From: domain name. +xxENDxx +fi diff -ruN nn-old/pkg/PLIST nn/pkg/PLIST --- nn-old/pkg/PLIST Mon May 3 06:40:44 1999 +++ nn/pkg/PLIST Thu Jan 27 02:03:22 2000 @@ -10,6 +10,7 @@ bin/nntidy bin/nnusage bin/nnview +bin/nn-inews lib/nn/aux lib/nn/conf lib/nn/help/Manual @@ -33,4 +34,3 @@ lib/nn/upgrade_rc @dirrm lib/nn/help @dirrm lib/nn -@unexec echo "Be sure to remove %D/news/lib/inews if you no longer need it." diff -ruN nn-old/scripts/configure nn/scripts/configure --- nn-old/scripts/configure Sun May 2 22:32:05 1999 +++ nn/scripts/configure Wed Dec 31 19:00:00 1969 @@ -1,168 +0,0 @@ -#!/bin/sh -# -# Configure script for FreeBSD port of NN-6.5.3 -# -# Comments to Jasper O'Malley -# - -cd ${WRKSRC}/inews - -if [ ! -f conf.h.dist ]; then - if [ ! -f conf.h ]; then - echo "Can't find the file ${WRKSRC}/inews/conf.h" - echo "Do a \"make clean\" and try making the NN port again." - exit 1 - else - mv -f conf.h conf.h.dist - fi -fi - -while : -do - read -p"Enter hostname or IP address of your news server: " news_server - if [ -z $news_server ]; then - echo "You must supply a hostname or IP address. Try again." - echo "" - break - else - while : - do - echo "" - echo "You entered: ${news_server}" - echo "" - read -p"Is this what you wanted? [y/N] " yesno - if [ -z $yesno ]; then - yesno="N" - break - elif [ "$yesno" = "Y" -o "$yesno" = "y" -o "$yesno" = "n" -o "$yesno" = "N" ]; then - break - else - echo "Please enter Y or N." - echo "" - fi - done - echo "" - if [ "$yesno" = "y" -o "$yesno" = "Y" ]; then - echo "\"${news_server}\" it is." - echo "" - break - fi - fi -done - -echo "${news_server}" > ${WRKDIR}/nntp_server - -cat << xxENDxx -NN requires a utility called INEWS to post news to an NNTP server. -INEWS is distributed with a variety of software packages, including the -INN news server. - -A minimal version of INEWS--dubbed Mini-INEWS--is included with this -distribution of NN. Mini-INEWS has the poster's e-mail "From:" domain -(the bit that appears after the @ symbol) hardcoded into the utility. -The configuration program running now is used to set that domain. - -xxENDxx - -if [ -r ${PREFIX}/news/lib/inews ]; then - strings ${PREFIX}/news/lib/inews | grep -q MINI-INEWS - if [ $? -eq 1 ]; then - cat << xxENDxx -However, a version of INEWS that may or may not be Mini-INEWS has been detected -on your system, in location "${PREFIX}/news/lib/inews". - -Because you already have a version of INEWS, you probably do not need to -install Mini-INEWS at this time. However, if you want to make changes to a -previous Mini-INEWS installation, you will need to overwrite the existing -version. In addition, installing Mini-INEWS now will allow future installations -of NN to detect that the Mini-INEWS client is installed. - -xxENDxx - while : - do - read -p"Do you wish to install Mini-INEWS and overwrite ${PREFIX}/news/lib/inews? " yesno - if [ "$yesno" = "y" -o "$yesno" = "Y" -o "$yesno" = "n" -o "$yesno" = "N" ]; then - break - else - echo "Please enter Y or N." - echo "" - fi - done - if [ "$yesno" = "N" -o "$yesno" = "n" ]; then - echo "Mini-INEWS will not be installed. If you wish to install Mini-INEWS" - echo "at a later time, reinstall the NN port." - rm -f ${WRKDIR}/.install_inews - exit 0 - else - echo "" - fi - else - echo "You have what appears to be a version of Mini-INEWS installed on" - echo "your system, in location \"${PREFIX}/news/lib/inews\"." - echo "" - while : - do - read -p"Do you wish to reinstall Mini-INEWS with new settings? " yesno - if [ "$yesno" = "y" -o "$yesno" = "Y" -o "$yesno" = "n" -o "$yesno" = "N" ]; then - break - else - echo "Please enter Y or N." - echo "" - fi - done - if [ "$yesno" = "Y" -o "$yesno" = "y" ]; then - echo "" - else - echo "Mini-INEWS will not be installed." - rm -f ${WRKDIR}/.install_inews - echo "" - exit 0 - fi - fi -fi - -defdomain=`hostname | sed -e 's/^[^.]*\.//' | sed -e 's/^[^.]*$//` - -while : -do - echo "What do you want to appear after the @ symbol in the From:" - echo "header in Usenet articles posted by your users with NN?" - echo "" - read -p"[default: ${defdomain:-(none)}]: " domain - if [ -z ${domain:=${defdomain}} ]; then - echo "" - echo "You must supply a value. Try again." - echo "" - elif [ `echo ${domain} | grep -c '\.'` -eq 0 ]; then - echo "" - echo "You cannot supply a local hostname (i.e. the hostname must contain a . character)" - echo "" - else - while : - do - echo "" - echo "You entered: ${domain}" - echo "Example header: From: user@${domain}" - echo "" - read -p"Is this what you wanted? [y/N] " yesno - if [ -z $yesno ]; then - yesno="N" - break - elif [ "$yesno" = "y" -o "$yesno" = "Y" -o "$yesno" = "n" -o "$yesno" = "N" ]; then - break - else - echo "Please enter Y or N." - echo "" - fi - done - echo "" - if [ "$yesno" = "y" -o "$yesno" = "Y" ]; then - echo "\"${domain}\" it is." - break - fi - fi -done - -cat conf.h.dist | sed -e '/\/\* #define.*DOMAIN/c\' -e"#define DOMAIN \"${domain}\"" > conf.h -touch ${WRKDIR}/.install_inews -echo "" >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message