Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5010675pxb; Wed, 26 Jan 2022 02:54:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJxp42s9So+kstV8wi2wMgqNwBul3Xzn3OkwZGAjCKNqXqR0GDsh3VRk5gE+NA2HHYQJZls7 X-Received: by 2002:a17:907:110e:: with SMTP id qu14mr19327052ejb.238.1643194455957; Wed, 26 Jan 2022 02:54:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643194455; cv=none; d=google.com; s=arc-20160816; b=zBP4pwdKIbKVNHT26wU7FwNJ+Ytsfv98WFLTTvskhcoeimZeHXVBLmuILYvmjM4mbH IbtAlVjF6VvsSbV/dqjSSvvUCnypddXu4vV9zozJFXbjYPpi2Oj//MNSUtIJaqoQWUdW 4qsXbZ4s8+rX8r6wLY11Nz498Jatw3+ZNyiNyX+XHez99EajQcyeDwiDb1lBMh0McDMW 1s8qFATkg7Sq67bCoECG6faE9tc/wzf3bt0RPluILzX8RHVFa/TgZp5p0TurfbDoKB6q m5w5i+Sq3fL4own0qFbAYguv2wCmhgUTOB3n052+qS1TRSJ7iYxSok+17xJYs74JfWWc SyEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:organization:subject:cc:to:from:dkim-signature; bh=QdpY40h4N92+frW2KWlnBEn3OeP3G1Ps7QYOh/7MpZE=; b=bT2Zm+y2VPsOW2Oba68WAnBWPOc6vtAte5epvgfjsCxY2h/Fv4eJfaPvQaMAlg7AjR bkNhEx5NuhjF4NuOELcM1c94kiujY8YCIHlrNR1dNohssrZxrxVDVIBDtoRaylJvGVGW QENTpd6+hQcpyYopSHPnlZ9xCoE7Py4oz6yvMDA7TUR1dJio/GTAok99SZ/GyQ3m8nh2 K4Jq8kS5K1fQa5R0rztUqDpUUDK9Fstt5XeOu7iNOMKkLOG7b14mm/Ss9sazxcCHHASl lNLygPCaX+Ionp4/96UiZe7cAMfS0u7yxIz534lp9+pxU11tZkmndC2NxzpEbtw0B3La pY4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=gGWC8Wrn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q8si11574725ejr.980.2022.01.26.02.53.50; Wed, 26 Jan 2022 02:54:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=gGWC8Wrn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233557AbiAYWLs (ORCPT + 99 others); Tue, 25 Jan 2022 17:11:48 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:60182 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230384AbiAYWLq (ORCPT ); Tue, 25 Jan 2022 17:11:46 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: krisman) with ESMTPSA id EF8EA1F4466C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1643148705; bh=haA1xD8icyCw96+5lD3ONdPtel9Z0YzFWe4Lj84edoI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=gGWC8WrnglbRpa2lZ+JF+2BhOaLozx2WUUs7LujBWqzFnzm8vDFAwONl+shJ5/L6R Oh/TxTJhaFGHPHpEcuVFy3TGWyEt1MabgjXbczKy+mM0KaCE7DeZbQeMbm/+E0NTuE FxQffYo2xpJQscg8oyATSEguoAUZFv4I44UE2d3nTGVP1j+z122Z1YF5Cx8tL0u+jv PxlZ8EFDtRPu56J4dmsPYwOFbEYldyCtYJZKYKdrJUtrQqjUxPGqkbecpn7XuiXlT1 3GfiUFSoslDNsLDssgT9AQUg0DSQ9enYp0dfEClpYxOmlOXSC/u7vuZKeDWc0fUiUW 4NAJhDqmehRag== From: Gabriel Krisman Bertazi To: Nick Desaulniers Cc: Masahiro Yamada , linux-kbuild@vger.kernel.org, Michal Marek , Michal Simek , Rob Herring , devicetree@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] kbuild: unify cmd_copy and cmd_shipped Organization: Collabora References: <20220125064027.873131-1-masahiroy@kernel.org> Date: Tue, 25 Jan 2022 17:11:41 -0500 In-Reply-To: (Nick Desaulniers's message of "Tue, 25 Jan 2022 13:04:56 -0800") Message-ID: <87h79rsbxe.fsf@collabora.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Nick Desaulniers writes: > On Mon, Jan 24, 2022 at 10:41 PM Masahiro Yamada wrote: >> >> cmd_copy and cmd_shipped have similar functionality. The difference is >> that cmd_copy uses 'cp' while cmd_shipped 'cat'. >> >> Unify them into cmd_copy because this macro name is more intuitive. >> >> Going forward, cmd_copy will use 'cat' to avoid the permission issue. >> I also thought of 'cp --no-preserve=mode' but this option is not >> mentioned in the POSIX spec [1], so I am keeping the 'cat' command. >> >> [1]: https://pubs.opengroup.org/onlinepubs/009695299/utilities/cp.html >> Signed-off-by: Masahiro Yamada >> --- >> >> arch/microblaze/boot/Makefile | 2 +- >> arch/microblaze/boot/dts/Makefile | 2 +- >> fs/unicode/Makefile | 2 +- >> scripts/Makefile.lib | 12 ++++-------- >> usr/Makefile | 4 ++-- >> 5 files changed, 9 insertions(+), 13 deletions(-) >> >> diff --git a/arch/microblaze/boot/Makefile b/arch/microblaze/boot/Makefile >> index cff570a71946..2b42c370d574 100644 >> --- a/arch/microblaze/boot/Makefile >> +++ b/arch/microblaze/boot/Makefile >> @@ -29,7 +29,7 @@ $(obj)/simpleImage.$(DTB).ub: $(obj)/simpleImage.$(DTB) FORCE >> $(call if_changed,uimage) >> >> $(obj)/simpleImage.$(DTB).unstrip: vmlinux FORCE >> - $(call if_changed,shipped) >> + $(call if_changed,copy) >> >> $(obj)/simpleImage.$(DTB).strip: vmlinux FORCE >> $(call if_changed,strip) >> diff --git a/arch/microblaze/boot/dts/Makefile b/arch/microblaze/boot/dts/Makefile >> index ef00dd30d19a..b84e2cbb20ee 100644 >> --- a/arch/microblaze/boot/dts/Makefile >> +++ b/arch/microblaze/boot/dts/Makefile >> @@ -12,7 +12,7 @@ $(obj)/linked_dtb.o: $(obj)/system.dtb >> # Generate system.dtb from $(DTB).dtb >> ifneq ($(DTB),system) >> $(obj)/system.dtb: $(obj)/$(DTB).dtb >> - $(call if_changed,shipped) >> + $(call if_changed,copy) >> endif >> endif >> >> diff --git a/fs/unicode/Makefile b/fs/unicode/Makefile >> index 2f9d9188852b..74ae80fc3a36 100644 >> --- a/fs/unicode/Makefile >> +++ b/fs/unicode/Makefile >> @@ -31,7 +31,7 @@ $(obj)/utf8data.c: $(obj)/mkutf8data $(filter %.txt, $(cmd_utf8data)) FORCE >> else >> >> $(obj)/utf8data.c: $(src)/utf8data.c_shipped FORCE > > do we want to retitle the _shipped suffix for this file to _copy now, too? > fs/unicode/Makefile:11 > fs/unicode/Makefile:33 > fs/unicode/Makefile:34 I think _copy doesn't convey the sense that this is distributed with the kernel tree, even though it is also generated from in-tree sources. Even if that is not the original sense of _shipped (is it?), it makes sense to me that way, but _copy doesn't. The patch looks good to me, though. Reviewed-by: Gabriel Krisman Bertazi > > Either way > Reviewed-by: Nick Desaulniers > >> - $(call if_changed,shipped) >> + $(call if_changed,copy) >> >> endif >> >> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib >> index 79be57fdd32a..40735a3adb54 100644 >> --- a/scripts/Makefile.lib >> +++ b/scripts/Makefile.lib >> @@ -246,20 +246,16 @@ $(foreach m, $(notdir $1), \ >> $(addprefix $(obj)/, $(foreach s, $3, $($(m:%$(strip $2)=%$(s))))))) >> endef >> >> -quiet_cmd_copy = COPY $@ >> - cmd_copy = cp $< $@ >> - >> -# Shipped files >> +# Copy a file >> # =========================================================================== >> # 'cp' preserves permissions. If you use it to copy a file in read-only srctree, >> # the copy would be read-only as well, leading to an error when executing the >> # rule next time. Use 'cat' instead in order to generate a writable file. >> - >> -quiet_cmd_shipped = SHIPPED $@ >> -cmd_shipped = cat $< > $@ >> +quiet_cmd_copy = COPY $@ >> + cmd_copy = cat $< > $@ >> >> $(obj)/%: $(src)/%_shipped >> - $(call cmd,shipped) >> + $(call cmd,copy) >> >> # Commands useful for building a boot image >> # =========================================================================== >> diff --git a/usr/Makefile b/usr/Makefile >> index cc0d2824e100..59d9e8b07a01 100644 >> --- a/usr/Makefile >> +++ b/usr/Makefile >> @@ -3,7 +3,7 @@ >> # kbuild file for usr/ - including initramfs image >> # >> >> -compress-y := shipped >> +compress-y := copy >> compress-$(CONFIG_INITRAMFS_COMPRESSION_GZIP) := gzip >> compress-$(CONFIG_INITRAMFS_COMPRESSION_BZIP2) := bzip2 >> compress-$(CONFIG_INITRAMFS_COMPRESSION_LZMA) := lzma >> @@ -37,7 +37,7 @@ endif >> # .cpio.*, use it directly as an initramfs, and avoid double compression. >> ifeq ($(words $(subst .cpio.,$(space),$(ramfs-input))),2) >> cpio-data := $(ramfs-input) >> -compress-y := shipped >> +compress-y := copy >> endif >> >> endif >> -- >> 2.32.0 >> -- Gabriel Krisman Bertazi