From 8d70f94aaedd4162ae3878e53de65aaea548f1ac Mon Sep 17 00:00:00 2001 From: bernhardkaindl <43588962+bernhardkaindl@users.noreply.github.com> Date: Sat, 25 Sep 2021 00:32:09 +0200 Subject: cgdcbxd: Fix build: Use DESTDIR=self.prefix to not write to /etc (#26145) Fix the build for normal non-root/non-system-user builds, as we cannot know that we'd have to uninstall these files even if installed as root. Also add `pkgconfig` and remove not explicitly needed `depends_on('m4')` --- var/spack/repos/builtin/packages/cgdcbxd/package.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/cgdcbxd/package.py b/var/spack/repos/builtin/packages/cgdcbxd/package.py index 3faad1b494..0d1b613849 100644 --- a/var/spack/repos/builtin/packages/cgdcbxd/package.py +++ b/var/spack/repos/builtin/packages/cgdcbxd/package.py @@ -20,10 +20,17 @@ class Cgdcbxd(AutotoolsPackage): depends_on('autoconf', type='build') depends_on('automake', type='build') depends_on('libtool', type='build') - depends_on('m4', type='build') + depends_on('pkgconfig', type='build') depends_on('libcgroup@0.32:') depends_on('libmnl') def autoreconf(self, spec, prefix): bash = which('bash') bash('./bootstrap.sh') + + @property + def install_targets(self): + # Without DESTDIR=self.prefix, an attempt would be made to install + # configuration files to /etc, which would faild the build and even + # when privileges for this exist, spack could not remove it on uninstall: + return ['install', 'DESTDIR={0}'.format(self.prefix)] -- cgit v1.2.3-60-g2f50