-
Notifications
You must be signed in to change notification settings - Fork 203
packaging: Support vendoring the Rust sources #1391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This ends up being different than what landed in librsvg (that was imported into ostree) because in rpm-ostree we've basically been using `git archive`-based tarball generation rather than `make dist` for a long time. And supporting `make dist` looks like it'd get into handling the `libdnf` bits and walking into `cmake` land so...yeah let's not do that. The canonical sources are in git (recursively via submodule), except for the Rust sources, which cargo can download dynamically, and with this patch we support glomming all of that together into a tarball. (And turn off `make dist` so people understand how we do it) Tested by `make -f Makefile.dist-packaging dist-snapshot`, then copying the resulting tarball into a container with `--net=none` and building there.
packaging/make-git-snapshot.sh
Outdated
@@ -29,4 +29,15 @@ ls -al ${TARFILE_TMP} | |||
tar -A -f ${TARFILE_TMP} submodule.tar | |||
rm submodule.tar | |||
done | |||
tmpd=$(mktemp -d) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a trap to nuke this for good measure? (I just tried this patch locally, and it died on some local config issue and left the directory behind!)
packaging/make-git-snapshot.sh
Outdated
cargo vendor -q --sync ${TOP}/rust/Cargo.toml vendor | ||
cp ${TOP}/rust/Cargo.lock . | ||
cp ${TOP}/rust/cargo-vendor-config .cargo/config | ||
tar --transform='s,^,rust/,' -vrf ${TARFILE_TMP} . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though let's drop the -v
? Seems inconsistent to be printing these when we're not printing anything else during dist-snapshot
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixups ⬇️
LGTM! Though that last fixup looks like it's targeting the wrong commit, right? |
Yep, fixed the fixup. |
This ends up being different than what landed in librsvg (that was imported into ostree) because in rpm-ostree we've basically been using `git archive`-based tarball generation rather than `make dist` for a long time. And supporting `make dist` looks like it'd get into handling the `libdnf` bits and walking into `cmake` land so...yeah let's not do that. The canonical sources are in git (recursively via submodule), except for the Rust sources, which cargo can download dynamically, and with this patch we support glomming all of that together into a tarball. (And turn off `make dist` so people understand how we do it) Tested by `make -f Makefile.dist-packaging dist-snapshot`, then copying the resulting tarball into a container with `--net=none` and building there. Closes: #1391 Approved by: jlebon
Closes: #1391 Approved by: jlebon
💔 Test failed - status-atomicjenkins |
@rh-atomic-bot retry |
⚡ Test exempted: merge already tested. |
Closes: #1391 Approved by: jlebon
rpm-ostree now includes some Rust code. See coreos/rpm-ostree#1377 and coreos/rpm-ostree#1391
This ends up being different than what landed in librsvg (that
was imported into ostree) because in rpm-ostree we've basically
been using
git archive
-based tarball generation rather thanmake dist
for a long time. And supporting
make dist
looks like it'd get intohandling the
libdnf
bits and walking intocmake
land so...yeahlet's not do that.
The canonical sources are in git (recursively via submodule),
except for the Rust sources, which cargo can download dynamically,
and with this patch we support glomming all of that together
into a tarball.
(And turn off
make dist
so people understand how we do it)Tested by
make -f Makefile.dist-packaging dist-snapshot
, thencopying the resulting tarball into a container with
--net=none
and building there.