Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Jul 2014 02:20:08 +0000 (UTC)
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r360338 - in head/mail: qmail qmail-spamcontrol
Message-ID:  <201407030220.s632K8jq046587@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdrewery
Date: Thu Jul  3 02:20:07 2014
New Revision: 360338
URL: http://svnweb.freebsd.org/changeset/ports/360338
QAT: https://qat.redports.org/buildarchive/r360338/

Log:
  Fix patch application in mail/qmail-spamcontrol:
  
  The spamcontrol patch is applied through a script, install_spamcontrol.sh. This
  script does not return a non-zero status when patch failures are encountered.
  So I missed many failures when updating this port.
  
  To fix this, move the spamcontrol patch application to pre-patch so that the
  PATCHFILES->DISTFILES (and manual patch application with PATCH) is not needed
  for most patches. This ensures that the spamcontrol patch is always applied
  before PATCHFILES. Some PATCHFILES were applying before the spamcontrol patch
  causing it to fail to patch properly.
  
  Bump revision as the build had been fine but some files were not being
  generated in the package.
  
  Also add my mirror as distcache does not have the updated patches yet.
  
  Reported by:	Oleg Strizhak
  MFH:		2014Q3

Modified:
  head/mail/qmail-spamcontrol/Makefile
  head/mail/qmail/Makefile
  head/mail/qmail/distinfo

Modified: head/mail/qmail-spamcontrol/Makefile
==============================================================================
--- head/mail/qmail-spamcontrol/Makefile	Thu Jul  3 02:13:47 2014	(r360337)
+++ head/mail/qmail-spamcontrol/Makefile	Thu Jul  3 02:20:07 2014	(r360338)
@@ -2,7 +2,7 @@
 
 PORTNAME=	qmail
 PORTVERSION=	${QMAIL_VERSION}.${SPAMCONTROL_VERSION}
-PORTREVISION=	0
+PORTREVISION=	1
 CATEGORIES=	mail
 MASTER_SITES+=	http://www.fehcom.de/qmail/spamcontrol/:spamcontrol \
 		${MASTER_SITE_LOCAL:S/$/:spamcontrol/}
@@ -27,8 +27,6 @@ LATEST_LINK=		${PKGNAMEPREFIX}${PORTNAME
 
 SLAVE_SPAMCONTROL=	yes
 
-BROKEN=		some patches are not applying properly yet still build
-
 # Local overrides
 MASTERDIR=	${.CURDIR}/../qmail
 PATCHDIR=	${.CURDIR}/files

Modified: head/mail/qmail/Makefile
==============================================================================
--- head/mail/qmail/Makefile	Thu Jul  3 02:13:47 2014	(r360337)
+++ head/mail/qmail/Makefile	Thu Jul  3 02:20:07 2014	(r360338)
@@ -176,8 +176,8 @@ PATCHFILES+=	${TLS_PATCH_NAME}:tls
 .endif
 
 PATCH_SITES+=	${MASTER_SITE_LOCAL:S/$/:dns,sendmail_flagf,rfc2821,ldap,mysql,tls,quota,blockexec,doublebounce,spf,spf_tls,localtime,qmtpc_outgoingip/}
-PATCH_SITE_SUBDIR+=	bdrewery/qmail/:dns,sendmail_flagf,rfc2821,ldap,mysql,quota,blockexec,doublebounce,spf,spf_tls,localtime,qmtpc_outgoingip
-PATCH_SITE_SUBDIR+=	bdrewery/qmail/:tls
+PATCH_SITE_SUBDIR+=	bdrewery/qmail/:dns,sendmail_flagf,rfc2821,ldap,mysql,tls,quota,blockexec,doublebounce,spf,spf_tls,localtime,qmtpc_outgoingip
+PATCH_SITES+=	http://mirror.shatow.net/freebsd/qmail/:DEFAULT,dns,sendmail_flagf,rfc2821,ldap,mysql,tls,quota,blockexec,doublebounce,spf,spf_tls,localtime,qmtpc_outgoingip
 
 .if !defined(BARRIER_SMTP_AUTH_PATCH)
 SMTP_AUTH_VERSION=	0.31
@@ -472,10 +472,10 @@ PATCHFILES+=	qmail-discard-double-bounce
 .if ${PORT_OPTIONS:MSPF_PATCH}
 . if defined(SLAVE_TLS) || defined(SLAVE_SPAMCONTROL)
 .  if defined(SLAVE_SPAMCONTROL)
-SPF_SPAMCONTROL_PATCH=	qmail-spf-rc5.patch-spamcontrol-27
-MASTER_SITES+=		${MASTER_SITE_LOCAL:S/$/:spf_spamcontrol/}
-MASTER_SITE_SUBDIR+=	garga/qmail/:spf_spamcontrol
-DISTFILES+=		${SPF_SPAMCONTROL_PATCH}:spf_spamcontrol
+SPF_SPAMCONTROL_PATCH=	qmail-spf-rc5.patch-spamcontrol-27_2
+PATCH_SITES+=		${MASTER_SITE_LOCAL:S/$/:spf_spamcontrol/}
+PATCH_SITE_SUBDIR+=	garga/qmail/:spf_spamcontrol
+PATCHFILES+=		${SPF_SPAMCONTROL_PATCH}:spf_spamcontrol
 .  else
 # XXX - Move change out of conflicting Makefile hunk
 .    if ${PORT_OPTIONS:MSMTP_AUTH_PATCH}
@@ -506,13 +506,9 @@ DISTFILES+=	${EXT_BIG_TODO_PATCH}:ext_bi
 . endif
 
 . if ${PORT_OPTIONS:MSPF_PATCH}
-.  if defined(SLAVE_TLS) || defined(SLAVE_SPAMCONTROL)
-.    if defined(SLAVE_SPAMCONTROL)
-EXTTODO_PATCH=	ext_todo-20030105_spf.patch
-.    else
+.  if defined(SLAVE_TLS)
 # XXX - Move qmail-todo out of conflicting Makefile hunk
 EXTTODO_PATCH=	ext_todo-20030105_spf_tls.patch
-.    endif
 MASTER_SITES+=	${MASTER_SITE_LOCAL:S/$/:exttodo/}
 MASTER_SITE_SUBDIR+=	garga/qmail/:exttodo
 DISTFILES+=	${EXTTODO_PATCH}:exttodo
@@ -557,7 +553,11 @@ PATCHFILES+=	qmailqueue-patch
 PATCHFILES+=	big-todo.103.patch
 .endif
 .if ${PORT_OPTIONS:MBIG_CONCURRENCY_PATCH}
+.  if defined(SLAVE_SPAMCONTROL)
+PATCHFILES+=	big-concurrency-spamcontrol-2731.patch
+.  else
 PATCHFILES+=	big-concurrency.patch
+.  endif
 .endif
 .if !empty(PORT_OPTIONS:MOUTGOINGIP_PATCH) && !empty(PORT_OPTIONS:MQMTPC_PATCH)
 PATCHFILES+=	qmail-1.03-qmtpc_outgoingip_20090630.patch:qmtpc_outgoingip
@@ -684,6 +684,40 @@ post-extract:
 .endif
 
 # XXX - Move all the major patch applications to post-extract
+#
+# Apply main distro patch (which requires building a dependency and
+# running a script) before PATCHFILES get applied.
+.if defined(SLAVE_SPAMCONTROL)
+pre-patch:
+.  if ${OSVERSION} < 900007
+# Prevent applying utmpx patch
+	@${ECHO_CMD} > ${WRKSRC}/qbiff.c.patch
+.  endif
+	@${ECHO_CMD} ${WRKDIR} > ${WRKSRC}/conf-qmail
+	@${ECHO_CMD} "# Generated by qmail-spamcontrol FreeBSD port" \
+		> ${WRKSRC}/conf-spamcontrol
+. for option in ${SELECTED_OPTIONS}
+	@${ECHO_CMD} ${option} >> ${WRKSRC}/conf-spamcontrol
+. endfor
+	@${ECHO_CMD} "${UCSPISRC}/compile" > ${WRKSRC}/conf-ucspissl
+	${ECHO_CMD} "${CC} ${CFLAGS}" > ${UCSPISRC}/src/conf-cc
+	${ECHO_CMD} "${CC} ${STRIP} ${LDFLAGS}" > ${UCSPISRC}/src/conf-ld
+	${ECHO_CMD} "${PREFIX}" > ${UCSPISRC}/src/conf-home
+	${ECHO_CMD} "${PREFIX}/bin" > ${UCSPISRC}/src/conf-tcpbin
+	${ECHO_CMD} "/etc/ssl" > ${UCSPISRC}/src/conf-cadir
+	${ECHO_CMD} "/etc/ssl/cert.pem" > ${UCSPISRC}/src/conf-cafile
+	${ECHO_CMD} "/etc/ssl/dh1024.pem" > ${UCSPISRC}/src/conf-dhfile
+	@cd ${UCSPISRC} && ${SETENV} ${MAKE_ENV} package/compile
+	@cd ${WRKSRC} && ${SH} ./install_spamcontrol.sh
+# Any rejected patches are a failure
+	@if [ "`find ${WRKSRC} -name '*.rej' | wc -l`" -ne 0 ]; then \
+		${ECHO_MSG} "===> Failed to apply spamcontrol patch"; \
+		${FALSE}; \
+	fi
+# Fix trailing whitespace which breaks some patches
+	${SED} -i '' -e 's,^\(binm3 binm3+df\) $$,\1,' ${WRKSRC}/Makefile
+.endif
+
 post-patch:
 .if ${PORT_OPTIONS:MSMTP_AUTH_PATCH}
 	@${CP} ${SMTP_AUTH_DIR}/base64.[ch] ${WRKSRC}
@@ -710,33 +744,6 @@ post-patch:
 	  -e "s,MYSQL_LIBS=.*,MYSQL_LIBS=\`${LOCALBASE}/bin/mysql_config --libs\`," \
 		${WRKSRC}/Makefile
 .elif defined(SLAVE_SPAMCONTROL)
-.  if ${OSVERSION} < 900007
-# Prevent applying utmpx patch
-	@${ECHO_CMD} > ${WRKSRC}/qbiff.c.patch
-.  endif
-	@${ECHO_CMD} ${WRKDIR} > ${WRKSRC}/conf-qmail
-	@${ECHO_CMD} "# Generated by qmail-spamcontrol FreeBSD port" \
-		> ${WRKSRC}/conf-spamcontrol
-. for option in ${SELECTED_OPTIONS}
-	@${ECHO_CMD} ${option} >> ${WRKSRC}/conf-spamcontrol
-. endfor
-	@${ECHO_CMD} "${UCSPISRC}/compile" > ${WRKSRC}/conf-ucspissl
-	${ECHO_CMD} "${CC} ${CFLAGS}" > ${UCSPISRC}/src/conf-cc
-	${ECHO_CMD} "${CC} ${STRIP} ${LDFLAGS}" > ${UCSPISRC}/src/conf-ld
-	${ECHO_CMD} "${PREFIX}" > ${UCSPISRC}/src/conf-home
-	${ECHO_CMD} "${PREFIX}/bin" > ${UCSPISRC}/src/conf-tcpbin
-	${ECHO_CMD} "/etc/ssl" > ${UCSPISRC}/src/conf-cadir
-	${ECHO_CMD} "/etc/ssl/cert.pem" > ${UCSPISRC}/src/conf-cafile
-	${ECHO_CMD} "/etc/ssl/dh1024.pem" > ${UCSPISRC}/src/conf-dhfile
-	@cd ${UCSPISRC} && ${SETENV} ${MAKE_ENV} package/compile
-	@cd ${WRKSRC} && ./install_spamcontrol.sh
-	@${PATCH} -d ${WRKSRC} < ${FILESDIR}/extra-patch-spamcontrol-qmail-smtpd.c
-. if ${PORT_OPTIONS:MSPF_PATCH} && defined(SPF_SPAMCONTROL_PATCH)
-	@${PATCH} -d ${WRKSRC} < ${DISTDIR}/${DIST_SUBDIR}/${SPF_SPAMCONTROL_PATCH}
-.  if ${PORT_OPTIONS:MEXTTODO_PATCH} && defined(EXTTODO_PATCH)
-	@${PATCH} -p1 -d ${WRKSRC} < ${DISTDIR}/${DIST_SUBDIR}/${EXTTODO_PATCH}
-.  endif
-. endif
 . if ${PORT_OPTIONS:MSMTPEXTFORK}
 	@${PATCH} -d ${WRKSRC} < ${DISTDIR}/${DIST_SUBDIR}/${SMTPEXTFORK_PATCH}
 .  if ${PORT_OPTIONS:MXF_QUITASAP}

Modified: head/mail/qmail/distinfo
==============================================================================
--- head/mail/qmail/distinfo	Thu Jul  3 02:13:47 2014	(r360337)
+++ head/mail/qmail/distinfo	Thu Jul  3 02:20:07 2014	(r360338)
@@ -10,6 +10,8 @@ SHA256 (qmail/big-todo.103.patch) = afa0
 SIZE (qmail/big-todo.103.patch) = 5546
 SHA256 (qmail/big-concurrency.patch) = 0322991955878e86af495f7317c3a4bd2e60640f9a6dd70ad501fff27242ac2f
 SIZE (qmail/big-concurrency.patch) = 9331
+SHA256 (qmail/big-concurrency-spamcontrol-2731.patch) = 0a9e11a784b1e9b47093aea2c67aef4f8b06d4da5624d5284c978fca0d2c5735
+SIZE (qmail/big-concurrency-spamcontrol-2731.patch) = 9632
 SHA256 (qmail/sendmail-flagf.patch) = 9b3951c22b98c0e5a6ebfa793f052d91dfe01d68a0ad8dc83b8e0bd60c01802e
 SIZE (qmail/sendmail-flagf.patch) = 863
 SHA256 (qmail/patch-qmail-1.03-rfc2821.diff) = c34b331e27882f0596529df14f0e9f24c4dff9f941d04e5df17cc158dddac426
@@ -62,8 +64,8 @@ SHA256 (qmail/ext_todo-20030105_mysql.pa
 SIZE (qmail/ext_todo-20030105_mysql.patch) = 33797
 SHA256 (qmail/ext_todo-20030105_tls.patch) = 0924d3d1287200cb4efc1c3ebfa139f715d3a9d75a6d8af17520c5262a192da2
 SIZE (qmail/ext_todo-20030105_tls.patch) = 33795
-SHA256 (qmail/qmail-spf-rc5.patch-spamcontrol-27) = 71e1d204a2f388fa2d0d9902a4289a46988f45119f91eed2ba4733b9e81dd932
-SIZE (qmail/qmail-spf-rc5.patch-spamcontrol-27) = 64059
+SHA256 (qmail/qmail-spf-rc5.patch-spamcontrol-27_2) = bd53c0ce09ce68e9638abcab7f36a1e259ffb41737e27f6b8d9e0315f2d09524
+SIZE (qmail/qmail-spf-rc5.patch-spamcontrol-27_2) = 64058
 SHA256 (qmail/auth.patch.diff) = 1d0f8e0ce139cd00b86f056bc31c1422d30b88cb8b125023d534cc3664f827b8
 SIZE (qmail/auth.patch.diff) = 4412
 SHA256 (qmail/auth.patch.diff-tls-20110119) = 838a35ea92990775fa96567366249f70e7edbfdf127bebbc23b3df58eb086921



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