From e49d65a5fd07e40260e800c0c262dad7e367b2f6 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 22 Apr 2025 11:42:46 +0100 Subject: [PATCH] bash: Replace 'cp -d' command with POSIX 'cp -P' Comment from Eric Blake: > We don't have any hard-links in our source. GNU cp -d is the same as > cp -P --preserve=links, but --preserve=links only matters for hard > links, so losing it doesn't hurt our usage. I'm inclined to just go > with cp -P unconditionally rather than needing the configure.ac > logic for $(CP_D). Fixes: https://github.com/libguestfs/libguestfs/issues/183 Reported-by: Mohamed Akram Thanks: Eric Blake --- bash/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bash/Makefile.am b/bash/Makefile.am index 2d26b29af..d95003ae7 100644 --- a/bash/Makefile.am +++ b/bash/Makefile.am @@ -57,7 +57,7 @@ all-local: $(scripts) $(symlinks) install-data-local: $(mkdir_p) $(DESTDIR)$(bashcompletiondir) - cp -d $(scripts) $(symlinks) $(DESTDIR)$(bashcompletiondir) + cp -P $(scripts) $(symlinks) $(DESTDIR)$(bashcompletiondir) clean-local: -test $(srcdir) != $(builddir) && rm -f $(scripts)