The 'cpio' command is used solely for copying header files to the temporary directory. However, there is no strong reason to use 'cpio' for this purpose. For example, scripts/package/install-extmod-build uses the 'tar' command to copy files. This commit replaces the use of 'cpio' with 'tar' because 'tar' is already used in this script to generate kheaders_data.tar.xz anyway. Performance-wide, there is no significant difference between 'cpio' and 'tar'. [Before] $ rm -fr kheaders; mkdir kheaders $ time sh -c ' for f in include arch/x86/include do find "$f" -name "*.h" done | cpio --quiet -pd kheaders ' real 0m0.148s user 0m0.021s sys 0m0.140s [After] $ rm -fr kheaders; mkdir kheaders $ time sh -c ' for f in include arch/x86/include do find "$f" -name "*.h" done | tar -c -f - -T - | tar -xf - -C kheaders ' real 0m0.098s user 0m0.024s sys 0m0.131s Revert commit 69ef0920bdd3 ("Docs: Add cpio requirement to changes.rst") because 'cpio' is not used anywhere else during the kernel build. Please note that the built-in initramfs is created by the in-tree tool, usr/gen_init_cpio, so it does not rely on the external 'cpio' command at all. Remove 'cpio' from the package build dependencies as well.
Unified · Split
| @@ -59,7 +59,6 @@ iptables 1.4.2 iptables -V · 58 unmodified lines | |||
| 59 | openssl & libcrypto 1.0.0 openssl version | 59 | openssl & libcrypto 1.0.0 openssl version |
| 60 | bc 1.06.95 bc --version | 60 | bc 1.06.95 bc --version |
| 61 | Sphinx\ [#f1]_ 2.4.4 sphinx-build --version | 61 | Sphinx\ [#f1]_ 2.4.4 sphinx-build --version |
| 62 | cpio any cpio --version | ||
| 63 | GNU tar 1.28 tar --version | 62 | GNU tar 1.28 tar --version |
| 64 | gtags (optional) 6.6.5 gtags --version | 63 | gtags (optional) 6.6.5 gtags --version |
| 65 | mkimage (optional) 2017.01 mkimage --version | 64 | mkimage (optional) 2017.01 mkimage --version |
| @@ -536,11 +535,6 @@ mcelog · 470 unmodified lines | |||
| 536 | 535 | ||
| 537 | - <https://www.mcelog.org/> | 536 | - <https://www.mcelog.org/> |
| 538 | 537 | ||
| 539 | cpio | ||
| 540 | ---- | ||
| 541 | |||
| 542 | - <https://www.gnu.org/software/cpio/> | ||
| 543 | |||
| 544 | Networking | 538 | Networking |
| 545 | ********** | 539 | ********** |
| 546 | 540 | ||
| @@ -14,13 +14,6 @@ include/ · 13 unmodified lines | |||
| 14 | arch/$SRCARCH/include/ | 14 | arch/$SRCARCH/include/ |
| 15 | " | 15 | " |
| 16 | 16 | ||
| 17 | if ! command -v cpio >/dev/null; then | ||
| 18 | echo >&2 "***" | ||
| 19 | echo >&2 "*** 'cpio' could not be found." | ||
| 20 | echo >&2 "***" | ||
| 21 | exit 1 | ||
| 22 | fi | ||
| 23 | |||
| 24 | # Support incremental builds by skipping archive generation | 17 | # Support incremental builds by skipping archive generation |
| 25 | # if timestamps of files being archived are not changed. | 18 | # if timestamps of files being archived are not changed. |
| 26 | 19 | ||
| @@ -73,15 +66,13 @@ if [ "$building_out_of_srctree" ]; then · 46 unmodified lines | |||
| 73 | cd $srctree | 66 | cd $srctree |
| 74 | for f in $dir_list | 67 | for f in $dir_list |
| 75 | do find "$f" -name "*.h"; | 68 | do find "$f" -name "*.h"; |
| 76 | done | cpio --quiet -pd "${tmpdir}" | 69 | done | tar -c -f - -T - | tar -xf - -C "${tmpdir}" |
| 77 | ) | 70 | ) |
| 78 | fi | 71 | fi |
| 79 | 72 | ||
| 80 | # The second CPIO can complain if files already exist which can happen with out | ||
| 81 | # of tree builds having stale headers in srctree. Just silence CPIO for now. | ||
| 82 | for f in $dir_list; | 73 | for f in $dir_list; |
| 83 | do find "$f" -name "*.h"; | 74 | do find "$f" -name "*.h"; |
| 84 | done | cpio --quiet -pdu "${tmpdir}" >/dev/null 2>&1 | 75 | done | tar -c -f - -T - | tar -xf - -C "${tmpdir}" |
| 85 | 76 | ||
| 86 | # Always exclude include/generated/utsversion.h | 77 | # Always exclude include/generated/utsversion.h |
| 87 | # Otherwise, the contents of the tarball may vary depending on the build steps. | 78 | # Otherwise, the contents of the tarball may vary depending on the build steps. |
| @@ -22,7 +22,6 @@ license=(GPL-2.0-only) · 21 unmodified lines | |||
| 22 | makedepends=( | 22 | makedepends=( |
| 23 | bc | 23 | bc |
| 24 | bison | 24 | bison |
| 25 | cpio | ||
| 26 | flex | 25 | flex |
| 27 | gettext | 26 | gettext |
| 28 | kmod | 27 | kmod |
| @@ -205,7 +205,7 @@ Priority: optional · 204 unmodified lines | |||
| 205 | Maintainer: $maintainer | 205 | Maintainer: $maintainer |
| 206 | Rules-Requires-Root: no | 206 | Rules-Requires-Root: no |
| 207 | Build-Depends: debhelper-compat (= 12) | 207 | Build-Depends: debhelper-compat (= 12) |
| 208 | Build-Depends-Arch: bc, bison, cpio, flex, | 208 | Build-Depends-Arch: bc, bison, flex, |
| 209 | gcc-${host_gnu} <!pkg.${sourcename}.nokernelheaders>, | 209 | gcc-${host_gnu} <!pkg.${sourcename}.nokernelheaders>, |
| 210 | kmod, libelf-dev:native, | 210 | kmod, libelf-dev:native, |
| 211 | libssl-dev:native, libssl-dev <!pkg.${sourcename}.nokernelheaders>, | 211 | libssl-dev:native, libssl-dev <!pkg.${sourcename}.nokernelheaders>, |