diff --git a/.gitignore b/.gitignore index 7deeff6..a16e43e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/libstoragemgmt-1.1.0.tar.gz +SOURCES/libstoragemgmt-1.2.3.tar.gz diff --git a/.libstoragemgmt.metadata b/.libstoragemgmt.metadata index e3bca57..391fdaf 100644 --- a/.libstoragemgmt.metadata +++ b/.libstoragemgmt.metadata @@ -1 +1 @@ -0f6165537c8956a2282ce7820a8888ddbba52a5c SOURCES/libstoragemgmt-1.1.0.tar.gz +1f765a49528d20e856ffc879e185b47a860bf896 SOURCES/libstoragemgmt-1.2.3.tar.gz diff --git a/SOURCES/libstoragemgmt-1.1.0-remove_yaml_build_requirement.patch b/SOURCES/libstoragemgmt-1.1.0-remove_yaml_build_requirement.patch deleted file mode 100644 index 1aa6f4d..0000000 --- a/SOURCES/libstoragemgmt-1.1.0-remove_yaml_build_requirement.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff --git configure.ac configure.ac -index 0bd3070..1c27fa0 100644 ---- configure.ac -+++ configure.ac -@@ -160,7 +160,6 @@ AM_PATH_PYTHON([2.6], [], AC_MSG_ERROR([Python interpreter 2.6 or 2.7 required]) - AC_PYTHON_MODULE([pywbem], [Required]) - AC_PYTHON_MODULE([M2Crypto], [Required]) - AC_PYTHON_MODULE([argparse], [Required]) --AC_PYTHON_MODULE([yaml], [Required]) - - dnl ========================================================================== - dnl Check for libmicrohttpd and json-c as it is needed for REST API daemon -diff --git test/plugin_test.py test/plugin_test.py -index e92497c..8e0d8bc 100755 ---- test/plugin_test.py -+++ test/plugin_test.py -@@ -26,7 +26,6 @@ import argparse - import collections - import atexit - import sys --import yaml - import re - import os - import tempfile -@@ -1273,10 +1272,15 @@ def dump_results(): - unittest.main exits when done so we need to register this handler to - get our results out. - -- output details (yaml) results of what we called, how it finished and how -- long it took. -+ If PyYAML is available we will output detailed results, else we will -+ output nothing. The detailed output results of what we called, -+ how it finished and how long it took. - """ -- sys.stdout.write(yaml.dump(dict(methods_called=results, stats=stats))) -+ try: -+ import yaml -+ sys.stdout.write(yaml.dump(dict(methods_called=results, stats=stats))) -+ except ImportError: -+ sys.stdout.write("NOTICE: Install PyYAML for detailed test results\n") - - - def add_our_params(): diff --git a/SOURCES/libstoragemgmt-1.2.3-cmdline-exit-fix.patch b/SOURCES/libstoragemgmt-1.2.3-cmdline-exit-fix.patch new file mode 100644 index 0000000..b366b79 --- /dev/null +++ b/SOURCES/libstoragemgmt-1.2.3-cmdline-exit-fix.patch @@ -0,0 +1,68 @@ +diff --git test/cmdtest.py test/cmdtest.py +index f687aee..7fa6599 100755 +--- test/cmdtest.py ++++ test/cmdtest.py +@@ -408,6 +408,13 @@ def display_check(display_list, system_id): + call([cmd, '-H', '-t' + sep, 'list', '--type', 'POOLS']) + + ++def test_exit_code(cap, system_id): ++ """ ++ Make sure we get the expected exit code when the command syntax is wrong ++ """ ++ call([cmd, '-u'], 2) ++ ++ + def test_display(cap, system_id): + """ + Crank through supported display operations making sure we get good +@@ -718,7 +725,7 @@ def pool_member_info_test(cap, system_id): + def volume_raid_create_test(cap, system_id): + if cap['VOLUME_RAID_CREATE']: + out = call( +- [cmd, '-t' + sep, 'volume-create-raid-cap', '--sys', system_id])[1] ++ [cmd, '-t' + sep, 'volume-raid-create-cap', '--sys', system_id])[1] + + if 'RAID1' not in [r[1] for r in parse(out)]: + return +@@ -737,7 +744,7 @@ def volume_raid_create_test(cap, system_id): + exit(10) + + out = call([ +- cmd, '-t' + sep, 'volume-create-raid', '--disk', free_disk_ids[0], ++ cmd, '-t' + sep, 'volume-raid-create', '--disk', free_disk_ids[0], + '--disk', free_disk_ids[1], '--name', 'test_volume_raid_create', + '--raid-type', 'raid1'])[1] + +@@ -770,6 +777,8 @@ def volume_raid_create_test(cap, system_id): + + + def run_all_tests(cap, system_id): ++ ++ test_exit_code(cap, system_id) + test_display(cap, system_id) + test_plugin_list(cap, system_id) + +diff --git tools/lsmcli/cmdline.py tools/lsmcli/cmdline.py +index 809b3bf..b2693e4 100644 +--- tools/lsmcli/cmdline.py ++++ tools/lsmcli/cmdline.py +@@ -64,10 +64,15 @@ def cmd_line_wrapper(c=None): + err_exit = 4 + except KeyboardInterrupt: + err_exit = 1 ++ except SystemExit as se: ++ # argparse raises a SystemExit ++ err_exit = se.code ++ except: ++ # We get *any* other exception don't return a successful error code ++ err_exit = 2 + finally: +- # We got here because of an exception, but we still may have a valid +- # connection to do an orderly shutdown with, lets try it before we +- # just exit closing the connection. ++ # Regardless of what happens, we will try to close the connection if ++ # possible to allow the plugin to clean up gracefully. + if cli: + try: + # This will exit if are successful diff --git a/SOURCES/libstoragemgmt-1.2.3-make-check-root.patch b/SOURCES/libstoragemgmt-1.2.3-make-check-root.patch new file mode 100644 index 0000000..3c3572f --- /dev/null +++ b/SOURCES/libstoragemgmt-1.2.3-make-check-root.patch @@ -0,0 +1,60 @@ +diff --git test/runtests.sh test/runtests.sh +index f8d28f2..edd008d 100755 +--- test/runtests.sh ++++ test/runtests.sh +@@ -36,7 +36,7 @@ LSMD_TMP_LOG_FILE="$base/lsmd.log" + + cleanup() { + #Clean up the daemon if it is running +- if [ $LSMD_PID -ne 65535 ] ++ if [ "CHK$LSMD_PID" != "CHK" ] && [ "CHK$LSMD_PID" != "CHK65535" ] + then + kill -s KILL $LSMD_PID + fi +@@ -106,7 +106,7 @@ fi + plugins=$base/plugins + + #Export needed vars +-export PYTHONPATH=$lsm_py_folder ++export PYTHONPATH=$base/python + export LD_LIBRARY_PATH=$base/lib + export LSM_SIM_DATA="$base/lsm_sim_data" + +@@ -118,19 +118,30 @@ echo "c_unit= $c_unit" + good "mkdir -p $LSM_UDS_PATH" + good "mkdir -p $plugins" + good "mkdir -p $LD_LIBRARY_PATH" ++good "mkdir -p $PYTHONPATH" ++ ++good "chmod 777 $base" ++good "chmod 777 $LSM_UDS_PATH" ++good "chmod 777 $plugins" ++good "chmod 777 $LD_LIBRARY_PATH" ++good "chmod 777 $PYTHONPATH" + + #Copy shared libraries + good "cp $shared_libs/*.so.* $LD_LIBRARY_PATH" + +-#Link plugin folder as python/lsm/plugin folder +-if [ ! -L "$lsm_py_folder/lsm/plugin" ];then +- good "ln -s $lsm_plugin_py_folder $lsm_py_folder/lsm/" ++# Copy python modules as libstoragemgmt user might not able to access ++# code in other path. This is common when compile as root with libstoragemgmt ++# user account exists. ++good "cp -av $lsm_py_folder/lsm $PYTHONPATH/" ++# In case the plugin and lsmcli link also copyed. ++if [ -e "$PYTHONPATH/lsm/plugin" ];then ++ good "rm $PYTHONPATH/lsm/plugin" + fi +- +-#Link lsmcli folder as python/lsm/lsmcli folder +-if [ ! -L "$lsm_py_folder/lsm/lsmcli" ];then +- good "ln -s $lsmcli_py_folder $lsm_py_folder/lsm/" ++good "cp -av $lsm_plugin_py_folder $PYTHONPATH/lsm/" ++if [ -e "$PYTHONPATH/lsm/lsmcli" ];then ++ good "rm $PYTHONPATH/lsm/lsmcli" + fi ++good "cp -av $lsmcli_py_folder $PYTHONPATH/lsm/" + + #Copy plugins to one directory. + good "find $rootdir/ \( ! -regex '.*/\..*' \) -type f -name \*_lsmplugin -exec cp {} $plugins \;" diff --git a/SOURCES/libstoragemgmt-1.2.3-megaraid-fixes.patch b/SOURCES/libstoragemgmt-1.2.3-megaraid-fixes.patch new file mode 100644 index 0000000..03d4c3e --- /dev/null +++ b/SOURCES/libstoragemgmt-1.2.3-megaraid-fixes.patch @@ -0,0 +1,59 @@ +diff --git plugin/megaraid/megaraid.py plugin/megaraid/megaraid.py +index d921c8e..3a41c78 100644 +--- plugin/megaraid/megaraid.py ++++ plugin/megaraid/megaraid.py +@@ -473,6 +473,8 @@ def pools(self, search_key=None, search_value=None, + dg_show_output = self._storcli_exec( + ["/c%d/dall" % ctrl_num, "show", "all"]) + free_space_list = dg_show_output.get('FREE SPACE DETAILS', []) ++ if 'TOPOLOGY' not in dg_show_output: ++ continue + for dg_top in dg_show_output['TOPOLOGY']: + if dg_top['Arr'] != '-': + continue +@@ -490,6 +492,9 @@ def _vd_to_lsm_vol(vd_id, dg_id, sys_id, vd_basic_info, vd_pd_info_list, + + vol_id = "%s:VD%d" % (sys_id, vd_id) + name = "VD %d" % vd_id ++ if 'Name' in vd_basic_info.keys() and vd_basic_info['Name']: ++ name += ": %s" % vd_basic_info['Name'] ++ + vpd83 = '' # TODO(Gris Ge): Beg LSI to provide this information. + block_size = size_human_2_size_bytes(vd_pd_info_list[0]['SeSz']) + num_of_blocks = vd_prop_info['Number of Blocks'] +@@ -700,19 +705,23 @@ def volume_raid_create(self, name, raid_type, disks, strip_size, + (cur_ctrl_num, cur_enclosure_num, slot_num) = \ + disk.plugin_data.split(':') + +- if ctrl_num and cur_ctrl_num != ctrl_num: ++ cur_ctrl_num = int(cur_ctrl_num) ++ cur_enclosure_num = int(cur_enclosure_num) ++ ++ if ctrl_num is not None and cur_ctrl_num != ctrl_num: + raise LsmError( + ErrorNumber.INVALID_ARGUMENT, + "Illegal input disks argument: disks are not from the " + "same controller/system.") + +- if enclosure_num and cur_enclosure_num != enclosure_num: ++ if enclosure_num is not None and \ ++ cur_enclosure_num != enclosure_num: + raise LsmError( + ErrorNumber.INVALID_ARGUMENT, + "Illegal input disks argument: disks are not from the " + "same disk enclosure.") + +- ctrl_num = int(cur_ctrl_num) ++ ctrl_num = cur_ctrl_num + enclosure_num = cur_enclosure_num + slot_nums.append(slot_num) + +@@ -722,7 +731,7 @@ def volume_raid_create(self, name, raid_type, disks, strip_size, + cmds = [ + "/c%s" % ctrl_num, "add", "vd", mega_raid_type, + 'size=all', "name=%s" % name, +- "drives=%s:%s" % (enclosure_num, ','.join(slot_nums))] ++ "drives=%d:%s" % (enclosure_num, ','.join(slot_nums))] + + if raid_type == Volume.RAID_TYPE_RAID10 or \ + raid_type == Volume.RAID_TYPE_RAID50 or \ diff --git a/SPECS/libstoragemgmt.spec b/SPECS/libstoragemgmt.spec index a55e860..2e67bab 100644 --- a/SPECS/libstoragemgmt.spec +++ b/SPECS/libstoragemgmt.spec @@ -1,26 +1,28 @@ Name: libstoragemgmt -Version: 1.1.0 -Release: 2%{?dist} +Version: 1.2.3 +Release: 4%{?dist} Summary: Storage array management library Group: System Environment/Libraries License: LGPLv2+ -URL: http://sourceforge.net/projects/libstoragemgmt/ -Source0: http://sourceforge.net/projects/libstoragemgmt/files/libstoragemgmt-%{version}.tar.gz +URL: https://github.com/libstorage/libstoragemgmt +Source0: https://github.com/libstorage/libstoragemgmt/releases/download/%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: %{name}-python BuildRequires: autoconf automake libtool yajl-devel libxml2-devel check-devel perl BuildRequires: openssl-devel BuildRequires: python-argparse BuildRequires: glib2-devel -# Explicitly require gcc-c++ -BuildRequires: gcc-c++ BuildRequires: systemd +BuildRequires: bash-completion +BuildRequires: libconfig-devel Requires: initscripts Requires(post): systemd Requires(preun): systemd Requires(postun): systemd -Patch0: libstoragemgmt-1.1.0-remove_yaml_build_requirement.patch +Patch0: libstoragemgmt-1.2.3-megaraid-fixes.patch +Patch1: libstoragemgmt-1.2.3-cmdline-exit-fix.patch +Patch2: libstoragemgmt-1.2.3-make-check-root.patch %description The libStorageMgmt library will provide a vendor agnostic open source storage @@ -53,8 +55,10 @@ well as python framework support and open source plug-ins written in python. Summary: Files for SMI-S generic array support for %{name} Group: System Environment/Libraries BuildRequires: pywbem -Requires: pywbem %{name}-python -Requires: libstoragemgmt-python = %{version}-%{release} +Requires: pywbem +Requires: %{name}-python = %{version}-%{release} +Requires(post): %{name}-python = %{version}-%{release} +Requires(postun): %{name}-python = %{version}-%{release} BuildArch: noarch %description smis-plugin @@ -66,8 +70,10 @@ support. Summary: Files for NetApp array support for %{name} Group: System Environment/Libraries BuildRequires: m2crypto -Requires: m2crypto %{name}-python -Requires: libstoragemgmt-python = %{version}-%{release} +Requires: m2crypto +Requires: %{name}-python = %{version}-%{release} +Requires(post): %{name}-python = %{version}-%{release} +Requires(postun): %{name}-python = %{version}-%{release} BuildArch: noarch %description netapp-plugin @@ -78,8 +84,9 @@ support. %package targetd-plugin Summary: Files for targetd array support for %{name} Group: System Environment/Libraries -Requires: %{name}-python -Requires: libstoragemgmt-python = %{version}-%{release} +Requires: %{name}-python = %{version}-%{release} +Requires(post): %{name}-python = %{version}-%{release} +Requires(postun): %{name}-python = %{version}-%{release} BuildArch: noarch %description targetd-plugin @@ -90,14 +97,39 @@ support. %package nstor-plugin Summary: Files for NexentaStor array support for %{name} Group: System Environment/Libraries -Requires: %{name}-python -Requires: libstoragemgmt-python = %{version}-%{release} +Requires: %{name}-python = %{version}-%{release} +Requires(post): %{name}-python = %{version}-%{release} +Requires(postun): %{name}-python = %{version}-%{release} BuildArch: noarch %description nstor-plugin The %{name}-nstor-plugin package contains plug-in for NexentaStor array support. +%package megaraid-plugin +Summary: Files for LSI MegaRAID support for %{name} +Group: System Environment/Libraries +Requires: %{name}-python = %{version}-%{release} +Requires(post): %{name}-python = %{version}-%{release} +Requires(postun): %{name}-python = %{version}-%{release} +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} +Group: System Environment/Libraries +Requires: %{name}-python = %{version}-%{release} +Requires(post): %{name}-python = %{version}-%{release} +Requires(postun): %{name}-python = %{version}-%{release} +BuildArch: noarch + +%description hpsa-plugin +The %{name}-hpsa-plugin package contains the plugin for HP +SmartArray storage management via hpssacli. + %package udev Summary: Udev files for %{name} Group: System Environment/Base @@ -109,10 +141,13 @@ uevents generated by the kernel. %prep %setup -q -%patch0 -p0 -b .remove_yaml_build_requirement.patch +%patch0 -p0 -b .megaraid-fixes.patch +%patch1 -p0 -b .cmdline-exit-fix.patch +%patch2 -p0 -b .make-check-root.patch +#Make sure you always have a build section, even when you don't +#need it, see: https://bugzilla.redhat.com/show_bug.cgi?id=192422 %build -./autogen.sh #Tell the install program to preserve file date/timestamps %configure --without-rest-api --disable-static @@ -124,8 +159,8 @@ rm -rf %{buildroot} make install DESTDIR=%{buildroot} find %{buildroot} -name '*.la' -exec rm -f {} ';' -install -d -m755 %{buildroot}/%{_unitdir} -install -m644 packaging/daemon/libstoragemgmt.service \ +install -d -m 0755 %{buildroot}/%{_unitdir} +install -m 0644 packaging/daemon/libstoragemgmt.service \ %{buildroot}/%{_unitdir}/libstoragemgmt.service #tempfiles.d configuration for /var/run @@ -133,15 +168,12 @@ mkdir -p %{buildroot}/%{_tmpfilesdir} install -m 0644 packaging/daemon/lsm-tmpfiles.conf \ %{buildroot}/%{_tmpfilesdir}/%{name}.conf -#Need these to exist at install so we can start the daemon -mkdir -p %{buildroot}%{_localstatedir}/run/lsm/ipc - #Files for udev handling -mkdir -p %{buildroot}/usr/lib/udev/rules.d -install -m 644 tools/udev/90-scsi-ua.rules \ - %{buildroot}/usr/lib/udev/rules.d/90-scsi-ua.rules -install -m 755 tools/udev/scan-scsi-target \ - %{buildroot}/usr/lib/udev/scan-scsi-target +mkdir -p %{buildroot}/%{_udevrulesdir} +install -m 0644 tools/udev/90-scsi-ua.rules \ + %{buildroot}/%{_udevrulesdir}/90-scsi-ua.rules +install -m 0755 tools/udev/scan-scsi-target \ + %{buildroot}/%{_udevrulesdir}/../scan-scsi-target %clean rm -rf %{buildroot} @@ -161,17 +193,10 @@ getent passwd libstoragemgmt >/dev/null || \ %post /sbin/ldconfig +# Create tmp socket folders. +%tmpfiles_create %{_tmpfilesdir}/%{name}.conf %systemd_post libstoragemgmt.service - -%if 0%{?with_rest_api} -%preun rest -%systemd_preun libstoragemgmt-rest.service - -%postun rest -%systemd_postun libstoragemgmt-rest.service -%endif - %preun %systemd_preun libstoragemgmt.service @@ -179,28 +204,107 @@ getent passwd libstoragemgmt >/dev/null || \ /sbin/ldconfig %systemd_postun libstoragemgmt.service +# Need to restart lsmd if plugin is new installed or removed. +%post smis-plugin +if [ $1 -eq 1 ]; then + # New install. + /usr/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || : +fi + +%postun smis-plugin +if [ $1 -eq 0 ]; then + # Remove + /usr/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || : +fi + +%post netapp-plugin +if [ $1 -eq 1 ]; then + # New install. + /usr/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || : +fi + +%postun netapp-plugin +if [ $1 -eq 0 ]; then + # Remove + /usr/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || : +fi + +%post targetd-plugin +if [ $1 -eq 1 ]; then + # New install. + /usr/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || : +fi + +%postun targetd-plugin +if [ $1 -eq 0 ]; then + # Remove + /usr/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || : +fi + +%post nstor-plugin +if [ $1 -eq 1 ]; then + # New install. + /usr/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || : +fi + +%postun nstor-plugin +if [ $1 -eq 0 ]; then + # Remove + /usr/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || : +fi + +%post megaraid-plugin +if [ $1 -eq 1 ]; then + # New install. + /usr/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || : +fi + +%postun megaraid-plugin +if [ $1 -eq 0 ]; then + # Remove + /usr/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || : +fi + +%post hpsa-plugin +if [ $1 -eq 1 ]; then + # New install. + /usr/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || : +fi + +%postun hpsa-plugin +if [ $1 -eq 0 ]; then + # Remove + /usr/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || : +fi + %files %defattr(-,root,root,-) %doc README COPYING.LIB %{_mandir}/man1/lsmcli.1* %{_mandir}/man1/lsmd.1* +%{_mandir}/man5/lsmd.conf.5* %{_libdir}/*.so.* %{_bindir}/lsmcli +%{_datadir}/bash-completion/completions/lsmcli %{_bindir}/lsmd %{_bindir}/simc_lsmplugin +%dir %{_sysconfdir}/lsm +%dir %{_sysconfdir}/lsm/pluginconf.d +%config(noreplace) %{_sysconfdir}/lsm/lsmd.conf +%{_mandir}/man1/simc_lsmplugin.1* -%{_unitdir}/* +%{_unitdir}/%{name}.service -%dir %attr(0755, libstoragemgmt, libstoragemgmt) %{_localstatedir}/run/lsm/ -%dir %attr(0755, libstoragemgmt, libstoragemgmt) %{_localstatedir}/run/lsm/ipc +%ghost %dir %attr(0755, -, -) /run/lsm/ +%ghost %dir %attr(0755, -, -) /run/lsm/ipc -%attr(0644, root, root) %{_tmpfilesdir}/%{name}.conf +%attr(0644, root, root) %{_tmpfilesdir}/%{name}.conf %files devel %defattr(-,root,root,-) %{_includedir}/* %{_libdir}/*.so -%{_libdir}/pkgconfig/libstoragemgmt.pc +%{_libdir}/pkgconfig/%{name}.pc %files python %defattr(-,root,root,-) @@ -227,6 +331,8 @@ getent passwd libstoragemgmt >/dev/null || \ %{python_sitelib}/lsm/lsmcli/data_display.* %{python_sitelib}/lsm/lsmcli/cmdline.* %{_bindir}/sim_lsmplugin +%config(noreplace) %{_sysconfdir}/lsm/pluginconf.d/sim.conf +%{_mandir}/man1/sim_lsmplugin.1* %files smis-plugin %defattr(-,root,root,-) @@ -243,6 +349,7 @@ getent passwd libstoragemgmt >/dev/null || \ %{python_sitelib}/lsm/plugin/smispy/smis_vol.* %{python_sitelib}/lsm/plugin/smispy/smis_ag.* %{_bindir}/smispy_lsmplugin +%{_mandir}/man1/smispy_lsmplugin.1* %files netapp-plugin %defattr(-,root,root,-) @@ -251,6 +358,7 @@ getent passwd libstoragemgmt >/dev/null || \ %{python_sitelib}/lsm/plugin/ontap/na.* %{python_sitelib}/lsm/plugin/ontap/ontap.* %{_bindir}/ontap_lsmplugin +%{_mandir}/man1/ontap_lsmplugin.1* %files targetd-plugin %defattr(-,root,root,-) @@ -258,6 +366,7 @@ getent passwd libstoragemgmt >/dev/null || \ %{python_sitelib}/lsm/plugin/targetd/__init__.* %{python_sitelib}/lsm/plugin/targetd/targetd.* %{_bindir}/targetd_lsmplugin +%{_mandir}/man1/targetd_lsmplugin.1* %files nstor-plugin %defattr(-,root,root,-) @@ -265,13 +374,62 @@ getent passwd libstoragemgmt >/dev/null || \ %{python_sitelib}/lsm/plugin/nstor/__init__.* %{python_sitelib}/lsm/plugin/nstor/nstor.* %{_bindir}/nstor_lsmplugin +%{_mandir}/man1/nstor_lsmplugin.1* %files udev %defattr(-,root,root,-) -/usr/lib/udev/scan-scsi-target -/usr/lib/udev/rules.d/90-scsi-ua.rules +%{_udevrulesdir}/../scan-scsi-target +%{_udevrulesdir}/90-scsi-ua.rules + +%files megaraid-plugin +%defattr(-,root,root,-) +%dir %{python_sitelib}/lsm/plugin/megaraid +%{python_sitelib}/lsm/plugin/megaraid/__init__.* +%{python_sitelib}/lsm/plugin/megaraid/megaraid.* +%{python_sitelib}/lsm/plugin/megaraid/utils.* +%{_bindir}/megaraid_lsmplugin +%config(noreplace) %{_sysconfdir}/lsm/pluginconf.d/megaraid.conf +%{_mandir}/man1/megaraid_lsmplugin.1* + +%files hpsa-plugin +%defattr(-,root,root,-) +%dir %{python_sitelib}/lsm/plugin/hpsa +%{python_sitelib}/lsm/plugin/hpsa/__init__.* +%{python_sitelib}/lsm/plugin/hpsa/hpsa.* +%{python_sitelib}/lsm/plugin/hpsa/utils.* +%{_bindir}/hpsa_lsmplugin +%config(noreplace) %{_sysconfdir}/lsm/pluginconf.d/hpsa.conf +%{_mandir}/man1/hpsa_lsmplugin.1* %changelog +* Tue Sep 8 2015 Tony Asleson 1.2.3-4 +- Fix 'make check' when running as root + https://bugzilla.redhat.com/show_bug.cgi?id=1260899 + +* Thu Jul 2 2015 Tony Asleson 1.2.3-3 +- Megaraid fixes + * https://bugzilla.redhat.com/show_bug.cgi?id=1238554 + * https://bugzilla.redhat.com/show_bug.cgi?id=1238582 + * https://bugzilla.redhat.com/show_bug.cgi?id=1238566 +- Command line exit code fix: + * https://bugzilla.redhat.com/show_bug.cgi?id=1238737 + +* Thu Jun 25 2015 Tony Asleson 1.2.3-2 +- Be explicit in package version requirements +- Add build section back to get debug-infos + +* Wed Jun 24 2015 Tony Asleson 1.2.3-1 +- New upstream release +- New sub-pacakges: + * libstoragemgmt-megaraid-plugin + * libstoragemgmt-hpsa-plugin +- Add bash-completion script for lsmcli +- Replace the hardcoded udev path with %{_udevrulesdir}. +- Mark /run/lsm and /run/lsm/ipc as %ghost folder. +- Add 'Requires(post)' and 'Requires(postun)' to plugins in order + to make sure plugin is installed after libstoragemgmt and removed before + libstoragemgmt. + * Thu Dec 11 2014 Tony Asleson 1.1.0-2 - Remove PyYAML build dependency