* [PATCH] kbuild: deb-pkg: set version for linux-headers paths
@ 2023-03-21 18:36 Kevin Locke
2023-03-21 21:21 ` Masahiro Yamada
2023-03-21 21:39 ` [PATCH v2] " Kevin Locke
0 siblings, 2 replies; 4+ messages in thread
From: Kevin Locke @ 2023-03-21 18:36 UTC (permalink / raw)
To: linux-kbuild
Cc: Masahiro Yamada, Linus Torvalds, Nathan Chancellor,
Nick Desaulniers, Nicolas Schier, linux-kernel
As a result of the switch to dh_listpackages, $version is no longer set
when install_kernel_headers() is called. This causes files in the
linux-headers deb package to be installed to a path with an empty
$version (e.g. /usr/src/linux-headers-/scripts/sign-file rather than
/usr/src/linux-headers-6.3.0-rc3/scripts/sign-file).
To avoid this, while continuing to use the version information from
dh_listpackages, set $version from $package.
Fixes: 36862e14e316 ("kbuild: deb-pkg: use dh_listpackages to know enabled packages")
Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
---
scripts/package/builddeb | 1 +
1 file changed, 1 insertion(+)
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index c5ae57167d7c..6fd590437f47 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -229,6 +229,7 @@ do
linux-libc-dev)
install_libc_headers debian/linux-libc-dev;;
linux-headers-*)
+ version=${package#linux-headers-}
install_kernel_headers debian/linux-headers;;
esac
done
--
2.39.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] kbuild: deb-pkg: set version for linux-headers paths
2023-03-21 18:36 [PATCH] kbuild: deb-pkg: set version for linux-headers paths Kevin Locke
@ 2023-03-21 21:21 ` Masahiro Yamada
2023-03-21 21:39 ` [PATCH v2] " Kevin Locke
1 sibling, 0 replies; 4+ messages in thread
From: Masahiro Yamada @ 2023-03-21 21:21 UTC (permalink / raw)
To: Kevin Locke
Cc: linux-kbuild, Linus Torvalds, Nathan Chancellor,
Nick Desaulniers, Nicolas Schier, linux-kernel
On Wed, Mar 22, 2023 at 3:36 AM Kevin Locke <kevin@kevinlocke.name> wrote:
>
> As a result of the switch to dh_listpackages, $version is no longer set
> when install_kernel_headers() is called. This causes files in the
> linux-headers deb package to be installed to a path with an empty
> $version (e.g. /usr/src/linux-headers-/scripts/sign-file rather than
> /usr/src/linux-headers-6.3.0-rc3/scripts/sign-file).
>
> To avoid this, while continuing to use the version information from
> dh_listpackages, set $version from $package.
>
> Fixes: 36862e14e316 ("kbuild: deb-pkg: use dh_listpackages to know enabled packages")
> Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
> ---
> scripts/package/builddeb | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/scripts/package/builddeb b/scripts/package/builddeb
> index c5ae57167d7c..6fd590437f47 100755
> --- a/scripts/package/builddeb
> +++ b/scripts/package/builddeb
> @@ -229,6 +229,7 @@ do
> linux-libc-dev)
> install_libc_headers debian/linux-libc-dev;;
> linux-headers-*)
> + version=${package#linux-headers-}
> install_kernel_headers debian/linux-headers;;
Thank you for catching this.
Can you pass it as the second argument to the function?
install_kerne_headers debian/linux-headers ${package#linux-headers-}
> esac
> done
> --
> 2.39.2
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] kbuild: deb-pkg: set version for linux-headers paths
2023-03-21 18:36 [PATCH] kbuild: deb-pkg: set version for linux-headers paths Kevin Locke
2023-03-21 21:21 ` Masahiro Yamada
@ 2023-03-21 21:39 ` Kevin Locke
2023-03-22 14:21 ` Masahiro Yamada
1 sibling, 1 reply; 4+ messages in thread
From: Kevin Locke @ 2023-03-21 21:39 UTC (permalink / raw)
To: linux-kbuild
Cc: Masahiro Yamada, Linus Torvalds, Nathan Chancellor,
Nick Desaulniers, Nicolas Schier, linux-kernel
As a result of the switch to dh_listpackages, $version is no longer set
when install_kernel_headers() is called. This causes files in the
linux-headers deb package to be installed to a path with an empty
$version (e.g. /usr/src/linux-headers-/scripts/sign-file rather than
/usr/src/linux-headers-6.3.0-rc3/scripts/sign-file).
To avoid this, while continuing to use the version information from
dh_listpackages, pass $version from $package as the second argument
of install_kernel_headers().
Fixes: 36862e14e316 ("kbuild: deb-pkg: use dh_listpackages to know enabled packages")
Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
---
Good idea! Thanks for the quick review and feedback. Here's an updated
version.
Changes since v1:
* Pass version as the second argument to install_kernel_headers(),
rather than as a global variable, as suggested by Masahiro Yamada.
scripts/package/builddeb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index c5ae57167d7c..7b23f52c70c5 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -162,6 +162,7 @@ install_linux_image_dbg () {
install_kernel_headers () {
pdir=$1
+ version=$2
rm -rf $pdir
@@ -229,7 +230,7 @@ do
linux-libc-dev)
install_libc_headers debian/linux-libc-dev;;
linux-headers-*)
- install_kernel_headers debian/linux-headers;;
+ install_kernel_headers debian/linux-headers ${package#linux-headers-};;
esac
done
--
2.39.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] kbuild: deb-pkg: set version for linux-headers paths
2023-03-21 21:39 ` [PATCH v2] " Kevin Locke
@ 2023-03-22 14:21 ` Masahiro Yamada
0 siblings, 0 replies; 4+ messages in thread
From: Masahiro Yamada @ 2023-03-22 14:21 UTC (permalink / raw)
To: Kevin Locke
Cc: linux-kbuild, Linus Torvalds, Nathan Chancellor,
Nick Desaulniers, Nicolas Schier, linux-kernel
On Wed, Mar 22, 2023 at 6:39 AM Kevin Locke <kevin@kevinlocke.name> wrote:
>
> As a result of the switch to dh_listpackages, $version is no longer set
> when install_kernel_headers() is called. This causes files in the
> linux-headers deb package to be installed to a path with an empty
> $version (e.g. /usr/src/linux-headers-/scripts/sign-file rather than
> /usr/src/linux-headers-6.3.0-rc3/scripts/sign-file).
>
> To avoid this, while continuing to use the version information from
> dh_listpackages, pass $version from $package as the second argument
> of install_kernel_headers().
>
> Fixes: 36862e14e316 ("kbuild: deb-pkg: use dh_listpackages to know enabled packages")
> Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
> ---
Applied to linux-kbuild/fixes. Thanks.
> Good idea! Thanks for the quick review and feedback. Here's an updated
> version.
>
> Changes since v1:
> * Pass version as the second argument to install_kernel_headers(),
> rather than as a global variable, as suggested by Masahiro Yamada.
>
> scripts/package/builddeb | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/package/builddeb b/scripts/package/builddeb
> index c5ae57167d7c..7b23f52c70c5 100755
> --- a/scripts/package/builddeb
> +++ b/scripts/package/builddeb
> @@ -162,6 +162,7 @@ install_linux_image_dbg () {
>
> install_kernel_headers () {
> pdir=$1
> + version=$2
>
> rm -rf $pdir
>
> @@ -229,7 +230,7 @@ do
> linux-libc-dev)
> install_libc_headers debian/linux-libc-dev;;
> linux-headers-*)
> - install_kernel_headers debian/linux-headers;;
> + install_kernel_headers debian/linux-headers ${package#linux-headers-};;
> esac
> done
>
> --
> 2.39.2
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-03-22 14:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-21 18:36 [PATCH] kbuild: deb-pkg: set version for linux-headers paths Kevin Locke
2023-03-21 21:21 ` Masahiro Yamada
2023-03-21 21:39 ` [PATCH v2] " Kevin Locke
2023-03-22 14:21 ` Masahiro Yamada
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).