[bcache-tools] Initial import (#999690).

Rolf Fokkens rolffokkens at fedoraproject.org
Wed Sep 4 20:12:32 UTC 2013


commit a22525a980b2afcc997d09d0de8358cdbc2d4570
Author: Rolf Fokkens <rolf.fokkens at target-holding.nl>
Date:   Wed Sep 4 22:11:55 2013 +0200

    Initial import (#999690).

 .gitignore                              |    1 +
 bcache-status-20130826-python.patch     |    8 ++
 bcache-tools-20130827-fedconfmake.patch |   26 ++++++
 bcache-tools-20130827-register.patch    |   15 ++++
 bcache-tools-20130827.tar.bz            |  Bin 0 -> 20139 bytes
 bcache-tools-status-20130826-man.patch  |   49 ++++++++++++
 bcache-tools.spec                       |  128 +++++++++++++++++++++++++++++++
 sources                                 |    1 +
 8 files changed, 228 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..cc91db5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/bcache-status-20130826.tar.gz
diff --git a/bcache-status-20130826-python.patch b/bcache-status-20130826-python.patch
new file mode 100644
index 0000000..4f10904
--- /dev/null
+++ b/bcache-status-20130826-python.patch
@@ -0,0 +1,8 @@
+--- bcache-status-20130826/bcache-status.orig	2013-08-26 22:21:55.460799451 +0200
++++ bcache-status-20130826/bcache-status	2013-08-26 22:22:03.628792246 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python3
++#!/usr/bin/env python
+ #
+ # Dumb script to dump (some) of bcache status
+ # Copyright 2013 Darrick J. Wong. All rights reserved.
diff --git a/bcache-tools-20130827-fedconfmake.patch b/bcache-tools-20130827-fedconfmake.patch
new file mode 100644
index 0000000..df639a5
--- /dev/null
+++ b/bcache-tools-20130827-fedconfmake.patch
@@ -0,0 +1,26 @@
+diff -ruN bcache-tools-20130827.orig/configure bcache-tools-20130827/configure
+--- bcache-tools-20130827.orig/configure	1970-01-01 01:00:00.000000000 +0100
++++ bcache-tools-20130827/configure	2013-08-31 15:12:41.093218432 +0200
+@@ -0,0 +1 @@
++#!/bin/sh
+diff -ruN bcache-tools-20130827/Makefile.fedconfmake bcache-tools-20130827/Makefile
+--- bcache-tools-20130827/Makefile.fedconfmake	2013-08-26 23:46:19.000000000 +0200
++++ bcache-tools-20130827/Makefile	2013-09-02 22:32:59.474791346 +0200
+@@ -5,12 +5,11 @@
+ all: make-bcache probe-bcache bcache-super-show
+ 
+ install: make-bcache probe-bcache bcache-super-show
+-	install -m0755 make-bcache bcache-super-show	$(DESTDIR)${PREFIX}/sbin/
+-	install -m0755 probe-bcache	$(DESTDIR)/sbin/
+-	install -m0644 61-bcache.rules	$(DESTDIR)/lib/udev/rules.d/
+-	install -m0755 bcache-register	$(DESTDIR)/lib/udev/
+-	-install -m0755 initramfs/hook	$(DESTDIR)/etc/initramfs-tools/hooks/bcache
+-	install -m0644 -- *.8 $(DESTDIR)${PREFIX}/share/man/man8
++	install -p -m0755 make-bcache bcache-super-show	$(DESTDIR)$(SBINDIR)
++	install -p -m0755 probe-bcache	$(DESTDIR)$(SBINDIR)
++	install -p -m0644 61-bcache.rules	$(DESTDIR)$(UDEVRULESDIR)
++	install -p -m0755 bcache-register	$(DESTDIR)$(UDEVLIBDIR)
++	install -p -m0644 -- *.8 $(DESTDIR)${MANDIR}/man8
+ #	install -m0755 bcache-test $(DESTDIR)${PREFIX}/sbin/
+ 
+ clean:
diff --git a/bcache-tools-20130827-register.patch b/bcache-tools-20130827-register.patch
new file mode 100644
index 0000000..c860b28
--- /dev/null
+++ b/bcache-tools-20130827-register.patch
@@ -0,0 +1,15 @@
+diff -ruN bcache-tools-20130827.orig/bcache-register bcache-tools-20130827/bcache-register
+--- bcache-tools-20130827.orig/bcache-register	2013-08-26 23:46:19.000000000 +0200
++++ bcache-tools-20130827/bcache-register	2013-08-27 08:49:59.924940825 +0200
+@@ -1,4 +1,9 @@
+ #!/bin/sh
+-modprobe -qba bcache
+-test -f /sys/fs/bcache/register_quiet && echo "$1" > /sys/fs/bcache/register_quiet
++#
++# Utility script to be called from udev, so it's not monkey proof at all. It's
++# sole purpose is to load the bcache kernel module whenever a bcache device is
++# detected.
++#
++/sbin/modprobe -qba bcache
++test -f /sys/fs/bcache/register_quiet && echo "$1" > /sys/fs/bcache/register_quiet 2>/dev/null
+ 
diff --git a/bcache-tools-20130827.tar.bz b/bcache-tools-20130827.tar.bz
new file mode 100644
index 0000000..b775e6f
Binary files /dev/null and b/bcache-tools-20130827.tar.bz differ
diff --git a/bcache-tools-status-20130826-man.patch b/bcache-tools-status-20130826-man.patch
new file mode 100644
index 0000000..3eabb3f
--- /dev/null
+++ b/bcache-tools-status-20130826-man.patch
@@ -0,0 +1,49 @@
+diff -ruN bcache-tools-20130820.orig/bcache-status.8 bcache-tools-20130820/bcache-status.8
+--- bcache-tools-20130820.orig/bcache-status.8	1970-01-01 01:00:00.000000000 +0100
++++ bcache-tools-20130820/bcache-status.8	2013-08-26 23:32:02.477274882 +0200
+@@ -0,0 +1,45 @@
++.TH bcache-status 8
++.SH NAME
++bcache-status \- Display useful bcache statistics
++.SH SYNOPSIS
++.B bcache-status
++[\fB \--help\fR ]
++[\fB \-f\fR ]
++[\fB \-h\fR ]
++[\fB \-d\fR ]
++[\fB \-t\fR ]
++[\fB \-a\fR ]
++[\fB \-r\fR ]
++[\fB \-s\fR ]
++[\fB \-g\fR ]
++.SH DESCRIPTION
++This command displays useful bcache statistics in a convenient way.
++.SH OPTIONS
++.TP
++.BR \---help
++Print help message and exit.
++.TP
++.BR \-f,\ --five-minute
++Print the last five minutes of stats.
++.TP
++.BR \-h,\ --hour
++Print the last hour of stats.
++.TP
++.BR \-d,\ --day
++Print the last day of stats.
++.TP
++.BR \-t,\ --total
++Print total stats.
++.TP
++.BR \-a,\ --all
++Print all stats.
++.TP
++.BR \-r,\ --reset-stats
++Reset stats after printing them.
++.TP
++.BR \-s,\ --sub-status
++Print subdevice status.
++.TP
++.BR \-g,\ --gc
++Print subdevice status.
++
diff --git a/bcache-tools.spec b/bcache-tools.spec
new file mode 100644
index 0000000..ce30f1d
--- /dev/null
+++ b/bcache-tools.spec
@@ -0,0 +1,128 @@
+%global gitdate 20130827
+
+Summary: Tools for Linux kernel block layer cache
+Name: bcache-tools
+Version: 0
+Release: 0.9.%{gitdate}git%{?dist}
+License: GPLv2
+Group: System Environment/Base
+URL: http://bcache.evilpiepirate.org/
+VCS: http://evilpiepirate.org/git/bcache-tools.git
+# For now I am using a prerelease version obtained by:
+# git clone http://evilpiepirate.org/git/bcache-tools.git
+# cd bcache-tools/
+# git archive --format=tar --prefix=bcache-tools-20130827/ 8327108eeaf3e0491b17d803da164c0827aae622 | gzip > ../bcache-tools-20130827.tar.bz
+Source0: %{name}-%{gitdate}.tar.bz
+# This part is also a prerelease version obtained by https://gist.github.com/djwong/6343451:
+# git clone https://gist.github.com/6343451.git
+# cd 6343451/
+# git archive --format=tar --prefix=bcache-status-20130826/ 95fe51dd30e579d5786a8cbf54ee47df0b347250 | gzip > ../bcache-status-20130826.tar.gz
+# see also http://article.gmane.org/gmane.linux.kernel.bcache.devel/1951
+Source1: bcache-status-20130826.tar.gz
+# bcache status not provided as a true package, so this is a self maintained man page for it
+# http://article.gmane.org/gmane.linux.kernel.bcache.devel/1946
+Patch0: %{name}-status-20130826-man.patch
+# Sent upstream: http://article.gmane.org/gmane.linux.kernel.bcache.devel/1946
+Patch1: bcache-status-20130826-python.patch
+# Sent upstream: http://article.gmane.org/gmane.linux.kernel.bcache.devel/1947
+# This one can be left out when this is processed:
+# http://article.gmane.org/gmane.linux.kernel.bcache.devel/1953
+Patch2: %{name}-20130827-register.patch
+# configure and make install are not "Fedora compliant", do a small step in the
+# right direction
+Patch3: %{name}-20130827-fedconfmake.patch
+
+Requires: python
+BuildRequires: libuuid-devel systemd
+
+%description
+Bcache is a Linux kernel block layer cache. It allows one or more fast disk
+drives such as flash-based solid state drives (SSDs) to act as a cache for
+one or more slower hard disk drives.
+This package contains the utilities for manipulating bcache.
+
+%global _udevlibdir %{_prefix}/lib/udev
+
+%prep
+%setup -q -n bcache-tools-%{gitdate}
+tar xzf %{SOURCE1} --strip-components=1
+%patch0 -p1 -b .man
+%patch1 -p1 -b .python
+%patch2 -p1 -b .register
+%patch3 -p1 -b .fedconfmake
+chmod +x configure
+
+%build
+%configure
+make %{?_smp_mflags}
+
+%install
+mkdir -p \
+    %{buildroot}%{_sbindir} \
+    %{buildroot}%{_mandir}/man8 \
+    %{buildroot}%{_udevlibdir} \
+    %{buildroot}%{_udevrulesdir}
+
+%make_install \
+    SBINDIR=%{_sbindir} \
+    UDEVRULESDIR=%{_udevrulesdir} \
+    UDEVLIBDIR=%{_udevlibdir} \
+    MANDIR=%{_mandir}
+
+install -p  -m 755 bcache-status %{buildroot}%{_sbindir}/bcache-status
+
+%files
+%doc README COPYING
+%{_udevrulesdir}/*
+%{_mandir}/man8/*
+%{_udevlibdir}/bcache-register
+%{_sbindir}/bcache-super-show
+%{_sbindir}/bcache-status
+%{_sbindir}/make-bcache
+%{_sbindir}/probe-bcache
+
+%changelog
+* Mon Sep 02 2013 Rolf Fokkens <rolf at rolffokkens.nl> - 0-0.9.20130827git
+- fedconfmake.spec file renamed to fedconfmake.patch
+- removed libuuid as dependency
+- removed trailing white-spaces in patch lines
+- removed CFLAGS= from configure section
+- removed (empty) check section
+- replaced "make install" with make_install macro
+- updated summary
+
+* Sat Aug 31 2013 Rolf Fokkens <rolf at rolffokkens.nl> - 0-0.8.20130827git
+- updated bcache-tools to commit 8327108eeaf3e0491b17d803da164c0827aae622
+- corrected URL/VCS tag
+- moved towards more RPM compliancy by using configure macro
+- used "make install" to do most of the work
+- added (empty) check section
+
+* Mon Aug 26 2013 Rolf Fokkens <rolf at rolffokkens.nl> - 0-0.7.20130820git
+- updated bcache-status to latest upstream gist
+- removed the -rules patch
+
+* Mon Aug 26 2013 Rolf Fokkens <rolf at rolffokkens.nl> - 0-0.6.20130820git
+- removed tar and gcc from BuildRequires
+- removed defattr from files section
+- added upstream references to patches in comments 
+
+* Sun Aug 25 2013 Rolf Fokkens <rolf at rolffokkens.nl> - 0-0.5.20130820git
+- moved bcache-register to /usr/lib/udev
+- suppress bcache-register error output (caused by registering device twice)
+- removed man page for bcache-register
+- added bcache-status
+- added tar and gcc to BuildRequires
+- added python to Requires
+
+* Sat Aug 24 2013 Rolf Fokkens <rolf at rolffokkens.nl> - 0-0.4.20130820git
+- Fixed the udev rules for Fedora
+
+* Thu Aug 22 2013 Rolf Fokkens <rolf at rolffokkens.nl> - 0-0.3.20130820git
+- Added systemd to BuildRequires
+
+* Thu Aug 22 2013 Rolf Fokkens <rolf at rolffokkens.nl> - 0-0.2.20130820git
+- Fixed initial review feedback
+
+* Tue Aug 20 2013 Rolf Fokkens <rolf at rolffokkens.nl> - 0-0.1.20130820git
+- Initial build
diff --git a/sources b/sources
index e69de29..720847b 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+d9201a204a413c67a2982bddee7dda87  bcache-status-20130826.tar.gz


More information about the scm-commits mailing list