Page MenuHomeFreeBSD

[NEW] devel/wrangler: Cloudflare Workers CLI Tool
ClosedPublic

Authored by kfv_kfv.io on Jan 6 2022, 12:51 PM.

Details

Summary
[NEW] devel/wrangler: Cloudflare Workers CLI Tool

Wrangler is a CLI tool designed for folks who are interested in
using Cloudflare Workers.

WWW: https://developers.cloudflare.com/workers/cli-wrangler/

Reviewed_by: ???
Differential_Revision: D33768
Test Plan

portlint: passed
testport: passed
runtime: I have been using it on my daily driver running FreeBSD 13.0-RELEASE-p3

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

I have a few questions from Rust porters, by the way, so I can do better next time:

1. I get the following warning during build:

/!\ wrangler-1.19.6: Makefile warnings, please consider fixing /!\

Please make sure this port uses the system OpenSSL and consider removing
CARGO_CRATES=openssl-src-111.17.0+1.1.1m (a vendored copy of OpenSSL) from
the build, e.g., by patching Cargo.toml appropriately.

Should I necessarily write a patch for Cargo.toml and remove openssl-src-111.17.0+1.1.1m
despite the fact that I have taken care of it in CARGO_FEATURES macro?

2. I could build the port with vendored OpenSSL on my environment, but it wasn't possible
to do so in a fresh poudriere jail, does anybody have the same experience? I was getting the
following error:

error: failed to run custom build command for `openssl-sys v0.9.72`

Caused by:
  process didn't exit successfully: `/wrkdirs/usr/ports/devel/wrangler/work/target/release/build/openssl-sys-32706f4688741eab/build-script-main` (exit status: 101)
  --- stdout
  cargo:rustc-cfg=const_fn
  cargo:rerun-if-env-changed=X86_64_UNKNOWN_FREEBSD_OPENSSL_NO_VENDOR
  X86_64_UNKNOWN_FREEBSD_OPENSSL_NO_VENDOR unset
  cargo:rerun-if-env-changed=OPENSSL_NO_VENDOR
  OPENSSL_NO_VENDOR unset
  CC_x86_64-unknown-freebsd = None
  CC_x86_64_unknown_freebsd = None
  HOST_CC = None
  CC = Some("cc")
  CFLAGS_x86_64-unknown-freebsd = None
  CFLAGS_x86_64_unknown_freebsd = None
  HOST_CFLAGS = None
  CFLAGS = Some("-O2 -pipe  -fstack-protector-strong -fno-strict-aliasing ")
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")
  CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
  running "perl" "./Configure" "--prefix=/wrkdirs/usr/ports/devel/wrangler/work/target/x86_64-unknown-freebsd/release/build/openssl-sys-e9c152b3f1418600/out/openssl-build/install" "no-dso" "no-shared" "no-ssl3" "no-unit-test" "no-comp" "no-zlib" "no-zlib-dynamic" "no-md2" "no-rc5" "no-weak-ssl-ciphers" "no-camellia" "no-idea" "no-seed" "BSD-x86_64" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-O2" "-pipe" "-fstack-protector-strong" "-fno-strict-aliasing"

  --- stderr
  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', /wrkdirs/usr/ports/devel/wrangler/work/wrangler-1.19.6/cargo-crates/openssl-src-111.17.0+1.1.1m/src/lib.rs:477:39
  stack backtrace:
     0: rust_begin_unwind
     1: core::panicking::panic_fmt
     2: core::result::unwrap_failed
     3: core::result::Result<T,E>::unwrap
     4: openssl_src::Build::run_command
     5: openssl_src::Build::build
     6: build_script_main::find_vendored::get_openssl
     7: build_script_main::find_openssl
     8: build_script_main::main
     9: core::ops::function::FnOnce::call_once
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
warning: build failed, waiting for other jobs to finish...
warning: `object` (lib) generated 9 warnings
error: build failed
*** Error code 101

Stop.
make: stopped in /usr/ports/devel/wrangler

I couldn't figure out what the root cause might be by taking a quick look at the lib.rs
in the error message, so I appreciate it if anyone could educate me on this.

Thanks a lot.

Should I necessarily write a patch for Cargo.toml and remove openssl-src-111.17.0+1.1.1m
despite the fact that I have taken care of it in CARGO_FEATURES macro?

No, it's just a hint/example.

I could build the port with vendored OpenSSL on my environment, but it wasn't possible
to do so in a fresh poudriere jail, does anybody have the same experience? I was getting the
following error:

It tries to call perl but cannot find it.

This revision was not accepted when it landed; it landed in state Needs Review.Feb 8 2022, 12:35 PM
This revision was automatically updated to reflect the committed changes.