Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/605012/?format=api
{ "id": 605012, "url": "http://patchwork.ozlabs.org/api/patches/605012/?format=api", "web_url": "http://patchwork.ozlabs.org/project/buildroot/patch/e70d8f886ab73e2dbe51f90f59c83d0ad1d486f6.1459541702.git.yann.morin.1998@free.fr/", "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": "<e70d8f886ab73e2dbe51f90f59c83d0ad1d486f6.1459541702.git.yann.morin.1998@free.fr>", "list_archive_url": null, "date": "2016-04-01T20:25:30", "name": "[3/4,v2] support/download/git: add support for submodules", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "1662674ceac26a9f46e0906bdf530ea537569eb4", "submitter": { "id": 13903, "url": "http://patchwork.ozlabs.org/api/people/13903/?format=api", "name": "Yann E. MORIN", "email": "yann.morin.1998@free.fr" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/buildroot/patch/e70d8f886ab73e2dbe51f90f59c83d0ad1d486f6.1459541702.git.yann.morin.1998@free.fr/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/605012/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/605012/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<buildroot-bounces@busybox.net>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "buildroot@lists.busybox.net" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "buildroot@osuosl.org" ], "Received": [ "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ozlabs.org (Postfix) with ESMTP id 3qcCZ80flNz9sD5\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 2 Apr 2016 07:25:52 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 47490A63AA;\n\tFri, 1 Apr 2016 20:25:51 +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 OxQnfAAafwyA; Fri, 1 Apr 2016 20:25:50 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id A7623A637D;\n\tFri, 1 Apr 2016 20:25:45 +0000 (UTC)", "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id 68D551C0B41\n\tfor <buildroot@lists.busybox.net>;\n\tFri, 1 Apr 2016 20:25:42 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 63F04A60DF\n\tfor <buildroot@lists.busybox.net>;\n\tFri, 1 Apr 2016 20:25:42 +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 2PBR_keUGdbs for <buildroot@lists.busybox.net>;\n\tFri, 1 Apr 2016 20:25:38 +0000 (UTC)", "from mail-wm0-f68.google.com (mail-wm0-f68.google.com\n\t[74.125.82.68])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id 9F773A6379\n\tfor <buildroot@buildroot.org>; Fri, 1 Apr 2016 20:25:37 +0000 (UTC)", "by mail-wm0-f68.google.com with SMTP id 139so950729wmn.2\n\tfor <buildroot@buildroot.org>; Fri, 01 Apr 2016 13:25:37 -0700 (PDT)", "from gourin.bzh.lan (ns304657.ip-46-105-103.eu. [46.105.103.66])\n\tby smtp.gmail.com with ESMTPSA id\n\tw203sm559814wmg.14.2016.04.01.13.25.34\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tFri, 01 Apr 2016 13:25:35 -0700 (PDT)" ], "Authentication-Results": "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com header.b=Gsgoffi1;\n\tdkim-atps=neutral", "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; d=gmail.com; s=20120113;\n\th=sender:from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=FHom6Z615yjcBL5aic+6b15WhkRFbjb1tvKbXZ9woK0=;\n\tb=Gsgoffi1D/2xeQXYfXauCQJiTbFCErXVprwDENhDuJWv1NPfIt97mRLD5p/9khyAzS\n\tjjsL0AzgS0QHy8OJyhfdQccNVPqoGGoX8LEqN11AF+EswHui1HOz7t4y3/PgLKD5PzVd\n\tz2r6Oep07uReVC0MOzGO81xUKTzS/x5xfrh5+jtCZT1Kww0Qb29h57DTImwHpteDVFGn\n\tmI5avPNSd4K92y1TR8GxQXSa89g4TuomrGk1zbIQe12YXzI3f15kW2xefCTogrg2aqFF\n\t9vv0RjaDm++hqe1cYPMUtKB/I49H+5ZbqgsN2ey8vGKfA51cE9LjH74ZfOMYnTtgHhFX\n\tO9TA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:sender:from:to:cc:subject:date:message-id\n\t:in-reply-to:references;\n\tbh=FHom6Z615yjcBL5aic+6b15WhkRFbjb1tvKbXZ9woK0=;\n\tb=MD6i075n2j6XHtW62xYcHb7ICZApUoHP8uL5pqtFsm6tTa3k2ZK3OxxdwhA390cGct\n\trh2KJT9SB7HwoLALGmkajDSDYs3PAJfAoshCjgm2/6325paQ2yXHN42L3gyRG7Qx0QZR\n\tLLX/H6VPxj/fV3b2LMi9P5HMCS6yBxe9GzzaaGH0jDSwnRmSWTudP5QFawS+JhvPVxn3\n\tF1NusaSs1d/zz4ysUf6TFto3HUV1H9vzrh2B2ty67O2G+kXUj3mi3IZ09yrd2IBhH2I0\n\tGf212JuccPAotApBWue5QKx4ZTJ/jmIst3gg5F6PnSNa8JhfgL/tiNVUNNuDEGwZiF86\n\tA6bg==", "X-Gm-Message-State": "AD7BkJKzzKE+s95m+IlJHPDzyrIHh7Ndb+2CkcVLRBnoQWJOZII6EHel8YX+iB1u1O/9Lw==", "X-Received": "by 10.28.53.134 with SMTP id c128mr588285wma.10.1459542336327;\n\tFri, 01 Apr 2016 13:25:36 -0700 (PDT)", "From": "\"Yann E. MORIN\" <yann.morin.1998@free.fr>", "To": "buildroot@buildroot.org", "Date": "Fri, 1 Apr 2016 22:25:30 +0200", "Message-Id": "<e70d8f886ab73e2dbe51f90f59c83d0ad1d486f6.1459541702.git.yann.morin.1998@free.fr>", "X-Mailer": "git-send-email 1.9.1", "In-Reply-To": "<cover.1459541702.git.yann.morin.1998@free.fr>", "References": "<cover.1459541702.git.yann.morin.1998@free.fr>", "Cc": "\"Yann E. MORIN\" <yann.morin.1998@free.fr>", "Subject": "[Buildroot] [PATCH 3/4 v2] support/download/git: add support for\n\tsubmodules", "X-BeenThere": "buildroot@busybox.net", "X-Mailman-Version": "2.1.18-1", "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>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "buildroot-bounces@busybox.net", "Sender": "\"buildroot\" <buildroot-bounces@busybox.net>" }, "content": "Some git repositories may be split into a master repository and\nsubmodules. Up until now, we did not have support for submodules,\nbecause we were using bare clones, in which it is not possible to\nupdate the list of submodules.\n\nNow that we are using plain clones with a working copy, we can retrieve\nthe submdoules.\n\nAdd an option to the git downlaod helper to kick the update of\nsubmodules, so that they are only fetched for those packages that\nrequire them. Also document the existing -q option at the same time.\n\nSubmodules have a .git file at their root, which contains the path to\nthe real .git directory of the master repository. Since we remove it,\nthere is no point in keeping those .git files either.\n\nNote: this is currently unused, but will be enabled with the follow-up\npatch , that adds the necessary parts in the pkg-generic and pkg-download\ninfrastructures.\n\nSigned-off-by: \"Yann E. MORIN\" <yann.morin.1998@free.fr>\n---\n support/download/git | 23 +++++++++++++++++------\n 1 file changed, 17 insertions(+), 6 deletions(-)", "diff": "diff --git a/support/download/git b/support/download/git\nindex 5672217..99bd996 100755\n--- a/support/download/git\n+++ b/support/download/git\n@@ -6,15 +6,20 @@ set -e\n # Download helper for git, to be called from the download wrapper script\n #\n # Call it as:\n-# .../git [-q] OUT_FILE REPO_URL CSET BASENAME\n+# .../git [-q] [-r] OUT_FILE REPO_URL CSET BASENAME\n+#\n+# -q Be quiet.\n+# -r Clone and archive sub-modules.\n #\n # Environment:\n # GIT : the git command to call\n \n verbose=\n-while getopts :q OPT; do\n+recurse=0\n+while getopts :qr OPT; do\n case \"${OPT}\" in\n q) verbose=-q; exec >/dev/null;;\n+ r) recurse=1;;\n \\?) printf \"unknown option '%s'\\n\" \"${OPTARG}\" >&2; exit 1;;\n esac\n done\n@@ -61,18 +66,24 @@ pushd \"${basename}\" >/dev/null\n # below, if there is an issue anyway. Since most of the cset we're gonna\n # have to clone are not such special refs, consign the output to oblivion\n # so as not to alarm unsuspecting users, but still trace it as a warning.\n-if ! _git fetch \"'${cset}:${cset}'\" >/dev/null 2>&1; then\n+if ! _git fetch origin \"'${cset}'\" >/dev/null 2>&1; then\n printf \"Could not fetch special ref '%s'; assuming it is not special.\\n\" \"${cset}\"\n fi\n \n-# Checkout the required changeset.\n+# Checkout the required changeset, so that we can update the required\n+# submodules.\n _git checkout -q \"'${cset}'\"\n \n # Get date of commit to generate a reproducible archive.\n date=\"$( _git show --no-patch --pretty=format:%cD )\"\n \n-# We do not need the .git dir to generate the tarball\n-rm -rf .git\n+# There might be submodules, so fetch them.\n+if [ ${recurse} -eq 1 ]; then\n+ _git submodule update --init --recursive\n+fi\n+\n+# We do not need the .git dir and files to generate the tarball\n+find . \\( -name .git -o -name .gitmodules \\) -exec rm -rf {} +\n \n popd >/dev/null\n \n", "prefixes": [ "3/4", "v2" ] }