From patchwork Fri Feb 7 18:08:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 1235099 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=mind.be Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=mind.be header.i=@mind.be header.a=rsa-sha256 header.s=google header.b=NB8B+oCZ; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48DjyK2LCdz9sRh for ; Sat, 8 Feb 2020 05:10:17 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id CCE2F86DCC; Fri, 7 Feb 2020 18:10:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id geDosT6eosKC; Fri, 7 Feb 2020 18:10:14 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 7E2A886477; Fri, 7 Feb 2020 18:10:14 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id CFB341BF38E for ; Fri, 7 Feb 2020 18:09:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id C4882824E3 for ; Fri, 7 Feb 2020 18:09:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ydxue+x1YYM2 for ; Fri, 7 Feb 2020 18:09:30 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by whitealder.osuosl.org (Postfix) with ESMTPS id 7B29481FD3 for ; Fri, 7 Feb 2020 18:09:30 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id t3so3747172wru.7 for ; Fri, 07 Feb 2020 10:09:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mind.be; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0k4smqZRroyKd+MZHcEPa7FnqiccZ+YwTIHFifZb1iw=; b=NB8B+oCZ3FpvrsA2TPHB3+yg+nZqetvPc2J2QLXxagM3MDoJpmTAAL3hAYr0Hi3maa 4gTdTWM9TairoDzpd7uwURFOhuqK8J1s+m3ruH9qwN9rJgPVbZZmxCod6TMcNQEiItkB BGUBlA+eRPcXWn5uyobjx4EEsPKfokjC+h4Q0B7/UHi8nesURq1+oKamVeFM5bz4sApD VUwhLIgL0DcZ+Xox7g/nkEafnHiRBOtjW1SjQ1DMFvnHqwUrj4xdydbesC74ZOp6EPd2 RFvEyT9LxvX4LM3zxwsE8zY9I+1+1xz6lJTMfST4Mjgq757FSP9yZwsq1jKHAj2hVHa5 61AA== 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=0k4smqZRroyKd+MZHcEPa7FnqiccZ+YwTIHFifZb1iw=; b=GqgjZuNNNA0Aru0WAWmoaEHuaFY/6F7tV4WtIYPjgiuM/NpR/y9q9jbdEiNcDeQXrg WcJilAnaR1ddoCq0jHjvWO3ZPfDp+H4+S2TneSDMSABUTqiiKgMgp2MpsO63/IeXuLWm 7cLkqRrX+CCFCokZTPYOvVvjcC8s65VUatLqvUnv14EavNPAMv35BK7Ybzgc9QP/pKxb prypV8l0VXg3unehCrTrT/NV+85B/M7yXWK/zNgSe2JteEMTd/kpAl7t38TPg0K0qc6x tkjTCjTUBXxMrG1mdlPPefrCavXp9serSqloVqI6u4vpwBrrZkQaB2OBKq2jjU6kbFNp QQGg== X-Gm-Message-State: APjAAAXzQIQc8pVviXrgFiaEtz6mKAMNz06mFiyx7KSJ1CiNFikz6e4Z qjXyOUjSV5TZj3HT3444XE82sDgvSPg= X-Google-Smtp-Source: APXvYqzBDlo1ZUVmb75E0hCiRTxPCq1cvuKK9TubOm/x8kddTk3BgMlJldsFuJufaxnT01HmfbkPHQ== X-Received: by 2002:a5d:4fce:: with SMTP id h14mr315354wrw.60.1581098968684; Fri, 07 Feb 2020 10:09:28 -0800 (PST) Received: from localhost.localdomain (ip-188-118-3-185.reverse.destiny.be. [188.118.3.185]) by smtp.gmail.com with ESMTPSA id t10sm4263487wmi.40.2020.02.07.10.09.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Feb 2020 10:09:28 -0800 (PST) From: "Arnout Vandecappelle (Essensium/Mind)" To: buildroot@buildroot.org Date: Fri, 7 Feb 2020 19:08:29 +0100 Message-Id: <20200207180829.165689-11-arnout@mind.be> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200207180829.165689-1-arnout@mind.be> References: <20200207180829.165689-1-arnout@mind.be> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v3 10/10] package/cargo-bin: remove and use cargo-bin from rust-bin package 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: Eric Le Bihan , Patrick Havelange Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Patrick Havelange Rust upstream distributes tarballs with separate rust and cargo binaries, but also tarballs with everything together. The latter contains a bit more than what we need, so the download is slightly larger than separate cargo-bin and rust-bin. But it simplifies our life if we do the same in rust-bin as in rust (i.e. get both rust and cargo). Also added hashes for rust-bin powerpc64le, which was missing before. Signed-off-by: Patrick Havelange Signed-off-by: Arnout Vandecappelle (Essensium/Mind) Tested-by: David Pierret --- DEVELOPERS | 1 - package/cargo-bin/cargo-bin.hash | 13 ------------- package/cargo-bin/cargo-bin.mk | 19 ------------------- package/rust-bin/rust-bin.hash | 15 +++++++++------ package/rust-bin/rust-bin.mk | 28 ++++++++++++---------------- package/rust/rust.mk | 2 +- 6 files changed, 22 insertions(+), 56 deletions(-) delete mode 100644 package/cargo-bin/cargo-bin.hash delete mode 100644 package/cargo-bin/cargo-bin.mk diff --git a/DEVELOPERS b/DEVELOPERS index e0f6e7278c..ace16c06e6 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -708,7 +708,6 @@ F: package/gstreamer1/gst1-plugins-bayer2rgb-neon/ N: Eric Le Bihan F: docs/manual/adding-packages-meson.txt F: package/adwaita-icon-theme/ -F: package/cargo-bin/ F: package/darkhttpd/ F: package/eudev/ F: package/execline/ diff --git a/package/cargo-bin/cargo-bin.hash b/package/cargo-bin/cargo-bin.hash deleted file mode 100644 index 22cad3c0ee..0000000000 --- a/package/cargo-bin/cargo-bin.hash +++ /dev/null @@ -1,13 +0,0 @@ -# From https://static.rust-lang.org/dist/cargo-0.41.0-i686-unknown-linux-gnu.tar.xz.sha256 -# Verified using https://static.rust-lang.org/dist/cargo-0.41.0-i686-unknown-linux-gnu.tar.xz.asc -sha256 c48bc132f4025ff39b1b6dc52aef9d406c3f926ce05fe92d943ceab7a5fd6058 cargo-0.41.0-i686-unknown-linux-gnu.tar.xz -# From https://static.rust-lang.org/dist/cargo-0.41.0-powerpc64le-unknown-linux-gnu.tar.xz.sha256 -# Verified using https://static.rust-lang.org/dist/cargo-0.41.0-powerpc64le-unknown-linux-gnu.tar.xz.asc -sha256 7705f21d938a72ba6f01818661b2dea29183209940a335f18d1761e1e03d3710 cargo-0.41.0-powerpc64le-unknown-linux-gnu.tar.xz -# From https://static.rust-lang.org/dist/cargo-0.41.0-x86_64-unknown-linux-gnu.tar.xz.sha256 -# Verified using https://static.rust-lang.org/dist/cargo-0.41.0-x86_64-unknown-linux-gnu.tar.xz.asc -sha256 9b6ae643fa240c5ecbc1dc390f4020b6a683f25bac6f7437ebd4b9d32a8d0b6c cargo-0.41.0-x86_64-unknown-linux-gnu.tar.xz -# Locally generated -sha256 8ada45cd9f843acf64e4722ae262c622a2b3b3007c7310ef36ac1061a30f6adb LICENSE-APACHE -sha256 23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3 LICENSE-MIT -sha256 cbc759b1f17a2ac38fe3eb9e9563b1a08ba0f900611c49faaf68b46907b6d898 LICENSE-THIRD-PARTY diff --git a/package/cargo-bin/cargo-bin.mk b/package/cargo-bin/cargo-bin.mk deleted file mode 100644 index 246fdbf856..0000000000 --- a/package/cargo-bin/cargo-bin.mk +++ /dev/null @@ -1,19 +0,0 @@ -################################################################################ -# -# cargo-bin -# -################################################################################ - -CARGO_BIN_VERSION = 0.41.0 -CARGO_BIN_SITE = https://static.rust-lang.org/dist -CARGO_BIN_SOURCE = cargo-$(CARGO_BIN_VERSION)-$(RUSTC_HOST_NAME).tar.xz -CARGO_BIN_LICENSE = Apache-2.0 or MIT -CARGO_BIN_LICENSE_FILES = LICENSE-APACHE LICENSE-MIT - -ifeq ($(BR2_PACKAGE_HOST_RUST_BIN),y) -define HOST_CARGO_BIN_INSTALL_CMDS - $(@D)/install.sh --prefix=$(HOST_DIR) --disable-ldconfig -endef -endif - -$(eval $(host-generic-package)) diff --git a/package/rust-bin/rust-bin.hash b/package/rust-bin/rust-bin.hash index 12195f2911..1fdce9ad6f 100644 --- a/package/rust-bin/rust-bin.hash +++ b/package/rust-bin/rust-bin.hash @@ -1,9 +1,12 @@ -# From https://static.rust-lang.org/dist/rustc-1.40.0-i686-unknown-linux-gnu.tar.xz.sha256 -# Verified using https://static.rust-lang.org/dist/rustc-1.40.0-i686-unknown-linux-gnu.tar.xz.asc -sha256 257e4789043098a5e3b4fa85ea988019f37d640a10f83d39ada00fb23e057b8a rustc-1.40.0-i686-unknown-linux-gnu.tar.xz -# From https://static.rust-lang.org/dist/rustc-1.40.0-x86_64-unknown-linux-gnu.tar.xz.sha256 -# Verified using https://static.rust-lang.org/dist/rustc-1.40.0-x86_64-unknown-linux-gnu.tar.xz.asc -sha256 b1c00618b7a98156e88b14682508a503284f85748eab23de749a20dcc8847111 rustc-1.40.0-x86_64-unknown-linux-gnu.tar.xz +# From https://static.rust-lang.org/dist/rust-1.40.0-i686-unknown-linux-gnu.tar.xz.sha256 +# Verified using https://static.rust-lang.org/dist/rust-1.40.0-i686-unknown-linux-gnu.tar.xz.asc +sha256 82454e1b60b2bc24779d9c949cc0e1da43f3e423dbfc6b45b5afddf65829fc9d rust-1.40.0-i686-unknown-linux-gnu.tar.xz +# From https://static.rust-lang.org/dist/rust-1.40.0-x86_64-unknown-linux-gnu.tar.xz.sha256 +# Verified using https://static.rust-lang.org/dist/rust-1.40.0-x86_64-unknown-linux-gnu.tar.xz.asc +sha256 37492d6467bcea611b2c7388aed50b655524f81410e255142ef6cfb6cef1ec53 rust-1.40.0-x86_64-unknown-linux-gnu.tar.xz +# From https://static.rust-lang.org/dist/rust-1.40.0-powerpc64le-unknown-linux-gnu.tar.xz.sha256 +# Verified using https://static.rust-lang.org/dist/rust-1.40.0-powerpc64le-unknown-linux-gnu.tar.xz.asc +sha256 82454e1b60b2bc24779d9c949cc0e1da43f3e423dbfc6b45b5afddf65829fc9d rust-1.40.0-powerpc64le-unknown-linux-gnu.tar.xz # From https://static.rust-lang.org/dist/rust-std-1.40.0-aarch64-unknown-linux-gnu.tar.xz.sha256 # Verified using https://static.rust-lang.org/dist/rust-std-1.40.0-aarch64-unknown-linux-gnu.tar.xz.asc sha256 1abd1865e8339c2cac6992a11f6f98b66fa2b97f67acaddcf1992e39a7001bfc rust-std-1.40.0-aarch64-unknown-linux-gnu.tar.xz diff --git a/package/rust-bin/rust-bin.mk b/package/rust-bin/rust-bin.mk index a5966768a4..be8d623aa2 100644 --- a/package/rust-bin/rust-bin.mk +++ b/package/rust-bin/rust-bin.mk @@ -10,18 +10,14 @@ RUST_BIN_LICENSE = Apache-2.0 or MIT RUST_BIN_LICENSE_FILES = LICENSE-APACHE LICENSE-MIT HOST_RUST_BIN_PROVIDES = host-rustc -HOST_RUST_BIN_DEPENDENCIES = host-cargo-bin -HOST_RUST_BIN_SOURCE = rustc-$(RUST_BIN_VERSION)-$(RUSTC_HOST_NAME).tar.xz - -HOST_RUST_BIN_EXTRA_DOWNLOADS = \ - rust-std-$(RUST_BIN_VERSION)-$(RUSTC_HOST_NAME).tar.xz +HOST_RUST_BIN_SOURCE = rust-$(RUST_BIN_VERSION)-$(RUSTC_HOST_NAME).tar.xz ifeq ($(BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS),y) -HOST_RUST_BIN_EXTRA_DOWNLOADS += rust-std-$(RUST_BIN_VERSION)-$(RUSTC_TARGET_NAME).tar.xz +HOST_RUST_BIN_EXTRA_DOWNLOADS = rust-std-$(RUST_BIN_VERSION)-$(RUSTC_TARGET_NAME).tar.xz endif -HOST_RUST_BIN_LIBSTD_HOST_PREFIX = rust-std-$(RUST_BIN_VERSION)-$(RUSTC_HOST_NAME)/rust-std-$(RUSTC_HOST_NAME) +HOST_RUST_BIN_LIBSTD_HOST_PREFIX = rust-std-$(RUSTC_HOST_NAME) define HOST_RUST_BIN_LIBSTD_EXTRACT mkdir -p $(@D)/std @@ -31,36 +27,36 @@ define HOST_RUST_BIN_LIBSTD_EXTRACT ) mkdir -p $(@D)/rustc/lib/rustlib/$(RUSTC_HOST_NAME)/lib cd $(@D)/rustc/lib/rustlib/$(RUSTC_HOST_NAME)/lib; \ - ln -sf ../../../../../std/$(HOST_RUST_BIN_LIBSTD_HOST_PREFIX)/lib/rustlib/$(RUSTC_HOST_NAME)/lib/* . + ln -sf ../../../../../$(HOST_RUST_BIN_LIBSTD_HOST_PREFIX)/lib/rustlib/$(RUSTC_HOST_NAME)/lib/* . endef HOST_RUST_BIN_POST_EXTRACT_HOOKS += HOST_RUST_BIN_LIBSTD_EXTRACT -HOST_RUST_BIN_INSTALL_OPTS = \ +HOST_RUST_BIN_INSTALL_COMMON_OPTS = \ --prefix=$(HOST_DIR) \ --disable-ldconfig +HOST_RUST_BIN_INSTALL_OPTS = \ + $(HOST_RUST_BIN_INSTALL_COMMON_OPTS) \ + --components=rustc,cargo,rust-std-$(RUSTC_HOST_NAME) + define HOST_RUST_BIN_INSTALL_RUSTC (cd $(@D); \ ./install.sh $(HOST_RUST_BIN_INSTALL_OPTS)) endef -define HOST_RUST_BIN_INSTALL_LIBSTD_HOST - (cd $(@D)/std/rust-std-$(RUST_BIN_VERSION)-$(RUSTC_HOST_NAME); \ - ./install.sh $(HOST_RUST_BIN_INSTALL_OPTS)) -endef - ifeq ($(BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS),y) define HOST_RUST_BIN_INSTALL_LIBSTD_TARGET (cd $(@D)/std/rust-std-$(RUST_BIN_VERSION)-$(RUSTC_TARGET_NAME); \ - ./install.sh $(HOST_RUST_BIN_INSTALL_OPTS)) + ./install.sh $(HOST_RUST_BIN_INSTALL_COMMON_OPTS)) endef endif define HOST_RUST_BIN_INSTALL_CMDS $(HOST_RUST_BIN_INSTALL_RUSTC) - $(HOST_RUST_BIN_INSTALL_LIBSTD_HOST) $(HOST_RUST_BIN_INSTALL_LIBSTD_TARGET) endef +HOST_RUST_BIN_POST_INSTALL_HOOKS += HOST_RUST_INSTALL_CARGO_CONFIG + $(eval $(host-generic-package)) diff --git a/package/rust/rust.mk b/package/rust/rust.mk index cc3cf1bd01..a81aa6dc2b 100644 --- a/package/rust/rust.mk +++ b/package/rust/rust.mk @@ -41,7 +41,7 @@ define HOST_RUST_CONFIGURE_CMDS ( \ echo '[build]'; \ echo 'target = ["$(RUSTC_TARGET_NAME)"]'; \ - echo 'cargo = "$(HOST_CARGO_BIN_DIR)/cargo/bin/cargo"'; \ + echo 'cargo = "$(HOST_RUST_BIN_DIR)/cargo/bin/cargo"'; \ echo 'rustc = "$(HOST_RUST_BIN_DIR)/rustc/bin/rustc"'; \ echo 'python = "$(HOST_DIR)/bin/python2"'; \ echo 'submodules = false'; \