git: 469adf44f1c6 - 2024Q2 - archivers/urbackup-{client,server}: Fix segfault (cryptopp)

From: Nuno Teixeira <eduardo_at_FreeBSD.org>
Date: Fri, 10 May 2024 21:20:11 UTC
The branch 2024Q2 has been updated by eduardo:

URL: https://cgit.FreeBSD.org/ports/commit/?id=469adf44f1c6f846ea06e4de2e5bae0e3339c7f3

commit 469adf44f1c6f846ea06e4de2e5bae0e3339c7f3
Author:     ek <ek@purplehat.org>
AuthorDate: 2024-05-10 15:19:22 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2024-05-10 21:11:30 +0000

    archivers/urbackup-{client,server}: Fix segfault (cryptopp)
    
    - Add -DCRYPTOPP_DISABLE_ASM to CXXFLAGS on i386 and amd64, as
      cryptopp-8.7.0 build with this option by default on i386 and amd64.
     (5a19c08: security/cryptopp: Update to 8.7.0)
    
    PR:             266531, 278163, 278859
    MFH:            2024Q2
    (cherry picked from commit 577ac1f839b1b164bd42af7c94a15be017b5e1d7)
---
 archivers/urbackup-client/Makefile | 10 +++++++++-
 archivers/urbackup-server/Makefile | 10 +++++++++-
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/archivers/urbackup-client/Makefile b/archivers/urbackup-client/Makefile
index 59cd8bb07237..68a533fc0568 100644
--- a/archivers/urbackup-client/Makefile
+++ b/archivers/urbackup-client/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	urbackup-client
 DISTVERSION=	2.5.20.0
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	archivers
 MASTER_SITES=	https://hndl.urbackup.org/Client/${DISTVERSION:R}/
 
@@ -40,6 +40,14 @@ GUI_CONFIGURE_OFF=	--enable-headless
 CONFFILES=	mariadbdump.conf mariadbxtrabackup.conf postgresbase.conf \
 		postgresqldump.conf
 
+.include <bsd.port.options.mk>
+
+# Fix segmentation fault, PR 266531
+# see also 5a19c08: security/cryptopp: Update to 8.7.0
+.if ${ARCH} == i386 || ${ARCH} == amd64
+CXXFLAGS+=	-DCRYPTOPP_DISABLE_ASM
+.endif
+
 post-patch:
 	@${SED} -i "" -e "s:%%PREFIX%%:${PREFIX}:g" \
 		${WRKSRC}/urbackupclient/backup_scripts/postgresqldump
diff --git a/archivers/urbackup-server/Makefile b/archivers/urbackup-server/Makefile
index 9e1496f50f5e..d8677cfa4f21 100644
--- a/archivers/urbackup-server/Makefile
+++ b/archivers/urbackup-server/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	urbackup-server
 DISTVERSION=	2.5.26
-PORTREVISION=	4
+PORTREVISION=	5
 CATEGORIES=	archivers
 MASTER_SITES=	https://hndl.urbackup.org/Server/${DISTVERSION}/
 
@@ -25,6 +25,14 @@ GNU_CONFIGURE=	yes
 CONFIGURE_ARGS=	--enable-packaging --with-mountvhd --without-embedded-sqlite3 --without-embedded-lmdb --without-embedded-lua
 LDFLAGS+=	-L${LOCALBASE}/lib
 
+.include <bsd.port.options.mk>
+
+# Fix segmentation fault, PR 266531
+# see also 5a19c08: security/cryptopp: Update to 8.7.0
+.if ${ARCH} == i386 || ${ARCH} == amd64
+CXXFLAGS+=	-DCRYPTOPP_DISABLE_ASM
+.endif
+
 SUB_FILES=	pkg-message urbackupsrv.conf.sample-daemon
 
 USERS=		urbackup