The branch, master has been updated via a508e88 More NEWS changes. via f0da824 Upgrading zlib to 1.2.8. via b742500 Rename lsh.pl -> lsh. via f93094f Rename lsh -> lsh.sh. from baf382d Updating NEWS with the latest changes.
;a=shortlog;h=master - Log ----------------------------------------------------------------- commit a508e88fcf9797e796fb4c3d5a91d24323c477ea Author: Wayne Davison <way...@samba.org> Date: Sun Jun 9 22:28:24 2013 -0700 More NEWS changes. commit f0da824237b2d6079be82956fc8a1abf0d1450c0 Author: Wayne Davison <way...@samba.org> Date: Sun Jun 9 22:24:10 2013 -0700 Upgrading zlib to 1.2.8. commit b74250037c7ea0a1235a7e7df7148267748df546 Author: Wayne Davison <way...@samba.org> Date: Sun Jun 9 19:40:00 2013 -0700 Rename lsh.pl -> lsh. commit f93094fa9ff5923eff1c335083281233f19c0f67 Author: Wayne Davison <way...@samba.org> Date: Sun Jun 9 19:39:44 2013 -0700 Rename lsh -> lsh.sh. ----------------------------------------------------------------------- Summary of changes: NEWS | 15 +- support/lsh | 108 +++- support/lsh.pl | 81 --- support/{lsh => lsh.sh} | 0 testsuite/daemon.test | 2 +- testsuite/files-from.test | 2 +- testsuite/hardlinks.test | 2 +- testsuite/ssh-basic.test | 2 +- zlib/ChangeLog | 619 ++++++++++++++++++++- zlib/README | 94 ++-- zlib/adler32.c | 102 +++-- zlib/compress.c | 7 +- zlib/crc32.c | 112 ++-- zlib/crc32.h | 2 +- zlib/deflate.c | 520 ++++++++++++----- zlib/deflate.h | 45 +- zlib/gzguts.h | 209 +++++++ zlib/inffast.c | 84 ++- zlib/inffast.h | 4 +- zlib/inffixed.h | 6 +- zlib/inflate.c | 411 +++++++++----- zlib/inflate.h | 31 +- zlib/inftrees.c | 93 ++-- zlib/inftrees.h | 27 +- zlib/trees.c | 145 +++--- zlib/trees.h | 4 +- zlib/zconf.h | 289 ++++++++-- zlib/zlib.h | 1379 +++++++++++++++++++++++++++++---------------- zlib/zutil.c | 56 +- zlib/zutil.h | 135 ++--- 30 files changed, 3195 insertions(+), 1391 deletions(-) delete mode 100755 support/lsh.pl copy support/{lsh => lsh.sh} (100%) create mode 100644 zlib/gzguts.h Changeset truncated at 500 lines: diff --git a/NEWS b/NEWS index d992d01..8d9ec4f 100644 --- a/NEWS +++ b/NEWS @@ -131,8 +131,10 @@ Changes since 3.0.9: - Avoid re-sending xattr info for hard-linked files w/the same xattrs (protocol 31). - - When backing up a file, try to hard-link the file into place so that the - upcoming replacement of the destination file will be atomic. + - The backup code was improved to use better logic maintaining the backup + directory hierarchy. Also, when a file is being backed up, rsync tries + to hard-link it into place so that the upcoming replacement of the + destination file will be atomic (for the normal, non-inplace logic). - Added the ability to synchronize nano-second modified times. @@ -150,6 +152,8 @@ Changes since 3.0.9: - Repating the --fuzzy option now causes the code to look for fuzzy matches inside alt-dest directories too. + - The --chmod option now supports numeric modes, e.g. --chmod=644,D755 + - Added some Solaris xattr code. - Made an rsync daemon (the listening process) exit with a 0 status when @@ -173,7 +177,8 @@ Changes since 3.0.9: passwd/group files from another machine. - There's a new, improved version of the lsh script in the support dir: - lsh.pl (perl version). The old, shell version was also enhanced a bit. + it's written in perl and supports -u without resorting to using sudo + (when run as root). The old shell version is now named lsh.sh. - There is a helper script named rsync-slash-strip in the support directory for anyone that wants to change the way rsync handles args with trailing @@ -204,6 +209,8 @@ Changes since 3.0.9: - Added init_stat_x() function to avoid duplication of acl/xattr init code. + - The included zlib was upgraded from 1.2.3 to 1.2.8. + - Rsync can now be compiled to use an unmodified zlib library instead of the tweaked one that is included with rsync. @@ -211,6 +218,4 @@ Changes since 3.0.9: - Added more conditional debug output. - - Changed configure.in to configure.ac. - - Fixed some build issues for android and minix. diff --git a/support/lsh b/support/lsh index b63444e..2f64d31 100755 --- a/support/lsh +++ b/support/lsh @@ -1,35 +1,81 @@ -#!/bin/sh +#!/usr/bin/perl # This script can be used as a "remote shell" command that is only # capable of pretending to connect to "localhost". This is useful # for testing or for running a local copy where the sender and the # receiver needs to use different options (e.g. --fake-super). If -# we get a -l USER option, we try to use "sudo -u USER" to run the -# command. - -user='' -do_cd=y # Default path is user's home dir, just like ssh. - -while : ; do - case "$1" in - -l) user="$2"; shift; shift ;; - -l*) user=`echo "$1" | sed 's/^-l//'`; shift ;; - --no-cd) do_cd=n; shift ;; - -*) shift ;; - localhost) shift; break ;; - *) echo "lsh: unable to connect to host $1" 1>&2; exit 1 ;; - esac -done - -if [ "$user" ]; then - prefix='' - if [ $do_cd = y ]; then - home=`perl -e "print((getpwnam('$user'))[7])"` - prefix="cd '$home' &&" - fi - sudo -H -u "$user" sh -c "$prefix $*" -else - if [ $do_cd = y ]; then - cd || exit 1 - fi - eval "${@}" -fi +# we get -l USER, we try to become the USER, either directly (must +# be root) or by using "sudo -H -u USER" (requires --sudo option). + +use strict; +use warnings; +use Getopt::Long; +use English '-no_match_vars'; + +&Getopt::Long::Configure('bundling'); +&Getopt::Long::Configure('require_order'); +GetOptions( + 'l=s' => \( my $login_name ), + '1|2|4|6|A|a|C|f|g|k|M|N|n|q|s|T|t|V|v|X|x|Y' => sub { }, # Ignore + 'b|c|D|e|F|i|L|m|O|o|p|R|S|w=s' => sub { }, # Ignore + 'no-cd' => \( my $no_chdir ), + 'sudo' => \( my $use_sudo ), +) or &usage; +&usage unless @ARGV > 1; + +my $host = shift; +if ($host =~ s/^([^@]+)\@//) { + $login_name = $1; +} +if ($host ne 'localhost') { + die "lsh: unable to connect to host $host\n"; +} + +my ($home_dir, @cmd); +if ($login_name) { + my ($uid, $gid); + if ($login_name =~ /\D/) { + $uid = getpwnam($login_name); + die "Unknown user: $login_name\n" unless defined $uid; + } else { + $uid = $login_name; + } + ($login_name, $gid, $home_dir) = (getpwuid($uid))[0,3,7]; + if ($use_sudo) { + unshift @ARGV, "cd '$home_dir' &&" unless $no_chdir; + unshift @cmd, qw( sudo -H -u ), $login_name; + $no_chdir = 1; + } else { + my $groups = "$gid $gid"; + while (my ($grgid, $grmembers) = (getgrent)[2,3]) { + if ($grgid != $gid && $grmembers =~ /(^|\s)\Q$login_name\E(\s|$)/o) { + $groups .= " $grgid"; + } + } + + my ($ruid, $euid) = ($UID, $EUID); + $GID = $EGID = $groups; + $UID = $EUID = $uid; + die "Cannot set ruid: $! (use --sudo?)\n" if $UID == $ruid && $ruid != $uid; + die "Cannot set euid: $! (use --sudo?)\n" if $EUID == $euid && $euid != $uid; + + $ENV{USER} = $ENV{USERNAME} = $login_name; + $ENV{HOME} = $home_dir; + } +} else { + $home_dir = (getpwuid($UID))[7]; +} + +unless ($no_chdir) { + chdir $home_dir or die "Unable to chdir to $home_dir: $!\n"; +} + +push @cmd, '/bin/sh', '-c', "@ARGV"; +exec @cmd; +die "Failed to exec: $!\n"; + +sub usage +{ + die <<EOT; +Usage: lsh [-l user] [--sudo] [--no-cd] localhost COMMAND [...] +EOT +} diff --git a/support/lsh.pl b/support/lsh.pl deleted file mode 100755 index 2f64d31..0000000 --- a/support/lsh.pl +++ /dev/null @@ -1,81 +0,0 @@ -#!/usr/bin/perl -# This script can be used as a "remote shell" command that is only -# capable of pretending to connect to "localhost". This is useful -# for testing or for running a local copy where the sender and the -# receiver needs to use different options (e.g. --fake-super). If -# we get -l USER, we try to become the USER, either directly (must -# be root) or by using "sudo -H -u USER" (requires --sudo option). - -use strict; -use warnings; -use Getopt::Long; -use English '-no_match_vars'; - -&Getopt::Long::Configure('bundling'); -&Getopt::Long::Configure('require_order'); -GetOptions( - 'l=s' => \( my $login_name ), - '1|2|4|6|A|a|C|f|g|k|M|N|n|q|s|T|t|V|v|X|x|Y' => sub { }, # Ignore - 'b|c|D|e|F|i|L|m|O|o|p|R|S|w=s' => sub { }, # Ignore - 'no-cd' => \( my $no_chdir ), - 'sudo' => \( my $use_sudo ), -) or &usage; -&usage unless @ARGV > 1; - -my $host = shift; -if ($host =~ s/^([^@]+)\@//) { - $login_name = $1; -} -if ($host ne 'localhost') { - die "lsh: unable to connect to host $host\n"; -} - -my ($home_dir, @cmd); -if ($login_name) { - my ($uid, $gid); - if ($login_name =~ /\D/) { - $uid = getpwnam($login_name); - die "Unknown user: $login_name\n" unless defined $uid; - } else { - $uid = $login_name; - } - ($login_name, $gid, $home_dir) = (getpwuid($uid))[0,3,7]; - if ($use_sudo) { - unshift @ARGV, "cd '$home_dir' &&" unless $no_chdir; - unshift @cmd, qw( sudo -H -u ), $login_name; - $no_chdir = 1; - } else { - my $groups = "$gid $gid"; - while (my ($grgid, $grmembers) = (getgrent)[2,3]) { - if ($grgid != $gid && $grmembers =~ /(^|\s)\Q$login_name\E(\s|$)/o) { - $groups .= " $grgid"; - } - } - - my ($ruid, $euid) = ($UID, $EUID); - $GID = $EGID = $groups; - $UID = $EUID = $uid; - die "Cannot set ruid: $! (use --sudo?)\n" if $UID == $ruid && $ruid != $uid; - die "Cannot set euid: $! (use --sudo?)\n" if $EUID == $euid && $euid != $uid; - - $ENV{USER} = $ENV{USERNAME} = $login_name; - $ENV{HOME} = $home_dir; - } -} else { - $home_dir = (getpwuid($UID))[7]; -} - -unless ($no_chdir) { - chdir $home_dir or die "Unable to chdir to $home_dir: $!\n"; -} - -push @cmd, '/bin/sh', '-c', "@ARGV"; -exec @cmd; -die "Failed to exec: $!\n"; - -sub usage -{ - die <<EOT; -Usage: lsh [-l user] [--sudo] [--no-cd] localhost COMMAND [...] -EOT -} diff --git a/support/lsh b/support/lsh.sh similarity index 100% copy from support/lsh copy to support/lsh.sh diff --git a/testsuite/daemon.test b/testsuite/daemon.test index 013408f..06728e2 100644 --- a/testsuite/daemon.test +++ b/testsuite/daemon.test @@ -24,7 +24,7 @@ chkfile="$scratchdir/rsync.chk" outfile="$scratchdir/rsync.out" -SSH="src/support/lsh --no-cd" +SSH="src/support/lsh.sh --no-cd" FILE_REPL='s/^\([^d][^ ]*\) *\(..........[0-9]\) /\1 \2 /' DIR_REPL='s/^\(d[^ ]*\) *[0-9][.,0-9]* /\1 DIR /' LS_REPL='s;[0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9];####/##/## ##:##:##;' diff --git a/testsuite/files-from.test b/testsuite/files-from.test index 6cc315b..f718161 100644 --- a/testsuite/files-from.test +++ b/testsuite/files-from.test @@ -9,7 +9,7 @@ . "$suitedir/rsync.fns" -SSH="$scratchdir/src/support/lsh" +SSH="$scratchdir/src/support/lsh.sh" hands_setup diff --git a/testsuite/hardlinks.test b/testsuite/hardlinks.test index 55131fa..c7c5314 100644 --- a/testsuite/hardlinks.test +++ b/testsuite/hardlinks.test @@ -11,7 +11,7 @@ . "$suitedir/rsync.fns" -SSH="$scratchdir/src/support/lsh" +SSH="$scratchdir/src/support/lsh.sh" outfile="$scratchdir/rsync.out" diff --git a/testsuite/ssh-basic.test b/testsuite/ssh-basic.test index 865de3c..c91505b 100644 --- a/testsuite/ssh-basic.test +++ b/testsuite/ssh-basic.test @@ -10,7 +10,7 @@ . "$suitedir/rsync.fns" -SSH="$scratchdir/src/support/lsh" +SSH="$scratchdir/src/support/lsh.sh" if test x"$rsync_enable_ssh_tests" = xyes; then if type ssh >/dev/null ; then diff --git a/zlib/ChangeLog b/zlib/ChangeLog index 7f6869d..f22aaba 100644 --- a/zlib/ChangeLog +++ b/zlib/ChangeLog @@ -1,6 +1,623 @@ ChangeLog file for zlib +Changes in 1.2.8 (28 Apr 2013) +- Update contrib/minizip/iowin32.c for Windows RT [Vollant] +- Do not force Z_CONST for C++ +- Clean up contrib/vstudio [Ro§] +- Correct spelling error in zlib.h +- Fix mixed line endings in contrib/vstudio + +Changes in 1.2.7.3 (13 Apr 2013) +- Fix version numbers and DLL names in contrib/vstudio/*/zlib.rc + +Changes in 1.2.7.2 (13 Apr 2013) +- Change check for a four-byte type back to hexadecimal +- Fix typo in win32/Makefile.msc +- Add casts in gzwrite.c for pointer differences + +Changes in 1.2.7.1 (24 Mar 2013) +- Replace use of unsafe string functions with snprintf if available +- Avoid including stddef.h on Windows for Z_SOLO compile [Niessink] +- Fix gzgetc undefine when Z_PREFIX set [Turk] +- Eliminate use of mktemp in Makefile (not always available) +- Fix bug in 'F' mode for gzopen() +- Add inflateGetDictionary() function +- Correct comment in deflate.h +- Use _snprintf for snprintf in Microsoft C +- On Darwin, only use /usr/bin/libtool if libtool is not Apple +- Delete "--version" file if created by "ar --version" [Richard G.] +- Fix configure check for veracity of compiler error return codes +- Fix CMake compilation of static lib for MSVC2010 x64 +- Remove unused variable in infback9.c +- Fix argument checks in gzlog_compress() and gzlog_write() +- Clean up the usage of z_const and respect const usage within zlib +- Clean up examples/gzlog.[ch] comparisons of different types +- Avoid shift equal to bits in type (caused endless loop) +- Fix unintialized value bug in gzputc() introduced by const patches +- Fix memory allocation error in examples/zran.c [Nor] +- Fix bug where gzopen(), gzclose() would write an empty file +- Fix bug in gzclose() when gzwrite() runs out of memory +- Check for input buffer malloc failure in examples/gzappend.c +- Add note to contrib/blast to use binary mode in stdio +- Fix comparisons of differently signed integers in contrib/blast +- Check for invalid code length codes in contrib/puff +- Fix serious but very rare decompression bug in inftrees.c +- Update inflateBack() comments, since inflate() can be faster +- Use underscored I/O function names for WINAPI_FAMILY +- Add _tr_flush_bits to the external symbols prefixed by --zprefix +- Add contrib/vstudio/vc10 pre-build step for static only +- Quote --version-script argument in CMakeLists.txt +- Don't specify --version-script on Apple platforms in CMakeLists.txt +- Fix casting error in contrib/testzlib/testzlib.c +- Fix types in contrib/minizip to match result of get_crc_table() +- Simplify contrib/vstudio/vc10 with 'd' suffix +- Add TOP support to win32/Makefile.msc +- Suport i686 and amd64 assembler builds in CMakeLists.txt +- Fix typos in the use of _LARGEFILE64_SOURCE in zconf.h +- Add vc11 and vc12 build files to contrib/vstudio +- Add gzvprintf() as an undocumented function in zlib +- Fix configure for Sun shell +- Remove runtime check in configure for four-byte integer type +- Add casts and consts to ease user conversion to C++ +- Add man pages for minizip and miniunzip +- In Makefile uninstall, don't rm if preceding cd fails +- Do not return Z_BUF_ERROR if deflateParam() has nothing to write + +Changes in 1.2.7 (2 May 2012) +- Replace use of memmove() with a simple copy for portability +- Test for existence of strerror +- Restore gzgetc_ for backward compatibility with 1.2.6 +- Fix build with non-GNU make on Solaris +- Require gcc 4.0 or later on Mac OS X to use the hidden attribute +- Include unistd.h for Watcom C +- Use __WATCOMC__ instead of __WATCOM__ +- Do not use the visibility attribute if NO_VIZ defined +- Improve the detection of no hidden visibility attribute +- Avoid using __int64 for gcc or solo compilation +- Cast to char * in gzprintf to avoid warnings [Zinser] +- Fix make_vms.com for VAX [Zinser] +- Don't use library or built-in byte swaps +- Simplify test and use of gcc hidden attribute +- Fix bug in gzclose_w() when gzwrite() fails to allocate memory +- Add "x" (O_EXCL) and "e" (O_CLOEXEC) modes support to gzopen() +- Fix bug in test/minigzip.c for configure --solo +- Fix contrib/vstudio project link errors [Mohanathas] +- Add ability to choose the builder in make_vms.com [Schweda] +- Add DESTDIR support to mingw32 win32/Makefile.gcc +- Fix comments in win32/Makefile.gcc for proper usage +- Allow overriding the default install locations for cmake +- Generate and install the pkg-config file with cmake +- Build both a static and a shared version of zlib with cmake +- Include version symbols for cmake builds +- If using cmake with MSVC, add the source directory to the includes +- Remove unneeded EXTRA_CFLAGS from win32/Makefile.gcc [Truta] +- Move obsolete emx makefile to old [Truta] +- Allow the use of -Wundef when compiling or using zlib +- Avoid the use of the -u option with mktemp +- Improve inflate() documentation on the use of Z_FINISH +- Recognize clang as gcc +- Add gzopen_w() in Windows for wide character path names +- Rename zconf.h in CMakeLists.txt to move it out of the way +- Add source directory in CMakeLists.txt for building examples +- Look in build directory for zlib.pc in CMakeLists.txt +- Remove gzflags from zlibvc.def in vc9 and vc10 +- Fix contrib/minizip compilation in the MinGW environment +- Update ./configure for Solaris, support --64 [Mooney] +- Remove -R. from Solaris shared build (possible security issue) +- Avoid race condition for parallel make (-j) running example +- Fix type mismatch between get_crc_table() and crc_table +- Fix parsing of version with "-" in CMakeLists.txt [Snider, Ziegler] +- Fix the path to zlib.map in CMakeLists.txt +- Force the native libtool in Mac OS X to avoid GNU libtool [Beebe] +- Add instructions to win32/Makefile.gcc for shared install [Torri] + +Changes in 1.2.6.1 (12 Feb 2012) +- Avoid the use of the Objective-C reserved name "id" +- Include io.h in gzguts.h for Microsoft compilers +- Fix problem with ./configure --prefix and gzgetc macro +- Include gz_header definition when compiling zlib solo +- Put gzflags() functionality back in zutil.c +- Avoid library header include in crc32.c for Z_SOLO +- Use name in GCC_CLASSIC as C compiler for coverage testing, if set +- Minor cleanup in contrib/minizip/zip.c [Vollant] +- Update make_vms.com [Zinser] +- Remove unnecessary gzgetc_ function +- Use optimized byte swap operations for Microsoft and GNU [Snyder] +- Fix minor typo in zlib.h comments [Rzesniowiecki] + +Changes in 1.2.6 (29 Jan 2012) +- Update the Pascal interface in contrib/pascal +- Fix function numbers for gzgetc_ in zlibvc.def files +- Fix configure.ac for contrib/minizip [Schiffer] +- Fix large-entry detection in minizip on 64-bit systems [Schiffer] +- Have ./configure use the compiler return code for error indication +- Fix CMakeLists.txt for cross compilation [McClure] +- Fix contrib/minizip/zip.c for 64-bit architectures [Dalsnes] +- Fix compilation of contrib/minizip on FreeBSD [Marquez] +- Correct suggested usages in win32/Makefile.msc [Shachar, Horvath] +- Include io.h for Turbo C / Borland C on all platforms [Truta] +- Make version explicit in contrib/minizip/configure.ac [Bosmans] +- Avoid warning for no encryption in contrib/minizip/zip.c [Vollant] +- Minor cleanup up contrib/minizip/unzip.c [Vollant] +- Fix bug when compiling minizip with C++ [Vollant] +- Protect for long name and extra fields in contrib/minizip [Vollant] +- Avoid some warnings in contrib/minizip [Vollant] +- Add -I../.. -L../.. to CFLAGS for minizip and miniunzip +- Add missing libs to minizip linker command +- Add support for VPATH builds in contrib/minizip +- Add an --enable-demos option to contrib/minizip/configure +- Add the generation of configure.log by ./configure +- Exit when required parameters not provided to win32/Makefile.gcc +- Have gzputc return the character written instead of the argument +- Use the -m option on ldconfig for BSD systems [Tobias] +- Correct in zlib.map when deflateResetKeep was added + +Changes in 1.2.5.3 (15 Jan 2012) +- Restore gzgetc function for binary compatibility +- Do not use _lseeki64 under Borland C++ [Truta] +- Update win32/Makefile.msc to build test/*.c [Truta] +- Remove old/visualc6 given CMakefile and other alternatives +- Update AS400 build files and documentation [Monnerat] +- Update win32/Makefile.gcc to build test/*.c [Truta] +- Permit stronger flushes after Z_BLOCK flushes +- Avoid extraneous empty blocks when doing empty flushes +- Permit Z_NULL arguments to deflatePending +- Allow deflatePrime() to insert bits in the middle of a stream +- Remove second empty static block for Z_PARTIAL_FLUSH +- Write out all of the available bits when using Z_BLOCK +- Insert the first two strings in the hash table after a flush + +Changes in 1.2.5.2 (17 Dec 2011) +- fix ld error: unable to find version dependency 'ZLIB_1.2.5' +- use relative symlinks for shared libs +- Avoid searching past window for Z_RLE strategy +- Assure that high-water mark initialization is always applied in deflate +- Add assertions to fill_window() in deflate.c to match comments +- Update python link in README +- Correct spelling error in gzread.c +- Fix bug in gzgets() for a concatenated empty gzip stream +- Correct error in comment for gz_make() +- Change gzread() and related to ignore junk after gzip streams +- Allow gzread() and related to continue after gzclearerr() +- Allow gzrewind() and gzseek() after a premature end-of-file -- The rsync repository.
_______________________________________________ rsync-cvs mailing list rsync-cvs@lists.samba.org https://lists.samba.org/mailman/listinfo/rsync-cvs