mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-05-24 23:05:52 -04:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c02f4b232a | ||
|
|
d8edb8c614 | ||
|
|
29050a2565 | ||
|
|
04a13dd408 |
22
NEWS
22
NEWS
@@ -1,4 +1,4 @@
|
|||||||
NEWS for rsync 2.6.6 (UNRELEASED)
|
NEWS for rsync 2.6.6 (28 Jul 2005)
|
||||||
Protocol: 29 (unchanged)
|
Protocol: 29 (unchanged)
|
||||||
Changes since 2.6.5:
|
Changes since 2.6.5:
|
||||||
|
|
||||||
@@ -29,34 +29,20 @@ Changes since 2.6.5:
|
|||||||
- A couple places that were comparing a local and a remote modification-
|
- A couple places that were comparing a local and a remote modification-
|
||||||
time were not honoring the --modify-window option.
|
time were not honoring the --modify-window option.
|
||||||
|
|
||||||
|
- Fixed a bug where the 'p' (permissions) itemized-changes flag might get
|
||||||
|
set too often (if some non-significant mode bits differed).
|
||||||
|
|
||||||
- Fixed a really old, minor bug that could cause rsync to warn about being
|
- Fixed a really old, minor bug that could cause rsync to warn about being
|
||||||
unable to mkdir() a path that ends in "/." because it just created the
|
unable to mkdir() a path that ends in "/." because it just created the
|
||||||
directory (required --relative, --no-implied-dirs, a source path that
|
directory (required --relative, --no-implied-dirs, a source path that
|
||||||
ended in either a trailing slash or a trailing "/.", and a non-existing
|
ended in either a trailing slash or a trailing "/.", and a non-existing
|
||||||
destination dir to tickle the bug in a recent version).
|
destination dir to tickle the bug in a recent version).
|
||||||
|
|
||||||
- If the user specifies a remote-host for both the source and destination,
|
|
||||||
we now output a syntax error rather than trying to open the destination
|
|
||||||
hostspec as a filename.
|
|
||||||
|
|
||||||
ENHANCEMENTS:
|
ENHANCEMENTS:
|
||||||
|
|
||||||
- Added the --append option that makes rsync append data onto files
|
|
||||||
that are longer on the source than the destination (this includes new
|
|
||||||
files).
|
|
||||||
|
|
||||||
- The configure script now checks for lutimes() and lchmod() so that
|
|
||||||
rsync can make use of them to update attributes of symlinks (on
|
|
||||||
systems that support this).
|
|
||||||
|
|
||||||
- Made the "max verbosity" setting in the rsyncd.conf file settable on a
|
- Made the "max verbosity" setting in the rsyncd.conf file settable on a
|
||||||
per-module basis (which now matches the documentation).
|
per-module basis (which now matches the documentation).
|
||||||
|
|
||||||
- Added two config items to the rsyncd.conf parsing: "pre-xfer exec"
|
|
||||||
and "post-xfer exec". These allow a command to be specified on a
|
|
||||||
per-module basis that will be run before and/or after a daemon-mode
|
|
||||||
transfer.
|
|
||||||
|
|
||||||
- The support/rrsync script has been upgraded to verify the args of options
|
- The support/rrsync script has been upgraded to verify the args of options
|
||||||
that take args (instead of rejecting any such options). The script was
|
that take args (instead of rejecting any such options). The script was
|
||||||
also changed to try to be more secure and to fix a problem in the parsing
|
also changed to try to be more secure and to fix a problem in the parsing
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ AC_CONFIG_SRCDIR([byteorder.h])
|
|||||||
AC_CONFIG_HEADER(config.h)
|
AC_CONFIG_HEADER(config.h)
|
||||||
AC_PREREQ(2.59)
|
AC_PREREQ(2.59)
|
||||||
|
|
||||||
RSYNC_VERSION=2.6.6pre1
|
RSYNC_VERSION=2.6.6
|
||||||
AC_SUBST(RSYNC_VERSION)
|
AC_SUBST(RSYNC_VERSION)
|
||||||
AC_MSG_NOTICE([Configuring rsync $RSYNC_VERSION])
|
AC_MSG_NOTICE([Configuring rsync $RSYNC_VERSION])
|
||||||
|
|
||||||
@@ -496,12 +496,11 @@ dnl AC_FUNC_MEMCMP
|
|||||||
|
|
||||||
AC_FUNC_UTIME_NULL
|
AC_FUNC_UTIME_NULL
|
||||||
AC_FUNC_ALLOCA
|
AC_FUNC_ALLOCA
|
||||||
AC_CHECK_FUNCS(waitpid wait4 getcwd strdup chown chmod lchmod mknod mkfifo \
|
AC_CHECK_FUNCS(waitpid wait4 getcwd strdup strerror chown chmod mknod mkfifo \
|
||||||
fchmod fstat ftruncate strchr readlink link utime utimes lutimes strftime \
|
fchmod fstat strchr readlink link utime utimes strftime mtrace ftruncate \
|
||||||
memmove lchown vsnprintf snprintf vasprintf asprintf setsid glob strpbrk \
|
memmove lchown vsnprintf snprintf vasprintf asprintf setsid glob strpbrk \
|
||||||
strlcat strlcpy strtol mallinfo getgroups setgroups geteuid getegid \
|
strlcat strlcpy strtol mallinfo getgroups setgroups geteuid getegid \
|
||||||
setlocale setmode open64 lseek64 mkstemp64 mtrace va_copy __va_copy \
|
setlocale setmode open64 lseek64 mkstemp64 va_copy __va_copy)
|
||||||
strerror putenv)
|
|
||||||
|
|
||||||
AC_CHECK_FUNCS(getpgrp tcgetpgrp)
|
AC_CHECK_FUNCS(getpgrp tcgetpgrp)
|
||||||
if test $ac_cv_func_getpgrp = yes; then
|
if test $ac_cv_func_getpgrp = yes; then
|
||||||
|
|||||||
37
generator.c
37
generator.c
@@ -54,7 +54,6 @@ extern int delay_updates;
|
|||||||
extern int update_only;
|
extern int update_only;
|
||||||
extern int opt_ignore_existing;
|
extern int opt_ignore_existing;
|
||||||
extern int inplace;
|
extern int inplace;
|
||||||
extern int append_mode;
|
|
||||||
extern int make_backups;
|
extern int make_backups;
|
||||||
extern int csum_length;
|
extern int csum_length;
|
||||||
extern int ignore_times;
|
extern int ignore_times;
|
||||||
@@ -471,42 +470,35 @@ static void generate_and_send_sums(int fd, OFF_T len, int f_out, int f_copy)
|
|||||||
OFF_T offset = 0;
|
OFF_T offset = 0;
|
||||||
|
|
||||||
sum_sizes_sqroot(&sum, len);
|
sum_sizes_sqroot(&sum, len);
|
||||||
write_sum_head(f_out, &sum);
|
|
||||||
|
|
||||||
if (append_mode > 0 && f_copy < 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (len > 0)
|
if (len > 0)
|
||||||
mapbuf = map_file(fd, len, MAX_MAP_SIZE, sum.blength);
|
mapbuf = map_file(fd, len, MAX_MAP_SIZE, sum.blength);
|
||||||
else
|
else
|
||||||
mapbuf = NULL;
|
mapbuf = NULL;
|
||||||
|
|
||||||
|
write_sum_head(f_out, &sum);
|
||||||
|
|
||||||
for (i = 0; i < sum.count; i++) {
|
for (i = 0; i < sum.count; i++) {
|
||||||
int32 n1 = (int32)MIN(len, (OFF_T)sum.blength);
|
int32 n1 = (int32)MIN(len, (OFF_T)sum.blength);
|
||||||
char *map = map_ptr(mapbuf, offset, n1);
|
char *map = map_ptr(mapbuf, offset, n1);
|
||||||
|
uint32 sum1 = get_checksum1(map, n1);
|
||||||
char sum2[SUM_LENGTH];
|
char sum2[SUM_LENGTH];
|
||||||
uint32 sum1;
|
|
||||||
|
|
||||||
len -= n1;
|
if (f_copy >= 0)
|
||||||
offset += n1;
|
|
||||||
|
|
||||||
if (f_copy >= 0) {
|
|
||||||
full_write(f_copy, map, n1);
|
full_write(f_copy, map, n1);
|
||||||
if (append_mode > 0)
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
sum1 = get_checksum1(map, n1);
|
|
||||||
get_checksum2(map, n1, sum2);
|
get_checksum2(map, n1, sum2);
|
||||||
|
|
||||||
if (verbose > 3) {
|
if (verbose > 3) {
|
||||||
rprintf(FINFO,
|
rprintf(FINFO,
|
||||||
"chunk[%.0f] offset=%.0f len=%ld sum1=%08lx\n",
|
"chunk[%.0f] offset=%.0f len=%ld sum1=%08lx\n",
|
||||||
(double)i, (double)offset - n1, (long)n1,
|
(double)i, (double)offset, (long)n1,
|
||||||
(unsigned long)sum1);
|
(unsigned long)sum1);
|
||||||
}
|
}
|
||||||
write_int(f_out, sum1);
|
write_int(f_out, sum1);
|
||||||
write_buf(f_out, sum2, sum.s2length);
|
write_buf(f_out, sum2, sum.s2length);
|
||||||
|
len -= n1;
|
||||||
|
offset += n1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mapbuf)
|
if (mapbuf)
|
||||||
@@ -713,7 +705,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
|
|||||||
itemize(file, ndx, statret, &st,
|
itemize(file, ndx, statret, &st,
|
||||||
statret ? ITEM_LOCAL_CHANGE : 0, 0, NULL);
|
statret ? ITEM_LOCAL_CHANGE : 0, 0, NULL);
|
||||||
}
|
}
|
||||||
if (statret != 0 && do_mkdir(fname,file->mode) < 0 && errno != EEXIST) {
|
if (statret != 0 && do_mkdir(fname,file->mode) != 0 && errno != EEXIST) {
|
||||||
if (!relative_paths || errno != ENOENT
|
if (!relative_paths || errno != ENOENT
|
||||||
|| create_directory_path(fname, orig_umask) < 0
|
|| create_directory_path(fname, orig_umask) < 0
|
||||||
|| (do_mkdir(fname, file->mode) < 0 && errno != EEXIST)) {
|
|| (do_mkdir(fname, file->mode) < 0 && errno != EEXIST)) {
|
||||||
@@ -807,7 +799,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
|
|||||||
safe_fname(fname),
|
safe_fname(fname),
|
||||||
(int)file->mode, (int)file->u.rdev);
|
(int)file->mode, (int)file->u.rdev);
|
||||||
}
|
}
|
||||||
if (do_mknod(fname,file->mode,file->u.rdev) < 0) {
|
if (do_mknod(fname,file->mode,file->u.rdev) != 0) {
|
||||||
rsyserr(FERROR, errno, "mknod %s failed",
|
rsyserr(FERROR, errno, "mknod %s failed",
|
||||||
full_fname(fname));
|
full_fname(fname));
|
||||||
} else {
|
} else {
|
||||||
@@ -1015,9 +1007,6 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (append_mode && st.st_size > file->length)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!compare_dest && fnamecmp_type <= FNAMECMP_BASIS_DIR_HIGH)
|
if (!compare_dest && fnamecmp_type <= FNAMECMP_BASIS_DIR_HIGH)
|
||||||
;
|
;
|
||||||
else if (fnamecmp_type == FNAMECMP_FUZZY)
|
else if (fnamecmp_type == FNAMECMP_FUZZY)
|
||||||
@@ -1191,7 +1180,7 @@ void generate_files(int f_out, struct file_list *flist, char *local_name)
|
|||||||
do_delete_pass(flist);
|
do_delete_pass(flist);
|
||||||
do_progress = 0;
|
do_progress = 0;
|
||||||
|
|
||||||
if (append_mode || whole_file < 0)
|
if (whole_file < 0)
|
||||||
whole_file = 0;
|
whole_file = 0;
|
||||||
if (verbose >= 2) {
|
if (verbose >= 2) {
|
||||||
rprintf(FINFO, "delta-transmission %s\n",
|
rprintf(FINFO, "delta-transmission %s\n",
|
||||||
@@ -1219,19 +1208,17 @@ void generate_files(int f_out, struct file_list *flist, char *local_name)
|
|||||||
/* We need to ensure that any dirs we create have writeable
|
/* We need to ensure that any dirs we create have writeable
|
||||||
* permissions during the time we are putting files within
|
* permissions during the time we are putting files within
|
||||||
* them. This is then fixed after the transfer is done. */
|
* them. This is then fixed after the transfer is done. */
|
||||||
#ifdef HAVE_CHMOD
|
|
||||||
if (!am_root && S_ISDIR(file->mode) && !(file->mode & S_IWUSR)
|
if (!am_root && S_ISDIR(file->mode) && !(file->mode & S_IWUSR)
|
||||||
&& !list_only) {
|
&& !list_only) {
|
||||||
int mode = file->mode | S_IWUSR; /* user write */
|
int mode = file->mode | S_IWUSR; /* user write */
|
||||||
char *fname = local_name ? local_name : fbuf;
|
char *fname = local_name ? local_name : fbuf;
|
||||||
if (do_chmod(fname, mode) < 0) {
|
if (do_chmod(fname, mode & CHMOD_BITS) < 0) {
|
||||||
rsyserr(FERROR, errno,
|
rsyserr(FERROR, errno,
|
||||||
"failed to modify permissions on %s",
|
"failed to modify permissions on %s",
|
||||||
full_fname(fname));
|
full_fname(fname));
|
||||||
}
|
}
|
||||||
need_retouch_dir_perms = 1;
|
need_retouch_dir_perms = 1;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (preserve_hard_links)
|
if (preserve_hard_links)
|
||||||
check_for_finished_hlinks(itemizing, code);
|
check_for_finished_hlinks(itemizing, code);
|
||||||
@@ -1250,8 +1237,6 @@ void generate_files(int f_out, struct file_list *flist, char *local_name)
|
|||||||
only_existing = max_size = opt_ignore_existing = 0;
|
only_existing = max_size = opt_ignore_existing = 0;
|
||||||
update_only = always_checksum = size_only = 0;
|
update_only = always_checksum = size_only = 0;
|
||||||
ignore_times = 1;
|
ignore_times = 1;
|
||||||
if (append_mode) /* resend w/o append mode */
|
|
||||||
append_mode = -1; /* ... but only longer files */
|
|
||||||
make_backups = 0; /* avoid a duplicate backup for inplace processing */
|
make_backups = 0; /* avoid a duplicate backup for inplace processing */
|
||||||
|
|
||||||
if (verbose > 2)
|
if (verbose > 2)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
Summary: A program for synchronizing files over a network.
|
Summary: A program for synchronizing files over a network.
|
||||||
Name: rsync
|
Name: rsync
|
||||||
Version: 2.6.6pre1
|
Version: 2.6.6
|
||||||
Release: 1
|
Release: 1
|
||||||
Group: Applications/Internet
|
Group: Applications/Internet
|
||||||
Source: ftp://rsync.samba.org/pub/rsync/rsync-%{version}.tar.gz
|
Source: ftp://rsync.samba.org/pub/rsync/rsync-%{version}.tar.gz
|
||||||
|
|||||||
13
rsync.yo
13
rsync.yo
@@ -1,5 +1,5 @@
|
|||||||
mailto(rsync-bugs@samba.org)
|
mailto(rsync-bugs@samba.org)
|
||||||
manpage(rsync)(1)(7 Jul 2005)()()
|
manpage(rsync)(1)(28 Jul 2005)()()
|
||||||
manpagename(rsync)(faster, flexible replacement for rcp)
|
manpagename(rsync)(faster, flexible replacement for rcp)
|
||||||
manpagesynopsis()
|
manpagesynopsis()
|
||||||
|
|
||||||
@@ -307,7 +307,6 @@ to the detailed description below for a complete description. verb(
|
|||||||
--suffix=SUFFIX backup suffix (default ~ w/o --backup-dir)
|
--suffix=SUFFIX backup suffix (default ~ w/o --backup-dir)
|
||||||
-u, --update skip files that are newer on the receiver
|
-u, --update skip files that are newer on the receiver
|
||||||
--inplace update destination files in-place
|
--inplace update destination files in-place
|
||||||
--append append data onto shorter files
|
|
||||||
-d, --dirs transfer directories without recursing
|
-d, --dirs transfer directories without recursing
|
||||||
-l, --links copy symlinks as symlinks
|
-l, --links copy symlinks as symlinks
|
||||||
-L, --copy-links transform symlink into referent file/dir
|
-L, --copy-links transform symlink into referent file/dir
|
||||||
@@ -567,14 +566,6 @@ should not use this option to update files that are in use. Also note that
|
|||||||
rsync will be unable to update a file in-place that is not writable by the
|
rsync will be unable to update a file in-place that is not writable by the
|
||||||
receiving user.
|
receiving user.
|
||||||
|
|
||||||
dit(bf(--append)) This causes rsync to update a file by appending data onto
|
|
||||||
the end of the file, which presumes that the data that already exists on
|
|
||||||
the receiving side is identical with the start of the file on the sending
|
|
||||||
side. If that is not true, the file will fail the checksum test, and the
|
|
||||||
resend will do a normal bf(--inplace) update to correct the mismatch. Any
|
|
||||||
file on the receiving side that is longer than a file on the sending side
|
|
||||||
is skipped. Implies bf(--inplace).
|
|
||||||
|
|
||||||
dit(bf(-d, --dirs)) Tell the sending side to include any directories that
|
dit(bf(-d, --dirs)) Tell the sending side to include any directories that
|
||||||
are encountered. Unlike bf(--recursive), a directory's contents are not copied
|
are encountered. Unlike bf(--recursive), a directory's contents are not copied
|
||||||
unless the directory was specified on the command-line as either "." or a
|
unless the directory was specified on the command-line as either "." or a
|
||||||
@@ -2087,7 +2078,7 @@ url(http://rsync.samba.org/)(http://rsync.samba.org/)
|
|||||||
|
|
||||||
manpagesection(VERSION)
|
manpagesection(VERSION)
|
||||||
|
|
||||||
This man page is current for version 2.6.6pre1 of rsync.
|
This man page is current for version 2.6.6 of rsync.
|
||||||
|
|
||||||
manpagesection(CREDITS)
|
manpagesection(CREDITS)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
mailto(rsync-bugs@samba.org)
|
mailto(rsync-bugs@samba.org)
|
||||||
manpage(rsyncd.conf)(5)(7 Jul 2005)()()
|
manpage(rsyncd.conf)(5)(28 Jul 2005)()()
|
||||||
manpagename(rsyncd.conf)(configuration file for rsync in daemon mode)
|
manpagename(rsyncd.conf)(configuration file for rsync in daemon mode)
|
||||||
manpagesynopsis()
|
manpagesynopsis()
|
||||||
|
|
||||||
@@ -454,35 +454,6 @@ of the patterns will not be compressed during transfer.
|
|||||||
|
|
||||||
The default setting is tt(*.gz *.tgz *.zip *.z *.rpm *.deb *.iso *.bz2 *.tbz)
|
The default setting is tt(*.gz *.tgz *.zip *.z *.rpm *.deb *.iso *.bz2 *.tbz)
|
||||||
|
|
||||||
dit(bf(pre-xfer exec), bf(post-xfer exec)) You may specify a command to be run
|
|
||||||
before and/or after the transfer. If the bf(pre-xfer exec) command fails, the
|
|
||||||
transfer is aborted before it begins.
|
|
||||||
|
|
||||||
The following environment variables are set for both commands:
|
|
||||||
|
|
||||||
quote(itemize(
|
|
||||||
it() bf(RSYNC_MODULE_NAME): The name of the module being accessed.
|
|
||||||
it() bf(RSYNC_MODULE_PATH): The path configured for the module.
|
|
||||||
it() bf(RSYNC_HOST_ADDR): The accessing host's IP address.
|
|
||||||
it() bf(RSYNC_HOST_NAME): The accessing host's name.
|
|
||||||
it() bf(RSYNC_USER_NAME): The accessing user's name (empty if no user).
|
|
||||||
))
|
|
||||||
|
|
||||||
These environment variables will also be set for the bf(post-xfer exec)
|
|
||||||
command:
|
|
||||||
|
|
||||||
quote(itemize(
|
|
||||||
it() bf(RSYNC_EXIT_STATUS): rsync's exit value. This will be 0 for a
|
|
||||||
successful run, a positive value for an error that rsync returned
|
|
||||||
(e.g. 23=partial xfer), or a -1 if rsync failed to exit properly.
|
|
||||||
it() bf(RSYNC_RAW_STATUS): the raw exit value from waitpid().
|
|
||||||
))
|
|
||||||
|
|
||||||
Even though the commands can be associated with a particular module, they
|
|
||||||
are run using the permissions of the user that started the daemon (not the
|
|
||||||
module's uid/gid setting) without any chroot restrictions (even if the
|
|
||||||
module will/has run chroot()ed).
|
|
||||||
|
|
||||||
enddit()
|
enddit()
|
||||||
|
|
||||||
manpagesection(AUTHENTICATION STRENGTH)
|
manpagesection(AUTHENTICATION STRENGTH)
|
||||||
@@ -570,7 +541,7 @@ url(http://rsync.samba.org/)(http://rsync.samba.org/)
|
|||||||
|
|
||||||
manpagesection(VERSION)
|
manpagesection(VERSION)
|
||||||
|
|
||||||
This man page is current for version 2.6.6pre1 of rsync.
|
This man page is current for version 2.6.6 of rsync.
|
||||||
|
|
||||||
manpagesection(CREDITS)
|
manpagesection(CREDITS)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user