Hello community, here is the log from the commit of package bcache-tools for openSUSE:Factory checked in at 2014-04-13 13:14:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/bcache-tools (Old) and /work/SRC/openSUSE:Factory/.bcache-tools.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "bcache-tools" Changes: -------- --- /work/SRC/openSUSE:Factory/bcache-tools/bcache-tools.changes 2014-03-21 13:28:34.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.bcache-tools.new/bcache-tools.changes 2014-04-13 13:14:28.000000000 +0200 @@ -1,0 +2,10 @@ +Fri Apr 4 07:57:33 UTC 2014 - jengelh@inai.de + +- Update to new upstream release 0.9 +* Run probe-bcache a little later in the udev rule sequence + (moving from position 61 to 69), fixing a machine hang on + bcache reassemble (bnc#868938) +- Add 0001-build-remove-inline-keyword-from-crc64.patch, this is + a build fix. + +------------------------------------------------------------------- Old: ---- bcache-tools-0.1.g71.tar.xz New: ---- 0001-build-remove-inline-keyword-from-crc64.patch bcache-tools-0.9.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ bcache-tools.spec ++++++ --- /var/tmp/diff_new_pack.wyjZ2J/_old 2014-04-13 13:14:29.000000000 +0200 +++ /var/tmp/diff_new_pack.wyjZ2J/_new 2014-04-13 13:14:29.000000000 +0200 @@ -20,16 +20,19 @@ Summary: Configuration utilities for bcache License: GPL-2.0 Group: System/Base -Version: 0.1.g71 +Version: 0.9 Release: 0 -#Snapshot: 0b57e166ae86d525ef42842cabf7692fc7c44039 +#Git-Snapshot: v0.9 Url: http://bcache.evilpiepirate.org/ #Git-Clone: http://evilpiepirate.org/git/bcache-tools.git Source: %name-%version.tar.xz +Patch1: 0001-build-remove-inline-keyword-from-crc64.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: libblkid-devel BuildRequires: libuuid-devel BuildRequires: openssl-devel +BuildRequires: pkg-config BuildRequires: xz %description @@ -37,9 +40,12 @@ %prep %setup -qn %name +%patch -P 1 -p1 %build -make all CFLAGS="%optflags" %{?_smp_mflags} +export SUSE_ASNEEDED=0 +make all CFLAGS="%optflags $(pkg-config blkid uuid --cflags) -std=gnu99" \ + LDFLAGS="$(pkg-config blkid uuid --libs)" %{?_smp_mflags} %install b="%buildroot" @@ -49,7 +55,6 @@ mkdir -p "$b/%_sysconfdir/initramfs-tools/hooks" make install DESTDIR="$b" rm -Rf "$b/%_sysconfdir/initramfs-tools" -mv "$b"/lib/udev/rules.d/61-bcache.rules "$b"/lib/udev/rules.d/74-bcache.rules mkdir -p "$b/%_prefix/lib" mv "$b/lib/udev" "$b/%_prefix/lib/" @@ -57,7 +62,6 @@ %defattr(-,root,root) %_sbindir/bcache-super-show %_sbindir/make-bcache -/sbin/probe-bcache %_prefix/lib/udev %_mandir/man8/*.8* %doc COPYING ++++++ 0001-build-remove-inline-keyword-from-crc64.patch ++++++
From 96e990f72720c87c0bd85b31f819bddcdfdb22d7 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt
Date: Fri, 4 Apr 2014 10:08:17 +0200 Subject: [PATCH] build: remove inline keyword from crc64
In optimization levels like -O2, crc64 gets inlined for me and a
linker error follows, because there is no more crc64 function in the
object output.
---
bcache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bcache.c b/bcache.c
index 8f37445..8b4b986 100644
--- a/bcache.c
+++ b/bcache.c
@@ -115,7 +115,7 @@ static const uint64_t crc_table[256] = {
0x9AFCE626CE85B507ULL
};
-inline uint64_t crc64(const void *_data, size_t len)
+uint64_t crc64(const void *_data, size_t len)
{
uint64_t crc = 0xFFFFFFFFFFFFFFFFULL;
const unsigned char *data = _data;
--
1.8.4.5
++++++ bcache-tools-0.1.g71.tar.xz -> bcache-tools-0.9.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bcache-tools/61-bcache.rules new/bcache-tools/61-bcache.rules
--- old/bcache-tools/61-bcache.rules 2013-08-08 00:00:49.000000000 +0200
+++ new/bcache-tools/61-bcache.rules 1970-01-01 01:00:00.000000000 +0100
@@ -1,25 +0,0 @@
-# register bcache devices as they come up
-# man 7 udev for syntax
-
-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"
-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"
-LABEL="bcache_backing_end"
-
-# Cached devices: symlink
-DRIVER=="bcache", ENV{CACHED_UUID}=="?*", \
- SYMLINK+="bcache/by-uuid/$env{CACHED_UUID}"
-DRIVER=="bcache", ENV{CACHED_LABEL}=="?*", \
- SYMLINK+="bcache/by-label/$env{CACHED_LABEL}"
-
-LABEL="bcache_end"
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bcache-tools/69-bcache.rules new/bcache-tools/69-bcache.rules
--- old/bcache-tools/69-bcache.rules 1970-01-01 01:00:00.000000000 +0100
+++ new/bcache-tools/69-bcache.rules 2014-04-04 09:56:32.000000000 +0200
@@ -0,0 +1,29 @@
+# register bcache devices as they come up
+# man 7 udev for syntax
+
+SUBSYSTEM!="block", GOTO="bcache_end"
+ACTION=="remove", 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"
+
+# Cached devices: symlink
+DRIVER=="bcache", ENV{CACHED_UUID}=="?*", \
+ SYMLINK+="bcache/by-uuid/$env{CACHED_UUID}"
+DRIVER=="bcache", ENV{CACHED_LABEL}=="?*", \
+ SYMLINK+="bcache/by-label/$env{CACHED_LABEL}"
+
+LABEL="bcache_end"
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bcache-tools/Makefile new/bcache-tools/Makefile
--- old/bcache-tools/Makefile 2013-08-08 00:00:49.000000000 +0200
+++ new/bcache-tools/Makefile 2014-04-04 09:56:32.000000000 +0200
@@ -1,24 +1,32 @@
PREFIX=/usr
+UDEVLIBDIR=/lib/udev
+DRACUTLIBDIR=/lib/dracut
+INSTALL=install
CFLAGS+=-O2 -Wall -g
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 -m0755 bcache-test $(DESTDIR)${PREFIX}/sbin/
+ $(INSTALL) -m0755 make-bcache bcache-super-show $(DESTDIR)${PREFIX}/sbin/
+ $(INSTALL) -m0755 probe-bcache bcache-register $(DESTDIR)$(UDEVLIBDIR)/
+ $(INSTALL) -m0644 69-bcache.rules $(DESTDIR)$(UDEVLIBDIR)/rules.d/
+ -$(INSTALL) -T -m0755 initramfs/hook $(DESTDIR)/usr/share/initramfs-tools/hooks/bcache
+ if [ -d $(DESTDIR)$(DRACUTLIBDIR)/modules.d ]; \
+ then $(INSTALL) -D -m0755 dracut/module-setup.sh $(DESTDIR)$(DRACUTLIBDIR)/modules.d/90bcache/module-setup.sh; \
+ fi
+ $(INSTALL) -m0644 -- *.8 $(DESTDIR)${PREFIX}/share/man/man8/
+# $(INSTALL) -m0755 bcache-test $(DESTDIR)${PREFIX}/sbin/
clean:
$(RM) -f make-bcache probe-bcache bcache-super-show bcache-test *.o
-bcache-test: LDLIBS += -lm -lssl -lcrypto
-make-bcache: LDLIBS += -luuid
+bcache-test: LDLIBS += `pkg-config --libs openssl`
+make-bcache: LDLIBS += `pkg-config --libs uuid blkid`
+make-bcache: CFLAGS += `pkg-config --cflags uuid blkid`
make-bcache: bcache.o
-probe-bcache: LDLIBS += -luuid
-bcache-super-show: LDLIBS += -luuid
+probe-bcache: LDLIBS += `pkg-config --libs uuid blkid`
+probe-bcache: CFLAGS += `pkg-config --cflags uuid blkid`
+bcache-super-show: LDLIBS += `pkg-config --libs uuid`
+bcache-super-show: CFLAGS += -std=gnu99
bcache-super-show: bcache.o
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bcache-tools/bcache-register new/bcache-tools/bcache-register
--- old/bcache-tools/bcache-register 2013-08-08 00:00:49.000000000 +0200
+++ new/bcache-tools/bcache-register 2014-04-04 09:56:32.000000000 +0200
@@ -1,4 +1,4 @@
#!/bin/sh
-modprobe -qba bcache
-test -f /sys/fs/bcache/register && echo "$1" > /sys/fs/bcache/register
+/sbin/modprobe -qba bcache
+test -f /sys/fs/bcache/register_quiet && echo "$1" > /sys/fs/bcache/register_quiet
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bcache-tools/bcache-super-show.c new/bcache-tools/bcache-super-show.c
--- old/bcache-tools/bcache-super-show.c 2013-08-08 00:00:49.000000000 +0200
+++ new/bcache-tools/bcache-super-show.c 2014-04-04 09:56:32.000000000 +0200
@@ -4,6 +4,7 @@
* GPLv2
*/
+
#define _FILE_OFFSET_BITS 64
#define __USE_FILE_OFFSET64
#define _XOPEN_SOURCE 500
@@ -32,6 +33,29 @@
}
+static bool accepted_char(char c)
+{
+ if ('0' <= c && c <= '9')
+ return true;
+ if ('A' <= c && c <= 'Z')
+ return true;
+ if ('a' <= c && c <= 'z')
+ return true;
+ if (strchr(".-_", c))
+ return true;
+ return false;
+}
+
+static void print_encode(char* in)
+{
+ for (char* pos = in; *pos; pos++)
+ if (accepted_char(*pos))
+ putchar(*pos);
+ else
+ printf("%%%x", *pos);
+}
+
+
int main(int argc, char **argv)
{
bool force_csum = false;
@@ -123,6 +147,16 @@
putchar('\n');
+ char label[SB_LABEL_SIZE + 1];
+ strncpy(label, (char*)sb.label, SB_LABEL_SIZE);
+ label[SB_LABEL_SIZE] = '\0';
+ printf("dev.label\t\t");
+ if (*label)
+ print_encode(label);
+ else
+ printf("(empty)");
+ putchar('\n');
+
uuid_unparse(sb.uuid, uuid);
printf("dev.uuid\t\t%s\n", uuid);
@@ -136,13 +170,31 @@
printf("dev.cache.first_sector\t%u\n"
"dev.cache.cache_sectors\t%ju\n"
"dev.cache.total_sectors\t%ju\n"
+ "dev.cache.ordered\t%s\n"
"dev.cache.discard\t%s\n"
- "dev.cache.pos\t\t%u\n",
+ "dev.cache.pos\t\t%u\n"
+ "dev.cache.replacement\t%ju",
sb.bucket_size * sb.first_bucket,
sb.bucket_size * (sb.nbuckets - sb.first_bucket),
sb.bucket_size * sb.nbuckets,
+ CACHE_SYNC(&sb) ? "yes" : "no",
CACHE_DISCARD(&sb) ? "yes" : "no",
- sb.nr_this_dev);
+ sb.nr_this_dev,
+ CACHE_REPLACEMENT(&sb));
+ switch (CACHE_REPLACEMENT(&sb)) {
+ case CACHE_REPLACEMENT_LRU:
+ printf(" [lru]\n");
+ break;
+ case CACHE_REPLACEMENT_FIFO:
+ printf(" [fifo]\n");
+ break;
+ case CACHE_REPLACEMENT_RANDOM:
+ printf(" [random]\n");
+ break;
+ default:
+ putchar('\n');
+ }
+
} else {
uint64_t first_sector;
if (sb.version == BCACHE_SB_VERSION_BDEV) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bcache-tools/bcache.h new/bcache-tools/bcache.h
--- old/bcache-tools/bcache.h 2013-08-08 00:00:49.000000000 +0200
+++ new/bcache-tools/bcache.h 2014-04-04 09:56:32.000000000 +0200
@@ -115,7 +115,7 @@
#define BDEV_STATE_DIRTY 2U
#define BDEV_STATE_STALE 3U
-inline uint64_t crc64(const void *_data, size_t len);
+uint64_t crc64(const void *_data, size_t len);
#define node(i, j) ((void *) ((i)->d + (j)))
#define end(i) node(i, (i)->keys)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bcache-tools/dracut/module-setup.sh new/bcache-tools/dracut/module-setup.sh
--- old/bcache-tools/dracut/module-setup.sh 1970-01-01 01:00:00.000000000 +0100
+++ new/bcache-tools/dracut/module-setup.sh 2014-04-04 09:56:32.000000000 +0200
@@ -0,0 +1,34 @@
+#!/bin/bash
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
+# ex: ts=8 sw=4 sts=4 et filetype=sh
+
+#
+# At some point (util-linux v2.24) blkid will be able to identify bcache
+# but until every system has this version of util-linux, probe-bcache is
+# provided as an alternative.
+#
+
+check() {
+ if [[ $hostonly ]] || [[ $mount_needs ]]
+ then
+ for fs in "${host_fs_types[@]}"; do
+ [[ $fs = "bcache" ]] && return 0
+ done
+ return 255
+ fi
+
+ return 0
+}
+
+depends() {
+ return 0
+}
+
+installkernel() {
+ instmods bcache
+}
+
+install() {
+ inst_multiple ${udevdir}/probe-bcache ${udevdir}/bcache-register
+ inst_rules 69-bcache.rules
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bcache-tools/initramfs/hook new/bcache-tools/initramfs/hook
--- old/bcache-tools/initramfs/hook 2013-08-08 00:00:49.000000000 +0200
+++ new/bcache-tools/initramfs/hook 2014-04-04 09:56:32.000000000 +0200
@@ -16,7 +16,7 @@
. /usr/share/initramfs-tools/hook-functions
-cp -pt "${DESTDIR}/lib/udev/rules.d" /lib/udev/rules.d/61-bcache.rules
+cp -pt "${DESTDIR}/lib/udev/rules.d" /lib/udev/rules.d/69-bcache.rules
copy_exec /lib/udev/bcache-register
-copy_exec /sbin/probe-bcache
+copy_exec /lib/udev/probe-bcache
manual_add_modules bcache
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bcache-tools/make-bcache.c new/bcache-tools/make-bcache.c
--- old/bcache-tools/make-bcache.c 2013-08-08 00:00:49.000000000 +0200
+++ new/bcache-tools/make-bcache.c 2014-04-04 09:56:32.000000000 +0200
@@ -8,6 +8,7 @@
#define __USE_FILE_OFFSET64
#define _XOPEN_SOURCE 600
+#include