diff --git a/0002-fix-bugfix-when-exec-lsmd-help-attach-daemon.patch b/0002-fix-bugfix-when-exec-lsmd-help-attach-daemon.patch new file mode 100644 index 0000000..13271e1 --- /dev/null +++ b/0002-fix-bugfix-when-exec-lsmd-help-attach-daemon.patch @@ -0,0 +1,51 @@ +From 53593fddd4a243c6eb38794d1a4416db11bd5ec2 Mon Sep 17 00:00:00 2001 +From: Wu Bo +Date: Tue, 2 Jun 2020 11:49:10 +0800 +Subject: [PATCH] fix bugfix when exec lsmd help attach daemon + +$ lsmd --help +libStorageMgmt plug-in daemon. +lsmd [--plugindir ] [--socketdir ] [-v] [-d] + --plugindir = The directory where the plugins are located + --socketdir = The directory where the Unix domain sockets will be created + --confdir = The directory where the config files are located + -v = Verbose logging + -d = New style daemon (systemd) +$ ps -ef | grep lsmd +libstor+ 1366 1 0 Sep23 ? 00:00:00 /usr/bin/lsmd -d + +Signed-off-by: Wu Bo +--- + daemon/lsm_daemon.c | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/daemon/lsm_daemon.c b/daemon/lsm_daemon.c +index dc4df3b..65e337d 100644 +--- a/daemon/lsm_daemon.c ++++ b/daemon/lsm_daemon.c +@@ -829,6 +829,11 @@ int main(int argc, char *argv[]) + break; + } + ++ if (c == 'h') { ++ usage(); ++ return EXIT_SUCCESS; ++ } ++ + switch (c) { + case 0: + switch (option_index) { +@@ -844,10 +849,6 @@ int main(int argc, char *argv[]) + } + break; + +- case 'h': +- usage(); +- break; +- + case 'v': + verbose_flag = 1; + break; +-- +1.8.3.1 + diff --git a/libstoragemgmt.spec b/libstoragemgmt.spec index 8424839..6606803 100644 --- a/libstoragemgmt.spec +++ b/libstoragemgmt.spec @@ -2,13 +2,14 @@ %define with_python2 0 Name: libstoragemgmt Version: 1.8.0 -Release: 5 +Release: 6 Summary: Storage array management library License: LGPLv2+ URL: https://github.com/libstorage/libstoragemgmt Source0: https://github.com/libstorage/libstoragemgmt/releases/download/%{version}/%{name}-%{version}.tar.gz Patch1: 0001-change-run-dir.patch +Patch2: 0002-fix-bugfix-when-exec-lsmd-help-attach-daemon.patch BuildRequires: gcc gcc-c++ autoconf automake libtool libxml2-devel check-devel perl-interpreter BuildRequires: openssl-devel glib2-devel systemd bash-completion libconfig-devel systemd-devel @@ -370,6 +371,9 @@ fi %{_mandir}/man*/* %changelog +* Tue Jul 27 2021 yannglongkang - 1.8.0-6 +- fix bugfix when exec lsmd help attach daemon + * Tue Sep 29 2020 baizhonggui - 1.8.0-5 - Modify source0