Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1241519/?format=api
{ "id": 1241519, "url": "http://patchwork.ozlabs.org/api/patches/1241519/?format=api", "web_url": "http://patchwork.ozlabs.org/project/buildroot/patch/20200220160119.3407-6-patrick.havelange@essensium.com/", "project": { "id": 27, "url": "http://patchwork.ozlabs.org/api/projects/27/?format=api", "name": "Buildroot development", "link_name": "buildroot", "list_id": "buildroot.buildroot.org", "list_email": "buildroot@buildroot.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20200220160119.3407-6-patrick.havelange@essensium.com>", "list_archive_url": null, "date": "2020-02-20T16:01:15", "name": "[v3,06/10] package/pkg-cargo.mk: Introduce the cargo dl backend", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "1dedc37b657d1fc07ab26de1c263f97e5002918a", "submitter": { "id": 75424, "url": "http://patchwork.ozlabs.org/api/people/75424/?format=api", "name": "Patrick Havelange", "email": "patrick.havelange@essensium.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/buildroot/patch/20200220160119.3407-6-patrick.havelange@essensium.com/mbox/", "series": [ { "id": 159771, "url": "http://patchwork.ozlabs.org/api/series/159771/?format=api", "web_url": "http://patchwork.ozlabs.org/project/buildroot/list/?series=159771", "date": "2020-02-20T16:01:10", "name": "[v3,01/10] package/pkg-cargo.mk: Introduce the cargo package infrastructure.", "version": 3, "mbox": "http://patchwork.ozlabs.org/series/159771/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1241519/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1241519/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<buildroot-bounces@busybox.net>", "X-Original-To": [ "incoming-buildroot@patchwork.ozlabs.org", "buildroot@lists.busybox.net" ], "Delivered-To": [ "patchwork-incoming-buildroot@bilbo.ozlabs.org", "buildroot@osuosl.org" ], "Authentication-Results": [ "ozlabs.org; spf=pass (sender SPF authorized)\n\tsmtp.mailfrom=busybox.net (client-ip=140.211.166.133;\n\thelo=hemlock.osuosl.org;\n\tenvelope-from=buildroot-bounces@busybox.net;\n\treceiver=<UNKNOWN>)", "ozlabs.org; dmarc=fail (p=none dis=none)\n\theader.from=essensium.com", "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=essensium.com header.i=@essensium.com\n\theader.a=rsa-sha256 header.s=google header.b=RN9VrxfE; \n\tdkim-atps=neutral" ], "Received": [ "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 48NfVD2xH7z9sPK\n\tfor <incoming-buildroot@patchwork.ozlabs.org>;\n\tFri, 21 Feb 2020 03:01:56 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 8605E87DC5;\n\tThu, 20 Feb 2020 16:01:53 +0000 (UTC)", "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id Ih2JdPWDlEdO; Thu, 20 Feb 2020 16:01:51 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 6C3AE87E54;\n\tThu, 20 Feb 2020 16:01:51 +0000 (UTC)", "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id D62751BF9B3\n\tfor <buildroot@lists.busybox.net>;\n\tThu, 20 Feb 2020 16:01:44 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id D1C1285FD4\n\tfor <buildroot@lists.busybox.net>;\n\tThu, 20 Feb 2020 16:01:44 +0000 (UTC)", "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id JoQfBNjShfgP for <buildroot@lists.busybox.net>;\n\tThu, 20 Feb 2020 16:01:44 +0000 (UTC)", "from mail-wr1-f44.google.com (mail-wr1-f44.google.com\n\t[209.85.221.44])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id CB9EB84D2E\n\tfor <buildroot@buildroot.org>; Thu, 20 Feb 2020 16:01:43 +0000 (UTC)", "by mail-wr1-f44.google.com with SMTP id c9so5206946wrw.8\n\tfor <buildroot@buildroot.org>; Thu, 20 Feb 2020 08:01:43 -0800 (PST)", "from ph-ThinkPad-E560.local.ess-mail.com\n\t(ip-188-118-3-185.reverse.destiny.be. [188.118.3.185])\n\tby smtp.gmail.com with ESMTPSA id\n\th5sm5483691wmf.8.2020.02.20.08.01.40\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 20 Feb 2020 08:01:41 -0800 (PST)" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=essensium.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=CYu46s8vFRBgDtpzey+ASxHaya/eJy9CB7ZtqYSUIPI=;\n\tb=RN9VrxfEomUaWa0AwfyJ/Qe1LmgoRSwkQfj9gVj1hDjrZV0KmRw1iaGJlQEuQSAtRp\n\tPU8N37wMwe76Qvj7zqlNrc42BkG3HaqrFyuh4JyvHwK3cXWGkNL1zed5IMYx8j1eSaLO\n\tgxapPw6yTcPQSezOFGAQ9rVZhIC0c1/xvwbS9U7FCwx0nqFfstmSdU9O2Nl0SOLI44xB\n\tENWOHL3OUsfpQRubF/2yfKKHUGILZM9U3TOrGRuQE9622ueAjXE0Xwj+Rm7kcBA091g4\n\t9Grh+mlQLfdTTUljVtFcOY79HYzm74CTJIJT+eoMe8ZwyteeAoY3cKkMrgKBcK9Sdcs3\n\tn/Sg==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=CYu46s8vFRBgDtpzey+ASxHaya/eJy9CB7ZtqYSUIPI=;\n\tb=W3FWuZPmMab44TWCrs4fZJAfjfcErmfqFeBEwSpDDNOY58Nr0gFFpvfClpHdNybUIm\n\tcv1g6S6BE4oH4vtZIo/jjyWjDP9Gl+W41e4dUpCnlosKdn5jbkC6/QgzsEcIBwQ6ExIA\n\t0zPZuhIBS2xEhxpaF8aYSE9bTMaFXoDfYAee+mCfJEu9fDO6pSLEKZ/A2oEIEJQLSSmD\n\tQPN2ZjF2gxo1Zt4brY2nocquNyfQOzYmSmhT0eeaFdCrrfcN8mTmhAgDI7wMN2DwQegi\n\tKuHm4nI0T1xckOgNcY+DACmQOW/HGnwhI8fLilEFiGmFLvcvHIca65lvAUNYZoYjeO8C\n\tzeUA==", "X-Gm-Message-State": "APjAAAXAJbkwDVF4pPk6IrkNuophJMnSOKww5t6JTuq3b1Y9opbL+8gP\n\t4p00uPCxA3iJpnQAnndHoB6d24iwigSzcg==", "X-Google-Smtp-Source": "APXvYqzp6vL7uXKc+z0RSkSWmZEyMCwF7QCT1Ra3q1yn/Qcspr4CA3tYFX33y7fHcWRpkpnm41ky2g==", "X-Received": "by 2002:adf:ea85:: with SMTP id s5mr42221745wrm.75.1582214501582;\n\tThu, 20 Feb 2020 08:01:41 -0800 (PST)", "From": "Patrick Havelange <patrick.havelange@essensium.com>", "To": "buildroot@buildroot.org", "Date": "Thu, 20 Feb 2020 17:01:15 +0100", "Message-Id": "<20200220160119.3407-6-patrick.havelange@essensium.com>", "X-Mailer": "git-send-email 2.20.1", "In-Reply-To": "<20200220160119.3407-1-patrick.havelange@essensium.com>", "References": "<20200220160119.3407-1-patrick.havelange@essensium.com>", "MIME-Version": "1.0", "Subject": "[Buildroot] [PATCH v3 06/10] package/pkg-cargo.mk: Introduce the\n\tcargo dl backend", "X-BeenThere": "buildroot@busybox.net", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "Discussion and development of buildroot <buildroot.busybox.net>", "List-Unsubscribe": "<http://lists.busybox.net/mailman/options/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=unsubscribe>", "List-Archive": "<http://lists.busybox.net/pipermail/buildroot/>", "List-Post": "<mailto:buildroot@busybox.net>", "List-Help": "<mailto:buildroot-request@busybox.net?subject=help>", "List-Subscribe": "<http://lists.busybox.net/mailman/listinfo/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=subscribe>", "Cc": "Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>,\n\tPatrick Havelange <patrick.havelange@essensium.com>,\n\tSam Voss <sam.voss@gmail.com>,\n\t\"Yann E . MORIN\" <yann.morin.1998@free.fr>, \n\tThomas Petazzoni <thomas.petazzoni@bootlin.com>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "buildroot-bounces@busybox.net", "Sender": "\"buildroot\" <buildroot-bounces@busybox.net>" }, "content": "Cargo is now a fully supported PKGMGR, automatically set for any\npackage using the cargo infrastructure.\nThis effectively splits the download phase and the build phase.\n\nThe cargo backend will set CARGO_HOME inside DL_DIR during download.\nThe cached files in CARGO_HOME permits to download only once the\ncrates index and each dependencies.\nDuring download phase, it will call cargo vendor to copy the\ndependencies inside the VENDOR directory inside the source archive.\n\nA local cargo config is also inserted inside the archive in order\nto use the VENDOR dir during the build phase.\nThe build phase is forced to not query the online repository anymore\nand thus will be using the vendored dependencies from the tarball.\nThis also permits to have offline builds.\n\nSigned-off-by: Patrick Havelange <patrick.havelange@essensium.com>\n---\n package/pkg-cargo.mk | 10 ++++--\n package/ripgrep/ripgrep.hash | 2 +-\n support/download/cargo | 65 ++++++++++++++++++++++++++++++++++++\n support/download/dl-wrapper | 2 +-\n 4 files changed, 75 insertions(+), 4 deletions(-)\n create mode 100755 support/download/cargo", "diff": "diff --git a/package/pkg-cargo.mk b/package/pkg-cargo.mk\nindex 35f7c15ad9..c084f7b35e 100644\n--- a/package/pkg-cargo.mk\n+++ b/package/pkg-cargo.mk\n@@ -39,6 +39,8 @@ define inner-cargo-package\n # We need host-rustc to run cargo\n $(2)_DEPENDENCIES += host-rustc\n \n+$(2)_PKGMGR = cargo\\|\n+\n $(2)_CARGO_ENV = \\\n \tCARGO_HOME=$(HOST_DIR)/share/cargo \\\n \t$(TARGET_CONFIGURE_OPTS)\n@@ -55,11 +57,13 @@ endif\n #\n ifndef $(2)_BUILD_CMDS\n define $(2)_BUILD_CMDS\n+\tcd $$(@D) && \\\n \t$(TARGET_MAKE_ENV) $$($(2)_CARGO_ENV) \\\n \t\tcargo build \\\n \t\t\t--$$($(2)_CARGO_MODE) \\\n \t\t\t$$($(2)_CARGO_TARGET_OPT) \\\n-\t\t\t--manifest-path $$(@D)/Cargo.toml\n+\t\t\t--manifest-path Cargo.toml \\\n+\t\t\t--offline\n endef\n endif\n \n@@ -69,12 +73,14 @@ endif\n #\n ifndef $(2)_INSTALL_TARGET_CMDS\n define $(2)_INSTALL_TARGET_CMDS\n+\tcd $$(@D) && \\\n \t$(TARGET_MAKE_ENV) $$($(2)_CARGO_ENV) \\\n \t\tcargo install \\\n \t\t\t--root $(TARGET_DIR)/usr/ \\\n \t\t\t--bins \\\n-\t\t\t--path $$(@D) \\\n+\t\t\t--path ./ \\\n \t\t\t$$($(2)_CARGO_TARGET_OPT) \\\n+\t\t\t--offline \\\n \t\t\t--force\n endef\n endif\ndiff --git a/package/ripgrep/ripgrep.hash b/package/ripgrep/ripgrep.hash\nindex 0841c0185c..8c48458cd8 100644\n--- a/package/ripgrep/ripgrep.hash\n+++ b/package/ripgrep/ripgrep.hash\n@@ -1,3 +1,3 @@\n # Locally calculated\n-sha256 7035379fce0c1e32552e8ee528b92c3d01b8d3935ea31d26c51a73287be74bb3 ripgrep-0.8.1.tar.gz\n+sha256 cb895cff182740c219fefbbaaf903e60f005a4ac4688cac1e43e5fbbbccc5a94 ripgrep-0.8.1.tar.gz\n sha256 0f96a83840e146e43c0ec96a22ec1f392e0680e6c1226e6f3ba87e0740af850f LICENSE-MIT\ndiff --git a/support/download/cargo b/support/download/cargo\nnew file mode 100755\nindex 0000000000..0ce94cf16b\n--- /dev/null\n+++ b/support/download/cargo\n@@ -0,0 +1,65 @@\n+#!/usr/bin/env bash\n+\n+# We want to catch any unexpected failure, and exit immediately\n+set -e\n+\n+# Download helper for cargo package. It will populate the VENDOR directory\n+# inside the archive with the dependencies of the package\n+#\n+# Arguments are in this order:\n+# $1 mandatory fullpath to an already downloaded source file of a cargo package\n+# $2 mandatory fullpath to a temp dir\n+# $3 mandatory fullpath to the DL_DIR\n+#\n+# Environment:\n+# cargo in PATH\n+\n+tmpd=\"\"\n+\n+do_clean() {\n+ if [ -n \"${tmpd}\" ]; then\n+ rm -rf \"${tmpd}\"\n+ fi\n+}\n+\n+trap do_clean EXIT\n+\n+if [ $# -le 2 ] ; then\n+ echo 'Need at least 3 arguments' >&2\n+ exit 1\n+fi;\n+\n+tmpd=\"$(mktemp -d -p \"$2\")\"\n+cd \"${tmpd}\"\n+\n+tar xf \"${1}\"\n+cd ./*/\n+echo \"Running cargo vendor.\"\n+CARGO_HOME=\"${3}\"/cargo_home cargo vendor -q --locked VENDOR\n+# Create the local .cargo/config with vendor info\n+mkdir -p .cargo/\n+cat <<EOF >.cargo/config\n+[source.crates-io]\n+replace-with = \"vendored-sources\"\n+\n+[source.vendored-sources]\n+directory = \"VENDOR\"\n+EOF\n+\n+cd ..\n+\n+# Generate the archive, sort with the C locale so that it is reproducible.\n+find \"$(basename \"$OLDPWD\")\" -not -type d -print0 >files.list\n+LC_ALL=C sort -z <files.list >files.list.sorted\n+# let's use a fixed hardcoded date to be reproducible\n+date=\"2020-02-06 01:02:03\"\n+\n+# Create GNU-format tarballs, since that's the format of the tarballs on\n+# sources.buildroot.org and used in the *.hash files\n+echo \"Creating final archive.\"\n+tar cf new.tar --null --verbatim-files-from --numeric-owner --format=gnu \\\n+ --owner=0 --group=0 --mtime=\"${date}\" -T files.list.sorted\n+gzip -6 -n <new.tar >new.tar.gz\n+mv \"${1}\" \"${1}\".old\n+mv new.tar.gz \"${1}\"\n+rm \"${1}\".old\ndiff --git a/support/download/dl-wrapper b/support/download/dl-wrapper\nindex 3f613bb622..5e52b3e60f 100755\n--- a/support/download/dl-wrapper\n+++ b/support/download/dl-wrapper\n@@ -98,7 +98,7 @@ main() {\n case \"${b}\" in\n urlencode) urlencode=\"${b}\" ;;\n git|svn|cvs|bzr|file|scp|hg) backend=\"${b}\" ;;\n- # insert here supported second backends) backend2=\"${b}\" ;;\n+ cargo) backend2=\"${b}\" ;;\n esac\n done\n uri=${uri#*+}\n", "prefixes": [ "v3", "06/10" ] }