ports/185285: [PATCH] mail/qpopper: fix StageDir
Takefu
takefu at airport.fm
Mon Dec 30 09:10:01 UTC 2013
>Number: 185285
>Category: ports
>Synopsis: [PATCH] mail/qpopper: fix StageDir
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Mon Dec 30 09:10:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Takefu
>Release: FreeBSD 8.4-RELEASE-p4 i386
>Organization:
FOX Amateur Radio Club
>Environment:
System: FreeBSD RELENG84-ix86.localIPv4.airport.fm 8.4-RELEASE-p4 FreeBSD 8.4-RELEASE-p4 #0: Wed Sep 25 14:55:36 JST 2013
>Description:
fix StageDir
Remove use of pkg-req
Port maintainer (bc979 at lafn.org) is cc'd.
Generated with FreeBSD Port Tools 0.99_11 (mode: change, diff: ports)
>How-To-Repeat:
>Fix:
--- qpopper-4.1.0_1.patch begins here ---
diff -ruN /usr/ports/mail/qpopper/GIDs ./GIDs
--- /usr/ports/mail/qpopper/GIDs 1970-01-01 09:00:00.000000000 +0900
+++ ./GIDs 2013-10-01 09:54:17.000000000 +0900
@@ -0,0 +1 @@
+daemon:*:1:
diff -ruN /usr/ports/mail/qpopper/Makefile ./Makefile
--- /usr/ports/mail/qpopper/Makefile 2013-09-21 04:59:12.000000000 +0900
+++ ./Makefile 2013-10-22 08:35:35.000000000 +0900
@@ -13,7 +13,6 @@
COMMENT= Berkeley POP 3 server (now maintained by Qualcomm)
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,8 +20,8 @@
--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}
@@ -32,13 +31,14 @@
SUB_FILES= pkg-message
# internal configuration
-POP_USER= pop
-POP_GROUP= daemon
+USERS?= pop
+GROUPS?= daemon
+GID_FILES+= ../../GIDs ${.CURDIR}/GIDs
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 \
@@ -68,7 +68,7 @@
QPOPAUTH= "@comment "
.else
CONFIGURE_ARGS+= --enable-apop=${ETCDIR}/pop.auth \
- --with-apopuid=pop
+ --with-popuid=${USERS}
MAN8+= qpopauth.8
QPOPAUTH= ""
# If WITH_APOP_ONLY variable present in the environment, qpopper builds
@@ -81,7 +81,7 @@
# 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
@@ -128,6 +128,7 @@
# The default is to build without SSL/TLS support.
.if ${PORT_OPTIONS:MSSL}
+USE_OPENSSL= yes
CONFIGURE_ARGS+= --with-openssl=${OPENSSLBASE}
.endif
@@ -139,11 +140,11 @@
@${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,13 +153,13 @@
@(cd ${WRKSRC}; ${CHMOD} u+w configure*)
do-install:
-.if !defined(WITHOUT_APOP)
+.if ${PORT_OPTIONS:MAPOP}
@${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
+.if ${PORT_OPTIONS:MQPOPAUTH_SETUID}
+ @${CHOWN} ${USERS} ${PREFIX}/bin/qpopauth
@${CHMOD} u+s ${PREFIX}/bin/qpopauth
.endif
@${INSTALL_MAN} ${WRKSRC}/man/popauth.8 ${MANPREFIX}/man/man8/qpopauth.8
@@ -166,35 +167,44 @@
.endif
@${INSTALL_PROGRAM} ${WRKSRC}/popper/popper ${PREFIX}/libexec/qpopper
@${INSTALL_MAN} ${WRKSRC}/man/popper.8 ${MANPREFIX}/man/man8/qpopper.8
-.if defined(WITH_POPPASSD)
+.if ${PORT_OPTIONS:MPOPPASSD}
@${INSTALL_PROGRAM} ${WRKSRC}/password/poppassd ${PREFIX}/libexec/qpoppassd
.endif
- @${INSTALL} -d -o ${POP_USER} -g ${POP_GROUP} -m ${POP_MODE_DIR} \
+ @${INSTALL} -d -o ${USERS} -g ${GROUPS} -m ${POP_MODE_DIR} \
${ETCDIR}
-.if !defined(NOPORTDOCS)
+.if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${DOCSDIR}
@${INSTALL_DATA} ${WRKSRC}/GUIDE.pdf ${DOCSDIR}
.endif
post-install: install-conf-file
@${CAT} ${PKGMESSAGE}
+.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
# based on original from op port, written by Cyrille Lefevre
# <clefevre at citeweb.net>.
install-conf-file:
@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} \
+ if [ -f /etc/ftpusers ] && [ -n "${PORT_OPTIONS:MSAMPLE_POPUSERS}" ]; then \
+ ${INSTALL} -c -o ${USERS} -g ${GROUPS} -m ${POP_MODE_CONF} \
/etc/ftpusers ${POPUSERS_FILE}${SAMPLE_EXT} ; \
else \
${CP} /dev/null ${POPUSERS_FILE}${SAMPLE_EXT} ; \
- ${CHOWN} ${POP_USER}:${POP_GROUP} ${POPUSERS_FILE}${SAMPLE_EXT} ; \
+ ${CHOWN} ${USERS}:${GROUPS} ${POPUSERS_FILE}${SAMPLE_EXT} ; \
${CHMOD} ${POP_MODE_CONF} ${POPUSERS_FILE}${SAMPLE_EXT} ; \
fi ; \
fi
- @${INSTALL} -c -m 0640 \
+ @${INSTALL} -c -o ${USERS} -g ${GROUPS} -m 0640 \
${WRKSRC}/samples/qpopper.config ${PREFIX}/etc/qpopper.config${SAMPLE_EXT}
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} \
- ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+ ${PKGINSTALL} ${PKGNAME} POST-INSTALL ${USERS} ${GROUPS}
.include <bsd.port.post.mk>
diff -ruN /usr/ports/mail/qpopper/files/extra-patch-password::auth_user.c ./files/extra-patch-password::auth_user.c
--- /usr/ports/mail/qpopper/files/extra-patch-password::auth_user.c 2012-07-14 22:54:48.000000000 +0900
+++ ./files/extra-patch-password::auth_user.c 1970-01-01 09:00:00.000000000 +0900
@@ -1,10 +0,0 @@
---- 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 -ruN /usr/ports/mail/qpopper/files/extra-patch-password::poppassd.c ./files/extra-patch-password::poppassd.c
--- /usr/ports/mail/qpopper/files/extra-patch-password::poppassd.c 2012-07-14 22:54:48.000000000 +0900
+++ ./files/extra-patch-password::poppassd.c 1970-01-01 09:00:00.000000000 +0900
@@ -1,28 +0,0 @@
---- 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 */
-+ "changing nis password for *\nold password: ", /* FreeBSD NIS */
- "changing password for *\nold password: ", /* shadow */
- "enter login password: ", /* Solaris */
- "old smb password: ", /* smb */
-@@ -301,6 +303,7 @@
-
- static char *P3[] =
- {
-+ "retype new password: ", /* FreeBSD */
- "re-enter new password:*", /* shadow */
- "re-enter new password: ",
- "retype new smb password: ", /* smb */
-@@ -309,6 +312,8 @@
-
- static char *P4[] =
- {
-+ "passwd: updating the database...\npasswd: done ", /* FreeBSD */
-+ "nis password has been changed * ", /* FreeBSD NIS */
- "password changed. ", /* shadow */
- "password changed ", /* smb */
- ""
diff -ruN /usr/ports/mail/qpopper/files/extra-patch-password__auth_user.c ./files/extra-patch-password__auth_user.c
--- /usr/ports/mail/qpopper/files/extra-patch-password__auth_user.c 1970-01-01 09:00:00.000000000 +0900
+++ ./files/extra-patch-password__auth_user.c 2010-07-21 16:56:52.000000000 +0900
@@ -0,0 +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 -ruN /usr/ports/mail/qpopper/files/extra-patch-password__poppassd.c ./files/extra-patch-password__poppassd.c
--- /usr/ports/mail/qpopper/files/extra-patch-password__poppassd.c 1970-01-01 09:00:00.000000000 +0900
+++ ./files/extra-patch-password__poppassd.c 2012-07-14 22:54:48.000000000 +0900
@@ -0,0 +1,28 @@
+--- 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 */
++ "changing nis password for *\nold password: ", /* FreeBSD NIS */
+ "changing password for *\nold password: ", /* shadow */
+ "enter login password: ", /* Solaris */
+ "old smb password: ", /* smb */
+@@ -301,6 +303,7 @@
+
+ static char *P3[] =
+ {
++ "retype new password: ", /* FreeBSD */
+ "re-enter new password:*", /* shadow */
+ "re-enter new password: ",
+ "retype new smb password: ", /* smb */
+@@ -309,6 +312,8 @@
+
+ static char *P4[] =
+ {
++ "passwd: updating the database...\npasswd: done ", /* FreeBSD */
++ "nis password has been changed * ", /* FreeBSD NIS */
+ "password changed. ", /* shadow */
+ "password changed ", /* smb */
+ ""
diff -ruN /usr/ports/mail/qpopper/files/patch-popper::pop_pass.c ./files/patch-popper::pop_pass.c
--- /usr/ports/mail/qpopper/files/patch-popper::pop_pass.c 2012-07-14 22:54:48.000000000 +0900
+++ ./files/patch-popper::pop_pass.c 1970-01-01 09:00:00.000000000 +0900
@@ -1,21 +0,0 @@
---- popper/pop_pass.c.orig Sat Jun 2 02:24:13 2001
-+++ popper/pop_pass.c Sat Sep 8 00:26:27 2001
-@@ -1226,6 +1226,18 @@
- return ( pop_msg ( p, POP_FAILURE, HERE, ERRMSG_PW, p->user ) );
- }
-
-+# ifdef FREEBSD
-+
-+ /*
-+ * Nor from expired accounts
-+ */
-+ if (pw->pw_expire != 0 && pw->pw_expire <= time(NULL)) {
-+ sleep ( SLEEP_SECONDS );
-+ return ( pop_msg ( p, POP_FAILURE, HERE, ERRMSG_ACEXP, p->user ) );
-+ }
-+
-+# endif /* FreeBSD */
-+
- return ( POP_SUCCESS );
- }
-
diff -ruN /usr/ports/mail/qpopper/files/patch-popper__pop_pass.c ./files/patch-popper__pop_pass.c
--- /usr/ports/mail/qpopper/files/patch-popper__pop_pass.c 1970-01-01 09:00:00.000000000 +0900
+++ ./files/patch-popper__pop_pass.c 2010-07-21 16:56:52.000000000 +0900
@@ -0,0 +1,21 @@
+--- popper/pop_pass.c.orig Sat Jun 2 02:24:13 2001
++++ popper/pop_pass.c Sat Sep 8 00:26:27 2001
+@@ -1226,6 +1226,18 @@
+ return ( pop_msg ( p, POP_FAILURE, HERE, ERRMSG_PW, p->user ) );
+ }
+
++# ifdef FREEBSD
++
++ /*
++ * Nor from expired accounts
++ */
++ if (pw->pw_expire != 0 && pw->pw_expire <= time(NULL)) {
++ sleep ( SLEEP_SECONDS );
++ return ( pop_msg ( p, POP_FAILURE, HERE, ERRMSG_ACEXP, p->user ) );
++ }
++
++# endif /* FreeBSD */
++
+ return ( POP_SUCCESS );
+ }
+
diff -ruN /usr/ports/mail/qpopper/files/qpopper.in ./files/qpopper.in
--- /usr/ports/mail/qpopper/files/qpopper.in 2012-07-14 22:54:48.000000000 +0900
+++ ./files/qpopper.in 2013-10-02 17:54:17.000000000 +0900
@@ -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 -ruN /usr/ports/mail/qpopper/pkg-descr ./pkg-descr
--- /usr/ports/mail/qpopper/pkg-descr 2012-07-14 22:54:48.000000000 +0900
+++ ./pkg-descr 2013-09-25 19:20:21.000000000 +0900
@@ -3,4 +3,4 @@
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 -ruN /usr/ports/mail/qpopper/pkg-install ./pkg-install
--- /usr/ports/mail/qpopper/pkg-install 2012-07-14 22:54:48.000000000 +0900
+++ ./pkg-install 2013-10-01 09:29:10.000000000 +0900
@@ -4,15 +4,15 @@
# based on original from op port, written by Cyrille Lefevre
# <clefevre at 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 -ruN /usr/ports/mail/qpopper/pkg-plist ./pkg-plist
--- /usr/ports/mail/qpopper/pkg-plist 2012-07-14 22:54:48.000000000 +0900
+++ ./pkg-plist 2013-10-01 09:00:59.000000000 +0900
@@ -3,7 +3,7 @@
%%QPOPAUTH%%@exec ln -sf %D/bin/qpopauth %D/bin/qapopauth
libexec/qpopper
%%EPOPPASSD%%libexec/qpoppassd
- at exec mkdir -p %%ETCDIR%% && chown %%POP_USER%%:%%POP_GROUP%% %%ETCDIR%% && chmod %%POP_MODE_DIR%% %%ETCDIR%%
+ at exec mkdir -p %%ETCDIR%% && chown %%USERS%%:%%GROUPS%% %%ETCDIR%% && chmod %%POP_MODE_DIR%% %%ETCDIR%%
%%ETCDIR%%/popusers.sample
etc/qpopper.config.sample
%%PORTDOCS%%%%DOCSDIR%%/GUIDE.pdf
diff -ruN /usr/ports/mail/qpopper/pkg-req ./pkg-req
--- /usr/ports/mail/qpopper/pkg-req 2012-07-14 22:54:48.000000000 +0900
+++ ./pkg-req 1970-01-01 09:00:00.000000000 +0900
@@ -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 -ruN /usr/ports/mail/qpopper/scripts/pre-install ./scripts/pre-install
--- /usr/ports/mail/qpopper/scripts/pre-install 2012-07-14 22:54:48.000000000 +0900
+++ ./scripts/pre-install 1970-01-01 09:00:00.000000000 +0900
@@ -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
--- qpopper-4.1.0_1.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list