From b68850d256ee7f599a74f2714e3a8cf2d4cd9e43 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 23 Jan 2023 07:22:43 +0000 Subject: [PATCH] net-misc/rsync: Sync with Gentoo It's from Gentoo commit 831dd1209afaf2553baef3264b46b062d76e80b6. --- .../files/rsync-3.2.7-flist-memcmp-ub.patch | 21 +++++++++++++++++++ .../net-misc/rsync/rsync-3.2.4-r3.ebuild | 4 ++-- ...-3.2.7-r1.ebuild => rsync-3.2.7-r2.ebuild} | 18 +++++++++++++--- .../net-misc/rsync/rsync-9999.ebuild | 18 +++++++++++++--- 4 files changed, 53 insertions(+), 8 deletions(-) create mode 100644 sdk_container/src/third_party/portage-stable/net-misc/rsync/files/rsync-3.2.7-flist-memcmp-ub.patch rename sdk_container/src/third_party/portage-stable/net-misc/rsync/{rsync-3.2.7-r1.ebuild => rsync-3.2.7-r2.ebuild} (92%) diff --git a/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/rsync-3.2.7-flist-memcmp-ub.patch b/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/rsync-3.2.7-flist-memcmp-ub.patch new file mode 100644 index 0000000000..9aa1b93e2c --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/rsync-3.2.7-flist-memcmp-ub.patch @@ -0,0 +1,21 @@ +https://github.com/WayneD/rsync/issues/427 +https://github.com/WayneD/rsync/issues/429 +https://github.com/WayneD/rsync/commit/90df93e446f9ebbfd4ce97d6755c5fe1f45f9fd0 + +From 90df93e446f9ebbfd4ce97d6755c5fe1f45f9fd0 Mon Sep 17 00:00:00 2001 +From: Wayne Davison +Date: Sun, 8 Jan 2023 21:35:39 -0800 +Subject: [PATCH] Don't call memcmp() on an empty lastdir. + +--- a/flist.c ++++ b/flist.c +@@ -2367,7 +2367,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[]) + } + + dirlen = dir ? strlen(dir) : 0; +- if (dirlen != lastdir_len || memcmp(lastdir, dir, dirlen) != 0) { ++ if (dirlen != lastdir_len || (dirlen && memcmp(lastdir, dir, dirlen) != 0)) { + if (!change_pathname(NULL, dir, -dirlen)) + goto bad_path; + lastdir = pathname; + diff --git a/sdk_container/src/third_party/portage-stable/net-misc/rsync/rsync-3.2.4-r3.ebuild b/sdk_container/src/third_party/portage-stable/net-misc/rsync/rsync-3.2.4-r3.ebuild index 05ce39b226..927590cf6b 100644 --- a/sdk_container/src/third_party/portage-stable/net-misc/rsync/rsync-3.2.4-r3.ebuild +++ b/sdk_container/src/third_party/portage-stable/net-misc/rsync/rsync-3.2.4-r3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -10,7 +10,7 @@ fi WANT_LIBTOOL=none -PYTHON_COMPAT=( python3_{8..10} ) +PYTHON_COMPAT=( python3_{9..10} ) inherit autotools flag-o-matic prefix python-single-r1 systemd DESCRIPTION="File transfer program to keep remote files into sync" diff --git a/sdk_container/src/third_party/portage-stable/net-misc/rsync/rsync-3.2.7-r1.ebuild b/sdk_container/src/third_party/portage-stable/net-misc/rsync/rsync-3.2.7-r2.ebuild similarity index 92% rename from sdk_container/src/third_party/portage-stable/net-misc/rsync/rsync-3.2.7-r1.ebuild rename to sdk_container/src/third_party/portage-stable/net-misc/rsync/rsync-3.2.7-r2.ebuild index 6c31cf7b85..4dc746f9c9 100644 --- a/sdk_container/src/third_party/portage-stable/net-misc/rsync/rsync-3.2.7-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/net-misc/rsync/rsync-3.2.7-r2.ebuild @@ -1,12 +1,12 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 # Uncomment when introducing a patch which touches configure #RSYNC_NEEDS_AUTOCONF=1 -PYTHON_COMPAT=( python3_{8..10} ) -inherit prefix python-single-r1 systemd +PYTHON_COMPAT=( python3_{9..11} ) +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[@]}" } diff --git a/sdk_container/src/third_party/portage-stable/net-misc/rsync/rsync-9999.ebuild b/sdk_container/src/third_party/portage-stable/net-misc/rsync/rsync-9999.ebuild index 6c31cf7b85..4dc746f9c9 100644 --- a/sdk_container/src/third_party/portage-stable/net-misc/rsync/rsync-9999.ebuild +++ b/sdk_container/src/third_party/portage-stable/net-misc/rsync/rsync-9999.ebuild @@ -1,12 +1,12 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 # Uncomment when introducing a patch which touches configure #RSYNC_NEEDS_AUTOCONF=1 -PYTHON_COMPAT=( python3_{8..10} ) -inherit prefix python-single-r1 systemd +PYTHON_COMPAT=( python3_{9..11} ) +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[@]}" }