2023-05-21 14:02:33

by Masahiro Yamada

[permalink] [raw]
Subject: [PATCH 1/2] Revert "kheaders: substituting --sort in archive creation"

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 <[email protected]>
---

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



2023-05-21 14:02:46

by Masahiro Yamada

[permalink] [raw]
Subject: [PATCH 2/2] doc: Add tar requirement to changes.rst

tar is used to build the kernel with CONFIG_IKHEADERS.

GNU tar 1.28 or later is required.

Signed-off-by: Masahiro Yamada <[email protected]>
---

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


2023-05-24 20:18:08

by Nicolas Schier

[permalink] [raw]
Subject: Re: [PATCH 2/2] doc: Add tar requirement to changes.rst

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 <[email protected]>
> ---
>
> 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 <[email protected]>


> +
> gtags / GNU GLOBAL (optional)
> -----------------------------
>
> --
> 2.39.2

--
Nicolas Schier

epost|xmpp: [email protected] irc://oftc.net/nsc
↳ gpg: 18ed 52db e34f 860e e9fb c82b 7d97 0932 55a0 ce7f
-- frykten for herren er opphav til kunnskap --


Attachments:
(No filename) (1.76 kB)
signature.asc (849.00 B)
Download all attachments

2023-05-24 20:26:11

by Nicolas Schier

[permalink] [raw]
Subject: Re: [PATCH 1/2] Revert "kheaders: substituting --sort in archive creation"

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 <[email protected]>
> ---

Reviewed-by: Nicolas Schier <[email protected]>


>
> 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: [email protected] irc://oftc.net/nsc
↳ gpg: 18ed 52db e34f 860e e9fb c82b 7d97 0932 55a0 ce7f
-- frykten for herren er opphav til kunnskap --


Attachments:
(No filename) (1.79 kB)
signature.asc (849.00 B)
Download all attachments

2023-05-28 07:30:38

by Masahiro Yamada

[permalink] [raw]
Subject: Re: [PATCH 2/2] doc: Add tar requirement to changes.rst

On Thu, May 25, 2023 at 5:13 AM Nicolas Schier <[email protected]> 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 <[email protected]>
> > ---
> >
> > 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 <[email protected]>
>
>
> > +
> > gtags / GNU GLOBAL (optional)
> > -----------------------------
> >
> > --
> > 2.39.2
>
> --
> Nicolas Schier
>
> epost|xmpp: [email protected] 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

2023-05-30 19:24:46

by Nicolas Schier

[permalink] [raw]
Subject: Re: [PATCH 2/2] doc: Add tar requirement to changes.rst

On Sun 28 May 2023 16:15:02 GMT, Masahiro Yamada wrote:
> On Thu, May 25, 2023 at 5:13 AM Nicolas Schier <[email protected]>
> 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 <[email protected]>
> > > ---
> > >
> > > 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


Attachments:
(No filename) (2.11 kB)
signature.asc (849.00 B)
Download all attachments