Repository: spack/spack

Issue:
installation issue: intel-mkl
It seems like `intel-mkl` needs the command line program `cpio` in order to build.  In a Docker image, e.g. `spack/ubuntu-bionic`, where `cpio` is not installed, I'm getting the following error:

```console
[ubuntu] ~: spack install -d intel-mkl
...
There are one or more critical unresolved issues which prevent setup from
continuing.  Fix them and run the setup program again.
--------------------------------------------------------------------------------
Missing critical prerequisite
-- 'cpio' tool could not be found
The setup program requires 'cpio' tool to complete installation. Please make
sure this tool is installed and its location is present in 'PATH' environment
variable.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
==> [2020-02-04-23:31:45.828090] WRITE LOCK: /super/absurdly/ridiculously/obnoxiously/long/path/for/relocation/.spack-db/prefix_lock[6645195540281252399:1] [Released]
==> [2020-02-04-23:31:45.828348] WRITE LOCK: /tmp/root/spack-stage/.lock[493556182836919143:1] [Released]
==> [2020-02-04-23:31:45.840027] Error: ProcessError: Command exited with status 4:
    './install.sh' '--silent' 'silent.cfg'

1 warning found in build log:
  >> 4    WARNING: Destination directory already exists.
     5    
     6    There are one or more critical unresolved issues which prevent setup 
          from
     7    continuing.  Fix them and run the setup program again.
     8    ---------------------------------------------------------------------
          -----------
     9    Missing critical prerequisite
     10   -- 'cpio' tool could not be found

See build log for details:
  /tmp/root/spack-stage/spack-stage-intel-mkl-2020.0.166-xbypirns6k2f5cow3wzxqa3aplktxpiv/spack-build-out.txt
...
```



Discussion:

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/cpio/package.py b/var/spack/repos/builtin/packages/cpio/package.py
new file mode 100644
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cpio/package.py
@@ -0,0 +1,18 @@
+# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+from spack import *
+
+
+class Cpio(AutotoolsPackage, GNUMirrorPackage):
+    """GNU cpio copies files into or out of a cpio or tar archive. The
+       archive can be another file on the disk, a magnetic tape, or a pipe.
+    """
+    homepage = "https://www.gnu.org/software/cpio/"
+    gnu_mirror_path = "cpio/cpio-2.13.tar.gz"
+
+    version('2.13', sha256='e87470d9c984317f658567c03bfefb6b0c829ff17dbf6b0de48d71a4c8f3db88')
+
+    build_directory = 'spack-build'
diff --git a/var/spack/repos/builtin/packages/intel-mkl/package.py b/var/spack/repos/builtin/packages/intel-mkl/package.py
--- a/var/spack/repos/builtin/packages/intel-mkl/package.py
+++ b/var/spack/repos/builtin/packages/intel-mkl/package.py
@@ -54,6 +54,8 @@ class IntelMkl(IntelPackage):
     version('11.3.2.181', sha256='bac04a07a1fe2ae4996a67d1439ee90c54f31305e8663d1ccfce043bed84fc27',
             url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/8711/l_mkl_11.3.2.181.tgz')
 
+    depends_on('cpio', type='build')
+
     variant('shared', default=True, description='Builds shared library')
     variant('ilp64', default=False, description='64 bit integers')
     variant(


Test patch: