Adding filter-attribute-mods patch; updating patches.
[rsync/rsync-patches.git] / crtimes.diff
index 6c5148b..6134ce7 100644 (file)
@@ -8,8 +8,8 @@ To use this patch, run these commands for a successful build:
     ./configure                      (optional if already run)
     make
 
+based-on: patch/fileflags
 diff --git a/compat.c b/compat.c
-index ef1882d..132ff90 100644
 --- a/compat.c
 +++ b/compat.c
 @@ -44,6 +44,7 @@ extern int force_change;
@@ -39,7 +39,6 @@ index ef1882d..132ff90 100644
                fileflags_ndx = ++file_extra_cnt;
        if (preserve_acls && !am_sender)
 diff --git a/flist.c b/flist.c
-index e1d01be..3287447 100644
 --- a/flist.c
 +++ b/flist.c
 @@ -56,6 +56,7 @@ extern int missing_args;
@@ -59,7 +58,7 @@ index e1d01be..3287447 100644
        static mode_t mode;
  #ifdef SUPPORT_FILEFLAGS
        static uint32 fileflags;
-@@ -496,6 +497,13 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -506,6 +507,13 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
                xflags |= XMIT_SAME_TIME;
        else
                modtime = file->modtime;
@@ -73,7 +72,7 @@ index e1d01be..3287447 100644
  
  #ifdef SUPPORT_HARD_LINKS
        if (tmp_dev != 0) {
-@@ -578,6 +586,8 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -588,6 +596,8 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
                else
                        write_int(f, modtime);
        }
@@ -82,7 +81,7 @@ index e1d01be..3287447 100644
        if (!(xflags & XMIT_SAME_MODE))
                write_int(f, to_wire_mode(mode));
  #ifdef SUPPORT_FILEFLAGS
-@@ -670,7 +680,7 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -680,7 +690,7 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
  static struct file_struct *recv_file_entry(struct file_list *flist,
                                           int xflags, int f)
  {
@@ -91,7 +90,7 @@ index e1d01be..3287447 100644
        static mode_t mode;
  #ifdef SUPPORT_FILEFLAGS
        static uint32 fileflags;
-@@ -810,6 +820,19 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
+@@ -819,6 +829,19 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
                } else
                        modtime = read_int(f);
        }
@@ -111,7 +110,7 @@ index e1d01be..3287447 100644
        if (!(xflags & XMIT_SAME_MODE))
                mode = from_wire_mode(read_int(f));
  
-@@ -969,6 +992,8 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
+@@ -979,6 +1002,8 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
                F_GROUP(file) = gid;
                file->flags |= gid_flags;
        }
@@ -120,7 +119,7 @@ index e1d01be..3287447 100644
        if (unsort_ndx)
                F_NDX(file) = flist->used + flist->ndx_start;
  
-@@ -1358,6 +1383,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1368,6 +1393,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
                F_OWNER(file) = st.st_uid;
        if (gid_ndx) /* Check gid_ndx instead of preserve_gid for del support */
                F_GROUP(file) = st.st_gid;
@@ -130,7 +129,6 @@ index e1d01be..3287447 100644
        if (basename != thisname)
                file->dirname = lastdir;
 diff --git a/generator.c b/generator.c
-index eee42e8..932f81c 100644
 --- a/generator.c
 +++ b/generator.c
 @@ -40,6 +40,7 @@ extern int preserve_xattrs;
@@ -214,7 +212,6 @@ index eee42e8..932f81c 100644
        init_stat_x(&sx);
        if (dry_run > 1 || (dry_missing_dir && is_below(file, dry_missing_dir))) {
 diff --git a/ifuncs.h b/ifuncs.h
-index 8c128d5..4254dfb 100644
 --- a/ifuncs.h
 +++ b/ifuncs.h
 @@ -35,6 +35,28 @@ realloc_xbuf(xbuf *xb, size_t sz)
@@ -247,7 +244,6 @@ index 8c128d5..4254dfb 100644
  to_wire_mode(mode_t mode)
  {
 diff --git a/log.c b/log.c
-index 83948b1..7a1d9ce 100644
 --- a/log.c
 +++ b/log.c
 @@ -718,7 +718,8 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
@@ -261,7 +257,6 @@ index 83948b1..7a1d9ce 100644
                        if (iflags & (ITEM_IS_NEW|ITEM_MISSING_DATA)) {
                                char ch = iflags & ITEM_IS_NEW ? '+' : '?';
 diff --git a/options.c b/options.c
-index ae3d2d0..bb3bad3 100644
 --- a/options.c
 +++ b/options.c
 @@ -60,6 +60,7 @@ int preserve_specials = 0;
@@ -290,7 +285,7 @@ index ae3d2d0..bb3bad3 100644
    {"omit-dir-times",  'O', POPT_ARG_VAL,    &omit_dir_times, 1, 0, 0 },
    {"no-omit-dir-times",0,  POPT_ARG_VAL,    &omit_dir_times, 0, 0, 0 },
    {"no-O",             0,  POPT_ARG_VAL,    &omit_dir_times, 0, 0, 0 },
-@@ -2315,6 +2320,8 @@ void server_options(char **args, int *argc_p)
+@@ -2332,6 +2337,8 @@ void server_options(char **args, int *argc_p)
                argstr[x++] = 'D';
        if (preserve_times)
                argstr[x++] = 't';
@@ -300,7 +295,6 @@ index ae3d2d0..bb3bad3 100644
                argstr[x++] = 'p';
        else if (preserve_executability && am_sender)
 diff --git a/rsync.c b/rsync.c
-index 3188535..ab4f8e4 100644
 --- a/rsync.c
 +++ b/rsync.c
 @@ -471,6 +471,14 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
@@ -337,7 +331,6 @@ index 3188535..ab4f8e4 100644
        if (temp_copy_name) {
                if (do_rename(fnametmp, fname) < 0) {
 diff --git a/rsync.h b/rsync.h
-index 16820fd..b3973c8 100644
 --- a/rsync.h
 +++ b/rsync.h
 @@ -61,6 +61,7 @@
@@ -365,7 +358,7 @@ index 16820fd..b3973c8 100644
  #define ITEM_REPORT_CHANGE (1<<1)
  #define ITEM_REPORT_SIZE (1<<2)     /* regular files only */
  #define ITEM_REPORT_TIMEFAIL (1<<2) /* symlinks only */
-@@ -677,6 +679,7 @@ extern int file_extra_cnt;
+@@ -681,6 +683,7 @@ extern int file_extra_cnt;
  extern int inc_recurse;
  extern int uid_ndx;
  extern int gid_ndx;
@@ -373,7 +366,7 @@ index 16820fd..b3973c8 100644
  extern int fileflags_ndx;
  extern int acls_ndx;
  extern int xattrs_ndx;
-@@ -684,6 +687,7 @@ extern int xattrs_ndx;
+@@ -688,6 +691,7 @@ extern int xattrs_ndx;
  #define FILE_STRUCT_LEN (offsetof(struct file_struct, basename))
  #define EXTRA_LEN (sizeof (union file_extras))
  #define PTR_EXTRA_CNT ((sizeof (char *) + EXTRA_LEN - 1) / EXTRA_LEN)
@@ -381,7 +374,7 @@ index 16820fd..b3973c8 100644
  #define DEV_EXTRA_CNT 2
  #define DIRNODE_EXTRA_CNT 3
  #define SUM_EXTRA_CNT ((MAX_DIGEST_LEN + EXTRA_LEN - 1) / EXTRA_LEN)
-@@ -954,6 +958,7 @@ typedef struct {
+@@ -955,6 +959,7 @@ typedef struct {
  
  typedef struct {
      STRUCT_STAT st;
@@ -390,7 +383,6 @@ index 16820fd..b3973c8 100644
      struct rsync_acl *acc_acl; /* access ACL */
      struct rsync_acl *def_acl; /* default ACL */
 diff --git a/rsync.yo b/rsync.yo
-index 7b41d5f..5670c46 100644
 --- a/rsync.yo
 +++ b/rsync.yo
 @@ -357,6 +357,7 @@ to the detailed description below for a complete description.  verb(
@@ -401,7 +393,7 @@ index 7b41d5f..5670c46 100644
       --super                 receiver attempts super-user activities
       --fake-super            store/recover privileged attrs using xattrs
   -S, --sparse                handle sparse files efficiently
-@@ -1099,6 +1100,9 @@ it is preserving modification times (see bf(--times)).  If NFS is sharing
+@@ -1106,6 +1107,9 @@ it is preserving modification times (see bf(--times)).  If NFS is sharing
  the directories on the receiving side, it is a good idea to use bf(-O).
  This option is inferred if you use bf(--backup) without bf(--backup-dir).
  
@@ -411,7 +403,7 @@ index 7b41d5f..5670c46 100644
  dit(bf(--super)) This tells the receiving side to attempt super-user
  activities even if the receiving rsync wasn't run by the super-user.  These
  activities include: preserving users via the bf(--owner) option, preserving
-@@ -1861,7 +1865,7 @@ with older versions of rsync, but that also turns on the output of other
+@@ -1880,7 +1884,7 @@ with older versions of rsync, but that also turns on the output of other
  verbose messages).
  
  The "%i" escape has a cryptic output that is 11 letters long.  The general
@@ -420,7 +412,7 @@ index 7b41d5f..5670c46 100644
  type of update being done, bf(X) is replaced by the file-type, and the
  other letters represent attributes that may be output if they are being
  modified.
-@@ -1920,6 +1924,8 @@ quote(itemization(
+@@ -1939,6 +1943,8 @@ quote(itemization(
    it() The bf(f) means that the fileflags information changed.
    it() The bf(a) means that the ACL information changed.
    it() The bf(x) means that the extended attribute information changed.
@@ -430,7 +422,6 @@ index 7b41d5f..5670c46 100644
  
  One other output is possible:  when deleting files, the "%i" will output
 diff --git a/syscall.c b/syscall.c
-index 45604b1..c463997 100644
 --- a/syscall.c
 +++ b/syscall.c
 @@ -37,6 +37,11 @@ extern int force_change;
@@ -481,7 +472,6 @@ index 45604b1..c463997 100644
 +}
 diff --git a/testsuite/crtimes.test b/testsuite/crtimes.test
 new file mode 100644
-index 0000000..b904e16
 --- /dev/null
 +++ b/testsuite/crtimes.test
 @@ -0,0 +1,24 @@
@@ -510,7 +500,6 @@ index 0000000..b904e16
 +# The script would have aborted on error, so getting here means we've won.
 +exit 0
 diff --git a/testsuite/rsync.fns b/testsuite/rsync.fns
-index b26aee3..4faaf93 100644
 --- a/testsuite/rsync.fns
 +++ b/testsuite/rsync.fns
 @@ -24,9 +24,9 @@ todir="$tmpdir/to"
@@ -527,7 +516,6 @@ index b26aee3..4faaf93 100644
  # Berkley's nice.
  PATH="$PATH:/usr/ucb"
 diff --git a/tls.c b/tls.c
-index 8cc5748..6da4df9 100644
 --- a/tls.c
 +++ b/tls.c
 @@ -108,6 +108,8 @@ static int stat_xattr(const char *fname, STRUCT_STAT *fst)