* [PATCH 1/2] Revert "kheaders: substituting --sort in archive creation"
@ 2023-05-21 13:23 Masahiro Yamada
2023-05-21 13:23 ` [PATCH 2/2] doc: Add tar requirement to changes.rst Masahiro Yamada
2023-05-24 20:10 ` [PATCH 1/2] Revert "kheaders: substituting --sort in archive creation" Nicolas Schier
0 siblings, 2 replies; 6+ messages in thread
From: Masahiro Yamada @ 2023-05-21 13:23 UTC (permalink / raw)
To: linux-kbuild; +Cc: linux-kernel, Masahiro Yamada
This reverts commit 700dea5a0bea9f64eba89fae7cb2540326fdfdc1.
The reason for that commit was --sort=ORDER introduced in
tar 1.28 (2014). More than 3 years have passed since then.
Requiring GNU tar 1.28 should be fine now because we require
GCC 5.1 (2015).
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
| 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
--git a/kernel/gen_kheaders.sh b/kernel/gen_kheaders.sh
index 1ef9a87511f5..6d443ea22bb7 100755
--- a/kernel/gen_kheaders.sh
+++ b/kernel/gen_kheaders.sh
@@ -83,12 +83,9 @@ find $cpio_dir -type f -print0 |
xargs -0 -P8 -n1 perl -pi -e 'BEGIN {undef $/;}; s/\/\*((?!SPDX).)*?\*\///smg;'
# Create archive and try to normalize metadata for reproducibility.
-# For compatibility with older versions of tar, files are fed to tar
-# pre-sorted, as --sort=name might not be available.
-find $cpio_dir -printf "./%P\n" | LC_ALL=C sort | \
- tar "${KBUILD_BUILD_TIMESTAMP:+--mtime=$KBUILD_BUILD_TIMESTAMP}" \
- --owner=0 --group=0 --numeric-owner --no-recursion \
- -I $XZ -cf $tarfile -C $cpio_dir/ -T - > /dev/null
+tar "${KBUILD_BUILD_TIMESTAMP:+--mtime=$KBUILD_BUILD_TIMESTAMP}" \
+ --owner=0 --group=0 --sort=name --numeric-owner \
+ -I $XZ -cf $tarfile -C $cpio_dir/ . > /dev/null
echo $headers_md5 > kernel/kheaders.md5
echo "$this_file_md5" >> kernel/kheaders.md5
--
2.39.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] doc: Add tar requirement to changes.rst
2023-05-21 13:23 [PATCH 1/2] Revert "kheaders: substituting --sort in archive creation" Masahiro Yamada
@ 2023-05-21 13:23 ` Masahiro Yamada
2023-05-24 20:12 ` Nicolas Schier
2023-05-24 20:10 ` [PATCH 1/2] Revert "kheaders: substituting --sort in archive creation" Nicolas Schier
1 sibling, 1 reply; 6+ messages in thread
From: Masahiro Yamada @ 2023-05-21 13:23 UTC (permalink / raw)
To: linux-kbuild; +Cc: linux-kernel, Masahiro Yamada, Jonathan Corbet, linux-doc
tar is used to build the kernel with CONFIG_IKHEADERS.
GNU tar 1.28 or later is required.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
Documentation/process/changes.rst | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Documentation/process/changes.rst b/Documentation/process/changes.rst
index a9ef00509c9b..3c0074214d75 100644
--- a/Documentation/process/changes.rst
+++ b/Documentation/process/changes.rst
@@ -60,6 +60,7 @@ openssl & libcrypto 1.0.0 openssl version
bc 1.06.95 bc --version
Sphinx\ [#f1]_ 1.7 sphinx-build --version
cpio any cpio --version
+GNU tar 1.28 tar --version
gtags (optional) 6.6.5 gtags --version
====================== =============== ========================================
@@ -175,6 +176,12 @@ You will need openssl to build kernels 3.7 and higher if module signing is
enabled. You will also need openssl development packages to build kernels 4.3
and higher.
+Tar
+---
+
+GNU tar is needed if you want to enable access to the kernel headers via sysfs
+(CONFIG_IKHEADERS).
+
gtags / GNU GLOBAL (optional)
-----------------------------
--
2.39.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] Revert "kheaders: substituting --sort in archive creation"
2023-05-21 13:23 [PATCH 1/2] Revert "kheaders: substituting --sort in archive creation" Masahiro Yamada
2023-05-21 13:23 ` [PATCH 2/2] doc: Add tar requirement to changes.rst Masahiro Yamada
@ 2023-05-24 20:10 ` Nicolas Schier
1 sibling, 0 replies; 6+ messages in thread
From: Nicolas Schier @ 2023-05-24 20:10 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: linux-kbuild, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1829 bytes --]
On Sun 21 May 2023 22:23:35 GMT, Masahiro Yamada wrote:
> This reverts commit 700dea5a0bea9f64eba89fae7cb2540326fdfdc1.
>
> The reason for that commit was --sort=ORDER introduced in
> tar 1.28 (2014). More than 3 years have passed since then.
>
> Requiring GNU tar 1.28 should be fine now because we require
> GCC 5.1 (2015).
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
>
> kernel/gen_kheaders.sh | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/kernel/gen_kheaders.sh b/kernel/gen_kheaders.sh
> index 1ef9a87511f5..6d443ea22bb7 100755
> --- a/kernel/gen_kheaders.sh
> +++ b/kernel/gen_kheaders.sh
> @@ -83,12 +83,9 @@ find $cpio_dir -type f -print0 |
> xargs -0 -P8 -n1 perl -pi -e 'BEGIN {undef $/;}; s/\/\*((?!SPDX).)*?\*\///smg;'
>
> # Create archive and try to normalize metadata for reproducibility.
> -# For compatibility with older versions of tar, files are fed to tar
> -# pre-sorted, as --sort=name might not be available.
> -find $cpio_dir -printf "./%P\n" | LC_ALL=C sort | \
> - tar "${KBUILD_BUILD_TIMESTAMP:+--mtime=$KBUILD_BUILD_TIMESTAMP}" \
> - --owner=0 --group=0 --numeric-owner --no-recursion \
> - -I $XZ -cf $tarfile -C $cpio_dir/ -T - > /dev/null
> +tar "${KBUILD_BUILD_TIMESTAMP:+--mtime=$KBUILD_BUILD_TIMESTAMP}" \
> + --owner=0 --group=0 --sort=name --numeric-owner \
> + -I $XZ -cf $tarfile -C $cpio_dir/ . > /dev/null
>
> echo $headers_md5 > kernel/kheaders.md5
> echo "$this_file_md5" >> kernel/kheaders.md5
> --
> 2.39.2
--
Nicolas Schier
epost|xmpp: nicolas@fjasle.eu irc://oftc.net/nsc
↳ gpg: 18ed 52db e34f 860e e9fb c82b 7d97 0932 55a0 ce7f
-- frykten for herren er opphav til kunnskap --
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] doc: Add tar requirement to changes.rst
2023-05-21 13:23 ` [PATCH 2/2] doc: Add tar requirement to changes.rst Masahiro Yamada
@ 2023-05-24 20:12 ` Nicolas Schier
2023-05-28 7:15 ` Masahiro Yamada
0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Schier @ 2023-05-24 20:12 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: linux-kbuild, linux-kernel, Jonathan Corbet, linux-doc
[-- Attachment #1: Type: text/plain, Size: 1805 bytes --]
On Sun 21 May 2023 22:23:36 GMT, Masahiro Yamada wrote:
> tar is used to build the kernel with CONFIG_IKHEADERS.
>
> GNU tar 1.28 or later is required.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
>
> Documentation/process/changes.rst | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/Documentation/process/changes.rst b/Documentation/process/changes.rst
> index a9ef00509c9b..3c0074214d75 100644
> --- a/Documentation/process/changes.rst
> +++ b/Documentation/process/changes.rst
> @@ -60,6 +60,7 @@ openssl & libcrypto 1.0.0 openssl version
> bc 1.06.95 bc --version
> Sphinx\ [#f1]_ 1.7 sphinx-build --version
> cpio any cpio --version
> +GNU tar 1.28 tar --version
> gtags (optional) 6.6.5 gtags --version
> ====================== =============== ========================================
>
> @@ -175,6 +176,12 @@ You will need openssl to build kernels 3.7 and higher if module signing is
> enabled. You will also need openssl development packages to build kernels 4.3
> and higher.
>
> +Tar
> +---
> +
> +GNU tar is needed if you want to enable access to the kernel headers via sysfs
> +(CONFIG_IKHEADERS).
CONFIG_IKHEADERS does also require 'xz' (cp. kernel/gen_kheaders.sh),
should it be mentioned in changes.rst as well?
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
> +
> gtags / GNU GLOBAL (optional)
> -----------------------------
>
> --
> 2.39.2
--
Nicolas Schier
epost|xmpp: nicolas@fjasle.eu irc://oftc.net/nsc
↳ gpg: 18ed 52db e34f 860e e9fb c82b 7d97 0932 55a0 ce7f
-- frykten for herren er opphav til kunnskap --
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] doc: Add tar requirement to changes.rst
2023-05-24 20:12 ` Nicolas Schier
@ 2023-05-28 7:15 ` Masahiro Yamada
2023-05-30 18:54 ` Nicolas Schier
0 siblings, 1 reply; 6+ messages in thread
From: Masahiro Yamada @ 2023-05-28 7:15 UTC (permalink / raw)
To: Nicolas Schier; +Cc: linux-kbuild, linux-kernel, Jonathan Corbet, linux-doc
On Thu, May 25, 2023 at 5:13 AM Nicolas Schier <nicolas@fjasle.eu> wrote:
>
> On Sun 21 May 2023 22:23:36 GMT, Masahiro Yamada wrote:
> > tar is used to build the kernel with CONFIG_IKHEADERS.
> >
> > GNU tar 1.28 or later is required.
> >
> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> > ---
> >
> > Documentation/process/changes.rst | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/Documentation/process/changes.rst b/Documentation/process/changes.rst
> > index a9ef00509c9b..3c0074214d75 100644
> > --- a/Documentation/process/changes.rst
> > +++ b/Documentation/process/changes.rst
> > @@ -60,6 +60,7 @@ openssl & libcrypto 1.0.0 openssl version
> > bc 1.06.95 bc --version
> > Sphinx\ [#f1]_ 1.7 sphinx-build --version
> > cpio any cpio --version
> > +GNU tar 1.28 tar --version
> > gtags (optional) 6.6.5 gtags --version
> > ====================== =============== ========================================
> >
> > @@ -175,6 +176,12 @@ You will need openssl to build kernels 3.7 and higher if module signing is
> > enabled. You will also need openssl development packages to build kernels 4.3
> > and higher.
> >
> > +Tar
> > +---
> > +
> > +GNU tar is needed if you want to enable access to the kernel headers via sysfs
> > +(CONFIG_IKHEADERS).
>
> CONFIG_IKHEADERS does also require 'xz' (cp. kernel/gen_kheaders.sh),
> should it be mentioned in changes.rst as well?
It is true, bue 'xz' is required in other situations too.
For example,
CONFIG_KERNEL_XZ
CONFIG_MODULE_COMPRESS_XZ
CONFIG_INITRAMFS_COMPRESSION_XZ
If we document the requirement for 'xz',
we need to document the requirement for
'gzip', 'zstd', 'lzma', etc. for the same reason.
So, I want to go only with 'tar' in this series.
> Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
>
>
> > +
> > gtags / GNU GLOBAL (optional)
> > -----------------------------
> >
> > --
> > 2.39.2
>
> --
> Nicolas Schier
>
> epost|xmpp: nicolas@fjasle.eu irc://oftc.net/nsc
> ↳ gpg: 18ed 52db e34f 860e e9fb c82b 7d97 0932 55a0 ce7f
> -- frykten for herren er opphav til kunnskap --
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] doc: Add tar requirement to changes.rst
2023-05-28 7:15 ` Masahiro Yamada
@ 2023-05-30 18:54 ` Nicolas Schier
0 siblings, 0 replies; 6+ messages in thread
From: Nicolas Schier @ 2023-05-30 18:54 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: linux-kbuild, linux-kernel, Jonathan Corbet, linux-doc
[-- Attachment #1: Type: text/plain, Size: 2160 bytes --]
On Sun 28 May 2023 16:15:02 GMT, Masahiro Yamada wrote:
> On Thu, May 25, 2023 at 5:13 AM Nicolas Schier <nicolas@fjasle.eu>
> wrote:
> >
> > On Sun 21 May 2023 22:23:36 GMT, Masahiro Yamada wrote:
> > > tar is used to build the kernel with CONFIG_IKHEADERS.
> > >
> > > GNU tar 1.28 or later is required.
> > >
> > > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> > > ---
> > >
> > > Documentation/process/changes.rst | 7 +++++++
> > > 1 file changed, 7 insertions(+)
> > >
> > > diff --git a/Documentation/process/changes.rst b/Documentation/process/changes.rst
> > > index a9ef00509c9b..3c0074214d75 100644
> > > --- a/Documentation/process/changes.rst
> > > +++ b/Documentation/process/changes.rst
> > > @@ -60,6 +60,7 @@ openssl & libcrypto 1.0.0 openssl version
> > > bc 1.06.95 bc --version
> > > Sphinx\ [#f1]_ 1.7 sphinx-build --version
> > > cpio any cpio --version
> > > +GNU tar 1.28 tar --version
> > > gtags (optional) 6.6.5 gtags --version
> > > ====================== =============== ========================================
> > >
> > > @@ -175,6 +176,12 @@ You will need openssl to build kernels 3.7 and higher if module signing is
> > > enabled. You will also need openssl development packages to build kernels 4.3
> > > and higher.
> > >
> > > +Tar
> > > +---
> > > +
> > > +GNU tar is needed if you want to enable access to the kernel headers via sysfs
> > > +(CONFIG_IKHEADERS).
> >
> > CONFIG_IKHEADERS does also require 'xz' (cp. kernel/gen_kheaders.sh),
> > should it be mentioned in changes.rst as well?
>
>
> It is true, bue 'xz' is required in other situations too.
>
> For example,
> CONFIG_KERNEL_XZ
> CONFIG_MODULE_COMPRESS_XZ
> CONFIG_INITRAMFS_COMPRESSION_XZ
>
>
> If we document the requirement for 'xz',
> we need to document the requirement for
> 'gzip', 'zstd', 'lzma', etc. for the same reason.
>
> So, I want to go only with 'tar' in this series.
yes, sounds reasonable.
Kind regards,
Nicolas
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-05-30 19:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-21 13:23 [PATCH 1/2] Revert "kheaders: substituting --sort in archive creation" Masahiro Yamada
2023-05-21 13:23 ` [PATCH 2/2] doc: Add tar requirement to changes.rst Masahiro Yamada
2023-05-24 20:12 ` Nicolas Schier
2023-05-28 7:15 ` Masahiro Yamada
2023-05-30 18:54 ` Nicolas Schier
2023-05-24 20:10 ` [PATCH 1/2] Revert "kheaders: substituting --sort in archive creation" Nicolas Schier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox