From patchwork Sun Aug 5 02:06:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 143457 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1804461ljj; Sat, 4 Aug 2018 19:08:12 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe8uzthBvdjDr2YX5+8Z99G0SQ32sD0AU18xHfvHagKrBaDgKB2MV7HQxAYzWwFQV/KQjYe X-Received: by 2002:a63:9311:: with SMTP id b17-v6mr9440434pge.261.1533434892044; Sat, 04 Aug 2018 19:08:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533434892; cv=none; d=google.com; s=arc-20160816; b=juvGoBdi4mAlVkT+zNgqTknpq0kHzOaQyKpP57Z5oZao8s/Q4SgFtG34fSzfG5Cqv1 yReho5hPmiM2LwUqx5sOse9sE0dmHjquRVa8CtCWiIABaWs1DFGOaT4ECKXn5sg7BALG 5xiqLeQvG5cWxKTIRkk4BmO3w+HyDfmHyuAeAWOpRNI2UpcC490y0/btmfvsVsV/CsNE Tnbv4IqGHRXPhxm2c9014f+eKHNm18Hx8Bozhjpn7C2xhtP3SN+voWOyrokfdxf1cgy/ TVL0WZeYKVS9wFLzn01OIFfAcm8uNLPwM3v0sgHbGSw/Sg8tNXcwiM6j4pSbZcv8aGMJ fJMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=qJ8P0EZs/BDzTt19mPdzlPi/ecrt/59jIPGDWVW4DnU=; b=DaOqe+AsNZ4JJOnI8qlb1JNjtyVo53qVTQk7K2H5eHoXQTPEOKSqIm3uT15FQHXSGn 9KRMVoJ3l/WwTq9TDHkHn2U5ea2EzLUeAmmMMdnb25vcO+8P6xMuJeBMfVrwOPMVE306 sZtIrUsXh7v/swWsV5a1La5M2W4P/xsxsi1I77KYoKm8QdSg57Flrh5kshC9X7dxbJtI zh8XXAWBA80J19YoAkA+SRIdodHfRFrc3OQ1kwxncRDN+l0CSbRlrUy+090Of0Qal7AA yB0Nic4bYXMaLopVfbs/DhJWfiGeAyz7oXFuuUZN++BkEu9AH5/i9eRh+Ksh9giVbitO Oz2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=EmGD2Dv2; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id u190-v6si9505320pgu.305.2018.08.04.19.08.11; Sat, 04 Aug 2018 19:08:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=EmGD2Dv2; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 885FA78C1F; Sun, 5 Aug 2018 02:07:40 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pg1-f193.google.com (mail-pg1-f193.google.com [209.85.215.193]) by mail.openembedded.org (Postfix) with ESMTP id E292C78BF4 for ; Sun, 5 Aug 2018 02:07:15 +0000 (UTC) Received: by mail-pg1-f193.google.com with SMTP id z8-v6so4598112pgu.8 for ; Sat, 04 Aug 2018 19:07:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=P80zQGv64hLsUWXwg8MePo1LgIVHhFsSZuYLmNw29W0=; b=EmGD2Dv2LI1adTDmlVIpDyjl9z3+M2vyjS+fd9PtfozzAr6hoe7sQIylXw/RvCJStM M+/4w8V9QHqesA1NaN7vv9ap4oF8LPcf/rl/bI1NWO4D7x3J8ndvSujxHOxhA8ii9R+V JDz9OTBB+V4w74BEwmoGKHudg0soa2Hk5W+ioFV650DxR/slDrNgfjVuzwBN7GEpZRfs wQnJ0jeKDNqSrFwkNkQr0TA6EwzMdcUqA+omUxrYurzVHIYauR4eQI/Y6MxQ4wgIIJrC shei7gFgzhZszQxiRTYHtHlJRFa9KjXoFMWw5DFRm/KpO507VxKZwt9/yXOfg+XPbnF/ 2BTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=P80zQGv64hLsUWXwg8MePo1LgIVHhFsSZuYLmNw29W0=; b=GvGxUMQpCutApq0TUQ7PMFHnPe2bK0JESH/N2Reb9KWd5BtrY9RykuBjbhNnpIh++B GTWU9aJAJUnByfQ3TyTwTu1iUdaWw2en6QGqQU2uwyj0zCJ7spkUgOrUriWTDVmRsgjF 1PNcFd2RBR9TkSfDTZKWV2UzucXzJH6kEuo6+1QOdaSiCepz592yeFJqxUihlzab5R7a +diKSR2PY/ggt7g1JQ1Bt5umMJLOtn1i1NTD/fvoMCwaMR1fJ0alGuUwtxBaQ6n9ymNQ wkBSb8Pfpnp7Y87UosEYVsVed+lOIKoBmayv3YHLYvXFwA6GhfgTL1cbuadAA0GjpvsD Z1VA== X-Gm-Message-State: AOUpUlEx0Sz2+1uVCh1fH5h4x9fMsDPuXxJktmCGIkrMZtmGnO3LMY/7 Uf3pERXjWCbyKOyFMTJR6XMrFwnP X-Received: by 2002:a63:d309:: with SMTP id b9-v6mr9395938pgg.163.1533434836602; Sat, 04 Aug 2018 19:07:16 -0700 (PDT) Received: from localhost.localdomain ([2601:646:877f:9499::5b3b]) by smtp.gmail.com with ESMTPSA id b195-v6sm4486021pfb.2.2018.08.04.19.07.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 Aug 2018 19:07:15 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Sat, 4 Aug 2018 19:06:58 -0700 Message-Id: <2d88901e525ff3995d5e87cba0b0bfb20876654a.1533434674.git.raj.khem@gmail.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: References: MIME-Version: 1.0 Subject: [OE-core] [PATCH 06/10] gzip: Fix build with glibc 2.28 X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org Signed-off-by: Khem Raj --- .../gzip/gzip-1.9/gnulib.patch | 189 ++++++++++++++++++ meta/recipes-extended/gzip/gzip_1.9.bb | 4 +- 2 files changed, 192 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-extended/gzip/gzip-1.9/gnulib.patch diff --git a/meta/recipes-extended/gzip/gzip-1.9/gnulib.patch b/meta/recipes-extended/gzip/gzip-1.9/gnulib.patch new file mode 100644 index 0000000000..c3cdd72b64 --- /dev/null +++ b/meta/recipes-extended/gzip/gzip-1.9/gnulib.patch @@ -0,0 +1,189 @@ +From 1831628c0630ae96a43586b2a25ca51cbdba3e53 Mon Sep 17 00:00:00 2001 +From: Paul Eggert +Date: Mon, 5 Mar 2018 10:56:29 -0800 +Subject: [PATCH] fflush: adjust to glibc 2.28 libio.h removal +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Problem reported by Daniel P. Berrangé in: +https://lists.gnu.org/r/bug-gnulib/2018-03/msg00000.html +* lib/fbufmode.c (fbufmode): +* lib/fflush.c (clear_ungetc_buffer_preserving_position) +(disable_seek_optimization, rpl_fflush): +* lib/fpending.c (__fpending): +* lib/fpurge.c (fpurge): +* lib/freadable.c (freadable): +* lib/freadahead.c (freadahead): +* lib/freading.c (freading): +* lib/freadptr.c (freadptr): +* lib/freadseek.c (freadptrinc): +* lib/fseeko.c (fseeko): +* lib/fseterr.c (fseterr): +* lib/fwritable.c (fwritable): +* lib/fwriting.c (fwriting): +Check _IO_EOF_SEEN instead of _IO_ftrylockfile. +* lib/stdio-impl.h (_IO_IN_BACKUP) [_IO_EOF_SEEN]: +Define if not already defined. +--- + +Upstream-Status: Pending +Signed-off-by: Khem Raj + + ChangeLog | 23 +++++++++++++++++++++++ + lib/fbufmode.c | 2 +- + lib/fflush.c | 6 +++--- + lib/fpending.c | 2 +- + lib/fpurge.c | 2 +- + lib/freadable.c | 2 +- + lib/freadahead.c | 2 +- + lib/freading.c | 2 +- + lib/freadptr.c | 2 +- + lib/freadseek.c | 2 +- + lib/fseeko.c | 4 ++-- + lib/fseterr.c | 2 +- + lib/fwritable.c | 2 +- + lib/fwriting.c | 2 +- + lib/stdio-impl.h | 6 ++++++ + 15 files changed, 45 insertions(+), 16 deletions(-) + +Index: gzip-1.9/ChangeLog +=================================================================== +--- gzip-1.9.orig/ChangeLog ++++ gzip-1.9/ChangeLog +@@ -1,3 +1,26 @@ ++2018-03-05 Paul Eggert ++ ++ fflush: adjust to glibc 2.28 libio.h removal ++ Problem reported by Daniel P. Berrangé in: ++ https://lists.gnu.org/r/bug-gnulib/2018-03/msg00000.html ++ * lib/fbufmode.c (fbufmode): ++ * lib/fflush.c (clear_ungetc_buffer_preserving_position) ++ (disable_seek_optimization, rpl_fflush): ++ * lib/fpending.c (__fpending): ++ * lib/fpurge.c (fpurge): ++ * lib/freadable.c (freadable): ++ * lib/freadahead.c (freadahead): ++ * lib/freading.c (freading): ++ * lib/freadptr.c (freadptr): ++ * lib/freadseek.c (freadptrinc): ++ * lib/fseeko.c (fseeko): ++ * lib/fseterr.c (fseterr): ++ * lib/fwritable.c (fwritable): ++ * lib/fwriting.c (fwriting): ++ Check _IO_EOF_SEEN instead of _IO_ftrylockfile. ++ * lib/stdio-impl.h (_IO_IN_BACKUP) [_IO_EOF_SEEN]: ++ Define if not already defined. ++ + 2018-01-07 Jim Meyering + + version 1.9 +Index: gzip-1.9/lib/fflush.c +=================================================================== +--- gzip-1.9.orig/lib/fflush.c ++++ gzip-1.9/lib/fflush.c +@@ -33,7 +33,7 @@ + #undef fflush + + +-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + + /* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */ + static void +@@ -72,7 +72,7 @@ clear_ungetc_buffer (FILE *fp) + + #endif + +-#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */) ++#if ! (defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */) + + # if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT + /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ +@@ -148,7 +148,7 @@ rpl_fflush (FILE *stream) + if (stream == NULL || ! freading (stream)) + return fflush (stream); + +-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + + clear_ungetc_buffer_preserving_position (stream); + +Index: gzip-1.9/lib/fpurge.c +=================================================================== +--- gzip-1.9.orig/lib/fpurge.c ++++ gzip-1.9/lib/fpurge.c +@@ -62,7 +62,7 @@ fpurge (FILE *fp) + /* Most systems provide FILE as a struct and the necessary bitmask in + , because they need it for implementing getc() and putc() as + fast macros. */ +-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + fp->_IO_read_end = fp->_IO_read_ptr; + fp->_IO_write_ptr = fp->_IO_write_base; + /* Avoid memory leak when there is an active ungetc buffer. */ +Index: gzip-1.9/lib/freading.c +=================================================================== +--- gzip-1.9.orig/lib/freading.c ++++ gzip-1.9/lib/freading.c +@@ -31,7 +31,7 @@ freading (FILE *fp) + /* Most systems provide FILE as a struct and the necessary bitmask in + , because they need it for implementing getc() and putc() as + fast macros. */ +-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + return ((fp->_flags & _IO_NO_WRITES) != 0 + || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0 + && fp->_IO_read_base != NULL)); +Index: gzip-1.9/lib/fseeko.c +=================================================================== +--- gzip-1.9.orig/lib/fseeko.c ++++ gzip-1.9/lib/fseeko.c +@@ -47,7 +47,7 @@ fseeko (FILE *fp, off_t offset, int when + #endif + + /* These tests are based on fpurge.c. */ +-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + if (fp->_IO_read_end == fp->_IO_read_ptr + && fp->_IO_write_ptr == fp->_IO_write_base + && fp->_IO_save_base == NULL) +@@ -123,7 +123,7 @@ fseeko (FILE *fp, off_t offset, int when + return -1; + } + +-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + fp->_flags &= ~_IO_EOF_SEEN; + fp->_offset = pos; + #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ +Index: gzip-1.9/lib/fseterr.c +=================================================================== +--- gzip-1.9.orig/lib/fseterr.c ++++ gzip-1.9/lib/fseterr.c +@@ -29,7 +29,7 @@ fseterr (FILE *fp) + /* Most systems provide FILE as a struct and the necessary bitmask in + , because they need it for implementing getc() and putc() as + fast macros. */ +-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + fp->_flags |= _IO_ERR_SEEN; + #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ + /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ +Index: gzip-1.9/lib/stdio-impl.h +=================================================================== +--- gzip-1.9.orig/lib/stdio-impl.h ++++ gzip-1.9/lib/stdio-impl.h +@@ -18,6 +18,12 @@ + the same implementation of stdio extension API, except that some fields + have different naming conventions, or their access requires some casts. */ + ++/* Glibc 2.28 made _IO_IN_BACKUP private. For now, work around this ++ problem by defining it ourselves. FIXME: Do not rely on glibc ++ internals. */ ++#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN ++# define _IO_IN_BACKUP 0x100 ++#endif + + /* BSD stdio derived implementations. */ + diff --git a/meta/recipes-extended/gzip/gzip_1.9.bb b/meta/recipes-extended/gzip/gzip_1.9.bb index a8eeba1380..19f6586526 100644 --- a/meta/recipes-extended/gzip/gzip_1.9.bb +++ b/meta/recipes-extended/gzip/gzip_1.9.bb @@ -3,7 +3,9 @@ require gzip.inc LICENSE = "GPLv3+" SRC_URI = "${GNU_MIRROR}/gzip/${BP}.tar.gz \ - file://run-ptest" + file://run-ptest \ + file://gnulib.patch \ + " SRC_URI_append_class-target = " file://wrong-path-fix.patch" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \