summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2016-11-22 13:05:48 +0100
committerErich Eckner <git@eckner.net>2016-11-22 13:05:48 +0100
commitd85fba2c7c29e9aa374c311bd289837206f66f95 (patch)
tree2b06d9eda85414fa5d01030cc3a73c438125188d
parentd7c6a225ae554f334ce4f2af16f2450c1267f462 (diff)
downloadcrux-patches-d85fba2c7c29e9aa374c311bd289837206f66f95.tar.xz
rsync: may-modify-others-Patch neu
-rw-r--r--core/rsync/may-modify-others-Pkgfile.patch17
-rw-r--r--core/rsync/may-modify-others.patch.new76
2 files changed, 93 insertions, 0 deletions
diff --git a/core/rsync/may-modify-others-Pkgfile.patch b/core/rsync/may-modify-others-Pkgfile.patch
new file mode 100644
index 0000000..12f6906
--- /dev/null
+++ b/core/rsync/may-modify-others-Pkgfile.patch
@@ -0,0 +1,17 @@
+--- Pkgfile 2016-01-02 20:32:54.334960502 +0100
++++ Pkgfile 2016-11-22 13:02:49.324456243 +0100
+@@ -7,11 +7,14 @@
+ version=3.1.2
+ release=1
+ source=(http://rsync.samba.org/ftp/$name/src/$name-$version.tar.gz \
++ may-modify-others.patch
+ rsyncd.conf rsyncd rsync.driver)
+
+ build () {
+ cd $name-$version
+
++ patch -p1 -i ../may-modify-others.patch
++
+ ./configure --prefix=/usr \
+ --with-rsh=ssh \
+ --with-included-popt \
diff --git a/core/rsync/may-modify-others.patch.new b/core/rsync/may-modify-others.patch.new
new file mode 100644
index 0000000..b37c7a5
--- /dev/null
+++ b/core/rsync/may-modify-others.patch.new
@@ -0,0 +1,76 @@
+diff -u3 rsync-3.1.2/generator.c rsync-3.1.2-mod/generator.c
+--- rsync-3.1.2/generator.c 2015-12-05 20:10:24.000000000 +0100
++++ rsync-3.1.2-mod/generator.c 2016-11-22 12:58:41.614885853 +0100
+@@ -79,6 +79,7 @@
+ extern int compare_dest;
+ extern int copy_dest;
+ extern int link_dest;
++extern int may_modify_others;
+ extern int whole_file;
+ extern int list_only;
+ extern int read_batch;
+@@ -904,7 +905,7 @@
+ goto got_nothing_for_ya;
+ }
+
+- if (match_level == 3 && !copy_dest) {
++ if (match_level + may_modify_others >= 3 && !copy_dest) {
+ if (find_exact_for_existing) {
+ if (link_dest && real_st.st_dev == sxp->st.st_dev && real_st.st_ino == sxp->st.st_ino)
+ return -1;
+@@ -928,6 +929,8 @@
+ if (itemizing)
+ itemize(cmpbuf, file, ndx, 0, sxp, 0, 0, NULL);
+ }
++ if (match_level == 2)
++ set_file_attrs(fname, file, NULL, cmpbuf, 0);
+ if (INFO_GTE(NAME, 2) && maybe_ATTRS_REPORT)
+ rprintf(FCLIENT, "%s is uptodate\n", fname);
+ return -2;
+diff -u3 rsync-3.1.2/options.c rsync-3.1.2-mod/options.c
+--- rsync-3.1.2/options.c 2015-12-18 23:46:28.000000000 +0100
++++ rsync-3.1.2-mod/options.c 2016-11-22 12:57:19.161815853 +0100
+@@ -176,6 +176,7 @@
+ int compare_dest = 0;
+ int copy_dest = 0;
+ int link_dest = 0;
++int may_modify_others = 0;
+ int basis_dir_cnt = 0;
+ char *dest_option = NULL;
+
+@@ -761,6 +762,7 @@
+ rprintf(F," --compare-dest=DIR also compare destination files relative to DIR\n");
+ rprintf(F," --copy-dest=DIR ... and include copies of unchanged files\n");
+ rprintf(F," --link-dest=DIR hardlink to files in DIR when unchanged\n");
++ rprintf(F," --may-modify-others meta data of files in above three DIRs may be modified\n");
+ rprintf(F," -z, --compress compress file data during the transfer\n");
+ rprintf(F," --compress-level=NUM explicitly set compression level\n");
+ rprintf(F," --skip-compress=LIST skip compressing files with a suffix in LIST\n");
+@@ -814,7 +816,7 @@
+ }
+
+ enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
+- OPT_FILTER, OPT_COMPARE_DEST, OPT_COPY_DEST, OPT_LINK_DEST, OPT_HELP,
++ OPT_FILTER, OPT_COMPARE_DEST, OPT_COPY_DEST, OPT_LINK_DEST, OPT_MAY_MODIFY_OTHERS, OPT_HELP,
+ OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW, OPT_MIN_SIZE, OPT_CHMOD,
+ OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_ONLY_WRITE_BATCH, OPT_MAX_SIZE,
+ OPT_NO_D, OPT_APPEND, OPT_NO_ICONV, OPT_INFO, OPT_DEBUG,
+@@ -961,6 +963,7 @@
+ {"compare-dest", 0, POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 },
+ {"copy-dest", 0, POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
+ {"link-dest", 0, POPT_ARG_STRING, 0, OPT_LINK_DEST, 0, 0 },
++ {"may-modify-others",0, POPT_ARG_NONE, 0, OPT_MAY_MODIFY_OTHERS, 0, 0 },
+ {"fuzzy", 'y', POPT_ARG_NONE, 0, 'y', 0, 0 },
+ {"no-fuzzy", 0, POPT_ARG_VAL, &fuzzy_basis, 0, 0, 0 },
+ {"no-y", 0, POPT_ARG_VAL, &fuzzy_basis, 0, 0, 0 },
+@@ -1643,6 +1646,10 @@
+ return 0;
+ #endif
+
++ case OPT_MAY_MODIFY_OTHERS:
++ may_modify_others = 1;
++ break;
++
+ case OPT_COPY_DEST:
+ copy_dest = 1;
+ dest_option = "--copy-dest";