[{"id":1772918,"web_url":"http://patchwork.ozlabs.org/comment/1772918/","msgid":"<dfa1fda4-78d2-664a-1fb4-eb46b9c74dba@redhat.com>","list_archive_url":null,"date":"2017-09-21T15:22:02","subject":"Re: [Qemu-devel] [PATCH v11 03/13] scripts: Add archive-source.sh","submitter":{"id":6591,"url":"http://patchwork.ozlabs.org/api/people/6591/","name":"Eric Blake","email":"eblake@redhat.com"},"content":"On 09/21/2017 10:07 AM, Fam Zheng wrote:\n> Signed-off-by: Fam Zheng <famz@redhat.com>\n> ---\n>  scripts/archive-source.sh | 51 +++++++++++++++++++++++++++++++++++++++++++++++\n>  1 file changed, 51 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..8aa363d3a0\n> --- /dev/null\n> +++ b/scripts/archive-source.sh\n> @@ -0,0 +1,51 @@\n> +#!/bin/bash\n> +#\n> +# Author: Fam Zheng <famz@redhat.com>\n> +#\n> +# Archive source tree, including submodules. This is created for test code to\n> +# export the source files, in order to be built in a different enviornment,\n\ns/enviornment/environment/\n\n> +# such as in a docker instance or VM.\n> +#\n> +# This code is licensed under the GPL version 2 or later.  See\n> +# the COPYING file in the top-level directory.\n> +\n> +error() {\n> +    echo \"$@\" >&2\n\nslightly risky if $@ contains \\ - using 'printf %s\\\\n \"$*\"' is nicer.\nBut this particular script can get away with it, as I don't see use of \\\n(other than if you have a weird $0).\n\n> +\n> +if test -n \"$submodules\"; then\n> +    {\n> +        git ls-files || error \"git ls-files failed\"\n> +        for sm in $submodules; do\n> +            (cd $sm; git ls-files) | sed \"s:^:$sm/:\"\n> +            if test \"${PIPESTATUS[0]} ${PIPESTATUS[1]}\" != \"0 0\"; then\n\nCould shorten to \"${PIPESTATUS[*]}\", as discussed in another mail, but\nthis works too.\n\nWith the typo fixed, and your choice of how to handle my other two nits\n(including doing nothing),\nReviewed-by: Eric Blake <eblake@redhat.com>","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-mx06.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx06.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=eblake@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 3xygPL6QR5z9t43\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 22 Sep 2017 01:23:50 +1000 (AEST)","from localhost ([::1]:54176 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 1dv3KP-0002Jg-0k\n\tfor incoming@patchwork.ozlabs.org; Thu, 21 Sep 2017 11:23:49 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:34108)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <eblake@redhat.com>) id 1dv3Is-0001dx-8I\n\tfor qemu-devel@nongnu.org; Thu, 21 Sep 2017 11:22:15 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <eblake@redhat.com>) id 1dv3Ip-0000s7-H3\n\tfor qemu-devel@nongnu.org; Thu, 21 Sep 2017 11:22:14 -0400","from mx1.redhat.com ([209.132.183.28]:35148)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <eblake@redhat.com>) id 1dv3Ip-0000rr-7g\n\tfor qemu-devel@nongnu.org; Thu, 21 Sep 2017 11:22:11 -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 E567E1F56B;\n\tThu, 21 Sep 2017 15:22:09 +0000 (UTC)","from [10.10.124.97] (ovpn-124-97.rdu2.redhat.com [10.10.124.97])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 0918B5D962;\n\tThu, 21 Sep 2017 15:22:03 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com E567E1F56B","To":"Fam Zheng <famz@redhat.com>, qemu-devel@nongnu.org","References":"<20170921150755.19914-1-famz@redhat.com>\n\t<20170921150755.19914-4-famz@redhat.com>","From":"Eric Blake <eblake@redhat.com>","Openpgp":"url=http://people.redhat.com/eblake/eblake.gpg","Organization":"Red Hat, Inc.","Message-ID":"<dfa1fda4-78d2-664a-1fb4-eb46b9c74dba@redhat.com>","Date":"Thu, 21 Sep 2017 10:22:02 -0500","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<20170921150755.19914-4-famz@redhat.com>","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\";\n\tboundary=\"86kfXX6aGPpDUbmmdkAxlWBETDDfQHdfG\"","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.30]);\n\tThu, 21 Sep 2017 15:22:10 +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","X-Content-Filtered-By":"Mailman/MimeDel 2.1.21","Subject":"Re: [Qemu-devel] [PATCH v11 03/13] 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>, =?utf-8?q?Philippe_Mathieu-D?=\n\t=?utf-8?b?YXVkw6k=?= <f4bug@amsat.org>,\n\tKamil Rytarowski <kamil@netbsd.org>, stefanha@redhat.com, \n\tCleber Rosa <crosa@redhat.com>, pbonzini@redhat.com,\n\t=?utf-8?q?Alex_Benn=C3=A9e?= <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":1773227,"web_url":"http://patchwork.ozlabs.org/comment/1773227/","msgid":"<20170922024235.GC1397@lemon.lan>","list_archive_url":null,"date":"2017-09-22T02:42:35","subject":"Re: [Qemu-devel] [PATCH v11 03/13] 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 Thu, 09/21 10:22, Eric Blake wrote:\n> On 09/21/2017 10:07 AM, Fam Zheng wrote:\n> > Signed-off-by: Fam Zheng <famz@redhat.com>\n> > ---\n> >  scripts/archive-source.sh | 51 +++++++++++++++++++++++++++++++++++++++++++++++\n> >  1 file changed, 51 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..8aa363d3a0\n> > --- /dev/null\n> > +++ b/scripts/archive-source.sh\n> > @@ -0,0 +1,51 @@\n> > +#!/bin/bash\n> > +#\n> > +# Author: Fam Zheng <famz@redhat.com>\n> > +#\n> > +# Archive source tree, including submodules. This is created for test code to\n> > +# export the source files, in order to be built in a different enviornment,\n> \n> s/enviornment/environment/\n> \n> > +# such as in a docker instance or VM.\n> > +#\n> > +# This code is licensed under the GPL version 2 or later.  See\n> > +# the COPYING file in the top-level directory.\n> > +\n> > +error() {\n> > +    echo \"$@\" >&2\n> \n> slightly risky if $@ contains \\ - using 'printf %s\\\\n \"$*\"' is nicer.\n> But this particular script can get away with it, as I don't see use of \\\n> (other than if you have a weird $0).\n> \n> > +\n> > +if test -n \"$submodules\"; then\n> > +    {\n> > +        git ls-files || error \"git ls-files failed\"\n> > +        for sm in $submodules; do\n> > +            (cd $sm; git ls-files) | sed \"s:^:$sm/:\"\n> > +            if test \"${PIPESTATUS[0]} ${PIPESTATUS[1]}\" != \"0 0\"; then\n> \n> Could shorten to \"${PIPESTATUS[*]}\", as discussed in another mail, but\n> this works too.\n> \n> With the typo fixed, and your choice of how to handle my other two nits\n> (including doing nothing),\n> Reviewed-by: Eric Blake <eblake@redhat.com>\n\nFixing all of them and adding your r-b line.\n\n> \n> -- \n> Eric Blake, Principal Software Engineer\n> Red Hat, Inc.           +1-919-301-3266\n> Virtualization:  qemu.org | libvirt.org\n> \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-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 3xyyTD44vBz9sPk\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 22 Sep 2017 12:43:11 +1000 (AEST)","from localhost ([::1]:56416 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 1dvDvp-0000nj-2c\n\tfor incoming@patchwork.ozlabs.org; Thu, 21 Sep 2017 22:43:09 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:49000)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <famz@redhat.com>) id 1dvDvQ-0000nY-D6\n\tfor qemu-devel@nongnu.org; Thu, 21 Sep 2017 22:42:45 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <famz@redhat.com>) id 1dvDvN-0000hx-2I\n\tfor qemu-devel@nongnu.org; Thu, 21 Sep 2017 22:42:44 -0400","from mx1.redhat.com ([209.132.183.28]:39220)\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 1dvDvM-0000gw-SN\n\tfor qemu-devel@nongnu.org; Thu, 21 Sep 2017 22:42:40 -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 AA620883B0;\n\tFri, 22 Sep 2017 02:42:39 +0000 (UTC)","from localhost (ovpn-12-27.pek2.redhat.com [10.72.12.27])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id D947D5EDE1;\n\tFri, 22 Sep 2017 02:42:36 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com AA620883B0","Date":"Fri, 22 Sep 2017 10:42:35 +0800","From":"Fam Zheng <famz@redhat.com>","To":"Eric Blake <eblake@redhat.com>","Message-ID":"<20170922024235.GC1397@lemon.lan>","References":"<20170921150755.19914-1-famz@redhat.com>\n\t<20170921150755.19914-4-famz@redhat.com>\n\t<dfa1fda4-78d2-664a-1fb4-eb46b9c74dba@redhat.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<dfa1fda4-78d2-664a-1fb4-eb46b9c74dba@redhat.com>","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, 22 Sep 2017 02:42:39 +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 v11 03/13] 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, Alex\n\t=?iso-8859-1?q?Benn=E9e?= <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>"}}]