Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/btrfs-progs/files/, sys-fs/btrfs-progs/
Date: Mon, 27 Mar 2017 20:45:51
Message-Id: 1490647535.a061e9c01024a2b9890cacb0a159e646463553bb.slyfox@gentoo
1 commit: a061e9c01024a2b9890cacb0a159e646463553bb
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Mon Mar 27 20:44:55 2017 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Mon Mar 27 20:45:35 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a061e9c0
7
8 sys-fs/btrfs-progs: fix libbtrfs library, bug #613890
9
10 Two fixes are here:
11 - fixed undefined symbols in libbtrfs.so.0 (__error symbol)
12 - added missing 'sizes.h' kernel compatibility header.
13
14 Reported-by: Denis Descheneaux
15 Bug: https://bugs.gentoo.org/613890
16 Package-Manager: Portage-2.3.5, Repoman-2.3.2
17
18 ...rogs-4.10.ebuild => btrfs-progs-4.10-r1.ebuild} | 5 ++++
19 .../files/btrfs-progs-4.10-fix-headers.patch | 32 ++++++++++++++++++++
20 .../files/btrfs-progs-4.10-messages.patch | 34 ++++++++++++++++++++++
21 3 files changed, 71 insertions(+)
22
23 diff --git a/sys-fs/btrfs-progs/btrfs-progs-4.10.ebuild b/sys-fs/btrfs-progs/btrfs-progs-4.10-r1.ebuild
24 similarity index 96%
25 rename from sys-fs/btrfs-progs/btrfs-progs-4.10.ebuild
26 rename to sys-fs/btrfs-progs/btrfs-progs-4.10-r1.ebuild
27 index 397d271d38c..663141c9409 100644
28 --- a/sys-fs/btrfs-progs/btrfs-progs-4.10.ebuild
29 +++ b/sys-fs/btrfs-progs/btrfs-progs-4.10-r1.ebuild
30 @@ -53,6 +53,11 @@ DEPEND="${RDEPEND}
31 )
32 "
33
34 +PATCHES=(
35 + "${FILESDIR}"/${P}-messages.patch
36 + "${FILESDIR}"/${P}-fix-headers.patch
37 +)
38 +
39 if [[ ${PV} == 9999 ]]; then
40 DEPEND+=" sys-devel/gnuconfig"
41 fi
42
43 diff --git a/sys-fs/btrfs-progs/files/btrfs-progs-4.10-fix-headers.patch b/sys-fs/btrfs-progs/files/btrfs-progs-4.10-fix-headers.patch
44 new file mode 100644
45 index 00000000000..414c0995e41
46 --- /dev/null
47 +++ b/sys-fs/btrfs-progs/files/btrfs-progs-4.10-fix-headers.patch
48 @@ -0,0 +1,32 @@
49 +Add missing 'sizes.h' header install.
50 +
51 +Noticed on snapper build failure:
52 + In file included from btrfs/send-utils.h:28:0,
53 + from BtrfsUtils.cc:36:
54 + btrfs/ctree.h:37:25: fatal error: linux/sizes.h: No such file or directory
55 +diff --git a/Makefile b/Makefile
56 +index 05a5d06..fb1cfd6 100644
57 +--- a/Makefile
58 ++++ b/Makefile
59 +@@ -108,7 +108,7 @@ libbtrfs_objects = send-stream.o send-utils.o kernel-lib/rbtree.o btrfs-list.o \
60 + uuid-tree.o utils-lib.o rbtree-utils.o
61 + libbtrfs_headers = send-stream.h send-utils.h send.h kernel-lib/rbtree.h btrfs-list.h \
62 + kernel-lib/crc32c.h kernel-lib/list.h kerncompat.h \
63 +- kernel-lib/radix-tree.h extent-cache.h \
64 ++ kernel-lib/radix-tree.h kernel-lib/sizes.h extent-cache.h \
65 + extent_io.h ioctl.h ctree.h btrfsck.h version.h
66 + convert_objects = convert/main.o convert/common.o convert/source-fs.o \
67 + convert/source-ext2.o
68 +diff --git a/ctree.h b/ctree.h
69 +index 1d0622d..c8f771b 100644
70 +--- a/ctree.h
71 ++++ b/ctree.h
72 +@@ -34,7 +34,7 @@
73 + #include <btrfs/extent-cache.h>
74 + #include <btrfs/extent_io.h>
75 + #include <btrfs/ioctl.h>
76 +-#include <linux/sizes.h>
77 ++#include <btrfs/sizes.h>
78 + #endif /* BTRFS_FLAT_INCLUDES */
79 +
80 + struct btrfs_root;
81
82 diff --git a/sys-fs/btrfs-progs/files/btrfs-progs-4.10-messages.patch b/sys-fs/btrfs-progs/files/btrfs-progs-4.10-messages.patch
83 new file mode 100644
84 index 00000000000..afcc27896f6
85 --- /dev/null
86 +++ b/sys-fs/btrfs-progs/files/btrfs-progs-4.10-messages.patch
87 @@ -0,0 +1,34 @@
88 +Fix missing __error symbol in libbtrfs.so.0.
89 +
90 +The easiest way to reproduce it is to try to build
91 +btrfs-progs with LDFLAGS=-Wl,--no-undefined :
92 +
93 +btrfs-list.o: In function `lookup_ino_path':
94 +btrfs-list.c:(.text+0x7d2): undefined reference to `__error'
95 +
96 +Reported-by: Denis Descheneaux
97 +Bug: https://bugs.gentoo.org/show_bug.cgi?id=613890
98 +diff --git a/Makefile b/Makefile
99 +index 67fbc48..05a5d06 100644
100 +--- a/Makefile
101 ++++ b/Makefile
102 +@@ -97,3 +97,3 @@ objects = ctree.o disk-io.o kernel-lib/radix-tree.o extent-tree.o print-tree.o \
103 + inode.o file.o find-root.o free-space-tree.o help.o send-dump.o \
104 +- fsfeatures.o messages.o
105 ++ fsfeatures.o
106 + cmds_objects = cmds-subvolume.o cmds-filesystem.o cmds-device.o cmds-scrub.o \
107 +@@ -106,3 +106,3 @@ cmds_objects = cmds-subvolume.o cmds-filesystem.o cmds-device.o cmds-scrub.o \
108 + libbtrfs_objects = send-stream.o send-utils.o kernel-lib/rbtree.o btrfs-list.o \
109 +- kernel-lib/crc32c.o \
110 ++ kernel-lib/crc32c.o messages.o \
111 + uuid-tree.o utils-lib.o rbtree-utils.o
112 +@@ -448,3 +448,3 @@ test-ioctl: ioctl-test ioctl-test-32 ioctl-test-64
113 +
114 +-library-test: library-test.o messages.o $(libs_shared)
115 ++library-test: library-test.o $(libs_shared)
116 + @echo " [LD] $@"
117 +@@ -454,3 +454,3 @@ library-test: library-test.o messages.o $(libs_shared)
118 +
119 +-library-test.static: library-test.static.o messages.static.o $(libs_static)
120 ++library-test.static: library-test.static.o $(libs_static)
121 + @echo " [LD] $@"