- Update to 2.7.5
- Use ports framework to create USERS and GROUPS - Remove unused replace() function from pkg-install
This commit is contained in:
parent
b9f86503bb
commit
87594aa042
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=278549
@ -6,7 +6,7 @@
|
||||
#
|
||||
|
||||
PORTNAME= postfix
|
||||
PORTVERSION= 2.7.4
|
||||
PORTVERSION= 2.7.5
|
||||
PORTEPOCH= 1
|
||||
CATEGORIES= mail ipv6
|
||||
MASTER_SITES= ftp://ftp.porcupine.org/mirrors/postfix-release/official/ \
|
||||
@ -25,6 +25,8 @@ CONFLICTS= courier-0.* postfix-1.* postfix-2.[0-689].* postfix-base-2.[0-689].*
|
||||
postfix-current-2.* postfix-current-base-2.* sendmail-8.* \
|
||||
sendmail+*-8.* smail-3.* zmailer-2.*
|
||||
|
||||
USERS= postfix
|
||||
GROUPS= mail maildrop postfix
|
||||
NO_LATEST_LINK= yes
|
||||
USE_SUBMAKE= yes
|
||||
USE_PERL5_BUILD=yes
|
||||
@ -335,9 +337,6 @@ do-configure:
|
||||
CCARGS="${POSTFIX_CCARGS}" AUXLIBS="${POSTFIX_AUXLIBS}" && \
|
||||
${ECHO} "all: default" >> Makefile)
|
||||
|
||||
pre-su-install:
|
||||
@${SETENV} ${SCRIPTS_ENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
|
||||
|
||||
do-install:
|
||||
@cd ${WRKSRC} && ${SH} postfix-install -non-interactive install_root=/ tempdir=/tmp \
|
||||
config_directory=${ETCDIR} \
|
||||
|
@ -1,5 +1,5 @@
|
||||
SHA256 (postfix/postfix-2.7.4.tar.gz) = 9bad5851e8a7c97890ee9465e7f675f7826d56361369d3e792a79eaf98ed2b11
|
||||
SIZE (postfix/postfix-2.7.4.tar.gz) = 3423968
|
||||
SHA256 (postfix/postfix-2.7.5.tar.gz) = 2fe408f49bc8540bc41b44f1b7ee7a27561f1baa4e25ef55645778ba96d15932
|
||||
SIZE (postfix/postfix-2.7.5.tar.gz) = 3425071
|
||||
SHA256 (postfix/postfix-2.7.1-libspf2-1.2.x-4.patch.gz) = b67efb1ffbcae91f13bf3ed90a5181d4b5bc86ebe15753eaf9db8b2278f5bb16
|
||||
SIZE (postfix/postfix-2.7.1-libspf2-1.2.x-4.patch.gz) = 8186
|
||||
SHA256 (postfix/postfix-vda-2.7.2.patch) = f9b12376983833ef9305f7696e9792b62058f242ff2630aeb0866cf686f0a14b
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD: /tmp/pcvs/ports/mail/postfix27/files/pkg-install.in,v 1.5 2011-01-24 23:38:35 sahil Exp $
|
||||
# $FreeBSD: /tmp/pcvs/ports/mail/postfix27/files/pkg-install.in,v 1.6 2011-07-30 01:34:53 sahil Exp $
|
||||
#
|
||||
|
||||
# If the POSTFIX_DEFAULT_MTA environment variable is set to YES, it
|
||||
@ -56,64 +56,6 @@ yesno() {
|
||||
done
|
||||
}
|
||||
|
||||
if [ "$2" = "PRE-INSTALL" ]; then
|
||||
USER=postfix
|
||||
UID=125
|
||||
GROUP=postfix
|
||||
GID=125
|
||||
GROUP2=maildrop
|
||||
GID2=126
|
||||
|
||||
if /usr/sbin/pw groupshow "${GROUP}" 2>/dev/null; then
|
||||
echo "You already have a group \"${GROUP}\", so I will use it."
|
||||
else
|
||||
if /usr/sbin/pw groupadd ${GROUP} -g ${GID}; then
|
||||
echo "Added group \"${GROUP}\"."
|
||||
else
|
||||
echo "Adding group \"${GROUP}\" failed..."
|
||||
echo "Please create it, and try again."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if /usr/sbin/pw groupshow "${GROUP2}" 2>/dev/null; then
|
||||
echo "You already have a group \"${GROUP2}\", so I will use it."
|
||||
else
|
||||
if /usr/sbin/pw groupadd ${GROUP2} -g ${GID2}; then
|
||||
echo "Added group \"${GROUP2}\"."
|
||||
else
|
||||
echo "Adding group \"${GROUP2}\" failed..."
|
||||
echo "Please create it, and try again."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if /usr/sbin/pw user show "${USER}" 2>/dev/null; then
|
||||
echo "You already have a user \"${USER}\", so I will use it."
|
||||
else
|
||||
if /usr/sbin/pw useradd ${USER} -u ${UID} -g ${GROUP} -h - -d /var/spool/postfix -s ${NOLOGIN} -c "Postfix Mail System"; then
|
||||
echo "Added user \"${USER}\"."
|
||||
else
|
||||
echo "Adding user \"${USER}\" failed..."
|
||||
echo "Please create it, and try again."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if /usr/sbin/pw show group mail | grep -q "${USER}" 2>/dev/null; then
|
||||
echo "You already have user \"${USER}\" in group \"mail\", so I will use it."
|
||||
else
|
||||
echo "You need user \"${USER}\" added to group \"mail\"."
|
||||
if yesno "Would you like me to add it" y; then
|
||||
/usr/sbin/pw groupmod mail -m ${USER} || exit
|
||||
echo "Done."
|
||||
else
|
||||
echo "Please create it, and try again."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$2" = "POST-INSTALL" ]; then
|
||||
SAMPLES="main.cf master.cf"
|
||||
for file in $SAMPLES
|
||||
@ -130,20 +72,6 @@ if [ "$2" = "POST-INSTALL" ]; then
|
||||
upgrade-package
|
||||
fi
|
||||
|
||||
replace() {
|
||||
local orig repl
|
||||
|
||||
orig=$1
|
||||
repl=$2
|
||||
if [ -e ${orig} ]; then
|
||||
/bin/mv -f ${orig} ${orig}.OFF
|
||||
/bin/chmod 0 ${orig}.OFF
|
||||
fi
|
||||
if [ -e ${repl} ]; then
|
||||
/bin/ln -s ${repl} ${orig}
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "$2" = "POST-INSTALL" -a -z "${PACKAGE_BUILDING}" ]; then
|
||||
egrep -q "^sendmail.*${PREFIX}/sbin/sendmail" ${MC} && \
|
||||
egrep -q "^send-mail.*${PREFIX}/sbin/sendmail" ${MC} && \
|
||||
|
Loading…
Reference in New Issue
Block a user