make proto
---- orig/Makefile.in 2004-07-04 08:59:17
+--- orig/Makefile.in 2004-11-02 16:47:15
+++ Makefile.in 2004-07-03 20:13:41
@@ -34,7 +34,7 @@ ZLIBOBJ=zlib/deflate.o zlib/infblock.o z
OBJS1=rsync.o generator.o receiver.o cleanup.o sender.o exclude.o util.o \
+ }
+ return 0;
+}
---- orig/flist.c 2004-07-15 02:21:10
-+++ flist.c 2004-07-03 20:13:41
-@@ -33,6 +33,7 @@ extern int verbose;
- extern int do_progress;
- extern int am_root;
- extern int am_server;
-+extern int am_sender;
- extern int am_daemon;
- extern int always_checksum;
- extern int module_id;
-@@ -64,6 +65,8 @@ extern int delete_excluded;
- extern int orig_umask;
- extern int list_only;
+--- orig/flist.c 2005-05-14 19:51:15
++++ flist.c 2004-09-18 01:51:11
+@@ -62,6 +62,8 @@ extern struct file_list *the_file_list;
+
+ extern char curr_dir[MAXPATHLEN];
+extern struct chmod_mode_struct *chmod_modes;
+
- extern struct exclude_list_struct exclude_list;
- extern struct exclude_list_struct server_exclude_list;
- extern struct exclude_list_struct local_exclude_list;
-@@ -865,7 +868,10 @@ skip_excludes:
+ extern struct filter_list_struct filter_list;
+ extern struct filter_list_struct server_filter_list;
+
+@@ -883,7 +885,10 @@ skip_filters:
file->flags = flags;
file->modtime = st.st_mtime;
file->length = st.st_size;
file->uid = st.st_uid;
file->gid = st.st_gid;
---- orig/options.c 2004-07-15 16:51:50
-+++ options.c 2004-07-03 20:13:41
-@@ -124,6 +124,7 @@ char *log_format = NULL;
+--- orig/options.c 2005-05-19 08:52:42
++++ options.c 2005-03-01 01:26:56
+@@ -141,6 +141,7 @@ char *log_format = NULL;
char *password_file = NULL;
char *rsync_path = RSYNC_PATH;
char *backup_dir = NULL;
+char *chmod_mode = NULL;
char backup_dir_buf[MAXPATHLEN];
- int rsync_port = RSYNC_PORT;
- int link_dest = 0;
-@@ -136,6 +137,8 @@ int list_only = 0;
+ int rsync_port = 0;
+ int compare_dest = 0;
+@@ -160,6 +161,8 @@ int list_only = 0;
#define MAX_BATCH_NAME_LEN 256 /* Must be less than MAXPATHLEN-13 */
char *batch_name = NULL;
+struct chmod_mode_struct *chmod_modes = NULL;
+
static int daemon_opt; /* sets am_daemon after option error-reporting */
+ static int F_option_cnt = 0;
static int modify_window_set;
-
-@@ -244,6 +247,7 @@ void usage(enum logcode F)
- rprintf(F," -g, --group preserve group\n");
+@@ -287,6 +290,7 @@ void usage(enum logcode F)
rprintf(F," -D, --devices preserve devices (root only)\n");
rprintf(F," -t, --times preserve times\n");
+ rprintf(F," -O, --omit-dir-times omit directories when preserving times\n");
+ rprintf(F," --chmod=CHMOD change destination permissions\n");
rprintf(F," -S, --sparse handle sparse files efficiently\n");
rprintf(F," -n, --dry-run show what would have been transferred\n");
- rprintf(F," -W, --whole-file copy whole files, no incremental checks\n");
-@@ -349,6 +353,7 @@ static struct poptOption long_options[]
+ rprintf(F," -W, --whole-file copy files whole (without rsync algorithm)\n");
+@@ -410,6 +414,7 @@ static struct poptOption long_options[]
{"perms", 'p', POPT_ARG_NONE, &preserve_perms, 0, 0, 0 },
{"owner", 'o', POPT_ARG_NONE, &preserve_uid, 0, 0, 0 },
{"group", 'g', POPT_ARG_NONE, &preserve_gid, 0, 0, 0 },
+ {"chmod", 0, POPT_ARG_STRING, &chmod_mode, 0, 0, 0 },
{"devices", 'D', POPT_ARG_NONE, &preserve_devices, 0, 0, 0 },
{"times", 't', POPT_ARG_NONE, &preserve_times, 0, 0, 0 },
- {"checksum", 'c', POPT_ARG_NONE, &always_checksum, 0, 0, 0 },
-@@ -729,6 +734,13 @@ int parse_arguments(int *argc, const cha
- exit_cleanup(RERR_SYNTAX);
- }
+ {"omit-dir-times", 'O', POPT_ARG_VAL, &omit_dir_times, 2, 0, 0 },
+@@ -1090,6 +1095,13 @@ int parse_arguments(int *argc, const cha
+ if (make_backups && !backup_dir)
+ omit_dir_times = 1;
+ if (chmod_mode && !(chmod_modes = parse_chmod(chmod_mode))) {
+ snprintf(err_buf, sizeof err_buf,
+ return 0;
+ }
+
- if (do_progress && !verbose)
- verbose = 1;
-
-@@ -969,6 +981,11 @@ void server_options(char **args,int *arg
- args[ac++] = compare_dest;
+ if (log_format) {
+ if (log_format_has(log_format, 'i'))
+ log_format_has_i = 1;
+@@ -1458,6 +1470,11 @@ void server_options(char **args,int *arg
+ }
}
+ if (chmod_mode && !am_sender) {
+ args[ac++] = chmod_mode;
+ }
+
- if (files_from && (!am_sender || remote_filesfrom_file)) {
- if (remote_filesfrom_file) {
+ if (files_from && (!am_sender || filesfrom_host)) {
+ if (filesfrom_host) {
args[ac++] = "--files-from";
---- orig/rsync.yo 2004-07-15 02:21:11
-+++ rsync.yo 2004-07-03 20:13:41
-@@ -300,6 +300,7 @@ verb(
- -g, --group preserve group
+--- orig/rsync.yo 2005-05-10 23:47:12
++++ rsync.yo 2005-01-24 01:48:43
+@@ -322,6 +322,7 @@ to the detailed description below for a
-D, --devices preserve devices (root only)
-t, --times preserve times
+ -O, --omit-dir-times omit directories when preserving times
+ --chmod=CHMOD change destination permissions
-S, --sparse handle sparse files efficiently
-n, --dry-run show what would have been transferred
- -W, --whole-file copy whole files, no incremental checks
-@@ -552,6 +553,14 @@ cause the next transfer to behave as if
- their checksums compared and show up in log messages even if they haven't
- changed.
+ -W, --whole-file copy files whole (without rsync algorithm)
+@@ -659,6 +660,14 @@ it is preserving modification times (see
+ 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(--chmod)) This options tells rsync to apply the listed "chmod" pattern
+to the permission of the files on the destination. In addition to the normal
dit(bf(-n, --dry-run)) This tells rsync to not do any file transfers,
instead it will just report the actions it would have taken.
---- orig/testsuite/chmod.test 2004-06-18 17:22:09
-+++ testsuite/chmod.test 2004-06-18 17:22:09
+--- orig/testsuite/chmod-option.test 2004-06-18 17:22:09
++++ testsuite/chmod-option.test 2004-06-18 17:22:09
@@ -0,0 +1,43 @@
+#! /bin/sh
+