import rsync-3.1.3-13.el8
This commit is contained in:
parent
b68aff9ce2
commit
814b3dcbae
38
SOURCES/rsync-3.1.3-xattr.patch
Normal file
38
SOURCES/rsync-3.1.3-xattr.patch
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
diff --git a/xattrs.c b/xattrs.c
|
||||||
|
index 508649c0..3c549192 100644
|
||||||
|
--- a/xattrs.c
|
||||||
|
+++ b/xattrs.c
|
||||||
|
@@ -1055,7 +1055,7 @@ int set_xattr(const char *fname, const struct file_struct *file, const char *fna
|
||||||
|
{
|
||||||
|
rsync_xa_list *glst = rsync_xal_l.items;
|
||||||
|
item_list *lst;
|
||||||
|
- int ndx;
|
||||||
|
+ int ndx, added_write_perm = 0;
|
||||||
|
|
||||||
|
if (dry_run)
|
||||||
|
return 1; /* FIXME: --dry-run needs to compute this value */
|
||||||
|
@@ -1084,10 +1084,23 @@ int set_xattr(const char *fname, const struct file_struct *file, const char *fna
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+ /* If the target file lacks write permission, we try to add it
|
||||||
|
+ * temporarily so we can change the extended attributes. */
|
||||||
|
+ if (!am_root
|
||||||
|
+#ifdef SUPPORT_LINKS
|
||||||
|
+ && !S_ISLNK(sxp->st.st_mode)
|
||||||
|
+#endif
|
||||||
|
+ && access(fname, W_OK) < 0
|
||||||
|
+ && do_chmod(fname, (sxp->st.st_mode & CHMOD_BITS) | S_IWUSR) == 0)
|
||||||
|
+ added_write_perm = 1;
|
||||||
|
+
|
||||||
|
ndx = F_XATTR(file);
|
||||||
|
glst += ndx;
|
||||||
|
lst = &glst->xa_items;
|
||||||
|
- return rsync_xal_set(fname, lst, fnamecmp, sxp);
|
||||||
|
+ int return_value = rsync_xal_set(fname, lst, fnamecmp, sxp);
|
||||||
|
+ if (added_write_perm) /* remove the temporary write permission */
|
||||||
|
+ do_chmod(fname, sxp->st.st_mode);
|
||||||
|
+ return return_value;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef SUPPORT_ACLS
|
@ -9,7 +9,7 @@
|
|||||||
Summary: A program for synchronizing files over a network
|
Summary: A program for synchronizing files over a network
|
||||||
Name: rsync
|
Name: rsync
|
||||||
Version: 3.1.3
|
Version: 3.1.3
|
||||||
Release: 12%{?dist}
|
Release: 13%{?dist}
|
||||||
Group: Applications/Internet
|
Group: Applications/Internet
|
||||||
URL: http://rsync.samba.org/
|
URL: http://rsync.samba.org/
|
||||||
|
|
||||||
@ -35,6 +35,7 @@ Patch4: rsync-3.1.2-vvv-hang.patch
|
|||||||
Patch5: rsync-3.1.3-ignore-missing.patch
|
Patch5: rsync-3.1.3-ignore-missing.patch
|
||||||
Patch6: rsync-3.1.3-append-check.patch
|
Patch6: rsync-3.1.3-append-check.patch
|
||||||
Patch7: rsync-3.1.3-skip-compress.patch
|
Patch7: rsync-3.1.3-skip-compress.patch
|
||||||
|
Patch8: rsync-3.1.3-xattr.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Rsync uses a reliable algorithm to bring remote and host files into
|
Rsync uses a reliable algorithm to bring remote and host files into
|
||||||
@ -80,6 +81,7 @@ patch -p1 -i patches/copy-devices.diff
|
|||||||
%patch5 -p1 -b .missing
|
%patch5 -p1 -b .missing
|
||||||
%patch6 -p1 -b .append
|
%patch6 -p1 -b .append
|
||||||
%patch7 -p1 -b .skip-compress
|
%patch7 -p1 -b .skip-compress
|
||||||
|
%patch8 -p1 -b .xattr
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure
|
%configure
|
||||||
@ -126,6 +128,9 @@ chmod -x support/*
|
|||||||
%systemd_postun_with_restart rsyncd.service
|
%systemd_postun_with_restart rsyncd.service
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Sep 27 2021 Tomas Korbar <tkorbar@redhat.com> - 3.1.3-13
|
||||||
|
- Resolves: #1907443 - Read-only files that have changed xattrs fail to allow xattr changes
|
||||||
|
|
||||||
* Fri Dec 18 2020 Michal Ruprich <mruprich@redhat.com> - 3.1.3-12
|
* Fri Dec 18 2020 Michal Ruprich <mruprich@redhat.com> - 3.1.3-12
|
||||||
- Resolves: #1816528 - Defaults for --skip-compress are not working, everything is being compressed
|
- Resolves: #1816528 - Defaults for --skip-compress are not working, everything is being compressed
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user