Skip to content

crate documentation at docs.rs fails to build #85

Open
@bavshin-f5

Description

@bavshin-f5

Neither of the crates has a documentation available. This happens because docs.rs builds are performed in an isolated environment without network access and with limited filesystem access, therefore nginx-sys fails to fetch and build the dependencies.

Logs:

https://docs.rs/crate/ngx/0.4.1/builds/1026822

[INFO] running `Command { std: "docker" "create" "-v" "/home/cratesfyi/workspace-builder/builds/ngx-0.4.1/target:/opt/rustwide/target:rw,Z" "-v" "/home/cratesfyi/workspace-builder/builds/ngx-0.4.1/source:/opt/rustwide/workdir:ro,Z" "-v" "/home/cratesfyi/workspace-builder/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/home/cratesfyi/workspace-builder/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "DOCS_RS=1" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "6442450944" "--cpus" "6" "--user" "1001:1001" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:2788e3201cd34a07e3172128adcd8b3090168a8e3bcc40d7c032b9dda1df7d1c" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "rustdoc" "--lib" "-Zrustdoc-map" "-Z" "unstable-options" "--config" "build.rustdocflags=[\"-Z\", \"unstable-options\", \"--emit=invocation-specific\", \"--resource-suffix\", \"-20231130-1.76.0-nightly-87e1447aa\", \"--static-root-path\", \"/-/rustdoc.static/\", \"--cap-lints\", \"warn\", \"--extern-html-root-takes-precedence\"]" "--offline" "-Zunstable-options" "--config=doc.extern-map.registries.crates-io=\"https://docs.rs/{pkg_name}/{version}/x86_64-unknown-linux-gnu\"" "-Zrustdoc-scrape-examples" "-j6" "--target" "x86_64-unknown-linux-gnu", kill_on_drop: false }`
[INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
[INFO] [stdout] 4ff50542616c16f9e6936f68b5420444e406f0fc316bab0bf9567271ca7c6653
[INFO] running `Command { std: "docker" "start" "-a" "4ff50542616c16f9e6936f68b5420444e406f0fc316bab0bf9567271ca7c6653", kill_on_drop: false }`
[INFO] [stderr] warning: Target filter specified, but no targets matched. This is a no-op
[INFO] [stderr]    Compiling nginx-sys v0.2.1
[INFO] [stderr] error: failed to run custom build command for `nginx-sys v0.2.1`
[INFO] [stderr] 
[INFO] [stderr] Caused by:
[INFO] [stderr]   process didn't exit successfully: `/opt/rustwide/target/debug/build/nginx-sys-72198d03140dc169/build-script-build` (exit status: 1)
[INFO] [stderr]   --- stderr
[INFO] [stderr]   Error: Os { code: 30, kind: ReadOnlyFilesystem, message: "Read-only file system" }
[INFO] running `Command { std: "docker" "inspect" "4ff50542616c16f9e6936f68b5420444e406f0fc316bab0bf9567271ca7c6653", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "4ff50542616c16f9e6936f68b5420444e406f0fc316bab0bf9567271ca7c6653", kill_on_drop: false }`
[INFO] [stdout] 4ff50542616c16f9e6936f68b5420444e406f0fc316bab0bf9567271ca7c6653

The build environment already has most of the things we need, we'll only have to deliver the NGINX itself and make it build against the system libs.
A possible approach can be copied from the openssl crate: a new nginx-src crate that embeds a git submodule with the latest stable NGINX source.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions