Hello community, here is the log from the commit of package libstoragemgmt for openSUSE:Factory checked in at 2015-06-23 11:56:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libstoragemgmt (Old) and /work/SRC/openSUSE:Factory/.libstoragemgmt.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libstoragemgmt" Changes: -------- --- /work/SRC/openSUSE:Factory/libstoragemgmt/libstoragemgmt.changes 2015-05-15 07:44:50.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.libstoragemgmt.new/libstoragemgmt.changes 2015-06-23 11:56:45.000000000 +0200 @@ -1,0 +2,36 @@ +Thu Jun 18 08:36:57 UTC 2015 - [email protected] + +- Cleanup changelog formatting +- Update dependencies + +------------------------------------------------------------------- +Wed Jun 17 07:09:55 UTC 2015 - [email protected] +- 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. + +------------------------------------------------------------------- Old: ---- libstoragemgmt-1.1.0.tar.gz New: ---- libstoragemgmt-1.2.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libstoragemgmt.spec ++++++ --- /var/tmp/diff_new_pack.SUg9gr/_old 2015-06-23 11:56:46.000000000 +0200 +++ /var/tmp/diff_new_pack.SUg9gr/_new 2015-06-23 11:56:46.000000000 +0200 @@ -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,9 @@ BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(systemd) BuildRequires: pkgconfig(udev) -%if 0%{?suse_version} <= 1315 -# For SLE12 +Requires: python-%{name} +%if 0%{?suse_version} <= 1320 +# For SLE12 and openSUSE 13.2 BuildRequires: libyajl-devel %else BuildRequires: pkgconfig(yajl) @@ -144,10 +148,41 @@ 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 +200,7 @@ 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 +223,19 @@ # 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 +244,14 @@ %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 +271,113 @@ %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 +394,60 @@ %{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,-) ++++++ libstoragemgmt-1.1.0.tar.gz -> libstoragemgmt-1.2.1.tar.gz ++++++ ++++ 81303 lines of diff (skipped)
