Subject: bug#61035: closed (Re: bug#61035: [PATCH] cp: improve help regarding ACLs)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 31 Jan 2023 21:58:02 +0000

Your bug report

#61035: [PATCH] cp: improve help regarding ACLs

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
61035: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61035
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#61035: [PATCH] cp: improve help regarding ACLs
From: Paul Eggert <[email-masked]>
To: Ondrej Valousek <[email-masked]>, Kamil Dudka <[email-masked]>
Cc: [email-masked]
Date: Tue, 31 Jan 2023 13:56:54 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

On 1/31/23 13:23, Ondrej Valousek wrote:
> Yes, that's nice, thanks!
> However I think it would be also fair to mention that ACLs will not be converted/translated (I.e. no posix to nfsv4 or vice versa). We are not that clever.

OK, I installed that along with the attached further patch to talk about 
ACL translation (this can be in the manual rather than the man page as 
it's reasonably obscure).

From 7a8db7dbafc932cb08403b863a1c1edec5d283ca Mon Sep 17 00:00:00 2001
From: Paul Eggert <[email-masked]>
Date: Tue, 31 Jan 2023 13:52:39 -0800
Subject: [PATCH] doc: document --preserve=mode better

* doc/coreutils.texi: Spruce up cp --preserve=mode doc.
---
 doc/coreutils.texi | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 143b93de9..97c5280d3 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -8972,7 +8972,13 @@ of one or more of the following strings:
 
 @table @samp
 @item mode
-Preserve the file mode bits and access control lists.
+@cindex access control lists (ACLs)
+Preserve attributes relevant to access permissions,
+including file mode bits and (if possible) access control lists (ACLs).
+ACL preservation is system-dependent, and ACLs are not necessarily
+translated when the source and destination are on file systems with
+different ACL formats (e.g., NFSv4 versus POSIX formats).
+
 @item ownership
 Preserve the owner and group.  On most modern systems,
 only users with appropriate privileges may change the owner of a file,
@@ -9014,6 +9020,7 @@ $ mkdir b c; (cd b; : > a; ln -s a b); cp -aL b c; ls -i1 c/b
 @item context
 Preserve SELinux security context of the file, or fail with full diagnostics.
 @item xattr
+@cindex access control lists (ACLs)
 Preserve extended attributes of the file, or fail with full diagnostics.
 If @command{cp} is built without xattr support, ignore this option.
 If SELinux context, ACLs or Capabilities are implemented using xattrs,
-- 
2.39.1

Subject: [PATCH] cp: improve help regarding ACLs
From: Ondrej Valousek <[email-masked]>
To: [email-masked]
Cc: Ondrej Valousek <[email-masked]>
Date: Tue, 24 Jan 2023 09:42:30 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Improve help to clarify ACL handling
---
 src/cp.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/cp.c b/src/cp.c
index 016ae8988..73ffd34e9 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -239,6 +239,11 @@ When --reflink[=always] is specified, perform a lightweight copy, where the\n\
 data blocks are copied only when modified.  If this is not possible the copy\n\
 fails, or if --reflink=auto is specified, fall back to a standard copy.\n\
 Use --reflink=never to ensure a standard copy is performed.\n\
+"), stdout);
+      fputs (_("\
+\n\
+--preserve=mode also copies ACLs but only if the destination filesystem\n\
+supports ACLs of the same type (i.e. no Posix <> NFSv4 ACLs conversion)\n\
 "), stdout);
       emit_backup_suffix_note ();
       fputs (_("\
-- 
2.39.0