Accepting request 888299 from home:wanghaisu:branches:Base:System

bsc#1185067, move /var/run to /run

OBS-URL: https://build.opensuse.org/request/show/888299
OBS-URL: https://build.opensuse.org/package/show/Base:System/libstoragemgmt?expand=0&rev=74
This commit is contained in:
Michael Vetter 2021-04-26 07:18:38 +00:00 committed by Git OBS Bridge
parent 1d7c7b71fd
commit 3018c4a5f0
3 changed files with 214 additions and 197 deletions

View File

@ -1,3 +1,19 @@
-------------------------------------------------------------------
Sun Apr 25 07:41:36 UTC 2021 - nick wang <nwang@suse.com>
- Correct the spec file to fit to changes in 1.8.8
- Removed RPM sub packages:
* libstoragemgmt-netapp-plugin
* libstoragemgmt-nfs-plugin-clibs
* libstoragemgmt-nstor-plugin
* python3-libstoragemgmt-clibs
-------------------------------------------------------------------
Thu Apr 22 07:01:04 UTC 2021 - nick wang <nwang@suse.com>
- bsc#1185067, move /var/run to /run
Add patch move_to_run.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Apr 21 12:16:04 UTC 2021 - Michael Vetter <mvetter@suse.com> Wed Apr 21 12:16:04 UTC 2021 - Michael Vetter <mvetter@suse.com>

View File

@ -21,6 +21,7 @@
%if 0%{?suse_version} >= 1500 || %{with python3} %if 0%{?suse_version} >= 1500 || %{with python3}
%define python3 1 %define python3 1
%define python_sitelib %{python3_sitelib} %define python_sitelib %{python3_sitelib}
%define python_sitearch %{python3_sitearch}
%else %else
%define python3 0 %define python3 0
%endif %endif
@ -28,10 +29,11 @@ Name: libstoragemgmt
Version: 1.9.1 Version: 1.9.1
Release: 0 Release: 0
Summary: Storage array management library Summary: Storage array management library
License: LGPL-2.1-or-later AND GPL-2.0-or-later License: GPL-2.0-or-later AND LGPL-2.1-or-later
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
URL: https://github.com/libstorage/libstoragemgmt URL: https://github.com/libstorage/libstoragemgmt
Source0: https://github.com/libstorage/libstoragemgmt/releases/download/%{version}/%{name}-%{version}.tar.gz Source0: https://github.com/libstorage/libstoragemgmt/releases/download/%{version}/%{name}-%{version}.tar.gz
Patch1: move_to_run.patch
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: libconfig-devel BuildRequires: libconfig-devel
@ -70,6 +72,16 @@ BuildRequires: valgrind
BuildRequires: pkgconfig(check) BuildRequires: pkgconfig(check)
%endif %endif
# Packages that have been removed
Obsoletes: %{name}-netapp-plugin < %{version}-%{release}
Obsoletes: %{name}-nfs-plugin-clibs < %{version}-%{release}
Obsoletes: %{name}-nstor-plugin < %{version}-%{release}
%if 0%{python3}
Obsoletes: python3-%{name}-clibs < %{version}-%{release}
%else
Obsoletes: python2-%{name}-clibs < %{version}-%{release}
%endif
%description %description
The libStorageMgmt library will provide a vendor agnostic open source storage The libStorageMgmt library will provide a vendor agnostic open source storage
application programming interface (API) that will allow management of storage application programming interface (API) that will allow management of storage
@ -100,49 +112,40 @@ developing applications that use %{name}.
%if 0%{python3} %if 0%{python3}
%package -n python3-%{name} %package -n python3-%{name}
%else %else
%package -n python2-%{name} %package -n python2-%{name}
%endif %endif
%{?python_provide:%python_provide python3-%{name}} Summary: Python client libraries and plug-in support for libStorageMgmt
Summary: Python client libraries and plug-in support for %{name}
Group: Development/Languages/Python Group: Development/Languages/Python
BuildArch: noarch Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: %{name} = %{version}
%if 0%{python3}
Requires: python3-%{name}-clibs
%if 0%{python3}
%description -n python3-%{name} %description -n python3-%{name}
%else %else
Requires: python2-%{name}-clibs
%description -n python2-%{name} %description -n python2-%{name}
%endif %endif
The python-%{name} package contains python client libraries as The python-libstoragemgmt package contains python client libraries as
well as python framework support and open source plug-ins written in python. well as python framework support and open source plug-ins written in python.
# If obsoleted plugins are installed, we need to meet it's requirement
# of having the correct version of this package functionality installed too as
# the update occurs first, before the obsolete removes the obsoleted package.
%if 0%{python3} %if 0%{python3}
%package -n python3-%{name}-clibs Provides: python3-%{name} < %{version}-%{release}
%{?python_provide:%python_provide python3-%{name}}
%else %else
%package -n python2-%{name}-clibs Provides: python2-%{name} < %{version}-%{release}
%{?python_provide:%python_provide python2-%{name}}
%endif %endif
%{?python_provide:%python_provide python3-%{name}-clibs}
Summary: Python C extension for %{name}
Group: Development/Languages/Python
Requires: %{name} = %{version}-%{release}
%if 0%{python3}
%description -n python3-%{name}-clibs
%else
%description -n python2-%{name}-clibs
%endif
The python-%{name}-clibs package contains python C extentions for %{name}.
%package smis-plugin %package smis-plugin
Summary: Files for SMI-S generic array support for %{name} Summary: Files for SMI-S generic array support for %{name}
Group: Development/Languages/Python Group: Development/Languages/Python
Requires: python3-%{name} = %{version} Requires: python3-%{name} = %{version}
Requires(post): python3-%{name} = %{version} Requires(post): python3-%{name} = %{version}
Requires(postun): python3-%{name} = %{version} Requires(postun):python3-%{name} = %{version}
BuildArch: noarch BuildArch: noarch
%if 0%{python3} %if 0%{python3}
Requires: python3-pywbem Requires: python3-pywbem
@ -154,42 +157,18 @@ Requires: python-pywbem
The %{name}-smis-plugin package contains plug-in for generic The %{name}-smis-plugin package contains plug-in for generic
Storage Management Initiative Specification (SMI-S) array support. Storage Management Initiative Specification (SMI-S) array support.
%package netapp-plugin
Summary: Files for NetApp array support for %{name}
Group: Development/Languages/Python
Requires: python3-%{name} = %{version}
Requires(post): python3-%{name} = %{version}
Requires(postun): python3-%{name} = %{version}
BuildArch: noarch
%description netapp-plugin
The %{name}-netapp-plugin package contains plug-in for NetApp array
support.
%package targetd-plugin %package targetd-plugin
Summary: Files for targetd array support for %{name} Summary: Files for targetd array support for %{name}
Group: Development/Languages/Python Group: Development/Languages/Python
Requires: python3-%{name} = %{version} Requires: python3-%{name} = %{version}
Requires(post): python3-%{name} = %{version} Requires(post): python3-%{name} = %{version}
Requires(postun): python3-%{name} = %{version} Requires(postun):python3-%{name} = %{version}
BuildArch: noarch BuildArch: noarch
%description targetd-plugin %description targetd-plugin
The %{name}-targetd-plugin package contains plug-in for targetd The %{name}-targetd-plugin package contains plug-in for targetd
array support. array support.
%package nstor-plugin
Summary: Files for NexentaStor array support for %{name}
Group: Development/Languages/Python
Requires: python3-%{name} = %{version}
Requires(post): python3-%{name} = %{version}
Requires(postun): python3-%{name} = %{version}
BuildArch: noarch
%description nstor-plugin
The %{name}-nstor-plugin package contains plug-in for NexentaStor
array support.
%package udev %package udev
Summary: Udev files for %{name} Summary: Udev files for %{name}
Group: System/Base Group: System/Base
@ -203,7 +182,7 @@ Summary: Files for LSI MegaRAID support for %{name}
Group: Development/Languages/Python Group: Development/Languages/Python
Requires: python3-%{name} = %{version} Requires: python3-%{name} = %{version}
Requires(post): python3-%{name} = %{version} Requires(post): python3-%{name} = %{version}
Requires(postun): python3-%{name} = %{version} Requires(postun):python3-%{name} = %{version}
BuildArch: noarch BuildArch: noarch
%description megaraid-plugin %description megaraid-plugin
@ -215,7 +194,7 @@ Summary: Files for HP SmartArray support for %{name}
Group: Development/Languages/Python Group: Development/Languages/Python
Requires: python3-%{name} = %{version} Requires: python3-%{name} = %{version}
Requires(post): python3-%{name} = %{version} Requires(post): python3-%{name} = %{version}
Requires(postun): python3-%{name} = %{version} Requires(postun):python3-%{name} = %{version}
BuildArch: noarch BuildArch: noarch
%description hpsa-plugin %description hpsa-plugin
@ -225,30 +204,20 @@ management via hpssacli.
%package nfs-plugin %package nfs-plugin
Summary: Files for nfs support for %{name} Summary: Files for nfs support for %{name}
Group: Development/Languages/Python Group: Development/Languages/Python
Requires: %{name}-nfs-plugin-clibs = %{version} Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: python3-%{name} = %{version} Requires: python3-%{name} = %{version}
Requires(post): python3-%{name} = %{version} Requires(post): python3-%{name} = %{version}
Requires(postun): python3-%{name} = %{version} Requires(postun):python3-%{name} = %{version}
BuildArch: noarch
%description nfs-plugin %description nfs-plugin
The %{name}-nfs-plugin package contains the plugin for nfs based storage. The %{name}-nfs-plugin package contains the plugin for nfs based storage.
%package nfs-plugin-clibs
Summary: Python C extension module for %{name} NFS plugin
Group: Development/Languages/Python
Requires: %{name} = %{version}
%description nfs-plugin-clibs
The %{name}-nfs-plugin-clibs package contains python C extension for %{name}
NFS plugin.
%package local-plugin %package local-plugin
Summary: Files for HP local pseudo support for %{name} Summary: Files for HP local pseudo support for %{name}
Group: Development/Languages/Python Group: Development/Languages/Python
Requires: python3-%{name} = %{version} Requires: python3-%{name} = %{version}
Requires(post): python3-%{name} = %{version} Requires(post): python3-%{name} = %{version}
Requires(postun): python3-%{name} = %{version} Requires(postun):python3-%{name} = %{version}
BuildArch: noarch BuildArch: noarch
%description local-plugin %description local-plugin
@ -260,7 +229,7 @@ Summary: Files for Microsemi storage support for %{name}
Group: Development/Languages/Python Group: Development/Languages/Python
Requires: python3-%{name} = %{version} Requires: python3-%{name} = %{version}
Requires(post): python3-%{name} = %{version} Requires(post): python3-%{name} = %{version}
Requires(postun): python3-%{name} = %{version} Requires(postun):python3-%{name} = %{version}
BuildArch: noarch BuildArch: noarch
%description arcconf-plugin %description arcconf-plugin
@ -269,6 +238,7 @@ storage.
%prep %prep
%setup -q %setup -q
%patch1 -p1
%build %build
# Needed for patch0 # Needed for patch0
@ -284,17 +254,17 @@ autoreconf -fiv
%endif %endif
#Fix rpmlint Error: env-script-interpreter #Fix rpmlint Error: env-script-interpreter
#Should change it after configure #Should change it after configure
pyfiles=(plugin/megaraid/megaraid_lsmplugin \ pyfiles=(plugin/megaraid_plugin/megaraid_lsmplugin \
plugin/hpsa/hpsa_lsmplugin \ plugin/hpsa_plugin/hpsa_lsmplugin \
plugin/targetd/targetd_lsmplugin \ plugin/targetd_plugin/targetd_lsmplugin \
plugin/sim/sim_lsmplugin \ plugin/sim_plugin/sim_lsmplugin \
plugin/local/local_lsmplugin \ plugin/local_plugin/local_lsmplugin \
plugin/nstor/nstor_lsmplugin \ plugin/arcconf_plugin/arcconf_lsmplugin \
plugin/arcconf/arcconf_lsmplugin \ plugin/smispy_plugin/smispy_lsmplugin \
plugin/smispy/smispy_lsmplugin \ plugin/nfs_plugin/nfs_lsmplugin \
plugin/ontap/ontap_lsmplugin \ tools/use_cases/find_unused_lun.py \
plugin/nfs/nfs_lsmplugin \ tools/basic_check/local_check.py \
tools/lsmcli/lsmcli \ tools/lsmcli/lsmcli \
test/cmdtest.py \ test/cmdtest.py \
test/plugin_test.py \ test/plugin_test.py \
@ -304,15 +274,7 @@ head -vn 1 ${pyfiles[@]}
sed -i '/^#!\/usr\/bin/s|env python|python|' ${pyfiles[@]} sed -i '/^#!\/usr\/bin/s|env python|python|' ${pyfiles[@]}
head -vn 1 ${pyfiles[@]} head -vn 1 ${pyfiles[@]}
#Fix rpmlint Warning: non-executable-script %make_build
pyfiles=(tools/use_cases/find_unused_lun.py \
)
head -vn 1 ${pyfiles[@]}
sed -i '/^#!/d' ${pyfiles[@]}
head -vn 1 ${pyfiles[@]}
make %{?_smp_mflags} V=1
%install %install
%make_install %make_install
@ -333,6 +295,7 @@ install -m 755 tools/udev/scan-scsi-target \
# find all duplicates # find all duplicates
%fdupes -s %{buildroot}%{python_sitelib} %fdupes -s %{buildroot}%{python_sitelib}
%fdupes -s %{buildroot}%{python_sitearch}
%if %{with test} %if %{with test}
%check %check
@ -348,7 +311,7 @@ if [ $1 -eq 1 ]; then
# New install # New install
getent group %{name} >/dev/null || groupadd -r %{name} getent group %{name} >/dev/null || groupadd -r %{name}
getent passwd %{name} >/dev/null || \ getent passwd %{name} >/dev/null || \
useradd -r -g %{name} -d %{_localstatedir}/run/lsm -s /sbin/nologin \ useradd -r -g %{name} -d %{_rundir}/lsm -s /sbin/nologin \
-c "daemon account for libstoragemgmt" %{name} -c "daemon account for libstoragemgmt" %{name}
fi fi
@ -386,18 +349,6 @@ if [ $1 -eq 0 ]; then
%{_bindir}/systemctl try-restart ${name}.service || : %{_bindir}/systemctl try-restart ${name}.service || :
fi fi
%post netapp-plugin
if [ $1 -eq 1 ]; then
# New install.
%{_bindir}/systemctl try-restart ${name}.service || :
fi
%postun netapp-plugin
if [ $1 -eq 0 ]; then
# Remove
%{_bindir}/systemctl try-restart ${name}.service || :
fi
%post targetd-plugin %post targetd-plugin
if [ $1 -eq 1 ]; then if [ $1 -eq 1 ]; then
# New install. # New install.
@ -410,18 +361,6 @@ if [ $1 -eq 0 ]; then
%{_bindir}/systemctl try-restart ${name}.service || : %{_bindir}/systemctl try-restart ${name}.service || :
fi fi
%post nstor-plugin
if [ $1 -eq 1 ]; then
# New install.
%{_bindir}/systemctl try-restart ${name}.service || :
fi
%postun nstor-plugin
if [ $1 -eq 0 ]; then
# Remove
%{_bindir}/systemctl try-restart ${name}.service || :
fi
%post megaraid-plugin %post megaraid-plugin
if [ $1 -eq 1 ]; then if [ $1 -eq 1 ]; then
# New install. # New install.
@ -486,13 +425,13 @@ fi
%udev_rules_update %udev_rules_update
%files %files
%{_mandir}/man1/lsmcli.1%{ext_man} %{_mandir}/man1/lsmcli.1%{?ext_man}
%{_mandir}/man1/lsmd.1%{ext_man} %{_mandir}/man1/lsmd.1%{?ext_man}
%{_mandir}/man5/lsmd.conf.5* %{_mandir}/man5/lsmd.conf.5*
%{_bindir}/lsmcli %{_bindir}/lsmcli
%{_bindir}/lsmd %{_bindir}/lsmd
%{_bindir}/simc_lsmplugin %{_bindir}/simc_lsmplugin
%{_mandir}/man1/simc_lsmplugin.1%{ext_man} %{_mandir}/man1/simc_lsmplugin.1%{?ext_man}
%{_unitdir}/libstoragemgmt.service %{_unitdir}/libstoragemgmt.service
%{_tmpfilesdir}/%{name}.conf %{_tmpfilesdir}/%{name}.conf
%dir %{_sysconfdir}/lsm %dir %{_sysconfdir}/lsm
@ -521,31 +460,29 @@ fi
%if 0%{python3} %if 0%{python3}
%files -n python3-%{name} %files -n python3-%{name}
%else %else
%files -n python2-%{name} %files -n python2-%{name}
%endif %endif
%dir %{python_sitelib}/lsm %dir %{python_sitearch}/lsm
%{python_sitelib}/lsm/external %{python_sitearch}/lsm/_*.py*
%{python_sitelib}/lsm/_*.py* %{python_sitearch}/lsm/version.*
%{python_sitelib}/lsm/version.*
%if 0%{python3} %if 0%{python3}
%dir %{python_sitelib}/lsm/__pycache__ %dir %{python_sitearch}/lsm/__pycache__
%{python_sitelib}/lsm/__pycache__/* %{python_sitearch}/lsm/__pycache__/*
%dir %{python_sitelib}/lsm/plugin/__pycache__ %dir %{python_sitearch}/lsm/lsmcli/__pycache__
%{python_sitelib}/lsm/plugin/__pycache__/* %{python_sitearch}/lsm/lsmcli/__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 %endif
%{python_sitelib}/lsm/lsmcli/__init__.* %{python_sitearch}/lsm/lsmcli/__init__.*
%{python_sitelib}/lsm/lsmcli/data_display.* %{python_sitearch}/lsm/lsmcli/data_display.*
%{python_sitelib}/lsm/lsmcli/cmdline.* %{python_sitearch}/lsm/lsmcli/cmdline.*
%dir %{python_sitelib}/lsm/plugin %{python_sitearch}/lsm/_clib.*
%{python_sitelib}/lsm/plugin/__init__.* %dir %{python_sitearch}/sim_plugin
%dir %{python_sitelib}/lsm/plugin/sim %{python_sitearch}/sim_plugin/__pycache__/
%{python_sitelib}/lsm/plugin/sim/*.py* %{python_sitearch}/sim_plugin/__init__.*
%dir %{python_sitelib}/lsm/lsmcli %{python_sitearch}/sim_plugin/simulator.*
%{python_sitearch}/sim_plugin/simarray.*
%dir %{python_sitearch}/lsm/lsmcli
%{_bindir}/sim_lsmplugin %{_bindir}/sim_lsmplugin
%dir %{_libexecdir}/lsm.d %dir %{_libexecdir}/lsm.d
%{_libexecdir}/lsm.d/find_unused_lun.py* %{_libexecdir}/lsm.d/find_unused_lun.py*
@ -554,108 +491,79 @@ fi
%{_mandir}/man1/sim_lsmplugin.1%{ext_man} %{_mandir}/man1/sim_lsmplugin.1%{ext_man}
%files smis-plugin %files smis-plugin
%dir %{python_sitelib}/lsm/plugin/smispy %dir %{python_sitelib}/smispy_plugin
%{python_sitelib}/lsm/plugin/smispy/*.py* %{python_sitelib}/smispy_plugin/*.py*
%if 0%{python3} %if 0%{python3}
%dir %{python_sitelib}/lsm/plugin/smispy/__pycache__ %dir %{python_sitelib}/smispy_plugin/__pycache__
%{python_sitelib}/lsm/plugin/smispy/__pycache__/* %{python_sitelib}/smispy_plugin/__pycache__/*
%endif %endif
%{_bindir}/smispy_lsmplugin %{_bindir}/smispy_lsmplugin
%{_mandir}/man1/smispy_lsmplugin.1%{ext_man} %{_mandir}/man1/smispy_lsmplugin.1%{?ext_man}
%files netapp-plugin
%dir %{python_sitelib}/lsm/plugin/ontap
%{python_sitelib}/lsm/plugin/ontap/*.py*
%if 0%{python3}
%dir %{python_sitelib}/lsm/plugin/ontap/__pycache__
%{python_sitelib}/lsm/plugin/ontap/__pycache__/*
%endif
%{_bindir}/ontap_lsmplugin
%{_mandir}/man1/ontap_lsmplugin.1%{ext_man}
%files targetd-plugin %files targetd-plugin
%dir %{python_sitelib}/lsm/plugin/targetd %dir %{python_sitelib}/targetd_plugin
%if 0%{python3} %if 0%{python3}
%dir %{python_sitelib}/lsm/plugin/targetd/__pycache__ %dir %{python_sitelib}/targetd_plugin/__pycache__
%{python_sitelib}/lsm/plugin/targetd/__pycache__/* %{python_sitelib}/targetd_plugin/__pycache__/*
%endif %endif
%{python_sitelib}/lsm/plugin/targetd/*.py* %{python_sitelib}/targetd_plugin/*.py*
%{_bindir}/targetd_lsmplugin %{_bindir}/targetd_lsmplugin
%{_mandir}/man1/targetd_lsmplugin.1%{ext_man} %{_mandir}/man1/targetd_lsmplugin.1%{?ext_man}
%files nstor-plugin
%dir %{python_sitelib}/lsm/plugin/nstor
%if 0%{python3}
%dir %{python_sitelib}/lsm/plugin/nstor/__pycache__
%{python_sitelib}/lsm/plugin/nstor/__pycache__/*
%endif
%{python_sitelib}/lsm/plugin/nstor/*.py*
%{_bindir}/nstor_lsmplugin
%{_mandir}/man1/nstor_lsmplugin.1%{ext_man}
%files megaraid-plugin %files megaraid-plugin
%dir %{python_sitelib}/lsm/plugin/megaraid %dir %{python_sitelib}/megaraid_plugin
%if 0%{python3} %if 0%{python3}
%dir %{python_sitelib}/lsm/plugin/megaraid/__pycache__ %dir %{python_sitelib}/megaraid_plugin/__pycache__
%{python_sitelib}/lsm/plugin/megaraid/__pycache__/* %{python_sitelib}/megaraid_plugin/__pycache__/*
%endif %endif
%{python_sitelib}/lsm/plugin/megaraid/*.py* %{python_sitelib}/megaraid_plugin/*.py*
%{_bindir}/megaraid_lsmplugin %{_bindir}/megaraid_lsmplugin
%config(noreplace) %{_sysconfdir}/lsm/pluginconf.d/megaraid.conf %config(noreplace) %{_sysconfdir}/lsm/pluginconf.d/megaraid.conf
%{_mandir}/man1/megaraid_lsmplugin.1%{ext_man} %{_mandir}/man1/megaraid_lsmplugin.1%{?ext_man}
%files hpsa-plugin %files hpsa-plugin
%dir %{python_sitelib}/lsm/plugin/hpsa %dir %{python_sitelib}/hpsa_plugin
%if 0%{python3} %if 0%{python3}
%dir %{python_sitelib}/lsm/plugin/hpsa/__pycache__ %dir %{python_sitelib}/hpsa_plugin/__pycache__
%{python_sitelib}/lsm/plugin/hpsa/__pycache__/* %{python_sitelib}/hpsa_plugin/__pycache__/*
%endif %endif
%{python_sitelib}/lsm/plugin/hpsa/*.py* %{python_sitelib}/hpsa_plugin/*.py*
%{_bindir}/hpsa_lsmplugin %{_bindir}/hpsa_lsmplugin
%config(noreplace) %{_sysconfdir}/lsm/pluginconf.d/hpsa.conf %config(noreplace) %{_sysconfdir}/lsm/pluginconf.d/hpsa.conf
%{_mandir}/man1/hpsa_lsmplugin.1%{ext_man} %{_mandir}/man1/hpsa_lsmplugin.1%{?ext_man}
%files nfs-plugin %files nfs-plugin
%dir %{python_sitelib}/lsm/plugin/nfs %dir %{python_sitearch}/nfs_plugin
%if 0%{python3} %if 0%{python3}
%dir %{python_sitelib}/lsm/plugin/nfs/__pycache__ %dir %{python_sitearch}/nfs_plugin/__pycache__
%{python_sitelib}/lsm/plugin/nfs/__pycache__/* %{python_sitearch}/nfs_plugin/__pycache__/*
%endif %endif
%{python_sitelib}/lsm/plugin/nfs/*.py* %{python_sitearch}/nfs_plugin/*.py*
%{python_sitearch}/nfs_plugin/nfs_clib.*
%{_bindir}/nfs_lsmplugin %{_bindir}/nfs_lsmplugin
%config(noreplace) %{_sysconfdir}/lsm/pluginconf.d/nfs.conf %config(noreplace) %{_sysconfdir}/lsm/pluginconf.d/nfs.conf
%{_mandir}/man1/nfs_lsmplugin.1%{ext_man} %{_mandir}/man1/nfs_lsmplugin.1%{?ext_man}
%files nfs-plugin-clibs
%{python_sitelib}/lsm/plugin/nfs/nfs_clib.*
%files local-plugin %files local-plugin
%dir %{python_sitelib}/lsm/plugin/local %dir %{python_sitelib}/local_plugin
%if 0%{python3} %if 0%{python3}
%dir %{python_sitelib}/lsm/plugin/local/__pycache__ %dir %{python_sitelib}/local_plugin/__pycache__
%{python_sitelib}/lsm/plugin/local/__pycache__/* %{python_sitelib}/local_plugin/__pycache__/*
%endif %endif
%{python_sitelib}/lsm/plugin/local/*.py* %{python_sitelib}/local_plugin/*.py*
%{_bindir}/local_lsmplugin %{_bindir}/local_lsmplugin
%config(noreplace) %{_sysconfdir}/lsm/pluginconf.d/local.conf %config(noreplace) %{_sysconfdir}/lsm/pluginconf.d/local.conf
%{_mandir}/man1/local_lsmplugin.1%{ext_man} %{_mandir}/man1/local_lsmplugin.1%{?ext_man}
%files arcconf-plugin %files arcconf-plugin
%dir %{python_sitelib}/lsm/plugin/arcconf %dir %{python_sitelib}/arcconf_plugin
%if 0%{python3} %if 0%{python3}
%dir %{python_sitelib}/lsm/plugin/arcconf/__pycache__ %dir %{python_sitelib}/arcconf_plugin/__pycache__
%{python_sitelib}/lsm/plugin/arcconf/__pycache__/* %{python_sitelib}/arcconf_plugin/__pycache__/*
%endif %endif
%{python_sitelib}/lsm/plugin/arcconf/*.py* %{python_sitelib}/arcconf_plugin/*.py*
%{_bindir}/arcconf_lsmplugin %{_bindir}/arcconf_lsmplugin
%config(noreplace) %{_sysconfdir}/lsm/pluginconf.d/arcconf.conf %config(noreplace) %{_sysconfdir}/lsm/pluginconf.d/arcconf.conf
%{_mandir}/man1/arcconf_lsmplugin.1%{ext_man} %{_mandir}/man1/arcconf_lsmplugin.1%{?ext_man}
%if 0%{python3}
%files -n python3-%{name}-clibs
%else
%files -n python2-%{name}-clibs
%endif
%{python_sitelib}/lsm/_clib.*
%changelog %changelog

93
move_to_run.patch Normal file
View File

@ -0,0 +1,93 @@
bsc#1185067, migrate /var/run to /run.
diff -Naur libstoragemgmt-1.9.1.orig/c_binding/lsm_datatypes.cpp libstoragemgmt-1.9.1/c_binding/lsm_datatypes.cpp
--- libstoragemgmt-1.9.1.orig/c_binding/lsm_datatypes.cpp 2021-04-22 14:40:32.652139249 +0800
+++ libstoragemgmt-1.9.1/c_binding/lsm_datatypes.cpp 2021-04-22 14:47:32.747146709 +0800
@@ -52,7 +52,7 @@
#ifdef __cplusplus
extern "C" {
#endif
-#define LSM_DEFAULT_PLUGIN_DIR "/var/run/lsm/ipc"
+#define LSM_DEFAULT_PLUGIN_DIR "/run/lsm/ipc"
int lsm_string_list_append(lsm_string_list *sl, const char *value) {
int rc = LSM_ERR_INVALID_ARGUMENT;
diff -Naur libstoragemgmt-1.9.1.orig/daemon/lsm_daemon.c libstoragemgmt-1.9.1/daemon/lsm_daemon.c
--- libstoragemgmt-1.9.1.orig/daemon/lsm_daemon.c 2021-04-22 14:40:32.644139192 +0800
+++ libstoragemgmt-1.9.1/daemon/lsm_daemon.c 2021-04-22 14:47:47.095249430 +0800
@@ -44,7 +44,7 @@
#include <syslog.h>
#include <unistd.h>
-#define BASE_DIR "/var/run/lsm"
+#define BASE_DIR "/run/lsm"
#define SOCKET_DIR BASE_DIR "/ipc"
#define PLUGIN_DIR "/usr/bin"
#define LSM_USER "libstoragemgmt"
diff -Naur libstoragemgmt-1.9.1.orig/packaging/daemon/libstoragemgmt.conf libstoragemgmt-1.9.1/packaging/daemon/libstoragemgmt.conf
--- libstoragemgmt-1.9.1.orig/packaging/daemon/libstoragemgmt.conf 2021-04-22 14:40:32.648139221 +0800
+++ libstoragemgmt-1.9.1/packaging/daemon/libstoragemgmt.conf 2021-04-22 14:48:46.227672759 +0800
@@ -1,2 +1,2 @@
-D /var/run/lsm 0775 root libstoragemgmt -
-D /var/run/lsm/ipc 0775 root libstoragemgmt -
+D /run/lsm 0775 root libstoragemgmt -
+D /run/lsm/ipc 0775 root libstoragemgmt -
diff -Naur libstoragemgmt-1.9.1.orig/packaging/daemon/libstoragemgmtd libstoragemgmt-1.9.1/packaging/daemon/libstoragemgmtd
--- libstoragemgmt-1.9.1.orig/packaging/daemon/libstoragemgmtd 2021-04-22 14:40:32.648139221 +0800
+++ libstoragemgmt-1.9.1/packaging/daemon/libstoragemgmtd 2021-04-22 14:49:33.028007801 +0800
@@ -15,7 +15,7 @@
NAME=lsmd
PROG=/usr/bin/$NAME
-PID=/var/run/lsm/lsmd.pid
+PID=/run/lsm/lsmd.pid
LOCK=/var/lock/subsys/libstoragemgmtd
RETVAL=0
@@ -27,8 +27,8 @@
fi
check_dirs() {
- test -d /var/run/lsm || mkdir -p /var/run/lsm/ipc
- test -d /var/run/lsm/ipc || mkdir -p /var/run/lsm/ipc
+ test -d /run/lsm || mkdir -p /run/lsm/ipc
+ test -d /run/lsm/ipc || mkdir -p /run/lsm/ipc
}
status_lsm() {
diff -Naur libstoragemgmt-1.9.1.orig/packaging/libstoragemgmt.spec libstoragemgmt-1.9.1/packaging/libstoragemgmt.spec
--- libstoragemgmt-1.9.1.orig/packaging/libstoragemgmt.spec 2021-04-22 14:40:32.648139221 +0800
+++ libstoragemgmt-1.9.1/packaging/libstoragemgmt.spec 2021-04-22 14:56:16.814918561 +0800
@@ -265,7 +265,7 @@
%pre
getent group libstoragemgmt >/dev/null || groupadd -r libstoragemgmt
getent passwd libstoragemgmt >/dev/null || \
- useradd -r -g libstoragemgmt -d /var/run/lsm -s /sbin/nologin \
+ useradd -r -g libstoragemgmt -d /run/lsm -s /sbin/nologin \
-c "daemon account for libstoragemgmt" libstoragemgmt
%post
diff -Naur libstoragemgmt-1.9.1.orig/packaging/libstoragemgmt.spec.in libstoragemgmt-1.9.1/packaging/libstoragemgmt.spec.in
--- libstoragemgmt-1.9.1.orig/packaging/libstoragemgmt.spec.in 2021-04-22 14:40:32.648139221 +0800
+++ libstoragemgmt-1.9.1/packaging/libstoragemgmt.spec.in 2021-04-22 14:56:24.466975698 +0800
@@ -265,7 +265,7 @@
%pre
getent group libstoragemgmt >/dev/null || groupadd -r libstoragemgmt
getent passwd libstoragemgmt >/dev/null || \
- useradd -r -g libstoragemgmt -d /var/run/lsm -s /sbin/nologin \
+ useradd -r -g libstoragemgmt -d /run/lsm -s /sbin/nologin \
-c "daemon account for libstoragemgmt" libstoragemgmt
%post
diff -Naur libstoragemgmt-1.9.1.orig/python_binding/lsm/_common.py libstoragemgmt-1.9.1/python_binding/lsm/_common.py
--- libstoragemgmt-1.9.1.orig/python_binding/lsm/_common.py 2021-04-22 14:40:32.648139221 +0800
+++ libstoragemgmt-1.9.1/python_binding/lsm/_common.py 2021-04-22 14:50:10.312274721 +0800
@@ -153,7 +153,7 @@
return getattr(self.proxied_obj, _proxy_method_name)(*args, **kwargs)
# variable in client and specified on the command line for the daemon
-UDS_PATH = '/var/run/lsm/ipc'
+UDS_PATH = '/run/lsm/ipc'
# Set to True for verbose logging
LOG_VERBOSE = True