summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorMichael Kuhn <michael.kuhn@ovgu.de>2022-05-16 21:01:44 +0200
committerGitHub <noreply@github.com>2022-05-16 13:01:44 -0600
commit17bc93708300785a360f8e4615d3550dcb400cd6 (patch)
tree74658cda92b80ee40d6a99e0ae57d761b087e383 /var
parentad8db0680d7f6be4a923d63db50252f7e0b264fc (diff)
downloadspack-17bc93708300785a360f8e4615d3550dcb400cd6.tar.gz
spack-17bc93708300785a360f8e4615d3550dcb400cd6.tar.bz2
spack-17bc93708300785a360f8e4615d3550dcb400cd6.tar.xz
spack-17bc93708300785a360f8e4615d3550dcb400cd6.zip
libfuse: add utils variant (#30675)
By default, libfuse install helper programs like `fusermount3`, which are mostly useless if not installed with setuid (that is, `+useroot`). However, their presence makes it complicated to use globally installed versions, which can be combined with a Spack-installed FUSE library. In particular, on systems that have a setuid fusermount3 binary, but no libfuse-dev installed, it is nice to be able to build libfuse with Spack, and have it call the system setuid executable.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/libfuse/package.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/libfuse/package.py b/var/spack/repos/builtin/packages/libfuse/package.py
index 5790b46cf8..a8242f97d2 100644
--- a/var/spack/repos/builtin/packages/libfuse/package.py
+++ b/var/spack/repos/builtin/packages/libfuse/package.py
@@ -32,11 +32,12 @@ class Libfuse(MesonPackage):
return "https://github.com/libfuse/libfuse/releases/download/fuse-{0}/fuse-{1}.tar.gz".format(version, version)
return "https://github.com/libfuse/libfuse/archive/refs/tags/fuse-{0}.tar.gz".format(version)
- variant('useroot', default=False, description="Use root privileges to make fusermount a setuid binary after installation")
- variant('system_install', default=False, description=(
+ variant('useroot', when='+utils', default=False, description="Use root privileges to make fusermount a setuid binary after installation")
+ variant('system_install', when='+utils', default=False, description=(
"Do not run the post-install script "
"which typically sets up udev rules and "
"and init script in /etc/init.d"))
+ variant('utils', default=True, description='Build and install helper and example programs.')
depends_on('autoconf', type='build', when='@:2')
depends_on('automake', type='build', when='@:2')
@@ -67,6 +68,13 @@ class Libfuse(MesonPackage):
def meson_args(self):
args = []
+ if '+utils' in self.spec:
+ args.append('-Dutils=true')
+ args.append('-Dexamples=true')
+ else:
+ args.append('-Dutils=false')
+ args.append('-Dexamples=false')
+
if '+useroot' in self.spec:
args.append('-Duseroot=true')
else: