prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Automake version mismatch in cryptsetup
  ### Spack version
  Pulled e1238bae9053d3c283c1721f85af78f3539f473d (2020-03-27) without any additional configuration. 
  ```console
  $ spack --version
  fatal: No names found, cannot describe anything.
  0.14.1
  ```
  
  ### Steps to reproduce the issue
  
  ```console
  $ spack install cryptsetup
  ...
       219    ==> 32048: cryptsetup: Executing phase: 'build'
       220    ==> [2020-03-27-11:07:25.493154, 7479] 'make' '-j2'
       221     cd . && /bin/bash /tmp/ubuntu/spack-stage/spack-stage-cryptsetup-2.2.1-rsdkky2pjkptxrmbuckroajv
              tcz4qkl5/spack-src/missing automake-1.16 --gnu Makefile
    >> 222    configure.ac:19: error: version mismatch.  This is Automake 1.16.2,
       223    configure.ac:19: but the definition used by this AM_INIT_AUTOMAKE
       224    configure.ac:19: comes from Automake 1.16.1.  You should recreate
       225    configure.ac:19: aclocal.m4 with aclocal and run automake again.
  ...
  ```
  
  ### Platform and user environment
  ```commandline
  $ uname -a 
  Linux roman-spack-debug 4.15.0-91-generic #92-Ubuntu SMP Fri Feb 28 11:09:48 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  $ lsb_release -d
  Description:    Ubuntu 18.04.4 LTS
  ``` 
  
  I do not have any experience with automake/autoconf. However, the [documentation](https://spack.readthedocs.io/en/latest/build_systems/autotoolspackage.html) states that the `autoreconf` phase includes running `aclocal`. The debug file shows that `autoreconf` did run but `aclocal.m4` is not updated (its timestamp is 2019-09-06). I cannot tell whether it is a bug in `autoreconf` phase or `aclocal` only runs when `aclocal.m4` is not present. If I add `force_autoreconf = True` to the recipe, `aclocal.m4` is updated and installation is successful.
  
  If the `force_autoreconf` setting is indeed required, I can create a pull request to fix the issue.
  
  ### General information
  
  - [x] I have run `spack --version` and reported the version of Spack
  - [x] I have searched the issues of this repo and believe this is not a duplicate
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `var/spack/repos/builtin/packages/cryptsetup/package.py`
  Content:
  ```
  1 # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
  2 # Spack Project Developers. See the top-level COPYRIGHT file for details.
  3 #
  4 # SPDX-License-Identifier: (Apache-2.0 OR MIT)
  5 
  6 from spack import *
  7 
  8 
  9 class Cryptsetup(AutotoolsPackage):
  10     """Cryptsetup and LUKS - open-source disk encryption."""
  11 
  12     homepage = "https://gitlab.com/cryptsetup/cryptsetup"
  13     url      = "https://www.kernel.org/pub/linux/utils/cryptsetup/v2.2/cryptsetup-2.2.1.tar.xz"
  14     list_url = "https://www.kernel.org/pub/linux/utils/cryptsetup/"
  15     list_depth = 1
  16 
  17     # If you're adding newer versions, check whether the patch below
  18     # still needs to be applied.
  19     version('2.3.1', sha256='92aba4d559a2cf7043faed92e0f22c5addea36bd63f8c039ba5a8f3a159fe7d2')
  20     version('2.2.3', sha256='2af0ec9551ab9c870074cae9d3f68d82cab004f4095fa89db0e4413713424a46')
  21     version('2.2.2', sha256='2af0ec9551ab9c870074cae9d3f68d82cab004f4095fa89db0e4413713424a46')
  22     version('2.2.1', sha256='94e79a31ed38bdb0acd9af7ccca1605a2ac62ca850ed640202876b1ee11c1c61')
  23 
  24     depends_on('libuuid', type=('build', 'link'))
  25     depends_on('lvm2', type=('build', 'link'))
  26     depends_on('popt', type=('build', 'link'))
  27     depends_on('json-c', type=('build', 'link'))
  28     depends_on('util-linux~libuuid', type=('build', 'link'))
  29     depends_on('gettext', type=('build', 'link'))
  30 
  31     depends_on('pkgconfig', type='build')
  32     depends_on('autoconf', type='build')
  33     depends_on('automake', type='build')
  34     depends_on('libtool',  type='build')
  35     depends_on('m4',       type='build')
  36 
  37     # Upstream includes support for discovering the location of the libintl
  38     # library but is missing the bit in the Makefile.ac that includes it in
  39     # the LDFLAGS. See https://gitlab.com/cryptsetup/cryptsetup/issues/479
  40     # This *should* be unnecessary starting with release 2.2.2, see
  41     # https://gitlab.com/cryptsetup/cryptsetup/issues/479#note_227617031
  42     patch('autotools-libintl.patch', when='@:2.2.1')
  43 
  44     def url_for_version(self, version):
  45         url = "https://www.kernel.org/pub/linux/utils/cryptsetup/v{0}/cryptsetup-{1}.tar.xz"
  46         return url.format(version.up_to(2), version)
  47 
  48     def configure_args(self):
  49         args = [
  50             'systemd_tmpfilesdir={0}/tmpfiles.d'.format(self.prefix)
  51         ]
  52         return args
  53 
  54     def setup_dependent_build_environment(self, env, dependent_spec):
  55         """Prepend the sbin directory to PATH."""
  56         env.prepend_path('PATH', self.prefix.sbin)
  57 
  58     def setup_dependent_run_environment(self, env, dependent_spec):
  59         """Prepend the sbin directory to PATH."""
  60         env.prepend_path('PATH', self.prefix.sbin)
  61
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/var/spack/repos/builtin/packages/cryptsetup/package.py b/var/spack/repos/builtin/packages/cryptsetup/package.py
  --- a/var/spack/repos/builtin/packages/cryptsetup/package.py
  +++ b/var/spack/repos/builtin/packages/cryptsetup/package.py
  @@ -34,6 +34,8 @@
       depends_on('libtool',  type='build')
       depends_on('m4',       type='build')
   
  +    depends_on('automake@:1.16.1', when='@2.2.1', type='build')
  +
       # Upstream includes support for discovering the location of the libintl
       # library but is missing the bit in the Makefile.ac that includes it in
       # the LDFLAGS. See https://gitlab.com/cryptsetup/cryptsetup/issues/479
  
verification_info: {"golden_diff": "diff --git a/var/spack/repos/builtin/packages/cryptsetup/package.py b/var/spack/repos/builtin/packages/cryptsetup/package.py\n--- a/var/spack/repos/builtin/packages/cryptsetup/package.py\n+++ b/var/spack/repos/builtin/packages/cryptsetup/package.py\n@@ -34,6 +34,8 @@\n     depends_on('libtool',  type='build')\n     depends_on('m4',       type='build')\n \n+    depends_on('automake@:1.16.1', when='@2.2.1', type='build')\n+\n     # Upstream includes support for discovering the location of the libintl\n     # library but is missing the bit in the Makefile.ac that includes it in\n     # the LDFLAGS. See https://gitlab.com/cryptsetup/cryptsetup/issues/479\n", "issue": "Automake version mismatch in cryptsetup\n### Spack version\r\nPulled e1238bae9053d3c283c1721f85af78f3539f473d (2020-03-27) without any additional configuration. \r\n```console\r\n$ spack --version\r\nfatal: No names found, cannot describe anything.\r\n0.14.1\r\n```\r\n\r\n### Steps to reproduce the issue\r\n\r\n```console\r\n$ spack install cryptsetup\r\n...\r\n     219    ==> 32048: cryptsetup: Executing phase: 'build'\r\n     220    ==> [2020-03-27-11:07:25.493154, 7479] 'make' '-j2'\r\n     221     cd . && /bin/bash /tmp/ubuntu/spack-stage/spack-stage-cryptsetup-2.2.1-rsdkky2pjkptxrmbuckroajv\r\n            tcz4qkl5/spack-src/missing automake-1.16 --gnu Makefile\r\n  >> 222    configure.ac:19: error: version mismatch.  This is Automake 1.16.2,\r\n     223    configure.ac:19: but the definition used by this AM_INIT_AUTOMAKE\r\n     224    configure.ac:19: comes from Automake 1.16.1.  You should recreate\r\n     225    configure.ac:19: aclocal.m4 with aclocal and run automake again.\r\n...\r\n```\r\n\r\n### Platform and user environment\r\n```commandline\r\n$ uname -a \r\nLinux roman-spack-debug 4.15.0-91-generic #92-Ubuntu SMP Fri Feb 28 11:09:48 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux\r\n$ lsb_release -d\r\nDescription:    Ubuntu 18.04.4 LTS\r\n``` \r\n\r\nI do not have any experience with automake/autoconf. However, the [documentation](https://spack.readthedocs.io/en/latest/build_systems/autotoolspackage.html) states that the `autoreconf` phase includes running `aclocal`. The debug file shows that `autoreconf` did run but `aclocal.m4` is not updated (its timestamp is 2019-09-06). I cannot tell whether it is a bug in `autoreconf` phase or `aclocal` only runs when `aclocal.m4` is not present. If I add `force_autoreconf = True` to the recipe, `aclocal.m4` is updated and installation is successful.\r\n\r\nIf the `force_autoreconf` setting is indeed required, I can create a pull request to fix the issue.\r\n\r\n### General information\r\n\r\n- [x] I have run `spack --version` and reported the version of Spack\r\n- [x] I have searched the issues of this repo and believe this is not a duplicate\r\n\n", "before_files": [{"content": "# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nfrom spack import *\n\n\nclass Cryptsetup(AutotoolsPackage):\n    \"\"\"Cryptsetup and LUKS - open-source disk encryption.\"\"\"\n\n    homepage = \"https://gitlab.com/cryptsetup/cryptsetup\"\n    url      = \"https://www.kernel.org/pub/linux/utils/cryptsetup/v2.2/cryptsetup-2.2.1.tar.xz\"\n    list_url = \"https://www.kernel.org/pub/linux/utils/cryptsetup/\"\n    list_depth = 1\n\n    # If you're adding newer versions, check whether the patch below\n    # still needs to be applied.\n    version('2.3.1', sha256='92aba4d559a2cf7043faed92e0f22c5addea36bd63f8c039ba5a8f3a159fe7d2')\n    version('2.2.3', sha256='2af0ec9551ab9c870074cae9d3f68d82cab004f4095fa89db0e4413713424a46')\n    version('2.2.2', sha256='2af0ec9551ab9c870074cae9d3f68d82cab004f4095fa89db0e4413713424a46')\n    version('2.2.1', sha256='94e79a31ed38bdb0acd9af7ccca1605a2ac62ca850ed640202876b1ee11c1c61')\n\n    depends_on('libuuid', type=('build', 'link'))\n    depends_on('lvm2', type=('build', 'link'))\n    depends_on('popt', type=('build', 'link'))\n    depends_on('json-c', type=('build', 'link'))\n    depends_on('util-linux~libuuid', type=('build', 'link'))\n    depends_on('gettext', type=('build', 'link'))\n\n    depends_on('pkgconfig', type='build')\n    depends_on('autoconf', type='build')\n    depends_on('automake', type='build')\n    depends_on('libtool',  type='build')\n    depends_on('m4',       type='build')\n\n    # Upstream includes support for discovering the location of the libintl\n    # library but is missing the bit in the Makefile.ac that includes it in\n    # the LDFLAGS. See https://gitlab.com/cryptsetup/cryptsetup/issues/479\n    # This *should* be unnecessary starting with release 2.2.2, see\n    # https://gitlab.com/cryptsetup/cryptsetup/issues/479#note_227617031\n    patch('autotools-libintl.patch', when='@:2.2.1')\n\n    def url_for_version(self, version):\n        url = \"https://www.kernel.org/pub/linux/utils/cryptsetup/v{0}/cryptsetup-{1}.tar.xz\"\n        return url.format(version.up_to(2), version)\n\n    def configure_args(self):\n        args = [\n            'systemd_tmpfilesdir={0}/tmpfiles.d'.format(self.prefix)\n        ]\n        return args\n\n    def setup_dependent_build_environment(self, env, dependent_spec):\n        \"\"\"Prepend the sbin directory to PATH.\"\"\"\n        env.prepend_path('PATH', self.prefix.sbin)\n\n    def setup_dependent_run_environment(self, env, dependent_spec):\n        \"\"\"Prepend the sbin directory to PATH.\"\"\"\n        env.prepend_path('PATH', self.prefix.sbin)\n", "path": "var/spack/repos/builtin/packages/cryptsetup/package.py"}], "after_files": [{"content": "# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nfrom spack import *\n\n\nclass Cryptsetup(AutotoolsPackage):\n    \"\"\"Cryptsetup and LUKS - open-source disk encryption.\"\"\"\n\n    homepage = \"https://gitlab.com/cryptsetup/cryptsetup\"\n    url      = \"https://www.kernel.org/pub/linux/utils/cryptsetup/v2.2/cryptsetup-2.2.1.tar.xz\"\n    list_url = \"https://www.kernel.org/pub/linux/utils/cryptsetup/\"\n    list_depth = 1\n\n    # If you're adding newer versions, check whether the patch below\n    # still needs to be applied.\n    version('2.3.1', sha256='92aba4d559a2cf7043faed92e0f22c5addea36bd63f8c039ba5a8f3a159fe7d2')\n    version('2.2.3', sha256='2af0ec9551ab9c870074cae9d3f68d82cab004f4095fa89db0e4413713424a46')\n    version('2.2.2', sha256='2af0ec9551ab9c870074cae9d3f68d82cab004f4095fa89db0e4413713424a46')\n    version('2.2.1', sha256='94e79a31ed38bdb0acd9af7ccca1605a2ac62ca850ed640202876b1ee11c1c61')\n\n    depends_on('libuuid', type=('build', 'link'))\n    depends_on('lvm2', type=('build', 'link'))\n    depends_on('popt', type=('build', 'link'))\n    depends_on('json-c', type=('build', 'link'))\n    depends_on('util-linux~libuuid', type=('build', 'link'))\n    depends_on('gettext', type=('build', 'link'))\n\n    depends_on('pkgconfig', type='build')\n    depends_on('autoconf', type='build')\n    depends_on('automake', type='build')\n    depends_on('libtool',  type='build')\n    depends_on('m4',       type='build')\n\n    depends_on('automake@:1.16.1', when='@2.2.1', type='build')\n\n    # Upstream includes support for discovering the location of the libintl\n    # library but is missing the bit in the Makefile.ac that includes it in\n    # the LDFLAGS. See https://gitlab.com/cryptsetup/cryptsetup/issues/479\n    # This *should* be unnecessary starting with release 2.2.2, see\n    # https://gitlab.com/cryptsetup/cryptsetup/issues/479#note_227617031\n    patch('autotools-libintl.patch', when='@:2.2.1')\n\n    def url_for_version(self, version):\n        url = \"https://www.kernel.org/pub/linux/utils/cryptsetup/v{0}/cryptsetup-{1}.tar.xz\"\n        return url.format(version.up_to(2), version)\n\n    def configure_args(self):\n        args = [\n            'systemd_tmpfilesdir={0}/tmpfiles.d'.format(self.prefix)\n        ]\n        return args\n\n    def setup_dependent_build_environment(self, env, dependent_spec):\n        \"\"\"Prepend the sbin directory to PATH.\"\"\"\n        env.prepend_path('PATH', self.prefix.sbin)\n\n    def setup_dependent_run_environment(self, env, dependent_spec):\n        \"\"\"Prepend the sbin directory to PATH.\"\"\"\n        env.prepend_path('PATH', self.prefix.sbin)\n", "path": "var/spack/repos/builtin/packages/cryptsetup/package.py"}]}