Kaleb KEITHLEY has uploaded this change for review.

View Change

python: run setup.py for gpfs-epoch(.py) to fix its shebang

`setup.py build ...` modifies the shebang appropriately for the
platform, i.e. using the python (e.g. /usr/bin/python3) that setup.py
was invoked with.

This might seem like a heavyweight solution for one file, but it's
ostensibly better than some other solution like sed editing the shebang
in an rpmbuild scriptlet. This way you get (almost) the right thing in
a regular cmake/make/make-install build. Almost, because the `setup.py
install ...` step installs gpfs-epoch in /usr/bin instead of where we
infer it's wanted, in /usr/libexec, based on the install scriptlets in
the rpm .spec file.

I contemplated changing the --prefix for the `setup.py install ...` step
but then that scribbles other things in /usr/libexec or /usr/local/libexec

I also contemplated putting gpfs-epoch(.py) in its own subdir, e.g.,
.../src/scripts/gpfs-epoch/... or .../src/FSAL/FSAL_GPFS/gpfs-epoch/...
and could be convinced to do that. If I did that than I could set the
install prefix to /usr/libexec without breaking other things.

Note: All versions of SUSE that we support (i.e. that we build community
packages for in OBS) have python3 available.

Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Change-Id: Iaa328e3767597054fd0b0fac8b4c635f751bde46
---
M src/nfs-ganesha.spec-in.cmake
M src/scripts/CMakeLists.txt
M src/scripts/ganeshactl/CMakeLists.txt
R src/scripts/gpfs-epoch.py
A src/scripts/setup.py.in
5 files changed, 79 insertions(+), 2 deletions(-)

git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/72/468272/1

To view, visit change 468272. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-Change-Id: Iaa328e3767597054fd0b0fac8b4c635f751bde46
Gerrit-Change-Number: 468272
Gerrit-PatchSet: 1
Gerrit-Owner: Kaleb KEITHLEY <kaleb@redhat.com>
Gerrit-MessageType: newchange