ports/185572: [PATCH] mail/fetchmail: fix StageDir
Takefu
takefu at airport.fm
Fri Jan 24 09:20:01 UTC 2014
The following reply was made to PR ports/185572; it has been noted by GNATS.
From: Takefu <takefu at airport.fm>
To: Corey Halpin <chalpin at cs.wisc.edu>, bug-followup at FreeBSD.ORG
Cc:
Subject: Re: ports/185572: [PATCH] mail/fetchmail: fix StageDir
Date: Fri, 24 Jan 2014 18:12:20 +0900
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi.
It was not possible to correct it with 8.4-RELEASE though the patch was tried.
I want you to try because it made the patch improved a little.
Pkg-install pkg-deinstall operates correctly.
NLS option reform.
shebangfix fetchmailconf.py
- --- fetchmail-6.3.26.patch begins here ---
diff -ruN /usr/ports/mail/fetchmail/Makefile ./Makefile
- --- /usr/ports/mail/fetchmail/Makefile 2013-09-21 04:59:12.000000000 +0900
+++ ./Makefile 2014-01-24 17:46:25.000000000 +0900
@@ -10,17 +10,25 @@
MAINTAINER= chalpin at cs.wisc.edu
COMMENT= Batch mail retrieval utility for IMAP/POP3/ETRN/ODMR
+LICENSE= GPLv2 LGPL21
+LICENSE_COMB= dual
+
RUN_DEPENDS= ${LOCALBASE}/share/certs/ca-root-nss.crt:${PORTSDIR}/security/ca_root_nss
# Note USERS can only contain a single word as parts below rely on that.
- -USERS= ${PORTNAME}
- -GROUPS= ${USERS}
+USERS= ${PORTNAME}
+GROUPS= ${USERS}
+NULLDIR?= # None. portlint compliance
+
+USES= shebangfix
+SHEBANG_FILES= fetchmailconf.py
+python_OLD_CMD= /usr/bin/env python
USE_RC_SUBR= fetchmail
- -FETCHMAILRC= ${PREFIX}/etc/fetchmailrc
- -SUB_FILES= pkg-message
+SUB_FILES= pkg-message pkg-install pkg-deinstall
+SUB_LIST+= USERS=${USERS} GROUPS=${GROUPS} PORTNAME=${PORTNAME}
- -USE_XZ= yes
+USE_XZ= yes
USE_GMAKE= yes
GNU_CONFIGURE= yes
USE_OPENSSL= yes
@@ -29,44 +37,37 @@
--with-ssl=${OPENSSLBASE}
LDFLAGS+= -L${LOCALBASE}/lib
- -MAN1= fetchmail.1
- -MLINKS= fetchmail.1 fetchmailconf.1
- -OPTIONS_DEFINE= X11 NLS NTLM GSSAPI
+OPTIONS_DEFINE= X11 NLS NTLM GSSAPI POP2
OPTIONS_DEFAULT= GSSAPI
+OPTIONS_SUB= yes
X11_DESC= Python/Tkinter dependencies for ``fetchmailconf''
- -NTLM_DESC= Build in support for NTLM/MSN authentication
- -GSSAPI_DESC= Build GSSAPI/Kerberos 5 support
+POP2_DESC= POP2 Protocol support[obsolete]
+
+NLS_USES= gettext
+NLS_CONFIGURE_ENABLE= nls
+NLS_CONFIGURE_ON= --enable-nls
+NLS_CONFIGURE_OFF= --disable-nls
PORTDOCS= FAQ FEATURES NEWS NOTES README README.SSL \
design-notes.html fetchmail-FAQ.html fetchmail-features.html \
esrs-design-notes.html
- -NO_STAGE= yes
.include <bsd.port.options.mk>
# Pop2 is obsolete
- -.if defined(WITH_POP2)
+.if ${PORT_OPTIONS:MPOP2}
CONFIGURE_ARGS+= --enable-POP2
.endif
.if ${PORT_OPTIONS:MX11}
USE_PYTHON_RUN= yes
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}tkinter>=0:${PORTSDIR}/x11-toolkits/py-tkinter
- -PLIST_SUB+= X11="" NOX11="@comment "
+PLIST_SUB+= NOX11="@comment "
.else
CONFIGURE_ARGS+= PYTHON=:
SUB_FILES+= fetchmailconf
- -PLIST_SUB+= X11="@comment " NOX11=""
- -.endif
- -
- -.if ${PORT_OPTIONS:MNLS}
- -CONFIGURE_ARGS+= --enable-nls
- -PLIST_SUB+= NLS=""
- -USES+= gettext
- -.else
- -CONFIGURE_ARGS+= --disable-nls
- -PLIST_SUB+= NLS="@comment "
+PLIST_SUB+= NOX11=""
.endif
.if ${PORT_OPTIONS:MGSSAPI}
@@ -74,7 +75,7 @@
.if exists(${LOCALBASE}/lib/libkrb5.a)
KRB5_HOME= ${LOCALBASE}
.elif exists(/usr/lib/libkrb5.a)
- -KRB5_HOME= /usr
+KRB5_HOME= ${NULLDIR}/usr
.endif
.endif
@@ -92,29 +93,26 @@
PORTDOCS+= README.NTLM
.endif
- -pre-patch:
- - @${REINPLACE_CMD} -e "s,^#!/usr/bin/env python,#!${LOCALBASE}/bin/python,g" \
- - ${WRKSRC}/fetchmailconf.py
- -
post-build:
@${MAKE} -C ${WRKSRC} check
post-install:
.if ${PORT_OPTIONS:MDOCS}
- - ${MKDIR} ${DOCSDIR}
- - cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ @cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
.endif
.if empty(PORT_OPTIONS:MX11)
- - ${INSTALL_SCRIPT} ${WRKDIR}/fetchmailconf ${PREFIX}/bin
- - ${INSTALL_SCRIPT} ${WRKSRC}/fetchmailconf.py ${PREFIX}/libexec
+ ${INSTALL_SCRIPT} ${WRKDIR}/fetchmailconf ${STAGEDIR}${PREFIX}/bin
+ ${INSTALL_SCRIPT} ${WRKSRC}/fetchmailconf.py ${STAGEDIR}${PREFIX}/libexec
.endif
- - ${MKDIR} -m 0755 "/var/run/${PORTNAME}"
- - ${CHOWN} "${USERS}:${GROUPS}" "/var/run/${PORTNAME}"
- - ${INSTALL} -m 644 -o ${USERS} -g ${GROUPS} ${FILESDIR}/fetchmailrc.sample ${PREFIX}/etc/fetchmailrc.sample
+ ${MKDIR} -m 0755 "${STAGEDIR}/var/run/${PORTNAME}"
+ ${INSTALL} -m 644 ${FILESDIR}/fetchmailrc.sample\
+ ${STAGEDIR}${PREFIX}/etc/fetchmailrc.sample
if [ ! -f ${PREFIX}/etc/fetchmailrc ]; then \
- - ${CP} -p ${PREFIX}/etc/fetchmailrc.sample ${PREFIX}/etc/fetchmailrc ; \
- - ${CHMOD} 600 ${PREFIX}/etc/fetchmailrc ; \
+ ${CP} -p ${STAGEDIR}${PREFIX}/etc/fetchmailrc.sample\
+ ${STAGEDIR}${PREFIX}/etc/fetchmailrc ; \
+ ${CHMOD} 600 ${STAGEDIR}${PREFIX}/etc/fetchmailrc ; \
fi
@${ECHO_CMD} ""
diff -ruN /usr/ports/mail/fetchmail/files/pkg-deinstall.in ./files/pkg-deinstall.in
- --- /usr/ports/mail/fetchmail/files/pkg-deinstall.in 1970-01-01 09:00:00.000000000 +0900
+++ ./files/pkg-deinstall.in 2014-01-24 17:56:16.000000000 +0900
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+if [ x$2 != xPOST-DEINSTALL ]; then
+ exit
+fi
+
+if [ -f /var/run/%%PORTNAME%%/fetchmail.pid ] ; then
+ /bin/rm -f /var/run/%%PORTNAME%%/fetchmail.pid
+fi
+
+exit
diff -ruN /usr/ports/mail/fetchmail/files/pkg-install.in ./files/pkg-install.in
- --- /usr/ports/mail/fetchmail/files/pkg-install.in 1970-01-01 09:00:00.000000000 +0900
+++ ./files/pkg-install.in 2014-01-24 17:51:24.000000000 +0900
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+if [ x$2 != xPOST-INSTALL ]; then
+ exit
+fi
+
+/bin/mkdir -m 0755 -p /var/run/%%PORTNAME%%
+/usr/sbin/chown "%%USERS%%:%%GROUPS%%" /var/run/%%PORTNAME%%
+/usr/sbin/chown "%%USERS%%:%%GROUPS%%" %%PREFIX%%/etc/fetchmailrc*
+
+exit
diff -ruN /usr/ports/mail/fetchmail/pkg-plist ./pkg-plist
- --- /usr/ports/mail/fetchmail/pkg-plist 2014-01-22 08:40:21.000000000 +0900
+++ ./pkg-plist 2014-01-23 10:12:37.000000000 +0900
@@ -1,5 +1,8 @@
+ at comment $FreeBSD: mail/fetchmail/pkg-plist 315268 2013-03-26 08:56:28Z mandree $
bin/fetchmail
bin/fetchmailconf
+man/man1/fetchmail.1.gz
+man/man1/fetchmailconf.1.gz
%%NOX11%%libexec/fetchmailconf.py
%%NLS%%share/locale/ca/LC_MESSAGES/fetchmail.mo
%%NLS%%share/locale/cs/LC_MESSAGES/fetchmail.mo
- --- fetchmail-6.3.26.patch ends here ---
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlLiLnQACgkQxqPFoZw+j1Y1OwCfa5evAvHtxHDWqndYQdxY5cDe
BTIAnijEWF2kDWN++OgLYjPjidX5zX8c
=w6Ye
-----END PGP SIGNATURE-----
More information about the freebsd-ports-bugs
mailing list