-
Notifications
You must be signed in to change notification settings - Fork 824
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
Distro packaging improvements #2135
Conversation
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.
This looks great! Thanks for the addition!
bors r+ |
2135: Distro packaging improvements r=syrusakbary a=jcaesar # Description Having installed wasmer from both gentoo and AUR (packaged by svenstaro, an Arch Maintainer), I was stumped to find that both build wasmer without compilers, not actually allowing me to run any wasm. (The AUR PKGBUILD has since been patched, but the gentoo ebuild maintainer… who knows.) I figured that the obvious improvement would be to deny compilation if not at least one compiler is enabled, but I think more can be done to help packaging. I added * a way to set a default for `WASMER_DIR` at compile time * an install target for the Makefile * a `PACKAGING.md` with some suggestions to distro maintainers Disclaimer: I'm not a package maintainer anywhere, so these might be entirely off the rails. Commit 1 and 2 seem fairly reasonable to me, but for the other two, I'm not so sure. # Review - [ ] Add a short description of the the change to the CHANGELOG.md file Co-authored-by: Julius Michaelis <[email protected]>
Build failed: |
bors r- |
install -Dm755 target/release/libwasmer_c_api.so "$(DESTDIR)/lib/libwasmer.so.$$pkgver" && \ | ||
ln -sf "libwasmer.so.$$pkgver" "$(DESTDIR)/lib/libwasmer.so.$$shortver" && \ | ||
ln -sf "libwasmer.so.$$pkgver" "$(DESTDIR)/lib/libwasmer.so.$$majorver" && \ | ||
ln -sf "libwasmer.so.$$pkgver" "$(DESTDIR)/lib/libwasmer.so" |
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.
We should add a mention that install-capi-lib
is for Linux distros only, which excludes Darwin and Windows. A simple documentation line dropped before install-capi-lib
would be OK for me.
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.
I guess I could also migrate some parts over from package-capi
to support Windows/Darwin, but I have little in the way of testing it.
I'm also not exactly happy with the duplication between package-*
and install-*
, but I don't think I can smoothly migrate whatever is using package-*
to install-*
. I'll leave that for someone with more inside knowledge.
Thank you for the patch, it looks great! I made some feedbacks and found some issues, nothing difficult to fix. Do you think we could test that in the CI? |
(I hope to have some time to integrate the suggested fixes this evening...) |
Just add as many commits as you want for the moment, we will see at the end :-). |
All right. Want to give bors another spin then? I think it might pass now. |
bors r+ |
👎 Rejected by code reviews |
bors r+ |
👎 Rejected by code reviews |
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.
I think it's good now!
bors r+ |
2135: Distro packaging improvements r=Hywan a=jcaesar # Description Having installed wasmer from both gentoo and AUR (packaged by svenstaro, an Arch Maintainer), I was stumped to find that both build wasmer without compilers, not actually allowing me to run any wasm. (The AUR PKGBUILD has since been patched, but the gentoo ebuild maintainer… who knows.) I figured that the obvious improvement would be to deny compilation if not at least one compiler is enabled, but I think more can be done to help packaging. I added * a way to set a default for `WASMER_DIR` at compile time * an install target for the Makefile * a `PACKAGING.md` with some suggestions to distro maintainers Disclaimer: I'm not a package maintainer anywhere, so these might be entirely off the rails. Commit 1 and 2 seem fairly reasonable to me, but for the other two, I'm not so sure. # Review - [ ] Add a short description of the the change to the CHANGELOG.md file Co-authored-by: Julius Michaelis <[email protected]> Co-authored-by: Ivan Enderlin <[email protected]>
Build failed: |
@@ -678,7 +719,7 @@ lint-packages: | |||
RUSTFLAGS=${RUSTFLAGS} cargo clippy -p wasmer-compiler | |||
RUSTFLAGS=${RUSTFLAGS} cargo clippy -p wasmer-compiler-cranelift | |||
RUSTFLAGS=${RUSTFLAGS} cargo clippy -p wasmer-compiler-singlepass | |||
RUSTFLAGS=${RUSTFLAGS} cargo clippy -p wasmer-cli | |||
RUSTFLAGS=${RUSTFLAGS} cargo clippy --manifest-path lib/cli/Cargo.toml $(compiler_features) |
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.
Since LLVM is likely to be part of $(compiler_features)
set, the Lint workflow in the CI must install LLVM now.
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.
I see. I guess I'll add that to the CI setup. There actually was one problem in the code that would have been caught by linting with all compilers on. Should I additionally keep the "lint with all off"?
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.
I reckon we should keep the Lints as they are in master
for the moment, and open another PR or a new issue to update them so that they include $(compiler_features)
(which makes sense!).
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.
That's not an option, as compiling without any compiler_features will fail. But I guess I could temporarily remove linting wasmer-cli and do another PR? Dangerous...
5284dc4
to
4885b7c
Compare
bors try |
Sorry, my push missed the "bors try" by about 90 seconds. Took me some force-pushing to get installing llvm right, but lint should work now. |
bors try |
tryAlready running a review |
bors try |
tryAlready running a review |
bors try- |
bors try |
Maybe bors will be happy if you "bors r-" "bors r+" it once? Or, if it is bugging around, I can also close this pr and reopen with the same commits... |
bors r- |
bors try- |
bors r+ |
I'll merge manually and see if tests pass later or not. Bors seems broken |
Description
Having installed wasmer from both gentoo and AUR (packaged by svenstaro, an Arch Maintainer), I was stumped to find that both build wasmer without compilers, not actually allowing me to run any wasm. (The AUR PKGBUILD has since been patched, but the gentoo ebuild maintainer… who knows.)
I figured that the obvious improvement would be to deny compilation if not at least one compiler is enabled, but I think more can be done to help packaging. I added
WASMER_DIR
at compile timePACKAGING.md
with some suggestions to distro maintainersDisclaimer: I'm not a package maintainer anywhere, so these might be entirely off the rails. Commit 1 and 2 seem fairly reasonable to me, but for the other two, I'm not so sure.
Review