Last active
August 29, 2015 14:17
-
-
Save iracooke/d2123618064f40eedf1f to your computer and use it in GitHub Desktop.
Rsync patches
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| This patch is for rsync running in a sandboxed environment on OSX | |
| It ignores the com.apple.quarantine attribute which code running in | |
| a sandbox cannot modify but which will invariably be set by the system | |
| on files rsync creates | |
| To use this patch, run these commands for a successful build: | |
| patch -p1 <patches/ignore-case.diff | |
| ./configure (optional if already run) | |
| make | |
| --- rsync-3.1.1/xattrs.c 2015-03-22 12:35:55.000000000 +1100 | |
| +++ ../rsync-3.1.1/xattrs.c 2014-05-27 07:08:31.000000000 +1000 | |
| @@ -240,11 +240,6 @@ | |
| continue; | |
| #endif | |
| -#ifdef HAVE_OSX_XATTRS | |
| - if (strcmp(name,"com.apple.quarantine")==0) | |
| - continue; | |
| -#endif | |
| - | |
| /* No rsync.%FOO attributes are copied w/o 2 -X options. */ | |
| if (name_len > RPRE_LEN && name[RPRE_LEN] == '%' | |
| && HAS_PREFIX(name, RSYNC_PREFIX)) { | |
| @@ -348,12 +343,6 @@ | |
| continue; | |
| #endif | |
| -#ifdef HAVE_OSX_XATTRS | |
| - if (strcmp(name,"com.apple.quarantine")==0) | |
| - continue; | |
| -#endif | |
| - | |
| - | |
| datum_len = 0; | |
| if (!(ptr = get_xattr_data(source, name, &datum_len, 0))) | |
| return -1; | |
| @@ -808,7 +797,7 @@ | |
| size_t name_len; | |
| int ret = 0; | |
| - /* This puts the current name list into the "ç" buffer. */ | |
| + /* This puts the current name list into the "namebuf" buffer. */ | |
| if ((list_len = get_xattr_names(fname)) < 0) | |
| return -1; | |
| @@ -884,13 +873,6 @@ | |
| : HAS_PREFIX(name, SYSTEM_PREFIX)) | |
| continue; | |
| #endif | |
| - | |
| -#ifdef HAVE_OSX_XATTRS | |
| - if (strcmp(name,"com.apple.quarantine")==0) | |
| - continue; | |
| -#endif | |
| - | |
| - | |
| if (am_root < 0 && name_len > RPRE_LEN | |
| && name[RPRE_LEN] == '%' && strcmp(name, XSTAT_ATTR) == 0) | |
| continue; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment