Blame SPECS/nvme-cli.spec

b220d3
#%%global commit0 bdbb4da0979fbdc079cf98410cdb31cf799e83b3
b220d3
#%%global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7})
b220d3
b220d3
Name:           nvme-cli
938651
Version:        1.16
938651
Release:        2%{?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/v%{version}.tar.gz
b220d3
8c735c
Patch0:         nvme-cli-makefile-dont-install-host-params-patch
938651
Patch1:         0001-fabrics-fix-nvme-connect-segfault-if-transport-type-.patch
b220d3
b220d3
BuildRequires:  libuuid-devel
b220d3
BuildRequires:  gcc
4e1cde
BuildRequires:  systemd-devel
2b7864
Requires:       util-linux
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
2776a8
%patch1 -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.
4e1cde
#rm -f %{buildroot}%{_sysconfdir}/nvme/hostid
4e1cde
#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
%{_unitdir}/nvmefc-boot-connections.service
8c735c
%{_unitdir}/nvmf-autoconnect.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
# Do not install the dracut rule yet.  See rhbz 1742764
b220d3
# /usr/lib/dracut/dracut.conf.d/70-nvmf-autoconnect.conf
b220d3
b220d3
%post
a0ab42
if [ $1 -eq 1 ] || [ $1 -eq 2 ]; then
a0ab42
        if [ ! -s %{_sysconfdir}/nvme/hostnqn ]; then
b220d3
		echo $(nvme gen-hostnqn) > %{_sysconfdir}/nvme/hostnqn
a0ab42
        fi
a0ab42
        if [ ! -s %{_sysconfdir}/nvme/hostid ]; then
b220d3
                uuidgen > %{_sysconfdir}/nvme/hostid
a0ab42
        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
2b7864
	exit 0
b220d3
fi
8c735c
b220d3
%changelog
938651
* Mon Nov 29 2021 Maurizio Lombardi <mlombard@redhat.com> - 1.16-2
938651
- Update to version 1.16
cce597
2776a8
* Thu Jul 22 2021 Maurizio Lombardi <mlombard@redhat.com> - 1.14-2
2776a8
- Merge various bugfixes
2776a8
e507cd
* Wed Apr 28 2021 Maurizio Lombardi <mlombard@redhat.com> - 1.14-1
e507cd
- Update to version v1.14
e507cd
e507cd
* Tue Apr 20 2021 Maurizio Lombardi <mlombard@redhat.com> - 1.13-4
e507cd
- Rebuild to mark bz1949462 as fixed
e507cd
e507cd
* Fri Apr 16 2021 Maurizio Lombardi <mlombard@redhat.com> - 1.13-3
e507cd
- KATO values fixes for various controllers
e507cd
e507cd
* Wed Apr 14 2021 Maurizio Lombardi <mlombard@redhat.com> - 1.13-2
e507cd
- Add dependency to util-linux and fix the post install script
e507cd
e507cd
* Wed Apr 14 2021 Maurizio Lombardi <mlombard@redhat.com> - 1.13-1
e507cd
- Update to 1.13
2b7864
8c735c
* Tue Jun 16 2020 Fedora Release Monitoring <release-monitoring@fedoraproject.org> - 1.12-1
8c735c
- Update to 1.12 (#1827581)
8c735c
8c735c
* Sat Apr 25 2020 luto@kernel.org - 1.11.1-1
8c735c
- Update to 1.11
8c735c
4e1cde
* Thu Mar 19 2020 luto@kernel.org - 1.10.1-1
4e1cde
- Update to 1.10.1
4e1cde
4e1cde
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.9-2
4e1cde
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
4e1cde
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.