patch -p1 <patches/fileflags.diff
patch -p1 <patches/crtimes.diff
- ./configure (optional if already run)
+ ./prepare-source
+ ./configure
make
based-on: patch/b3.0.x/fileflags
static mode_t mode;
#ifdef SUPPORT_FILEFLAGS
static uint32 fileflags;
-@@ -754,6 +764,8 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -758,6 +768,8 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
uid = F_OWNER(first);
if (preserve_gid)
gid = F_GROUP(first);
if (preserve_devices && IS_DEVICE(mode)) {
uint32 *devp = F_RDEV_P(first);
rdev = MAKEDEV(DEV_MAJOR(devp), DEV_MINOR(devp));
-@@ -782,6 +794,19 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -786,6 +798,19 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
} else
modtime = read_int(f);
}
if (!(xflags & XMIT_SAME_MODE))
mode = from_wire_mode(read_int(f));
-@@ -942,6 +967,8 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -946,6 +971,8 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
F_GROUP(file) = gid;
file->flags |= gid_flags;
}
if (unsort_ndx)
F_NDX(file) = flist->used + flist->ndx_start;
-@@ -1320,6 +1347,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1324,6 +1351,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
F_GROUP(file) = st.st_gid;
if (am_generator && st.st_uid == our_uid)
file->flags |= FLAG_OWNED_BY_US;
extern int preserve_hard_links;
extern int preserve_executability;
extern int preserve_fileflags;
-@@ -604,6 +606,13 @@ static inline int ownership_differs(struct file_struct *file, stat_x *sxp)
- return 0;
+@@ -577,8 +579,15 @@ static void do_delete_pass(void)
+ rprintf(FINFO, " \r");
}
+-static inline int time_differs(struct file_struct *file, stat_x *sxp)
++static inline int time_differs(struct file_struct *file, stat_x *sxp, const char *fname)
+ {
+ if (crtimes_ndx) {
+ if (sxp->crtime == 0)
+ sxp->crtime = get_create_time(fname);
+ if (cmp_time(sxp->crtime, f_crtime(file)) != 0)
-+ return 0;
++ return 1;
+ }
+
- #ifdef SUPPORT_ACLS
- static inline int acls_differ(const char *fname, struct file_struct *file, stat_x *sxp)
+ return cmp_time(sxp->st.st_mtime, file->modtime);
+ }
+
+@@ -636,7 +645,7 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
{
+ if (S_ISLNK(file->mode)) {
+ #ifdef CAN_SET_SYMLINK_TIMES
+- if (preserve_times & PRESERVE_LINK_TIMES && time_differs(file, sxp))
++ if (preserve_times & PRESERVE_LINK_TIMES && time_differs(file, sxp, fname))
+ return 0;
+ #endif
+ #ifdef CAN_CHMOD_SYMLINK
+@@ -656,7 +665,7 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
+ return 0;
+ #endif
+ } else {
+- if (preserve_times && time_differs(file, sxp))
++ if (preserve_times && time_differs(file, sxp, fname))
+ return 0;
+ if (perms_differ(file, sxp))
+ return 0;
@@ -699,6 +708,12 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
: iflags & (ITEM_TRANSFER|ITEM_LOCAL_CHANGE) && !(iflags & ITEM_MATCHED)
&& (!(iflags & ITEM_XNAME_FOLLOWS) || *xname))
--super receiver attempts super-user activities
--fake-super store/recover privileged attrs using xattrs
-S, --sparse handle sparse files efficiently
-@@ -1085,6 +1086,9 @@ it is preserving modification times (see bf(--times)). If NFS is sharing
+@@ -1086,6 +1087,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).
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
-@@ -1785,7 +1789,7 @@ with older versions of rsync, but that also turns on the output of other
+@@ -1782,7 +1786,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
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.
-@@ -1844,6 +1848,8 @@ quote(itemization(
+@@ -1841,6 +1845,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.
diff --git a/syscall.c b/syscall.c
--- a/syscall.c
+++ b/syscall.c
-@@ -37,6 +37,14 @@ extern int force_change;
+@@ -37,6 +37,13 @@ extern int force_change;
extern int preserve_perms;
extern int preserve_executability;
-+#pragma pack(push)
-+#pragma pack(4)
++#pragma pack(push, 4)
+struct create_time {
+ uint32 length;
+ struct timespec crtime;
#define RETURN_ERROR_IF(x,e) \
do { \
if (x) { \
-@@ -417,6 +425,36 @@ OFF_T do_lseek(int fd, OFF_T offset, int whence)
+@@ -417,6 +424,36 @@ OFF_T do_lseek(int fd, OFF_T offset, int whence)
#endif
}
+all_plus='++++++++++'
+allspace=' '
+dots='......' # trailing dots after changes
+ tab_ch=' ' # a single tab character
# Berkley's nice.
- PATH="$PATH:/usr/ucb"
diff --git a/tls.c b/tls.c
--- a/tls.c
+++ b/tls.c