Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Apr 2014 23:45:06 +0000 (UTC)
From:      Rene Ladan <rene@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r350186 - in head/mail/qpopper: . files scripts
Message-ID:  <201404042345.s34Nj6R1061085@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rene
Date: Fri Apr  4 23:45:06 2014
New Revision: 350186
URL: http://svnweb.freebsd.org/changeset/ports/350186
QAT: https://qat.redports.org/buildarchive/r350186/

Log:
  - Stage support (hackish...)
  - Rename :: patchfiles [1]
  - Merge pkg-req and scripts/pre-install into pkg-install [1]
  - Replace tab by space in WWW: line [1]
  - Clean up rc script [1]
  - Add USE_GCC because clang does not like -freg-struct-return (yet)
  - Use USERS and GROUPS [1]
  - Drop empty QPOPAUTH_SETUID option
  - Fix USE_OPENSSL usage [1]
  - Replace knobs by options [1]
  - Merge install-conf-file target into post-install target
  
  PR:		ports/185285 [1]
  Submitted by:	Takefu <takefu@airport.fm>
  Approved by:	portmgr (mostly infastructure fixes)

Added:
  head/mail/qpopper/files/extra-patch-password__auth_user.c
     - copied, changed from r350173, head/mail/qpopper/files/extra-patch-password::auth_user.c
  head/mail/qpopper/files/extra-patch-password__poppassd.c
     - copied, changed from r350173, head/mail/qpopper/files/extra-patch-password::poppassd.c
  head/mail/qpopper/files/patch-popper__pop_pass.c
     - copied, changed from r350173, head/mail/qpopper/files/patch-popper::pop_pass.c
Deleted:
  head/mail/qpopper/files/extra-patch-password::auth_user.c
  head/mail/qpopper/files/extra-patch-password::poppassd.c
  head/mail/qpopper/files/patch-popper::pop_pass.c
  head/mail/qpopper/pkg-req
  head/mail/qpopper/scripts/
Modified:
  head/mail/qpopper/Makefile
  head/mail/qpopper/files/qpopper.in
  head/mail/qpopper/pkg-descr
  head/mail/qpopper/pkg-install
  head/mail/qpopper/pkg-plist

Modified: head/mail/qpopper/Makefile
==============================================================================
--- head/mail/qpopper/Makefile	Fri Apr  4 23:16:43 2014	(r350185)
+++ head/mail/qpopper/Makefile	Fri Apr  4 23:45:06 2014	(r350186)
@@ -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=${
 		--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 Auth
 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
-.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
-.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: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 ${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
+.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>

Copied and modified: head/mail/qpopper/files/extra-patch-password__auth_user.c (from r350173, head/mail/qpopper/files/extra-patch-password::auth_user.c)
==============================================================================
--- head/mail/qpopper/files/extra-patch-password::auth_user.c	Fri Apr  4 22:15:16 2014	(r350173, copy source)
+++ head/mail/qpopper/files/extra-patch-password__auth_user.c	Fri Apr  4 23:45:06 2014	(r350186)
@@ -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\"";

Copied and modified: head/mail/qpopper/files/extra-patch-password__poppassd.c (from r350173, head/mail/qpopper/files/extra-patch-password::poppassd.c)
==============================================================================
--- head/mail/qpopper/files/extra-patch-password::poppassd.c	Fri Apr  4 22:15:16 2014	(r350173, copy source)
+++ head/mail/qpopper/files/extra-patch-password__poppassd.c	Fri Apr  4 23:45:06 2014	(r350186)
@@ -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 */

Copied and modified: head/mail/qpopper/files/patch-popper__pop_pass.c (from r350173, head/mail/qpopper/files/patch-popper::pop_pass.c)
==============================================================================
--- head/mail/qpopper/files/patch-popper::pop_pass.c	Fri Apr  4 22:15:16 2014	(r350173, copy source)
+++ head/mail/qpopper/files/patch-popper__pop_pass.c	Fri Apr  4 23:45:06 2014	(r350186)
@@ -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 );
  }
- 
+

Modified: head/mail/qpopper/files/qpopper.in
==============================================================================
--- head/mail/qpopper/files/qpopper.in	Fri Apr  4 23:16:43 2014	(r350185)
+++ head/mail/qpopper/files/qpopper.in	Fri Apr  4 23:45:06 2014	(r350186)
@@ -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"

Modified: head/mail/qpopper/pkg-descr
==============================================================================
--- head/mail/qpopper/pkg-descr	Fri Apr  4 23:16:43 2014	(r350185)
+++ head/mail/qpopper/pkg-descr	Fri Apr  4 23:45:06 2014	(r350186)
@@ -3,4 +3,4 @@ Qpopper is the most widely-used server f
 
 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/

Modified: head/mail/qpopper/pkg-install
==============================================================================
--- head/mail/qpopper/pkg-install	Fri Apr  4 23:16:43 2014	(r350185)
+++ head/mail/qpopper/pkg-install	Fri Apr  4 23:45:06 2014	(r350186)
@@ -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

Modified: head/mail/qpopper/pkg-plist
==============================================================================
--- head/mail/qpopper/pkg-plist	Fri Apr  4 23:16:43 2014	(r350185)
+++ head/mail/qpopper/pkg-plist	Fri Apr  4 23:45:06 2014	(r350186)
@@ -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%%



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404042345.s34Nj6R1061085>