feat!: add nginx-src crate with vendored nginx sources#160
Merged
bavshin-f5 merged 4 commits intonginx:masterfrom Jul 12, 2025
Merged
feat!: add nginx-src crate with vendored nginx sources#160bavshin-f5 merged 4 commits intonginx:masterfrom
bavshin-f5 merged 4 commits intonginx:masterfrom
Conversation
9744571 to
4b7fd2c
Compare
Member
Author
|
I think that's good enough to start looking. The only remaining item is README.md update. |
There was a problem hiding this comment.
Pull Request Overview
Adds a new nginx-src crate to vendor NGINX sources and updates the existing nginx-sys build to use it, refactors test harness for finding and running a local NGINX binary, and cleans up the old vendored.rs logic.
- Introduces
nginx-srcsubmodule and crate for downloading, verifying, and building NGINX sources - Switches
nginx-sys’svendoredfeature to depend onnginx-srcinstead of in-repovendored.rs - Updates tests to locate an NGINX binary via environment variables and cleans up deprecated test build script
Comments suppressed due to low confidence (4)
nginx-src/src/verifier.rs:28
- There is no
fs::existsfunction returning aResult; you should check existence withif !gnupghome.exists() { ... }(no?needed).
if !fs::exists(&gnupghome)? {
build.rs:57
- Cargo build-script directives use a single colon (
cargo:...), not double; change"cargo::rerun-if-env-changed=..."to"cargo:rerun-if-env-changed=...".
println!("cargo::rerun-if-env-changed=DEP_NGINX_BUILD_DIR");
tests/nginx.conf:19
- [nitpick] Commenting out
include mime.typesalters the test NGINX configuration; ensure tests don’t rely on MIME definitions or explicitly provide what’s needed.
# include mime.types;
xeioex
approved these changes
Jul 11, 2025
Contributor
xeioex
left a comment
There was a problem hiding this comment.
Over all looks good.
The source preparation code is more readable and maintainable now.
We had an inconvenient expectation that the nginx binary is installed to the configured location and the default prefix is writable. Instead of that, we should take the same approach as perl tests: * Create a temporary prefix and pass it to nginx. * Use binary from the build dir and allow overriding it with environment variable.
Ensure that nginx-sys/vendored is enabled and limit targets to Linux x86_64.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See #85 for rationale. Also "solves" all the issues with the dependency URLs, bad signatures etc.
Proof of concept. I'm planning to restore the download code and make it strictly opt-in before I mark this as ready for review.