Blame SPECS/nvme-cli.spec

aeaa63
#%global commit0 bdbb4da0979fbdc079cf98410cdb31cf799e83b3
aeaa63
#%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
aeaa63
aeaa63
Name:           nvme-cli
44bbf1
Version:        1.8.1
44bbf1
Release:        3%{?dist}
aeaa63
Summary:        NVMe management command line interface
aeaa63
aeaa63
License:        GPLv2+
aeaa63
URL:            https://github.com/linux-nvme/nvme-cli
aeaa63
#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
44bbf1
Patch0:         nvme-cli-fix-typo-removing-dup-are-patch
44bbf1
Patch1:         nvme-cli-regen-docs-patch
44bbf1
Patch2:         nvme-ioctl-fix-double-free-in-a-loop-of-get-property-patch 
44bbf1
Patch3:         nvme-ioctl-fix-wrong-ret-case-of-get-prop-patch
8b3e94
aeaa63
BuildRequires:	libuuid-devel
aeaa63
BuildRequires:	gcc
aeaa63
aeaa63
%description
aeaa63
nvme-cli provides NVM-Express user space tooling for Linux.
aeaa63
aeaa63
%prep
aeaa63
#%setup -qn %{name}-%{commit0}
aeaa63
%setup
8b3e94
%patch0 -p1
8b3e94
%patch1 -p1
8b3e94
%patch2 -p1
8b3e94
%patch3 -p1
aeaa63
aeaa63
%build
44bbf1
# NB: the -I. part works around a bug fixed up stream by commit 254bcd6b2343
44bbf1
# ("Fix CFLAGS parameter").  Rather than patching the fix in, I just added
44bbf1
# an extra -I.  In the next release, we should be able to drop this hack.
8b3e94
make PREFIX=/usr CFLAGS="%{optflags} -std=c99 -I." LDFLAGS="%{__global_ldflags}" %{?_smp_mflags}
aeaa63
aeaa63
aeaa63
%install
aeaa63
%make_install PREFIX=/usr
44bbf1
mkdir -p %{buildroot}%{_sysconfdir}/nvme
aeaa63
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
aeaa63
aeaa63
%clean
aeaa63
rm -rf $RPM_BUILD_ROOT
aeaa63
aeaa63
%post
aeaa63
if [ $1 = 1 ]; then # 1 : This package is being installed for the first time
aeaa63
	if [ ! -f /etc/nvme/hostnqn ]; then
aeaa63
		install -D /dev/null /etc/nvme/hostnqn
aeaa63
		echo $(nvme gen-hostnqn) > /etc/nvme/hostnqn
aeaa63
		chmod 644 /etc/nvme/hostnqn
aeaa63
        fi
aeaa63
        if [ ! -f /etc/nvme/hostid ]; then
aeaa63
                uuidgen > /etc/nvme/hostid
aeaa63
        fi
aeaa63
fi
aeaa63
aeaa63
%preun
aeaa63
if [ -d /etc/nvme ]; then
aeaa63
	rm -f /etc/nvme/hostnqn
aeaa63
	rm -f /etc/nvme/hostid
aeaa63
	if [ ! -n "`ls -A /etc/nvme`" ]; then
aeaa63
		rm -rf /etc/nvme
aeaa63
	fi
aeaa63
fi
aeaa63
aeaa63
%changelog
44bbf1
* Tue May 08 2019 dmilburn@redhat.com - 1.8.1-3
44bbf1
- Fix show_regs over RDMA with get_prop fix.
44bbf1
44bbf1
* Mon Apr 29 2019 dmilburn@redhat.com - 1.8.1-2
44bbf1
- Fix show_regs with upstream ioctl fix.
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
aeaa63
* Tue Oct 16 2018 dmilburn@redhat.com - 1.6-2
aeaa63
- Pull in upstream fixes
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.