diff --git a/nvme-snsd-1.00.008.tar.gz b/nvme-snsd-1.00.008.tar.gz new file mode 100644 index 0000000..3fba373 Binary files /dev/null and b/nvme-snsd-1.00.008.tar.gz differ diff --git a/nvme-snsd.spec b/nvme-snsd.spec new file mode 100644 index 0000000..7e17a11 --- /dev/null +++ b/nvme-snsd.spec @@ -0,0 +1,59 @@ +Name: nvme-snsd +Version: 1.00.008 +Release: 1 +Summary: nvme-snsd service +License: BSD 3-Clause +Group: Applications/System +URL: https://gitee.com/openeuler/redf +Source: %{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +BuildRequires: gcc,make,dos2unix + +%description +This is an independently deployable software that can simplify service deployment and configuration while reducing the impact of link failures on services . +When the storage device goes online, NVMe over Fabric target association/connection will be automatically created. Once a path between the host and the storage +is not reachable/offline, the device can detect the path change in time and switch the current fault path service to another to reduce the service downtime. + +%prep +%setup -q + +%build +dos2unix SNSD-VERSION-GEN +make clean +%make_build + +%install +if [ -d %{buildroot} ];then + rm -rf %{buildroot} +fi +mkdir -p %{buildroot}/usr/bin +mkdir -p %{buildroot}/usr/share/doc +mkdir -p %{buildroot}/usr/lib/systemd/system +cp -af %{_builddir}/%{name}-%{version}/script/nvme-snsd.service %{buildroot}/usr/lib/systemd/system +cp -af %{_builddir}/%{name}-%{version}/nvme-snsd %{buildroot}/usr/bin +cp -af %{_builddir}/%{name}-%{version}/test/config/snsd.conf %{buildroot}/usr/share/doc/ + +%clean +rm -rf %{buildroot} + +%pre + +%post +chmod 0550 %{_bindir}/nvme-snsd +chmod 0440 /usr/share/doc/snsd.conf +chmod 0440 /usr/lib/systemd/system/nvme-snsd.service +systemctl enable nvme-snsd +systemctl start nvme-snsd + +%postun +systemctl stop nvme-snsd +systemctl disable nvme-snsd + +%files +%defattr (-, root, root) +%{_bindir}/nvme-snsd +/usr/share/doc/snsd.conf +/usr/lib/systemd/system/nvme-snsd.service + +%changelog