DO NOT REPLY [Bug 6276] New: crtimes.patch does not preserve
creation dates on Mac x86_64 only
samba-bugs at samba.org
samba-bugs at samba.org
Sat Apr 18 21:02:19 GMT 2009
https://bugzilla.samba.org/show_bug.cgi?id=6276
Summary: crtimes.patch does not preserve creation dates on Mac
x86_64 only
Product: rsync
Version: 3.0.6
Platform: x86
OS/Version: Mac OS X
Status: NEW
Severity: normal
Priority: P3
Component: core
AssignedTo: wayned at samba.org
ReportedBy: bugzilla.samba.org at maclemon.at
QAContact: rsync-qa at samba.org
Summary:
rsync with fileflags and crtimes patches does not preserve creation date/time
on Mac OS X 10.5.6 under x86_64 when compiled as x86_64.
I'm compiling rsync 3.0.6-pre1 (and 3.0.5) on Mac OS X Leopard 10.5.6 (9G2141)
with gcc version 4.0.1 (Apple Inc. build 5490). I'm creating a 4 way universal
binary for ppc, ppc64, i386 and x86_64.
crtimes patch works fine for 3.0.5 and 3.0.6-pre1 on ppc, ppc64 and i386.
However rsync does not preserve creation dates on Mac OS X when run as x86_64
binary. Running the same rsync with the same patch created as i386 (32 bit
binary) DOES correctly preserve creation dates.
This is how I build rsync 3.0.6-pre1 as a 4 way universal binary:
patch -p1 <../patches/fileflags.diff
./prepare-source
patch -p1 <../patches/crtimes.diff
./configure --prefix=/usr/local/maclemon-beta --disable-debug CC="gcc
-std=gnu99 -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk"
CFLAGS="-g -fprefetch-loop-arrays -funroll-loops -O3 -DHAVE_CONFIG_H -Wall -W
-I./popt -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 -arch
ppc64 -arch x86_64" LDFLAGS="-mmacosx-version-min=10.4 -arch ppc -arch i386
-arch ppc64 -arch x86_64"
make
Result:
MD5 (rsync) = 9cc18a386a256f6aecd9c46815088594
SHA1(rsync)= d4c9b32e088208e12821f96117b632f20750e08f
rsync: Mach-O universal binary with 4 architectures
rsync (for architecture ppc): Mach-O executable ppc
rsync (for architecture i386): Mach-O executable i386
rsync (for architecture ppc64): Mach-O 64-bit executable ppc64
rsync (for architecture x86_64): Mach-O 64-bit executable x86_64
-rwxr-xr-x 1 pepi staff 2535144 18 Apr 22:49 rsync
When created this way, rsync running on an intel Core2Duo based Mac will not
preserve creation date/time.
I've tested this with backupbouncer 0.1.3:
------------------ rsync3-maclemon-beta ------------------
This copier produced log output in:
/Volumes/Dst/81-rsync3-maclemon-beta/log
Verifying: basic-permissions ... ok (Critical)
Verifying: timestamps ... ok (Critical)
Verifying: symlinks ... ok (Critical)
Verifying: symlink-ownership ... ok
Verifying: hardlinks ... ok (Important)
Verifying: resource-forks ...
Sub-test: on files ... ok (Critical)
Sub-test: on hardlinked files ... ok (Important)
Verifying: finder-flags ... ok (Critical)
Verifying: finder-locks ... ok
Verifying: creation-date ... FAIL <-----------------FAILS here
Verifying: bsd-flags ... ok
Verifying: extended-attrs ...
Sub-test: on files ... ok (Important)
Sub-test: on directories ... ok (Important)
Sub-test: on symlinks ... ok
Verifying: access-control-lists ...
Sub-test: on files ... ok (Important)
Sub-test: on dirs ... ok (Important)
Verifying: fifo ... ok
Verifying: devices ... ok
Verifying: combo-tests ...
Sub-test: xattrs + rsrc forks ... ok
Sub-test: lots of metadata ... ok
When compiled as i386 (32bit) only (doesn't matter if I also compile in the ppc
and ppc64 versions)
The ONLY difference to the above build is the omission of -arch x86_64 in
configure.
patch -p1 <../patches/fileflags.diff
./prepare-source
patch -p1 <../patches/crtimes.diff
./configure --prefix=/usr/local/maclemon-beta --disable-debug CC="gcc
-std=gnu99 -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk"
CFLAGS="-g -fprefetch-loop-arrays -funroll-loops -O3 -DHAVE_CONFIG_H -Wall -W
-I./popt -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 -arch
ppc64" LDFLAGS="-mmacosx-version-min=10.4 -arch ppc -arch i386 -arch ppc64"
make
MD5 (rsync) = 85e347ea3cf8567b1b2f980c673d856f
SHA1(rsync)= 23c2c188a80db12ca268202fa28ce32c1a02e804
rsync: Mach-O universal binary with 3 architectures
rsync (for architecture ppc): Mach-O executable ppc
rsync (for architecture i386): Mach-O executable i386
rsync (for architecture ppc64): Mach-O 64-bit executable ppc64
-rwxr-xr-x 1 pepi staff 1888720 18 Apr 22:56 rsync
Now backup bouncer reports this:
------------------ rsync3-maclemon-beta ------------------
This copier produced log output in:
/Volumes/Dst/81-rsync3-maclemon-beta/log
Verifying: basic-permissions ... ok (Critical)
Verifying: timestamps ... ok (Critical)
Verifying: symlinks ... ok (Critical)
Verifying: symlink-ownership ... ok
Verifying: hardlinks ... ok (Important)
Verifying: resource-forks ...
Sub-test: on files ... ok (Critical)
Sub-test: on hardlinked files ... ok (Important)
Verifying: finder-flags ... ok (Critical)
Verifying: finder-locks ... ok
Verifying: creation-date ... ok
<-------------- WORKS!
Verifying: bsd-flags ... ok
Verifying: extended-attrs ...
Sub-test: on files ... ok (Important)
Sub-test: on directories ... ok (Important)
Sub-test: on symlinks ... ok
Verifying: access-control-lists ...
Sub-test: on files ... ok (Important)
Sub-test: on dirs ... ok (Important)
Verifying: fifo ... ok
Verifying: devices ... ok
Verifying: combo-tests ...
Sub-test: xattrs + rsrc forks ... ok
Sub-test: lots of metadata ... ok
Conclusion:
crtimes patch does not work when rsync 3.0.6-pre1 (and 3.0.5) is compiled for
x86_64 and run on Core2Duo in 64bit mode on Mac OS X 10.5.6. crtimes patch does
only work when rsync is compiled in 32bit mode (i386) or for any PPC build.
Best regards
Pepi
--
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
More information about the rsync
mailing list