From patchwork Thu Jul 25 15:20:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 169724 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp11781508ilk; Thu, 25 Jul 2019 08:20:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqza2E26t54lDCIKKhkuILeauLz6uQ4YL1k9DHErxHzsVIc1KJ8R5k4ORhDB41JfEvRfOSkc X-Received: by 2002:a17:90a:3247:: with SMTP id k65mr50030025pjb.49.1564068048883; Thu, 25 Jul 2019 08:20:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564068048; cv=none; d=google.com; s=arc-20160816; b=nG+Y+NoE9c0S6EU/3YOK1nbe9bDYwKnpGmdCnZPXU16CCHrrpHRQv1dUxksOck00SA fGmj4GZGP0O1QZYUNVfLbuaX7oqgUIR/LGCbqKpqcm+3P6dsbQuWe2d3JATQn4xlS9rn cA91wtxw2/1sGRS0izIjgOBuMdp3oMyg8ybv9awEbhcgs3k6Bk5Z6Mv2CTNSbYdvJNeq zxs2iJUeK6WBIQT0InaCoPqOBjL50s3lUcmZgPInYT+6tbjejvxqPS5bJ3gIWy9Arx5j 4lH2cdcmM9GphnhG3QFgZj9qMaUDLMig9ioJIWsW68Qn0t+hEUhjvoKN9xPStdTC5NDw 69Fg== 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; bh=nqGptC/ZTrI//1XeXOnqPAx1XnBC44W4/xJm1zj9TyM=; b=I/aBHHSsL92MIQPi9wfRmcA/YoASuknMPibmB0eLrM+xCEuJoIf7iiQFwNoKlwqZBu 80Q3XRb+4c1qUTMYRIMt7+Mu1VfJHn3agu5iVrSjarX/ymYJs77pVtrNjxhzze2sy0Zj ikVmZK9cI6CGbiTsMXFOC8iwdac3GAFgV5lzuzwBAL05SQSBvCULIV/DvevBDxW5sEHw 3r3lxnk1fcT9B6nNlRvjbLFszMYCpe3FNZxZ3+GU3PQajA+Y2vk3E13d890qO4Rg55fu JnZ14WKrHFRCUGQ43wvvZZ9wf7FnOWev5F9+3L0seMoJVa6Swxbm9wlLcip28uSVgjz8 6YVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=aRbJVLw5; 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=NONE dis=NONE) header.from=intel.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id f5si17207609pgb.461.2019.07.25.08.20.48; Thu, 25 Jul 2019 08:20:48 -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=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=aRbJVLw5; 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=NONE dis=NONE) header.from=intel.com Received: from ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id B2A197F09C; Thu, 25 Jul 2019 15:20:45 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by mail.openembedded.org (Postfix) with ESMTP id 09EEB7EED3 for ; Thu, 25 Jul 2019 15:20:28 +0000 (UTC) Received: by mail-wm1-f66.google.com with SMTP id v19so45130353wmj.5 for ; Thu, 25 Jul 2019 08:20:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=9y9A99m1k916WNV3VOVfeJXtHS2TBYmiTZJA0D8G/0E=; b=aRbJVLw5XG+nJM+sw2Cam4VTetwM2o55Y8Fo2FSP2Y3YgTpMfQ0DRl/QS/0voZx3dr Chdf36Vu86ZgmLjUX1lWPW+XTTLlEY2PDhCkSYtUXLiEvgtncMupe8N4QE9ROWoz+D3N 0d58T5NU3QahR+MsmuQ7sMrRBqKAJ9wpM9dBtCAyen9V+Fnlfaa/uAIrS2wI7JtabC5i TjjA6AVFsUuIMuabGRJkeaxc3I5IR1uwUsYkR2WxscOxCS2sEy8JIae8vrYIU89CAOoz 7WBXMppT3IrYPqzJszE+8jGlxdQrcyV/Mge9sROJMo48Kz0PHPZ5zBs4BQQGcziG6FT5 lQ3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9y9A99m1k916WNV3VOVfeJXtHS2TBYmiTZJA0D8G/0E=; b=Xews94wcMmGOCrNGuag0ly22GczvnSzvMXwW6j5pP8IBJdT/xqNc0V4MCdlALQCg90 bKun+4NWX8EE3iMaaFPR43yEV3Jm6sl1kAhVOoZ2J0S4pUX1gZq7GPjjFKC+ACBt2PqU 8tpCXXSOX3KBvjNrOgP+SWWwjTJoxumpBNIhkhGAXPw1CguVWWbtyI5u7LX3GELhy8fe ZrcvGYIXtZELxy1T7pM4X1k1l6Dw1D7qQMlDG3iA0cSr4LpoRhX31P66VZrv4gidhjpG ofLiv917bQSSQA0i8FXS9o19SwFKbQCZ73Y8sP6puN9hNG2r5ByN7bVXnsVWVVkIpkai qZJg== X-Gm-Message-State: APjAAAXUIBsqWCGulTpaO9iCGc5/vP44K4JU47bYQfEd7yvGxCxgFdsy jcUenhf8cv6jWR41fKVlkTgK5eJuLPQ= X-Received: by 2002:a1c:c188:: with SMTP id r130mr76183642wmf.73.1564068028629; Thu, 25 Jul 2019 08:20:28 -0700 (PDT) Received: from flashheart.burtonini.com (35.106.2.81.in-addr.arpa. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id z7sm47532602wrh.67.2019.07.25.08.20.27 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 25 Jul 2019 08:20:28 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Thu, 25 Jul 2019 16:20:23 +0100 Message-Id: <20190725152023.30135-2-ross.burton@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190725152023.30135-1-ross.burton@intel.com> References: <20190725152023.30135-1-ross.burton@intel.com> MIME-Version: 1.0 Subject: [OE-core] [PATCH 2/2] gnutls: don't use HOSTTOOLS_DIR/bash as a shell on target 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 The libopts configure script looks for a shell on the build host and assumes it's good for the target. However in our builds it find $HOSTTOOLS_DIR/bash which isn't useful, so patch out the detection and force $base_bindir/sh. Signed-off-by: Ross Burton --- .../gnutls/gnutls/posix-shell.patch | 39 +++++++++++++++++++ meta/recipes-support/gnutls/gnutls_3.6.8.bb | 4 ++ 2 files changed, 43 insertions(+) create mode 100644 meta/recipes-support/gnutls/gnutls/posix-shell.patch -- 2.20.1 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-support/gnutls/gnutls/posix-shell.patch b/meta/recipes-support/gnutls/gnutls/posix-shell.patch new file mode 100644 index 00000000000..938e2d1e18f --- /dev/null +++ b/meta/recipes-support/gnutls/gnutls/posix-shell.patch @@ -0,0 +1,39 @@ +Don't embed the path to the build-time POSIX shell as this will be +$TMPDIR/hosttools/bash, which is no good on the target. + +Instead default to /bin/sh but allow it to be set in the environment. + +This isn't really upstreamable but I filed a bug at +https://gitlab.com/gnutls/gnutls/issues/807 and hope a proper fix will be +integrated. + +Upstream-Status: Inappropriate +Signed-off-by: Ross Burton + +diff --git a/src/libopts/m4/libopts.m4 b/src/libopts/m4/libopts.m4 +index c6ad738..a62faca 100644 +--- a/src/libopts/m4/libopts.m4 ++++ b/src/libopts/m4/libopts.m4 +@@ -112,21 +112,7 @@ AC_DEFUN([INVOKE_LIBOPTS_MACROS_FIRST],[ + AC_CHECK_FUNCS([mmap canonicalize_file_name snprintf strdup strchr \ + strrchr strsignal fchmod fstat chmod]) + AC_PROG_SED +- [while : +- do +- POSIX_SHELL=`which bash` +- test -x "$POSIX_SHELL" && break +- POSIX_SHELL=`which dash` +- test -x "$POSIX_SHELL" && break +- POSIX_SHELL=/usr/xpg4/bin/sh +- test -x "$POSIX_SHELL" && break +- POSIX_SHELL=`/bin/sh -c ' +- exec 2>/dev/null +- if ! true ; then exit 1 ; fi +- echo /bin/sh'` +- test -x "$POSIX_SHELL" && break +- ]AC_MSG_ERROR([cannot locate a working POSIX shell])[ +- done] ++ POSIX_SHELL="${POSIX_SHELL:-/bin/sh}" + AC_DEFINE_UNQUOTED([POSIX_SHELL], ["${POSIX_SHELL}"], + [define to a working POSIX compliant shell]) + AC_SUBST([POSIX_SHELL]) diff --git a/meta/recipes-support/gnutls/gnutls_3.6.8.bb b/meta/recipes-support/gnutls/gnutls_3.6.8.bb index 6c6c520e8ce..c927063f0a3 100644 --- a/meta/recipes-support/gnutls/gnutls_3.6.8.bb +++ b/meta/recipes-support/gnutls/gnutls_3.6.8.bb @@ -19,6 +19,7 @@ SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}" SRC_URI = "https://www.gnupg.org/ftp/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar.xz \ file://arm_eabi.patch \ + file://posix-shell.patch \ " SRC_URI[md5sum] = "9dcf0aa45d1a42e1b3ca5d39ec7c61a8" @@ -47,6 +48,9 @@ EXTRA_OECONF = " \ --with-default-trust-store-file=${sysconfdir}/ssl/certs/ca-certificates.crt \ " +# Otherwise the tools try and use HOSTTOOLS_DIR/bash as a shell. +export POSIX_SHELL="${base_bindir}/sh" + LDFLAGS_append_libc-musl = " -largp" do_configure_prepend() {