* [PATCH 1/1] kbuild: Fix build target deb-pkg: ln: failed to create hard link
@ 2024-06-16 5:34 Thayne Harbaugh
2024-06-16 9:39 ` Masahiro Yamada
0 siblings, 1 reply; 2+ messages in thread
From: Thayne Harbaugh @ 2024-06-16 5:34 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-kbuild, Masahiro Yamada
From: Thayne Harbaugh <thayne@mastodonlabs.com>
The make deb-pkg target calls debian-orig which attempts to either
hard link the source .tar to the build-output location or copy the
source .tar to the build-output location. The test to determine
whether to ln or cp is incorrectly expanded by Make and consequently
always attempts to ln the source .tar. This fix corrects the escaping
of '$' so that the test is expanded by the shell rather than by Make
and appropriately selects between ln and cp.
Signed-off-by: Thayne Harbaugh <thayne@mastodonlabs.com>
---
scripts/Makefile.package | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/Makefile.package b/scripts/Makefile.package
index 38653f3e8108..bf016af8bf8a 100644
--- a/scripts/Makefile.package
+++ b/scripts/Makefile.package
@@ -103,7 +103,7 @@ debian-orig: private version = $(shell dpkg-parsechangelog -S Version | sed 's/-
debian-orig: private orig-name = $(source)_$(version).orig.tar$(debian-orig-suffix)
debian-orig: mkdebian-opts = --need-source
debian-orig: linux.tar$(debian-orig-suffix) debian
- $(Q)if [ "$(df --output=target .. 2>/dev/null)" = "$(df --output=target $< 2>/dev/null)" ]; then \
+ $(Q)if [ "$$(df --output=target .. 2>/dev/null)" = "$$(df --output=target $< 2>/dev/null)" ]; then \
ln -f $< ../$(orig-name); \
else \
cp $< ../$(orig-name); \
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] kbuild: Fix build target deb-pkg: ln: failed to create hard link
2024-06-16 5:34 [PATCH 1/1] kbuild: Fix build target deb-pkg: ln: failed to create hard link Thayne Harbaugh
@ 2024-06-16 9:39 ` Masahiro Yamada
0 siblings, 0 replies; 2+ messages in thread
From: Masahiro Yamada @ 2024-06-16 9:39 UTC (permalink / raw)
To: thayne; +Cc: linux-kernel, linux-kbuild
On Sun, Jun 16, 2024 at 2:34 PM Thayne Harbaugh <thayne@mastodonlabs.com> wrote:
>
> From: Thayne Harbaugh <thayne@mastodonlabs.com>
>
> The make deb-pkg target calls debian-orig which attempts to either
> hard link the source .tar to the build-output location or copy the
> source .tar to the build-output location. The test to determine
> whether to ln or cp is incorrectly expanded by Make and consequently
> always attempts to ln the source .tar. This fix corrects the escaping
> of '$' so that the test is expanded by the shell rather than by Make
> and appropriately selects between ln and cp.
>
> Signed-off-by: Thayne Harbaugh <thayne@mastodonlabs.com>
Applied with
Fixes: b44aa8c96e9e ("kbuild: deb-pkg: make .orig tarball a hard link
if possible")
Thanks!
> ---
> scripts/Makefile.package | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/Makefile.package b/scripts/Makefile.package
> index 38653f3e8108..bf016af8bf8a 100644
> --- a/scripts/Makefile.package
> +++ b/scripts/Makefile.package
> @@ -103,7 +103,7 @@ debian-orig: private version = $(shell dpkg-parsechangelog -S Version | sed 's/-
> debian-orig: private orig-name = $(source)_$(version).orig.tar$(debian-orig-suffix)
> debian-orig: mkdebian-opts = --need-source
> debian-orig: linux.tar$(debian-orig-suffix) debian
> - $(Q)if [ "$(df --output=target .. 2>/dev/null)" = "$(df --output=target $< 2>/dev/null)" ]; then \
> + $(Q)if [ "$$(df --output=target .. 2>/dev/null)" = "$$(df --output=target $< 2>/dev/null)" ]; then \
> ln -f $< ../$(orig-name); \
> else \
> cp $< ../$(orig-name); \
> --
> 2.43.0
>
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-06-16 9:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-16 5:34 [PATCH 1/1] kbuild: Fix build target deb-pkg: ln: failed to create hard link Thayne Harbaugh
2024-06-16 9:39 ` Masahiro Yamada
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®