|
|
b220d3 |
#%%global commit0 bdbb4da0979fbdc079cf98410cdb31cf799e83b3
|
|
|
b220d3 |
#%%global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7})
|
|
|
b220d3 |
|
|
|
b220d3 |
Name: nvme-cli
|
|
|
b220d3 |
Version: 1.9
|
|
|
b220d3 |
Release: 5%{?dist}
|
|
|
b220d3 |
Summary: NVMe management command line interface
|
|
|
b220d3 |
|
|
|
b220d3 |
License: GPLv2+
|
|
|
b220d3 |
URL: https://github.com/linux-nvme/nvme-cli
|
|
|
b220d3 |
#Source0: https://github.com/linux-nvme/%%{name}/archive/%%{commit0}.tar.gz
|
|
|
b220d3 |
Source0: https://github.com/linux-nvme/%{name}/archive/v%{version}.tar.gz
|
|
|
b220d3 |
|
|
|
b220d3 |
Patch0: nvmf-autoconnect-fix-abls-path-systemctl-patch
|
|
|
b220d3 |
Patch1: systemd-fix-echo-call-with-absolute-path-patch
|
|
|
b220d3 |
Patch2: nvme-cli-check-sysfs-interface-before-nvme-disc-patch
|
|
|
b220d3 |
Patch3: nvmf-autoconnect-add-udev-rules-to-set-iopolicy-netapp-patch
|
|
|
b220d3 |
Patch4: fix-systemd-service-script-use-connect-args-patch
|
|
|
b220d3 |
|
|
|
b220d3 |
BuildRequires: libuuid-devel
|
|
|
b220d3 |
BuildRequires: gcc
|
|
|
b220d3 |
BuildRequires: systemd
|
|
|
b220d3 |
|
|
|
b220d3 |
%description
|
|
|
b220d3 |
nvme-cli provides NVM-Express user space tooling for Linux.
|
|
|
b220d3 |
|
|
|
b220d3 |
%prep
|
|
|
b220d3 |
#%%setup -qn %%{name}-%%{commit0}
|
|
|
b220d3 |
%setup -q
|
|
|
b220d3 |
%patch0 -p1
|
|
|
b220d3 |
%patch1 -p1
|
|
|
b220d3 |
%patch2 -p1
|
|
|
b220d3 |
%patch3 -p1
|
|
|
b220d3 |
%patch4 -p1
|
|
|
b220d3 |
|
|
|
b220d3 |
%build
|
|
|
b220d3 |
|
|
|
b220d3 |
# CFLAGS on the command line breaks the build. It works okay as an
|
|
|
b220d3 |
# environment variable, though. See:
|
|
|
b220d3 |
# https://github.com/linux-nvme/nvme-cli/pull/480
|
|
|
b220d3 |
CFLAGS="%{optflags}" make PREFIX=/usr LDFLAGS="%{__global_ldflags}" %{?_smp_mflags}
|
|
|
b220d3 |
|
|
|
b220d3 |
|
|
|
b220d3 |
%install
|
|
|
b220d3 |
%make_install PREFIX=/usr UDEVDIR="%{_udevrulesdir}/.." SYSTEMDDIR="%{_unitdir}/.."
|
|
|
b220d3 |
mkdir -p %{buildroot}%{_sysconfdir}/nvme
|
|
|
b220d3 |
|
|
|
b220d3 |
# hostid and hostnqn are supposed to be unique per machine. We obviously
|
|
|
b220d3 |
# can't package them.
|
|
|
b220d3 |
# rm -f %{buildroot}%{_sysconfdir}/nvme/hostid
|
|
|
b220d3 |
# rm -f %{buildroot}%{_sysconfdir}/nvme/hostnqn
|
|
|
b220d3 |
|
|
|
b220d3 |
# Do not install the dracut rule yet. See rhbz 1742764
|
|
|
b220d3 |
rm -f %{buildroot}/usr/lib/dracut/dracut.conf.d/70-nvmf-autoconnect.conf
|
|
|
b220d3 |
|
|
|
b220d3 |
|
|
|
b220d3 |
%files
|
|
|
b220d3 |
%license LICENSE
|
|
|
b220d3 |
%doc README.md
|
|
|
b220d3 |
%{_sbindir}/nvme
|
|
|
b220d3 |
%{_mandir}/man1/nvme*.gz
|
|
|
b220d3 |
%{_datadir}/bash-completion/completions/nvme
|
|
|
b220d3 |
%{_datadir}/zsh/site-functions/_nvme
|
|
|
b220d3 |
%dir %{_sysconfdir}/nvme
|
|
|
b220d3 |
%{_sysconfdir}/nvme/hostnqn
|
|
|
b220d3 |
%{_sysconfdir}/nvme/hostid
|
|
|
b220d3 |
%{_sysconfdir}/nvme/discovery.conf
|
|
|
b220d3 |
%{_unitdir}/nvmefc-boot-connections.service
|
|
|
b220d3 |
%{_unitdir}/nvmf-connect.target
|
|
|
b220d3 |
%{_unitdir}/nvmf-connect@.service
|
|
|
b220d3 |
%{_udevrulesdir}/70-nvmf-autoconnect.rules
|
|
|
b220d3 |
%{_udevrulesdir}/71-nvmf-iopolicy-netapp.rules
|
|
|
b220d3 |
|
|
|
b220d3 |
# Do not install the dracut rule yet. See rhbz 1742764
|
|
|
b220d3 |
# /usr/lib/dracut/dracut.conf.d/70-nvmf-autoconnect.conf
|
|
|
b220d3 |
|
|
|
b220d3 |
%post
|
|
|
b220d3 |
if [ $1 -eq 1 ]; then # 1 : This package is being installed for the first time
|
|
|
b220d3 |
if [ ! -s %{_sysconfdir}/nvme/hostnqn ]; then
|
|
|
b220d3 |
echo $(nvme gen-hostnqn) > %{_sysconfdir}/nvme/hostnqn
|
|
|
b220d3 |
fi
|
|
|
b220d3 |
if [ ! -s %{_sysconfdir}/nvme/hostid ]; then
|
|
|
b220d3 |
uuidgen > %{_sysconfdir}/nvme/hostid
|
|
|
b220d3 |
fi
|
|
|
b220d3 |
|
|
|
b220d3 |
# apply udev and systemd changes that we did
|
|
|
b220d3 |
systemctl enable nvmefc-boot-connections
|
|
|
b220d3 |
systemctl daemon-reload
|
|
|
b220d3 |
udevadm control --reload-rules && udevadm trigger
|
|
|
b220d3 |
fi
|
|
|
b220d3 |
|
|
|
b220d3 |
%changelog
|
|
|
b220d3 |
* Wed Oct 02 2019 luto@kernel.org - 1.9-1
|
|
|
b220d3 |
- Update to 1.9
|
|
|
b220d3 |
- Certain fabric functionality may not work yet due to missing dracut
|
|
|
b220d3 |
support and missing hostid and hostnqn configuration.
|
|
|
b220d3 |
|
|
|
b220d3 |
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.1-2
|
|
|
b220d3 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
b220d3 |
|
|
|
b220d3 |
* Mon Apr 15 2019 luto@kernel.org - 1.8.1-1
|
|
|
b220d3 |
- Update to 1.8.1-1.
|
|
|
b220d3 |
- Remove a build hack.
|
|
|
b220d3 |
|
|
|
b220d3 |
* Sun Feb 24 2019 luto@kernel.org - 1.7-2
|
|
|
b220d3 |
- Create /etc/nvme
|
|
|
b220d3 |
|
|
|
b220d3 |
* Sun Feb 24 2019 luto@kernel.org - 1.7-1
|
|
|
b220d3 |
- Bump to 1.7
|
|
|
b220d3 |
- Clean up some trivial rpmlint complaints
|
|
|
b220d3 |
|
|
|
b220d3 |
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.6-2
|
|
|
b220d3 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
b220d3 |
|
|
|
b220d3 |
* Tue Jul 24 2018 luto@kernel.org - 1.6-1
|
|
|
b220d3 |
- Update to 1.6
|
|
|
b220d3 |
|
|
|
b220d3 |
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-5
|
|
|
b220d3 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
b220d3 |
|
|
|
b220d3 |
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-4
|
|
|
b220d3 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
b220d3 |
|
|
|
b220d3 |
* Wed Nov 22 2017 luto@kernel.org - 1.4-1
|
|
|
b220d3 |
- Update to 1.4
|
|
|
b220d3 |
|
|
|
b220d3 |
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-3
|
|
|
b220d3 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
|
|
b220d3 |
|
|
|
b220d3 |
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-2
|
|
|
b220d3 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
b220d3 |
|
|
|
b220d3 |
* Mon May 22 2017 luto@kernel.org - 1.3-1
|
|
|
b220d3 |
- Update to 1.3
|
|
|
b220d3 |
|
|
|
b220d3 |
* Wed Apr 19 2017 luto@kernel.org - 1.2-2
|
|
|
b220d3 |
- Update to 1.2
|
|
|
b220d3 |
- 1.2-1 never existed
|
|
|
b220d3 |
|
|
|
b220d3 |
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-2
|
|
|
b220d3 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
b220d3 |
|
|
|
b220d3 |
* Wed Feb 01 2017 luto@kernel.org - 1.1-1
|
|
|
b220d3 |
- Update to 1.1
|
|
|
b220d3 |
|
|
|
b220d3 |
* Sun Nov 20 2016 luto@kernel.org - 1.0-1
|
|
|
b220d3 |
- Update to 1.0
|
|
|
b220d3 |
|
|
|
b220d3 |
* Mon Oct 31 2016 luto@kernel.org - 0.9-1
|
|
|
b220d3 |
- Update to 0.9
|
|
|
b220d3 |
|
|
|
b220d3 |
* Thu Jun 30 2016 luto@kernel.org - 0.8-1
|
|
|
b220d3 |
- Update to 0.8
|
|
|
b220d3 |
|
|
|
b220d3 |
* Tue May 31 2016 luto@kernel.org - 0.7-1
|
|
|
b220d3 |
- Update to 0.7
|
|
|
b220d3 |
|
|
|
b220d3 |
* Fri Mar 18 2016 luto@kernel.org - 0.5-1
|
|
|
b220d3 |
- Update to 0.5
|
|
|
b220d3 |
|
|
|
b220d3 |
* Sun Mar 06 2016 luto@kernel.org - 0.4-1
|
|
|
b220d3 |
- Update to 0.4
|
|
|
b220d3 |
|
|
|
b220d3 |
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.2-3.20160112gitbdbb4da
|
|
|
b220d3 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
b220d3 |
|
|
|
b220d3 |
* Wed Jan 20 2016 luto@kernel.org - 0.2-2.20160112gitbdbb4da
|
|
|
b220d3 |
- Update to new upstream commit, fixing #49. "nvme list" now works.
|
|
|
b220d3 |
|
|
|
b220d3 |
* Wed Jan 13 2016 luto@kernel.org - 0.2-1.20160112gitde3e0f1
|
|
|
b220d3 |
- Initial import.
|