Rolf Fokkens d3252f2
#global gitdate 20131018
Rolf Fokkens a22525a
Rolf Fokkens 68214a3
%if 0%{?fedora} >= 23
Rolf Fokkens 68214a3
%global need_python3 1
Rolf Fokkens 68214a3
%else
Rolf Fokkens 68214a3
%global need_python3 0
Rolf Fokkens 68214a3
%endif
Rolf Fokkens 68214a3
Rolf Fokkens a22525a
Summary: Tools for Linux kernel block layer cache
Rolf Fokkens a22525a
Name: bcache-tools
Rolf Fokkens 44fdd8c
Version: 1.0.8
28d54dd
Release: 5%{?dist}
Rolf Fokkens a22525a
License: GPLv2
Rolf Fokkens a22525a
Group: System Environment/Base
Rolf Fokkens a22525a
URL: http://bcache.evilpiepirate.org/
Rolf Fokkens 44fdd8c
VCS: https://github.com/g2p/bcache-tools.git
Rolf Fokkens 44fdd8c
# git clone https://github.com/g2p/bcache-tools.git
Rolf Fokkens a22525a
# cd bcache-tools/
Rolf Fokkens 44fdd8c
# git archive --format=tar --prefix=bcache-tools-1.0.8/ v1.0.8 | gzip > ../bcache-tools-1.0.8.tar.gz
Rolf Fokkens a7e7cba
Source0: %{name}-%{version}.tar.gz
Rolf Fokkens 44fdd8c
# This part is a prerelease version obtained by https://gist.github.com/djwong/6343451:
Rolf Fokkens a22525a
# git clone https://gist.github.com/6343451.git
Rolf Fokkens a22525a
# cd 6343451/
Rolf Fokkens af494d6
# git archive --format=tar --prefix=bcache-status-20140220/ 6d278f9886ab5f64bd896080b1b543ba7ef6c7a6 | gzip > ../bcache-status-20140220.tar.gz
Rolf Fokkens a22525a
# see also http://article.gmane.org/gmane.linux.kernel.bcache.devel/1951
Rolf Fokkens af494d6
Source1: bcache-status-20140220.tar.gz
Rolf Fokkens 64697ee
# bcache status not provided as a true package, so this is a self maintained
Rolf Fokkens 64697ee
# man page for it
Rolf Fokkens a22525a
# http://article.gmane.org/gmane.linux.kernel.bcache.devel/1946
Rolf Fokkens a22525a
Patch0: %{name}-status-20130826-man.patch
Rolf Fokkens 64697ee
# configure is not "Fedora compliant", do a small step in the
Rolf Fokkens a22525a
# right direction
Rolf Fokkens 64697ee
Patch2: %{name}-20131018-fedconf.patch
Rolf Fokkens 64697ee
# util-linux takes care of bcache superblock identification so we remove
Rolf Fokkens 64697ee
# the probe-cache call (which is Fedora specific):
Rolf Fokkens 44fdd8c
Patch3: %{name}-1.0.8-noprobe.patch
Rolf Fokkens 239619e
# the following fix is pending upstream
Rolf Fokkens 239619e
# gcc 5.1.1 apparently is more picky than Fedora 21 gcc
Rolf Fokkens 239619e
Patch4: bcache-tools-1.0.8-crc64.patch
Rolf Fokkens 68214a3
# Fedora 23 uses python3 by default
Rolf Fokkens 68214a3
Patch5: bcache-status-python3.patch
Rolf Fokkens a22525a
Rolf Fokkens 68214a3
%if %{need_python3}
Rolf Fokkens 68214a3
Requires: python3
Rolf Fokkens 68214a3
%else
Rolf Fokkens a22525a
Requires: python
Rolf Fokkens 68214a3
%endif
Rolf Fokkens 967538d
# This is a kind of soft dependency: because we don't include probe-bcache
Rolf Fokkens 967538d
# we have to make sure that libblkid is able to identify bcache. So this
Rolf Fokkens 967538d
# is why it requires recent libblkid.
Rolf Fokkens 967538d
Requires: libblkid >= 2.24
Rolf Fokkens 6379c9c
Conflicts: dracut < 034
Rolf Fokkens cbdf1ac
BuildRequires: libuuid-devel libblkid-devel systemd
Rolf Fokkens a22525a
Rolf Fokkens a22525a
%description
Rolf Fokkens a22525a
Bcache is a Linux kernel block layer cache. It allows one or more fast disk
Rolf Fokkens a22525a
drives such as flash-based solid state drives (SSDs) to act as a cache for
Rolf Fokkens a22525a
one or more slower hard disk drives.
Rolf Fokkens a22525a
This package contains the utilities for manipulating bcache.
Rolf Fokkens a22525a
Rolf Fokkens a22525a
%global _udevlibdir %{_prefix}/lib/udev
Rolf Fokkens 6379c9c
%global dracutlibdir %{_prefix}/lib/dracut
Rolf Fokkens a22525a
Rolf Fokkens a22525a
%prep
Rolf Fokkens a7e7cba
%setup -q -n bcache-tools-%{version}
Rolf Fokkens a22525a
tar xzf %{SOURCE1} --strip-components=1
Rolf Fokkens a22525a
%patch0 -p1 -b .man
Rolf Fokkens 967538d
%patch2 -p1 -b .fedconfmake
Rolf Fokkens a22525a
chmod +x configure
Rolf Fokkens 64697ee
%patch3 -p1 -b .noprobe
Rolf Fokkens 239619e
%patch4 -p1 -b .crc64
Rolf Fokkens a22525a
Rolf Fokkens 68214a3
%if %{need_python3}
Rolf Fokkens 68214a3
%patch5 -p1 -b .python3
Rolf Fokkens 68214a3
%endif
Rolf Fokkens 68214a3
Rolf Fokkens a22525a
%build
Rolf Fokkens a22525a
%configure
Rolf Fokkens a22525a
make %{?_smp_mflags}
Rolf Fokkens a22525a
Rolf Fokkens a22525a
%install
Rolf Fokkens a22525a
mkdir -p \
Rolf Fokkens a22525a
    %{buildroot}%{_sbindir} \
Rolf Fokkens a22525a
    %{buildroot}%{_mandir}/man8 \
Rolf Fokkens a22525a
    %{buildroot}%{_udevlibdir} \
Rolf Fokkens 6379c9c
    %{buildroot}%{_udevrulesdir} \
Rolf Fokkens 6379c9c
    %{buildroot}%{dracutlibdir}/modules.d
Rolf Fokkens a22525a
Rolf Fokkens a22525a
%make_install \
Rolf Fokkens 64697ee
    INSTALL="install -p" \
Rolf Fokkens a22525a
    UDEVLIBDIR=%{_udevlibdir} \
Rolf Fokkens 6379c9c
    DRACUTLIBDIR=%{dracutlibdir} \
Rolf Fokkens a22525a
    MANDIR=%{_mandir}
Rolf Fokkens a22525a
Rolf Fokkens 967538d
# prevent complaints when checking for unpackaged files
Rolf Fokkens 64697ee
rm %{buildroot}%{_udevlibdir}/probe-bcache
Rolf Fokkens 967538d
rm %{buildroot}%{_mandir}/man8/probe-bcache.8
Rolf Fokkens 44fdd8c
rm %{buildroot}%{_prefix}/lib/initcpio/install/bcache
Rolf Fokkens 44fdd8c
rm %{buildroot}%{_datarootdir}/initramfs-tools/hooks/bcache
Rolf Fokkens 44fdd8c
Rolf Fokkens 6379c9c
Rolf Fokkens a22525a
install -p  -m 755 bcache-status %{buildroot}%{_sbindir}/bcache-status
Rolf Fokkens a22525a
Rolf Fokkens a22525a
%files
Rolf Fokkens a22525a
%doc README COPYING
Rolf Fokkens a22525a
%{_udevrulesdir}/*
Rolf Fokkens a22525a
%{_mandir}/man8/*
Rolf Fokkens a22525a
%{_udevlibdir}/bcache-register
Rolf Fokkens a22525a
%{_sbindir}/bcache-super-show
Rolf Fokkens a22525a
%{_sbindir}/bcache-status
Rolf Fokkens a22525a
%{_sbindir}/make-bcache
Rolf Fokkens 6379c9c
%{dracutlibdir}/modules.d/90bcache
Rolf Fokkens a22525a
Rolf Fokkens a22525a
%changelog
28d54dd
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.8-5
28d54dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
28d54dd
Rolf Fokkens 68214a3
* Sat Jun 20 2015 Rolf Fokkens <rolf@rolffokkens.nl> - 1.0.8-4
Rolf Fokkens 68214a3
- bcache-status now explicitly uses python3 not python on Fedora 23 and up
Rolf Fokkens 68214a3
5d1aac8
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.8-3
5d1aac8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
5d1aac8
Rolf Fokkens 239619e
* Fri May 22 2015 Rolf Fokkens <rolf@rolffokkens.nl> - 1.0.8-2
Rolf Fokkens 239619e
- (#1224384) Now compiles on Fedora 22 / gcc 5.1.1
Rolf Fokkens 239619e
Rolf Fokkens 44fdd8c
* Fri Dec 05 2014 Rolf Fokkens <rolf@rolffokkens.nl> - 1.0.8-1
Rolf Fokkens 44fdd8c
- Sourced now from https://github.com/g2p/bcache-tools.git
c3bd306
8a5e8f4
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-2
8a5e8f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
8a5e8f4
Rolf Fokkens a7e7cba
* Sat May 10 2014 Rolf Fokkens <rolf@rolffokkens.nl> - 0.9-1
Rolf Fokkens a7e7cba
- Using the v0.9 git tag instead of the commit#
Rolf Fokkens d3252f2
- Removed obsolete SOURCE2 (bcache-tools-dracut-module.tgz) way too late...
Rolf Fokkens a7e7cba
Rolf Fokkens af494d6
* Thu Feb 20 2014 Rolf Fokkens <rolf@rolffokkens.nl> - 0-0.16.20131018git
Rolf Fokkens af494d6
- (#1066555) updated bcache-status to latest upstream gist
Rolf Fokkens af494d6
Rolf Fokkens 64697ee
* Fri Oct 18 2013 Rolf Fokkens <rolf@rolffokkens.nl> - 0-0.15.20131018git
Rolf Fokkens 64697ee
- updated bcache-tools to latest upstream git
Rolf Fokkens 64697ee
- dracut module is now included upstream
Rolf Fokkens 64697ee
- bcache-register no longer needs patching
Rolf Fokkens 64697ee
- Makefile no longer needs patching
Rolf Fokkens 64697ee
Rolf Fokkens 64697ee
* Wed Oct 02 2013 Rolf Fokkens <rolf@rolffokkens.nl> - 0-0.14.20130909git
Rolf Fokkens 6379c9c
- dropped pre F20 support; no use since deps on util-linux and dracut
Rolf Fokkens 6379c9c
- (#1004693) removed execute blkid in 61-bcache.rules
Rolf Fokkens 6379c9c
- (#1004693) moved 61-bcache.rules to 69-bcache.rules
Rolf Fokkens 6379c9c
- (#1004693) now inluding /usr/lib/dracut/modules.d/90bcache/...
Rolf Fokkens 6379c9c
Rolf Fokkens e70d674
* Mon Sep 30 2013 Rolf Fokkens <rolf@rolffokkens.nl> - 0-0.13.20130909git
Rolf Fokkens e70d674
- (#1004693) add execute blkid in 61-bcache.rules
Rolf Fokkens e70d674
Rolf Fokkens 967538d
* Fri Sep 27 2013 Rolf Fokkens <rolf@rolffokkens.nl> - 0-0.12.20130909git
Rolf Fokkens e70d674
- remove obsoleted probe-bcache in F20 using use_blkid macro
Rolf Fokkens 967538d
Rolf Fokkens cbdf1ac
* Mon Sep 09 2013 Rolf Fokkens <rolf@rolffokkens.nl> - 0-0.11.20130909git
Rolf Fokkens cbdf1ac
- updated to new bcache-status
Rolf Fokkens cbdf1ac
- updated to new bcache-tools
Rolf Fokkens cbdf1ac
- added libblkid-devel to BuildRequires
Rolf Fokkens cbdf1ac
Rolf Fokkens ebd08ae
* Fri Sep 06 2013 Rolf Fokkens <rolf@rolffokkens.nl> - 0-0.10.20130827git
Rolf Fokkens ebd08ae
- fixed some udev related issues (#1004693)
Rolf Fokkens ebd08ae
Rolf Fokkens a22525a
* Mon Sep 02 2013 Rolf Fokkens <rolf@rolffokkens.nl> - 0-0.9.20130827git
Rolf Fokkens a22525a
- fedconfmake.spec file renamed to fedconfmake.patch
Rolf Fokkens a22525a
- removed libuuid as dependency
Rolf Fokkens a22525a
- removed trailing white-spaces in patch lines
Rolf Fokkens a22525a
- removed CFLAGS= from configure section
Rolf Fokkens a22525a
- removed (empty) check section
Rolf Fokkens a22525a
- replaced "make install" with make_install macro
Rolf Fokkens a22525a
- updated summary
Rolf Fokkens a22525a
Rolf Fokkens a22525a
* Sat Aug 31 2013 Rolf Fokkens <rolf@rolffokkens.nl> - 0-0.8.20130827git
Rolf Fokkens a22525a
- updated bcache-tools to commit 8327108eeaf3e0491b17d803da164c0827aae622
Rolf Fokkens a22525a
- corrected URL/VCS tag
Rolf Fokkens a22525a
- moved towards more RPM compliancy by using configure macro
Rolf Fokkens a22525a
- used "make install" to do most of the work
Rolf Fokkens a22525a
- added (empty) check section
Rolf Fokkens a22525a
Rolf Fokkens a22525a
* Mon Aug 26 2013 Rolf Fokkens <rolf@rolffokkens.nl> - 0-0.7.20130820git
Rolf Fokkens a22525a
- updated bcache-status to latest upstream gist
Rolf Fokkens a22525a
- removed the -rules patch
Rolf Fokkens a22525a
Rolf Fokkens a22525a
* Mon Aug 26 2013 Rolf Fokkens <rolf@rolffokkens.nl> - 0-0.6.20130820git
Rolf Fokkens a22525a
- removed tar and gcc from BuildRequires
Rolf Fokkens a22525a
- removed defattr from files section
Rolf Fokkens a22525a
- added upstream references to patches in comments 
Rolf Fokkens a22525a
Rolf Fokkens a22525a
* Sun Aug 25 2013 Rolf Fokkens <rolf@rolffokkens.nl> - 0-0.5.20130820git
Rolf Fokkens a22525a
- moved bcache-register to /usr/lib/udev
Rolf Fokkens a22525a
- suppress bcache-register error output (caused by registering device twice)
Rolf Fokkens a22525a
- removed man page for bcache-register
Rolf Fokkens a22525a
- added bcache-status
Rolf Fokkens a22525a
- added tar and gcc to BuildRequires
Rolf Fokkens a22525a
- added python to Requires
Rolf Fokkens a22525a
Rolf Fokkens a22525a
* Sat Aug 24 2013 Rolf Fokkens <rolf@rolffokkens.nl> - 0-0.4.20130820git
Rolf Fokkens a22525a
- Fixed the udev rules for Fedora
Rolf Fokkens a22525a
Rolf Fokkens a22525a
* Thu Aug 22 2013 Rolf Fokkens <rolf@rolffokkens.nl> - 0-0.3.20130820git
Rolf Fokkens a22525a
- Added systemd to BuildRequires
Rolf Fokkens a22525a
Rolf Fokkens a22525a
* Thu Aug 22 2013 Rolf Fokkens <rolf@rolffokkens.nl> - 0-0.2.20130820git
Rolf Fokkens a22525a
- Fixed initial review feedback
Rolf Fokkens a22525a
Rolf Fokkens a22525a
* Tue Aug 20 2013 Rolf Fokkens <rolf@rolffokkens.nl> - 0-0.1.20130820git
Rolf Fokkens a22525a
- Initial build