From patchwork Mon Nov 6 21:23:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 834948 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yW5C46BCjz9ryr for ; Tue, 7 Nov 2017 08:23:28 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 4F4548863C; Mon, 6 Nov 2017 21:23:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AAQuYHI-Wwri; Mon, 6 Nov 2017 21:23:24 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 2F5FC86D57; Mon, 6 Nov 2017 21:23:24 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id C90191C04F8 for ; Mon, 6 Nov 2017 21:23:22 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id C0C7B88E94 for ; Mon, 6 Nov 2017 21:23:22 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id f+dOJNGDc9Eb for ; Mon, 6 Nov 2017 21:23:20 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exchange.essensium.com (220.77.144.195.ipv4.evonet.be [195.144.77.220]) by hemlock.osuosl.org (Postfix) with ESMTP id 81E7688718 for ; Mon, 6 Nov 2017 21:23:20 +0000 (UTC) Received: from localhost.localdomain (10.3.7.11) by beleexch01.local.ess-mail.com (10.3.7.8) with Microsoft SMTP Server (TLS) id 15.0.847.32; Mon, 6 Nov 2017 22:23:07 +0100 From: "Arnout Vandecappelle (Essensium/Mind)" To: Date: Mon, 6 Nov 2017 22:23:02 +0100 Message-ID: <20171106212303.10662-1-arnout@mind.be> X-Mailer: git-send-email 2.15.0 MIME-Version: 1.0 X-Originating-IP: [10.3.7.11] X-ClientProxiedBy: beleexch01.local.ess-mail.com (10.3.7.8) To beleexch01.local.ess-mail.com (10.3.7.8) Subject: [Buildroot] [PATCH v3 1/2] parted: convert patches to git formatting X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- v3: Don't remove Thomas's Sob (Baruch) v2: split off git formatting in separate patch. --- ...ted-arch-linux.c-Compile-without-ENABLE_DEVICE.patch | 8 ++++---- .../0002-configure.ac-uclinux-is-also-linux.patch | 4 ++-- ...0003-Include-fcntl.h-to-get-loff_t-definition.patch} | 17 ++++++++++++++--- 3 files changed, 20 insertions(+), 9 deletions(-) rename package/parted/{0003-fix-includes-for-musl.patch => 0003-Include-fcntl.h-to-get-loff_t-definition.patch} (41%) diff --git a/package/parted/0001-libparted-arch-linux.c-Compile-without-ENABLE_DEVICE.patch b/package/parted/0001-libparted-arch-linux.c-Compile-without-ENABLE_DEVICE.patch index 5adc9beb12..1cf699bb12 100644 --- a/package/parted/0001-libparted-arch-linux.c-Compile-without-ENABLE_DEVICE.patch +++ b/package/parted/0001-libparted-arch-linux.c-Compile-without-ENABLE_DEVICE.patch @@ -1,4 +1,4 @@ -From 7e87ca3c531228d35e13e802d2622006138b104c Mon Sep 17 00:00:00 2001 +From 141c4309d7164dcd4e09d137fc075c1726fd8dbb Mon Sep 17 00:00:00 2001 From: Felix Janda Date: Sun, 3 May 2015 10:33:15 +0200 Subject: [PATCH] libparted/arch/linux.c: Compile without ENABLE_DEVICE_MAPPER @@ -10,7 +10,7 @@ Signed-off-by: Yegor Yefremov 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c -index 90ab21d..f6141e4 100644 +index 0f18904..cf38c6f 100644 --- a/libparted/arch/linux.c +++ b/libparted/arch/linux.c @@ -2304,6 +2304,7 @@ zasprintf (const char *format, ...) @@ -57,7 +57,7 @@ index 90ab21d..f6141e4 100644 return result; } -@@ -2958,12 +2968,15 @@ _disk_sync_part_table (PedDisk* disk) +@@ -2945,12 +2955,15 @@ _disk_sync_part_table (PedDisk* disk) unsigned long long *length); @@ -75,5 +75,5 @@ index 90ab21d..f6141e4 100644 remove_partition = _blkpg_remove_partition; #ifdef BLKPG_RESIZE_PARTITION -- -2.1.4 +2.14.2 diff --git a/package/parted/0002-configure.ac-uclinux-is-also-linux.patch b/package/parted/0002-configure.ac-uclinux-is-also-linux.patch index b2119bcdd7..5a264ced80 100644 --- a/package/parted/0002-configure.ac-uclinux-is-also-linux.patch +++ b/package/parted/0002-configure.ac-uclinux-is-also-linux.patch @@ -1,4 +1,4 @@ -From b3958317c5ee2940e7024bec2e7f288b5a6a26c3 Mon Sep 17 00:00:00 2001 +From 7697d9c54e489b32b82c01f17db04f8b51857e51 Mon Sep 17 00:00:00 2001 From: Gustavo Zacarias Date: Mon, 30 Jun 2014 10:09:04 -0300 Subject: [PATCH] configure.ac: uclinux is also linux @@ -29,5 +29,5 @@ index 436d0e2..50ad478 100644 AC_SUBST([OS]) -- -1.8.5.5 +2.14.2 diff --git a/package/parted/0003-fix-includes-for-musl.patch b/package/parted/0003-Include-fcntl.h-to-get-loff_t-definition.patch similarity index 41% rename from package/parted/0003-fix-includes-for-musl.patch rename to package/parted/0003-Include-fcntl.h-to-get-loff_t-definition.patch index 28c94ace7c..752938ab7f 100644 --- a/package/parted/0003-fix-includes-for-musl.patch +++ b/package/parted/0003-Include-fcntl.h-to-get-loff_t-definition.patch @@ -1,13 +1,21 @@ -Include to get loff_t definition +From 2078c07d38ee7841b89ac8d81afc5e8bfcd4f703 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sun, 8 Oct 2017 00:58:58 +0200 +Subject: [PATCH] Include to get loff_t definition Patch borrowed from Alpine Linux at http://git.alpinelinux.org/cgit/aports/plain/main/parted/fix-includes.patch. Solves build with musl. Signed-off-by: Thomas Petazzoni +--- + libparted/fs/xfs/platform_defs.h | 1 + + 1 file changed, 1 insertion(+) ---- parted-3.1.orig/libparted/fs/xfs/platform_defs.h -+++ parted-3.1/libparted/fs/xfs/platform_defs.h +diff --git a/libparted/fs/xfs/platform_defs.h b/libparted/fs/xfs/platform_defs.h +index 2b55752..17023dc 100644 +--- a/libparted/fs/xfs/platform_defs.h ++++ b/libparted/fs/xfs/platform_defs.h @@ -35,6 +35,7 @@ #define __XFS_PLATFORM_DEFS_H__ @@ -16,3 +24,6 @@ Signed-off-by: Thomas Petazzoni #include #include #include +-- +2.14.2 + From patchwork Mon Nov 6 21:23:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 834949 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yW5CC5Xmqz9ryr for ; Tue, 7 Nov 2017 08:23:35 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 4E95B89FC2; Mon, 6 Nov 2017 21:23:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RTDEWkctPC-o; Mon, 6 Nov 2017 21:23:28 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 2C393887E1; Mon, 6 Nov 2017 21:23:28 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 704FE1C04F8 for ; Mon, 6 Nov 2017 21:23:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 69B3D88718 for ; Mon, 6 Nov 2017 21:23:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AtpCktIXnSUw for ; Mon, 6 Nov 2017 21:23:21 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exchange.essensium.com (220.77.144.195.ipv4.evonet.be [195.144.77.220]) by hemlock.osuosl.org (Postfix) with ESMTP id 07345887E1 for ; Mon, 6 Nov 2017 21:23:21 +0000 (UTC) Received: from localhost.localdomain (10.3.7.11) by beleexch01.local.ess-mail.com (10.3.7.8) with Microsoft SMTP Server (TLS) id 15.0.847.32; Mon, 6 Nov 2017 22:23:08 +0100 From: "Arnout Vandecappelle (Essensium/Mind)" To: Date: Mon, 6 Nov 2017 22:23:03 +0100 Message-ID: <20171106212303.10662-2-arnout@mind.be> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171106212303.10662-1-arnout@mind.be> References: <20171106212303.10662-1-arnout@mind.be> MIME-Version: 1.0 X-Originating-IP: [10.3.7.11] X-ClientProxiedBy: beleexch01.local.ess-mail.com (10.3.7.8) To beleexch01.local.ess-mail.com (10.3.7.8) Subject: [Buildroot] [PATCH v3 2/2] parted: properly link with libiconv X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sjoerd Venema Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" parted uses libiconv but doesn't link with it. Add a patch to add it to LIBADD of the library that uses it. iconv was already checked in configure.ac, but only if i18n is enabled, so the iconv check is also added unconditionally in configure.ac. Also add an optional dependency on libiconv, so it is reproducible. This was not detected in the autobuilders, since it only occurs when libiconv exists (otherwise uClibc stubs will be used). libiconv depends on !BR2_ENABLE_LOCALE and parted depends on BR2_USE_WCHAR. We don't have such a configuration in the autobuilders. Upstream status: sent to mailing list http://lists.alioth.debian.org/pipermail/parted-devel/2017-November/005131.html Signed-off-by: Arnout Vandecappelle (Essensium/Mind) Cc: Sjoerd Venema --- v3: add link to upstream v2: - Add AM_ICONV to configure.ac. Without it, -liconv will be added also if it is already part of libc (e.g. in glibc). (Thomas) - Explain in the commit message why autobuilders didn't detect this. Patch sent upstream but hasn't appeared in the mailing list archives yet. --- ...arted-labels-link-with-libiconv-if-needed.patch | 54 ++++++++++++++++++++++ package/parted/parted.mk | 7 ++- 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 package/parted/0004-libparted-labels-link-with-libiconv-if-needed.patch diff --git a/package/parted/0004-libparted-labels-link-with-libiconv-if-needed.patch b/package/parted/0004-libparted-labels-link-with-libiconv-if-needed.patch new file mode 100644 index 0000000000..a4a1b00331 --- /dev/null +++ b/package/parted/0004-libparted-labels-link-with-libiconv-if-needed.patch @@ -0,0 +1,54 @@ +From dd17f55b2ac189ccd3b8025e4f6509537d00f9d3 Mon Sep 17 00:00:00 2001 +From: "Arnout Vandecappelle (Essensium/Mind)" +Date: Sun, 8 Oct 2017 00:53:31 +0200 +Subject: [PATCH] libparted/labels: link with libiconv if needed + +gpt.c uses iconv so it should link with it. Otherwise, on platforms +where libiconv is a separate library, we get a link failure of parted: + + CCLD parted + ../libparted/.libs/libparted.so: undefined reference to `libiconv' + ../libparted/.libs/libparted.so: undefined reference to `libiconv_open' + ../libparted/.libs/libparted.so: undefined reference to `libiconv_close' + +Since iconv functionality is needed unconditionally (not only when +gettext is enabled), AM_ICONV needs to be added to configure.ac. + +Upstream status: sent to mailing list +http://lists.alioth.debian.org/pipermail/parted-devel/2017-November/005131.html + +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- + configure.ac | 2 ++ + libparted/labels/Makefile.am | 2 +- + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 50ad478..62f1b4d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -288,6 +288,8 @@ fi + AC_PROG_LIBTOOL + LT_INIT + ++AM_ICONV ++ + AM_GNU_GETTEXT_VERSION([0.18]) + AM_GNU_GETTEXT([external]) + if test "$USE_INCLUDED_LIBINTL" = "yes"; then +diff --git a/libparted/labels/Makefile.am b/libparted/labels/Makefile.am +index c996f81..b204379 100644 +--- a/libparted/labels/Makefile.am ++++ b/libparted/labels/Makefile.am +@@ -35,7 +35,7 @@ liblabels_la_SOURCES = \ + rdb.c \ + sun.c + +-liblabels_la_LIBADD = $(OS_LIBS) $(INTLLIBS) ++liblabels_la_LIBADD = $(OS_LIBS) $(INTLLIBS) $(LIBICONV) + + AM_CPPFLAGS = $(partedincludedir) $(INTLINCS) + +-- +2.14.2 + diff --git a/package/parted/parted.mk b/package/parted/parted.mk index 35d152b469..1f0428a55b 100644 --- a/package/parted/parted.mk +++ b/package/parted/parted.mk @@ -9,7 +9,8 @@ PARTED_SOURCE = parted-$(PARTED_VERSION).tar.xz PARTED_SITE = $(BR2_GNU_MIRROR)/parted PARTED_DEPENDENCIES = host-pkgconf util-linux PARTED_INSTALL_STAGING = YES -# For uclinux patch +# 0002-configure.ac-uclinux-is-also-linux.patch +# 0004-libparted-labels-link-with-libiconv-if-needed.patch PARTED_AUTORECONF = YES PARTED_GETTEXTIZE = YES PARTED_LICENSE = GPL-3.0+ @@ -29,6 +30,10 @@ else PARTED_CONF_OPTS += --disable-device-mapper endif +ifeq ($(BR2_PACKAGE_LIBICONV),y) +PARTED_DEPENDENCIES += libiconv +endif + ifeq ($(BR2_STATIC_LIBS),y) PARTED_CONF_OPTS += --disable-dynamic-loading endif