Files
android_kernel_xiaomi_sm8450/patches/Revert-kheaders-make-headers-archive-reproducible.patch
Matthias Maennich b4b23f08d8 ANDROID: add latest patches to quilt series
up to 1caeb408f5 ("UPSTREAM: base: soc: Handle custom soc information sysfs entries")

Change-Id: I070748e45a9ffbdd0fdba43fe56b99db90a10b08
Signed-off-by: Matthias Maennich <maennich@google.com>
2019-10-18 16:40:14 +00:00

66 lines
2.7 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Alistair Delva <adelva@google.com>
Date: Wed, 9 Oct 2019 15:25:35 -0400
Subject: Revert "kheaders: make headers archive reproducible"
This reverts commit 86cdd2fdc4e39c388d39c7ba2396d1a9dfd66226.
Reason: Broke "make allmodconfig" on Android build machines
$ tar: unrecognized option '--sort=name'
Try 'tar --help' or 'tar --usage' for more information.
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: I3d406988f23201e5ab824ca7aed215ccc9d43279
---
Documentation/kbuild/reproducible-builds.rst | 13 ++++---------
kernel/gen_kheaders.sh | 5 +----
2 files changed, 5 insertions(+), 13 deletions(-)
diff --git a/Documentation/kbuild/reproducible-builds.rst b/Documentation/kbuild/reproducible-builds.rst
index 503393854e2e..ab92e98c89c8 100644
--- a/Documentation/kbuild/reproducible-builds.rst
+++ b/Documentation/kbuild/reproducible-builds.rst
@@ -16,21 +16,16 @@ the kernel may be unreproducible, and how to avoid them.
Timestamps
----------
-The kernel embeds timestamps in three places:
+The kernel embeds a timestamp in two places:
* The version string exposed by ``uname()`` and included in
``/proc/version``
* File timestamps in the embedded initramfs
-* If enabled via ``CONFIG_IKHEADERS``, file timestamps of kernel
- headers embedded in the kernel or respective module,
- exposed via ``/sys/kernel/kheaders.tar.xz``
-
-By default the timestamp is the current time and in the case of
-``kheaders`` the various files' modification times. This must
-be overridden using the `KBUILD_BUILD_TIMESTAMP`_ variable.
-If you are building from a git commit, you could use its commit date.
+By default the timestamp is the current time. This must be overridden
+using the `KBUILD_BUILD_TIMESTAMP`_ variable. If you are building
+from a git commit, you could use its commit date.
The kernel does *not* use the ``__DATE__`` and ``__TIME__`` macros,
and enables warnings if they are used. If you incorporate external
diff --git a/kernel/gen_kheaders.sh b/kernel/gen_kheaders.sh
index aff79e461fc9..9ff449888d9c 100755
--- a/kernel/gen_kheaders.sh
+++ b/kernel/gen_kheaders.sh
@@ -71,10 +71,7 @@ done | cpio --quiet -pd $cpio_dir >/dev/null 2>&1
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
-tar "${KBUILD_BUILD_TIMESTAMP:+--mtime=$KBUILD_BUILD_TIMESTAMP}" \
- --owner=0 --group=0 --sort=name --numeric-owner \
- -Jcf $tarfile -C $cpio_dir/ . > /dev/null
+tar -Jcf $tarfile -C $cpio_dir/ . > /dev/null
echo "$src_files_md5" > kernel/kheaders.md5
echo "$obj_files_md5" >> kernel/kheaders.md5