Some software packages such as singularity (currently working on adding it) need to be installed as root in order for them to work properly.
What should be the strategy spack takes for these packages?
Something which makes sense to me is to add a boolean member variable to the package class like install_as_root. This then be inspected on install to determine whether sudo should be invoked to install the package. Of course this scheme will only work with pre-defined build systems like AutotoolsPackage for CMakePackage, and ad-hoc build systems will be left out.