Name: nvme-cli
Version: 2.16
Release: 2
Summary: NVMe management command line interface
License: GPL-2.0-only
URL: https://github.com/linux-nvme/nvme-cli
Source0: https://github.com/linux-nvme/%{name}/archive/v%{version}.tar.gz
Source1: 99-nvme-nbft-connect.sh
Source2: 99-nvme-nbft-no-ignore-carrier.conf
Patch0001: 0001-nvme-do-not-report-error-when-nvme_core-module-is-no.patch
BuildRequires: gcc make
BuildRequires: meson >= 0.50.0
BuildRequires: pkgconfig(json-c) >= 0.13
BuildRequires: pkgconfig(libnvme) >= 1.%{version_minor}
BuildRequires: pkgconfig(libnvme-mi)
BuildRequires: rpm_macro(_unitdir)
BuildRequires: rpm_macro(_udevrulesdir)
%{?systemd_requires}
%description
nvme-cli provides NVM-Express user space tooling for Linux.
%package_help
%prep
%autosetup -p1
%build
%meson -Ddocs=man -Dsystemddir=%{_unitdir} -Dudevrulesdir=%{_udevrulesdir}
%meson_build
%install
%meson_install
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/NetworkManager/dispatcher.d
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/NetworkManager/conf.d
%{__install} -pm 755 %{S:1} $RPM_BUILD_ROOT%{_prefix}/lib/NetworkManager/dispatcher.d/
%{__install} -pm 644 %{S:2} $RPM_BUILD_ROOT%{_prefix}/lib/NetworkManager/conf.d/
# hostid and hostnqn are supposed to be unique per machine. We obviously
# can't package them.
rm -f %{buildroot}%{_sysconfdir}/nvme/hostid
rm -f %{buildroot}%{_sysconfdir}/nvme/hostnqn
# Do not install the dracut rule yet. See rhbz 1742764
rm -f %{buildroot}/usr/lib/dracut/dracut.conf.d/70-nvmf-autoconnect.conf
%post
%systemd_post nvmefc-boot-connections.service
%systemd_post nvmf-autoconnect.service
%systemd_post nvmf-connect@.service
%systemd_post nvmf-connect-nbft.service
if [ -S /run/udev/control ]; then
udevadm control --reload
udevadm trigger
fi
%preun
%systemd_preun nvmefc-boot-connections.service
%systemd_preun nvmf-autoconnect.service
%systemd_preun nvmf-connect@.service
%systemd_preun nvmf-connect-nbft.service
%postun
%systemd_postun nvmefc-boot-connections.service
%systemd_postun nvmf-autoconnect.service
%systemd_postun nvmf-connect@.service
%systemd_postun nvmf-connect-nbft.service
%files
%license LICENSE
%{_sbindir}/nvme
%{_datadir}/bash-completion/completions/nvme
%{_datadir}/zsh/site-functions/_nvme
%dir %{_sysconfdir}/nvme
%{_sysconfdir}/nvme/discovery.conf
%{_unitdir}/nvmefc-boot-connections.service
%{_unitdir}/nvmf-autoconnect.service
%{_unitdir}/nvmf-connect.target
%{_unitdir}/nvmf-connect@.service
%{_unitdir}/nvmf-connect-nbft.service
%{_udevrulesdir}/71-nvmf-hpe.rules
%{_udevrulesdir}/70-nvmf-autoconnect.rules
%{_udevrulesdir}/70-nvmf-keys.rules
%{_udevrulesdir}/71-nvmf-netapp.rules
%{_udevrulesdir}/71-nvmf-vastdata.rules
%{_udevrulesdir}/65-persistent-net-nbft.rules
%{_prefix}/lib/NetworkManager/dispatcher.d/99-nvme-nbft-connect.sh
%{_prefix}/lib/NetworkManager/conf.d/99-nvme-nbft-no-ignore-carrier.conf
%files help
%doc README.md
%{_mandir}/man1/nvme*
%changelog
* Mon Jun 1 2026 kouwenqi <kouwenqi@kylinos.cn> - 2.16-2
- do not report error when nvme_core module is not loaded
* Tue Nov 04 2025 Funda Wang <fundawang@yeah.net> - 2.16-1
- update to version 2.16
* Fri Jul 25 2025 Funda Wang <fundawang@yeah.net> - 2.15-1
- update to version 2.15
* Sat Apr 12 2025 Funda Wang <fundawang@yeah.net> - 2.13-1
- update to version 2.13
* Sat May 11 2024 tenglei <tenglei@kylinos.cn> - 2.9.1-1
- Update package to version 2.9.1
- There a lot of small fixes and improvements all over the place
- There are two plugins ssstc and spdk in this release
* Thu Mar 21 2024 panchenbo <panchenbo@kylinsec.com.cn> - 2.8-1
- Update to version 2.8
* Thu Feb 9 2023 Hongtao Zhang <zhanghongtao22@huawei.com> - 2.2.1-2
- Fix meson build failed
* Mon Dec 19 2022 Qiang Wei <qiang.wei@suse.com> - 2.2.1-1
- Update to version 2.2.1.
* Remove 0001-bash-Fix-nvme-completion.patch, it is fixed in upstream.
* backport upstream patch: Bash completion: move global declare into function.
* Sat Oct 8 2022 zhanghongtao <zhanghongtao22@huawei.com> - 1.16-2
- bash Fix nvme completion
* Wed Dec 29 2021 baizhonggui <baizhonggui@huawei.com> - 1.16-1
- update to 1.16
* Tue Nov 19 2019 mengxian@huawei.com - 1.6-2
- Package init