Accepting request 312468 from home:cathay4t:branches:Base:System
- Upgrade to version 1.2.1. - New sub-pacakges: * libstoragemgmt-megaraid-plugin New plugin in 1.2.0 release. * libstoragemgmt-hpsa-plugin New plugin in 1.2.0 release. * libstoragemgmt-udev The udev file has nothing to do with the libraray. It just scan the SCSI target when got REPORTED_LUNS_DATA_HAS_CHANGED in udev. - New rpmbuild switch: '--without test' Use to skip 'make check' test to save debug time. - Fix incorrect post scripts for plugin packages. User case: The libstoragemgmt daemon need to be restarted on new plugin install or plugin uninstall, so that the daemon could create new or stop existing plugin connection. But old macros: * The %service_del_postun only try-restart daemon on upgrade which is not required here. * The %service_del_postun only 'daemon-reload' on uninstall which is not required here. * The %service_add_post does not restart daemon. So we have to use hardcoded systemd commands. - Add bash-completion script for lsmcli. - Use systemd-tmpfiles to create socket file in /run folder. - Add %ghost ownership for socket file and folder in /run folder. OBS-URL: https://build.opensuse.org/request/show/312468 OBS-URL: https://build.opensuse.org/package/show/Base:System/libstoragemgmt?expand=0&rev=7
This commit is contained in:
parent
c4565d4187
commit
6c64569907
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:45c2454ec37dd92dd1293e6e5d8641cdda4802285d17b77d5bdac30be5f95394
|
||||
size 718668
|
3
libstoragemgmt-1.2.1.tar.gz
Normal file
3
libstoragemgmt-1.2.1.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e28517efc836cfa820778e947544285015a7b724506997bd720f4f44c5e548ff
|
||||
size 844301
|
@ -1,3 +1,39 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 17 07:09:55 UTC 2015 - Gris Ge <fge@redhat.com> - 1.2.1-0
|
||||
- Upgrade to version 1.2.1.
|
||||
|
||||
- New sub-pacakges:
|
||||
* libstoragemgmt-megaraid-plugin
|
||||
New plugin in 1.2.0 release.
|
||||
* libstoragemgmt-hpsa-plugin
|
||||
New plugin in 1.2.0 release.
|
||||
* libstoragemgmt-udev
|
||||
The udev file has nothing to do with the libraray.
|
||||
It just scan the SCSI target when got REPORTED_LUNS_DATA_HAS_CHANGED
|
||||
in udev.
|
||||
|
||||
- New rpmbuild switch: '--without test'
|
||||
Use to skip 'make check' test to save debug time.
|
||||
|
||||
- Fix incorrect post scripts for plugin packages.
|
||||
User case:
|
||||
The libstoragemgmt daemon need to be restarted on new plugin install
|
||||
or plugin uninstall, so that the daemon could create new or stop
|
||||
existing plugin connection.
|
||||
But old macros:
|
||||
* The %service_del_postun only try-restart daemon on upgrade which is not
|
||||
required here.
|
||||
* The %service_del_postun only 'daemon-reload' on uninstall which is not
|
||||
required here.
|
||||
* The %service_add_post does not restart daemon.
|
||||
So we have to use hardcoded systemd commands.
|
||||
|
||||
- Add bash-completion script for lsmcli.
|
||||
|
||||
- Use systemd-tmpfiles to create socket file in /run folder.
|
||||
|
||||
- Add %ghost ownership for socket file and folder in /run folder.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu May 14 06:04:42 UTC 2015 - nwang@suse.com
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package libstoragemgmt
|
||||
#
|
||||
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -16,23 +16,26 @@
|
||||
#
|
||||
|
||||
|
||||
%bcond_without test
|
||||
|
||||
%define libname %{name}1
|
||||
Name: libstoragemgmt
|
||||
Version: 1.1.0
|
||||
Version: 1.2.1
|
||||
Release: 0
|
||||
Summary: Storage array management library
|
||||
License: LGPL-2.1+
|
||||
Group: System Environment/Libraries
|
||||
Url: http://sourceforge.net/projects/libstoragemgmt/
|
||||
Source0: http://sourceforge.net/projects/libstoragemgmt/files/%{name}-%{version}.tar.gz
|
||||
Url: https://github.com/libstorage/libstoragemgmt
|
||||
Source0: https://github.com/libstorage/libstoragemgmt/releases/download/%{version}/%{name}-%{version}.tar.gz
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: libconfig-devel
|
||||
BuildRequires: pkg-config
|
||||
BuildRequires: python-M2Crypto
|
||||
BuildRequires: python-PyYAML
|
||||
BuildRequires: python-argparse
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: python-pywbem
|
||||
BuildRequires: pkgconfig(bash-completion) >= 2.0
|
||||
BuildRequires: pkgconfig(check)
|
||||
BuildRequires: pkgconfig(glib-2.0)
|
||||
BuildRequires: pkgconfig(json-c)
|
||||
@ -41,8 +44,8 @@ BuildRequires: pkgconfig(libxml-2.0)
|
||||
BuildRequires: pkgconfig(openssl)
|
||||
BuildRequires: pkgconfig(systemd)
|
||||
BuildRequires: pkgconfig(udev)
|
||||
%if 0%{?suse_version} <= 1315
|
||||
# For SLE12
|
||||
%if 0%{?suse_version} <= 1320
|
||||
# For SLE12 and openSUSE 13.2
|
||||
BuildRequires: libyajl-devel
|
||||
%else
|
||||
BuildRequires: pkgconfig(yajl)
|
||||
@ -144,10 +147,41 @@ array support.
|
||||
Summary: REST API daemon for %{name}
|
||||
Group: System Environment/Daemons
|
||||
Requires: %{name} = %{version}
|
||||
%systemd_requires
|
||||
|
||||
%description rest
|
||||
the %{name}-rest package contains the http daemon for %{name}
|
||||
rest api.
|
||||
The experimental %{name}-rest package contains the http daemon for %{name}
|
||||
rest API.
|
||||
|
||||
%package udev
|
||||
Summary: Udev files for %{name}
|
||||
Group: System Environment/Base
|
||||
|
||||
%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}
|
||||
Group: System Environment/Libraries
|
||||
Requires(post): %{name} = %{version}
|
||||
Requires(postun): %{name} = %{version}
|
||||
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(post): %{name} = %{version}
|
||||
Requires(postun): %{name} = %{version}
|
||||
BuildArch: noarch
|
||||
|
||||
%description hpsa-plugin
|
||||
The %{name}-hpsa-plugin package contains the plugin for HP SmartArray storage
|
||||
management via hpssacli.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
@ -165,7 +199,7 @@ find %{buildroot} -type f -name "*.la" -delete -print
|
||||
install -d -m755 %{buildroot}/%{_unitdir}
|
||||
install -d -m755 %{buildroot}/%{_sbindir}
|
||||
|
||||
install -m 644 packaging/daemon/libstoragemgmt.service \
|
||||
install -m 0644 packaging/daemon/libstoragemgmt.service \
|
||||
%{buildroot}/%{_unitdir}/libstoragemgmt.service
|
||||
ln -sv %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
|
||||
|
||||
@ -188,13 +222,19 @@ install -m 755 tools/udev/scan-scsi-target \
|
||||
# find all duplicates
|
||||
%fdupes -s %{buildroot}
|
||||
|
||||
%if %{with test}
|
||||
%check
|
||||
# Tests seem to randomly fail in OBS
|
||||
make check
|
||||
%endif
|
||||
|
||||
%pre
|
||||
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}
|
||||
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
|
||||
%service_add_pre %{name}.service
|
||||
|
||||
%post -n %{libname} -p /sbin/ldconfig
|
||||
@ -203,13 +243,14 @@ getent passwd %{name} >/dev/null || useradd -r -g %{name} -d %{_localstatedir}/r
|
||||
|
||||
%post
|
||||
%service_add_post %{name}.service
|
||||
%udev_rules_update
|
||||
%if 0%{?suse_version} <= 1315
|
||||
# For SLE12
|
||||
systemd-tmpfiles --create %{_tmpfilesdir}/%{name}.conf >/dev/null 2>&1 || :
|
||||
# Create tmp socket file on package new install.
|
||||
if [ $1 -eq 1 ]; then
|
||||
%if 0%{?suse_version} <= 1320
|
||||
systemd-tmpfiles --create %{_tmpfilesdir}/%{name}.conf >/dev/null 2>&1 || :
|
||||
%else
|
||||
%tmpfiles_create %{_tmpfilesdir}/%{name}.conf
|
||||
%tmpfiles_create %{_tmpfilesdir}/%{name}.conf
|
||||
%endif
|
||||
fi
|
||||
|
||||
%preun
|
||||
%service_del_preun %{name}.service
|
||||
@ -229,52 +270,113 @@ systemd-tmpfiles --create %{_tmpfilesdir}/%{name}.conf >/dev/null 2>&1 || :
|
||||
%postun rest
|
||||
%service_del_postun %{name}-rest.service
|
||||
|
||||
# Need to restart lsmd if plugin is new installed or removed.
|
||||
%post smis-plugin
|
||||
%service_add_post %{name}.service
|
||||
if [ $1 -eq 1 ]; then
|
||||
# New install.
|
||||
/usr/bin/systemctl try-restart ${name}.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%postun smis-plugin
|
||||
%service_del_postun %{name}.service
|
||||
if [ $1 -eq 0 ]; then
|
||||
# Remove
|
||||
/usr/bin/systemctl try-restart ${name}.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
# Need to restart lsmd if plugin is new installed or removed.
|
||||
%post netapp-plugin
|
||||
%service_add_post %{name}.service
|
||||
if [ $1 -eq 1 ]; then
|
||||
# New install.
|
||||
/usr/bin/systemctl try-restart ${name}.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%postun netapp-plugin
|
||||
%service_del_postun %{name}.service
|
||||
if [ $1 -eq 0 ]; then
|
||||
# Remove
|
||||
/usr/bin/systemctl try-restart ${name}.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
# Need to restart lsmd if plugin is new installed or removed.
|
||||
%post targetd-plugin
|
||||
%service_add_post %{name}.service
|
||||
if [ $1 -eq 1 ]; then
|
||||
# New install.
|
||||
/usr/bin/systemctl try-restart ${name}.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%postun targetd-plugin
|
||||
%service_del_postun %{name}.service
|
||||
if [ $1 -eq 0 ]; then
|
||||
# Remove
|
||||
/usr/bin/systemctl try-restart ${name}.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
# Need to restart lsmd if plugin is new installed or removed.
|
||||
%post nstor-plugin
|
||||
%service_add_post %{name}.service
|
||||
if [ $1 -eq 1 ]; then
|
||||
# New install.
|
||||
/usr/bin/systemctl try-restart ${name}.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%postun nstor-plugin
|
||||
%service_del_postun %{name}.service
|
||||
if [ $1 -eq 0 ]; then
|
||||
# Remove
|
||||
/usr/bin/systemctl try-restart ${name}.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
# Need to restart lsmd if plugin is new installed or removed.
|
||||
%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
|
||||
|
||||
# Need to restart lsmd if plugin is new installed or removed.
|
||||
%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
|
||||
|
||||
%post udev
|
||||
%udev_rules_update
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc README COPYING.LIB
|
||||
%{_mandir}/man1/lsmcli.1*
|
||||
%{_mandir}/man1/lsmd.1*
|
||||
%{_mandir}/man5/lsmd.conf.5*
|
||||
%{_bindir}/lsmcli
|
||||
%{_datadir}/bash-completion/completions/lsmcli
|
||||
%{_bindir}/lsmd
|
||||
%{_bindir}/simc_lsmplugin
|
||||
%{_mandir}/man1/simc_lsmplugin.1*
|
||||
%{_unitdir}/libstoragemgmt.service
|
||||
%{_sbindir}/rclibstoragemgmt
|
||||
%{_tmpfilesdir}/%{name}.conf
|
||||
%dir %{_sysconfdir}/lsm
|
||||
%config(noreplace) %{_sysconfdir}/lsm/lsmd.conf
|
||||
%dir %{_sysconfdir}/lsm/pluginconf.d
|
||||
%{_sbindir}/rclibstoragemgmt
|
||||
%ghost %dir /run/lsm
|
||||
%ghost /run/lsm/ipc
|
||||
|
||||
%files udev
|
||||
%defattr(-,root,root,-)
|
||||
%{_libexecdir}/udev/scan-scsi-target
|
||||
%{_udevrulesdir}/90-scsi-ua.rules
|
||||
|
||||
%files -n %{libname}
|
||||
%defattr(-,root,root,-)
|
||||
%doc README COPYING.LIB
|
||||
%doc README COPYING.LIB
|
||||
%{_libdir}/*.so.*
|
||||
|
||||
%files devel
|
||||
@ -291,29 +393,60 @@ systemd-tmpfiles --create %{_tmpfilesdir}/%{name}.conf >/dev/null 2>&1 || :
|
||||
%{python_sitelib}/lsm/version.*
|
||||
%dir %{python_sitelib}/lsm/plugin
|
||||
%{python_sitelib}/lsm/plugin/__init__.*
|
||||
%dir %{python_sitelib}/lsm/plugin/sim
|
||||
%{python_sitelib}/lsm/plugin/sim
|
||||
%{python_sitelib}/lsm/lsmcli
|
||||
%{_bindir}/sim_lsmplugin
|
||||
%config(noreplace) %{_sysconfdir}/lsm/pluginconf.d/sim.conf
|
||||
%{_mandir}/man1/sim_lsmplugin.1*
|
||||
|
||||
%files smis-plugin
|
||||
%defattr(-,root,root,-)
|
||||
%dir %{python_sitelib}/lsm/plugin/smispy
|
||||
%{python_sitelib}/lsm/plugin/smispy
|
||||
%{_bindir}/smispy_lsmplugin
|
||||
%{_mandir}/man1/smispy_lsmplugin.1*
|
||||
|
||||
%files netapp-plugin
|
||||
%defattr(-,root,root,-)
|
||||
%{python_sitelib}/lsm/plugin/ontap*
|
||||
%dir %{python_sitelib}/lsm/plugin/ontap
|
||||
%{python_sitelib}/lsm/plugin/ontap
|
||||
%{_bindir}/ontap_lsmplugin
|
||||
%{_mandir}/man1/ontap_lsmplugin.1*
|
||||
|
||||
%files targetd-plugin
|
||||
%defattr(-,root,root,-)
|
||||
%dir %{python_sitelib}/lsm/plugin/targetd
|
||||
%{python_sitelib}/lsm/plugin/targetd
|
||||
%{_bindir}/targetd_lsmplugin
|
||||
%{_mandir}/man1/targetd_lsmplugin.1*
|
||||
|
||||
%files nstor-plugin
|
||||
%defattr(-,root,root,-)
|
||||
%dir %{python_sitelib}/lsm/plugin/nstor
|
||||
%{python_sitelib}/lsm/plugin/nstor
|
||||
%{_bindir}/nstor_lsmplugin
|
||||
%{_mandir}/man1/nstor_lsmplugin.1*
|
||||
|
||||
%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*
|
||||
|
||||
%files rest
|
||||
%defattr(-,root,root,-)
|
||||
|
Loading…
x
Reference in New Issue
Block a user