From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-941161-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 3DD6E139694
	for <garchives@archives.gentoo.org>; Mon, 27 Mar 2017 20:45:51 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 40CDE234020;
	Mon, 27 Mar 2017 20:45:48 +0000 (UTC)
Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 10F86234020
	for <gentoo-commits@lists.gentoo.org>; Mon, 27 Mar 2017 20:45:47 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 467F8341650
	for <gentoo-commits@lists.gentoo.org>; Mon, 27 Mar 2017 20:45:46 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id A7E7E3DDC
	for <gentoo-commits@lists.gentoo.org>; Mon, 27 Mar 2017 20:45:44 +0000 (UTC)
From: "Sergei Trofimovich" <slyfox@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sergei Trofimovich" <slyfox@gentoo.org>
Message-ID: <1490647535.a061e9c01024a2b9890cacb0a159e646463553bb.slyfox@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/btrfs-progs/files/, sys-fs/btrfs-progs/
X-VCS-Repository: repo/gentoo
X-VCS-Files: sys-fs/btrfs-progs/btrfs-progs-4.10-r1.ebuild sys-fs/btrfs-progs/btrfs-progs-4.10.ebuild sys-fs/btrfs-progs/files/btrfs-progs-4.10-fix-headers.patch sys-fs/btrfs-progs/files/btrfs-progs-4.10-messages.patch
X-VCS-Directories: sys-fs/btrfs-progs/ sys-fs/btrfs-progs/files/
X-VCS-Committer: slyfox
X-VCS-Committer-Name: Sergei Trofimovich
X-VCS-Revision: a061e9c01024a2b9890cacb0a159e646463553bb
X-VCS-Branch: master
Date: Mon, 27 Mar 2017 20:45:44 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 139fa71d-9e7d-45c7-93b9-c2ee44635fb1
X-Archives-Hash: f09e3bc3dd169adccf0db20c47883077

commit:     a061e9c01024a2b9890cacb0a159e646463553bb
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 27 20:44:55 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon Mar 27 20:45:35 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a061e9c0

sys-fs/btrfs-progs: fix libbtrfs library, bug #613890

Two fixes are here:
- fixed undefined symbols in libbtrfs.so.0 (__error symbol)
- added missing 'sizes.h' kernel compatibility header.

Reported-by: Denis Descheneaux
Bug: https://bugs.gentoo.org/613890
Package-Manager: Portage-2.3.5, Repoman-2.3.2

 ...rogs-4.10.ebuild => btrfs-progs-4.10-r1.ebuild} |  5 ++++
 .../files/btrfs-progs-4.10-fix-headers.patch       | 32 ++++++++++++++++++++
 .../files/btrfs-progs-4.10-messages.patch          | 34 ++++++++++++++++++++++
 3 files changed, 71 insertions(+)

diff --git a/sys-fs/btrfs-progs/btrfs-progs-4.10.ebuild b/sys-fs/btrfs-progs/btrfs-progs-4.10-r1.ebuild
similarity index 96%
rename from sys-fs/btrfs-progs/btrfs-progs-4.10.ebuild
rename to sys-fs/btrfs-progs/btrfs-progs-4.10-r1.ebuild
index 397d271d38c..663141c9409 100644
--- a/sys-fs/btrfs-progs/btrfs-progs-4.10.ebuild
+++ b/sys-fs/btrfs-progs/btrfs-progs-4.10-r1.ebuild
@@ -53,6 +53,11 @@ DEPEND="${RDEPEND}
 	)
 "
 
+PATCHES=(
+	"${FILESDIR}"/${P}-messages.patch
+	"${FILESDIR}"/${P}-fix-headers.patch
+)
+
 if [[ ${PV} == 9999 ]]; then
 	DEPEND+=" sys-devel/gnuconfig"
 fi

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
new file mode 100644
index 00000000000..414c0995e41
--- /dev/null
+++ b/sys-fs/btrfs-progs/files/btrfs-progs-4.10-fix-headers.patch
@@ -0,0 +1,32 @@
+Add missing 'sizes.h' header install.
+
+Noticed on snapper build failure:
+  In file included from btrfs/send-utils.h:28:0,
+    from BtrfsUtils.cc:36:
+  btrfs/ctree.h:37:25: fatal error: linux/sizes.h: No such file or directory
+diff --git a/Makefile b/Makefile
+index 05a5d06..fb1cfd6 100644
+--- a/Makefile
++++ b/Makefile
+@@ -108,7 +108,7 @@ libbtrfs_objects = send-stream.o send-utils.o kernel-lib/rbtree.o btrfs-list.o \
+ 		   uuid-tree.o utils-lib.o rbtree-utils.o
+ libbtrfs_headers = send-stream.h send-utils.h send.h kernel-lib/rbtree.h btrfs-list.h \
+ 	       kernel-lib/crc32c.h kernel-lib/list.h kerncompat.h \
+-	       kernel-lib/radix-tree.h extent-cache.h \
++	       kernel-lib/radix-tree.h kernel-lib/sizes.h extent-cache.h \
+ 	       extent_io.h ioctl.h ctree.h btrfsck.h version.h
+ convert_objects = convert/main.o convert/common.o convert/source-fs.o \
+ 		  convert/source-ext2.o
+diff --git a/ctree.h b/ctree.h
+index 1d0622d..c8f771b 100644
+--- a/ctree.h
++++ b/ctree.h
+@@ -34,7 +34,7 @@
+ #include <btrfs/extent-cache.h>
+ #include <btrfs/extent_io.h>
+ #include <btrfs/ioctl.h>
+-#include <linux/sizes.h>
++#include <btrfs/sizes.h>
+ #endif /* BTRFS_FLAT_INCLUDES */
+ 
+ struct btrfs_root;

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
new file mode 100644
index 00000000000..afcc27896f6
--- /dev/null
+++ b/sys-fs/btrfs-progs/files/btrfs-progs-4.10-messages.patch
@@ -0,0 +1,34 @@
+Fix missing __error symbol in libbtrfs.so.0.
+
+The easiest way to reproduce it is to try to build
+btrfs-progs with LDFLAGS=-Wl,--no-undefined :
+
+btrfs-list.o: In function `lookup_ino_path':
+btrfs-list.c:(.text+0x7d2): undefined reference to `__error'
+
+Reported-by: Denis Descheneaux
+Bug: https://bugs.gentoo.org/show_bug.cgi?id=613890
+diff --git a/Makefile b/Makefile
+index 67fbc48..05a5d06 100644
+--- a/Makefile
++++ b/Makefile
+@@ -97,3 +97,3 @@ objects = ctree.o disk-io.o kernel-lib/radix-tree.o extent-tree.o print-tree.o \
+ 	  inode.o file.o find-root.o free-space-tree.o help.o send-dump.o \
+-	  fsfeatures.o messages.o
++	  fsfeatures.o
+ cmds_objects = cmds-subvolume.o cmds-filesystem.o cmds-device.o cmds-scrub.o \
+@@ -106,3 +106,3 @@ cmds_objects = cmds-subvolume.o cmds-filesystem.o cmds-device.o cmds-scrub.o \
+ libbtrfs_objects = send-stream.o send-utils.o kernel-lib/rbtree.o btrfs-list.o \
+-		   kernel-lib/crc32c.o \
++		   kernel-lib/crc32c.o messages.o \
+ 		   uuid-tree.o utils-lib.o rbtree-utils.o
+@@ -448,3 +448,3 @@ test-ioctl: ioctl-test ioctl-test-32 ioctl-test-64
+ 
+-library-test: library-test.o messages.o $(libs_shared)
++library-test: library-test.o $(libs_shared)
+ 	@echo "    [LD]     $@"
+@@ -454,3 +454,3 @@ library-test: library-test.o messages.o $(libs_shared)
+ 
+-library-test.static: library-test.static.o messages.static.o $(libs_static)
++library-test.static: library-test.static.o $(libs_static)
+ 	@echo "    [LD]     $@"