Skip to content
Snippets Groups Projects
Commit 9ab2ac6c authored by Mauro S. M. Rodrigues's avatar Mauro S. M. Rodrigues Committed by Christoph Hellwig
Browse files

nvmetcli: Install nvmetcli in /usr/sbin with setup.py


According to the README, one can install nvmetcli through setup.py.
When one tries this though, the nvmetcli isn't configured in system's
$PATH.

Adding nvmetcli to scripts argument in setup call does half of the job.
Then, in order to install it in the correct location in a maintanable
way it's introduced setup.cfg file which contains 'install_scripts'
parameter for 'install' command set to /usr/sbin.

Nothing changes on the .deb package creation, the .rpm package process
in the other hand was made simpler by lines that are now done by
setup.py + setup.cfg settings.

Signed-off-by: default avatarMauro S. M. Rodrigues <maurosr@linux.vnet.ibm.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 65bf3de3
No related branches found
No related tags found
No related merge requests found
...@@ -29,8 +29,6 @@ as well as saving / restoring the configuration to / from a json file. ...@@ -29,8 +29,6 @@ as well as saving / restoring the configuration to / from a json file.
rm -rf %{buildroot} rm -rf %{buildroot}
%{__python} setup.py install --skip-build --root=%{buildroot} --prefix=usr %{__python} setup.py install --skip-build --root=%{buildroot} --prefix=usr
mkdir -p %{buildroot}%{_sysconfdir}/nvmet mkdir -p %{buildroot}%{_sysconfdir}/nvmet
mkdir -p %{buildroot}/usr/sbin
install -m 755 nvmetcli %{buildroot}/usr/sbin/nvmetcli
mkdir -p %{buildroot}%{_unitdir} mkdir -p %{buildroot}%{_unitdir}
install -m 644 nvmet.service %{buildroot}%{_unitdir}/nvmet.service install -m 644 nvmet.service %{buildroot}%{_unitdir}/nvmet.service
......
[install]
install_scripts=/usr/sbin
...@@ -27,4 +27,5 @@ setup( ...@@ -27,4 +27,5 @@ setup(
maintainer_email = 'hch@lst.de', maintainer_email = 'hch@lst.de',
test_suite='nose2.collector.collector', test_suite='nose2.collector.collector',
packages = ['nvmet'], packages = ['nvmet'],
scripts=['nvmetcli']
) )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment