nginxinc / ngx-rust

Rust binding for NGINX
Apache License 2.0
713 stars 59 forks source link

build: zlib 1.2.13 not available anymore #41

Closed ivanitskiy closed 4 months ago

ivanitskiy commented 10 months ago

Describe the bug zlib 1.3 ws released on August 18, 2023 and zlib.net is not serving 1.2.13 version anymore which is causing compile time.

To Reproduce Steps to reproduce the behavior:

  1. Make sure you have no .cache folder and target is cleaned up, run make clean

  2. Build a module ZLIB_VERSION=1.2.13 cargo build -p examples --examples

    
    Compiling nginx-sys v0.1.0 (/Users/ivanitskiy/go/src/github.com/nginxinc/ngx-rust/nginx-sys)
    error: failed to run custom build command for `nginx-sys v0.1.0 (/Users/ivanitskiy/go/src/github.com/nginxinc/ngx-rust/nginx-sys)`

Caused by: process didn't exit successfully: /Users/ivanitskiy/go/src/github.com/nginxinc/ngx-rust/target/debug/build/nginx-sys-3b08605f44a50128/build-script-build (exit status: 1) --- stdout gpg: WARNING: unsafe permissions on homedir '/Users/ivanitskiy/go/src/github.com/nginxinc/ngx-rust/.cache/.gnupg' gpg: keybox '/Users/ivanitskiy/go/src/github.com/nginxinc/ngx-rust/.cache/.gnupg/pubring.kbx' created gpg: /Users/ivanitskiy/go/src/github.com/nginxinc/ngx-rust/.cache/.gnupg/trustdb.gpg: trustdb created gpg: key 783FCD8E58BCAFBA: public key "Mark Adler madler@alumni.caltech.edu" imported gpg: Total number processed: 1 gpg: imported: 1 Imported GPG key: 783FCD8E58BCAFBA gpg: WARNING: unsafe permissions on homedir '/Users/ivanitskiy/go/src/github.com/nginxinc/ngx-rust/.cache/.gnupg' gpg: key 9766E084FB0F43D8: 1 duplicate signature removed gpg: key 9766E084FB0F43D8: public key "Philip Hazel Philip.Hazel@gmail.com" imported gpg: Total number processed: 1 gpg: imported: 1 Imported GPG key: 9766E084FB0F43D8 gpg: WARNING: unsafe permissions on homedir '/Users/ivanitskiy/go/src/github.com/nginxinc/ngx-rust/.cache/.gnupg' gpg: key B8EF1A6BA9DA2D5C: public key "Tomáš Mráz tm@t8m.info" imported gpg: Total number processed: 1 gpg: imported: 1 Imported GPG key: A21FAB74B0088AA361152586B8EF1A6BA9DA2D5C gpg: WARNING: unsafe permissions on homedir '/Users/ivanitskiy/go/src/github.com/nginxinc/ngx-rust/.cache/.gnupg' gpg: key D9C4D26D0E604491: public key "Matt Caswell matt@openssl.org" imported gpg: Total number processed: 1 gpg: imported: 1 Imported GPG key: 8657ABB260F056B1E5190839D9C4D26D0E604491 gpg: WARNING: unsafe permissions on homedir '/Users/ivanitskiy/go/src/github.com/nginxinc/ngx-rust/.cache/.gnupg' gpg: key 231C84CDDCC69C45: public key "Paul Dale pauli@openssl.org" imported gpg: Total number processed: 1 gpg: imported: 1 Imported GPG key: B7C1C14360F353A36862E4D5231C84CDDCC69C45 gpg: WARNING: unsafe permissions on homedir '/Users/ivanitskiy/go/src/github.com/nginxinc/ngx-rust/.cache/.gnupg' gpg: key 3D30A3A9FF1360DC: public key "Hugo Landau (2013 Principal) hlandau@openssl.org" imported gpg: Total number processed: 1 gpg: imported: 1 Imported GPG key: 95A9908DDFA16830BE9FB9003D30A3A9FF1360DC gpg: WARNING: unsafe permissions on homedir '/Users/ivanitskiy/go/src/github.com/nginxinc/ngx-rust/.cache/.gnupg' gpg: key D5E9E43F7DF9EE8C: public key "Richard Levitte richard@levitte.org" imported gpg: Total number processed: 1 gpg: imported: 1 Imported GPG key: 7953AC1FBC3DC8B3B292393ED5E9E43F7DF9EE8C gpg: WARNING: unsafe permissions on homedir '/Users/ivanitskiy/go/src/github.com/nginxinc/ngx-rust/.cache/.gnupg' gpg: key A0EA981B66B0D967: public key "Konstantin Pavlov thresh@nginx.com" imported gpg: Total number processed: 1 gpg: imported: 1 Imported GPG key: A0EA981B66B0D967

--- stderr Error: Status(404, Response[status: 404, status_text: Not Found, url: https://www.zlib.net/zlib-1.2.13.tar.gz.asc])



**Expected behavior**
Able to compile with 1.2.13 zlib (by default). 

**Your environment**
* Version of the repo - a specific commit or tag commit 57c68ff879d868e5bd5f2f16d81ac62b3fe29689 
* Version of Rust: 1.71.1
* Version of NGINX (and all dependencies if modified)
* OS and distribution: mac os 
* CI link
https://github.com/nginxinc/ngx-rust/actions/runs/5930817771/job/16081520013

**Additional context**
Add any other context about the problem here. Any log files you want to share.
0rphon commented 10 months ago

temporary fix for anyone who doesn't know: add this to your .cargo/config.toml

[env]
ZLIB_VERSION = "1.3"
ivanitskiy commented 10 months ago

updated CI to use zlib v1.3: https://github.com/nginxinc/ngx-rust/commit/e629f9711f3e3b5ee42126661175008ef1a5034c

dekobon commented 4 months ago

This should be fixed in: https://github.com/nginxinc/ngx-rust/pull/61

willnode commented 3 months ago

This should be fixed in: https://github.com/nginxinc/ngx-rust/pull/61

I noticed 0.5.0 is not published in any crate. So I add this...


[patch.crates-io]
ngx = { git = "https://github.com/nginxinc/ngx-rust", rev = "b08a9ee7a2bf9518acb1dac22fa3d241023047e5"}

Just helping if anyone stumbles upon this issue