Skip to content
Snippets Groups Projects
Unverified Commit b272e00d authored by Robert Blake's avatar Robert Blake Committed by GitHub
Browse files

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: default avatarAdam J. Stewart <ajstewart426@gmail.com>

* flake8

* Removing libuuid linkage according to @michaelkuhn on #18696

Co-authored-by: default avatarAdam J. Stewart <ajstewart426@gmail.com>
parent 0dd7f140
Branches
Tags
No related merge requests found
......@@ -35,6 +35,7 @@ class Cryptsetup(AutotoolsPackage):
depends_on('m4', 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
# 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):
args = [
'systemd_tmpfilesdir={0}/tmpfiles.d'.format(self.prefix)
'systemd_tmpfilesdir={0}/tmpfiles.d'.format(self.prefix),
'--with-crypto_backend=openssl',
]
return args
......
......@@ -4,6 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import os
class UtilLinux(AutotoolsPackage):
......@@ -28,6 +29,9 @@ class UtilLinux(AutotoolsPackage):
# Make it possible to disable util-linux's libuuid so that you may
# reliably depend_on(`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):
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 = [
'--disable-use-tty-group',
'--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'))
return config_args
def install(self, spec, prefix):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment