diff options
Diffstat (limited to 'mail/qpopper')
-rw-r--r-- | mail/qpopper/Makefile | 94 | ||||
-rw-r--r-- | mail/qpopper/files/extra-patch-password__auth_user.c (renamed from mail/qpopper/files/extra-patch-password::auth_user.c) | 10 | ||||
-rw-r--r-- | mail/qpopper/files/extra-patch-password__poppassd.c (renamed from mail/qpopper/files/extra-patch-password::poppassd.c) | 6 | ||||
-rw-r--r-- | mail/qpopper/files/patch-popper__pop_pass.c (renamed from mail/qpopper/files/patch-popper::pop_pass.c) | 4 | ||||
-rw-r--r-- | mail/qpopper/files/qpopper.in | 20 | ||||
-rw-r--r-- | mail/qpopper/pkg-descr | 2 | ||||
-rw-r--r-- | mail/qpopper/pkg-install | 6 | ||||
-rw-r--r-- | mail/qpopper/pkg-plist | 14 | ||||
-rw-r--r-- | mail/qpopper/pkg-req | 13 | ||||
-rw-r--r-- | mail/qpopper/scripts/pre-install | 16 |
10 files changed, 75 insertions, 110 deletions
diff --git a/mail/qpopper/Makefile b/mail/qpopper/Makefile index 43104e7f5724..43282ed62175 100644 --- a/mail/qpopper/Makefile +++ b/mail/qpopper/Makefile @@ -12,8 +12,8 @@ DISTNAME= ${PORTNAME}${PORTVERSION} MAINTAINER= bc979@lafn.org COMMENT= Berkeley POP 3 server (now maintained by Qualcomm) +USE_GCC= any # -freg-struct-return only in GCC and clang-head USE_AUTOTOOLS= autoconf -USE_OPENSSL= yes CONFIGURE_ENV= LIBS="-lcrypt -lmd -lutil -L${LOCALBASE}/lib" \ OS_DEFS="-DSETPROCTITLE ${OS_DEFS}" CONFIGURE_ARGS= --enable-nonauth-file=${POPUSERS_FILE} \ @@ -21,28 +21,26 @@ CONFIGURE_ARGS= --enable-nonauth-file=${POPUSERS_FILE} \ --enable-keep-temp-drop PLIST_SUB= EPOPPASSD=${EPOPPASSD} \ - POP_USER=${POP_USER} \ - POP_GROUP=${POP_GROUP} \ + USERS=${USERS} \ + GROUPS=${GROUPS} \ POP_MODE_DIR=${POP_MODE_DIR} \ POP_MODE_CONF=${POP_MODE_CONF} \ QPOPAUTH=${QPOPAUTH} -MAN8= qpopper.8 - SUB_FILES= pkg-message # internal configuration -POP_USER= pop -POP_GROUP= daemon +USERS?= pop +GROUPS?= daemon POP_MODE_DIR= 0711 POP_MODE_CONF= 0444 POPUSERS_FILE= ${ETCDIR}/popusers SAMPLE_EXT= .sample -# + PKGDEINSTALL= ${PKGINSTALL} OPTIONS_DEFINE= APOP_ONLY APOP DOCUMENTATION DRAC FULL_POPD_DEBUG PAM \ - POPPASSD QPOPAUTH_SETUID SAMPLE_POPUSERS SHY_ENABLED \ + POPPASSD SAMPLE_POPUSERS SHY_ENABLED \ SSL STANDALONE_MODE U_OPTION APOP_ONLY_DESC= build with APOP authentication only @@ -52,24 +50,21 @@ DRAC_DESC= build with Dynamic Relay Authorization FULL_POPD_DEBUG_DESC= build with more verbose debugging PAM_DESC= build with PAM authentication POPPASSD_DESC= build the poppassd daemon -QPOPAUTH_SETUID_DESC= install qpopauth setuid to pop user SAMPLE_POPUSERS_DESC= build a default reject file SHY_ENABLED_DESC= hide qpopper version in POP3 banner SSL_DESC= build with SSL/TLS support STANDALONE_MODE_DESC= build qpopper to be run without inetd U_OPTION_DESC= include support for user .qpopper-options -OPTIONS_DEFAULT= APOP QPOPAUTH_SETUID SSL U_OPTION +OPTIONS_DEFAULT= APOP SSL U_OPTION -NO_STAGE= yes .include <bsd.port.options.mk> .if empty(PORT_OPTIONS:MAPOP) QPOPAUTH= "@comment " .else CONFIGURE_ARGS+= --enable-apop=${ETCDIR}/pop.auth \ - --with-apopuid=pop -MAN8+= qpopauth.8 + --with-popuid=${USERS} QPOPAUTH= "" # If WITH_APOP_ONLY variable present in the environment, qpopper builds # with APOP authentication only. @@ -81,7 +76,7 @@ OS_DEFS+= -DAPOP_ONLY # Do not install documentation since it is in pdf format and normally # not used unless user wants it. .if empty(PORT_OPTIONS:MDOCUMENTATION) -NOPORTDOCS= yes +OPTIONS_UNSET+= DOCS .endif # If WITH_DRAC variable present in the environment, qpopper builds @@ -106,8 +101,8 @@ CONFIGURE_ARGS+= --with-pam=pop3 # with poppassd support. .if ${PORT_OPTIONS:MPOPPASSD} CONFIGURE_ARGS+= --enable-poppassd -EXTRA_PATCHES+= ${FILESDIR}/extra-patch-password::poppassd.c \ - ${FILESDIR}/extra-patch-password::auth_user.c +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-password__poppassd.c \ + ${FILESDIR}/extra-patch-password__auth_user.c EPOPPASSD= "" .else EPOPPASSD= "@comment " @@ -128,6 +123,7 @@ USE_RC_SUBR= ${PORTNAME} # The default is to build without SSL/TLS support. .if ${PORT_OPTIONS:MSSL} +USE_OPENSSL= yes CONFIGURE_ARGS+= --with-openssl=${OPENSSLBASE} .endif @@ -139,11 +135,11 @@ post-patch: @${REINPLACE_CMD} -e \ 's|\$${sbindir}/sendmail|${LOCALBASE}/sbin/sendmail|g' \ ${WRKSRC}/configure.in -.if defined(WITH_POPPASSD) +.if ${PORT_OPTIONS:MPOPPASSD} @${REINPLACE_CMD} -e 's|/usr/bin/smbpasswd|${LOCALBASE}/bin/smbpasswd|' \ ${WRKSRC}/password/poppassd.c .endif -.if defined(WITHOUT_U_OPTION) +.if empty(PORT_OPTIONS:MU_OPTION) @${REINPLACE_CMD} -E -e 's|(getopt \(.+)u|\1|' \ ${WRKSRC}/popper/main.c .endif @@ -152,49 +148,41 @@ pre-configure: @(cd ${WRKSRC}; ${CHMOD} u+w configure*) do-install: -.if !defined(WITHOUT_APOP) - @${INSTALL_PROGRAM} ${WRKSRC}/popper/popauth ${PREFIX}/bin/qpopauth -# If WITHOUT_QPOPAUTH_SETUID variable present in the environment, -# qpopper does not install qpopauth setuid to pop user so that -# anyone can access the pop.auth database. -.if !defined(WITHOUT_QPOPAUTH_SETUID) - @${CHOWN} pop ${PREFIX}/bin/qpopauth - @${CHMOD} u+s ${PREFIX}/bin/qpopauth -.endif - @${INSTALL_MAN} ${WRKSRC}/man/popauth.8 ${MANPREFIX}/man/man8/qpopauth.8 - @${LN} -sf ${PREFIX}/bin/qpopauth ${PREFIX}/bin/qapopauth +.if ${PORT_OPTIONS:MAPOP} + @${INSTALL_PROGRAM} ${WRKSRC}/popper/popauth ${STAGEDIR}${PREFIX}/bin/qpopauth + @${INSTALL_MAN} ${WRKSRC}/man/popauth.8 ${STAGEDIR}${PREFIX}/man/man8/qpopauth.8 + @${LN} -sf ${PREFIX}/bin/qpopauth ${STAGEDIR}${PREFIX}/bin/qapopauth .endif - @${INSTALL_PROGRAM} ${WRKSRC}/popper/popper ${PREFIX}/libexec/qpopper - @${INSTALL_MAN} ${WRKSRC}/man/popper.8 ${MANPREFIX}/man/man8/qpopper.8 -.if defined(WITH_POPPASSD) - @${INSTALL_PROGRAM} ${WRKSRC}/password/poppassd ${PREFIX}/libexec/qpoppassd + @${INSTALL_PROGRAM} ${WRKSRC}/popper/popper ${STAGEDIR}${PREFIX}/libexec/qpopper + @${INSTALL_MAN} ${WRKSRC}/man/popper.8 ${STAGEDIR}${PREFIX}/man/man8/qpopper.8 +.if ${PORT_OPTIONS:MPOPPASSD} + @${INSTALL_PROGRAM} ${WRKSRC}/password/poppassd ${STAGEDIR}${PREFIX}/libexec/qpoppassd .endif - @${INSTALL} -d -o ${POP_USER} -g ${POP_GROUP} -m ${POP_MODE_DIR} \ - ${ETCDIR} -.if !defined(NOPORTDOCS) - @${MKDIR} ${DOCSDIR} - @${INSTALL_DATA} ${WRKSRC}/GUIDE.pdf ${DOCSDIR} +.if ${PORT_OPTIONS:MDOCS} + @${MKDIR} ${STAGEDIR}${DOCSDIR} + @${INSTALL_DATA} ${WRKSRC}/GUIDE.pdf ${STAGEDIR}${DOCSDIR} .endif -post-install: install-conf-file - @${CAT} ${PKGMESSAGE} - # based on original from op port, written by Cyrille Lefevre # <clefevre@citeweb.net>. -install-conf-file: +post-install: @if [ ! -f ${CONF_DIR}/${CONF_FILE}${SAMP_SUFX} ]; then \ - if [ -f /etc/ftpusers ] && [ -n "${WITH_SAMPLE_POPUSERS}" ]; then \ - ${INSTALL} -c -o ${POP_USER} -g ${POP_GROUP} -m ${POP_MODE_CONF} \ - /etc/ftpusers ${POPUSERS_FILE}${SAMPLE_EXT} ; \ + ${MKDIR} ${STAGEDIR}${ETCDIR} ; \ + if [ -f /etc/ftpusers ] && [ -n "${PORT_OPTIONS:MSAMPLE_POPUSERS}" ]; then \ + ${INSTALL} -c /etc/ftpusers ${STAGEDIR}${POPUSERS_FILE}${SAMPLE_EXT} ; \ else \ - ${CP} /dev/null ${POPUSERS_FILE}${SAMPLE_EXT} ; \ - ${CHOWN} ${POP_USER}:${POP_GROUP} ${POPUSERS_FILE}${SAMPLE_EXT} ; \ - ${CHMOD} ${POP_MODE_CONF} ${POPUSERS_FILE}${SAMPLE_EXT} ; \ + ${CP} /dev/null ${STAGEDIR}${POPUSERS_FILE}${SAMPLE_EXT} ; \ fi ; \ fi - @${INSTALL} -c -m 0640 \ - ${WRKSRC}/samples/qpopper.config ${PREFIX}/etc/qpopper.config${SAMPLE_EXT} - @${SETENV} PKG_PREFIX=${PREFIX} ${SH} \ - ${PKGINSTALL} ${PKGNAME} POST-INSTALL + +.if ${PORT_OPTIONS:MPOPPASSD} + @${ECHO_MSG} "" + @${ECHO_MSG} "===============================================================================" + @${ECHO_MSG} "It adds for myself" + @${ECHO_MSG} "/etc/devfs.conf:" + @${ECHO_MSG} "link /dev/pts/0 pty0" + @${ECHO_MSG} "===============================================================================" + @${ECHO_MSG} "" +.endif .include <bsd.port.post.mk> diff --git a/mail/qpopper/files/extra-patch-password::auth_user.c b/mail/qpopper/files/extra-patch-password__auth_user.c index b8a5df715307..1135d1c56312 100644 --- a/mail/qpopper/files/extra-patch-password::auth_user.c +++ b/mail/qpopper/files/extra-patch-password__auth_user.c @@ -1,10 +1,10 @@ --- password/auth_user.c.orig Fri Mar 14 00:39:42 2003 +++ password/auth_user.c Fri Mar 14 00:40:02 2003 @@ -41,6 +41,7 @@ - - - + + + +#undef SPEC_POP_AUTH - - + + static const char *ERRMSG_PW = "Password mismatch for user \"%s\""; diff --git a/mail/qpopper/files/extra-patch-password::poppassd.c b/mail/qpopper/files/extra-patch-password__poppassd.c index fb2b9c73a4d4..9bbc8b2d16a3 100644 --- a/mail/qpopper/files/extra-patch-password::poppassd.c +++ b/mail/qpopper/files/extra-patch-password__poppassd.c @@ -1,7 +1,7 @@ --- password/poppassd.c.orig Sat May 5 18:50:05 2001 +++ password/poppassd.c Sat May 5 18:52:59 2001 @@ -284,6 +284,8 @@ - + static char *P1[] = { + "changing local password for *\nold password: ", /* FreeBSD */ @@ -10,7 +10,7 @@ "enter login password: ", /* Solaris */ "old smb password: ", /* smb */ @@ -301,6 +303,7 @@ - + static char *P3[] = { + "retype new password: ", /* FreeBSD */ @@ -18,7 +18,7 @@ "re-enter new password: ", "retype new smb password: ", /* smb */ @@ -309,6 +312,8 @@ - + static char *P4[] = { + "passwd: updating the database...\npasswd: done ", /* FreeBSD */ diff --git a/mail/qpopper/files/patch-popper::pop_pass.c b/mail/qpopper/files/patch-popper__pop_pass.c index 109efd917f03..5b9720d1bd90 100644 --- a/mail/qpopper/files/patch-popper::pop_pass.c +++ b/mail/qpopper/files/patch-popper__pop_pass.c @@ -3,7 +3,7 @@ @@ -1226,6 +1226,18 @@ return ( pop_msg ( p, POP_FAILURE, HERE, ERRMSG_PW, p->user ) ); } - + +# ifdef FREEBSD + + /* @@ -18,4 +18,4 @@ + return ( POP_SUCCESS ); } - + diff --git a/mail/qpopper/files/qpopper.in b/mail/qpopper/files/qpopper.in index ce3076d0c303..ebe64c9a64db 100644 --- a/mail/qpopper/files/qpopper.in +++ b/mail/qpopper/files/qpopper.in @@ -1,23 +1,21 @@ #!/bin/sh -# $FreeBSD: /tmp/pcvs/ports/mail/qpopper/files/qpopper.in,v 1.1 2012-02-14 21:35:43 dougb Exp $ -# # PROVIDE: qpopper -# REQUIRE: SERVERS +# REQUIRE: DAEMON # KEYWORD: shutdown -# -# Add the following lines to /etc/rc.conf to enable qpopper: -# qpopper_enable="YES" + +# qpopper_enable (bool): Set to NO by default. +# Set it to YES to enable qpopper. +# qpopper_flags (str): Set to "-f %%PREFIX%%/etc/qpopper.config" by default. . /etc/rc.subr name=qpopper rcvar=qpopper_enable -load_rc_config $name - -qpopper_enable=${qpopper_enable:-"NO"} - -command=%%PREFIX%%/libexec/qpopper +load_rc_config ${name} +: ${qpopper_enable:="NO"} +: ${qpopper_flags:="110 -S -f %%PREFIX%%/etc/${name}.config"} +command="%%PREFIX%%/libexec/${name}" run_rc_command "$1" diff --git a/mail/qpopper/pkg-descr b/mail/qpopper/pkg-descr index 16f530094f6c..9be95e926a45 100644 --- a/mail/qpopper/pkg-descr +++ b/mail/qpopper/pkg-descr @@ -3,4 +3,4 @@ Qpopper is the most widely-used server for the POP3 protocol Don't forget to edit /etc/inetd.conf to enable the server after installation. -WWW: http://www.eudora.com/products/unsupported/qpopper/ +WWW: http://www.eudora.com/products/unsupported/qpopper/ diff --git a/mail/qpopper/pkg-install b/mail/qpopper/pkg-install index 838c114b4337..1e6a59b7e5c8 100644 --- a/mail/qpopper/pkg-install +++ b/mail/qpopper/pkg-install @@ -4,15 +4,15 @@ # based on original from op port, written by Cyrille Lefevre # <clefevre@citeweb.net> -[ $# != 2 ] && exit 1 +[ ! $# = 2 -a ! $# = 4 ] && exit 1 PKGNAME=$1 ACTION=$2 CONF_DIR=${PKG_PREFIX}/etc/qpopper CONF_FILE=popusers -CONF_OWN=pop -CONF_GRP=daemon +CONF_OWN=$3 +CONF_GRP=$4 CONF_MODE=444 SAMP_SUFX=.sample diff --git a/mail/qpopper/pkg-plist b/mail/qpopper/pkg-plist index faef9193b8d6..bd1e29c9df5a 100644 --- a/mail/qpopper/pkg-plist +++ b/mail/qpopper/pkg-plist @@ -1,11 +1,19 @@ +@owner %%USERS%% +@mode u+s %%QPOPAUTH%%bin/qpopauth +@group %%GROUP%% +@mode 0444 +%%ETCDIR%%/popusers.sample +@mode +@group wheel +@owner root %%QPOPAUTH%%@unexec rm -f %D/bin/qapopauth %%QPOPAUTH%%@exec ln -sf %D/bin/qpopauth %D/bin/qapopauth libexec/qpopper +man/man8/qpopper.8.gz +%%QPOPAUTH%%man/man8/qpopauth.8.gz %%EPOPPASSD%%libexec/qpoppassd -@exec mkdir -p %%ETCDIR%% && chown %%POP_USER%%:%%POP_GROUP%% %%ETCDIR%% && chmod %%POP_MODE_DIR%% %%ETCDIR%% -%%ETCDIR%%/popusers.sample -etc/qpopper.config.sample +@exec mkdir -p %%ETCDIR%% && chown %%USERS%%:%%GROUPS%% %%ETCDIR%% && chmod %%POP_MODE_DIR%% %%ETCDIR%% %%PORTDOCS%%%%DOCSDIR%%/GUIDE.pdf %%PORTDOCS%%@dirrm %%DOCSDIR%% @dirrmtry %%ETCDIR%% diff --git a/mail/qpopper/pkg-req b/mail/qpopper/pkg-req deleted file mode 100644 index 01bcc6374f10..000000000000 --- a/mail/qpopper/pkg-req +++ /dev/null @@ -1,13 +0,0 @@ -if [ "$2" != "INSTALL" ]; then - exit 0 -fi -if ! id -u pop > /dev/null 2>&1; then - echo "You need an account \"pop\" to install this package." - echo "Please add it by hand (try \"man vipw\") and try again." - echo "" - echo "An example passwd entry is:" - echo "pop:*:68:6::0:0:Post Office Owner:/nonexistent:/nonexistent" - echo "" - exit 1 -fi -exit 0 diff --git a/mail/qpopper/scripts/pre-install b/mail/qpopper/scripts/pre-install deleted file mode 100644 index 24e6b4cd6f68..000000000000 --- a/mail/qpopper/scripts/pre-install +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -if ! id -u pop > /dev/null 2>&1; then - echo "You need an account \"pop\" to install this package." - echo "Please add it by hand (try \"man vipw\") and try again." - echo "" - echo "An example passwd entry is:" - echo "pop:*:68:6::0:0:Post Office Owner:/nonexistent:/nonexistent" - echo "" - exit 1 -fi -usrdir=${PREFIX}/etc/qpopper -if [ ! -d $usrdir ]; then - mkdir -p $usrdir -fi -chown pop:daemon $usrdir -chmod 700 $usrdir |