[{"id":1765426,"web_url":"http://patchwork.ozlabs.org/comment/1765426/","msgid":"<87vaktgskq.fsf@linaro.org>","list_archive_url":null,"date":"2017-09-08T14:42:29","subject":"Re: [Qemu-devel] [PATCH v6 03/12] scripts: Add archive-source.sh","submitter":{"id":39532,"url":"http://patchwork.ozlabs.org/api/people/39532/","name":"Alex Bennée","email":"alex.bennee@linaro.org"},"content":"Fam Zheng <famz@redhat.com> writes:\n\n> Signed-off-by: Fam Zheng <famz@redhat.com>\n> ---\n>  scripts/archive-source.sh | 31 +++++++++++++++++++++++++++++++\n>  1 file changed, 31 insertions(+)\n>  create mode 100755 scripts/archive-source.sh\n>\n> diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh\n> new file mode 100755\n> index 0000000000..3cae7f34d3\n> --- /dev/null\n> +++ b/scripts/archive-source.sh\n> @@ -0,0 +1,31 @@\n> +#!/bin/sh\n> +#\n> +# Author: Fam Zheng <famz@redhat.com>\n> +#\n> +# Create archive of source tree, including submodules\n> +#\n> +# This work is licensed under the terms of the GNU GPL, version 2.\n> +# See the COPYING file in the top-level directory.\n> +\n> +set -e\n> +\n> +if test $# -lt 1; then\n> +    echo \"Usage: $0 <output>\"\n\nMaybe <output tarball> to make it clear what it creates?\n\n> +    exit 1\n> +fi\n> +\n> +submodules=$(git submodule foreach --recursive --quiet 'echo $name')\n> +\n> +if test -n \"$submodules\"; then\n> +    {\n> +        git ls-files\n\nCouldn't we do the main git ls-files first and then append the data for\nany submodules?\n\n> +        for sm in $submodules; do\n> +            (cd $sm; git ls-files) | sed \"s:^:$sm/:\"\n> +        done\n> +    } | grep -x -v $(for sm in $submodules; do echo \"-e $sm\"; done) > $1.list\n> +else\n> +    git ls-files > $1.list\n> +fi\n> +\n> +tar -cf $1 -T $1.list\n> +rm $1.list\n\n\n--\nAlex Bennée","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"VN2aYXuw\"; dkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xpg6C3Xlkz9s7h\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat,  9 Sep 2017 00:42:59 +1000 (AEST)","from localhost ([::1]:45798 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dqKUj-0002G3-Lt\n\tfor incoming@patchwork.ozlabs.org; Fri, 08 Sep 2017 10:42:57 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:57489)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <alex.bennee@linaro.org>) id 1dqKUP-0002Fh-EK\n\tfor qemu-devel@nongnu.org; Fri, 08 Sep 2017 10:42:38 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <alex.bennee@linaro.org>) id 1dqKUK-00021u-GX\n\tfor qemu-devel@nongnu.org; Fri, 08 Sep 2017 10:42:37 -0400","from mail-wm0-x230.google.com ([2a00:1450:400c:c09::230]:43840)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <alex.bennee@linaro.org>)\n\tid 1dqKUK-00020U-8N\n\tfor qemu-devel@nongnu.org; Fri, 08 Sep 2017 10:42:32 -0400","by mail-wm0-x230.google.com with SMTP id f145so6576162wme.0\n\tfor <qemu-devel@nongnu.org>; Fri, 08 Sep 2017 07:42:32 -0700 (PDT)","from zen.linaro.local ([81.128.185.34])\n\tby smtp.gmail.com with ESMTPSA id\n\ty15sm1651138wrg.93.2017.09.08.07.42.29\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 08 Sep 2017 07:42:30 -0700 (PDT)","from zen (localhost [127.0.0.1])\n\tby zen.linaro.local (Postfix) with ESMTPS id 7DB183E00A6;\n\tFri,  8 Sep 2017 15:42:29 +0100 (BST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=references:user-agent:from:to:cc:subject:in-reply-to:date\n\t:message-id:mime-version:content-transfer-encoding;\n\tbh=U/bMtReYw105J0Q2xNquzhMrmQWbsg8BCiI4rofo7ZA=;\n\tb=VN2aYXuwQiwh819shcPkKbWWoQ5wnBLoVTcuLUePitsjDIWpaKRVbt21tNKo/WRud5\n\tZpmK4qiP6ufMkGqVFV9S8AT+mmXT4ndYoK51hCEFDwv2uuizX2c5adz7eDhxXz+saOWY\n\ttPtzx6xtRc58WEIr0HerOuFYwwIjquYNnel+g=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:references:user-agent:from:to:cc:subject\n\t:in-reply-to:date:message-id:mime-version:content-transfer-encoding; \n\tbh=U/bMtReYw105J0Q2xNquzhMrmQWbsg8BCiI4rofo7ZA=;\n\tb=HldeRu/KrDjJOAXdmyyuqBfOr9qweHlVeFo+7HaOsCsYFdYIm59UFvuiepqoULhH4Y\n\tD+RjEdA/T3MBVEEIE/AEqsBl+4Y/lUfOUwcpxikAAuEGLn93Xnfl0/6f+xcSuaIGNK8/\n\tw0IgCWNS32yzH+X28eHB1T3eLjMBPZZYjXZtxaYT5IArg/lxFZCUPoyTow/A0ImyX521\n\t3pOKu9Una0T2stD6JnwUazvlel4GvFYls3b0X32QU5pz4qDvJ1OgpEjJOJdpWHmHTFG3\n\trSYzIMPHsu6/28h1i+77AyJoIU8Cm4dGB1PmdArT/rYjup6uHuKKUdGkyshZoGMlZfpq\n\tnlmA==","X-Gm-Message-State":"AHPjjUj64MKKsMKxBaEXuJAdgEsnAYbw18wkeAJeIjijat3n4JzYg1oe\n\tN2YfJ65wXbieAtazFBdIGOJ1vA==","X-Google-Smtp-Source":"AOwi7QDRSRhjYzgJHtGmHozp/KbhpYXHfdwGRV+cpRfSK91MWDAQuL6ECxuciAcmSvTj2WDaozUm8g==","X-Received":"by 10.28.97.11 with SMTP id v11mr1866036wmb.45.1504881750860;\n\tFri, 08 Sep 2017 07:42:30 -0700 (PDT)","References":"<20170905021201.25684-1-famz@redhat.com>\n\t<20170905021201.25684-4-famz@redhat.com>","User-agent":"mu4e 0.9.19; emacs 25.2.50.3","From":"Alex =?utf-8?q?Benn=C3=A9e?= <alex.bennee@linaro.org>","To":"Fam Zheng <famz@redhat.com>","In-reply-to":"<20170905021201.25684-4-famz@redhat.com>","Date":"Fri, 08 Sep 2017 15:42:29 +0100","Message-ID":"<87vaktgskq.fsf@linaro.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"8bit","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2a00:1450:400c:c09::230","Subject":"Re: [Qemu-devel] [PATCH v6 03/12] scripts: Add archive-source.sh","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org, Philippe\n\t=?utf-8?q?Mathieu-Daud=C3=A9?= <f4bug@amsat.org>,\n\tKamil Rytarowski <kamil@netbsd.org>, stefanha@redhat.com, \n\tCleber Rosa <crosa@redhat.com>, pbonzini@redhat.com","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1765435,"web_url":"http://patchwork.ozlabs.org/comment/1765435/","msgid":"<CAFEAcA9mFqWntuM3=vGQKv-rLjRpRnBLhXomJNTHH9U6+zhTLQ@mail.gmail.com>","list_archive_url":null,"date":"2017-09-08T14:56:54","subject":"Re: [Qemu-devel] [PATCH v6 03/12] scripts: Add archive-source.sh","submitter":{"id":5111,"url":"http://patchwork.ozlabs.org/api/people/5111/","name":"Peter Maydell","email":"peter.maydell@linaro.org"},"content":"On 5 September 2017 at 03:11, Fam Zheng <famz@redhat.com> wrote:\n> Signed-off-by: Fam Zheng <famz@redhat.com>\n> ---\n>  scripts/archive-source.sh | 31 +++++++++++++++++++++++++++++++\n>  1 file changed, 31 insertions(+)\n>  create mode 100755 scripts/archive-source.sh\n>\n> diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh\n> new file mode 100755\n> index 0000000000..3cae7f34d3\n> --- /dev/null\n> +++ b/scripts/archive-source.sh\n> @@ -0,0 +1,31 @@\n> +#!/bin/sh\n> +#\n> +# Author: Fam Zheng <famz@redhat.com>\n> +#\n> +# Create archive of source tree, including submodules\n> +#\n> +# This work is licensed under the terms of the GNU GPL, version 2.\n> +# See the COPYING file in the top-level directory.\n\nWhy GPL-2-only? We generally prefer GPL-2-or-later for new\nfiles, or something more permissive.\n\nthanks\n-- PMM","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"RGcTCnv0\"; dkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xpgRC5pV6z9s81\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat,  9 Sep 2017 00:57:43 +1000 (AEST)","from localhost ([::1]:45846 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dqKiz-0008Do-Uf\n\tfor incoming@patchwork.ozlabs.org; Fri, 08 Sep 2017 10:57:41 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:35170)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <peter.maydell@linaro.org>) id 1dqKia-0008CL-Lv\n\tfor qemu-devel@nongnu.org; Fri, 08 Sep 2017 10:57:17 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <peter.maydell@linaro.org>) id 1dqKia-0001T7-14\n\tfor qemu-devel@nongnu.org; Fri, 08 Sep 2017 10:57:16 -0400","from mail-wr0-x22f.google.com ([2a00:1450:400c:c0c::22f]:38826)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <peter.maydell@linaro.org>)\n\tid 1dqKiZ-0001RI-R3\n\tfor qemu-devel@nongnu.org; Fri, 08 Sep 2017 10:57:15 -0400","by mail-wr0-x22f.google.com with SMTP id 108so5140066wra.5\n\tfor <qemu-devel@nongnu.org>; Fri, 08 Sep 2017 07:57:15 -0700 (PDT)","by 10.223.139.215 with HTTP; Fri, 8 Sep 2017 07:56:54 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=JxJ42wnIJgVDtjwTx1+dF77LjAAqKm/pbUYcbevzipE=;\n\tb=RGcTCnv0Dwy1jnhyYhaucmHW4GqbbEre2dCl0rv4Qp2owagc0z7NVmSQJUk9ofUNB7\n\tJYT1Azl99JGrPIwvBqhJHyAhGCmeaf25fka4ICe6I+nsZxEcIPz6ku8qO4za1A2S7alC\n\tkPaaMKhX+KZUyXQqkMeE8gc2sgopRuyUtYQrs=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=JxJ42wnIJgVDtjwTx1+dF77LjAAqKm/pbUYcbevzipE=;\n\tb=GeHAS1qR+sW6+F6MzWW3vXKt5OU73JliALszZNPXYA/zUdyXUhXtj2U5AI9+JlNr41\n\thBOBDH8Efp13iqd6FuG09xM8G6AduOrMJBfqUJ2h1Eeg1VY+4UzYdAqm7FWsfGffp97h\n\t4ni2uhxoKOleev3kYOVbNwanH11ofD4pnKRL2LfKz2AeW6r2LJdWQNkoGfqjdMRhbhqZ\n\tKuDQa8NKirBlmtCTH6BGz7w1u8ZhOFKwJVNIDGqJFBfXH9OSgi85kli2rGH1fB2zeLnR\n\tSZnO6dBHraoqnDQToEX9RYhvEs36ydybJu/n2qQH6/Wb2BJ5ihpjL0AiIcnxBWIi86GR\n\tsq7A==","X-Gm-Message-State":"AHPjjUgrWIq/NEgHJBKIosjnpIaEC7nncmPkOm+BSNvh8XAUoYZVjQUB\n\tfW5JLkGSFCG5yaoKTXZ6/hZ58GuMtKP/","X-Google-Smtp-Source":"ADKCNb7ncW3CQ55HHCuJq3BRlUFA6esPxhpVxvrPBdeSU1gR8mqPP4IMlF1Ztap/P1djXC7xr2S0mQdDXpBDFiwrzQs=","X-Received":"by 10.223.142.82 with SMTP id n76mr2422968wrb.272.1504882634680; \n\tFri, 08 Sep 2017 07:57:14 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<20170905021201.25684-4-famz@redhat.com>","References":"<20170905021201.25684-1-famz@redhat.com>\n\t<20170905021201.25684-4-famz@redhat.com>","From":"Peter Maydell <peter.maydell@linaro.org>","Date":"Fri, 8 Sep 2017 15:56:54 +0100","Message-ID":"<CAFEAcA9mFqWntuM3=vGQKv-rLjRpRnBLhXomJNTHH9U6+zhTLQ@mail.gmail.com>","To":"Fam Zheng <famz@redhat.com>","Content-Type":"text/plain; charset=\"UTF-8\"","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2a00:1450:400c:c0c::22f","Subject":"Re: [Qemu-devel] [PATCH v6 03/12] scripts: Add archive-source.sh","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"QEMU Developers <qemu-devel@nongnu.org>, =?utf-8?q?Philippe_Mathieu-Da?=\n\t=?utf-8?q?ud=C3=A9?= <f4bug@amsat.org>,\n\tKamil Rytarowski <kamil@netbsd.org>,\n\tStefan Hajnoczi <stefanha@redhat.com>, Cleber Rosa <crosa@redhat.com>,\n\tPaolo Bonzini <pbonzini@redhat.com>, =?utf-8?q?Alex_Benn=C3=A9e?=\n\t<alex.bennee@linaro.org>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1765653,"web_url":"http://patchwork.ozlabs.org/comment/1765653/","msgid":"<20170908231318.GB18677@lemon.lan>","list_archive_url":null,"date":"2017-09-08T23:13:18","subject":"Re: [Qemu-devel] [PATCH v6 03/12] scripts: Add archive-source.sh","submitter":{"id":24872,"url":"http://patchwork.ozlabs.org/api/people/24872/","name":"Fam Zheng","email":"famz@redhat.com"},"content":"On Fri, 09/08 15:56, Peter Maydell wrote:\n> On 5 September 2017 at 03:11, Fam Zheng <famz@redhat.com> wrote:\n> > Signed-off-by: Fam Zheng <famz@redhat.com>\n> > ---\n> >  scripts/archive-source.sh | 31 +++++++++++++++++++++++++++++++\n> >  1 file changed, 31 insertions(+)\n> >  create mode 100755 scripts/archive-source.sh\n> >\n> > diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh\n> > new file mode 100755\n> > index 0000000000..3cae7f34d3\n> > --- /dev/null\n> > +++ b/scripts/archive-source.sh\n> > @@ -0,0 +1,31 @@\n> > +#!/bin/sh\n> > +#\n> > +# Author: Fam Zheng <famz@redhat.com>\n> > +#\n> > +# Create archive of source tree, including submodules\n> > +#\n> > +# This work is licensed under the terms of the GNU GPL, version 2.\n> > +# See the COPYING file in the top-level directory.\n> \n> Why GPL-2-only? We generally prefer GPL-2-or-later for new\n> files, or something more permissive.\n\nCopied from some other script/* files, apparently. :)\n\nWill make it GPL-2-or-later.\n\nFam","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx09.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx09.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=famz@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xptRy5NRxz9sCZ\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat,  9 Sep 2017 09:14:06 +1000 (AEST)","from localhost ([::1]:47598 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dqSTM-0000yW-Pp\n\tfor incoming@patchwork.ozlabs.org; Fri, 08 Sep 2017 19:14:04 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:58910)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <famz@redhat.com>) id 1dqSSi-0000wq-97\n\tfor qemu-devel@nongnu.org; Fri, 08 Sep 2017 19:13:25 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <famz@redhat.com>) id 1dqSSh-0006Dr-CX\n\tfor qemu-devel@nongnu.org; Fri, 08 Sep 2017 19:13:24 -0400","from mx1.redhat.com ([209.132.183.28]:35224)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <famz@redhat.com>) id 1dqSSh-0006D0-6C\n\tfor qemu-devel@nongnu.org; Fri, 08 Sep 2017 19:13:23 -0400","from smtp.corp.redhat.com\n\t(int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 422034E909;\n\tFri,  8 Sep 2017 23:13:22 +0000 (UTC)","from localhost (ovpn-12-23.pek2.redhat.com [10.72.12.23])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id BAF7E60E3A;\n\tFri,  8 Sep 2017 23:13:19 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 422034E909","Date":"Sat, 9 Sep 2017 07:13:18 +0800","From":"Fam Zheng <famz@redhat.com>","To":"Peter Maydell <peter.maydell@linaro.org>","Message-ID":"<20170908231318.GB18677@lemon.lan>","References":"<20170905021201.25684-1-famz@redhat.com>\n\t<20170905021201.25684-4-famz@redhat.com>\n\t<CAFEAcA9mFqWntuM3=vGQKv-rLjRpRnBLhXomJNTHH9U6+zhTLQ@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<CAFEAcA9mFqWntuM3=vGQKv-rLjRpRnBLhXomJNTHH9U6+zhTLQ@mail.gmail.com>","User-Agent":"Mutt/1.8.3 (2017-05-23)","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.12","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.38]);\n\tFri, 08 Sep 2017 23:13:22 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH v6 03/12] scripts: Add archive-source.sh","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"QEMU Developers <qemu-devel@nongnu.org>, Philippe =?iso-8859-1?q?Mathi?=\n\t=?iso-8859-1?q?eu-Daud=E9?= <f4bug@amsat.org>,\n\tKamil Rytarowski <kamil@netbsd.org>,\n\tStefan Hajnoczi <stefanha@redhat.com>, Cleber Rosa <crosa@redhat.com>,\n\tPaolo Bonzini <pbonzini@redhat.com>, Alex =?iso-8859-1?q?Benn=E9e?=\n\t<alex.bennee@linaro.org>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1765654,"web_url":"http://patchwork.ozlabs.org/comment/1765654/","msgid":"<20170908231419.GC18677@lemon.lan>","list_archive_url":null,"date":"2017-09-08T23:14:19","subject":"Re: [Qemu-devel] [PATCH v6 03/12] scripts: Add archive-source.sh","submitter":{"id":24872,"url":"http://patchwork.ozlabs.org/api/people/24872/","name":"Fam Zheng","email":"famz@redhat.com"},"content":"On Fri, 09/08 15:42, Alex Bennée wrote:\n> \n> Fam Zheng <famz@redhat.com> writes:\n> \n> > Signed-off-by: Fam Zheng <famz@redhat.com>\n> > ---\n> >  scripts/archive-source.sh | 31 +++++++++++++++++++++++++++++++\n> >  1 file changed, 31 insertions(+)\n> >  create mode 100755 scripts/archive-source.sh\n> >\n> > diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh\n> > new file mode 100755\n> > index 0000000000..3cae7f34d3\n> > --- /dev/null\n> > +++ b/scripts/archive-source.sh\n> > @@ -0,0 +1,31 @@\n> > +#!/bin/sh\n> > +#\n> > +# Author: Fam Zheng <famz@redhat.com>\n> > +#\n> > +# Create archive of source tree, including submodules\n> > +#\n> > +# This work is licensed under the terms of the GNU GPL, version 2.\n> > +# See the COPYING file in the top-level directory.\n> > +\n> > +set -e\n> > +\n> > +if test $# -lt 1; then\n> > +    echo \"Usage: $0 <output>\"\n> \n> Maybe <output tarball> to make it clear what it creates?\n\nOK.\n\n> \n> > +    exit 1\n> > +fi\n> > +\n> > +submodules=$(git submodule foreach --recursive --quiet 'echo $name')\n> > +\n> > +if test -n \"$submodules\"; then\n> > +    {\n> > +        git ls-files\n> \n> Couldn't we do the main git ls-files first and then append the data for\n> any submodules?\n\nIsn't that exactly what we are doing now?\n\nFam\n\n> \n> > +        for sm in $submodules; do\n> > +            (cd $sm; git ls-files) | sed \"s:^:$sm/:\"\n> > +        done\n> > +    } | grep -x -v $(for sm in $submodules; do echo \"-e $sm\"; done) > $1.list\n> > +else\n> > +    git ls-files > $1.list\n> > +fi\n> > +\n> > +tar -cf $1 -T $1.list\n> > +rm $1.list\n> \n> \n> --\n> Alex Bennée","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx02.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx02.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=famz@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xptTX2qzWz9sCZ\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat,  9 Sep 2017 09:15:28 +1000 (AEST)","from localhost ([::1]:47606 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dqSUg-00021P-HM\n\tfor incoming@patchwork.ozlabs.org; Fri, 08 Sep 2017 19:15:26 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:59457)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <famz@redhat.com>) id 1dqSTl-0001hf-EB\n\tfor qemu-devel@nongnu.org; Fri, 08 Sep 2017 19:14:30 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <famz@redhat.com>) id 1dqSTg-0007cO-Dp\n\tfor qemu-devel@nongnu.org; Fri, 08 Sep 2017 19:14:29 -0400","from mx1.redhat.com ([209.132.183.28]:44556)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <famz@redhat.com>) id 1dqSTg-0007b3-7l\n\tfor qemu-devel@nongnu.org; Fri, 08 Sep 2017 19:14:24 -0400","from smtp.corp.redhat.com\n\t(int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 4675D883AE;\n\tFri,  8 Sep 2017 23:14:23 +0000 (UTC)","from localhost (ovpn-12-23.pek2.redhat.com [10.72.12.23])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id A97255D6A3;\n\tFri,  8 Sep 2017 23:14:20 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 4675D883AE","Date":"Sat, 9 Sep 2017 07:14:19 +0800","From":"Fam Zheng <famz@redhat.com>","To":"Alex =?iso-8859-1?q?Benn=E9e?= <alex.bennee@linaro.org>","Message-ID":"<20170908231419.GC18677@lemon.lan>","References":"<20170905021201.25684-1-famz@redhat.com>\n\t<20170905021201.25684-4-famz@redhat.com>\n\t<87vaktgskq.fsf@linaro.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","In-Reply-To":"<87vaktgskq.fsf@linaro.org>","User-Agent":"Mutt/1.8.3 (2017-05-23)","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.15","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.26]);\n\tFri, 08 Sep 2017 23:14:23 +0000 (UTC)","Content-Transfer-Encoding":"quoted-printable","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH v6 03/12] scripts: Add archive-source.sh","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org, Philippe\n\t=?iso-8859-1?q?Mathieu-Daud=E9?= <f4bug@amsat.org>,\n\tKamil Rytarowski <kamil@netbsd.org>, stefanha@redhat.com, \n\tCleber Rosa <crosa@redhat.com>, pbonzini@redhat.com","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1766310,"web_url":"http://patchwork.ozlabs.org/comment/1766310/","msgid":"<871sndbbbn.fsf@linaro.org>","list_archive_url":null,"date":"2017-09-11T13:43:08","subject":"Re: [Qemu-devel] [PATCH v6 03/12] scripts: Add archive-source.sh","submitter":{"id":39532,"url":"http://patchwork.ozlabs.org/api/people/39532/","name":"Alex Bennée","email":"alex.bennee@linaro.org"},"content":"Fam Zheng <famz@redhat.com> writes:\n\n> On Fri, 09/08 15:42, Alex Bennée wrote:\n>>\n>> Fam Zheng <famz@redhat.com> writes:\n>>\n>> > Signed-off-by: Fam Zheng <famz@redhat.com>\n>> > ---\n>> >  scripts/archive-source.sh | 31 +++++++++++++++++++++++++++++++\n>> >  1 file changed, 31 insertions(+)\n>> >  create mode 100755 scripts/archive-source.sh\n>> >\n>> > diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh\n>> > new file mode 100755\n>> > index 0000000000..3cae7f34d3\n>> > --- /dev/null\n>> > +++ b/scripts/archive-source.sh\n>> > @@ -0,0 +1,31 @@\n>> > +#!/bin/sh\n>> > +#\n>> > +# Author: Fam Zheng <famz@redhat.com>\n>> > +#\n>> > +# Create archive of source tree, including submodules\n>> > +#\n>> > +# This work is licensed under the terms of the GNU GPL, version 2.\n>> > +# See the COPYING file in the top-level directory.\n>> > +\n>> > +set -e\n>> > +\n>> > +if test $# -lt 1; then\n>> > +    echo \"Usage: $0 <output>\"\n>>\n>> Maybe <output tarball> to make it clear what it creates?\n>\n> OK.\n>\n>>\n>> > +    exit 1\n>> > +fi\n>> > +\n>> > +submodules=$(git submodule foreach --recursive --quiet 'echo $name')\n>> > +\n>> > +if test -n \"$submodules\"; then\n>> > +    {\n>> > +        git ls-files\n>>\n>> Couldn't we do the main git ls-files first and then append the data for\n>> any submodules?\n>\n> Isn't that exactly what we are doing now?\n\nI mean hoist the git ls-files out of the if so we can avoid repeating\nwith an else leg. e.g.\n\n  git ls-files > $1.list\n  if test -n \"$submodules\"; then\n  {\n    .. the rest..\n  } | grep -x -v $(for sm in $submodules; do echo \"-e $sm\"; done) >> $1.list\n\n>\n> Fam\n>\n>>\n>> > +        for sm in $submodules; do\n>> > +            (cd $sm; git ls-files) | sed \"s:^:$sm/:\"\n>> > +        done\n>> > +    } | grep -x -v $(for sm in $submodules; do echo \"-e $sm\"; done) > $1.list\n>> > +else\n>> > +    git ls-files > $1.list\n>> > +fi\n>> > +\n>> > +tar -cf $1 -T $1.list\n>> > +rm $1.list\n>>\n>>\n>> --\n>> Alex Bennée\n\n\n--\nAlex Bennée","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"QKsRGe9J\"; dkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xrTfR1sxJz9ryv\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 11 Sep 2017 23:43:41 +1000 (AEST)","from localhost ([::1]:57864 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1drOzz-0006D6-44\n\tfor incoming@patchwork.ozlabs.org; Mon, 11 Sep 2017 09:43:39 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:38840)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <alex.bennee@linaro.org>) id 1drOzd-0006CJ-Mv\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 09:43:21 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <alex.bennee@linaro.org>) id 1drOzY-0005ac-4G\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 09:43:17 -0400","from mail-wr0-x232.google.com ([2a00:1450:400c:c0c::232]:32856)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <alex.bennee@linaro.org>)\n\tid 1drOzX-0005aE-TT\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 09:43:12 -0400","by mail-wr0-x232.google.com with SMTP id a43so14765476wrc.0\n\tfor <qemu-devel@nongnu.org>; Mon, 11 Sep 2017 06:43:11 -0700 (PDT)","from zen.linaro.local ([81.128.185.34])\n\tby smtp.gmail.com with ESMTPSA id\n\tt141sm3915122wme.33.2017.09.11.06.43.09\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 11 Sep 2017 06:43:09 -0700 (PDT)","from zen (localhost [127.0.0.1])\n\tby zen.linaro.local (Postfix) with ESMTPS id 056063E0142;\n\tMon, 11 Sep 2017 14:43:09 +0100 (BST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=references:user-agent:from:to:cc:subject:in-reply-to:date\n\t:message-id:mime-version:content-transfer-encoding;\n\tbh=SjU13eP29LAAlLnwkbkW2q24HAz0ojH1CEafuf0UbCM=;\n\tb=QKsRGe9JNddnzjCC/dUQcbyrSeO3FwFw8TfSUG2gs2OmqlxODhBHSCvfWcAcsmwdbw\n\tbRQp3sr0T0t/RM3EU2kfv3yHKkwDWEDvThMJi04H1vUMDXXEhOixAqPOYVirtE9YcPwm\n\t44bLkiZMDQmjtheIItB56rPPz1IfLiw73ak9k=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:references:user-agent:from:to:cc:subject\n\t:in-reply-to:date:message-id:mime-version:content-transfer-encoding; \n\tbh=SjU13eP29LAAlLnwkbkW2q24HAz0ojH1CEafuf0UbCM=;\n\tb=kiZMnq3BK3/t53kQ1Pr/iYcTJE51dvPsJQVIPpx0sRPitsauAOE8ft19I1bqw7INcT\n\tKZdK/Zhp/rKtl3WX1PhJnpgaFwDhYo7nfLKQW9m8HWmBLkOHYAR7QA7mMkLKhg09N9c/\n\tdVRS4PlGa8hAAb9q5I6viJvW0toyK7a+X69UQs/nPELFE7zSe1N2LpuNq7ssMG1TW2q+\n\tcHDNq5C7azW4CW4NEAC0viE7u1exMwpFoWIrrKuQW0VgPrqHr0D0pYEWm85/tCBIStHk\n\tkF+JrHEgm7KYasTgMuDJv6rHQ/dFYIHjnG0mK1PlZHT+xadMgmsG/RJm0htRrBxRC8pE\n\tDviA==","X-Gm-Message-State":"AHPjjUh6VzNgrmTpw1xcWtgLjGw/X8PsPpPvNxMKgj6uPN8OfpsM52cz\n\tQaPZ4hEtcMQWmAqB","X-Google-Smtp-Source":"ADKCNb5QjUrNChrP/qP9OIzzdH17vNYUZ48dvHMDViUDJ0UAfiRzSWCAsyIHCxjg/Ya10e6SKHZF9w==","X-Received":"by 10.223.165.75 with SMTP id j11mr8843726wrb.234.1505137390692; \n\tMon, 11 Sep 2017 06:43:10 -0700 (PDT)","References":"<20170905021201.25684-1-famz@redhat.com>\n\t<20170905021201.25684-4-famz@redhat.com>\n\t<87vaktgskq.fsf@linaro.org> <20170908231419.GC18677@lemon.lan>","User-agent":"mu4e 0.9.19; emacs 25.2.50.3","From":"Alex =?utf-8?q?Benn=C3=A9e?= <alex.bennee@linaro.org>","To":"Fam Zheng <famz@redhat.com>","In-reply-to":"<20170908231419.GC18677@lemon.lan>","Date":"Mon, 11 Sep 2017 14:43:08 +0100","Message-ID":"<871sndbbbn.fsf@linaro.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"8bit","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2a00:1450:400c:c0c::232","Subject":"Re: [Qemu-devel] [PATCH v6 03/12] scripts: Add archive-source.sh","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org, Philippe\n\t=?utf-8?q?Mathieu-Daud=C3=A9?= <f4bug@amsat.org>,\n\tKamil Rytarowski <kamil@netbsd.org>, stefanha@redhat.com, \n\tCleber Rosa <crosa@redhat.com>, pbonzini@redhat.com","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1766630,"web_url":"http://patchwork.ozlabs.org/comment/1766630/","msgid":"<20170912000611.GE32341@lemon.lan>","list_archive_url":null,"date":"2017-09-12T00:06:11","subject":"Re: [Qemu-devel] [PATCH v6 03/12] scripts: Add archive-source.sh","submitter":{"id":24872,"url":"http://patchwork.ozlabs.org/api/people/24872/","name":"Fam Zheng","email":"famz@redhat.com"},"content":"On Mon, 09/11 14:43, Alex Bennée wrote:\n> \n> Fam Zheng <famz@redhat.com> writes:\n> \n> > On Fri, 09/08 15:42, Alex Bennée wrote:\n> >>\n> >> Fam Zheng <famz@redhat.com> writes:\n> >>\n> >> > Signed-off-by: Fam Zheng <famz@redhat.com>\n> >> > ---\n> >> >  scripts/archive-source.sh | 31 +++++++++++++++++++++++++++++++\n> >> >  1 file changed, 31 insertions(+)\n> >> >  create mode 100755 scripts/archive-source.sh\n> >> >\n> >> > diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh\n> >> > new file mode 100755\n> >> > index 0000000000..3cae7f34d3\n> >> > --- /dev/null\n> >> > +++ b/scripts/archive-source.sh\n> >> > @@ -0,0 +1,31 @@\n> >> > +#!/bin/sh\n> >> > +#\n> >> > +# Author: Fam Zheng <famz@redhat.com>\n> >> > +#\n> >> > +# Create archive of source tree, including submodules\n> >> > +#\n> >> > +# This work is licensed under the terms of the GNU GPL, version 2.\n> >> > +# See the COPYING file in the top-level directory.\n> >> > +\n> >> > +set -e\n> >> > +\n> >> > +if test $# -lt 1; then\n> >> > +    echo \"Usage: $0 <output>\"\n> >>\n> >> Maybe <output tarball> to make it clear what it creates?\n> >\n> > OK.\n> >\n> >>\n> >> > +    exit 1\n> >> > +fi\n> >> > +\n> >> > +submodules=$(git submodule foreach --recursive --quiet 'echo $name')\n> >> > +\n> >> > +if test -n \"$submodules\"; then\n> >> > +    {\n> >> > +        git ls-files\n> >>\n> >> Couldn't we do the main git ls-files first and then append the data for\n> >> any submodules?\n> >\n> > Isn't that exactly what we are doing now?\n> \n> I mean hoist the git ls-files out of the if so we can avoid repeating\n> with an else leg. e.g.\n> \n>   git ls-files > $1.list\n\nThe output of top \"git ls-files\" has to be filtered by grep if the submodules\nlist is non-empty, so we cannot save LoC by hoisting.\n\nFam\n\n>   if test -n \"$submodules\"; then\n>   {\n>     .. the rest..\n>   } | grep -x -v $(for sm in $submodules; do echo \"-e $sm\"; done) >> $1.list\n> \n> >\n> > Fam\n> >\n> >>\n> >> > +        for sm in $submodules; do\n> >> > +            (cd $sm; git ls-files) | sed \"s:^:$sm/:\"\n> >> > +        done\n> >> > +    } | grep -x -v $(for sm in $submodules; do echo \"-e $sm\"; done) > $1.list\n> >> > +else\n> >> > +    git ls-files > $1.list\n> >> > +fi\n> >> > +\n> >> > +tar -cf $1 -T $1.list\n> >> > +rm $1.list\n> >>\n> >>\n> >> --\n> >> Alex Bennée\n> \n> \n> --\n> Alex Bennée","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx05.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx05.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=famz@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xrlTH2kWTz9sBZ\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 12 Sep 2017 10:06:43 +1000 (AEST)","from localhost ([::1]:32891 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1drYiv-0003Cx-GX\n\tfor incoming@patchwork.ozlabs.org; Mon, 11 Sep 2017 20:06:41 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:59070)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <famz@redhat.com>) id 1drYia-0003Cp-P4\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 20:06:21 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <famz@redhat.com>) id 1drYiX-0006zy-K2\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 20:06:20 -0400","from mx1.redhat.com ([209.132.183.28]:45870)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <famz@redhat.com>) id 1drYiX-0006zk-B2\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 20:06:17 -0400","from smtp.corp.redhat.com\n\t(int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 3655C3275A5;\n\tTue, 12 Sep 2017 00:06:16 +0000 (UTC)","from localhost (ovpn-12-27.pek2.redhat.com [10.72.12.27])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 9553266D64;\n\tTue, 12 Sep 2017 00:06:12 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 3655C3275A5","Date":"Tue, 12 Sep 2017 08:06:11 +0800","From":"Fam Zheng <famz@redhat.com>","To":"Alex =?iso-8859-1?q?Benn=E9e?= <alex.bennee@linaro.org>","Message-ID":"<20170912000611.GE32341@lemon.lan>","References":"<20170905021201.25684-1-famz@redhat.com>\n\t<20170905021201.25684-4-famz@redhat.com>\n\t<87vaktgskq.fsf@linaro.org> <20170908231419.GC18677@lemon.lan>\n\t<871sndbbbn.fsf@linaro.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","In-Reply-To":"<871sndbbbn.fsf@linaro.org>","User-Agent":"Mutt/1.8.3 (2017-05-23)","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.14","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.29]);\n\tTue, 12 Sep 2017 00:06:16 +0000 (UTC)","Content-Transfer-Encoding":"quoted-printable","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH v6 03/12] scripts: Add archive-source.sh","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org, Philippe\n\t=?iso-8859-1?q?Mathieu-Daud=E9?= <f4bug@amsat.org>,\n\tKamil Rytarowski <kamil@netbsd.org>, stefanha@redhat.com, \n\tCleber Rosa <crosa@redhat.com>, pbonzini@redhat.com","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}}]