[44899] trunk/dports/net/rsync/files

toby at macports.org toby at macports.org
Sun Jan 4 07:44:46 PST 2009


Revision: 44899
          http://trac.macports.org/changeset/44899
Author:   toby at macports.org
Date:     2009-01-04 07:44:46 -0800 (Sun, 04 Jan 2009)
Log Message:
-----------
update patches, per comments in #17872

Modified Paths:
--------------
    trunk/dports/net/rsync/files/patch-crtimes.diff
    trunk/dports/net/rsync/files/patch-fileflags.diff

Modified: trunk/dports/net/rsync/files/patch-crtimes.diff
===================================================================
--- trunk/dports/net/rsync/files/patch-crtimes.diff	2009-01-04 15:42:50 UTC (rev 44898)
+++ trunk/dports/net/rsync/files/patch-crtimes.diff	2009-01-04 15:44:46 UTC (rev 44899)
@@ -89,7 +89,16 @@
  	static mode_t mode;
  #ifdef SUPPORT_FILEFLAGS
  	static uint32 fileflags;
-@@ -773,6 +783,19 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
+@@ -744,6 +754,8 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
+ 				uid = F_OWNER(first);
+ 			if (preserve_gid)
+ 				gid = F_GROUP(first);
++			if (crtimes_ndx)
++				crtime = f_crtime(first);
+ 			if ((preserve_devices && IS_DEVICE(mode))
+ 			 || (preserve_specials && IS_SPECIAL(mode))) {
+ 				uint32 *devp = F_RDEV_P(first);
+@@ -773,6 +785,19 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
  		} else
  			modtime = read_int(f);
  	}
@@ -109,7 +118,7 @@
  	if (!(xflags & XMIT_SAME_MODE))
  		mode = from_wire_mode(read_int(f));
  
-@@ -932,6 +955,8 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
+@@ -932,6 +957,8 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
  		F_GROUP(file) = gid;
  		file->flags |= gid_flags;
  	}
@@ -118,7 +127,7 @@
  	if (unsort_ndx)
  		F_NDX(file) = flist->used + flist->ndx_start;
  
-@@ -1308,6 +1333,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1308,6 +1335,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;
@@ -146,7 +155,7 @@
  extern int preserve_hard_links;
  extern int preserve_executability;
  extern int preserve_fileflags;
-@@ -620,6 +622,13 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
+@@ -623,6 +625,13 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
  	if (gid_ndx && !(file->flags & FLAG_SKIP_GROUP) && sxp->st.st_gid != (gid_t)F_GROUP(file))
  		return 0;
  
@@ -160,7 +169,7 @@
  #ifdef SUPPORT_ACLS
  	if (preserve_acls && !S_ISLNK(file->mode)) {
  		if (!ACL_READY(*sxp))
-@@ -663,6 +672,12 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -666,6 +675,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))
  			iflags |= ITEM_REPORT_TIME;
@@ -173,7 +182,7 @@
  #if !defined HAVE_LCHMOD && !defined HAVE_SETATTRLIST
  		if (S_ISLNK(file->mode)) {
  			;
-@@ -1223,6 +1238,7 @@ static int try_dests_non(struct file_struct *file, char *fname, int ndx,
+@@ -1226,6 +1241,7 @@ static int try_dests_non(struct file_struct *file, char *fname, int ndx,
  static void list_file_entry(struct file_struct *f)
  {
  	char permbuf[PERMSTRING_SIZE];
@@ -181,7 +190,7 @@
  	double len;
  
  	if (!F_IS_ACTIVE(f)) {
-@@ -1237,14 +1253,16 @@ static void list_file_entry(struct file_struct *f)
+@@ -1240,14 +1256,16 @@ static void list_file_entry(struct file_struct *f)
  
  #ifdef SUPPORT_LINKS
  	if (preserve_links && S_ISLNK(f->mode)) {
@@ -200,7 +209,7 @@
  			f_name(f, NULL));
  	}
  }
-@@ -1336,6 +1354,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1339,6 +1357,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
  			return;
  		}
  	}
@@ -208,6 +217,25 @@
  
  #ifdef SUPPORT_ACLS
  	sx.acc_acl = sx.def_acl = NULL;
+diff --git a/hlink.c b/hlink.c
+--- a/hlink.c
++++ b/hlink.c
+@@ -366,6 +366,7 @@ int hard_link_check(struct file_struct *file, int ndx, const char *fname,
+ 		char cmpbuf[MAXPATHLEN];
+ 		stat_x alt_sx;
+ 		int j = 0;
++		alt_sx.crtime = 0;
+ #ifdef SUPPORT_ACLS
+ 		alt_sx.acc_acl = alt_sx.def_acl = NULL;
+ #endif
+@@ -494,6 +495,7 @@ void finish_hard_link(struct file_struct *file, const char *fname, int fin_ndx,
+ 	} else
+ 		our_name = fname;
+ 
++	prev_sx.crtime = 0;
+ #ifdef SUPPORT_ACLS
+ 	prev_sx.acc_acl = prev_sx.def_acl = NULL;
+ #endif
 diff --git a/ifuncs.h b/ifuncs.h
 --- a/ifuncs.h
 +++ b/ifuncs.h
@@ -264,7 +292,7 @@
  int update_only = 0;
  int cvs_exclude = 0;
  int dry_run = 0;
-@@ -362,6 +363,7 @@ void usage(enum logcode F)
+@@ -363,6 +364,7 @@ void usage(enum logcode F)
    rprintf(F," -D                          same as --devices --specials\n");
    rprintf(F," -t, --times                 preserve modification times\n");
    rprintf(F," -O, --omit-dir-times        omit directories from --times\n");
@@ -272,7 +300,7 @@
    rprintf(F,"     --super                 receiver attempts super-user activities\n");
  #ifdef SUPPORT_XATTRS
    rprintf(F,"     --fake-super            store/recover privileged attrs using xattrs\n");
-@@ -508,6 +510,9 @@ static struct poptOption long_options[] = {
+@@ -509,6 +511,9 @@ static struct poptOption long_options[] = {
    {"times",           't', POPT_ARG_VAL,    &preserve_times, 2, 0, 0 },
    {"no-times",         0,  POPT_ARG_VAL,    &preserve_times, 0, 0, 0 },
    {"no-t",             0,  POPT_ARG_VAL,    &preserve_times, 0, 0, 0 },
@@ -282,7 +310,7 @@
    {"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 },
-@@ -1799,6 +1804,8 @@ void server_options(char **args, int *argc_p)
+@@ -1800,6 +1805,8 @@ void server_options(char **args, int *argc_p)
  		argstr[x++] = 'D';
  	if (preserve_times)
  		argstr[x++] = 't';
@@ -294,7 +322,15 @@
 diff --git a/rsync.c b/rsync.c
 --- a/rsync.c
 +++ b/rsync.c
-@@ -472,6 +472,14 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
+@@ -428,6 +428,7 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
+ 				full_fname(fname));
+ 			return 0;
+ 		}
++		sx2.crtime = 0;
+ #ifdef SUPPORT_ACLS
+ 		sx2.acc_acl = sx2.def_acl = NULL;
+ #endif
+@@ -475,6 +476,14 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
  		else
  			file->flags |= FLAG_TIME_FAILED;
  	}
@@ -309,7 +345,7 @@
  
  	change_uid = am_root && uid_ndx && sxp->st.st_uid != (uid_t)F_OWNER(file);
  	change_gid = gid_ndx && !(file->flags & FLAG_SKIP_GROUP)
-@@ -619,7 +627,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -622,7 +631,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
  	/* Change permissions before putting the file into place. */
  	set_file_attrs(fnametmp, file, NULL, fnamecmp,
  		       ATTRS_DELAY_IMMUTABLE
@@ -318,7 +354,7 @@
  
  	/* move tmp file over real file */
  	if (verbose > 2)
-@@ -650,7 +658,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -653,7 +662,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
  
    do_set_file_attrs:
  	set_file_attrs(fnametmp, file, NULL, fnamecmp,
@@ -371,7 +407,7 @@
  #define DEV_EXTRA_CNT 2
  #define DIRNODE_EXTRA_CNT 3
  #define SUM_EXTRA_CNT ((MAX_DIGEST_LEN + EXTRA_LEN - 1) / EXTRA_LEN)
-@@ -922,6 +926,7 @@ typedef struct {
+@@ -931,6 +935,7 @@ typedef struct {
  
  typedef struct {
      STRUCT_STAT st;
@@ -382,7 +418,7 @@
 diff --git a/rsync.yo b/rsync.yo
 --- a/rsync.yo
 +++ b/rsync.yo
-@@ -350,6 +350,7 @@ to the detailed description below for a complete description.  verb(
+@@ -354,6 +354,7 @@ to the detailed description below for a complete description.  verb(
   -D                          same as --devices --specials
   -t, --times                 preserve modification times
   -O, --omit-dir-times        omit directories from --times
@@ -390,7 +426,7 @@
       --super                 receiver attempts super-user activities
       --fake-super            store/recover privileged attrs using xattrs
   -S, --sparse                handle sparse files efficiently
-@@ -1028,6 +1029,9 @@ it is preserving modification times (see bf(--times)).  If NFS is sharing
+@@ -1032,6 +1033,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).
  
@@ -400,7 +436,7 @@
  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
-@@ -1692,7 +1696,7 @@ with older versions of rsync, but that also turns on the output of other
+@@ -1696,7 +1700,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
@@ -409,7 +445,7 @@
  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.
-@@ -1751,6 +1755,8 @@ quote(itemization(
+@@ -1755,6 +1759,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.
@@ -613,56 +649,3 @@
    fprintf(F," -l, --link-times            display the time on a symlink\n");
    fprintf(F," -L, --link-owner            display the owner+group on a symlink\n");
  #ifdef SUPPORT_XATTRS
-diff -up a/proto.h b/proto.h
---- a/proto.h
-+++ b/proto.h
-@@ -312,6 +312,8 @@ int do_stat(const char *fname, STRUCT_ST
- int do_lstat(const char *fname, STRUCT_STAT *st);
- int do_fstat(int fd, STRUCT_STAT *st);
- OFF_T do_lseek(int fd, OFF_T offset, int whence);
-+time_t get_create_time(const char *path);
-+int set_create_time(const char *path, time_t crtime);
- void set_compression(const char *fname);
- void send_token(int f, int32 token, struct map_struct *buf, OFF_T offset,
- 		int32 n, int32 toklen);
-diff -up a/rsync.1 b/rsync.1
---- a/rsync.1
-+++ b/rsync.1
-@@ -425,6 +425,7 @@ to the detailed description below for a 
-  \-D                          same as \-\-devices \-\-specials
-  \-t, \-\-times                 preserve modification times
-  \-O, \-\-omit\-dir\-times        omit directories from \-\-times
-+ \-N, \-\-crtimes               preserve create times (newness)
-      \-\-super                 receiver attempts super-user activities
-      \-\-fake\-super            store/recover privileged attrs using xattrs
-  \-S, \-\-sparse                handle sparse files efficiently
-@@ -1183,6 +1184,10 @@ it is preserving modification times (see
- the directories on the receiving side, it is a good idea to use \fB\-O\fP.
- This option is inferred if you use \fB\-\-backup\fP without \fB\-\-backup\-dir\fP.
- .IP 
-+.IP "\fB\-N, \-\-crtimes\fP"
-+This tells rsync to set the create times (newness) of
-+the destination files to the same value as the source files.
-+.IP 
- .IP "\fB\-\-super\fP"
- This tells the receiving side to attempt super-user
- activities even if the receiving rsync wasn't run by the super-user.  These
-@@ -1938,7 +1943,7 @@ with older versions of rsync, but that a
- verbose messages).
- .IP 
- The \(lq%i\(rq escape has a cryptic output that is 11 letters long.  The general
--format is like the string \fBYXcstpogfax\fP, where \fBY\fP is replaced by the
-+format is like the string \fBYXcstpogfaxn\fP, where \fBY\fP is replaced by the
- type of update being done, \fBX\fP is replaced by the file-type, and the
- other letters represent attributes that may be output if they are being
- modified.
-@@ -2013,6 +2018,9 @@ The \fBf\fP means that the fileflags inf
- The \fBa\fP means that the ACL information changed.
- .IP o 
- The \fBx\fP means that the extended attribute information changed.
-+.IP o 
-+A \fBn\fP means the create time (newness) is different and is being
-+updated to the sender's value (requires \fB\-\-crtimes\fP).
- .RE
- 
- .IP 

Modified: trunk/dports/net/rsync/files/patch-fileflags.diff
===================================================================
--- trunk/dports/net/rsync/files/patch-fileflags.diff	2009-01-04 15:42:50 UTC (rev 44898)
+++ trunk/dports/net/rsync/files/patch-fileflags.diff	2009-01-04 15:44:46 UTC (rev 44899)
@@ -164,7 +164,7 @@
  	if (uid_ndx) /* Check uid_ndx instead of preserve_uid for del support */
  		F_OWNER(file) = st.st_uid;
  	if (gid_ndx) /* Check gid_ndx instead of preserve_gid for del support */
-@@ -1427,6 +1458,7 @@ static struct file_struct *send_file_name(int f, struct file_list *flist,
+@@ -1408,6 +1439,7 @@ static struct file_struct *send_file_name(int f, struct file_list *flist,
  #endif
  #ifdef SUPPORT_XATTRS
  		if (preserve_xattrs) {
@@ -223,7 +223,7 @@
  		/* Save stack by recursing to ourself directly. */
  		if (S_ISDIR(fp->mode)) {
  			if (delete_dir_contents(fname, flags | DEL_RECURSE) != DR_SUCCESS)
-@@ -596,6 +609,11 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
+@@ -599,6 +612,11 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
  	 && ((sxp->st.st_mode & 0111 ? 1 : 0) ^ (file->mode & 0111 ? 1 : 0)))
  		return 0;
  
@@ -235,7 +235,7 @@
  	if (am_root && uid_ndx && sxp->st.st_uid != (uid_t)F_OWNER(file))
  		return 0;
  
-@@ -661,6 +679,11 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -664,6 +682,11 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
  		if (gid_ndx && !(file->flags & FLAG_SKIP_GROUP)
  		    && sxp->st.st_gid != (gid_t)F_GROUP(file))
  			iflags |= ITEM_REPORT_GROUP;
@@ -247,7 +247,7 @@
  #ifdef SUPPORT_ACLS
  		if (preserve_acls && !S_ISLNK(file->mode)) {
  			if (!ACL_READY(*sxp))
-@@ -1439,6 +1462,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1442,6 +1465,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
  			file->mode = dest_mode(file->mode, sx.st.st_mode,
  					       dflt_perms, statret == 0);
  		}
@@ -258,7 +258,7 @@
  		if (statret != 0 && basis_dir[0] != NULL) {
  			int j = try_dests_non(file, fname, ndx, fnamecmpbuf, &sx,
  					      itemizing, code);
-@@ -1479,10 +1506,15 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1482,10 +1509,15 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
  		/* We need to ensure that the dirs in the transfer have writable
  		 * permissions during the time we are putting files within them.
  		 * This is then fixed after the transfer is done. */
@@ -275,7 +275,7 @@
  				rsyserr(FERROR_XFER, errno,
  					"failed to modify permissions on %s",
  					full_fname(fname));
-@@ -1517,6 +1549,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1520,6 +1552,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
  		file->mode = dest_mode(file->mode, sx.st.st_mode, dflt_perms,
  				       exists);
  	}
@@ -286,7 +286,7 @@
  
  #ifdef SUPPORT_HARD_LINKS
  	if (preserve_hard_links && F_HLINK_NOT_FIRST(file)
-@@ -2051,13 +2087,17 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
+@@ -2054,13 +2090,17 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
  			continue;
  		fname = f_name(file, NULL);
  		if (!(file->mode & S_IWUSR))
@@ -345,7 +345,7 @@
  	STRUCT_STAT *dumstat;
  
  #if SUBPROTOCOL_VERSION != 0
-@@ -257,6 +260,9 @@ static void print_rsync_version(enum logcode f)
+@@ -258,6 +261,9 @@ static void print_rsync_version(enum logcode f)
  #if defined HAVE_LUTIMES && defined HAVE_UTIMES
  	symtimes = "";
  #endif
@@ -355,7 +355,7 @@
  
  	rprintf(f, "%s  version %s  protocol version %d%s\n",
  		RSYNC_NAME, RSYNC_VERSION, PROTOCOL_VERSION, subprotocol);
-@@ -270,8 +276,8 @@ static void print_rsync_version(enum logcode f)
+@@ -271,8 +277,8 @@ static void print_rsync_version(enum logcode f)
  		(int)(sizeof (int64) * 8));
  	rprintf(f, "    %ssocketpairs, %shardlinks, %ssymlinks, %sIPv6, batchfiles, %sinplace,\n",
  		got_socketpair, hardlinks, links, ipv6, have_inplace);
@@ -366,7 +366,7 @@
  
  #ifdef MAINTAINER_MODE
  	rprintf(f, "Panic Action: \"%s\"\n", get_panic_action());
-@@ -338,6 +344,9 @@ void usage(enum logcode F)
+@@ -339,6 +345,9 @@ void usage(enum logcode F)
    rprintf(F," -K, --keep-dirlinks         treat symlinked dir on receiver as dir\n");
    rprintf(F," -H, --hard-links            preserve hard links\n");
    rprintf(F," -p, --perms                 preserve permissions\n");
@@ -376,7 +376,7 @@
    rprintf(F," -E, --executability         preserve the file's executability\n");
    rprintf(F,"     --chmod=CHMOD           affect file and/or directory permissions\n");
  #ifdef SUPPORT_ACLS
-@@ -375,7 +384,12 @@ void usage(enum logcode F)
+@@ -376,7 +385,12 @@ void usage(enum logcode F)
    rprintf(F,"     --delete-after          receiver deletes after transfer, not during\n");
    rprintf(F,"     --delete-excluded       also delete excluded files from destination dirs\n");
    rprintf(F,"     --ignore-errors         delete even if there are I/O errors\n");
@@ -390,7 +390,7 @@
    rprintf(F,"     --max-delete=NUM        don't delete more than NUM files\n");
    rprintf(F,"     --max-size=SIZE         don't transfer any file larger than SIZE\n");
    rprintf(F,"     --min-size=SIZE         don't transfer any file smaller than SIZE\n");
-@@ -480,6 +494,10 @@ static struct poptOption long_options[] = {
+@@ -481,6 +495,10 @@ static struct poptOption long_options[] = {
    {"perms",           'p', POPT_ARG_VAL,    &preserve_perms, 1, 0, 0 },
    {"no-perms",         0,  POPT_ARG_VAL,    &preserve_perms, 0, 0, 0 },
    {"no-p",             0,  POPT_ARG_VAL,    &preserve_perms, 0, 0, 0 },
@@ -401,7 +401,7 @@
    {"executability",   'E', POPT_ARG_NONE,   &preserve_executability, 0, 0, 0 },
    {"acls",            'A', POPT_ARG_NONE,   0, 'A', 0, 0 },
    {"no-acls",          0,  POPT_ARG_VAL,    &preserve_acls, 0, 0, 0 },
-@@ -558,6 +576,14 @@ static struct poptOption long_options[] = {
+@@ -559,6 +577,14 @@ static struct poptOption long_options[] = {
    {"remove-source-files",0,POPT_ARG_VAL,    &remove_source_files, 1, 0, 0 },
    {"force",            0,  POPT_ARG_VAL,    &force_delete, 1, 0, 0 },
    {"no-force",         0,  POPT_ARG_VAL,    &force_delete, 0, 0, 0 },
@@ -416,7 +416,7 @@
    {"ignore-errors",    0,  POPT_ARG_VAL,    &ignore_errors, 1, 0, 0 },
    {"no-ignore-errors", 0,  POPT_ARG_VAL,    &ignore_errors, 0, 0, 0 },
    {"max-delete",       0,  POPT_ARG_INT,    &max_delete, 0, 0, 0 },
-@@ -1866,6 +1892,9 @@ void server_options(char **args, int *argc_p)
+@@ -1868,6 +1894,9 @@ void server_options(char **args, int *argc_p)
  	if (xfer_dirs && !recurse && delete_mode && am_sender)
  		args[ac++] = "--no-r";
  
@@ -426,7 +426,7 @@
  	if (do_compression && def_compress_level != Z_DEFAULT_COMPRESSION) {
  		if (asprintf(&arg, "--compress-level=%d", def_compress_level) < 0)
  			goto oom;
-@@ -1953,6 +1982,16 @@ void server_options(char **args, int *argc_p)
+@@ -1955,6 +1984,16 @@ void server_options(char **args, int *argc_p)
  			args[ac++] = "--delete-excluded";
  		if (force_delete)
  			args[ac++] = "--force";
@@ -454,7 +454,7 @@
  extern int preserve_executability;
  extern int preserve_times;
  extern int am_root;
-@@ -374,6 +375,39 @@ mode_t dest_mode(mode_t flist_mode, mode_t stat_mode, int dflt_perms,
+@@ -377,6 +378,39 @@ mode_t dest_mode(mode_t flist_mode, mode_t stat_mode, int dflt_perms,
  	return new_mode;
  }
  
@@ -494,7 +494,7 @@
  int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
  		   const char *fnamecmp, int flags)
  {
-@@ -427,7 +461,7 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
+@@ -430,7 +464,7 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
  		flags |= ATTRS_SKIP_MTIME;
  	if (!(flags & ATTRS_SKIP_MTIME)
  	    && cmp_time(sxp->st.st_mtime, file->modtime) != 0) {
@@ -503,7 +503,7 @@
  		if (ret < 0) {
  			rsyserr(FERROR_XFER, errno, "failed to set times on %s",
  				full_fname(fname));
-@@ -463,7 +497,8 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
+@@ -466,7 +500,8 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
  		if (am_root >= 0) {
  			if (do_lchown(fname,
  			    change_uid ? (uid_t)F_OWNER(file) : sxp->st.st_uid,
@@ -513,7 +513,7 @@
  				/* We shouldn't have attempted to change uid
  				 * or gid unless have the privilege. */
  				rsyserr(FERROR_XFER, errno, "%s %s failed",
-@@ -495,7 +530,7 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
+@@ -498,7 +533,7 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
  
  #ifdef HAVE_CHMOD
  	if (!BITS_EQUAL(sxp->st.st_mode, new_mode, CHMOD_BITS)) {
@@ -522,7 +522,7 @@
  		if (ret < 0) {
  			rsyserr(FERROR_XFER, errno,
  				"failed to set permissions on %s",
-@@ -507,6 +542,19 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
+@@ -510,6 +545,19 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
  	}
  #endif
  
@@ -542,7 +542,7 @@
  	if (verbose > 1 && flags & ATTRS_REPORT) {
  		if (updated)
  			rprintf(FCLIENT, "%s\n", fname);
-@@ -570,7 +618,8 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -573,7 +621,8 @@ int finish_transfer(const char *fname, const char *fnametmp,
  
  	/* Change permissions before putting the file into place. */
  	set_file_attrs(fnametmp, file, NULL, fnamecmp,
@@ -552,7 +552,7 @@
  
  	/* move tmp file over real file */
  	if (verbose > 2)
-@@ -589,6 +638,10 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -592,6 +641,10 @@ int finish_transfer(const char *fname, const char *fnametmp,
  	}
  	if (ret == 0) {
  		/* The file was moved into place (not copied), so it's done. */
@@ -642,7 +642,7 @@
 diff --git a/rsync.yo b/rsync.yo
 --- a/rsync.yo
 +++ b/rsync.yo
-@@ -338,6 +338,7 @@ to the detailed description below for a complete description.  verb(
+@@ -342,6 +342,7 @@ to the detailed description below for a complete description.  verb(
   -K, --keep-dirlinks         treat symlinked dir on receiver as dir
   -H, --hard-links            preserve hard links
   -p, --perms                 preserve permissions
@@ -650,7 +650,7 @@
   -E, --executability         preserve executability
       --chmod=CHMOD           affect file and/or directory permissions
   -A, --acls                  preserve ACLs (implies -p)
-@@ -369,7 +370,10 @@ to the detailed description below for a complete description.  verb(
+@@ -373,7 +374,10 @@ to the detailed description below for a complete description.  verb(
       --delete-after          receiver deletes after transfer, not before
       --delete-excluded       also delete excluded files from dest dirs
       --ignore-errors         delete even if there are I/O errors
@@ -662,7 +662,7 @@
       --max-delete=NUM        don't delete more than NUM files
       --max-size=SIZE         don't transfer any file larger than SIZE
       --min-size=SIZE         don't transfer any file smaller than SIZE
-@@ -540,7 +544,8 @@ specified, in which case bf(-r) is not implied.
+@@ -544,7 +548,8 @@ specified, in which case bf(-r) is not implied.
  
  Note that bf(-a) bf(does not preserve hardlinks), because
  finding multiply-linked files is expensive.  You must separately
@@ -672,7 +672,7 @@
  
  dit(--no-OPTION) You may turn off one or more implied options by prefixing
  the option name with "no-".  Not all options may be prefixed with a "no-":
-@@ -798,7 +803,7 @@ they would be using bf(--copy-links).
+@@ -802,7 +807,7 @@ they would be using bf(--copy-links).
  Without this option, if the sending side has replaced a directory with a
  symlink to a directory, the receiving side will delete anything that is in
  the way of the new symlink, including a directory hierarchy (as long as
@@ -681,7 +681,7 @@
  
  See also bf(--keep-dirlinks) for an analogous option for the receiving
  side.
-@@ -935,6 +940,29 @@ super-user copies all namespaces except system.*.  A normal user only copies
+@@ -939,6 +944,29 @@ super-user copies all namespaces except system.*.  A normal user only copies
  the user.* namespace.  To be able to backup and restore non-user namespaces as
  a normal user, see the bf(--fake-super) option.
  
@@ -711,7 +711,7 @@
  dit(bf(--chmod)) This option tells rsync to apply one or more
  comma-separated "chmod" strings to the permission of the files in the
  transfer.  The resulting value is treated as though it was the permissions
-@@ -1197,12 +1225,13 @@ See bf(--delete) (which is implied) for more details on file-deletion.
+@@ -1201,12 +1229,13 @@ See bf(--delete) (which is implied) for more details on file-deletion.
  dit(bf(--ignore-errors)) Tells bf(--delete) to go ahead and delete files
  even when there are I/O errors.
  
@@ -728,7 +728,7 @@
  bf(--recursive) option was also enabled.
  
  dit(bf(--max-delete=NUM)) This tells rsync not to delete more than NUM
-@@ -1663,7 +1692,7 @@ with older versions of rsync, but that also turns on the output of other
+@@ -1667,7 +1696,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
@@ -737,7 +737,7 @@
  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.
-@@ -1719,7 +1748,7 @@ quote(itemization(
+@@ -1723,7 +1752,7 @@ quote(itemization(
    sender's value (requires bf(--owner) and super-user privileges).
    it() A bf(g) means the group is different and is being updated to the
    sender's value (requires bf(--group) and the authority to set the group).
@@ -1081,182 +1081,3 @@
  	if (!IS_DEVICE(fst.st_mode) && !IS_SPECIAL(fst.st_mode))
  		fst.st_rdev = 0; /* just in case */
  
-diff -up a/config.h.in b/config.h.in
---- a/config.h.in
-+++ b/config.h.in
-@@ -67,6 +67,9 @@
- /* Define to 1 if vsprintf has a C99-compatible return value */
- #undef HAVE_C99_VSNPRINTF
- 
-+/* Define to 1 if you have the `chflags' function. */
-+#undef HAVE_CHFLAGS
-+
- /* Define to 1 if you have the `chmod' function. */
- #undef HAVE_CHMOD
- 
-diff -up a/configure.sh b/configure.sh
---- a/configure.sh
-+++ b/configure.sh
-@@ -14796,12 +14796,13 @@ fi
- 
- 
- 
-+
- for ac_func in waitpid wait4 getcwd strdup chown chmod lchmod mknod mkfifo \
-     fchmod fstat ftruncate strchr readlink link utime utimes lutimes strftime \
-     memmove lchown vsnprintf snprintf vasprintf asprintf setsid strpbrk \
-     strlcat strlcpy strtol mallinfo getgroups setgroups geteuid getegid \
-     setlocale setmode open64 lseek64 mkstemp64 mtrace va_copy __va_copy \
--    strerror putenv iconv_open locale_charset nl_langinfo getxattr \
-+    chflags strerror putenv iconv_open locale_charset nl_langinfo getxattr \
-     extattr_get_link sigaction sigprocmask setattrlist
- do
- as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-diff -up a/proto.h b/proto.h
---- a/proto.h
-+++ b/proto.h
-@@ -272,6 +272,8 @@ int read_ndx_and_attrs(int f_in, int *if
- void free_sums(struct sum_struct *s);
- mode_t dest_mode(mode_t flist_mode, mode_t stat_mode, int dflt_perms,
- 		 int exists);
-+int make_mutable(const char *fname, mode_t mode, uint32 fileflags, uint32 iflags);
-+int undo_make_mutable(const char *fname, uint32 fileflags);
- int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
- 		   const char *fnamecmp, int flags);
- RETSIGTYPE sig_int(UNUSED(int val));
-@@ -296,11 +298,12 @@ int sock_exec(const char *prog);
- int do_unlink(const char *fname);
- int do_symlink(const char *fname1, const char *fname2);
- int do_link(const char *fname1, const char *fname2);
--int do_lchown(const char *path, uid_t owner, gid_t group);
-+int do_lchown(const char *path, uid_t owner, gid_t group, mode_t mode, uint32 fileflags);
- int do_mknod(const char *pathname, mode_t mode, dev_t dev);
- int do_rmdir(const char *pathname);
- int do_open(const char *pathname, int flags, mode_t mode);
--int do_chmod(const char *path, mode_t mode);
-+int do_chmod(const char *path, mode_t mode, uint32 fileflags);
-+int do_chflags(const char *path, uint32 fileflags);
- int do_rename(const char *fname1, const char *fname2);
- void trim_trailing_slashes(char *name);
- int do_mkdir(char *fname, mode_t mode);
-@@ -328,7 +331,7 @@ int fd_pair(int fd[2]);
- void print_child_argv(const char *prefix, char **cmd);
- NORETURN void out_of_memory(const char *str);
- NORETURN void overflow_exit(const char *str);
--int set_modtime(const char *fname, time_t modtime, mode_t mode);
-+int set_modtime(const char *fname, time_t modtime, mode_t mode, uint32 fileflags);
- int mkdir_defmode(char *fname);
- int create_directory_path(char *fname);
- int full_write(int desc, const char *ptr, size_t len);
-diff -up a/rsync.1 b/rsync.1
---- a/rsync.1
-+++ b/rsync.1
-@@ -413,6 +413,7 @@ to the detailed description below for a 
-  \-K, \-\-keep\-dirlinks         treat symlinked dir on receiver as dir
-  \-H, \-\-hard\-links            preserve hard links
-  \-p, \-\-perms                 preserve permissions
-+     \-\-fileflags             preserve file-flags (aka chflags)
-  \-E, \-\-executability         preserve executability
-      \-\-chmod=CHMOD           affect file and/or directory permissions
-  \-A, \-\-acls                  preserve ACLs (implies \-p)
-@@ -444,7 +445,10 @@ to the detailed description below for a 
-      \-\-delete\-after          receiver deletes after transfer, not before
-      \-\-delete\-excluded       also delete excluded files from dest dirs
-      \-\-ignore\-errors         delete even if there are I/O errors
--     \-\-force                 force deletion of dirs even if not empty
-+     \-\-force\-delete          force deletion of dirs even if not empty
-+     \-\-force\-change          affect user/system immutable files/dirs
-+     \-\-force\-uchange         affect user-immutable files/dirs
-+     \-\-force\-schange         affect system-immutable files/dirs
-      \-\-max\-delete=NUM        don't delete more than NUM files
-      \-\-max\-size=SIZE         don't transfer any file larger than SIZE
-      \-\-min\-size=SIZE         don't transfer any file smaller than SIZE
-@@ -631,7 +635,8 @@ specified, in which case \fB\-r\fP is no
- .IP 
- Note that \fB\-a\fP \fBdoes not preserve hardlinks\fP, because
- finding multiply-linked files is expensive.  You must separately
--specify \fB\-H\fP.
-+specify \fB\-H\fP.  Note also that for backward compatibility, \fB\-a\fP
-+currently does \fBnot\fP imply the \fB\-\-fileflags\fP option.
- .IP 
- .IP "\-\-no\-OPTION"
- You may turn off one or more implied options by prefixing
-@@ -920,7 +925,7 @@ they would be using \fB\-\-copy\-links\f
- Without this option, if the sending side has replaced a directory with a
- symlink to a directory, the receiving side will delete anything that is in
- the way of the new symlink, including a directory hierarchy (as long as
--\fB\-\-force\fP or \fB\-\-delete\fP is in effect).
-+\fB\-\-force\-delete\fP or \fB\-\-delete\fP is in effect).
- .IP 
- See also \fB\-\-keep\-dirlinks\fP for an analogous option for the receiving
- side.
-@@ -1075,6 +1080,33 @@ super-user copies all namespaces except 
- the user.* namespace.  To be able to backup and restore non-user namespaces as
- a normal user, see the \fB\-\-fake\-super\fP option.
- .IP 
-+.IP "\fB\-\-fileflags\fP"
-+This option causes rsync to update the file-flags to be
-+the same as the source files and directories (if your OS supports the
-+\fBchflags\fP(2) system call).   Some flags can only be altered by the super-user
-+and some might only be unset below a certain secure-level (usually single-user
-+mode). It will not make files alterable that are set to immutable on the
-+receiver.  To do that, see \fB\-\-force\-change\fP, \fB\-\-force\-uchange\fP, and
-+\fB\-\-force\-schange\fP.
-+.IP 
-+.IP "\fB\-\-force\-change\fP"
-+This option causes rsync to disable both user-immutable
-+and system-immutable flags on files and directories that are being updated or
-+deleted on the receiving side.  This option overrides \fB\-\-force\-uchange\fP and
-+\fB\-\-force\-schange\fP.
-+.IP 
-+.IP "\fB\-\-force\-uchange\fP"
-+This option causes rsync to disable user-immutable
-+flags on files and directories that are being updated or deleted on the
-+receiving side.  It does not try to affect system flags.  This option overrides
-+\fB\-\-force\-change\fP and \fB\-\-force\-schange\fP.
-+.IP 
-+.IP "\fB\-\-force\-schange\fP"
-+This option causes rsync to disable system-immutable
-+flags on files and directories that are being updated or deleted on the
-+receiving side.  It does not try to affect user flags.  This option overrides
-+\fB\-\-force\-change\fP and \fB\-\-force\-schange\fP.
-+.IP 
- .IP "\fB\-\-chmod\fP"
- This option tells rsync to apply one or more
- comma-separated \(lqchmod\(rq strings to the permission of the files in the
-@@ -1367,13 +1399,14 @@ See \fB\-\-delete\fP (which is implied) 
- Tells \fB\-\-delete\fP to go ahead and delete files
- even when there are I/O errors.
- .IP 
--.IP "\fB\-\-force\fP"
-+.IP "\fB\-\-force\-delete\fP"
- This option tells rsync to delete a non-empty directory
- when it is to be replaced by a non-directory.  This is only relevant if
- deletions are not active (see \fB\-\-delete\fP for details).
- .IP 
--Note for older rsync versions: \fB\-\-force\fP used to still be required when
--using \fB\-\-delete\-after\fP, and it used to be non-functional unless the
-+This option can be abbreviated \fB\-\-force\fP for backward compatibility.
-+Note that some older rsync versions used to still require \fB\-\-force\fP
-+when using \fB\-\-delete\-after\fP, and it used to be non-functional unless the
- \fB\-\-recursive\fP option was also enabled.
- .IP 
- .IP "\fB\-\-max\-delete=NUM\fP"
-@@ -1905,7 +1938,7 @@ with older versions of rsync, but that a
- verbose messages).
- .IP 
- The \(lq%i\(rq escape has a cryptic output that is 11 letters long.  The general
--format is like the string \fBYXcstpoguax\fP, where \fBY\fP is replaced by the
-+format is like the string \fBYXcstpogfax\fP, where \fBY\fP is replaced by the
- type of update being done, \fBX\fP is replaced by the file-type, and the
- other letters represent attributes that may be output if they are being
- modified.
-@@ -1975,7 +2008,7 @@ sender's value (requires \fB\-\-owner\fP
- A \fBg\fP means the group is different and is being updated to the
- sender's value (requires \fB\-\-group\fP and the authority to set the group).
- .IP o 
--The \fBu\fP slot is reserved for future use.
-+The \fBf\fP means that the fileflags information changed.
- .IP o 
- The \fBa\fP means that the ACL information changed.
- .IP o 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090104/b1f03276/attachment-0001.html>


More information about the macports-changes mailing list