From d4ec26f33ad45db022ed07838ceb15945dbe2c0c5f57e0bedcf189d43adf7ff6 Mon Sep 17 00:00:00 2001 From: Pedro Monreal Gonzalez Date: Mon, 15 Apr 2019 16:47:49 +0000 Subject: [PATCH] Accepting request 694586 from home:matwey:branches:network - Add patch: rsync-fix-prealloc-to-keep-file-size-0-when-possible.patch (boo#1108562) OBS-URL: https://build.opensuse.org/request/show/694586 OBS-URL: https://build.opensuse.org/package/show/network/rsync?expand=0&rev=73 --- ...oc-to-keep-file-size-0-when-possible.patch | 25 +++++++++++++++++++ rsync.changes | 5 ++++ rsync.spec | 5 +++- 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 rsync-fix-prealloc-to-keep-file-size-0-when-possible.patch diff --git a/rsync-fix-prealloc-to-keep-file-size-0-when-possible.patch b/rsync-fix-prealloc-to-keep-file-size-0-when-possible.patch new file mode 100644 index 0000000..9c07870 --- /dev/null +++ b/rsync-fix-prealloc-to-keep-file-size-0-when-possible.patch @@ -0,0 +1,25 @@ +From c2da3809f714d936dec1cab6d5bf8b724b9cd113 Mon Sep 17 00:00:00 2001 +From: Wayne Davison +Date: Tue, 15 Jan 2019 08:51:08 -0800 +Subject: [PATCH] Fix --prealloc to keep file-size 0 when possible. + +--- + syscall.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/syscall.c b/syscall.c +index dbd556b8..0d1221b3 100644 +--- a/syscall.c ++++ b/syscall.c +@@ -462,7 +462,7 @@ int do_utime(const char *fname, time_t modtime, UNUSED(uint32 mod_nsec)) + + OFF_T do_fallocate(int fd, OFF_T offset, OFF_T length) + { +- int opts = inplace || preallocate_files ? 0 : DO_FALLOC_OPTIONS; ++ int opts = inplace || preallocate_files ? DO_FALLOC_OPTIONS : 0; + int ret; + RETURN_ERROR_IF(dry_run, 0); + RETURN_ERROR_IF_RO_OR_LO; +-- +2.16.4 + diff --git a/rsync.changes b/rsync.changes index c788432..7184ce6 100644 --- a/rsync.changes +++ b/rsync.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Apr 13 09:49:56 UTC 2019 - Matwey V. Kornilov + +- Add patch: rsync-fix-prealloc-to-keep-file-size-0-when-possible.patch (boo#1108562) + ------------------------------------------------------------------- Wed Jul 11 15:02:34 CEST 2018 - kukuk@suse.de diff --git a/rsync.spec b/rsync.spec index 2196ac0..9f4da18 100644 --- a/rsync.spec +++ b/rsync.spec @@ -1,7 +1,7 @@ # # spec file for package rsync # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -43,6 +43,8 @@ Patch2: rsync-both-compressions.patch #PATCH-FIX-UPSTREAM bcs#1062063 rsync doesn't stop on errors Patch4: rsync-send_error_to_sender.patch Patch5: rsync-avoid-uploading-after-error.patch +#PATCH-FIX-UPSTREAM bso#13320 file contents cause rsync to fail +Patch6: rsync-fix-prealloc-to-keep-file-size-0-when-possible.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: libacl-devel @@ -77,6 +79,7 @@ patch -p1 < patches/time-limit.diff %patch2 -p1 %patch4 %patch5 +%patch6 -p1 %build autoreconf -fiv