util-linux: fix bash completion install errors. (#18696)
* Disable bash completion by default. * flake8 * Adding explicit dependence on libuuid * Adding explicit dependence on cryptsetup This way we don't pick up host crypto packages by mistake. * Fixing the completion directory. * Update var/spack/repos/builtin/packages/util-linux/package.py Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> * flake8 * Removing libuuid linkage according to @michaelkuhn on #18696 Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
This commit is contained in:
parent
0dd7f140b0
commit
b272e00d6a
@ -35,6 +35,7 @@ class Cryptsetup(AutotoolsPackage):
|
|||||||
depends_on('m4', type='build')
|
depends_on('m4', type='build')
|
||||||
|
|
||||||
depends_on('automake@:1.16.1', when='@2.2.1', type='build')
|
depends_on('automake@:1.16.1', when='@2.2.1', type='build')
|
||||||
|
depends_on('openssl')
|
||||||
|
|
||||||
# Upstream includes support for discovering the location of the libintl
|
# Upstream includes support for discovering the location of the libintl
|
||||||
# library but is missing the bit in the Makefile.ac that includes it in
|
# library but is missing the bit in the Makefile.ac that includes it in
|
||||||
@ -49,7 +50,8 @@ def url_for_version(self, version):
|
|||||||
|
|
||||||
def configure_args(self):
|
def configure_args(self):
|
||||||
args = [
|
args = [
|
||||||
'systemd_tmpfilesdir={0}/tmpfiles.d'.format(self.prefix)
|
'systemd_tmpfilesdir={0}/tmpfiles.d'.format(self.prefix),
|
||||||
|
'--with-crypto_backend=openssl',
|
||||||
]
|
]
|
||||||
return args
|
return args
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
from spack import *
|
from spack import *
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
class UtilLinux(AutotoolsPackage):
|
class UtilLinux(AutotoolsPackage):
|
||||||
@ -28,6 +29,9 @@ class UtilLinux(AutotoolsPackage):
|
|||||||
# Make it possible to disable util-linux's libuuid so that you may
|
# Make it possible to disable util-linux's libuuid so that you may
|
||||||
# reliably depend_on(`libuuid`).
|
# reliably depend_on(`libuuid`).
|
||||||
variant('libuuid', default=True, description='Build libuuid')
|
variant('libuuid', default=True, description='Build libuuid')
|
||||||
|
variant('bash', default=False, description='Install bash completion scripts')
|
||||||
|
|
||||||
|
depends_on('bash', when="+bash", type='run')
|
||||||
|
|
||||||
def url_for_version(self, version):
|
def url_for_version(self, version):
|
||||||
url = "https://www.kernel.org/pub/linux/utils/util-linux/v{0}/util-linux-{1}.tar.gz"
|
url = "https://www.kernel.org/pub/linux/utils/util-linux/v{0}/util-linux-{1}.tar.gz"
|
||||||
@ -37,9 +41,18 @@ def configure_args(self):
|
|||||||
config_args = [
|
config_args = [
|
||||||
'--disable-use-tty-group',
|
'--disable-use-tty-group',
|
||||||
'--disable-makeinstall-chown',
|
'--disable-makeinstall-chown',
|
||||||
'--without-systemd'
|
'--without-systemd',
|
||||||
]
|
]
|
||||||
|
if "+bash" in self.spec:
|
||||||
|
config_args.extend(
|
||||||
|
['--enable-bash-completion',
|
||||||
|
'--with-bashcompletiondir=' + os.path.join(
|
||||||
|
self.spec['bash'].prefix,
|
||||||
|
"share", "bash-completion", "completions")])
|
||||||
|
else:
|
||||||
|
config_args.append('--disable-bash-completion')
|
||||||
config_args.extend(self.enable_or_disable('libuuid'))
|
config_args.extend(self.enable_or_disable('libuuid'))
|
||||||
|
|
||||||
return config_args
|
return config_args
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
|
Loading…
Reference in New Issue
Block a user