Skip to content

setup.py should not select install directory based on uid #389

@degremont

Description

@degremont

Trying to solve #384, I realized that config file directory path was selected based on effective uid. This is done, on purpose, to work around an issue with pip. As the comment said, it also apply to rpmbuild. This is wrong.

RPM should be build without root permissions, for a lot of reason, this is really good practices when building RPMs. mock (Fedora, EPEL, ...) does this by example.

With this kind of trick, building RPMS ends with config file being put in /usr/etc/clustershell when run by user.

$ ./setup.py bdist_rpm
...
$ rpm -qlp dist/ClusterShell-1.8-1.noarch.rpm  | grep conf
/usr/etc/clustershell/clush.conf
/usr/etc/clustershell/groups.conf
/usr/etc/clustershell/groups.conf.d/README
/usr/etc/clustershell/groups.conf.d/genders.conf.example
/usr/etc/clustershell/groups.conf.d/slurm.conf.example
/usr/etc/clustershell/topology.conf.example

I do not remember the original Pip issue. But this fix now impacts normal rpmbuild and pip with Windows (#384). We need to fix (#170) differently.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions