summaryrefslogtreecommitdiff
path: root/mail/qpopper
diff options
context:
space:
mode:
authortaca <taca>2004-05-06 13:46:22 +0000
committertaca <taca>2004-05-06 13:46:22 +0000
commitaf1c24d5993c78e2105feadf1407468f8bc2b835 (patch)
tree4101babae5f3a3e510bf59d3c4436a6bd665dae8 /mail/qpopper
parent9169a9b84ab4daf8616c4e758ce90065590cade3 (diff)
downloadpkgsrc-af1c24d5993c78e2105feadf1407468f8bc2b835.tar.gz
Install stand-alone qpopper to ${PREFIX}/sbin.
Bump PKGREVISION. TODO: support libwrap(tcpwrappers) in stand-alone qpopper.
Diffstat (limited to 'mail/qpopper')
-rw-r--r--mail/qpopper/MESSAGE8
-rw-r--r--mail/qpopper/Makefile7
-rw-r--r--mail/qpopper/PLIST3
-rw-r--r--mail/qpopper/distinfo6
-rw-r--r--mail/qpopper/files/qpopper.sh17
-rw-r--r--mail/qpopper/patches/patch-am95
-rw-r--r--mail/qpopper/patches/patch-ao22
-rw-r--r--mail/qpopper/patches/patch-ap38
8 files changed, 182 insertions, 14 deletions
diff --git a/mail/qpopper/MESSAGE b/mail/qpopper/MESSAGE
index 9711dcc8d70..77f9c7b7d00 100644
--- a/mail/qpopper/MESSAGE
+++ b/mail/qpopper/MESSAGE
@@ -1,10 +1,12 @@
===========================================================================
-$NetBSD: MESSAGE,v 1.2 2003/03/13 07:21:42 itojun Exp $
+$NetBSD: MESSAGE,v 1.3 2004/05/06 13:46:22 taca Exp $
In order to enable POP service, you should add the following lines
to your /etc/inetd.conf:
- pop3 stream tcp nowait root ${LOCALBASE}/libexec/qpopper qpopper -s
- pop3 stream tcp6 nowait root ${LOCALBASE}/libexec/qpopper qpopper -s
+ pop3 stream tcp nowait root ${PREFIX}/libexec/qpopper qpopper -s
+ pop3 stream tcp6 nowait root ${PREFIX}/libexec/qpopper qpopper -s
+
+Or, you can start stand alone qpopper using ${RCD_SCRIPTS_DIR}/${RCD_SCRIPTS}.
===========================================================================
diff --git a/mail/qpopper/Makefile b/mail/qpopper/Makefile
index 94b313b3d4b..ca426b4a68a 100644
--- a/mail/qpopper/Makefile
+++ b/mail/qpopper/Makefile
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.40 2004/04/18 05:15:26 snj Exp $
+# $NetBSD: Makefile,v 1.41 2004/05/06 13:46:23 taca Exp $
#
DISTNAME= qpopper${VERSION}
PKGNAME= qpopper-${VERSION}
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= mail
MASTER_SITES= ftp://ftp.qualcomm.com/eudora/servers/unix/popper/
@@ -20,6 +20,9 @@ COMMENT= Qualcomm's POP server for Eudora
USE_BUILDLINK3= yes
USE_PKGINSTALL= yes
CONFIGURE_ARGS+= --with-openssl=${SSLBASE}
+RCD_SCRIPTS= qpopper
+MESSAGE_SUBST+= RCD_SCRIPTS=${RCD_SCRIPTS} \
+ RCD_SCRIPTS_DIR=${RCD_SCRIPTS_DIR}
PKG_USERS?= ${QPOPPER_USER}
MAKE_ENV+= BINGRP=${BINGRP}
diff --git a/mail/qpopper/PLIST b/mail/qpopper/PLIST
index bfbff3475bb..d029d482655 100644
--- a/mail/qpopper/PLIST
+++ b/mail/qpopper/PLIST
@@ -1,7 +1,8 @@
-@comment $NetBSD: PLIST,v 1.1 2001/11/01 01:01:14 zuntum Exp $
+@comment $NetBSD: PLIST,v 1.2 2004/05/06 13:46:23 taca Exp $
libexec/qpopper
man/man8/qpopper.8
man/man8/qpopauth.8
sbin/qpopauth
+sbin/qpopper
share/doc/qpopper.License
share/examples/qpopper.config
diff --git a/mail/qpopper/distinfo b/mail/qpopper/distinfo
index 33fc85e5f70..08163e9b879 100644
--- a/mail/qpopper/distinfo
+++ b/mail/qpopper/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.8 2003/03/13 07:23:25 itojun Exp $
+$NetBSD: distinfo,v 1.9 2004/05/06 13:46:23 taca Exp $
SHA1 (qpopper4.0.5.tar.gz) = 726d40da2210bf4b82541a28971986e6a3d9e1a5
Size (qpopper4.0.5.tar.gz) = 2281284 bytes
@@ -9,5 +9,7 @@ SHA1 (patch-ab) = 67d661adce74d0662cab5b644d2e57bfd1d5e3c7
SHA1 (patch-ae) = 1e06159f56c78e63a7960d4d9ca80535752099b2
SHA1 (patch-ag) = 4b187ab978ead4b751290fe483f6d6a6bf959089
SHA1 (patch-al) = 63fdc28b9c1d292d55464cda13c529ffb2a47b34
-SHA1 (patch-am) = d9e27e4cb3a7b5de0f3ec080466fcd41f8033f3c
+SHA1 (patch-am) = 145c5d5ca8bdf59d5ee9cdaed0f60b2da814d033
SHA1 (patch-an) = 43e7c20b9c3cfd978255748236efbcbaf2f929ce
+SHA1 (patch-ao) = 0edffdd0b548e2fd83d946225e32aeab0a1c99c2
+SHA1 (patch-ap) = 6547b0f7ee5cfb0eb43015e51b4bf3a4ac8d3c0d
diff --git a/mail/qpopper/files/qpopper.sh b/mail/qpopper/files/qpopper.sh
new file mode 100644
index 00000000000..c79eeb92c38
--- /dev/null
+++ b/mail/qpopper/files/qpopper.sh
@@ -0,0 +1,17 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: qpopper.sh,v 1.1 2004/05/06 13:46:23 taca Exp $
+#
+
+# PROVIDE: qpopper
+# REQUIRE: DAEMON LOGIN
+# KEYWORD: shutdown
+
+. /etc/rc.subr
+
+name=qpopper
+command="@PREFIX@/sbin/${name}"
+pidfile="/var/run/${name}.pid"
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/mail/qpopper/patches/patch-am b/mail/qpopper/patches/patch-am
index cbf2fcb24ae..0414c68c0e1 100644
--- a/mail/qpopper/patches/patch-am
+++ b/mail/qpopper/patches/patch-am
@@ -1,8 +1,8 @@
-$NetBSD: patch-am,v 1.2 2002/11/23 17:01:21 taca Exp $
+$NetBSD: patch-am,v 1.3 2004/05/06 13:46:23 taca Exp $
---- popper/Makefile.in.orig Mon Apr 23 07:55:27 2001
-+++ popper/Makefile.in Fri Nov 22 15:35:20 2002
-@@ -87,6 +87,8 @@
+--- popper/Makefile.in.orig Thu Mar 13 11:06:36 2003
++++ popper/Makefile.in
+@@ -90,6 +90,8 @@ VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
installdir = @sbindir@
@@ -11,10 +11,90 @@ $NetBSD: patch-am,v 1.2 2002/11/23 17:01:21 taca Exp $
popper_srcdir = ${top_srcdir}/popper
qd_srcdir = ${top_srcdir}/qd
-@@ -199,17 +201,14 @@
+@@ -108,17 +110,20 @@ password_dir = ${base_dir}/password
+
+
+ OBJS = pop_dele.o pop_dropcopy.o \
+- pop_get_command.o pop_get_subcommand.o pop_init.o \
++ pop_get_command.o pop_get_subcommand.o \
+ pop_last.o pop_list.o pop_log.o pop_lower.o \
+ pop_msg.o pop_parse.o pop_pass.o pop_quit.o \
+ pop_rset.o pop_send.o pop_stat.o pop_updt.o \
+ pop_user.o pop_xtnd.o pop_xmit.o popper.o \
+- pop_bull.o xtnd_xlst.o pop_uidl.o mktemp.o \
++ pop_bull.o xtnd_xlst.o pop_uidl.o \
+ pop_rpop.o pop_apop.o md5.o pop_auth.o pop_pope.o \
+ pop_extend.o scram.o hmac.o base64.o pop_util.o \
+ get_sub_opt.o msg_ptr.o drac.o pop_config.o pop_tls.o \
+ pop_tls_openssl.o pop_tls_sslplus.o sslplus_utils.o \
+- main.o pop_cache.o genpath.o
++ pop_cache.o genpath.o
++
++INETDOBJ = main.o pop_init.o
++STANDOBJ = main-stand.o pop_init-stand.o
+
+ SRCS = pop_dele.c pop_dropcopy.c \
+ pop_get_command.c pop_get_subcommand.c pop_init.c \
+@@ -126,7 +131,7 @@ SRCS = pop_dele.c pop_dropc
+ pop_msg.c pop_parse.c pop_pass.c pop_quit.c \
+ pop_rset.c pop_send.c pop_stat.c pop_updt.c \
+ pop_user.c pop_xtnd.c pop_xmit.c popper.c \
+- pop_bull.c xtnd_xlst.c pop_uidl.c mktemp.c \
++ pop_bull.c xtnd_xlst.c pop_uidl.c \
+ pop_rpop.c pop_apop.c md5.c pop_auth.c pop_pope.c \
+ pop_extend.c scram.c hmac.c base64.c pop_util.c \
+ get_sub_opt.c msg_ptr.c drac.c pop_config.c pop_tls.c \
+@@ -174,7 +179,7 @@ SSL_INC = @SSL_DIR_INC@
+
+ .SUFFIXES: .c .o
+
+-all: popper ${pop_auth} mangler_library common_library ${poppassd}
++all: mangler_library common_library popper popper-standalone ${pop_auth} ${poppassd}
+
+ mangler_library:
+ cd ${mmangle_dir} && ${MAKE} all
+@@ -182,13 +187,18 @@ mangler_library:
+ common_library:
+ cd ${common_dir} && ${MAKE} all
+
+-popper: ${OBJS} mangler_library common_library
+- ${CC} ${OBJS} -o popper ${mmangle_dir}/libmangle.a \
++popper: ${INETDOBJ} ${OBJS} mangler_library common_library
++ ${CC} ${INETDOBJ} ${OBJS} -o popper ${mmangle_dir}/libmangle.a \
+ -I${common_srcdir} ${common_dir}/libcommon.a \
+ ${LIBS} ${LDFLAGS}
+
++popper-standalone: ${STANDOBJ} ${OBJS} mangler_library common_library
++ ${CC} ${STANDOBJ} ${OBJS} -o popper-standalone \
++ ${mmangle_dir}/libmangle.a -I${common_srcdir} \
++ ${common_dir}/libcommon.a ${LIBS}
++
+ popauth: ${POPAUTHOBJS}
+- ${CC} -o popauth ${POPAUTHOBJS} ${NETWORK_LIBS} ${DBM_LIBS} \
++ ${CC} -o popauth ${POPAUTHOBJS} ${LIBS} ${NETWORK_LIBS} ${DBM_LIBS} \
+ ${common_dir}/libcommon.a
+
+ poppassd: common_library
+@@ -199,21 +209,32 @@ poppassd: common_library
+ -I${mmangle_srcdir} -I${common_srcdir} ${SSL_INC} \
+ ${CFLAGS} ${DEFS} ${CDEFS} ${OS_DEFS} $< -o $@
+
++main-stand.o: main.c
++ ${CC} -c -I${base_dir} -I${top_srcdir} -I${srcdir} \
++ -I${mmangle_srcdir} -I${common_srcdir} ${SSL_INC} \
++ ${CFLAGS} ${DEFS} ${CDEFS} ${OS_DEFS} -DSTANDALONE \
++ -o $@ main.c
++
++pop_init-stand.o: pop_init.c
++ ${CC} -c -I${base_dir} -I${top_srcdir} -I${srcdir} \
++ -I${mmangle_srcdir} -I${common_srcdir} ${SSL_INC} \
++ ${CFLAGS} ${DEFS} ${CDEFS} ${OS_DEFS} -DSTANDALONE \
++ -o $@ pop_init.c
++
+ ${SRCS}:
${POPAUTHSRCS}:
- install: popper ${pop_auth}
+-install: popper ${pop_auth}
- ${INSTALL} -s -m 0755 -o root popper ${installdir}/popper
- echo "Installed popper as ${installdir}/popper"
- if [ "x${poppassd}" != "x" ]; then \
@@ -24,8 +104,11 @@ $NetBSD: patch-am,v 1.2 2002/11/23 17:01:21 taca Exp $
- ${INSTALL} -s -m 4755 -o ${apop_uid} -g 0 ${pop_auth} \
- ${installdir}/${pop_auth}; \
- echo "Installed popauth as ${installdir}/${pop_auth} " \
++install: popper popper-standalone ${pop_auth}
+ ${INSTALL} -s -m 0755 -o root popper ${libexecdir}/qpopper
+ @echo "Installed popper as ${libexecdir}/qpopper"
++ ${INSTALL} -s -m 0755 -o root popper-standalone ${sbindir}/qpopper
++ @echo "Installed standalone popper as ${sbindir}/qpopper"
+ @if [ "x${pop_auth}" != "x" ]; then \
+ ${INSTALL} -s -m 4755 -o ${apop_uid} -g ${BINGRP} ${pop_auth} \
+ ${sbindir}/q${pop_auth}; \
diff --git a/mail/qpopper/patches/patch-ao b/mail/qpopper/patches/patch-ao
new file mode 100644
index 00000000000..ead7e30c6c8
--- /dev/null
+++ b/mail/qpopper/patches/patch-ao
@@ -0,0 +1,22 @@
+$NetBSD: patch-ao,v 1.1 2004/05/06 13:46:23 taca Exp $
+
+--- common/maillock.c.orig Thu Mar 13 11:06:36 2003
++++ common/maillock.c
+@@ -272,13 +272,13 @@ Qmaillock ( char *drop_name,
+
+ if ( bNo_atomic_open ) {
+ while ( fd == -1 ) {
++ char tempdir[FILENAME_MAX];
+ /*
+ * Create a temporary file and link it to lock file
+ */
+- pTmp = tempnam ( pSpool_dir, "POP" );
+- if ( pTmp != NULL ) {
+- fd = open ( pTmp, O_CREAT | O_EXCL, 0600 );
+- }
++ Qsprintf(tempdir, "%s/POPXXXXXXXXXX", pSpool_dir);
++ fd = mkstemp(tempdir);
++ pTmp = strdup(tempdir);
+ if ( fd == -1 ) {
+ if ( DEBUGGING && bDebugging ) {
+ logit ( fTrace, POP_DEBUG, HERE,
diff --git a/mail/qpopper/patches/patch-ap b/mail/qpopper/patches/patch-ap
new file mode 100644
index 00000000000..db06165533c
--- /dev/null
+++ b/mail/qpopper/patches/patch-ap
@@ -0,0 +1,38 @@
+$NetBSD: patch-ap,v 1.1 2004/05/06 13:46:23 taca Exp $
+
+--- popper/main.c.orig Fri Apr 23 18:39:01 2004
++++ popper/main.c
+@@ -236,6 +236,7 @@ main ( int argc, char *argv[] )
+ fd_set fdset_templ;
+ fd_set fdset_read;
+ int fd_flags = 0;
++ FILE *fp;
+
+
+ if ( argc >= 2 && ( strncmp ( argv[1], "-v", 2 ) == 0 ||
+@@ -636,7 +637,7 @@ main ( int argc, char *argv[] )
+ TRACE ( trace_file, POP_DEBUG, HERE, "listening using socket fd %d",
+ sockfd );
+
+- listen ( sockfd, 5 );
++ listen ( sockfd, SOMAXCONN );
+
+ /*
+ * Set file descriptor to be non-blocking in case there isn't really a
+@@ -761,6 +762,16 @@ main ( int argc, char *argv[] )
+
+ signal ( SIGHUP, VOIDSTAR hupit );
+ signal ( SIGTERM, VOIDSTAR cleanup );
++
++#ifndef PIDFILE
++#define PIDFILE "/var/run/qpopper.pid"
++#endif
++ fp = fopen(PIDFILE, "w");
++ if (fp == NULL) {
++ err_dump ( HERE, "Unable to open %s", PIDFILE);
++ }
++ fprintf(fp, "%d\n", getpid());
++ fclose(fp);
+
+ while ( TRUE )
+ {