Blame SPECS/nvme-cli.spec

b1bebd
#%global commit0 bdbb4da0979fbdc079cf98410cdb31cf799e83b3
b1bebd
#%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
b1bebd
b1bebd
Name:           nvme-cli
b1bebd
Version:        1.8.1
b1bebd
Release:        3%{?dist}
b1bebd
Summary:        NVMe management command line interface
b1bebd
b1bebd
License:        GPLv2+
b1bebd
URL:            https://github.com/linux-nvme/nvme-cli
b1bebd
#Source0:        https://github.com/linux-nvme/%{name}/archive/%{commit0}.tar.gz
b1bebd
Source0:        https://github.com/linux-nvme/%{name}/archive/v%{version}.tar.gz
b1bebd
b1bebd
Patch0:         nvme-cli-fix-typo-removing-dup-are-patch
b1bebd
Patch1:         nvme-cli-regen-docs-patch
b1bebd
Patch2:         nvme-ioctl-fix-double-free-in-a-loop-of-get-property-patch 
b1bebd
Patch3:         nvme-ioctl-fix-wrong-ret-case-of-get-prop-patch
b1bebd
b1bebd
BuildRequires:	libuuid-devel
b1bebd
BuildRequires:	gcc
b1bebd
b1bebd
%description
b1bebd
nvme-cli provides NVM-Express user space tooling for Linux.
b1bebd
b1bebd
%prep
b1bebd
#%setup -qn %{name}-%{commit0}
b1bebd
%setup
b1bebd
%patch0 -p1
b1bebd
%patch1 -p1
b1bebd
%patch2 -p1
b1bebd
%patch3 -p1
b1bebd
b1bebd
%build
b1bebd
# NB: the -I. part works around a bug fixed up stream by commit 254bcd6b2343
b1bebd
# ("Fix CFLAGS parameter").  Rather than patching the fix in, I just added
b1bebd
# an extra -I.  In the next release, we should be able to drop this hack.
b1bebd
make PREFIX=/usr CFLAGS="%{optflags} -std=c99 -I." LDFLAGS="%{__global_ldflags}" %{?_smp_mflags}
b1bebd
b1bebd
b1bebd
%install
b1bebd
%make_install PREFIX=/usr
b1bebd
mkdir -p %{buildroot}%{_sysconfdir}/nvme
b1bebd
b1bebd
b1bebd
%files
b1bebd
%license LICENSE
b1bebd
%doc README.md
b1bebd
%{_sbindir}/nvme
b1bebd
%{_mandir}/man1/nvme*.gz
b1bebd
%{_datadir}/bash-completion/completions/nvme
b1bebd
%{_datadir}/zsh/site-functions/_nvme
b1bebd
%dir %{_sysconfdir}/nvme
b1bebd
b1bebd
%clean
b1bebd
rm -rf $RPM_BUILD_ROOT
b1bebd
b1bebd
%post
b1bebd
if [ $1 = 1 ]; then # 1 : This package is being installed for the first time
b1bebd
	if [ ! -f /etc/nvme/hostnqn ]; then
b1bebd
		install -D /dev/null /etc/nvme/hostnqn
b1bebd
		echo $(nvme gen-hostnqn) > /etc/nvme/hostnqn
b1bebd
		chmod 644 /etc/nvme/hostnqn
b1bebd
        fi
b1bebd
        if [ ! -f /etc/nvme/hostid ]; then
b1bebd
                uuidgen > /etc/nvme/hostid
b1bebd
        fi
b1bebd
fi
b1bebd
b1bebd
%preun
b1bebd
if [ -d /etc/nvme ]; then
b1bebd
	rm -f /etc/nvme/hostnqn
b1bebd
	rm -f /etc/nvme/hostid
b1bebd
	if [ ! -n "`ls -A /etc/nvme`" ]; then
b1bebd
		rm -rf /etc/nvme
b1bebd
	fi
b1bebd
fi
b1bebd
b1bebd
%changelog
b1bebd
* Tue May 08 2019 dmilburn@redhat.com - 1.8.1-3
b1bebd
- Fix show_regs over RDMA with get_prop fix.
b1bebd
b1bebd
* Mon Apr 29 2019 dmilburn@redhat.com - 1.8.1-2
b1bebd
- Fix show_regs with upstream ioctl fix.
b1bebd
b1bebd
* Mon Apr 15 2019 luto@kernel.org - 1.8.1-1
b1bebd
- Update to 1.8.1-1.
b1bebd
- Remove a build hack.
b1bebd
b1bebd
* Sun Feb 24 2019 luto@kernel.org - 1.7-2
b1bebd
- Create /etc/nvme
b1bebd
b1bebd
* Sun Feb 24 2019 luto@kernel.org - 1.7-1
b1bebd
- Bump to 1.7
b1bebd
- Clean up some trivial rpmlint complaints
b1bebd
b1bebd
* Tue Oct 16 2018 dmilburn@redhat.com - 1.6-2
b1bebd
- Pull in upstream fixes
b1bebd
b1bebd
* Tue Jul 24 2018 luto@kernel.org - 1.6-1
b1bebd
- Update to 1.6
b1bebd
b1bebd
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-5
b1bebd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
b1bebd
b1bebd
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-4
b1bebd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
b1bebd
b1bebd
* Wed Nov 22 2017 luto@kernel.org - 1.4-1
b1bebd
- Update to 1.4
b1bebd
b1bebd
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-3
b1bebd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
b1bebd
b1bebd
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-2
b1bebd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
b1bebd
b1bebd
* Mon May 22 2017 luto@kernel.org - 1.3-1
b1bebd
- Update to 1.3
b1bebd
b1bebd
* Wed Apr 19 2017 luto@kernel.org - 1.2-2
b1bebd
- Update to 1.2
b1bebd
- 1.2-1 never existed
b1bebd
b1bebd
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-2
b1bebd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
b1bebd
b1bebd
* Wed Feb 01 2017 luto@kernel.org - 1.1-1
b1bebd
- Update to 1.1
b1bebd
b1bebd
* Sun Nov 20 2016 luto@kernel.org - 1.0-1
b1bebd
- Update to 1.0
b1bebd
b1bebd
* Mon Oct 31 2016 luto@kernel.org - 0.9-1
b1bebd
- Update to 0.9
b1bebd
b1bebd
* Thu Jun 30 2016 luto@kernel.org - 0.8-1
b1bebd
- Update to 0.8
b1bebd
b1bebd
* Tue May 31 2016 luto@kernel.org - 0.7-1
b1bebd
- Update to 0.7
b1bebd
b1bebd
* Fri Mar 18 2016 luto@kernel.org - 0.5-1
b1bebd
- Update to 0.5
b1bebd
b1bebd
* Sun Mar 06 2016 luto@kernel.org - 0.4-1
b1bebd
- Update to 0.4
b1bebd
b1bebd
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.2-3.20160112gitbdbb4da
b1bebd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
b1bebd
b1bebd
* Wed Jan 20 2016 luto@kernel.org - 0.2-2.20160112gitbdbb4da
b1bebd
- Update to new upstream commit, fixing #49.  "nvme list" now works.
b1bebd
b1bebd
* Wed Jan 13 2016 luto@kernel.org - 0.2-1.20160112gitde3e0f1
b1bebd
- Initial import.