[PATCH] GNUMakefile: Adjust cp invocation to what POSIX requires

3 views
Skip to first unread message

Greg Troxel

unread,
Jul 9, 2022, 7:52:39 PM7/9/22
to bup-...@googlegroups.com, Greg Troxel
"cp -a" is nonportable, as POSIX does not specify -a:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/cp.html
Use -R -p instead.

Signed-off-by: Greg Troxel <g...@lexort.com>
---
GNUmakefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/GNUmakefile b/GNUmakefile
index 812ea388..767b0ee0 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -176,7 +176,7 @@ dev/python-proposed: dev/python.c src/bup/compat.c src/bup/io.c
clean_paths += dev/python
dev/python: dev/python-proposed
dev/validate-python $@-proposed
- cp -a $@-proposed $@
+ cp -R -p $@-proposed $@

clean_paths += dev/bup-exec
generated_dependencies += dev/bup-exec.d
--
2.36.1

Rob Browning

unread,
Jul 11, 2022, 2:26:33 PM7/11/22
to Greg Troxel, bup-...@googlegroups.com, Greg Troxel
Greg Troxel <g...@lexort.com> writes:

> "cp -a" is nonportable, as POSIX does not specify -a:
> https://pubs.opengroup.org/onlinepubs/9699919799/utilities/cp.html
> Use -R -p instead.
>
> Signed-off-by: Greg Troxel <g...@lexort.com>

Pushed.

--
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4
Reply all
Reply to author
Forward
0 new messages