cryptsetup package: dont vendor libuuid in util-linux (#12839)
Fixes #12829 This adds a variant to the util-linux package that controls whether it builds its own libuuid. Variant defaults to True. It enables other packages to choose to get libuuid from the libuuid package instead. This also changes the cryptsetup package to build util-linux with ~libuuid (so it uses an explicitly-Spack-built instance of libuuid instead).
This commit is contained in:
parent
21e4b1752e
commit
ae37896800
@ -20,7 +20,7 @@ class Cryptsetup(AutotoolsPackage):
|
|||||||
depends_on('lvm2', type=('build', 'link'))
|
depends_on('lvm2', type=('build', 'link'))
|
||||||
depends_on('popt', type=('build', 'link'))
|
depends_on('popt', type=('build', 'link'))
|
||||||
depends_on('json-c', type=('build', 'link'))
|
depends_on('json-c', type=('build', 'link'))
|
||||||
depends_on('util-linux', type=('build', 'link'))
|
depends_on('util-linux~libuuid', type=('build', 'link'))
|
||||||
depends_on('gettext', type=('build', 'link'))
|
depends_on('gettext', type=('build', 'link'))
|
||||||
|
|
||||||
depends_on('autoconf', type='build')
|
depends_on('autoconf', type='build')
|
||||||
|
@ -21,9 +21,17 @@ class UtilLinux(AutotoolsPackage):
|
|||||||
depends_on('python@2.7:')
|
depends_on('python@2.7:')
|
||||||
depends_on('pkgconfig')
|
depends_on('pkgconfig')
|
||||||
|
|
||||||
|
# Make it possible to disable util-linux's libuuid so that you may
|
||||||
|
# reliably depend_on(`libuuid`).
|
||||||
|
variant('libuuid', default=True, description='Build libuuid')
|
||||||
|
|
||||||
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"
|
||||||
return url.format(version.up_to(2), version)
|
return url.format(version.up_to(2), version)
|
||||||
|
|
||||||
def configure_args(self):
|
def configure_args(self):
|
||||||
return ['--disable-use-tty-group']
|
config_args = [
|
||||||
|
'--disable-use-tty-group',
|
||||||
|
]
|
||||||
|
config_args.extend(self.enable_or_disable('libuuid'))
|
||||||
|
return config_args
|
||||||
|
Loading…
Reference in New Issue
Block a user