2015-04-09 09:42:34 +02:00
|
|
|
#
|
|
|
|
# spec file for package libstoragemgmt
|
|
|
|
#
|
2020-05-22 11:00:58 +02:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2015-04-09 09:42:34 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2019-12-16 12:59:00 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2015-04-09 09:42:34 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%define libname %{name}1
|
2017-03-24 12:20:44 +01:00
|
|
|
%bcond_with test
|
2017-12-19 09:03:24 +01:00
|
|
|
%if 0%{?suse_version} >= 1500 || %{with python3}
|
|
|
|
%define python3 1
|
|
|
|
%define python_sitelib %{python3_sitelib}
|
|
|
|
%else
|
|
|
|
%define python3 0
|
|
|
|
%endif
|
2015-04-09 09:42:34 +02:00
|
|
|
Name: libstoragemgmt
|
2020-12-04 10:09:15 +01:00
|
|
|
Version: 1.8.7
|
2015-04-09 09:42:34 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Storage array management library
|
2018-11-02 15:20:28 +01:00
|
|
|
License: LGPL-2.1-or-later AND GPL-2.0-or-later
|
|
|
|
Group: Development/Libraries/C and C++
|
2020-05-22 11:00:58 +02:00
|
|
|
URL: https://github.com/libstorage/libstoragemgmt
|
2015-06-18 10:33:54 +02:00
|
|
|
Source0: https://github.com/libstorage/libstoragemgmt/releases/download/%{version}/%{name}-%{version}.tar.gz
|
2015-04-09 09:42:34 +02:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: gcc-c++
|
2015-06-18 10:33:54 +02:00
|
|
|
BuildRequires: libconfig-devel
|
2018-10-26 09:45:11 +02:00
|
|
|
BuildRequires: libtool
|
2016-05-13 23:15:34 +02:00
|
|
|
BuildRequires: pkgconfig
|
2018-10-26 09:45:11 +02:00
|
|
|
BuildRequires: pkgconfig(glib-2.0)
|
|
|
|
BuildRequires: pkgconfig(libudev)
|
|
|
|
BuildRequires: pkgconfig(libxml-2.0)
|
|
|
|
BuildRequires: pkgconfig(openssl)
|
|
|
|
BuildRequires: pkgconfig(sqlite3)
|
|
|
|
BuildRequires: pkgconfig(systemd)
|
|
|
|
BuildRequires: pkgconfig(udev)
|
|
|
|
%systemd_requires
|
2017-12-19 09:03:24 +01:00
|
|
|
%if 0%{python3}
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
BuildRequires: python3-pywbem
|
|
|
|
BuildRequires: python3-six
|
|
|
|
Requires: python3-six
|
|
|
|
%else
|
2015-04-09 09:42:34 +02:00
|
|
|
BuildRequires: python-devel
|
|
|
|
BuildRequires: python-pywbem
|
2017-04-24 14:27:06 +02:00
|
|
|
BuildRequires: python-six
|
2017-12-19 09:03:24 +01:00
|
|
|
Requires: python-six
|
|
|
|
%endif
|
|
|
|
%if 0%{python3}
|
|
|
|
Requires: python3-%{name}
|
|
|
|
%else
|
|
|
|
Requires: python2-%{name}
|
|
|
|
%endif
|
2017-03-24 12:20:44 +01:00
|
|
|
%if %{with test}
|
|
|
|
BuildRequires: chrpath
|
|
|
|
BuildRequires: libtool
|
|
|
|
BuildRequires: perl
|
|
|
|
BuildRequires: procps
|
|
|
|
BuildRequires: valgrind
|
|
|
|
BuildRequires: pkgconfig(check)
|
|
|
|
%endif
|
2015-04-09 09:42:34 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
The libStorageMgmt library will provide a vendor agnostic open source storage
|
|
|
|
application programming interface (API) that will allow management of storage
|
|
|
|
arrays. The library includes a command line interface for interactive use and
|
|
|
|
scripting (command lsmcli). The library also has a daemon that is used for
|
|
|
|
executing plug-ins in a separate process (lsmd).
|
|
|
|
|
|
|
|
%package -n %{libname}
|
|
|
|
Summary: Storage array management library
|
2017-02-02 10:54:01 +01:00
|
|
|
Group: System/Libraries
|
2015-04-09 09:42:34 +02:00
|
|
|
|
|
|
|
%description -n %{libname}
|
|
|
|
The libStorageMgmt library will provide a vendor agnostic open source storage
|
|
|
|
application programming interface (API) that will allow management of storage
|
|
|
|
arrays. The library includes a command line interface for interactive use and
|
|
|
|
scripting (command lsmcli). The library also has a daemon that is used for
|
|
|
|
executing plug-ins in a separate process (lsmd).
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Development files for %{name}
|
2017-02-02 10:54:01 +01:00
|
|
|
Group: Development/Libraries/C and C++
|
2015-04-09 09:42:34 +02:00
|
|
|
Requires: %{libname} = %{version}
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
The %{name}-devel package contains libraries and header files for
|
|
|
|
developing applications that use %{name}.
|
|
|
|
|
2017-12-19 09:03:24 +01:00
|
|
|
%if 0%{python3}
|
|
|
|
%package -n python3-%{name}
|
|
|
|
%else
|
|
|
|
%package -n python2-%{name}
|
|
|
|
%endif
|
2018-10-26 09:45:11 +02:00
|
|
|
|
|
|
|
%{?python_provide:%python_provide python3-%{name}}
|
2015-04-09 09:42:34 +02:00
|
|
|
Summary: Python client libraries and plug-in support for %{name}
|
2018-11-02 15:20:28 +01:00
|
|
|
Group: Development/Languages/Python
|
2015-04-09 09:42:34 +02:00
|
|
|
BuildArch: noarch
|
2020-09-15 09:00:48 +02:00
|
|
|
Requires: %{name} = %{version}
|
2017-12-19 09:03:24 +01:00
|
|
|
%if 0%{python3}
|
2020-09-15 09:00:48 +02:00
|
|
|
Requires: python3-%{name}-clibs
|
|
|
|
|
2017-12-19 09:03:24 +01:00
|
|
|
%description -n python3-%{name}
|
|
|
|
%else
|
2020-09-15 09:00:48 +02:00
|
|
|
Requires: python2-%{name}-clibs
|
|
|
|
|
2017-12-19 09:03:24 +01:00
|
|
|
%description -n python2-%{name}
|
|
|
|
%endif
|
2016-05-13 22:37:32 +02:00
|
|
|
The python-%{name} package contains python client libraries as
|
2015-04-09 09:42:34 +02:00
|
|
|
well as python framework support and open source plug-ins written in python.
|
|
|
|
|
2017-12-19 09:03:24 +01:00
|
|
|
%if 0%{python3}
|
|
|
|
%package -n python3-%{name}-clibs
|
|
|
|
%else
|
|
|
|
%package -n python2-%{name}-clibs
|
|
|
|
%endif
|
2018-10-26 09:45:11 +02:00
|
|
|
|
|
|
|
%{?python_provide:%python_provide python3-%{name}-clibs}
|
2016-05-13 23:15:34 +02:00
|
|
|
Summary: Python C extension for %{name}
|
2018-11-02 15:20:28 +01:00
|
|
|
Group: Development/Languages/Python
|
2018-10-26 09:45:11 +02:00
|
|
|
Requires: %{name} = %{version}-%{release}
|
2017-12-19 09:03:24 +01:00
|
|
|
%if 0%{python3}
|
|
|
|
%description -n python3-%{name}-clibs
|
|
|
|
%else
|
|
|
|
%description -n python2-%{name}-clibs
|
|
|
|
%endif
|
2016-05-13 22:37:32 +02:00
|
|
|
The python-%{name}-clibs package contains python C extentions for %{name}.
|
|
|
|
|
2015-04-09 09:42:34 +02:00
|
|
|
%package smis-plugin
|
|
|
|
Summary: Files for SMI-S generic array support for %{name}
|
2018-11-02 15:20:28 +01:00
|
|
|
Group: Development/Languages/Python
|
2018-10-26 09:45:11 +02:00
|
|
|
Requires: python3-%{name} = %{version}
|
|
|
|
Requires(post): python3-%{name} = %{version}
|
|
|
|
Requires(postun): python3-%{name} = %{version}
|
|
|
|
BuildArch: noarch
|
2017-12-19 09:03:24 +01:00
|
|
|
%if 0%{python3}
|
|
|
|
Requires: python3-pywbem
|
|
|
|
%else
|
2017-03-24 12:20:44 +01:00
|
|
|
Requires: python-pywbem
|
2017-12-19 09:03:24 +01:00
|
|
|
%endif
|
2015-04-09 09:42:34 +02:00
|
|
|
|
|
|
|
%description smis-plugin
|
2018-11-02 15:20:28 +01:00
|
|
|
The %{name}-smis-plugin package contains plug-in for generic
|
|
|
|
Storage Management Initiative Specification (SMI-S) array support.
|
2015-04-09 09:42:34 +02:00
|
|
|
|
|
|
|
%package netapp-plugin
|
|
|
|
Summary: Files for NetApp array support for %{name}
|
2018-11-02 15:20:28 +01:00
|
|
|
Group: Development/Languages/Python
|
2018-10-26 09:45:11 +02:00
|
|
|
Requires: python3-%{name} = %{version}
|
|
|
|
Requires(post): python3-%{name} = %{version}
|
|
|
|
Requires(postun): python3-%{name} = %{version}
|
2015-04-09 09:42:34 +02:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description netapp-plugin
|
|
|
|
The %{name}-netapp-plugin package contains plug-in for NetApp array
|
|
|
|
support.
|
|
|
|
|
|
|
|
%package targetd-plugin
|
|
|
|
Summary: Files for targetd array support for %{name}
|
2018-11-02 15:20:28 +01:00
|
|
|
Group: Development/Languages/Python
|
2018-10-26 09:45:11 +02:00
|
|
|
Requires: python3-%{name} = %{version}
|
|
|
|
Requires(post): python3-%{name} = %{version}
|
|
|
|
Requires(postun): python3-%{name} = %{version}
|
2015-04-09 09:42:34 +02:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description targetd-plugin
|
|
|
|
The %{name}-targetd-plugin package contains plug-in for targetd
|
|
|
|
array support.
|
|
|
|
|
|
|
|
%package nstor-plugin
|
|
|
|
Summary: Files for NexentaStor array support for %{name}
|
2018-11-02 15:20:28 +01:00
|
|
|
Group: Development/Languages/Python
|
2018-10-26 09:45:11 +02:00
|
|
|
Requires: python3-%{name} = %{version}
|
|
|
|
Requires(post): python3-%{name} = %{version}
|
|
|
|
Requires(postun): python3-%{name} = %{version}
|
2015-04-09 09:42:34 +02:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description nstor-plugin
|
|
|
|
The %{name}-nstor-plugin package contains plug-in for NexentaStor
|
|
|
|
array support.
|
|
|
|
|
2015-06-18 10:33:54 +02:00
|
|
|
%package udev
|
|
|
|
Summary: Udev files for %{name}
|
2017-02-02 10:54:01 +01:00
|
|
|
Group: System/Base
|
2015-06-18 10:33:54 +02:00
|
|
|
|
|
|
|
%description udev
|
|
|
|
The %{name}-udev package contains udev rules and helper utilities for
|
|
|
|
uevents generated by the kernel.
|
|
|
|
|
|
|
|
%package megaraid-plugin
|
|
|
|
Summary: Files for LSI MegaRAID support for %{name}
|
2018-11-02 15:20:28 +01:00
|
|
|
Group: Development/Languages/Python
|
2018-10-26 09:45:11 +02:00
|
|
|
Requires: python3-%{name} = %{version}
|
|
|
|
Requires(post): python3-%{name} = %{version}
|
|
|
|
Requires(postun): python3-%{name} = %{version}
|
2015-06-18 10:33:54 +02:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description megaraid-plugin
|
|
|
|
The %{name}-megaraid-plugin package contains the plugin for LSI MegaRAID
|
|
|
|
storage management via storcli.
|
|
|
|
|
|
|
|
%package hpsa-plugin
|
|
|
|
Summary: Files for HP SmartArray support for %{name}
|
2018-11-02 15:20:28 +01:00
|
|
|
Group: Development/Languages/Python
|
2018-10-26 09:45:11 +02:00
|
|
|
Requires: python3-%{name} = %{version}
|
|
|
|
Requires(post): python3-%{name} = %{version}
|
|
|
|
Requires(postun): python3-%{name} = %{version}
|
2015-06-18 10:33:54 +02:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description hpsa-plugin
|
|
|
|
The %{name}-hpsa-plugin package contains the plugin for HP SmartArray storage
|
|
|
|
management via hpssacli.
|
2015-04-09 09:42:34 +02:00
|
|
|
|
2017-10-26 11:27:01 +02:00
|
|
|
%package nfs-plugin
|
|
|
|
Summary: Files for nfs support for %{name}
|
2018-11-02 15:20:28 +01:00
|
|
|
Group: Development/Languages/Python
|
2018-10-26 09:45:11 +02:00
|
|
|
Requires: %{name}-nfs-plugin-clibs = %{version}
|
|
|
|
Requires: python3-%{name} = %{version}
|
|
|
|
Requires(post): python3-%{name} = %{version}
|
|
|
|
Requires(postun): python3-%{name} = %{version}
|
2017-10-26 11:27:01 +02:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description nfs-plugin
|
|
|
|
The %{name}-nfs-plugin package contains the plugin for nfs based storage.
|
|
|
|
|
2018-10-26 09:45:11 +02:00
|
|
|
%package nfs-plugin-clibs
|
|
|
|
Summary: Python C extension module for %{name} NFS plugin
|
2018-11-02 15:20:28 +01:00
|
|
|
Group: Development/Languages/Python
|
2018-10-26 09:45:11 +02:00
|
|
|
Requires: %{name} = %{version}
|
|
|
|
|
|
|
|
%description nfs-plugin-clibs
|
|
|
|
The %{name}-nfs-plugin-clibs package contains python C extension for %{name}
|
|
|
|
NFS plugin.
|
|
|
|
|
2017-10-26 11:27:01 +02:00
|
|
|
%package local-plugin
|
|
|
|
Summary: Files for HP local pseudo support for %{name}
|
2018-11-02 15:20:28 +01:00
|
|
|
Group: Development/Languages/Python
|
2018-10-26 09:45:11 +02:00
|
|
|
Requires: python3-%{name} = %{version}
|
|
|
|
Requires(post): python3-%{name} = %{version}
|
|
|
|
Requires(postun): python3-%{name} = %{version}
|
2017-10-26 11:27:01 +02:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description local-plugin
|
|
|
|
The %{name}-local-plugin package contains the plugin for local pseudo
|
|
|
|
storage.
|
|
|
|
|
|
|
|
%package arcconf-plugin
|
|
|
|
Summary: Files for Microsemi storage support for %{name}
|
2018-11-02 15:20:28 +01:00
|
|
|
Group: Development/Languages/Python
|
2018-10-26 09:45:11 +02:00
|
|
|
Requires: python3-%{name} = %{version}
|
|
|
|
Requires(post): python3-%{name} = %{version}
|
|
|
|
Requires(postun): python3-%{name} = %{version}
|
2017-10-26 11:27:01 +02:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description arcconf-plugin
|
|
|
|
The %{name}-arcconf-plugin package contains the plugin for Microsemi
|
|
|
|
storage.
|
|
|
|
|
2015-04-09 09:42:34 +02:00
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%build
|
2018-05-03 20:42:06 +02:00
|
|
|
# Needed for patch0
|
|
|
|
autoreconf -fiv
|
2015-04-09 09:42:34 +02:00
|
|
|
%configure \
|
2017-10-26 11:27:01 +02:00
|
|
|
--disable-static \
|
2018-10-26 09:45:11 +02:00
|
|
|
--with-bash-completion-dir=%{_datadir}/bash-completion/completions/ \
|
2017-12-19 09:03:24 +01:00
|
|
|
%if 0%{python3}
|
|
|
|
--with-python3 \
|
|
|
|
%endif
|
2016-05-19 05:24:25 +02:00
|
|
|
%if ! %{with test}
|
2017-10-26 11:27:01 +02:00
|
|
|
--without-test
|
2016-05-19 05:24:25 +02:00
|
|
|
%endif
|
2018-10-26 09:45:11 +02:00
|
|
|
|
|
|
|
#Fix rpmlint Error: env-script-interpreter
|
|
|
|
#Should change it after configure
|
|
|
|
pyfiles=(plugin/megaraid/megaraid_lsmplugin \
|
|
|
|
plugin/hpsa/hpsa_lsmplugin \
|
|
|
|
plugin/targetd/targetd_lsmplugin \
|
|
|
|
plugin/sim/sim_lsmplugin \
|
|
|
|
plugin/local/local_lsmplugin \
|
|
|
|
plugin/nstor/nstor_lsmplugin \
|
|
|
|
plugin/arcconf/arcconf_lsmplugin \
|
|
|
|
plugin/smispy/smispy_lsmplugin \
|
|
|
|
plugin/ontap/ontap_lsmplugin \
|
|
|
|
plugin/nfs/nfs_lsmplugin \
|
|
|
|
tools/lsmcli/lsmcli \
|
|
|
|
test/cmdtest.py \
|
|
|
|
test/plugin_test.py \
|
|
|
|
)
|
|
|
|
|
|
|
|
head -vn 1 ${pyfiles[@]}
|
|
|
|
sed -i '/^#!\/usr\/bin/s|env python|python|' ${pyfiles[@]}
|
|
|
|
head -vn 1 ${pyfiles[@]}
|
|
|
|
|
|
|
|
#Fix rpmlint Warning: non-executable-script
|
|
|
|
pyfiles=(tools/use_cases/find_unused_lun.py \
|
|
|
|
)
|
|
|
|
|
|
|
|
head -vn 1 ${pyfiles[@]}
|
|
|
|
sed -i '/^#!/d' ${pyfiles[@]}
|
|
|
|
head -vn 1 ${pyfiles[@]}
|
|
|
|
|
2016-02-06 12:21:05 +01:00
|
|
|
make %{?_smp_mflags} V=1
|
2015-04-09 09:42:34 +02:00
|
|
|
|
|
|
|
%install
|
2017-10-26 11:27:01 +02:00
|
|
|
%make_install
|
2015-04-09 09:42:34 +02:00
|
|
|
find %{buildroot} -type f -name "*.la" -delete -print
|
|
|
|
|
2020-06-22 14:58:56 +02:00
|
|
|
install -d -m755 %{buildroot}%{_sbindir}
|
2015-04-09 09:42:34 +02:00
|
|
|
|
2017-10-26 11:27:01 +02:00
|
|
|
install -Dpm 0644 packaging/daemon/libstoragemgmt.service \
|
2020-06-22 14:58:56 +02:00
|
|
|
%{buildroot}%{_unitdir}/libstoragemgmt.service
|
2015-04-09 09:42:34 +02:00
|
|
|
ln -sv %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
|
|
|
|
|
|
|
|
#Files for udev handling
|
2020-06-22 14:58:56 +02:00
|
|
|
install -d %{buildroot}%{_udevrulesdir}
|
2015-04-09 09:42:34 +02:00
|
|
|
install -m 644 tools/udev/90-scsi-ua.rules \
|
2020-06-22 14:58:56 +02:00
|
|
|
%{buildroot}%{_udevrulesdir}/90-scsi-ua.rules
|
2015-04-09 09:42:34 +02:00
|
|
|
install -m 755 tools/udev/scan-scsi-target \
|
2020-06-22 14:58:56 +02:00
|
|
|
%{buildroot}%{_prefix}/lib/udev/scan-scsi-target
|
2015-04-09 09:42:34 +02:00
|
|
|
|
|
|
|
# find all duplicates
|
2017-10-26 11:27:01 +02:00
|
|
|
%fdupes -s %{buildroot}%{python_sitelib}
|
2015-04-09 09:42:34 +02:00
|
|
|
|
2015-06-18 10:33:54 +02:00
|
|
|
%if %{with test}
|
2015-04-09 15:10:41 +02:00
|
|
|
%check
|
2016-05-13 22:37:32 +02:00
|
|
|
if ! make check
|
|
|
|
then
|
|
|
|
cat test-suite.log || true
|
|
|
|
exit 1
|
|
|
|
fi
|
2015-06-18 10:33:54 +02:00
|
|
|
%endif
|
2015-04-09 09:42:34 +02:00
|
|
|
|
|
|
|
%pre
|
2015-06-18 10:33:54 +02:00
|
|
|
if [ $1 -eq 1 ]; then
|
|
|
|
# New install
|
|
|
|
getent group %{name} >/dev/null || groupadd -r %{name}
|
|
|
|
getent passwd %{name} >/dev/null || \
|
|
|
|
useradd -r -g %{name} -d %{_localstatedir}/run/lsm -s /sbin/nologin \
|
|
|
|
-c "daemon account for libstoragemgmt" %{name}
|
|
|
|
fi
|
2017-10-26 11:27:01 +02:00
|
|
|
|
2015-04-09 09:42:34 +02:00
|
|
|
%service_add_pre %{name}.service
|
|
|
|
|
|
|
|
%post -n %{libname} -p /sbin/ldconfig
|
|
|
|
%postun -n %{libname} -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%post
|
|
|
|
%service_add_post %{name}.service
|
2015-06-18 10:33:54 +02:00
|
|
|
# Create tmp socket file on package new install.
|
2017-03-24 12:20:44 +01:00
|
|
|
if [ $1 -eq 1 -a -x %{_bindir}/systemd-tmpfiles ]; then
|
2015-06-18 10:33:54 +02:00
|
|
|
%if 0%{?suse_version} <= 1320
|
2017-02-02 10:54:01 +01:00
|
|
|
systemd-tmpfiles --create %{_tmpfilesdir}/%{name}.conf || :
|
2015-05-14 08:35:47 +02:00
|
|
|
%else
|
2015-06-18 10:33:54 +02:00
|
|
|
%tmpfiles_create %{_tmpfilesdir}/%{name}.conf
|
2015-05-14 08:35:47 +02:00
|
|
|
%endif
|
2015-06-18 10:33:54 +02:00
|
|
|
fi
|
2015-04-09 09:42:34 +02:00
|
|
|
|
|
|
|
%preun
|
|
|
|
%service_del_preun %{name}.service
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%service_del_postun %{name}.service
|
|
|
|
|
|
|
|
%post smis-plugin
|
2015-06-18 10:33:54 +02:00
|
|
|
if [ $1 -eq 1 ]; then
|
|
|
|
# New install.
|
2017-03-24 12:20:44 +01:00
|
|
|
%{_bindir}/systemctl try-restart ${name}.service || :
|
2015-06-18 10:33:54 +02:00
|
|
|
fi
|
2015-04-09 09:42:34 +02:00
|
|
|
|
|
|
|
%postun smis-plugin
|
2015-06-18 10:33:54 +02:00
|
|
|
if [ $1 -eq 0 ]; then
|
|
|
|
# Remove
|
2017-03-24 12:20:44 +01:00
|
|
|
%{_bindir}/systemctl try-restart ${name}.service || :
|
2015-06-18 10:33:54 +02:00
|
|
|
fi
|
2015-04-09 09:42:34 +02:00
|
|
|
|
|
|
|
%post netapp-plugin
|
2015-06-18 10:33:54 +02:00
|
|
|
if [ $1 -eq 1 ]; then
|
|
|
|
# New install.
|
2017-03-24 12:20:44 +01:00
|
|
|
%{_bindir}/systemctl try-restart ${name}.service || :
|
2015-06-18 10:33:54 +02:00
|
|
|
fi
|
2015-04-09 09:42:34 +02:00
|
|
|
|
|
|
|
%postun netapp-plugin
|
2015-06-18 10:33:54 +02:00
|
|
|
if [ $1 -eq 0 ]; then
|
|
|
|
# Remove
|
2017-03-24 12:20:44 +01:00
|
|
|
%{_bindir}/systemctl try-restart ${name}.service || :
|
2015-06-18 10:33:54 +02:00
|
|
|
fi
|
2015-04-09 09:42:34 +02:00
|
|
|
|
|
|
|
%post targetd-plugin
|
2015-06-18 10:33:54 +02:00
|
|
|
if [ $1 -eq 1 ]; then
|
|
|
|
# New install.
|
2017-03-24 12:20:44 +01:00
|
|
|
%{_bindir}/systemctl try-restart ${name}.service || :
|
2015-06-18 10:33:54 +02:00
|
|
|
fi
|
2015-04-09 09:42:34 +02:00
|
|
|
|
|
|
|
%postun targetd-plugin
|
2015-06-18 10:33:54 +02:00
|
|
|
if [ $1 -eq 0 ]; then
|
|
|
|
# Remove
|
2017-03-24 12:20:44 +01:00
|
|
|
%{_bindir}/systemctl try-restart ${name}.service || :
|
2015-06-18 10:33:54 +02:00
|
|
|
fi
|
2015-04-09 09:42:34 +02:00
|
|
|
|
|
|
|
%post nstor-plugin
|
2015-06-18 10:33:54 +02:00
|
|
|
if [ $1 -eq 1 ]; then
|
|
|
|
# New install.
|
2017-03-24 12:20:44 +01:00
|
|
|
%{_bindir}/systemctl try-restart ${name}.service || :
|
2015-06-18 10:33:54 +02:00
|
|
|
fi
|
2015-04-09 09:42:34 +02:00
|
|
|
|
|
|
|
%postun nstor-plugin
|
2015-06-18 10:33:54 +02:00
|
|
|
if [ $1 -eq 0 ]; then
|
|
|
|
# Remove
|
2017-03-24 12:20:44 +01:00
|
|
|
%{_bindir}/systemctl try-restart ${name}.service || :
|
2015-06-18 10:33:54 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
%post megaraid-plugin
|
|
|
|
if [ $1 -eq 1 ]; then
|
|
|
|
# New install.
|
2017-03-24 12:20:44 +01:00
|
|
|
%{_bindir}/systemctl try-restart ${name}.service || :
|
2015-06-18 10:33:54 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
%postun megaraid-plugin
|
|
|
|
if [ $1 -eq 0 ]; then
|
|
|
|
# Remove
|
2017-03-24 12:20:44 +01:00
|
|
|
%{_bindir}/systemctl try-restart ${name}.service || :
|
2015-06-18 10:33:54 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
%post hpsa-plugin
|
|
|
|
if [ $1 -eq 1 ]; then
|
|
|
|
# New install.
|
2017-03-24 12:20:44 +01:00
|
|
|
%{_bindir}/systemctl try-restart ${name}.service || :
|
2015-06-18 10:33:54 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
%postun hpsa-plugin
|
|
|
|
if [ $1 -eq 0 ]; then
|
|
|
|
# Remove
|
2017-03-24 12:20:44 +01:00
|
|
|
%{_bindir}/systemctl try-restart ${name}.service || :
|
2015-06-18 10:33:54 +02:00
|
|
|
fi
|
|
|
|
|
2017-10-26 11:27:01 +02:00
|
|
|
%post nfs-plugin
|
|
|
|
if [ $1 -eq 1 ]; then
|
|
|
|
# New install.
|
|
|
|
%{_bindir}/systemctl try-restart ${name}.service || :
|
|
|
|
fi
|
|
|
|
|
|
|
|
%postun nfs-plugin
|
|
|
|
if [ $1 -eq 0 ]; then
|
|
|
|
# Remove
|
|
|
|
%{_bindir}/systemctl try-restart ${name}.service || :
|
|
|
|
fi
|
|
|
|
|
|
|
|
%post local-plugin
|
|
|
|
if [ $1 -eq 1 ]; then
|
|
|
|
# New install.
|
|
|
|
%{_bindir}/systemctl try-restart ${name}.service || :
|
|
|
|
fi
|
|
|
|
|
|
|
|
%postun local-plugin
|
|
|
|
if [ $1 -eq 0 ]; then
|
|
|
|
# Remove
|
|
|
|
%{_bindir}/systemctl try-restart ${name}.service || :
|
|
|
|
fi
|
|
|
|
|
|
|
|
%post arcconf-plugin
|
|
|
|
if [ $1 -eq 1 ]; then
|
|
|
|
# New install.
|
|
|
|
%{_bindir}/systemctl try-restart ${name}.service || :
|
|
|
|
fi
|
|
|
|
|
|
|
|
%postun arcconf-plugin
|
|
|
|
if [ $1 -eq 0 ]; then
|
|
|
|
# Remove
|
|
|
|
%{_bindir}/systemctl try-restart ${name}.service || :
|
|
|
|
fi
|
|
|
|
|
2015-06-18 10:33:54 +02:00
|
|
|
%post udev
|
|
|
|
%udev_rules_update
|
2015-04-09 09:42:34 +02:00
|
|
|
|
|
|
|
%files
|
2016-02-06 12:21:05 +01:00
|
|
|
%{_mandir}/man1/lsmcli.1%{ext_man}
|
|
|
|
%{_mandir}/man1/lsmd.1%{ext_man}
|
2015-06-18 10:33:54 +02:00
|
|
|
%{_mandir}/man5/lsmd.conf.5*
|
2015-04-09 09:42:34 +02:00
|
|
|
%{_bindir}/lsmcli
|
|
|
|
%{_bindir}/lsmd
|
|
|
|
%{_bindir}/simc_lsmplugin
|
2016-02-06 12:21:05 +01:00
|
|
|
%{_mandir}/man1/simc_lsmplugin.1%{ext_man}
|
2015-04-09 09:42:34 +02:00
|
|
|
%{_unitdir}/libstoragemgmt.service
|
|
|
|
%{_tmpfilesdir}/%{name}.conf
|
2015-06-18 10:33:54 +02:00
|
|
|
%dir %{_sysconfdir}/lsm
|
2018-10-26 09:45:11 +02:00
|
|
|
%{_datadir}/bash-completion/completions/lsmcli
|
2015-06-18 10:33:54 +02:00
|
|
|
%config(noreplace) %{_sysconfdir}/lsm/lsmd.conf
|
|
|
|
%dir %{_sysconfdir}/lsm/pluginconf.d
|
|
|
|
%{_sbindir}/rclibstoragemgmt
|
|
|
|
%ghost %dir /run/lsm
|
2017-03-24 12:20:44 +01:00
|
|
|
%ghost %dir /run/lsm/ipc
|
2015-06-18 10:33:54 +02:00
|
|
|
|
|
|
|
%files udev
|
2020-06-22 14:58:56 +02:00
|
|
|
%{_prefix}/lib/udev/scan-scsi-target
|
2015-04-09 09:42:34 +02:00
|
|
|
%{_udevrulesdir}/90-scsi-ua.rules
|
|
|
|
|
|
|
|
%files -n %{libname}
|
2020-09-15 09:00:48 +02:00
|
|
|
%license COPYING.LIB
|
|
|
|
%doc README
|
2016-02-06 12:21:05 +01:00
|
|
|
%{_libdir}/libstoragemgmt.so.*
|
2015-04-09 09:42:34 +02:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%{_includedir}/*
|
2017-10-26 11:27:01 +02:00
|
|
|
%{_mandir}/man3/*%{ext_man}
|
2016-02-06 12:21:05 +01:00
|
|
|
%{_libdir}/libstoragemgmt.so
|
2015-04-09 09:42:34 +02:00
|
|
|
%{_libdir}/pkgconfig/libstoragemgmt.pc
|
|
|
|
|
2017-12-19 09:03:24 +01:00
|
|
|
%if 0%{python3}
|
|
|
|
%files -n python3-%{name}
|
|
|
|
%else
|
|
|
|
%files -n python2-%{name}
|
|
|
|
%endif
|
2015-04-09 09:42:34 +02:00
|
|
|
%dir %{python_sitelib}/lsm
|
|
|
|
%{python_sitelib}/lsm/external
|
2016-05-13 22:37:32 +02:00
|
|
|
%{python_sitelib}/lsm/_*.py*
|
2015-04-09 09:42:34 +02:00
|
|
|
%{python_sitelib}/lsm/version.*
|
2018-10-26 09:45:11 +02:00
|
|
|
|
2017-12-19 09:03:24 +01:00
|
|
|
%if 0%{python3}
|
|
|
|
%dir %{python_sitelib}/lsm/__pycache__
|
|
|
|
%{python_sitelib}/lsm/__pycache__/*
|
|
|
|
%dir %{python_sitelib}/lsm/plugin/__pycache__
|
|
|
|
%{python_sitelib}/lsm/plugin/__pycache__/*
|
|
|
|
%dir %{python_sitelib}/lsm/plugin/sim/__pycache__
|
|
|
|
%{python_sitelib}/lsm/plugin/sim/__pycache__/*
|
|
|
|
%dir %{python_sitelib}/lsm/lsmcli/__pycache__
|
|
|
|
%{python_sitelib}/lsm/lsmcli/__pycache__/*
|
|
|
|
%endif
|
2018-10-26 09:45:11 +02:00
|
|
|
%{python_sitelib}/lsm/lsmcli/__init__.*
|
|
|
|
%{python_sitelib}/lsm/lsmcli/data_display.*
|
|
|
|
%{python_sitelib}/lsm/lsmcli/cmdline.*
|
2015-04-09 09:42:34 +02:00
|
|
|
%dir %{python_sitelib}/lsm/plugin
|
|
|
|
%{python_sitelib}/lsm/plugin/__init__.*
|
2015-06-18 10:33:54 +02:00
|
|
|
%dir %{python_sitelib}/lsm/plugin/sim
|
2016-05-13 22:37:32 +02:00
|
|
|
%{python_sitelib}/lsm/plugin/sim/*.py*
|
2018-10-26 09:45:11 +02:00
|
|
|
%dir %{python_sitelib}/lsm/lsmcli
|
2015-04-09 09:42:34 +02:00
|
|
|
%{_bindir}/sim_lsmplugin
|
2018-10-26 09:45:11 +02:00
|
|
|
%dir %{_libexecdir}/lsm.d
|
|
|
|
%{_libexecdir}/lsm.d/find_unused_lun.py*
|
2020-08-12 09:14:16 +02:00
|
|
|
%{_libexecdir}/lsm.d/local_check.py
|
2015-06-18 10:33:54 +02:00
|
|
|
%config(noreplace) %{_sysconfdir}/lsm/pluginconf.d/sim.conf
|
2016-02-06 12:21:05 +01:00
|
|
|
%{_mandir}/man1/sim_lsmplugin.1%{ext_man}
|
2015-04-09 09:42:34 +02:00
|
|
|
|
|
|
|
%files smis-plugin
|
2015-06-18 10:33:54 +02:00
|
|
|
%dir %{python_sitelib}/lsm/plugin/smispy
|
2016-05-13 22:37:32 +02:00
|
|
|
%{python_sitelib}/lsm/plugin/smispy/*.py*
|
2017-12-19 09:03:24 +01:00
|
|
|
%if 0%{python3}
|
|
|
|
%dir %{python_sitelib}/lsm/plugin/smispy/__pycache__
|
|
|
|
%{python_sitelib}/lsm/plugin/smispy/__pycache__/*
|
|
|
|
%endif
|
2015-04-09 09:42:34 +02:00
|
|
|
%{_bindir}/smispy_lsmplugin
|
2016-02-06 12:21:05 +01:00
|
|
|
%{_mandir}/man1/smispy_lsmplugin.1%{ext_man}
|
2015-04-09 09:42:34 +02:00
|
|
|
|
|
|
|
%files netapp-plugin
|
2015-06-18 10:33:54 +02:00
|
|
|
%dir %{python_sitelib}/lsm/plugin/ontap
|
2016-05-13 22:37:32 +02:00
|
|
|
%{python_sitelib}/lsm/plugin/ontap/*.py*
|
2017-12-19 09:03:24 +01:00
|
|
|
%if 0%{python3}
|
|
|
|
%dir %{python_sitelib}/lsm/plugin/ontap/__pycache__
|
|
|
|
%{python_sitelib}/lsm/plugin/ontap/__pycache__/*
|
|
|
|
%endif
|
2015-04-09 09:42:34 +02:00
|
|
|
%{_bindir}/ontap_lsmplugin
|
2016-02-06 12:21:05 +01:00
|
|
|
%{_mandir}/man1/ontap_lsmplugin.1%{ext_man}
|
2015-04-09 09:42:34 +02:00
|
|
|
|
|
|
|
%files targetd-plugin
|
2015-06-18 10:33:54 +02:00
|
|
|
%dir %{python_sitelib}/lsm/plugin/targetd
|
2017-12-19 09:03:24 +01:00
|
|
|
%if 0%{python3}
|
|
|
|
%dir %{python_sitelib}/lsm/plugin/targetd/__pycache__
|
|
|
|
%{python_sitelib}/lsm/plugin/targetd/__pycache__/*
|
|
|
|
%endif
|
2016-05-13 22:37:32 +02:00
|
|
|
%{python_sitelib}/lsm/plugin/targetd/*.py*
|
2015-04-09 09:42:34 +02:00
|
|
|
%{_bindir}/targetd_lsmplugin
|
2016-02-06 12:21:05 +01:00
|
|
|
%{_mandir}/man1/targetd_lsmplugin.1%{ext_man}
|
2015-04-09 09:42:34 +02:00
|
|
|
|
|
|
|
%files nstor-plugin
|
2015-06-18 10:33:54 +02:00
|
|
|
%dir %{python_sitelib}/lsm/plugin/nstor
|
2017-12-19 09:03:24 +01:00
|
|
|
%if 0%{python3}
|
|
|
|
%dir %{python_sitelib}/lsm/plugin/nstor/__pycache__
|
|
|
|
%{python_sitelib}/lsm/plugin/nstor/__pycache__/*
|
|
|
|
%endif
|
2016-05-13 22:37:32 +02:00
|
|
|
%{python_sitelib}/lsm/plugin/nstor/*.py*
|
2015-04-09 09:42:34 +02:00
|
|
|
%{_bindir}/nstor_lsmplugin
|
2016-02-06 12:21:05 +01:00
|
|
|
%{_mandir}/man1/nstor_lsmplugin.1%{ext_man}
|
2015-06-18 10:33:54 +02:00
|
|
|
|
|
|
|
%files megaraid-plugin
|
|
|
|
%dir %{python_sitelib}/lsm/plugin/megaraid
|
2017-12-19 09:03:24 +01:00
|
|
|
%if 0%{python3}
|
|
|
|
%dir %{python_sitelib}/lsm/plugin/megaraid/__pycache__
|
|
|
|
%{python_sitelib}/lsm/plugin/megaraid/__pycache__/*
|
|
|
|
%endif
|
2016-05-13 22:37:32 +02:00
|
|
|
%{python_sitelib}/lsm/plugin/megaraid/*.py*
|
2015-06-18 10:33:54 +02:00
|
|
|
%{_bindir}/megaraid_lsmplugin
|
|
|
|
%config(noreplace) %{_sysconfdir}/lsm/pluginconf.d/megaraid.conf
|
2016-02-06 12:21:05 +01:00
|
|
|
%{_mandir}/man1/megaraid_lsmplugin.1%{ext_man}
|
2015-06-18 10:33:54 +02:00
|
|
|
|
|
|
|
%files hpsa-plugin
|
|
|
|
%dir %{python_sitelib}/lsm/plugin/hpsa
|
2017-12-19 09:03:24 +01:00
|
|
|
%if 0%{python3}
|
|
|
|
%dir %{python_sitelib}/lsm/plugin/hpsa/__pycache__
|
|
|
|
%{python_sitelib}/lsm/plugin/hpsa/__pycache__/*
|
|
|
|
%endif
|
2016-05-13 22:37:32 +02:00
|
|
|
%{python_sitelib}/lsm/plugin/hpsa/*.py*
|
2015-06-18 10:33:54 +02:00
|
|
|
%{_bindir}/hpsa_lsmplugin
|
|
|
|
%config(noreplace) %{_sysconfdir}/lsm/pluginconf.d/hpsa.conf
|
2016-02-06 12:21:05 +01:00
|
|
|
%{_mandir}/man1/hpsa_lsmplugin.1%{ext_man}
|
2015-04-09 09:42:34 +02:00
|
|
|
|
2017-10-26 11:27:01 +02:00
|
|
|
%files nfs-plugin
|
|
|
|
%dir %{python_sitelib}/lsm/plugin/nfs
|
2017-12-19 09:03:24 +01:00
|
|
|
%if 0%{python3}
|
|
|
|
%dir %{python_sitelib}/lsm/plugin/nfs/__pycache__
|
|
|
|
%{python_sitelib}/lsm/plugin/nfs/__pycache__/*
|
|
|
|
%endif
|
2017-10-26 11:27:01 +02:00
|
|
|
%{python_sitelib}/lsm/plugin/nfs/*.py*
|
|
|
|
%{_bindir}/nfs_lsmplugin
|
|
|
|
%config(noreplace) %{_sysconfdir}/lsm/pluginconf.d/nfs.conf
|
|
|
|
%{_mandir}/man1/nfs_lsmplugin.1%{ext_man}
|
|
|
|
|
2018-10-26 09:45:11 +02:00
|
|
|
%files nfs-plugin-clibs
|
|
|
|
%{python_sitelib}/lsm/plugin/nfs/nfs_clib.*
|
|
|
|
|
2017-10-26 11:27:01 +02:00
|
|
|
%files local-plugin
|
|
|
|
%dir %{python_sitelib}/lsm/plugin/local
|
2017-12-19 09:03:24 +01:00
|
|
|
%if 0%{python3}
|
|
|
|
%dir %{python_sitelib}/lsm/plugin/local/__pycache__
|
|
|
|
%{python_sitelib}/lsm/plugin/local/__pycache__/*
|
|
|
|
%endif
|
2017-10-26 11:27:01 +02:00
|
|
|
%{python_sitelib}/lsm/plugin/local/*.py*
|
|
|
|
%{_bindir}/local_lsmplugin
|
|
|
|
%config(noreplace) %{_sysconfdir}/lsm/pluginconf.d/local.conf
|
|
|
|
%{_mandir}/man1/local_lsmplugin.1%{ext_man}
|
|
|
|
|
|
|
|
%files arcconf-plugin
|
|
|
|
%dir %{python_sitelib}/lsm/plugin/arcconf
|
2017-12-19 09:03:24 +01:00
|
|
|
%if 0%{python3}
|
|
|
|
%dir %{python_sitelib}/lsm/plugin/arcconf/__pycache__
|
|
|
|
%{python_sitelib}/lsm/plugin/arcconf/__pycache__/*
|
|
|
|
%endif
|
2017-10-26 11:27:01 +02:00
|
|
|
%{python_sitelib}/lsm/plugin/arcconf/*.py*
|
|
|
|
%{_bindir}/arcconf_lsmplugin
|
|
|
|
%config(noreplace) %{_sysconfdir}/lsm/pluginconf.d/arcconf.conf
|
|
|
|
%{_mandir}/man1/arcconf_lsmplugin.1%{ext_man}
|
|
|
|
|
2017-12-19 09:03:24 +01:00
|
|
|
%if 0%{python3}
|
|
|
|
%files -n python3-%{name}-clibs
|
|
|
|
%else
|
|
|
|
%files -n python2-%{name}-clibs
|
|
|
|
%endif
|
2016-05-13 22:37:32 +02:00
|
|
|
%{python_sitelib}/lsm/_clib.*
|
2015-04-09 09:42:34 +02:00
|
|
|
|
|
|
|
%changelog
|