Stream: git-wasmtime

Topic: wasmtime / PR #4294 Add source tarballs to our releases


view this post on Zulip Wasmtime GitHub notifications bot (Jun 21 2022 at 19:17):

alexcrichton opened PR #4294 from src-tarball to main:

This commit adds a small script to create a source tarball as part of
the release process. This goes further than requested by #3808 by
vendoring all Rust dependencies as well to be more in line with
"download the source once then build somewhere without a network".
Vendoring the Rust dependencies makes the tarball pretty beefy (67M
compressed, 500M uncompressed). Unfortunately most of this size comes
from vendored crates such as v8, pqcrypto-kyber, winapi, capstone-sys,
plotters, and web-sys. Only winapi in this list is actually needed for
wasmtime-the-binary and only on Windows as well but for now this is
the state of things related to cargo vendor. If this becomes an issue
we could specifically remove the bulky contents of crates in the
vendor directory such as v8 since it's only used for fuzzing.

Closes #3808

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Jun 21 2022 at 19:17):

alexcrichton has marked PR #4294 as ready for review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 09 2022 at 17:55):

alexcrichton updated PR #4294 from src-tarball to main.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 09 2022 at 17:56):

alexcrichton requested peterhuene for a review on PR #4294.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2022 at 22:00):

jameysharp submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2022 at 22:00):

jameysharp created PR review comment:

I haven't used cargo vendor but it seems like the --versioned-dirs option would be nice.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2022 at 22:00):

jameysharp submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2022 at 22:00):

jameysharp created PR review comment:

How about this instead, to be a little more clear about what's being done to the string?

  tag=${GITHUB_REF#refs/tags/}

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2022 at 22:00):

jameysharp created PR review comment:

I'm sure other people have thought about this more than I have, but I'd be inclined to add options like --owner=root:0 --group=root:0 --sort=name and possibly --mtime=@0, to make the contents of the generated tarball independent of the runner on which it's built.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2022 at 22:00):

jameysharp created PR review comment:

I'm always nervous about what cp * will grab. I mean, it won't copy top-level dotfiles, which is currently okay since the only things there are .git*, but it's a little weird. On the other hand, if main.yml someday gets changed to run this script later, then cp * will copy build products and the like.

Constructing a clean copy with submodules is more of a pain than I'd like, so I think it's worth relying on the script running early enough that the working copy is pristine. Given that, I don't think you need to copy anything. You can ask GNU tar to archive ., but ignore .git and prepend $pkgname to every path, with these options: --transform "s/^\./$pkgname/S" --exclude-vcs

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2022 at 16:36):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2022 at 16:36):

alexcrichton created PR review comment:

I think I'll leave this as the default options since that's primarily only intended if it needs to be opted-in to, but I don't think there would be any harm in passing it in.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2022 at 16:44):

alexcrichton updated PR #4294 from src-tarball to main.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2022 at 16:44):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2022 at 16:44):

alexcrichton created PR review comment:

Neat! I had to use --exclude=.git instead of --exclude-vcs because otherwise it was ignoring files in vendored directories which Cargo didn't like, but I prefer to avoid copying things around.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2022 at 16:45):

alexcrichton created PR review comment:

I'm somewhat hesitant to do that because we haven't done it for any other tarballs and I'm always somewhat scared of using fancy tar options in fear that we'll eventually get a tar on some system which is too old

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2022 at 16:45):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2022 at 17:19):

jameysharp created PR review comment:

Sure, that's fair. Though I just did a quick check out of curiosity, and --sort is the newest of these flags, and even the version of GNU tar in Ubuntu 16.04 had that option. Since this is only supposed to run on GitHub runners I guess I wouldn't be as concerned about whether random systems have the same options available.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2022 at 17:19):

jameysharp submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2022 at 17:21):

jameysharp submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2022 at 21:34):

alexcrichton updated PR #4294 from src-tarball to main.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 15 2022 at 14:27):

alexcrichton merged PR #4294.


Last updated: Dec 23 2024 at 12:05 UTC