qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: qemu-devel@nongnu.org,
	"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
	qemu-trivial@nongnu.org, "Thomas Huth" <thuth@redhat.com>,
	"Eric Blake" <eblake@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Beraldo Leal" <bleal@redhat.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>
Subject: Re: [PATCH] scripts/archive-source: Use more portable argument with tar command
Date: Thu, 8 Dec 2022 19:06:41 +0100	[thread overview]
Message-ID: <03745f02-d6e4-aba6-3ad9-e1443934a85f@linaro.org> (raw)
In-Reply-To: <Y5IbuSk3Pnf4cdHy@redhat.com>

On 8/12/22 18:15, Daniel P. Berrangé wrote:
> On Thu, Dec 08, 2022 at 05:20:51PM +0100, Philippe Mathieu-Daudé wrote:
>> When using the archive-source.sh script on Darwin we get:
>>
>>    tar: Option --concatenate is not supported
>>    Usage:
>>      List:    tar -tf <archive-filename>
>>      Extract: tar -xf <archive-filename>
>>      Create:  tar -cf <archive-filename> [filenames...]
>>      Help:    tar --help
>>
>> Replace the long argument added by commit 8fc76176f6 ("scripts: use
>> git-archive in archive-source") by their short form to keep this
>> script functional.
> 
> Or install a better tar implementation from brew ?
> 
>    https://formulae.brew.sh/formula/gnu-tar

Good idea, this works for me:

-- >8 --
diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh
index 23e042dacd..150bdf5536 100755
--- a/scripts/archive-source.sh
+++ b/scripts/archive-source.sh
@@ -20,2 +20,3 @@ fi

+tar=$(command -v gtar || command -v tar)
  tar_file=$(realpath "$1")
@@ -69,3 +70,3 @@ for sm in $submodules; do
      test $? -ne 0 && error "failed to archive submodule $sm ($smhash)"
-    tar --concatenate --file "$tar_file" "$sub_file"
+    $tar --concatenate --file "$tar_file" "$sub_file"
      test $? -ne 0 && error "failed append submodule $sm to $tar_file"
---


      reply	other threads:[~2022-12-08 18:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-08 16:20 [PATCH] scripts/archive-source: Use more portable argument with tar command Philippe Mathieu-Daudé
2022-12-08 16:36 ` Peter Maydell
2022-12-08 17:06 ` Alex Bennée
2022-12-08 17:15 ` Daniel P. Berrangé
2022-12-08 18:06   ` Philippe Mathieu-Daudé [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=03745f02-d6e4-aba6-3ad9-e1443934a85f@linaro.org \
    --to=philmd@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=berrange@redhat.com \
    --cc=bleal@redhat.com \
    --cc=eblake@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=thuth@redhat.com \
    --cc=wainersm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).