1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-24 04:33:24 +00:00

Receives/sends news to/from localhost via NNTP.

Submitted by:	Noritaka Ishizumi <graphite@taurus.bekkoame.or.jp>
This commit is contained in:
Satoshi Asami 1996-03-31 23:19:18 +00:00
parent 1c6d44197b
commit eeeb6d42c6
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=2922
8 changed files with 293 additions and 0 deletions

29
news/suck/Makefile Normal file
View File

@ -0,0 +1,29 @@
# New ports collection makefile for: suck
# Version required: 2.6.1
# Date created: 30 Mar 1996
# Whom: graphite@taurus.bekkoame.or.jp
#
# $Id$
#
DISTNAME= suck-2.6.1
CATEGORIES+= news
MASTER_SITES= ftp://sunsite.unc.edu/pub/Linux/system/Mail/news/ \
ftp://tsx-11.mit.edu/pub/linux/sources/sbin/
MAINTAINER= graphite@taurus.bekkoame.or.jp
USE_GMAKE= yes
post-install:
install -c -o bin -g bin -m 755 ${WRKSRC}/sample/get.news.innxmit ${PREFIX}/sbin
install -c -o bin -g bin -m 755 ${WRKSRC}/sample/get.news.rnews ${PREFIX}/sbin
install -c -o bin -g bin -m 755 ${WRKSRC}/sample/put.news ${PREFIX}/bin
install -c -o bin -g bin -m 640 ${WRKSRC}/sample/*.sample ${PREFIX}/etc
.if !defined(NOMANCOMPRESS)
gzip -9nf ${PREFIX}/man/man1/suck.1
gzip -9nf ${PREFIX}/man/man1/rpost.1
gzip -9nf ${PREFIX}/man/man1/testhost.1
.endif
.include <bsd.port.mk>

1
news/suck/distinfo Normal file
View File

@ -0,0 +1 @@
MD5 (suck-2.6.1.tar.gz) = c4d1c70fdcc04de4cff2316ec0f010a3

80
news/suck/files/patch-aa Normal file
View File

@ -0,0 +1,80 @@
--- Makefile.orig Mon Mar 11 15:11:45 1996
+++ Makefile Sat Mar 30 01:02:42 1996
@@ -5,15 +5,15 @@
CC=gcc
#stuff related to the executables (suck rpost testhost)
-INSTALLDIR = /home/boby/doNews # location for the executables
-INSTALL_OWNER=boby # user of the installed files
-INSTALL_GROUP=users # group for the installed files
+INSTALLDIR = ${PREFIX}/bin # location for the executables
+INSTALL_OWNER=bin # user of the installed files
+INSTALL_GROUP=bin # group for the installed files
INSTALL_MODE=755 # mode for the installed files
#stuff related to the man pages
-MANDIR=/usr/man/man1 # location for the man pages
-MAN_OWNER=root # owner of the man pages
-MAN_GROUP=root # group for the man pages
+MANDIR=${PREFIX}/man/man1 # location for the man pages
+MAN_OWNER=bin # owner of the man pages
+MAN_GROUP=bin # group for the man pages
MAN_MODE=644 # mode for the man pages
#XXGDB=1 # uncomment this to get it ready for use by xxgdb or gdb
@@ -55,7 +55,7 @@
LINK = $(CC)
LIBS = -lm $(DBLIB)
OPTS = $(CFLAGS) $(GCC_FLAGS) $(DVERSION) $(DBOPTION)
-INSTALL = install
+INSTALL = install -c
MAN = ./man
SAMPLE = ./sample
@@ -92,13 +92,13 @@
installbin: $(TARGETS)
mkdir -p $(INSTALLDIR)
- $(INSTALL) -o $(INSTALL_OWNER) -g $(INSTALL_GROUP) -m $(INSTALL_MODE) $(TARGETS) $(INSTALLDIR)
+ $(INSTALL) -s -o $(INSTALL_OWNER) -g $(INSTALL_GROUP) -m $(INSTALL_MODE) $(TARGETS) $(INSTALLDIR)
installman: $(MANPGS)
- $(INSTALL) -o $(MAN_OWNER) -g $(MAN_GROUP) -m $(MAN_MODE) $(MANPGS) $(MANDIR)
installall: install lpost
- $(INSTALL) -o $(INSTALL_OWNER) -g $(INSTALL_GROUP) -m $(INSTALL_MODE) $(LPOST_TARGET) $(INSTALLDIR)
+ $(INSTALL) -s -o $(INSTALL_OWNER) -g $(INSTALL_GROUP) -m $(INSTALL_MODE) $(LPOST_TARGET) $(INSTALLDIR)
- $(INSTALL) -o $(MAN_OWNER) -g $(MAN_GROUP) -m $(MAN_MODE) $(LPOST_MANPGS) $(MANDIR)
clean:
--- config.h.orig Wed Mar 6 14:46:13 1996
+++ config.h Sat Mar 30 01:06:55 1996
@@ -12,6 +12,10 @@
/* #define DEBUG2 */
/* #define DEBUG3 */
+/* BSD Option */
+/* If system has no sys/param.h, comment this out */
+#define _HAVE_PARAM_H
+
/* TIMER Option */
/* To see the approximate BPS while downloading msgs, uncomment this */
/* If you don't like it, or want a tiny speed increase, comment this out */
@@ -61,7 +65,7 @@
#define CHECK_HISTORY
/* don't comment this out */
-#define HISTORY_FILE "/usr/lib/news/history"
+#define HISTORY_FILE "/usr/local/news/lib/history"
/* If your system doesn't like the lock file stuff in suck.c */
/* comment this out */
@@ -101,10 +105,10 @@
#define RPOST_MAXARGS 128
/* RNEWS program called by lpost */
-#define RNEWS "/usr/lib/news/rnews"
+#define RNEWS "/usr/local/bin/rnews"
/* character used as a comment in sucknewsrc */
#define SUCKNEWSRC_COMMENT_CHAR '#'

125
news/suck/files/patch-ab Normal file
View File

@ -0,0 +1,125 @@
--- suck.c.orig Wed Mar 6 14:58:34 1996
+++ suck.c Sat Mar 30 01:10:57 1996
@@ -11,6 +11,10 @@
#include "suck.h"
#include "suckutils.h"
+#ifdef _HAVE_PARAM_H
+#include <sys/param.h>
+#endif
+
#ifdef KILLFILE
#include "killfile.h"
#endif
@@ -501,7 +505,9 @@
}
#endif
}
- fclose(ifp);
+ if( ifp != NULL ){
+ fclose(ifp);
+ }
}
#ifdef KILLFILE
free_killfile(killp);
@@ -768,7 +774,11 @@
}
if(retval == RETVAL_OK) {
/* first put #! rnews size */
+#if (defined(BSD) && (BSD >= 199306))
+ fprintf(fptr, "#! rnews %qd\n", sbuf.st_size);
+#else
fprintf(fptr, "#! rnews %ld\n", sbuf.st_size);
+#endif
/* use fread/fwrite in case lines are longer than MAXLINLEN */
while((i = fread(buf, 1, MAXLINLEN, fpin)) > 0) {
--- suckutils.c.orig Wed Mar 6 14:48:18 1996
+++ suckutils.c Sat Mar 30 01:12:01 1996
@@ -13,6 +13,10 @@
#include "both.h"
#include "suckutils.h"
+#ifdef _HAVE_PARAM_H
+#include <sys/param.h>
+#endif
+
/*------------------------------------------------------------------------*/
/* check if directory exists, if not, try to create it. */
/* return TRUE if made/exists and can write to it */
@@ -148,7 +152,11 @@
lockfile = full_path(FP_GET, FP_TMPDIR, N_LOCKFILE);
if((f_lock = fopen(lockfile, "r")) != NULL) {
/* okay, let's try and see if this sucker is truly alive */
+# if (defined(BSD) && (BSD >= 199306))
+ fscanf(f_lock, "%ld", &pid);
+# else
fscanf(f_lock, "%d", &pid);
+# endif
fclose(f_lock);
if(pid <= 0) {
error_log(ERRLOG_REPORT, "Lock File %s , Invalid PID, aborting.\n", lockfile);
@@ -160,21 +168,37 @@
else if(kill(pid, 0) == -1 && errno == ESRCH) {
/* no pid found */
if(unlink(lockfile) == 0) {
+# if (defined(BSD) && (BSD >= 199306))
+ error_log(ERRLOG_REPORT, "Lock File %s , stale PID %ld removed.\n", lockfile, pid);
+# else
error_log(ERRLOG_REPORT, "Lock File %s , stale PID %d removed.\n", lockfile, pid);
+# endif
}
else {
+# if (defined(BSD) && (BSD >= 199306))
+ error_log(ERRLOG_REPORT, "Unable to remove Lock File %s , stale PID %d, Aborting.\n", lockfile, pid);
+# else
error_log(ERRLOG_REPORT, "Unable to remove Lock File %s , stale PID %d, Aborting.\n", lockfile, pid);
+# endif
retval = RETVAL_ERROR;
}
}
else {
+# if (defined(BSD) && (BSD >= 199306))
+ error_log(ERRLOG_REPORT, "Lock File %s , PID %ld exists, aborting.\n", lockfile, pid);
+# else
error_log(ERRLOG_REPORT, "Lock File %s , PID %d exists, aborting.\n", lockfile, pid);
+# endif
retval = RETVAL_ERROR;
}
}
if(retval == RETVAL_OK) {
if((f_lock = fopen(lockfile, "w")) != NULL) {
+# if (defined(BSD) && (BSD >= 199306))
+ fprintf(f_lock, "%ld", getpid());
+# else
fprintf(f_lock, "%d", getpid());
+# endif
fclose(f_lock);
}
else {
--- both.c.orig Wed Mar 6 14:48:28 1996
+++ both.c Sat Mar 30 01:18:19 1996
@@ -12,6 +12,10 @@
#include "config.h"
#include "both.h"
+#ifdef _HAVE_PARAM_H
+#include <sys/param.h>
+#endif
+
#ifdef TIMEOUT
#include <sys/time.h>
#include <sys/types.h>
@@ -238,7 +242,12 @@
if(i < 1) {
if(i == 0) {
/* in case recv has no data */
+#if (defined(BSD) && (BSD >= 199306))
+ /* I don't know, is this appropriate conversion */
+ errno = ENOTCONN;
+#else
errno = ENODATA;
+#endif
}
MyPerror("Socket error");
ret = -1;

40
news/suck/files/patch-ac Normal file
View File

@ -0,0 +1,40 @@
--- sample/get.news.innxmit.orig Thu Feb 15 15:05:38 1996
+++ sample/get.news.innxmit Thu Mar 28 21:03:59 1996
@@ -7,13 +7,13 @@
REMOTE_HOST=news.pixi.com
LOCAL_HOST=localhost
-SPOOLDIR=/usr/spool/news # base directory for articles to be rposted
-NEWSDIR=/usr/lib/news # base directory for news binaries
-BINDIR=/home/boby/doNews # base directory for suck rpost and scripts
+SPOOLDIR=/var/spool/news # base directory for articles to be rposted
+NEWSDIR=/usr/local/news # base directory for news binaries
+BINDIR=/usr/local/bin # base directory for suck rpost and scripts
-TMPDIR=${BINDIR} # location for suck.* files
-DATADIR=${BINDIR} # location of sucknewsrc and killfile
-MSGDIR=${BINDIR}/Msgs # where to put MultiFile messages when getting them
+TMPDIR=/usr/local/etc # location for suck.* files
+DATADIR=/usr/local/etc # location of sucknewsrc and killfile
+MSGDIR=${TMPDIR}/Msgs # where to put MultiFile messages when getting them
BATCHFILE=${TMPDIR}/batch # Name of batchfile to build for rnews or innxmit
SITE=pixi # name of site
--- sample/get.news.rnews.orig Thu Feb 15 15:06:17 1996
+++ sample/get.news.rnews Thu Mar 28 21:03:47 1996
@@ -10,11 +10,11 @@
SPOOLDIR=/usr/spool/news # base directory for articles to be rposted
NEWSDIR=/usr/lib/news # base directory for news binaries
-BINDIR=/home/boby/doNews # base directory for suck rpost and scripts
+BINDIR=/usr/local/bin # base directory for suck rpost and scripts
-TMPDIR=${BINDIR} # location for suck.* files
-DATADIR=${BINDIR} # location of sucknewsrc and killfile
-MSGDIR=${BINDIR}/Msgs # where to put MultiFile messages when getting them
+TMPDIR=/usr/local/etc # location for suck.* files
+DATADIR=/usr/local/etc # location of sucknewsrc and killfile
+MSGDIR=${TMPDIR}/Msgs # where to put MultiFile messages when getting them
BATCHFILE=${TMPDIR}/batch # Name of batchfile to build for rnews or innxmit
OUTGOING=${SPOOLDIR}/out.going/pixi # location of the list of articles to upload

1
news/suck/pkg-comment Normal file
View File

@ -0,0 +1 @@
Receives/sends news to/from localhost via NNTP.

5
news/suck/pkg-descr Normal file
View File

@ -0,0 +1,5 @@
suck feeds news to local INN or CNEWS server without the remote NNTP feeding.
This is useful, if you get news from NNTP server with dialup connection.
---
Noritaka Ishizumi graphite@taurus.bekkoame.or.jp

12
news/suck/pkg-plist Normal file
View File

@ -0,0 +1,12 @@
bin/suck
bin/rpost
bin/testhost
bin/put.news
sbin/get.news.innxmit
sbin/get.news.rnews
etc/suckkillfile.sample
etc/sucknewsrc.sample
etc/suckothermsgs.sample
man/man1/suck.1.gz
man/man1/rpost.1.gz
man/man1/testhost.1.gz