From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 658DB15800F for ; Sat, 21 Jan 2023 03:32:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7BC6DE08C3; Sat, 21 Jan 2023 03:32:53 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6067AE08C3 for ; Sat, 21 Jan 2023 03:32:53 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 685DD340CBB for ; Sat, 21 Jan 2023 03:32:52 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 117FC87B for ; Sat, 21 Jan 2023 03:32:50 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1674271892.831dd1209afaf2553baef3264b46b062d76e80b6.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/rsync/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-misc/rsync/rsync-3.2.7-r2.ebuild net-misc/rsync/rsync-9999.ebuild X-VCS-Directories: net-misc/rsync/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 831dd1209afaf2553baef3264b46b062d76e80b6 X-VCS-Branch: master Date: Sat, 21 Jan 2023 03:32:50 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: b91173fa-b1d3-4561-8e70-493f51b71457 X-Archives-Hash: 68522e6aa031215a29e900a9076f14da commit: 831dd1209afaf2553baef3264b46b062d76e80b6 Author: Sam James gentoo org> AuthorDate: Sat Jan 21 03:31:14 2023 +0000 Commit: Sam James gentoo org> CommitDate: Sat Jan 21 03:31:32 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=831dd120 net-misc/rsync: handle ubsan Pass -DCAREFUL_ALIGNMENT if building with -fsanitize=undefined to disable intentional unaligned accesses which UBSAN would otherwise flag. Signed-off-by: Sam James gentoo.org> net-misc/rsync/rsync-3.2.7-r2.ebuild | 10 +++++++++- net-misc/rsync/rsync-9999.ebuild | 14 +++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/net-misc/rsync/rsync-3.2.7-r2.ebuild b/net-misc/rsync/rsync-3.2.7-r2.ebuild index fae9369c193c..4dc746f9c96a 100644 --- a/net-misc/rsync/rsync-3.2.7-r2.ebuild +++ b/net-misc/rsync/rsync-3.2.7-r2.ebuild @@ -6,7 +6,7 @@ EAPI=8 # Uncomment when introducing a patch which touches configure #RSYNC_NEEDS_AUTOCONF=1 PYTHON_COMPAT=( python3_{9..11} ) -inherit prefix python-single-r1 systemd +inherit flag-o-matic prefix python-single-r1 systemd DESCRIPTION="File transfer program to keep remote files into sync" HOMEPAGE="https://rsync.samba.org/" @@ -125,6 +125,14 @@ src_configure() { $(use_enable zstd) ) + # https://github.com/WayneD/rsync/pull/428 + if is-flagq -fsanitize=undefined ; then + sed -E -i \ + -e 's:#define CAREFUL_ALIGNMENT (0|1):#define CAREFUL_ALIGNMENT 1:' \ + byteorder.h || die + append-flags -DCAREFUL_ALIGNMENT + fi + econf "${myeconfargs[@]}" } diff --git a/net-misc/rsync/rsync-9999.ebuild b/net-misc/rsync/rsync-9999.ebuild index 4d23490d778c..4dc746f9c96a 100644 --- a/net-misc/rsync/rsync-9999.ebuild +++ b/net-misc/rsync/rsync-9999.ebuild @@ -6,7 +6,7 @@ EAPI=8 # Uncomment when introducing a patch which touches configure #RSYNC_NEEDS_AUTOCONF=1 PYTHON_COMPAT=( python3_{9..11} ) -inherit prefix python-single-r1 systemd +inherit flag-o-matic prefix python-single-r1 systemd DESCRIPTION="File transfer program to keep remote files into sync" HOMEPAGE="https://rsync.samba.org/" @@ -76,6 +76,10 @@ else BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-waynedavison )" fi +PATCHES=( + "${FILESDIR}"/${P}-flist-memcmp-ub.patch +) + pkg_setup() { # - USE=examples needs Python itself at runtime, but nothing else # - 9999 needs commonmark at build time @@ -121,6 +125,14 @@ src_configure() { $(use_enable zstd) ) + # https://github.com/WayneD/rsync/pull/428 + if is-flagq -fsanitize=undefined ; then + sed -E -i \ + -e 's:#define CAREFUL_ALIGNMENT (0|1):#define CAREFUL_ALIGNMENT 1:' \ + byteorder.h || die + append-flags -DCAREFUL_ALIGNMENT + fi + econf "${myeconfargs[@]}" }