diff --git a/.gitignore b/.gitignore index 30e9030..1fd8a8c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /bcache-status-20130909.tar.gz /bcache-tools-20130909.tar.gz /bcache-tools-dracut-module.tgz +/bcache-tools-20131018.tar.gz diff --git a/bcache-tools-20130827-fedconfmake.patch b/bcache-tools-20130827-fedconfmake.patch deleted file mode 100644 index df639a5..0000000 --- a/bcache-tools-20130827-fedconfmake.patch +++ /dev/null @@ -1,26 +0,0 @@ -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 deleted file mode 100644 index c860b28..0000000 --- a/bcache-tools-20130827-register.patch +++ /dev/null @@ -1,15 +0,0 @@ -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-20130909-udev-dracut.patch b/bcache-tools-20130909-udev-dracut.patch deleted file mode 100644 index 457003e..0000000 --- a/bcache-tools-20130909-udev-dracut.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -ruN bcache-tools-20130909.tmp/61-bcache.rules bcache-tools-20130909/61-bcache.rules ---- bcache-tools-20130909.tmp/61-bcache.rules 2013-09-01 12:38:11.000000000 +0200 -+++ bcache-tools-20130909/61-bcache.rules 2013-10-02 22:12:02.276806959 +0200 -@@ -4,12 +4,8 @@ - SUBSYSTEM!="block", GOTO="bcache_end" - ACTION=="remove", GOTO="bcache_end" - --# Backing devices: scan, symlink, register --IMPORT{program}="/sbin/blkid -o udev $tempnode" --# blkid and probe-bcache can disagree, in which case don't register --ENV{ID_FS_TYPE}=="?*", ENV{ID_FS_TYPE}!="bcache", GOTO="bcache_backing_end" -- --IMPORT{program}="/sbin/probe-bcache -o udev $tempnode" -+# Backing devices: symlink, register -+ENV{ID_FS_TYPE}!="bcache", GOTO="bcache_backing_end" - ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}" - SUBSYSTEM=="block", ACTION=="add|change", ENV{ID_FS_TYPE}=="bcache", \ - RUN+="bcache-register $tempnode" -diff -ruN bcache-tools-20130909.tmp/Makefile bcache-tools-20130909/Makefile ---- bcache-tools-20130909.tmp/Makefile 2013-10-02 22:20:31.422049463 +0200 -+++ bcache-tools-20130909/Makefile 2013-10-02 22:34:37.266717269 +0200 -@@ -7,8 +7,10 @@ - install: make-bcache probe-bcache bcache-super-show - 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 -m0644 61-bcache.rules $(DESTDIR)$(UDEVRULESDIR)/69-bcache.rules - install -p -m0755 bcache-register $(DESTDIR)$(UDEVLIBDIR) -+ install -p -m0755 -d $(DESTDIR)$(DRACUTLIBDIR)/modules.d/90bcache -+ install -p -m0755 90bcache/module-setup.sh $(DESTDIR)$(DRACUTLIBDIR)/modules.d/90bcache/module-setup.sh - install -p -m0644 -- *.8 $(DESTDIR)${MANDIR}/man8 - # install -m0755 bcache-test $(DESTDIR)${PREFIX}/sbin/ - diff --git a/bcache-tools-20131018-fedconf.patch b/bcache-tools-20131018-fedconf.patch new file mode 100644 index 0000000..993ec21 --- /dev/null +++ b/bcache-tools-20131018-fedconf.patch @@ -0,0 +1,5 @@ +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 --git a/bcache-tools-20131018-noprobe.patch b/bcache-tools-20131018-noprobe.patch new file mode 100644 index 0000000..1467b40 --- /dev/null +++ b/bcache-tools-20131018-noprobe.patch @@ -0,0 +1,30 @@ +--- bcache-tools-20131018/69-bcache.rules.2 2013-10-18 19:34:38.907431161 +0200 ++++ bcache-tools-20131018/69-bcache.rules 2013-10-18 19:41:18.540320493 +0200 +@@ -6,17 +6,10 @@ + ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", GOTO="bcache_end" + + # blkid was run by the standard udev rules +-# It recognised bcache (util-linux 2.24+) +-ENV{ID_FS_TYPE}=="bcache", GOTO="bcache_backing_found" +-# It recognised something else; bail +-ENV{ID_FS_TYPE}=="?*", GOTO="bcache_backing_end" +- + # Backing devices: scan, symlink, register +-IMPORT{program}="probe-bcache -o udev $tempnode" + ENV{ID_FS_TYPE}!="bcache", GOTO="bcache_backing_end" + ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}" + +-LABEL="bcache_backing_found" + RUN+="bcache-register $tempnode" + LABEL="bcache_backing_end" + +--- bcache-tools-20131018/dracut/module-setup.sh.udevfix 2013-10-11 13:21:56.000000000 +0200 ++++ bcache-tools-20131018/dracut/module-setup.sh 2013-10-18 19:11:37.596140492 +0200 +@@ -29,6 +29,6 @@ + } + + install() { +- inst_multiple ${udevdir}/probe-bcache ${udevdir}/bcache-register ++ inst_multiple ${udevdir}/bcache-register + inst_rules 69-bcache.rules + } diff --git a/bcache-tools-20131018-udev-dmfix.patch b/bcache-tools-20131018-udev-dmfix.patch new file mode 100644 index 0000000..46b1bf8 --- /dev/null +++ b/bcache-tools-20131018-udev-dmfix.patch @@ -0,0 +1,10 @@ +--- bcache-tools-20131018/69-bcache.rules.orig 2013-10-18 19:33:45.991178453 +0200 ++++ bcache-tools-20131018/69-bcache.rules 2013-10-18 19:34:38.907431161 +0200 +@@ -3,6 +3,7 @@ + + SUBSYSTEM!="block", GOTO="bcache_end" + ACTION=="remove", GOTO="bcache_end" ++ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", GOTO="bcache_end" + + # blkid was run by the standard udev rules + # It recognised bcache (util-linux 2.24+) diff --git a/bcache-tools.spec b/bcache-tools.spec index 4e4de17..19ab595 100644 --- a/bcache-tools.spec +++ b/bcache-tools.spec @@ -1,9 +1,9 @@ -%global gitdate 20130909 +%global gitdate 20131018 Summary: Tools for Linux kernel block layer cache Name: bcache-tools Version: 0 -Release: 0.14.%{gitdate}git%{?dist} +Release: 0.15.%{gitdate}git%{?dist} License: GPLv2 Group: System Environment/Base URL: http://bcache.evilpiepirate.org/ @@ -11,7 +11,7 @@ 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-20130909/ b15fb776c99fcab56fbbe295629749d307e2018d | gzip > ../bcache-tools-20130909.tar.gz +# git archive --format=tar --prefix=bcache-tools-20131018/ 89f11b135d1d57a5dbdc3548bfb9bfa0113075c4 | gzip > ../bcache-tools-20131018.tar.gz Source0: %{name}-%{gitdate}.tar.gz # This part is also a prerelease version obtained by https://gist.github.com/djwong/6343451: # git clone https://gist.github.com/6343451.git @@ -22,19 +22,19 @@ Source1: bcache-status-20130909.tar.gz # The dracut module originally resided in dracut, but it's now part of # bcache-tools Source2: bcache-tools-dracut-module.tgz -# bcache status not provided as a true package, so this is a self maintained man page for it +# 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/1947 -# This one can be left out when this is processed: -# http://article.gmane.org/gmane.linux.kernel.bcache.devel/1953 -Patch1: %{name}-20130827-register.patch -# configure and make install are not "Fedora compliant", do a small step in the +# Skip DM devices marked private - will be in git repo later +# https://github.com/g2p/bcache-tools/commit/15f17ed3e9a8dbe44a0e60cd981f70b7a61d6f7a +Patch1: %{name}-20131018-udev-dmfix.patch +# configure is not "Fedora compliant", do a small step in the # right direction -Patch2: %{name}-20130827-fedconfmake.patch -# When util-linux does take care of bcache superblock identification we remove -# the probe-cache call (whichs is Fedora specific): -Patch3: %{name}-20130909-udev-dracut.patch +Patch2: %{name}-20131018-fedconf.patch +# util-linux takes care of bcache superblock identification so we remove +# the probe-cache call (which is Fedora specific): +Patch3: %{name}-20131018-noprobe.patch Requires: python # This is a kind of soft dependency: because we don't include probe-bcache @@ -58,10 +58,10 @@ This package contains the utilities for manipulating bcache. tar xzf %{SOURCE1} --strip-components=1 tar xzf %{SOURCE2} %patch0 -p1 -b .man -%patch1 -p1 -b .register +%patch1 -p1 -b .dmfix %patch2 -p1 -b .fedconfmake chmod +x configure -%patch3 -p1 -b .udevfix +%patch3 -p1 -b .noprobe %build %configure @@ -76,14 +76,13 @@ mkdir -p \ %{buildroot}%{dracutlibdir}/modules.d %make_install \ - SBINDIR=%{_sbindir} \ - UDEVRULESDIR=%{_udevrulesdir} \ + INSTALL="install -p" \ UDEVLIBDIR=%{_udevlibdir} \ DRACUTLIBDIR=%{dracutlibdir} \ MANDIR=%{_mandir} # prevent complaints when checking for unpackaged files -rm %{buildroot}%{_sbindir}/probe-bcache +rm %{buildroot}%{_udevlibdir}/probe-bcache rm %{buildroot}%{_mandir}/man8/probe-bcache.8 install -p -m 755 bcache-status %{buildroot}%{_sbindir}/bcache-status @@ -99,7 +98,13 @@ install -p -m 755 bcache-status %{buildroot}%{_sbindir}/bcache-status %{dracutlibdir}/modules.d/90bcache %changelog -* Fri Oct 04 2013 Rolf Fokkens - 0-0.14.20130909git +* Fri Oct 18 2013 Rolf Fokkens - 0-0.15.20131018git +- updated bcache-tools to latest upstream git +- dracut module is now included upstream +- bcache-register no longer needs patching +- Makefile no longer needs patching + +* Wed Oct 02 2013 Rolf Fokkens - 0-0.14.20130909git - dropped pre F20 support; no use since deps on util-linux and dracut - (#1004693) removed execute blkid in 61-bcache.rules - (#1004693) moved 61-bcache.rules to 69-bcache.rules diff --git a/sources b/sources index c03eb13..f4d9c89 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ 827065118d59cb65d1355a04b3ea57d9 bcache-status-20130909.tar.gz -53d2e0f98932d32f87f274b5c77c48ce bcache-tools-20130909.tar.gz +ac24d7141a55806df838f5159358ce10 bcache-tools-20131018.tar.gz e5ec2b71700ab30d20603b7d7faf929e bcache-tools-dracut-module.tgz