Message ID | 20180404140459.20644-1-pkj@axis.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 04/04/2018 10:04 PM, Peter Kjellerstedt wrote: > Using cp -a to install files will preserve the ownership of the > original files (if possible), which is typically not wanted. E.g., if > the files were built by a normal user, but are being installed by > root, then the installed files would maintain the UIDs/GIDs of the > user that built the files rather than be owned by root. Reviewed-by: Anand Jain <anand.jain@oracle.com> Thanks, Anand -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, Apr 04, 2018 at 04:04:59PM +0200, Peter Kjellerstedt wrote: > Using cp -a to install files will preserve the ownership of the > original files (if possible), which is typically not wanted. E.g., if > the files were built by a normal user, but are being installed by > root, then the installed files would maintain the UIDs/GIDs of the > user that built the files rather than be owned by root. > > Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Applied and added to 4.16, thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/Makefile b/Makefile index 92cfe7b5..0e8bfd98 100644 --- a/Makefile +++ b/Makefile @@ -578,7 +578,7 @@ install: $(libs) $(progs_install) $(INSTALLDIRS) $(LN_S) -f btrfs $(DESTDIR)$(bindir)/btrfsck $(INSTALL) -m755 -d $(DESTDIR)$(libdir) $(INSTALL) $(libs) $(DESTDIR)$(libdir) - cp -a $(lib_links) $(DESTDIR)$(libdir) + cp -d $(lib_links) $(DESTDIR)$(libdir) $(INSTALL) -m755 -d $(DESTDIR)$(incdir) $(INSTALL) -m644 $(headers) $(DESTDIR)$(incdir) ifneq ($(udevdir),)
Using cp -a to install files will preserve the ownership of the original files (if possible), which is typically not wanted. E.g., if the files were built by a normal user, but are being installed by root, then the installed files would maintain the UIDs/GIDs of the user that built the files rather than be owned by root. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)