X-Git-Url: https://mattmccutchen.net/rsync/rsync-patches.git/blobdiff_plain/9a1da0417777042e417de47e3c1fc40585123171..dc52bc1a2a23312e85fe2d4617fde9118d4050ba:/xattrs.diff diff --git a/xattrs.diff b/xattrs.diff index 998ff8c..e3ac333 100644 --- a/xattrs.diff +++ b/xattrs.diff @@ -26,7 +26,7 @@ After applying this patch, run these commands for a successful build: popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \ --- old/backup.c +++ new/backup.c -@@ -29,6 +29,7 @@ extern char *backup_dir; +@@ -30,6 +30,7 @@ extern char *backup_dir; extern int am_root; extern int preserve_acls; @@ -34,7 +34,7 @@ After applying this patch, run these commands for a successful build: extern int preserve_devices; extern int preserve_specials; extern int preserve_links; -@@ -137,6 +138,10 @@ static int make_bak_dir(char *fullpath) +@@ -138,6 +139,10 @@ static int make_bak_dir(char *fullpath) if (preserve_acls) dup_acl(end, fullpath, st.st_mode); #endif @@ -45,7 +45,7 @@ After applying this patch, run these commands for a successful build: } } *p = '/'; -@@ -194,6 +199,10 @@ static int keep_backup(char *fname) +@@ -195,6 +200,10 @@ static int keep_backup(char *fname) if (preserve_acls) push_keep_backup_acl(file, fname, buf); #endif @@ -56,7 +56,7 @@ After applying this patch, run these commands for a successful build: /* Check to see if this is a device file, or link */ if ((am_root && preserve_devices && IS_DEVICE(file->mode)) -@@ -274,6 +283,10 @@ static int keep_backup(char *fname) +@@ -275,6 +284,10 @@ static int keep_backup(char *fname) if (preserve_acls) cleanup_keep_backup_acl(); #endif @@ -102,7 +102,7 @@ After applying this patch, run these commands for a successful build: --- old/flist.c +++ new/flist.c -@@ -45,6 +45,7 @@ extern int one_file_system; +@@ -41,6 +41,7 @@ extern int one_file_system; extern int copy_dirlinks; extern int keep_dirlinks; extern int preserve_acls; @@ -110,7 +110,7 @@ After applying this patch, run these commands for a successful build: extern int preserve_links; extern int preserve_hard_links; extern int preserve_devices; -@@ -975,6 +976,10 @@ static struct file_struct *send_file_nam +@@ -966,6 +967,10 @@ static struct file_struct *send_file_nam if (preserve_acls && make_acl(file, fname) < 0) return NULL; #endif @@ -121,7 +121,7 @@ After applying this patch, run these commands for a successful build: maybe_emit_filelist_progress(flist->count + flist_count_offset); -@@ -987,12 +992,20 @@ static struct file_struct *send_file_nam +@@ -978,12 +983,20 @@ static struct file_struct *send_file_nam if (preserve_acls) send_acl(file, f); #endif @@ -142,7 +142,7 @@ After applying this patch, run these commands for a successful build: } return file; } -@@ -1385,6 +1398,10 @@ struct file_list *recv_file_list(int f) +@@ -1376,6 +1389,10 @@ struct file_list *recv_file_list(int f) if (preserve_acls) receive_acl(file, f); #endif @@ -153,7 +153,7 @@ After applying this patch, run these commands for a successful build: if (S_ISREG(file->mode) || S_ISLNK(file->mode)) stats.total_size += file->length; -@@ -1412,6 +1429,10 @@ struct file_list *recv_file_list(int f) +@@ -1403,6 +1420,10 @@ struct file_list *recv_file_list(int f) if (preserve_acls) sort_file_acl_index_lists(); #endif @@ -166,25 +166,27 @@ After applying this patch, run these commands for a successful build: recv_uid_list(f, flist); --- old/lib/sysxattr.c +++ new/lib/sysxattr.c -@@ -0,0 +1,41 @@ -+/* Extended attribute support for rsync. */ -+/* This file Copyright (C) 2004 Red Hat, Inc. */ -+/* Written by Jay Fenlason */ -+ -+/* This program is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2 of the License, or -+ (at your option) any later version. -+ -+ This program is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program; if not, write to the Free Software -+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+*/ +@@ -0,0 +1,43 @@ ++/* ++ * Extended attribute support for rsync. ++ * ++ * Copyright (C) 2004 Red Hat, Inc. ++ * Written by Jay Fenlason. ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License along ++ * with this program; if not, write to the Free Software Foundation, Inc., ++ * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. ++ */ + +#include "rsync.h" + @@ -222,7 +224,7 @@ After applying this patch, run these commands for a successful build: +#endif /* No xattrs */ --- old/options.c +++ new/options.c -@@ -46,6 +46,7 @@ int copy_links = 0; +@@ -48,6 +48,7 @@ int copy_links = 0; int preserve_links = 0; int preserve_hard_links = 0; int preserve_acls = 0; @@ -230,7 +232,7 @@ After applying this patch, run these commands for a successful build: int preserve_perms = 0; int preserve_executability = 0; int preserve_devices = 0; -@@ -194,6 +195,7 @@ static void print_rsync_version(enum log +@@ -196,6 +197,7 @@ static void print_rsync_version(enum log char const *have_inplace = "no "; char const *hardlinks = "no "; char const *acls = "no "; @@ -238,7 +240,7 @@ After applying this patch, run these commands for a successful build: char const *links = "no "; char const *ipv6 = "no "; STRUCT_STAT *dumstat; -@@ -213,7 +215,9 @@ static void print_rsync_version(enum log +@@ -215,7 +217,9 @@ static void print_rsync_version(enum log #ifdef SUPPORT_ACLS acls = ""; #endif @@ -249,7 +251,7 @@ After applying this patch, run these commands for a successful build: #ifdef SUPPORT_LINKS links = ""; #endif -@@ -227,9 +231,9 @@ static void print_rsync_version(enum log +@@ -229,9 +233,9 @@ static void print_rsync_version(enum log rprintf(f, "Copyright (C) 1996-2006 by Andrew Tridgell, Wayne Davison, and others.\n"); rprintf(f, "\n"); rprintf(f, "Capabilities: %d-bit files, %ssocketpairs, " @@ -261,7 +263,7 @@ After applying this patch, run these commands for a successful build: /* Note that this field may not have type ino_t. It depends * on the complicated interaction between largefile feature -@@ -302,6 +306,9 @@ void usage(enum logcode F) +@@ -304,6 +308,9 @@ void usage(enum logcode F) #ifdef SUPPORT_ACLS rprintf(F," -A, --acls preserve ACLs (implies --perms)\n"); #endif @@ -271,7 +273,7 @@ After applying this patch, run these commands for a successful build: rprintf(F," --chmod=CHMOD change destination permissions\n"); rprintf(F," -o, --owner preserve owner (super-user only)\n"); rprintf(F," -g, --group preserve group\n"); -@@ -420,6 +427,9 @@ static struct poptOption long_options[] +@@ -422,6 +429,9 @@ static struct poptOption long_options[] {"acls", 'A', POPT_ARG_NONE, 0, 'A', 0, 0 }, {"no-acls", 0, POPT_ARG_VAL, &preserve_acls, 0, 0, 0 }, {"no-A", 0, POPT_ARG_VAL, &preserve_acls, 0, 0, 0 }, @@ -281,7 +283,7 @@ After applying this patch, run these commands for a successful build: {"times", 't', POPT_ARG_VAL, &preserve_times, 1, 0, 0 }, {"no-times", 0, POPT_ARG_VAL, &preserve_times, 0, 0, 0 }, {"no-t", 0, POPT_ARG_VAL, &preserve_times, 0, 0, 0 }, -@@ -1095,6 +1105,17 @@ int parse_arguments(int *argc, const cha +@@ -1097,6 +1107,17 @@ int parse_arguments(int *argc, const cha return 0; #endif @@ -299,7 +301,7 @@ After applying this patch, run these commands for a successful build: default: /* A large opt value means that set_refuse_options() -@@ -1542,6 +1563,10 @@ void server_options(char **args,int *arg +@@ -1544,6 +1565,10 @@ void server_options(char **args,int *arg if (preserve_acls) argstr[x++] = 'A'; #endif @@ -372,25 +374,27 @@ After applying this patch, run these commands for a successful build: transfer. The resulting value is treated as though it was the permissions --- old/xattr.c +++ new/xattr.c -@@ -0,0 +1,523 @@ -+/* Extended Attribute support for rsync */ -+/* Copyright (C) 2004 Red Hat, Inc */ -+/* Written by Jay Fenlason, vaguely based on the ACLs patch */ -+ -+/* This program is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2 of the License, or -+ (at your option) any later version. -+ -+ This program is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program; if not, write to the Free Software -+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+*/ +@@ -0,0 +1,525 @@ ++/* ++ * Extended Attribute support for rsync. ++ * ++ * Copyright (C) 2004 Red Hat, Inc. ++ * Written by Jay Fenlason, vaguely based on the ACLs patch. ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License along ++ * with this program; if not, write to the Free Software Foundation, Inc., ++ * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. ++ */ + +#include "rsync.h" +#include "lib/sysxattr.h"