From dec1123ba12e3db0dc362a0fcda8b6489b164ac7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=95=E5=85=89=E9=9B=81?= Date: Thu, 31 Aug 2023 09:00:20 +0000 Subject: [PATCH 1/2] Update rpmbuild spec, fix uninstallation issues for nvme-snsd. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 吕光雁 (cherry picked from commit c19c297f1eb585a049f2786064d20eb95e85867b) --- nvme-snsd.spec | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/nvme-snsd.spec b/nvme-snsd.spec index 1a72b6b..d6fe026 100644 --- a/nvme-snsd.spec +++ b/nvme-snsd.spec @@ -1,6 +1,6 @@ Name: nvme-snsd Version: 1.00.029 -Release: 2 +Release: 3 Summary: nvme-snsd service License: BSD 3-Clause Group: Applications/System @@ -43,10 +43,32 @@ rm -rf %{buildroot} chmod 0550 %{_bindir}/nvme-snsd chmod 0440 /usr/share/doc/snsd.conf chmod 0440 /usr/lib/systemd/system/nvme-snsd.service + +if [ ! -f /etc/nvme/snsd.conf ];then + mkdir -pv /etc/nvme/ + cat >/etc/nvme/snsd.conf <<"EOF" +[BASE] + ; The delay time of disconnecting device when net link down. Unit is second. + ; The recommended value is 0. + --restrain-time = 0 + +[SW] + ; Switching network configuration, mandatory: --host-traddr, --protocol + ; If "--host-traddr" is set to "any", other IP addresses cannot be configured for the switching network, All customer networks support SNSD. + ; eg: --host-traddr = xxxx | --protocol = roce + +[DC] + ; Configuration of the directly connected network, mandatory: --host-traddr, --protocol, --traddr + ; eg: --host-traddr = xxxx | --traddr = xxxx | --protocol = roce + +EOF + chmod 0644 /etc/nvme/snsd.conf +fi + systemctl enable nvme-snsd systemctl start nvme-snsd -%postun +%preun systemctl stop nvme-snsd systemctl disable nvme-snsd @@ -57,6 +79,9 @@ systemctl disable nvme-snsd /usr/lib/systemd/system/nvme-snsd.service %changelog +* Thu Aug 31 2023 Guangyan Lv - 1.00.029-3 +- Update rpmbuild spec, fix uninstallation issues for nvme-snsd. + * Sat Jul 30 2022 Ruozhu Li - 1.00.029-2 - Update src tar fetch from upstream release. -- Gitee From 219e2689edd2cb0bd6b383854dee0e3c2cab167b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=95=E5=85=89=E9=9B=81?= Date: Thu, 31 Aug 2023 09:07:34 +0000 Subject: [PATCH 2/2] update nvme-snsd.spec. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 吕光雁 (cherry picked from commit c69681cd518497a7ce8e37802360c2fab0179c6c) --- nvme-snsd.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvme-snsd.spec b/nvme-snsd.spec index d6fe026..33db7fc 100644 --- a/nvme-snsd.spec +++ b/nvme-snsd.spec @@ -7,7 +7,7 @@ Group: Applications/System URL: https://gitee.com/openeuler/%{name} Source: https://gitee.com/openeuler/%{name}/repository/archive/%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-root - +Requires: glibc BuildRequires: gcc,make,dos2unix %description -- Gitee