mail/postfix-current: Update to 3.11.20250304

And while here, also fix pkg-install in the same way as in mail/postfix

Reported by:	Herbert J. Skuhra <herbert@gojira.at>
This commit is contained in:
Juraj Lutter 2025-03-05 09:06:07 +01:00
parent fdf0c31cec
commit f54649eb20
3 changed files with 27 additions and 45 deletions

View file

@ -1,6 +1,6 @@
PORTNAME= postfix PORTNAME= postfix
DISTVERSION= 3.10-20241027 DISTVERSION= 3.11-20250304
PORTREVISION?= 1 PORTREVISION?= 0
PORTEPOCH= 6 PORTEPOCH= 6
CATEGORIES= mail CATEGORIES= mail
MASTER_SITES= https://postfix-mirror.horus-it.com/postfix-release/ \ MASTER_SITES= https://postfix-mirror.horus-it.com/postfix-release/ \
@ -135,6 +135,8 @@ SASLKMIT_LIB_DEPENDS= libkrb5.so:security/krb5
SASL_LIB_DEPENDS= libsasl2.so:security/cyrus-sasl2 SASL_LIB_DEPENDS= libsasl2.so:security/cyrus-sasl2
SQLITE_USES= sqlite SQLITE_USES= sqlite
ALL_TARGET= default
.include <bsd.port.options.mk> .include <bsd.port.options.mk>
HTML1= body_checks.5.html bounce.5.html postfix-power.png \ HTML1= body_checks.5.html bounce.5.html postfix-power.png \
@ -192,10 +194,7 @@ SHLIB_DIRECTORY= ${PREFIX}/lib/postfix
# keep compatiblity with Postfix 2.6 .. 2.11 and use DAEMOMDIR # keep compatiblity with Postfix 2.6 .. 2.11 and use DAEMOMDIR
META_DIRECTORY= ${DAEMONDIR} META_DIRECTORY= ${DAEMONDIR}
SUB_LIST+= DAEMONDIR="${DAEMONDIR}" \ SUB_LIST+= REQUIRE="${_REQUIRE}"
META_DIRECTORY="${META_DIRECTORY}" \
READMEDIR="${READMEDIR}" \
REQUIRE="${_REQUIRE}"
SUB_FILES+= mailer.conf.postfix pkg-install pkg-message SUB_FILES+= mailer.conf.postfix pkg-install pkg-message
POSTFIX_CCARGS+= -DDEF_CONFIG_DIR=\\\"${ETCDIR}\\\" \ POSTFIX_CCARGS+= -DDEF_CONFIG_DIR=\\\"${ETCDIR}\\\" \
@ -381,19 +380,18 @@ post-patch:
>> ${WRKSRC}/conf/postfix-files >> ${WRKSRC}/conf/postfix-files
do-configure: do-configure:
(cd ${WRKSRC} && ${MAKE} -f Makefile.init makefiles \ ${MAKE} -C ${WRKSRC} -f Makefile.init makefiles \
${MAKEFILEFLAGS} CCARGS="${POSTFIX_CCARGS}" \ ${MAKEFILEFLAGS} CCARGS="${POSTFIX_CCARGS}" \
shared=yes shlib_directory=${SHLIB_DIRECTORY} \ shared=yes shlib_directory=${SHLIB_DIRECTORY} \
dynamicmaps=yes \ dynamicmaps=yes \
${POSTFIX_DYN_AUXLIBS} \ ${POSTFIX_DYN_AUXLIBS} \
AUXLIBS="${POSTFIX_AUXLIBS}" && \ AUXLIBS="${POSTFIX_AUXLIBS}"
${ECHO_CMD} "all: default" >> Makefile)
pre-install-INST_BASE-on: pre-install-INST_BASE-on:
${MKDIR} ${STAGEDIR}/etc/rc.d ${MKDIR} ${STAGEDIR}/etc/rc.d
do-install: do-install:
@(cd ${WRKSRC} && ${MAKE} non-interactive-package \ ${MAKE} -C ${WRKSRC} non-interactive-package \
install_root=${STAGEDIR} tempdir=${WRKDIR} \ install_root=${STAGEDIR} tempdir=${WRKDIR} \
shlib_directory=${SHLIB_DIRECTORY} \ shlib_directory=${SHLIB_DIRECTORY} \
config_directory=${ETCDIR} \ config_directory=${ETCDIR} \
@ -405,7 +403,7 @@ do-install:
manpage_directory=${PREFIX}/share/man \ manpage_directory=${PREFIX}/share/man \
newaliases_path=${PREFIX}/bin/newaliases \ newaliases_path=${PREFIX}/bin/newaliases \
readme_directory=${READMEDIR} \ readme_directory=${READMEDIR} \
sendmail_path=${PREFIX}/sbin/sendmail ) sendmail_path=${PREFIX}/sbin/sendmail
${INSTALL_SCRIPT} ${WRKSRC}/auxiliary/rmail/rmail ${STAGEDIR}${PREFIX}/bin/rmail ${INSTALL_SCRIPT} ${WRKSRC}/auxiliary/rmail/rmail ${STAGEDIR}${PREFIX}/bin/rmail
${INSTALL_SCRIPT} ${WRKSRC}/auxiliary/qshape/qshape.pl ${STAGEDIR}${PREFIX}/bin/qshape ${INSTALL_SCRIPT} ${WRKSRC}/auxiliary/qshape/qshape.pl ${STAGEDIR}${PREFIX}/bin/qshape

View file

@ -1,3 +1,3 @@
TIMESTAMP = 1730106761 TIMESTAMP = 1741159933
SHA256 (postfix/postfix-3.10-20241027.tar.gz) = 8991606db1b85618849b079b4c2bbfe56a46bc957b8b4bcb21464aa75ce5e97c SHA256 (postfix/postfix-3.11-20250304.tar.gz) = 19f30dd72a67bdac7383819aee587b07b7f4e854a4ad2517da78a28db5487881
SIZE (postfix/postfix-3.10-20241027.tar.gz) = 5005876 SIZE (postfix/postfix-3.11-20250304.tar.gz) = 5048687

View file

@ -9,17 +9,12 @@ BATCH=${BATCH:=no}
POSTFIX_DEFAULT_MTA=${POSTFIX_DEFAULT_MTA:=no} POSTFIX_DEFAULT_MTA=${POSTFIX_DEFAULT_MTA:=no}
# fixed vars # fixed vars
PREFIX="%%PREFIX%%" MC_TEMPLATE="${PKG_ROOTDIR}${PKG_PREFIX}/share/postfix/mailer.conf.postfix"
ETCDIR="%%ETCDIR%%"
DAEMONDIR="%%DAEMONDIR%%"
META_DIRECTORY="%%META_DIRECTORY%%"
READMEDIR="%%READMEDIR%%"
MC_TEMPLATE="%%DATADIR%%/mailer.conf.postfix"
# FreeBSD <= 10.3 # FreeBSD <= 10.3
MC_BASE="/etc/mail/mailer.conf" MC_BASE="${PKG_ROOTDIR}etc/mail/mailer.conf"
# FreeBSD >= 10.3 (and current) # FreeBSD >= 10.3 (and current)
MC_LOCALBASE="%%LOCALBASE%%/etc/mail/mailer.conf" MC_LOCALBASE="${PKG_ROOTDIR}%%LOCALBASE%%/etc/mail/mailer.conf"
USE_LOCALBASE_MAILER_CONF="%%USE_LOCALBASE_MAILER_CONF%%" USE_LOCALBASE_MAILER_CONF="%%USE_LOCALBASE_MAILER_CONF%%"
if [ "${POSTFIX_DEFAULT_MTA}" = "no" ]; then if [ "${POSTFIX_DEFAULT_MTA}" = "no" ]; then
@ -89,7 +84,7 @@ show_not_activated_msg() {
echo "To finish installation run the following commands:" echo "To finish installation run the following commands:"
echo echo
if [ "${USE_LOCALBASE_MAILER_CONF}" = "yes" ]; then if [ "${USE_LOCALBASE_MAILER_CONF}" = "yes" ]; then
echo " mkdir -p %%LOCALBASE%%/etc/mail" echo " mkdir -p ${PKG_ROOTDIR}%%LOCALBASE%%/etc/mail"
else else
echo " mv -f ${mailerconf} ${mailerconf}.old" echo " mv -f ${mailerconf} ${mailerconf}.old"
fi fi
@ -121,36 +116,25 @@ install_mailer_conf() {
mailerconf=$1 mailerconf=$1
echo "Activate Postfix in ${mailerconf}" echo "Activate Postfix in ${mailerconf}"
if [ "${USE_LOCALBASE_MAILER_CONF}" = "yes" ]; then if [ "${USE_LOCALBASE_MAILER_CONF}" = "yes" ]; then
[ -d %%LOCALBASE%%/etc/mail ] || mkdir -p %%LOCALBASE%%/etc/mail [ -d "${PKG_ROOTDIR}%%LOCALBASE%%/etc/mail" ] || \
mkdir -p "${PKG_ROOTDIR}/%LOCALBASE%%/etc/mail"
fi fi
[ -f ${mailerconf} ] && mv -f ${mailerconf} ${mailerconf}.old [ -f ${mailerconf} ] && mv -f ${mailerconf} ${mailerconf}.old
install -m 644 ${MC_TEMPLATE} ${mailerconf} install -m 644 ${MC_TEMPLATE} ${mailerconf}
} }
# ============================================================================== show_needs_reload_msg() {
# Run postfix reload echo "==============================================================="
# This is a candidate for a dedicated pkg-post-upgrade script, but it seems echo "Postfix installation changed, please run 'postfix reload'"
# this not fully implemented in pkg :(see upstream PR 941) echo "==============================================================="
# ==============================================================================
try_reload(){
${PREFIX}/sbin/postfix status 2>/dev/null
if [ $? -eq 0 ]; then
${PREFIX}/sbin/postfix reload
else
echo "postfix not running"
fi
} }
# ============================================================================== # ==============================================================================
# Run postfix post-install to fix permissions and new config values # Fix permissions and new config values after installation
# ============================================================================== # ==============================================================================
if [ "$2" = "POST-INSTALL" ]; then if [ "$2" = "POST-INSTALL" ]; then
/bin/sh ${DAEMONDIR}/post-install tempdir=/tmp \ chroot "${PKG_ROOTDIR}" \
daemon_directory=${DAEMONDIR} \ "${PKG_PREFIX}"/sbin/postfix set-permissions upgrade-configuration
meta_directory=${META_DIRECTORY} \
html_directory=${READMEDIR} \
readme_directory=${READMEDIR} \
upgrade-package
fi fi
# ============================================================================== # ==============================================================================
@ -165,7 +149,7 @@ if [ -f "${MC_BASE}" ]; then
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
show_activated_msg ${MC_BASE} show_activated_msg ${MC_BASE}
cmp_mailer ${MC_LOCALBASE} || install_mailer_conf ${MC_LOCALBASE} cmp_mailer ${MC_LOCALBASE} || install_mailer_conf ${MC_LOCALBASE}
try_reload show_needs_reload_msg
else else
cmp_mailer ${MC_LOCALBASE} || install_choice ${MC_LOCALBASE} cmp_mailer ${MC_LOCALBASE} || install_choice ${MC_LOCALBASE}
fi fi
@ -175,7 +159,7 @@ if [ -f "${MC_BASE}" ]; then
install_choice ${MC_BASE} install_choice ${MC_BASE}
else else
show_activated_msg ${MC_BASE} show_activated_msg ${MC_BASE}
try_reload show_needs_reload_msg
fi fi
fi fi