From patchwork Thu Jan 3 20:40:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas De Schampheleire X-Patchwork-Id: 1020489 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="MJ82ZiMI"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43W09364KYz9s7h for ; Fri, 4 Jan 2019 07:37:43 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 5F20D86F2E; Thu, 3 Jan 2019 20:37:40 +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 o7UFuiQB4ySD; Thu, 3 Jan 2019 20:37:38 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id BA835870A1; Thu, 3 Jan 2019 20:37:38 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 773FA1C2A15 for ; Thu, 3 Jan 2019 20:37:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 73C47232D7 for ; Thu, 3 Jan 2019 20:37:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WZXn1E17M-Ec for ; Thu, 3 Jan 2019 20:37:35 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ed1-f67.google.com (mail-ed1-f67.google.com [209.85.208.67]) by silver.osuosl.org (Postfix) with ESMTPS id BA87F232D2 for ; Thu, 3 Jan 2019 20:37:34 +0000 (UTC) Received: by mail-ed1-f67.google.com with SMTP id o10so30042338edt.13 for ; Thu, 03 Jan 2019 12:37:34 -0800 (PST) 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; bh=LR27dLbfebCLzAztG5xQ0zrJcDq3t6KVbK/ZgDyhR+c=; b=MJ82ZiMIFx7CUC79mgaL8C0zmzbgKy/XhZiRGP4Bo+dGchuPRi6pzJaX00kNlWrHjY g9TzH5Pmo6NafxVLXMWcbtxEkR+Epym7puuYlhFrnbqtl0FqOGz4ewRT6U1Nizbb7P7u bVSsDlSja3QQzhd8iNju3qXisvpG6B+xxycXP6Co45XDx16iOnOy3AnYliEJZtfTuDMQ 3v1DL3CDqX9/RWbGu+c86EOtYMTv3Sah7HOGSk7rxAlAvstU6hSGVMPsGJH6kOpF6hPd Vvqn1h6EdBlxWA9Ps8AO3d1CFGOjb9HfXbQl7DmZd8DGOMvwOfulHCyOaf6PdaUiOPxF R2Yw== 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; bh=LR27dLbfebCLzAztG5xQ0zrJcDq3t6KVbK/ZgDyhR+c=; b=hytZHyB3Nd6yUgQIQAmVuJJjIrmd8KJcIvskIhrgpCHUwuzkHlJEOibNIWeawhwCyS NyGtkRkpmljg+wKWEMYUyZAN2OB6HfhREWzKhQC5dmqJkQUzxe4OTFfW5+n/hnL+iH1g OjW81SlCeo2zSFkNwFGS5TQVUMV/gu8CHTIf8dNT6aOyz3rhIlYy2xvXZefMzRdbZ6rQ FX8h5WIa57yqlXpJqCtuFOz3T3d3uS11QS2hMAtQ8eQoLJDqxMZ40Q2nnkoLNjV7gsD1 xQeH6XL4zv+ZVR+KmoJFhABeXSPbnXZJ+gkvg451LSa2r1q0zMhjpmTWcYWv47kVUXXf oe9A== X-Gm-Message-State: AA+aEWZqpzDz8GGKrNiOtIa6Kl4RbfUbDdCV2oU18f+cGU6DqSYnPg6R ttRoy3Te4DUJ8noFQgTofUIeZSIvlKk= X-Google-Smtp-Source: AFSGD/UFqGeRCB12BqHfkYujTzEPcQlZun7JQRcDX3i4aKTgKGrTRintHdZK0IkYKzmp5d/xXD4qIQ== X-Received: by 2002:a50:f5af:: with SMTP id u44mr45390775edm.172.1546547852900; Thu, 03 Jan 2019 12:37:32 -0800 (PST) Received: from localhost.localdomain (d54C493B0.access.telenet.be. [84.196.147.176]) by smtp.gmail.com with ESMTPSA id p1-v6sm13452926ejo.49.2019.01.03.12.37.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Jan 2019 12:37:32 -0800 (PST) From: Thomas De Schampheleire To: buildroot@buildroot.org Date: Thu, 3 Jan 2019 21:40:17 +0100 Message-Id: <20190103204026.23512-3-patrickdepinguin@gmail.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20190103204026.23512-1-patrickdepinguin@gmail.com> References: <20190103204026.23512-1-patrickdepinguin@gmail.com> Subject: [Buildroot] [PATCH 02/11] support/download: fix scp download with scheme prefix 'scp://' X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Yann E. MORIN" , Thomas De Schampheleire MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Thomas De Schampheleire The scp download helper is broken when the server URL starts with 'scp://'. Such prefix is used in two situations: 1. to let FOO_SITE point to an scp location without explicitly having to set 'FOO_SITE_METHOD = scp' 2. when BR2_PRIMARY_SITE or BR2_BACKUP_SITE points to an scp location. In this case, there is no equivalent of 'SITE_METHOD'. Strip out the scheme prefix, similarly to how the 'file' download helper does it. That helper has the same cases as above. Signed-off-by: Thomas De Schampheleire Reviewed-by: "Yann E. MORIN" --- support/download/scp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/support/download/scp b/support/download/scp index 746c3c6ba0..55f588e157 100755 --- a/support/download/scp +++ b/support/download/scp @@ -34,4 +34,7 @@ _scp() { eval ${SCP} "${@}" } +# Remove any scheme prefix +uri="${uri##scp://}" + _scp ${verbose} "${@}" "'${uri}/${filename}'" "'${output}'"