tl;dr: diff to reduce size of postfix-* packages and start providing
debug-postfix-* packages.
..
danj noticed that Postfix packages are now rather large. Seems the size
of all of the non-database flavours jumped substantially between 3.10
and 3.11.
ver !db db
3.5.25 7.5M 7.7M
3.10.8 42M 265M
3.11.1 176M 273M
3.5 is much smaller as it doesn't carry around statically-linked openssl.
tb@ checked and found that many more binaries are (static) linked to
libcrypto which would account for a big change.
Many of the binaries carry (some) debug symbols, although the Postfix
build does not use -g. I suppose the symbols would be coming from
libraries (I expect probably largely from those static libcrypto).
Some binaries are installed by the postfix-install script which aren't
stripped; some by ${INSTALL_PROGRAM} which are.
Here's a diff to handle debug symbols more consistently, using
DEBUG_PACKAGES so that debug packages are provided for some archs (in
those cases ports infrastructure handles separating/stripping) and
executables are stripped explicitly on other archs. (Slightly awkward
handling via a shell test rather than make .if because the variables
aren't available when Makefile.inc is parsed, but it does work).
postfix debug-postfix
ver !db db !db db
3.5.25 7.5M 7.7M 8.9M 9.3M
3.11.1 78M 110M 103M 154M
ok?
Index: Makefile.inc
===================================================================
RCS file: /cvs/ports/mail/postfix/Makefile.inc,v
diff -u -p -r1.114 Makefile.inc
--- Makefile.inc 9 Jul 2025 19:44:11 -0000 1.114
+++ Makefile.inc 28 Mar 2026 16:27:08 -0000
@@ -49,6 +49,8 @@ NO_TEST= Yes
FLAVORS+= sasl2 ldap mysql pgsql
FLAVOR?=
+DEBUG_PACKAGES= ${BUILD_PACKAGES}
+
# TLS support in Postfix 3.6+ requires OpenSSL 1.1.1+ and does require
# APIs which are not available in LibreSSL. It is linked statically
# to avoid conflicting with shared libssl/libcrypto from the base OS
@@ -138,3 +140,8 @@ do-install:
@chown -h ${BINOWN}:${BINGRP} ${PREFIX}/{sbin,libexec/postfix}/*
@chown -R ${MANOWN}:${MANGRP} ${PREFIX}/man
@chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/share
+ if [ "${INSTALL_STRIP}" == -s ]; then \
+ for i in ${PREFIX}/{sbin,libexec/postfix}/*; do \
+ file $$i | grep -q script || strip $$i; \
+ done; \
+ fi
Index: stable/Makefile
===================================================================
RCS file: /cvs/ports/mail/postfix/stable/Makefile,v
diff -u -p -r1.279 Makefile
--- stable/Makefile 21 Mar 2026 19:30:29 -0000 1.279
+++ stable/Makefile 28 Mar 2026 16:27:08 -0000
@@ -1,4 +1,5 @@
VERSION= 3.11.1
+REVISION= 0
EPOCH= 0
Index: stable35/Makefile
===================================================================
RCS file: /cvs/ports/mail/postfix/stable35/Makefile,v
diff -u -p -r1.10 Makefile
--- stable35/Makefile 1 Jun 2024 07:12:16 -0000 1.10
+++ stable35/Makefile 28 Mar 2026 16:27:08 -0000
@@ -1,5 +1,5 @@
VERSION= 3.5.25
-REVISION= 0
+REVISION= 1
PORTROACH= site:https://ftp.fu-berlin.de/unix/mail/postfix/official/
SITES= ${SITE_POSTFIX:=official/}
No comments:
Post a Comment