pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

leafnode: Updated to version 1.11.11



Module Name:	pkgsrc-wip
Committed By:	Michael Baeuerle <michael.baeuerle%stz-e.de@localhost>
Pushed By:	micha
Date:		Fri Aug 24 17:38:27 2018 +0200
Changeset:	5880f1b1b8a5620e64f9f324a7a0792a63d71c45

Added Files:
	leafnode/DEINSTALL
	leafnode/DESCR
	leafnode/INSTALL
	leafnode/MESSAGE
	leafnode/Makefile
	leafnode/PLIST
	leafnode/distinfo
	leafnode/patches/patch-Makefile.in
	leafnode/patches/patch-checkpeerlocal.c

Log Message:
leafnode: Updated to version 1.11.11

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=5880f1b1b8a5620e64f9f324a7a0792a63d71c45

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 leafnode/DEINSTALL                      | 28 ++++++++++++
 leafnode/DESCR                          |  8 ++++
 leafnode/INSTALL                        | 47 ++++++++++++++++++++
 leafnode/MESSAGE                        | 20 +++++++++
 leafnode/Makefile                       | 79 +++++++++++++++++++++++++++++++++
 leafnode/PLIST                          | 20 +++++++++
 leafnode/distinfo                       |  8 ++++
 leafnode/patches/patch-Makefile.in      | 71 +++++++++++++++++++++++++++++
 leafnode/patches/patch-checkpeerlocal.c | 22 +++++++++
 9 files changed, 303 insertions(+)

diffs:
diff --git a/leafnode/DEINSTALL b/leafnode/DEINSTALL
new file mode 100644
index 0000000000..d9ae2f408f
--- /dev/null
+++ b/leafnode/DEINSTALL
@@ -0,0 +1,28 @@
+# $NetBSD: DEINSTALL,v 1.4 2007/10/09 19:19:14 martti Exp $
+
+LEAFNODE_CONFDIR=@LEAFNODE_CONFDIR@
+LEAFNODE_SPOOL=@LEAFNODE_SPOOL@
+LEAFNODE_LOCKDIR=@LEAFNODE_LOCKDIR@
+LEAFNODE_HOME=@LEAFNODE_HOME@
+
+case "${STAGE}" in
+        POST-DEINSTALL) cat <<EOF
+
+==========================================================================
+
+Note that the leafnode spool, lock and configuration directories
+
+	${LEAFNODE_SPOOL}
+	${LEAFNODE_LOCKDIR}
+	${LEAFNODE_HOME}
+    and ${LEAFNODE_CONFDIR}
+
+are NOT deleted during the package deinstallation. Please remove these
+directories and all their contents manually if they are no longer needed.
+Also, don't forgot to remove any cron jobs associated with leafnode.
+
+==========================================================================
+
+EOF
+        ;;
+esac
diff --git a/leafnode/DESCR b/leafnode/DESCR
new file mode 100644
index 0000000000..33cfaf8aff
--- /dev/null
+++ b/leafnode/DESCR
@@ -0,0 +1,8 @@
+Leafnode is a USENET software package designed for small sites, with a
+few tens of readers and only a slow link to the net.
+
+Only groups that someone has been reading in the past week are fetched
+from the upstream NNTP server.  When someone stops reading a group,
+fetchnews will stop reading that group a week later (this is the default
+which can be configured), and when someone starts reading a group, fetchnews
+will grab all the articles it can in that group the next time it runs.
diff --git a/leafnode/INSTALL b/leafnode/INSTALL
new file mode 100644
index 0000000000..983fd781fd
--- /dev/null
+++ b/leafnode/INSTALL
@@ -0,0 +1,47 @@
+# $NetBSD: INSTALL,v 1.3 2004/01/11 16:45:51 cjep Exp $
+
+LEAFNODE_CONFDIR=@LEAFNODE_CONFDIR@
+LEAFNODE_SPOOL=@LEAFNODE_SPOOL@
+LEAFNODE_LOCKDIR=@LEAFNODE_LOCKDIR@
+LEAFNODE_HOME=@LEAFNODE_HOME@
+
+if [ "${STAGE}" = "POST-INSTALL" ]; then
+
+	mkdir -p ${LEAFNODE_CONFDIR}
+	if [ ! -f ${LEAFNODE_CONFDIR}/config ]; then
+		cp ${PREFIX}/share/examples/leafnode/config.example \
+		${LEAFNODE_CONFDIR}/config
+		chmod u+w ${LEAFNODE_CONFDIR}/config
+	fi
+
+	echo "Creating leafnode spool directories..."
+
+	SPOOL_DIRS="leaf.node failed.postings interesting.groups out.going message.id"
+
+	mkdir -p ${LEAFNODE_SPOOL}
+	chown news:news ${LEAFNODE_SPOOL}
+	chmod 2775	${LEAFNODE_SPOOL}
+
+	for D in $SPOOL_DIRS; do
+		mkdir -p ${LEAFNODE_SPOOL}/$D;
+		chown news:news ${LEAFNODE_SPOOL}/$D
+		chmod 2775	${LEAFNODE_SPOOL}/$D
+	done
+
+	mkdir -p ${LEAFNODE_LOCKDIR}
+	chown news:news ${LEAFNODE_LOCKDIR}
+	chmod 2775 ${LEAFNODE_LOCKDIR}
+
+	# Make directories (a la quickmkdir)
+	for a in 0 1 2 3 4 5 6 7 8 9; do
+		for b in 0 1 2 3 4 5 6 7 8 9; do
+			for c in 0 1 2 3 4 5 6 7 8 9; do
+				mkdir -m 2775 -p ${LEAFNODE_SPOOL}/message.id/$a$b$c
+				chown news:news ${LEAFNODE_SPOOL}/message.id/$a$b$c
+			done
+		done
+	done
+
+	mkdir -p ${LEAFNODE_HOME}
+	chown news:news ${LEAFNODE_HOME}
+fi
diff --git a/leafnode/MESSAGE b/leafnode/MESSAGE
new file mode 100644
index 0000000000..5ec4a34fcb
--- /dev/null
+++ b/leafnode/MESSAGE
@@ -0,0 +1,20 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.3 2003/05/06 17:42:22 jmmv Exp $
+
+Edit ${LEAFNODE_CONFDIR}/config and make the necessary local
+changes.
+
+Leafnode needs to be run from inetd. An example configuration for
+/etc/inetd.conf is as follows:
+nntp stream tcp  nowait news ${PREFIX}/sbin/leafnode leafnode
+nntp stream tcp6 nowait news ${PREFIX}/sbin/leafnode leafnode
+
+Edit the news user's crontab to run an expiry job. For example, add:
+0 4 * * *	${PREFIX}/sbin/texpire
+
+As root or news, run "fetchnews". This may take some time. Then connect
+to the leafnode server with an NNTP client. Select the groups you want
+to read in the future by reading the "default" article in them.
+Run "fetchnews" again. This run will pick up all the groups you want to
+read. You may wish to automate the running of "fetchnews".
+===========================================================================
diff --git a/leafnode/Makefile b/leafnode/Makefile
new file mode 100644
index 0000000000..0ecde4e14e
--- /dev/null
+++ b/leafnode/Makefile
@@ -0,0 +1,79 @@
+# $NetBSD$
+
+DISTNAME=		leafnode-1.11.11
+CATEGORIES=		news
+MASTER_SITES=		${MASTER_SITE_SOURCEFORGE:=leafnode/}
+EXTRACT_SUFX=		.tar.bz2
+
+MAINTAINER=		pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=		http://leafnode.sourceforge.net/
+COMMENT=		NNTP server for small (dialup) sites
+LICENSE=		mit AND gnu-gpl-v2 AND gnu-lgpl-v2.1
+
+CONFLICTS+=		cyrus-imapd<2.2.10nb2
+
+WRKSRC=			${WRKDIR}/${DISTNAME}
+
+INSTALLATION_DIRS+=	share/examples/leafnode
+INSTALLATION_DIRS+=	share/doc/leafnode
+
+LEAFNODE_SPOOL?=	/var/spool/leafnode
+LEAFNODE_LOCKDIR?=	/var/spool/lock/leafnode
+LEAFNODE_CONFDIR?=	${PKG_SYSCONFDIR}/leafnode
+
+# Default data dir, login and group are the same as used by inn
+#
+BUILD_DEFS+=		LEAFNODE_DATA_DIR INN_DATA_DIR
+PKG_GROUPS=		${LEAFNODE_GROUP}
+PKG_USERS=		${LEAFNODE_USER}:${LEAFNODE_GROUP}
+LEAFNODE_HOME?=		${INN_DATA_DIR}
+
+PKG_GECOS.${LEAFNODE_USER}=	Internet News
+PKG_HOME.${LEAFNODE_USER}=	${LEAFNODE_DATA_DIR}
+PKG_SHELL.${LEAFNODE_USER}=	${SH}
+
+PKG_GROUPS_VARS+=	LEAFNODE_GROUP
+PKG_USERS_VARS+=	LEAFNODE_USER
+
+FILES_SUBST+=		LEAFNODE_SPOOL=${LEAFNODE_SPOOL:Q}
+FILES_SUBST+=		LEAFNODE_CONFDIR=${LEAFNODE_CONFDIR:Q}
+FILES_SUBST+=		LEAFNODE_LOCKDIR=${LEAFNODE_LOCKDIR:Q}
+FILES_SUBST+=		LEAFNODE_HOME=${LEAFNODE_HOME:Q}
+MESSAGE_SUBST+=		LEAFNODE_CONFDIR=${LEAFNODE_CONFDIR}
+
+USE_FEATURES=		snprintf vsnprintf
+
+GNU_CONFIGURE=		yes
+CONFIGURE_ARGS+=	--with-spooldir=${LEAFNODE_SPOOL:Q}
+CONFIGURE_ARGS+=	--with-lockfile=${LEAFNODE_LOCKDIR}/fetchnews.lck
+CONFIGURE_ARGS+=	--sysconfdir=${LEAFNODE_CONFDIR:Q}
+CONFIGURE_ARGS+=	--with-user=${LEAFNODE_USER:Q}
+CONFIGURE_ARGS+=	--with-group=${LEAFNODE_GROUP:Q}
+USE_TOOLS+=		gmake
+
+PKG_OPTIONS_VAR=	PKG_OPTIONS.leafnode
+PKG_SUPPORTED_OPTIONS=	inet6
+PKG_SUGGESTED_OPTIONS=	inet6
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Minet6)
+CONFIGURE_ARGS+=	--with-ipv6
+.else
+CONFIGURE_ARGS+=	--without-ipv6
+.endif
+
+TEST_TARGET=		check
+
+post-install:
+#	${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/examples/leafnode
+	${INSTALL_DATA} ${WRKSRC}/config.example 			\
+				${DESTDIR}${PREFIX}/share/examples/leafnode
+#	${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/doc/leafnode
+	${INSTALL_DATA} ${WRKSRC}/README ${WRKSRC}/README-FQDN 		\
+			${WRKSRC}/README-MAINTAINER			\
+			${WRKSRC}/README-daemontools			\
+				${DESTDIR}${PREFIX}/share/doc/leafnode
+
+.include "../../devel/pcre/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/leafnode/PLIST b/leafnode/PLIST
new file mode 100644
index 0000000000..7adf5ee041
--- /dev/null
+++ b/leafnode/PLIST
@@ -0,0 +1,20 @@
+@comment $NetBSD: PLIST,v 1.6 2014/09/12 21:58:44 shattered Exp $
+bin/leafnode-version
+bin/newsq
+man/man1/leafnode-version.1
+man/man1/newsq.1
+man/man8/applyfilter.8
+man/man8/checkgroups.8
+man/man8/fetchnews.8
+man/man8/leafnode.8
+man/man8/texpire.8
+sbin/applyfilter
+sbin/checkgroups
+sbin/fetchnews
+sbin/leafnode
+sbin/texpire
+share/doc/leafnode/README
+share/doc/leafnode/README-FQDN
+share/doc/leafnode/README-MAINTAINER
+share/doc/leafnode/README-daemontools
+share/examples/leafnode/config.example
diff --git a/leafnode/distinfo b/leafnode/distinfo
new file mode 100644
index 0000000000..fc599b5f5b
--- /dev/null
+++ b/leafnode/distinfo
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.19 2015/11/02 23:49:47 agc Exp $
+
+SHA1 (leafnode-1.11.11.tar.bz2) = 8e84358748a26ff147ea28120e8b42f5f6deb936
+RMD160 (leafnode-1.11.11.tar.bz2) = 78078216a49356250ff843044431a66a0b722ab7
+SHA512 (leafnode-1.11.11.tar.bz2) = 3a476a32f2e59ed0812379efc2ad1964347094417e7fc01d93f84d0cfaed78a66b2f2f40d1ac36f8a0f8844523ab57b9a605d4bd73ea309248c0562e7c26248a
+Size (leafnode-1.11.11.tar.bz2) = 500482 bytes
+SHA1 (patch-Makefile.in) = 5ca379bc986a971c27c3287559c7294f7a4e92de
+SHA1 (patch-checkpeerlocal.c) = a2754f43c6153ce2f781880ed5bac3b90e72954c
diff --git a/leafnode/patches/patch-Makefile.in b/leafnode/patches/patch-Makefile.in
new file mode 100644
index 0000000000..26d24abfce
--- /dev/null
+++ b/leafnode/patches/patch-Makefile.in
@@ -0,0 +1,71 @@
+$NetBSD$
+
+Config data is installed with pkgsrc script.
+Spool directory is created with pkgsrc script.
+
+--- Makefile.in.orig	2015-08-24 22:26:08.000000000 +0000
++++ Makefile.in
+@@ -954,20 +954,20 @@ uninstall-man8:
+ 	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ 	dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir)
+ install-sysconfDATA: $(sysconf_DATA)
+-	@$(NORMAL_INSTALL)
+-	@list='$(sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \
+-	if test -n "$$list"; then \
+-	  echo " $(MKDIR_P) '$(DESTDIR)$(sysconfdir)'"; \
+-	  $(MKDIR_P) "$(DESTDIR)$(sysconfdir)" || exit 1; \
+-	fi; \
+-	for p in $$list; do \
+-	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+-	  echo "$$d$$p"; \
+-	done | $(am__base_list) | \
+-	while read files; do \
+-	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sysconfdir)'"; \
+-	  $(INSTALL_DATA) $$files "$(DESTDIR)$(sysconfdir)" || exit $$?; \
+-	done
++#	@$(NORMAL_INSTALL)
++#	@list='$(sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \
++#	if test -n "$$list"; then \
++#	  echo " $(MKDIR_P) '$(DESTDIR)$(sysconfdir)'"; \
++#	  $(MKDIR_P) "$(DESTDIR)$(sysconfdir)" || exit 1; \
++#	fi; \
++#	for p in $$list; do \
++#	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
++#	  echo "$$d$$p"; \
++#	done | $(am__base_list) | \
++#	while read files; do \
++#	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sysconfdir)'"; \
++#	  $(INSTALL_DATA) $$files "$(DESTDIR)$(sysconfdir)" || exit $$?; \
++#	done
+ 
+ uninstall-sysconfDATA:
+ 	@$(NORMAL_UNINSTALL)
+@@ -1621,17 +1621,17 @@ rpm:	leafnode.spec
+ 	rpmbuild -ba leafnode.spec || rpm -ba leafnode.spec
+ 
+ install-data-hook: amiroot
+-	set -e ; for i in "" /leaf.node /failed.postings /interesting.groups \
+-		/out.going /message.id /temp.files ; do \
+-        mkdir -p $(DESTDIR)$(SPOOLDIR)$$i ; \
+-	if ./amiroot ; then \
+-	 chown @NEWS_USER@:@NEWS_GROUP@ $(DESTDIR)$(SPOOLDIR)/$$i ; \
+-	 chmod 2775      $(DESTDIR)$(SPOOLDIR)/$$i ; fi ; \
+-	done
+-	d="`dirname $(DESTDIR)@LOCKFILE@`" ; mkdir -p "$${d}" && \
+-	if ./amiroot ; then \
+-          chown @NEWS_USER@:@NEWS_GROUP@ "$${d}" ; \
+-	  chmod 2775 "$${d}" ; fi
++#	set -e ; for i in "" /leaf.node /failed.postings /interesting.groups \
++#		/out.going /message.id /temp.files ; do \
++#        mkdir -p $(DESTDIR)$(SPOOLDIR)$$i ; \
++#	if ./amiroot ; then \
++#	 chown @NEWS_USER@:@NEWS_GROUP@ $(DESTDIR)$(SPOOLDIR)/$$i ; \
++#	 chmod 2775      $(DESTDIR)$(SPOOLDIR)/$$i ; fi ; \
++#	done
++#	d="`dirname $(DESTDIR)@LOCKFILE@`" ; mkdir -p "$${d}" && \
++#	if ./amiroot ; then \
++#          chown @NEWS_USER@:@NEWS_GROUP@ "$${d}" ; \
++#	  chmod 2775 "$${d}" ; fi
+ 
+ uninstall-hook:
+ 	rm -f $(DESTDIR)@LOCKFILE@
diff --git a/leafnode/patches/patch-checkpeerlocal.c b/leafnode/patches/patch-checkpeerlocal.c
new file mode 100644
index 0000000000..31e4fa636d
--- /dev/null
+++ b/leafnode/patches/patch-checkpeerlocal.c
@@ -0,0 +1,22 @@
+$NetBSD$
+
+IPv6 guards added (build fails without IPv6 otherwise).
+
+--- checkpeerlocal.c.orig	2018-08-24 15:30:42.000000000 +0000
++++ checkpeerlocal.c
+@@ -208,6 +208,7 @@ int checkpeerlocal(int sock)
+     }
+ #endif
+ 
++#ifdef HAVE_IPV6
+     if (IN6_IS_ADDR_V4MAPPED(&addr.sin6.sin6_addr)) {
+ 	    /* map to IPv4 */
+ 	    struct sockaddr_in si;
+@@ -216,6 +217,7 @@ int checkpeerlocal(int sock)
+ 	    memcpy(&addr.sin, &si, sizeof(struct sockaddr_in));
+ 	    D(pat(&addr.sa));
+     }
++#endif
+ 
+     if (getifaddrs(&ifap) != 0) {
+ 	D(printf("getifaddrs failed: %s\n", strerror(errno)));


Home | Main Index | Thread Index | Old Index