Link Here
|
80 |
find $cpio_dir -type f -print0 | |
80 |
find $cpio_dir -type f -print0 | |
81 |
xargs -0 -P8 -n1 perl -pi -e 'BEGIN {undef $/;}; s/\/\*((?!SPDX).)*?\*\///smg;' |
81 |
xargs -0 -P8 -n1 perl -pi -e 'BEGIN {undef $/;}; s/\/\*((?!SPDX).)*?\*\///smg;' |
82 |
|
82 |
|
|
|
83 |
# The following tar invocations use options specific to GNU tar. On some |
84 |
# systems (e.g. Gentoo), `tar` can be a different tool (e.g. bsdtar), and GNU |
85 |
# tar can be found as `gtar`. |
86 |
if [ -x "$(command -v gtar)" ]; then |
87 |
tar=gtar |
88 |
else |
89 |
tar=tar |
90 |
fi |
91 |
|
83 |
# Create archive and try to normalize metadata for reproducibility. |
92 |
# Create archive and try to normalize metadata for reproducibility. |
84 |
# For compatibility with older versions of tar, files are fed to tar |
93 |
# For compatibility with older versions of tar, files are fed to tar |
85 |
# pre-sorted, as --sort=name might not be available. |
94 |
# pre-sorted, as --sort=name might not be available. |
86 |
find $cpio_dir -printf "./%P\n" | LC_ALL=C sort | \ |
95 |
find $cpio_dir -printf "./%P\n" | LC_ALL=C sort | \ |
87 |
tar "${KBUILD_BUILD_TIMESTAMP:+--mtime=$KBUILD_BUILD_TIMESTAMP}" \ |
96 |
$tar "${KBUILD_BUILD_TIMESTAMP:+--mtime=$KBUILD_BUILD_TIMESTAMP}" \ |
88 |
--owner=0 --group=0 --numeric-owner --no-recursion \ |
97 |
--owner=0 --group=0 --numeric-owner --no-recursion \ |
89 |
-I $XZ -cf $tarfile -C $cpio_dir/ -T - > /dev/null |
98 |
-I $XZ -cf $tarfile -C $cpio_dir/ -T - > /dev/null |
90 |
|
99 |
|