mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-28 00:51:41 +02:00
net-misc/rsync: Sync with Gentoo
It's from Gentoo commit 831dd1209afaf2553baef3264b46b062d76e80b6.
This commit is contained in:
parent
83a3d2a365
commit
b68850d256
@ -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 <wayne@opencoder.net>
|
||||
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;
|
||||
|
@ -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"
|
||||
|
@ -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[@]}"
|
||||
}
|
||||
|
@ -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[@]}"
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user