mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-05-27 08:22:52 -04:00
Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d8195637d4 | ||
|
|
c8d771a0fb | ||
|
|
9130776c4e | ||
|
|
9eac94a4dd | ||
|
|
6e06d2f31a | ||
|
|
6a6d21136a | ||
|
|
f28bd83346 | ||
|
|
96fb478eae | ||
|
|
8752b3fcd8 | ||
|
|
55ffed7e42 | ||
|
|
e00df64bae | ||
|
|
080ddf58ae | ||
|
|
4ce48a5bfd | ||
|
|
20bf7f847f | ||
|
|
b66d00853b | ||
|
|
8b602edda4 | ||
|
|
9f27cd8ca6 |
39
NEWS
39
NEWS
@@ -1,3 +1,42 @@
|
||||
NEWS for rsync 2.6.2 (30 Apr 2004)
|
||||
Protocol: 28 (unchanged)
|
||||
Changes since 2.6.1:
|
||||
|
||||
BUG FIXES:
|
||||
|
||||
- Fixed a major bug in the sorting of the filenames when --relative
|
||||
is used for some sources (just sources such as "/" and "/*" were
|
||||
affected). This fix ensures that we ask for the right file-list
|
||||
item when requesting changes from the sender.
|
||||
|
||||
- Rsync now checks the return value of the close() function to
|
||||
better report disk-full problems on an NFS file system.
|
||||
|
||||
- Restored the old daemon-server behavior of logging error messages
|
||||
rather than returning them to the user. (A better long-term fix
|
||||
will be sought in the future.)
|
||||
|
||||
- An obscure uninitialized-variable bug was fixed in the uid/gid
|
||||
code. (This bug probably had no ill effects.)
|
||||
|
||||
- Got rid of the configure check for sys/sysctl.h (it wasn't used
|
||||
and was causing a problem on some systems). Also improved the
|
||||
broken-largefile-locking test to try to avoid failure due to an
|
||||
NFS build-dir.
|
||||
|
||||
- Fixed a compile problem on systems that don't define
|
||||
AI_NUMERICHOST.
|
||||
|
||||
- Fixed a compile problem in the popt source for compilers that
|
||||
don't support __attribute__.
|
||||
|
||||
INTERNAL:
|
||||
|
||||
- Improved the testsuite's "merge" test to work on OSF1.
|
||||
|
||||
- Two new diffs were added to the patches dir.
|
||||
|
||||
|
||||
NEWS for rsync 2.6.1 (26 Apr 2004)
|
||||
Protocol: 28 (changed)
|
||||
Changes since 2.6.0:
|
||||
|
||||
4
TODO
4
TODO
@@ -425,7 +425,9 @@ Improve error messages
|
||||
our load? (Debian #28416) Probably fixed now, but a test case would
|
||||
be good.
|
||||
|
||||
|
||||
When running as a daemon, some errors should both be returned to the
|
||||
user and logged. This will make interacting with a daemon less
|
||||
cryptic.
|
||||
|
||||
-- --
|
||||
|
||||
|
||||
@@ -118,7 +118,9 @@ char *client_name(int fd)
|
||||
|
||||
memset(&hint, 0, sizeof hint);
|
||||
|
||||
#ifdef AI_NUMERICHOST
|
||||
hint.ai_flags = AI_NUMERICHOST;
|
||||
#endif
|
||||
hint.ai_socktype = SOCK_STREAM;
|
||||
|
||||
if ((err = getaddrinfo(addr, NULL, &hint, &answer)) != 0) {
|
||||
|
||||
25
configure.in
25
configure.in
@@ -5,7 +5,7 @@ AC_CONFIG_SRCDIR([byteorder.h])
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
AC_PREREQ(2.52)
|
||||
|
||||
RSYNC_VERSION=2.6.1
|
||||
RSYNC_VERSION=2.6.2
|
||||
AC_SUBST(RSYNC_VERSION)
|
||||
AC_MSG_NOTICE([Configuring rsync $RSYNC_VERSION])
|
||||
|
||||
@@ -146,21 +146,26 @@ AC_TRY_RUN([
|
||||
int main(void)
|
||||
{
|
||||
struct flock lock;
|
||||
int status;
|
||||
int fd = open("conftest.dat", O_CREAT|O_RDWR, 0600);
|
||||
int status;
|
||||
char tpl[32] = "/tmp/locktest.XXXXXX";
|
||||
int fd = mkstemp(tpl);
|
||||
if (fd < 0) {
|
||||
strcpy(tpl, "conftest.dat");
|
||||
fd = open(tpl, O_CREAT|O_RDWR, 0600);
|
||||
}
|
||||
|
||||
lock.l_type = F_WRLCK;
|
||||
lock.l_whence = SEEK_SET;
|
||||
lock.l_start = 0;
|
||||
lock.l_len = 1;
|
||||
lock.l_pid = 0;
|
||||
|
||||
fcntl(fd,F_SETLK,&lock);
|
||||
if (fork() == 0) {
|
||||
lock.l_start = 1;
|
||||
exit(fcntl(fd,F_SETLK,&lock) == 0);
|
||||
}
|
||||
wait(&status);
|
||||
unlink("conftest.dat");
|
||||
lock.l_start = 1;
|
||||
_exit(fcntl(fd,F_SETLK,&lock) == 0);
|
||||
}
|
||||
wait(&status);
|
||||
unlink(tpl);
|
||||
exit(WEXITSTATUS(status));
|
||||
}
|
||||
],
|
||||
@@ -282,7 +287,7 @@ AC_HEADER_SYS_WAIT
|
||||
AC_CHECK_HEADERS(sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h \
|
||||
unistd.h utime.h grp.h compat.h sys/param.h ctype.h sys/wait.h \
|
||||
sys/ioctl.h sys/filio.h string.h stdlib.h sys/socket.h sys/mode.h \
|
||||
sys/un.h glob.h mcheck.h sys/sysctl.h arpa/inet.h arpa/nameser.h \
|
||||
sys/un.h glob.h mcheck.h arpa/inet.h arpa/nameser.h \
|
||||
netdb.h malloc.h float.h)
|
||||
AC_HEADER_MAJOR
|
||||
|
||||
|
||||
6
flist.c
6
flist.c
@@ -1517,11 +1517,17 @@ int f_name_cmp(struct file_struct *f1, struct file_struct *f2)
|
||||
if (!(c1 = (uchar*)f1->dirname)) {
|
||||
state1 = fnc_BASE;
|
||||
c1 = (uchar*)f1->basename;
|
||||
} else if (!*c1) {
|
||||
state1 = fnc_SLASH;
|
||||
c1 = (uchar*)"/";
|
||||
} else
|
||||
state1 = fnc_DIR;
|
||||
if (!(c2 = (uchar*)f2->dirname)) {
|
||||
state2 = fnc_BASE;
|
||||
c2 = (uchar*)f2->basename;
|
||||
} else if (!*c2) {
|
||||
state2 = fnc_SLASH;
|
||||
c2 = (uchar*)"/";
|
||||
} else
|
||||
state2 = fnc_DIR;
|
||||
|
||||
|
||||
3
log.c
3
log.c
@@ -182,7 +182,8 @@ void rwrite(enum logcode code, char *buf, int len)
|
||||
send_msg((enum msgcode)code, buf, len);
|
||||
return;
|
||||
}
|
||||
if (io_multiplex_write((enum msgcode)code, buf, len))
|
||||
if (!am_daemon
|
||||
&& io_multiplex_write((enum msgcode)code, buf, len))
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Summary: Program for efficient remote updates of files.
|
||||
Name: rsync
|
||||
Version: 2.6.1
|
||||
Version: 2.6.2
|
||||
Release: 1
|
||||
Copyright: GPL
|
||||
Group: Applications/Networking
|
||||
|
||||
@@ -19,6 +19,14 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if !defined(__GNUC__) || defined(APPLE)
|
||||
/* Apparently the OS X port of gcc gags on __attribute__.
|
||||
*
|
||||
* <http://www.opensource.apple.com/bugs/X/gcc/2512150.html> */
|
||||
#define __attribute__(x)
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __NeXT
|
||||
/* access macros are not declared in non posix mode in unistd.h -
|
||||
don't try to use posix on NeXTstep 3.3 ! */
|
||||
|
||||
@@ -458,7 +458,11 @@ int recv_files(int f_in,struct file_list *flist,char *local_name)
|
||||
if (fd1 != -1) {
|
||||
close(fd1);
|
||||
}
|
||||
close(fd2);
|
||||
if (close(fd2) < 0) {
|
||||
rprintf(FERROR, "close failed on %s: %s\n",
|
||||
full_fname(fnametmp), strerror(errno));
|
||||
exit_cleanup(RERR_FILEIO);
|
||||
}
|
||||
|
||||
if (verbose > 2)
|
||||
rprintf(FINFO,"renaming %s to %s\n",fnametmp,fname);
|
||||
|
||||
12
rsync.yo
12
rsync.yo
@@ -1,5 +1,5 @@
|
||||
mailto(rsync-bugs@samba.org)
|
||||
manpage(rsync)(1)(26 Apr 2004)()()
|
||||
manpage(rsync)(1)(30 Apr 2004)()()
|
||||
manpagename(rsync)(faster, flexible replacement for rcp)
|
||||
manpagesynopsis()
|
||||
|
||||
@@ -1035,7 +1035,7 @@ This fails because the parent directory "some" is excluded by the '*' rule,
|
||||
so rsync never visits any of the files in the "some" or "some/path"
|
||||
directories. One solution is to ask for all directories in the hierarchy
|
||||
to be included by using a single rule: --include='*/' (put it somewhere
|
||||
before the --excludde='*' rule). Another solution is to add specific
|
||||
before the --exclude='*' rule). Another solution is to add specific
|
||||
include rules for all the parent dirs that need to be visited. For
|
||||
instance, this set of rules works fine:
|
||||
|
||||
@@ -1067,7 +1067,7 @@ itemize(
|
||||
manpagesection(BATCH MODE)
|
||||
|
||||
bf(Note:) Batch mode should be considered experimental in this version
|
||||
of rsync. The interface or behaviour may change before it stabilizes.
|
||||
of rsync. The interface or behavior may change before it stabilizes.
|
||||
|
||||
Batch mode can be used to apply the same set of updates to many
|
||||
identical systems. Suppose one has a tree which is replicated on a
|
||||
@@ -1149,7 +1149,7 @@ reports.
|
||||
|
||||
manpagesection(SYMBOLIC LINKS)
|
||||
|
||||
Three basic behaviours are possible when rsync encounters a symbolic
|
||||
Three basic behaviors are possible when rsync encounters a symbolic
|
||||
link in the source directory.
|
||||
|
||||
By default, symbolic links are not transferred at all. A message
|
||||
@@ -1210,7 +1210,7 @@ dit(bf(2)) Protocol incompatibility
|
||||
dit(bf(3)) Errors selecting input/output files, dirs
|
||||
dit(bf(4)) Requested action not supported: an attempt
|
||||
was made to manipulate 64-bit files on a platform that cannot support
|
||||
them; or an option was specifed that is supported by the client and
|
||||
them; or an option was specified that is supported by the client and
|
||||
not by the server.
|
||||
dit(bf(5)) Error starting client-server protocol
|
||||
dit(bf(10)) Error in socket I/O
|
||||
@@ -1270,7 +1270,7 @@ manpagebugs()
|
||||
|
||||
times are transferred as unix time_t values
|
||||
|
||||
When transferring to FAT filesystems rsync may resync
|
||||
When transferring to FAT filesystems rsync may re-sync
|
||||
unmodified files.
|
||||
See the comments on the --modify-window option.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
mailto(rsync-bugs@samba.org)
|
||||
manpage(rsyncd.conf)(5)(26 Apr 2004)()()
|
||||
manpage(rsyncd.conf)(5)(30 Apr 2004)()()
|
||||
manpagename(rsyncd.conf)(configuration file for rsync server)
|
||||
manpagesynopsis()
|
||||
|
||||
|
||||
@@ -43,9 +43,9 @@ cp -p "$from2dir"/sub1/uno "$from3dir"/sub1/dos "$from2dir"/sub1/tres "$chkdir"/
|
||||
cp -p "$from3dir"/sub2/subby "$chkdir"/sub2
|
||||
|
||||
# Get rid of any directory-time differences
|
||||
touch "$fromdir"? "$chkdir" "$fromdir"?/sub? "$chkdir"/sub?
|
||||
$RSYNC -av --existing --include='*/' --exclude='*' "$from1dir/" "$from2dir/" "$from3dir/" "$chkdir/"
|
||||
|
||||
checkit "$RSYNC -aHvv \"$fromdir\"?/ \"$todir/\"" "$chkdir" "$todir"
|
||||
checkit "$RSYNC -aHvv \"$from1dir/\" \"$from2dir/\" \"$from3dir/\" \"$todir/\"" "$chkdir" "$todir"
|
||||
|
||||
# The script would have aborted on error, so getting here means we've won.
|
||||
exit 0
|
||||
|
||||
@@ -81,7 +81,7 @@ static char *gid_to_name(gid_t gid)
|
||||
static int map_uid(int id, char *name)
|
||||
{
|
||||
uid_t uid;
|
||||
if (uid != 0 && name_to_uid(name, &uid))
|
||||
if (id != 0 && name_to_uid(name, &uid))
|
||||
return uid;
|
||||
return id;
|
||||
}
|
||||
@@ -89,7 +89,7 @@ static int map_uid(int id, char *name)
|
||||
static int map_gid(int id, char *name)
|
||||
{
|
||||
gid_t gid;
|
||||
if (gid != 0 && name_to_gid(name, &gid))
|
||||
if (id != 0 && name_to_gid(name, &gid))
|
||||
return gid;
|
||||
return id;
|
||||
}
|
||||
@@ -161,7 +161,7 @@ static struct idlist *recv_add_uid(int id, char *name)
|
||||
int id2 = name ? map_uid(id, name) : id;
|
||||
struct idlist *node;
|
||||
|
||||
node = add_to_list(&uidlist, id, name, map_uid(id, name));
|
||||
node = add_to_list(&uidlist, id, name, id2);
|
||||
|
||||
if (verbose > 3) {
|
||||
rprintf(FINFO, "uid %d(%s) maps to %d\n",
|
||||
|
||||
28
util.c
28
util.c
@@ -253,20 +253,20 @@ int copy_file(char *source, char *dest, mode_t mode)
|
||||
ifd = do_open(source, O_RDONLY, 0);
|
||||
if (ifd == -1) {
|
||||
rprintf(FERROR,"open %s: %s\n",
|
||||
source,strerror(errno));
|
||||
full_fname(source), strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (robust_unlink(dest) && errno != ENOENT) {
|
||||
rprintf(FERROR,"unlink %s: %s\n",
|
||||
dest,strerror(errno));
|
||||
full_fname(dest), strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
ofd = do_open(dest, O_WRONLY | O_CREAT | O_TRUNC | O_EXCL, mode);
|
||||
if (ofd == -1) {
|
||||
rprintf(FERROR,"open %s: %s\n",
|
||||
dest,strerror(errno));
|
||||
full_fname(dest), strerror(errno));
|
||||
close(ifd);
|
||||
return -1;
|
||||
}
|
||||
@@ -274,19 +274,29 @@ int copy_file(char *source, char *dest, mode_t mode)
|
||||
while ((len = safe_read(ifd, buf, sizeof buf)) > 0) {
|
||||
if (full_write(ofd, buf, len) < 0) {
|
||||
rprintf(FERROR,"write %s: %s\n",
|
||||
dest,strerror(errno));
|
||||
full_fname(dest), strerror(errno));
|
||||
close(ifd);
|
||||
close(ofd);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
close(ifd);
|
||||
close(ofd);
|
||||
|
||||
if (len < 0) {
|
||||
rprintf(FERROR,"read %s: %s\n",
|
||||
source,strerror(errno));
|
||||
rprintf(FERROR, "read %s: %s\n",
|
||||
full_fname(source), strerror(errno));
|
||||
close(ifd);
|
||||
close(ofd);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (close(ifd) < 0) {
|
||||
rprintf(FINFO, "close failed on %s: %s\n",
|
||||
full_fname(source), strerror(errno));
|
||||
}
|
||||
|
||||
if (close(ofd) < 0) {
|
||||
rprintf(FERROR, "close failed on %s: %s\n",
|
||||
full_fname(dest), strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user