Blame SPECS/nvme-cli.spec

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