Compare commits

...

17 Commits

Author SHA1 Message Date
Wayne Davison
d8195637d4 Additional testing confirmed the limited scope of the sources affected
by the -R sorting bug.
2004-04-30 19:14:52 +00:00
Wayne Davison
c8d771a0fb Preparing for release of 2.6.2 2004-04-30 18:03:33 +00:00
Wayne Davison
9130776c4e Mention the last few tweaks that made it into 2.6.2. 2004-04-30 17:53:51 +00:00
Wayne Davison
9eac94a4dd Improved the program that checks for broken large-file locking. 2004-04-30 17:38:22 +00:00
Wayne Davison
6e06d2f31a Don't rely on the local shell's wildcard expansion to make the test
work right -- it might not be quite as compatible as we need.
2004-04-30 17:24:49 +00:00
Wayne Davison
6a6d21136a Only refer to AI_NUMERICHOST if it is defined. 2004-04-30 16:10:45 +00:00
Wayne Davison
f28bd83346 Fixed a few typos. 2004-04-30 15:46:41 +00:00
Wayne Davison
96fb478eae Mention the desire to improve how a daemon returns errors. 2004-04-29 21:12:46 +00:00
Wayne Davison
8752b3fcd8 Describe the changes for 2.6.2. 2004-04-29 21:09:33 +00:00
Wayne Davison
55ffed7e42 Preparing for release of 2.6.2pre1 2004-04-29 20:36:22 +00:00
Wayne Davison
e00df64bae Got rid of unused check for sys/sysctl.h. 2004-04-29 19:40:17 +00:00
Wayne Davison
080ddf58ae Fixed a sorting problem when an entry has an empty (but not NULL)
dirname (which I had thought impossible, but it appears to occur
with --relative in some instances).
2004-04-29 19:37:15 +00:00
Wayne Davison
4ce48a5bfd Restore old behavior of logging most daemon errors instead of sending
them to the user.  This should eventually be improved to duplicate
some of these messages to the user to keep them informed about what
went wrong.
2004-04-29 19:34:31 +00:00
Wayne Davison
20bf7f847f Undefined __attribute__ in some circumstances. 2004-04-28 17:35:08 +00:00
Wayne Davison
b66d00853b Fixed the use of an uninitialized variable in map_uid() and map_gid(). 2004-04-28 17:31:31 +00:00
Wayne Davison
8b602edda4 In copy_file(), check len < 0 before checking the close() return values. 2004-04-27 19:59:37 +00:00
Wayne Davison
9f27cd8ca6 Check the return code from close() and output an error if it
fails.
2004-04-27 19:51:33 +00:00
14 changed files with 112 additions and 35 deletions

39
NEWS
View File

@@ -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
View File

@@ -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.
-- --

View File

@@ -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) {

View File

@@ -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

View File

@@ -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
View File

@@ -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;
}

View File

@@ -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

View File

@@ -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 ! */

View File

@@ -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);

View File

@@ -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.

View File

@@ -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()

View File

@@ -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

View File

@@ -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
View File

@@ -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;
}