diff --git a/0001-build-check-for-renameat2-copy_file_range-with-_GNU_.patch b/0001-build-check-for-renameat2-copy_file_range-with-_GNU_.patch new file mode 100644 index 0000000..2db3785 --- /dev/null +++ b/0001-build-check-for-renameat2-copy_file_range-with-_GNU_.patch @@ -0,0 +1,35 @@ +From fe440cf5f4c9a177e025dda870ace8f093f6632b Mon Sep 17 00:00:00 2001 +From: Igor Gnatenko +Date: Mon, 9 Jul 2018 12:34:14 +0200 +Subject: [PATCH] build: check for renameat2()/copy_file_range() with + _GNU_SOURCE + +The config.h which we generate doesn't apply for checks and those +functions are available only when _GNU_SOURCE is defined. + +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1599252 +Signed-off-by: Igor Gnatenko +--- + meson.build | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/meson.build b/meson.build +index f42ed16..9dd3ba0 100644 +--- a/meson.build ++++ b/meson.build +@@ -74,8 +74,10 @@ conf.set('SIZEOF_UID_T', cc.sizeof('uid_t', prefix : '#include ')) + conf.set('SIZEOF_GID_T', cc.sizeof('gid_t', prefix : '#include ')) + + foreach ident : [ +- ['renameat2', '''#include '''], +- ['copy_file_range', '''#include ++ ['renameat2', '''#define _GNU_SOURCE ++ #include '''], ++ ['copy_file_range', '''#define _GNU_SOURCE ++ #include + #include '''], + ] + have = cc.has_function(ident[0], prefix : ident[1]) +-- +2.18.0.rc2 + diff --git a/casync.spec b/casync.spec index 8b65171..dda152b 100644 --- a/casync.spec +++ b/casync.spec @@ -3,7 +3,7 @@ Name: casync Version: 2 -Release: 6%{?gitcommit:.git%{gitcommitshort}}%{?dist} +Release: 7%{?gitcommit:.git%{gitcommitshort}}%{?dist} Summary: Content Addressable Data Synchronizer License: LGPLv2+ @@ -15,6 +15,7 @@ Source0: https://github.com/systemd/casync/archive/v%{version}/%{name}-%{ %endif Patch0001: 0001-Fix-segv-in-ca_remote_forget_chunk.patch Patch0002: 0001-Fix-seed-chunker-discriminator-not-set-78.patch +Patch0003: 0001-build-check-for-renameat2-copy_file_range-with-_GNU_.patch BuildRequires: meson BuildRequires: gcc @@ -74,6 +75,9 @@ export LC_CTYPE=C.utf8 %_udevrulesdir/75-casync.rules %changelog +* Mon Jul 09 2018 Igor Gnatenko - 2-7 +- Fix FTBFS by running proper checks + * Wed Feb 07 2018 Fedora Release Engineering - 2-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild