From a90464ccb4a94efe5cf09a0f084201e3011d5eb6 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Jun 22 2017 16:33:08 +0000 Subject: Update to a snapshot with more fixes --- diff --git a/.gitignore b/.gitignore index 0454868..88ef073 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /casync-1.tar.gz +/casync-2434f4c.tar.gz diff --git a/0001-Drop-some-unnecessary-braces.patch b/0001-Drop-some-unnecessary-braces.patch deleted file mode 100644 index 5beb4aa..0000000 --- a/0001-Drop-some-unnecessary-braces.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 7fd1a2ac4d1a47647b7864f765ab89054a387927 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Tue, 20 Jun 2017 13:59:27 -0400 -Subject: [PATCH 1/4] Drop some unnecessary braces - ---- - src/caformat-util.c | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) - -diff --git a/src/caformat-util.c b/src/caformat-util.c -index d836e8a8f7..332c6793a9 100644 ---- a/src/caformat-util.c -+++ b/src/caformat-util.c -@@ -283,10 +283,9 @@ unsigned ca_feature_flags_to_chattr(uint64_t flags) { - unsigned f = 0; - size_t i; - -- for (i = 0; i < ELEMENTSOF(chattr_map); i++) { -+ for (i = 0; i < ELEMENTSOF(chattr_map); i++) - if (flags & chattr_map[i].feature_flag) - f |= chattr_map[i].chattr_flag; -- } - - return f; - } -@@ -315,10 +314,9 @@ uint32_t ca_feature_flags_to_fat_attrs(uint64_t flags) { - uint32_t f = 0; - size_t i; - -- for (i = 0; i < ELEMENTSOF(fat_attrs_map); i++) { -+ for (i = 0; i < ELEMENTSOF(fat_attrs_map); i++) - if (flags & fat_attrs_map[i].feature_flag) - f |= fat_attrs_map[i].fat_flag; -- } - - return f; - } --- -2.13.0 - diff --git a/0002-Redefine-ioctl-FS_IOC_-SG-ETFLAGS-to-take-an-int.patch b/0002-Redefine-ioctl-FS_IOC_-SG-ETFLAGS-to-take-an-int.patch deleted file mode 100644 index b83c496..0000000 --- a/0002-Redefine-ioctl-FS_IOC_-SG-ETFLAGS-to-take-an-int.patch +++ /dev/null @@ -1,235 +0,0 @@ -From 37d5f80d3942af462ca7e88055388a16739a3b52 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Tue, 20 Jun 2017 14:48:38 -0400 -Subject: [PATCH 2/4] Redefine ioctl(FS_IOC_[SG]ETFLAGS) to take an int* - -/usr/include/linux/fs.h: #define FS_IOC_SETFLAGS _IOW('f', 2, long) - -Apparently this is known issue [1], but a fix does not seem to be -in sight. Let's fix it on our end, so that valgrind does not throw -false positives: - -==31046== Syscall param ioctl(generic) points to uninitialised byte(s) -==31046== at 0x5BB18C7: ioctl (syscall-template.S:84) -==31046== by 0x41B791: ca_decoder_finalize_child (cadecoder.c:3656) -==31046== by 0x41C0BE: ca_decoder_step_node (cadecoder.c:3875) -==31046== by 0x41C9ED: ca_decoder_step (cadecoder.c:4109) -==31046== by 0x408496: ca_sync_step_decode (casync.c:1988) -==31046== by 0x4094F6: ca_sync_step (casync.c:2482) -==31046== by 0x40366B: main (test-casync.c:75) -==31046== Address 0xffefff5fc is on thread 1's stack -==31046== in frame #1, created by ca_decoder_finalize_child (cadecoder.c:3252) - -While at it, let's change the internal type from unsigned to int, since that's -what the kernel really uses. - -[1] http://linux-fsdevel.vger.kernel.narkive.com/eUZdzNjw/argument-type-for-fs-ioc-getflags-fs-ioc-setflags-ioctls ---- - src/cadecoder.c | 4 ++-- - src/cadecoder.h | 2 +- - src/caencoder.c | 2 +- - src/caencoder.h | 2 +- - src/caformat-util.c | 4 ++-- - src/caformat-util.h | 2 +- - src/casync-tool.c | 4 ++-- - src/casync.c | 2 +- - src/casync.h | 2 +- - src/util.c | 6 +++--- - src/util.h | 11 ++++++++++- - 11 files changed, 25 insertions(+), 16 deletions(-) - -diff --git a/src/cadecoder.c b/src/cadecoder.c -index 6a59e02968..deba462a47 100644 ---- a/src/cadecoder.c -+++ b/src/cadecoder.c -@@ -3642,7 +3642,7 @@ static int ca_decoder_finalize_child(CaDecoder *d, CaDecoderNode *n, CaDecoderNo - } - - if ((d->feature_flags & CA_FORMAT_WITH_CHATTR) != 0 && child->fd >= 0) { -- unsigned new_attr, old_attr; -+ int new_attr, old_attr; - - new_attr = ca_feature_flags_to_chattr(read_le64(&child->entry->flags) & d->feature_flags); - -@@ -4471,7 +4471,7 @@ int ca_decoder_current_rdev(CaDecoder *d, dev_t *ret) { - return 0; - } - --int ca_decoder_current_chattr(CaDecoder *d, unsigned *ret) { -+int ca_decoder_current_chattr(CaDecoder *d, int *ret) { - CaDecoderNode *n; - mode_t mode; - -diff --git a/src/cadecoder.h b/src/cadecoder.h -index d658676c88..48f81e7c1a 100644 ---- a/src/cadecoder.h -+++ b/src/cadecoder.h -@@ -89,7 +89,7 @@ int ca_decoder_current_user(CaDecoder *d, const char **user); - int ca_decoder_current_group(CaDecoder *d, const char **user); - int ca_decoder_current_rdev(CaDecoder *d, dev_t *ret); - int ca_decoder_current_offset(CaDecoder *d, uint64_t *ret); --int ca_decoder_current_chattr(CaDecoder *d, unsigned *ret); -+int ca_decoder_current_chattr(CaDecoder *d, int *ret); - int ca_decoder_current_fat_attrs(CaDecoder *d, uint32_t *ret); - int ca_decoder_current_xattr(CaDecoder *d, CaIterate where, const char **ret_name, const void **ret_value, size_t *ret_size); - -diff --git a/src/caencoder.c b/src/caencoder.c -index 4bea8adae9..bcae40b289 100644 ---- a/src/caencoder.c -+++ b/src/caencoder.c -@@ -2850,7 +2850,7 @@ int ca_encoder_current_rdev(CaEncoder *e, dev_t *ret) { - return 0; - } - --int ca_encoder_current_chattr(CaEncoder *e, unsigned *ret) { -+int ca_encoder_current_chattr(CaEncoder *e, int *ret) { - CaEncoderNode *n; - - if (!e) -diff --git a/src/caencoder.h b/src/caencoder.h -index 26388261bd..e270cc0b1a 100644 ---- a/src/caencoder.h -+++ b/src/caencoder.h -@@ -49,7 +49,7 @@ int ca_encoder_current_gid(CaEncoder *e, gid_t *ret); - int ca_encoder_current_user(CaEncoder *e, const char **ret); - int ca_encoder_current_group(CaEncoder *e, const char **ret); - int ca_encoder_current_rdev(CaEncoder *e, dev_t *ret); --int ca_encoder_current_chattr(CaEncoder *e, unsigned *ret); -+int ca_encoder_current_chattr(CaEncoder *e, int *ret); - int ca_encoder_current_fat_attrs(CaEncoder *e, uint32_t *ret); - int ca_encoder_current_xattr(CaEncoder *e, CaIterate where, const char **ret_name, const void **ret_value, size_t *ret_size); - -diff --git a/src/caformat-util.c b/src/caformat-util.c -index 332c6793a9..0b7512f353 100644 ---- a/src/caformat-util.c -+++ b/src/caformat-util.c -@@ -279,8 +279,8 @@ uint64_t ca_feature_flags_from_chattr(unsigned flags) { - return f; - } - --unsigned ca_feature_flags_to_chattr(uint64_t flags) { -- unsigned f = 0; -+int ca_feature_flags_to_chattr(uint64_t flags) { -+ int f = 0; - size_t i; - - for (i = 0; i < ELEMENTSOF(chattr_map); i++) -diff --git a/src/caformat-util.h b/src/caformat-util.h -index 68741203fe..2e5db2bd19 100644 ---- a/src/caformat-util.h -+++ b/src/caformat-util.h -@@ -14,7 +14,7 @@ int ca_feature_flags_normalize(uint64_t flags, uint64_t *ret); - int ca_feature_flags_time_granularity_nsec(uint64_t flags, uint64_t *ret); - - uint64_t ca_feature_flags_from_chattr(unsigned flags); --unsigned ca_feature_flags_to_chattr(uint64_t flags); -+int ca_feature_flags_to_chattr(uint64_t flags); - - uint64_t ca_feature_flags_from_fat_attrs(uint32_t flags); - uint32_t ca_feature_flags_to_fat_attrs(uint64_t flags); -diff --git a/src/casync-tool.c b/src/casync-tool.c -index 1650028a1a..97e33d5b5b 100644 ---- a/src/casync-tool.c -+++ b/src/casync-tool.c -@@ -2058,7 +2058,7 @@ static int verb_list(int argc, char *argv[]) { - uid_t uid = UID_INVALID; - gid_t gid = GID_INVALID; - dev_t rdev = (dev_t) -1; -- unsigned flags = (unsigned) -1; -+ int flags = -1; - uint32_t fat_attrs = (uint32_t) -1; - char *escaped = NULL; - const char *xname; -@@ -2093,7 +2093,7 @@ static int verb_list(int argc, char *argv[]) { - - escaped = mfree(escaped); - -- if (flags != (unsigned) -1) -+ if (flags != -1) - printf("FileAttr: %s\n", strna(ls_format_chattr(flags, ls_flags))); - - if (fat_attrs != (uint32_t) -1) -diff --git a/src/casync.c b/src/casync.c -index ceac46dc7b..c73d9396ca 100644 ---- a/src/casync.c -+++ b/src/casync.c -@@ -2943,7 +2943,7 @@ int ca_sync_current_rdev(CaSync *s, dev_t *ret) { - return -ENOTTY; - } - --int ca_sync_current_chattr(CaSync *s, unsigned *ret) { -+int ca_sync_current_chattr(CaSync *s, int *ret) { - CaSeed *seed; - - if (!s) -diff --git a/src/casync.h b/src/casync.h -index 62818d13e3..afab401e01 100644 ---- a/src/casync.h -+++ b/src/casync.h -@@ -96,7 +96,7 @@ int ca_sync_current_group(CaSync *sync, const char **ret); - int ca_sync_current_mtime(CaSync *sync, uint64_t *nsec); - int ca_sync_current_size(CaSync *sync, uint64_t *ret); - int ca_sync_current_rdev(CaSync *sync, dev_t *ret); --int ca_sync_current_chattr(CaSync *sync, unsigned *ret); -+int ca_sync_current_chattr(CaSync *sync, int *ret); - int ca_sync_current_fat_attrs(CaSync *sync, uint32_t *ret); - int ca_sync_current_xattr(CaSync *sync, CaIterate where, const char **ret_name, const void **ret_value, size_t *ret_size); - -diff --git a/src/util.c b/src/util.c -index b0f3138254..67e480a379 100644 ---- a/src/util.c -+++ b/src/util.c -@@ -672,10 +672,10 @@ char* ls_format_mode(mode_t m, char ret[LS_FORMAT_MODE_MAX]) { - return ret; - } - --char *ls_format_chattr(unsigned flags, char ret[LS_FORMAT_CHATTR_MAX]) { -+char *ls_format_chattr(int flags, char ret[LS_FORMAT_CHATTR_MAX]) { - - static const struct { -- unsigned flag; -+ int flag; - char code; - } table[] = { - { FS_SYNC_FL, 'S' }, -@@ -692,7 +692,7 @@ char *ls_format_chattr(unsigned flags, char ret[LS_FORMAT_CHATTR_MAX]) { - - size_t i; - -- if (flags == (unsigned) -1) -+ if (flags == -1) - return NULL; - - assert(ELEMENTSOF(table) == LS_FORMAT_CHATTR_MAX-1); -diff --git a/src/util.h b/src/util.h -index 2d82cc2c4e..16891ec80c 100644 ---- a/src/util.h -+++ b/src/util.h -@@ -46,6 +46,15 @@ - UNIQ_T(A,aq) < UNIQ_T(B,bq) ? UNIQ_T(A,aq) : UNIQ_T(B,bq); \ - }) - -+ -+/* "linux/fs.h" contains wrong definitions of FS_IOC_[GS]ETFLAGS. -+ * This problem has been known for at least 14 years. To avoid a spurious -+ * warning from valgrind, let's override the kernel definitions. */ -+#undef FS_IOC_GETFLAGS -+#undef FS_IOC_SETFLAGS -+#define FS_IOC_GETFLAGS _IOR('f', 1, int) -+#define FS_IOC_SETFLAGS _IOW('f', 2, int) -+ - static inline uint64_t timespec_to_nsec(struct timespec t) { - - if (t.tv_sec == (time_t) -1 && -@@ -285,7 +294,7 @@ char *strjoin_real(const char *x, ...) _sentinel_; - char* ls_format_mode(mode_t m, char ret[LS_FORMAT_MODE_MAX]); - - #define LS_FORMAT_CHATTR_MAX 11 --char *ls_format_chattr(unsigned flags, char ret[LS_FORMAT_CHATTR_MAX]); -+char *ls_format_chattr(int flags, char ret[LS_FORMAT_CHATTR_MAX]); - - #define LS_FORMAT_FAT_ATTRS_MAX 4 - char *ls_format_fat_attrs(unsigned flags, char ret[LS_FORMAT_FAT_ATTRS_MAX]); --- -2.13.0 - diff --git a/0003-cadecoder-only-try-to-set-settable-chattr-bits.patch b/0003-cadecoder-only-try-to-set-settable-chattr-bits.patch deleted file mode 100644 index df452d2..0000000 --- a/0003-cadecoder-only-try-to-set-settable-chattr-bits.patch +++ /dev/null @@ -1,42 +0,0 @@ -From e4928f0ab2b16ded55316cfc44a32f542b88c81f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Tue, 20 Jun 2017 15:21:07 -0400 -Subject: [PATCH 3/4] cadecoder: only try to set settable chattr bits - -We shouldn't be trying to set bits like FS_EXTENT_FL, which chattr(1) says -"cannot be set by chattr", i.e. presumably also not by us. Only compare -and try to set bits which under the FS_FL_USER_MODIFIABLE mask. - -Fixes #27. ---- - src/cadecoder.c | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/src/cadecoder.c b/src/cadecoder.c -index deba462a47..93f8ebf392 100644 ---- a/src/cadecoder.c -+++ b/src/cadecoder.c -@@ -3645,15 +3645,18 @@ static int ca_decoder_finalize_child(CaDecoder *d, CaDecoderNode *n, CaDecoderNo - int new_attr, old_attr; - - new_attr = ca_feature_flags_to_chattr(read_le64(&child->entry->flags) & d->feature_flags); -+ assert((new_attr & ~FS_FL_USER_MODIFIABLE) == 0); - - if (ioctl(child->fd, FS_IOC_GETFLAGS, &old_attr) < 0) { - - if (new_attr != 0 || !IN_SET(errno, ENOTTY, ENOSYS, EBADF, EOPNOTSUPP)) - return -errno; - -- } else if (old_attr != new_attr) { -+ } else if ((old_attr & FS_FL_USER_MODIFIABLE) != new_attr) { -+ int final_attr; - -- if (ioctl(child->fd, FS_IOC_SETFLAGS, &new_attr) < 0) -+ final_attr = (old_attr & !FS_FL_USER_MODIFIABLE) | new_attr; -+ if (ioctl(child->fd, FS_IOC_SETFLAGS, &final_attr) < 0) - return -errno; - } - } --- -2.13.0 - diff --git a/0004-util-define-__NR_renameat2-for-ppc64.patch b/0004-util-define-__NR_renameat2-for-ppc64.patch deleted file mode 100644 index 753e7bf..0000000 --- a/0004-util-define-__NR_renameat2-for-ppc64.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 2e01d2a1858ff792c24a90d9e79007e657c4815b Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Tue, 20 Jun 2017 15:39:38 -0400 -Subject: [PATCH 4/4] util: define __NR_renameat2 for ppc64 - ---- - src/util.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/util.h b/src/util.h -index 16891ec80c..f439171dce 100644 ---- a/src/util.h -+++ b/src/util.h -@@ -485,6 +485,8 @@ static inline bool strv_isempty(char **l) { - # endif - # elif defined __i386__ - # define __NR_renameat2 353 -+# elif defined __powerpc64__ -+# define __NR_renameat2 357 - # else - # warning "__NR_renameat2 unknown for your architecture" - # endif --- -2.13.0 - diff --git a/0005-util-define-__NR_renameat2-for-s390-x.patch b/0005-util-define-__NR_renameat2-for-s390-x.patch deleted file mode 100644 index bf3f978..0000000 --- a/0005-util-define-__NR_renameat2-for-s390-x.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 3d4011dab372fed434737cc1bcbb3ab9cfafb8f3 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Tue, 20 Jun 2017 18:23:10 -0400 -Subject: [PATCH] util: define __NR_renameat2 for s390[x] - ---- - src/util.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/util.h b/src/util.h -index f439171dce..bcc1713591 100644 ---- a/src/util.h -+++ b/src/util.h -@@ -487,6 +487,8 @@ static inline bool strv_isempty(char **l) { - # define __NR_renameat2 353 - # elif defined __powerpc64__ - # define __NR_renameat2 357 -+# elif defined __s390__ || defined __s390__ -+# define __NR_renameat2 347 - # else - # warning "__NR_renameat2 unknown for your architecture" - # endif --- -2.13.0 - diff --git a/0006-tests-fix-tests-when-the-source-directory-is-not-cal.patch b/0006-tests-fix-tests-when-the-source-directory-is-not-cal.patch deleted file mode 100644 index 6bf3675..0000000 --- a/0006-tests-fix-tests-when-the-source-directory-is-not-cal.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 92c01a4b53a74c66173863eb0f28bd9465d007c0 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Tue, 20 Jun 2017 18:43:51 -0400 -Subject: [PATCH] tests: fix tests when the source directory is not called - "casync" - -test-script.sh would fail when the top source dir was called e.g. casync-1. ---- - test/test-script.sh.in | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) - -diff --git a/test/test-script.sh.in b/test/test-script.sh.in -index a36e7b3d05..6bb7099034 100755 ---- a/test/test-script.sh.in -+++ b/test/test-script.sh.in -@@ -13,10 +13,10 @@ SCRATCH_DIR=/var/tmp/test-casync.$RANDOM - mkdir -p $SCRATCH_DIR/src - - if [ `id -u` == 0 ] ; then -- cp -a @top_srcdir@ $SCRATCH_DIR/src -+ cp -a @top_srcdir@/test-files $SCRATCH_DIR/src/ - else - # If we lack privileges we use rsync rather than cp to copy, as it will just skip over device nodes -- rsync -a @top_srcdir@ $SCRATCH_DIR/src -+ rsync -a @top_srcdir@/test-files $SCRATCH_DIR/src/ - fi - - cd $SCRATCH_DIR/src -@@ -101,17 +101,17 @@ diff -q $SCRATCH_DIR/test.digest $SCRATCH_DIR/test.extract-caidx2.digest - @top_builddir@/casync $PARAMS make $SCRATCH_DIR/seek.catar - @top_builddir@/casync $PARAMS make $SCRATCH_DIR/seek.caidx - --@top_builddir@/casync $PARAMS extract $SCRATCH_DIR/seek.catar $SCRATCH_DIR/extract-seek-catar casync/test-files --@top_builddir@/casync $PARAMS extract $SCRATCH_DIR/seek.caidx $SCRATCH_DIR/extract-seek-caidx casync/test-files -+@top_builddir@/casync $PARAMS extract $SCRATCH_DIR/seek.catar $SCRATCH_DIR/extract-seek-catar test-files -+@top_builddir@/casync $PARAMS extract $SCRATCH_DIR/seek.caidx $SCRATCH_DIR/extract-seek-caidx test-files - --@top_builddir@/casync $PARAMS mtree casync/test-files > $SCRATCH_DIR/original-seek.mtree --@top_builddir@/casync $PARAMS digest casync/test-files > $SCRATCH_DIR/original-seek.digest -+@top_builddir@/casync $PARAMS mtree test-files > $SCRATCH_DIR/original-seek.mtree -+@top_builddir@/casync $PARAMS digest test-files > $SCRATCH_DIR/original-seek.digest - @top_builddir@/casync $PARAMS mtree $SCRATCH_DIR/extract-seek-catar/test-files > $SCRATCH_DIR/extract-seek-catar.mtree - @top_builddir@/casync $PARAMS digest $SCRATCH_DIR/extract-seek-catar/test-files > $SCRATCH_DIR/extract-seek-catar.digest - @top_builddir@/casync $PARAMS mtree $SCRATCH_DIR/extract-seek-caidx/test-files > $SCRATCH_DIR/extract-seek-caidx.mtree - @top_builddir@/casync $PARAMS digest $SCRATCH_DIR/extract-seek-caidx/test-files > $SCRATCH_DIR/extract-seek-caidx.digest --@top_builddir@/casync $PARAMS digest $SCRATCH_DIR/seek.catar casync/test-files > $SCRATCH_DIR/extract-seek-catar-direct.digest --@top_builddir@/casync $PARAMS digest $SCRATCH_DIR/seek.caidx casync/test-files > $SCRATCH_DIR/extract-seek-caidx-direct.digest -+@top_builddir@/casync $PARAMS digest $SCRATCH_DIR/seek.catar test-files > $SCRATCH_DIR/extract-seek-catar-direct.digest -+@top_builddir@/casync $PARAMS digest $SCRATCH_DIR/seek.caidx test-files > $SCRATCH_DIR/extract-seek-caidx-direct.digest - - diff -q $SCRATCH_DIR/original-seek.digest $SCRATCH_DIR/extract-seek-catar.digest - diff -q $SCRATCH_DIR/original-seek.digest $SCRATCH_DIR/extract-seek-caidx.digest --- -2.13.0 - diff --git a/casync.spec b/casync.spec index e7a4446..1a2b12d 100644 --- a/casync.spec +++ b/casync.spec @@ -1,11 +1,18 @@ +%global gitcommit 2434f4cfdeef46d4fddd0b8100bcf947543931e8 +%{?gitcommit:%global gitcommitshort %(c=%{gitcommit}; echo ${c:0:7})} + Name: casync Version: 1 -Release: 2%{?dist} +Release: 3%{?gitcommit:.git%{gitcommitshort}}%{?dist} Summary: Content Addressable Data Synchronizer License: LGPLv2+ URL: https://github.com/systemd/casync +%if %{defined gitcommit} +Source0: https://github.com/systemd/casync/archive/%{?gitcommit}.tar.gz#/%{name}-%{gitcommitshort}.tar.gz +%else Source0: https://github.com/systemd/casync/archive/v%{version}/%{name}-%{version}.tar.gz +%endif BuildRequires: meson BuildRequires: gcc @@ -17,13 +24,6 @@ BuildRequires: libacl-devel # for tests BuildRequires: rsync -Patch0001: 0001-Drop-some-unnecessary-braces.patch -Patch0002: 0002-Redefine-ioctl-FS_IOC_-SG-ETFLAGS-to-take-an-int.patch -Patch0003: 0003-cadecoder-only-try-to-set-settable-chattr-bits.patch -Patch0004: 0004-util-define-__NR_renameat2-for-ppc64.patch -Patch0005: 0005-util-define-__NR_renameat2-for-s390-x.patch -Patch0006: 0006-tests-fix-tests-when-the-source-directory-is-not-cal.patch - %description casync provides a way to efficiently transfer files which change over time over the internet. It will split a given set into a git-inspired @@ -34,7 +34,11 @@ original data. When the original data is modified, only the new chunks have to be transferred during an update. %prep +%if %{defined gitcommit} +%autosetup -n %{name}-%{gitcommit} -p1 +%else %autosetup -p1 +%endif %build %meson diff --git a/sources b/sources index ba8a172..ca6e1cf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (casync-1.tar.gz) = 2a933d7cdcd6fa9af597634abc5f3e66639821e630bc90ee8424cd51c236e41d2732ee507300289b9b1bace70474cf4b86e8d1b7d934e34e1f94f33d63ba1170 +SHA512 (casync-2434f4c.tar.gz) = 6a2038d37362e1a4f7821b62a47fcbb275d155354ad6a8fa110736112678b3acc0e528332027f9c403463bc010b983f6954f75380c91abc80b1533aaf77ba43b