Skip to content
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

Updated Unit to 1.32.0. #23

Merged
merged 4 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
10 changes: 7 additions & 3 deletions Formula/php-embed.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ class PhpEmbed < Formula
desc "PHP library for embedding in applications"
homepage "https://www.php.net/"
# Should only be updated if the new version is announced on the homepage, https://www.php.net/
url "https://www.php.net/distributions/php-8.2.5.tar.xz"
mirror "https://fossies.org/linux/www/php-8.2.5.tar.xz"
sha256 "800738c359b7f1e67e40c22713d2d90276bc85ba1c21b43d99edd43c254c5f76"
url "https://www.php.net/distributions/php-8.3.3.tar.xz"
mirror "https://fossies.org/linux/www/php-8.3.3.tar.xz"
sha256 "b0a996276fe21fe9ca8f993314c8bc02750f464c7b0343f056fb0894a8dfa9d1"
license "PHP-3.01"

livecheck do
Expand All @@ -23,6 +23,8 @@ class PhpEmbed < Formula
depends_on "php"

on_macos do
depends_on "imap-uw"

# PHP build system incorrectly links system libraries
# see https://github.com/php/php-src/issues/10680
patch :DATA
Expand Down Expand Up @@ -150,6 +152,8 @@ def install

if OS.mac?
args << "--enable-dtrace"
args << "--with-imap=#{Formula["imap-uw"].opt_prefix}"
args << "--with-imap-ssl=#{Formula["openssl@3"].opt_prefix}"
args << "--with-ldap-sasl"
args << "--with-os-sdkpath=#{MacOS.sdk_path_if_needed}"
else
Expand Down
6 changes: 3 additions & 3 deletions Formula/unit-java.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
class UnitJava < Formula
desc "Java module for Unit application server"
homepage "https://unit.nginx.org"
url "https://unit.nginx.org/download/unit-1.31.1.tar.gz"
sha256 "9df604d49cb57ac0103202efb0f9373e3e48a7dd888c94af10d4f96ccded7d71"
url "https://unit.nginx.org/download/unit-1.32.0.tar.gz"
sha256 "4b5e9be3f3990fceabf06292c2b7853667aceb71fd8de5dc67cb7fb05d247a20"
head "https://github.com/nginx/unit.git", branch: "master"

depends_on "openjdk@11"
depends_on "openssl"
depends_on "unit@1.31.1"
depends_on "unit@1.32.0"

def install
system "./configure",
Expand Down
6 changes: 3 additions & 3 deletions Formula/unit-perl.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
class UnitPerl < Formula
desc "Perl module for Unit application server"
homepage "https://unit.nginx.org"
url "https://unit.nginx.org/download/unit-1.31.1.tar.gz"
sha256 "9df604d49cb57ac0103202efb0f9373e3e48a7dd888c94af10d4f96ccded7d71"
url "https://unit.nginx.org/download/unit-1.32.0.tar.gz"
sha256 "4b5e9be3f3990fceabf06292c2b7853667aceb71fd8de5dc67cb7fb05d247a20"
head "https://github.com/nginx/unit.git", branch: "master"

depends_on "openssl"
depends_on "perl"
depends_on "unit@1.31.1"
depends_on "unit@1.32.0"

def install
system "./configure",
Expand Down
6 changes: 3 additions & 3 deletions Formula/unit-php.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
class UnitPhp < Formula
desc "PHP module for Unit application server"
homepage "https://unit.nginx.org"
url "https://unit.nginx.org/download/unit-1.31.1.tar.gz"
sha256 "9df604d49cb57ac0103202efb0f9373e3e48a7dd888c94af10d4f96ccded7d71"
url "https://unit.nginx.org/download/unit-1.32.0.tar.gz"
sha256 "4b5e9be3f3990fceabf06292c2b7853667aceb71fd8de5dc67cb7fb05d247a20"
head "https://github.com/nginx/unit.git", branch: "master"

depends_on "openssl"
depends_on "php-embed"
depends_on "unit@1.31.1"
depends_on "unit@1.32.0"

def install
system "./configure",
Expand Down
6 changes: 3 additions & 3 deletions Formula/unit-python.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
class UnitPython < Formula
desc "Python module for Unit application server"
homepage "https://unit.nginx.org"
url "https://unit.nginx.org/download/unit-1.31.1.tar.gz"
sha256 "9df604d49cb57ac0103202efb0f9373e3e48a7dd888c94af10d4f96ccded7d71"
url "https://unit.nginx.org/download/unit-1.32.0.tar.gz"
sha256 "4b5e9be3f3990fceabf06292c2b7853667aceb71fd8de5dc67cb7fb05d247a20"
head "https://github.com/nginx/unit.git", branch: "master"

depends_on maximum_macos: :big_sur
depends_on "openssl"
depends_on "unit@1.31.1"
depends_on "unit@1.32.0"
uses_from_macos "python"

def install
Expand All @@ -34,7 +34,7 @@
system "make", "python-install"
end

test do

Check warning on line 37 in Formula/unit-python.rb

View workflow job for this annotation

GitHub Actions / test-bot (ubuntu-latest)

`brew test --verbose nginx/unit/unit-python` failed on Linux!

/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/bin/bundle clean ==> Testing nginx/unit/unit-python ==> /home/linuxbrew/.linuxbrew/bin/unitd --log /tmp/unit-python-test-20240227-215275-e9ra6v/unit.log --control unix:/tmp/unit-python-test-20240227-215275-e9ra6v/control.sock --pid /tmp/unit-python-test-20240227-215275-e9ra6v/unit.pid --statedir /tmp/unit-python-test-20240227-215275-e9ra6v/state 2024/02/27 23:18:37 [warn] 215302#215302 Unit is running unprivileged, then it cannot use arbitrary user and group. 2024/02/27 23:18:37 [info] 215302#215302 unit 1.32.0 started ==> curl -s --unix-socket /tmp/unit-python-test-20240227-215275-e9ra6v/control.sock -X PUT -d @/tmp/unit-python-test-20240227-215275-e9ra6v/unit.conf 127.0.0.1/config { "error": "Invalid configuration.", "detail": "The module to run \"python 2\" is not found among the available application modules." } ==> curl -s 127.0.0.1:45273 Error: nginx/unit/unit-python: failed An exception occurred within a child process: Minitest::Assertion: Expected: 0 Actual: 7 /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/minitest-5.22.2/lib/minitest/assertions.rb:183:in `assert' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/minitest-5.22.2/lib/minitest/assertions.rb:223:in `assert_equal' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula_assertions.rb:26:in `shell_output' /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/nginx/homebrew-unit/Formula/unit-python.rb:77:in `block in <class:UnitPython>' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:2591:in `block (3 levels) in run_test' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/extend/kernel.rb:493:in `with_env' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:2590:in `block (2 levels) in run_test' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:1056:in `with_logging' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:2589:in `block in run_test' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/mktemp.rb:75:in `block in run' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/mktemp.rb:75:in `chdir' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/mktemp.rb:75:in `run' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:2883:in `mktemp' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:2583:in `run_test' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/test.rb:46:in `block in <main>' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/timeout.rb:107:in `block in timeout' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/timeout.rb:36:in `block in catch' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/timeout.rb:36:in `catch' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/timeout.rb:36:in `catch' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/timeout.rb:123:in `timeout' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/test.rb:50:in `<main>'
require "socket"

server = TCPServer.new(0)
Expand Down
6 changes: 3 additions & 3 deletions Formula/unit-python3.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
class UnitPython3 < Formula
desc "Python3 module for Unit application server"
homepage "https://unit.nginx.org"
url "https://unit.nginx.org/download/unit-1.31.1.tar.gz"
sha256 "9df604d49cb57ac0103202efb0f9373e3e48a7dd888c94af10d4f96ccded7d71"
url "https://unit.nginx.org/download/unit-1.32.0.tar.gz"
sha256 "4b5e9be3f3990fceabf06292c2b7853667aceb71fd8de5dc67cb7fb05d247a20"
head "https://github.com/nginx/unit.git", branch: "master"
depends_on "openssl"
depends_on "python3"
depends_on "unit@1.31.1"
depends_on "unit@1.32.0"

def install
system "./configure",
Expand Down
6 changes: 3 additions & 3 deletions Formula/unit-ruby.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
class UnitRuby < Formula
desc "Ruby module for Unit application server"
homepage "https://unit.nginx.org"
url "https://unit.nginx.org/download/unit-1.31.1.tar.gz"
sha256 "9df604d49cb57ac0103202efb0f9373e3e48a7dd888c94af10d4f96ccded7d71"
url "https://unit.nginx.org/download/unit-1.32.0.tar.gz"
sha256 "4b5e9be3f3990fceabf06292c2b7853667aceb71fd8de5dc67cb7fb05d247a20"
head "https://github.com/nginx/unit.git", branch: "master"

depends_on "openssl"
depends_on "ruby"
depends_on "unit@1.31.1"
depends_on "unit@1.32.0"

def install
system "./configure",
Expand Down Expand Up @@ -41,7 +41,7 @@
EOS
end

test do

Check warning on line 44 in Formula/unit-ruby.rb

View workflow job for this annotation

GitHub Actions / test-bot (ubuntu-latest)

`brew test --verbose nginx/unit/unit-ruby` failed on Linux!

/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/bin/bundle clean ==> Testing nginx/unit/unit-ruby ==> /home/linuxbrew/.linuxbrew/bin/unitd --log /tmp/unit-ruby-test-20240227-230417-c9xis2/unit.log --control unix:/tmp/unit-ruby-test-20240227-230417-c9xis2/control.sock --pid /tmp/unit-ruby-test-20240227-230417-c9xis2/unit.pid --statedir /tmp/unit-ruby-test-20240227-230417-c9xis2/state 2024/02/27 23:21:16 [warn] 230444#230444 Unit is running unprivileged, then it cannot use arbitrary user and group. 2024/02/27 23:21:16 [info] 230444#230444 unit 1.32.0 started ==> curl -s --unix-socket /tmp/unit-ruby-test-20240227-230417-c9xis2/control.sock -X PUT -d @/tmp/unit-ruby-test-20240227-230417-c9xis2/unit.conf 127.0.0.1/config { "error": "Failed to apply new configuration." } ==> curl -s 127.0.0.1:37537 Error: nginx/unit/unit-ruby: failed An exception occurred within a child process: Minitest::Assertion: Expected: 0 Actual: 7 /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/minitest-5.22.2/lib/minitest/assertions.rb:183:in `assert' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/minitest-5.22.2/lib/minitest/assertions.rb:223:in `assert_equal' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula_assertions.rb:26:in `shell_output' /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/nginx/homebrew-unit/Formula/unit-ruby.rb:86:in `block in <class:UnitRuby>' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:2591:in `block (3 levels) in run_test' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/extend/kernel.rb:493:in `with_env' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:2590:in `block (2 levels) in run_test' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:1056:in `with_logging' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:2589:in `block in run_test' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/mktemp.rb:75:in `block in run' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/mktemp.rb:75:in `chdir' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/mktemp.rb:75:in `run' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:2883:in `mktemp' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:2583:in `run_test' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/test.rb:46:in `block in <main>' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/timeout.rb:107:in `block in timeout' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/timeout.rb:36:in `block in catch' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/timeout.rb:36:in `catch' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/timeout.rb:36:in `catch' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/timeout.rb:123:in `timeout' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/test.rb:50:in `<main>'

Check warning on line 44 in Formula/unit-ruby.rb

View workflow job for this annotation

GitHub Actions / test-bot (macOS-latest)

`brew test --verbose nginx/unit/unit-ruby` failed on macOS Monterey (12)!

/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/bin/bundle clean ==> Testing nginx/unit/unit-ruby ==> /usr/local/bin/unitd --log /private/tmp/unit-ruby-test-20240227-99083-5y4xbv/unit.log --control unix:/private/tmp/unit-ruby-test-20240227-99083-5y4xbv/control.sock --pid /private/tmp/unit-ruby-test-20240227-99083-5y4xbv/unit.pid --statedir /private/tmp/unit-ruby-test-20240227-99083-5y4xbv/state 2024/02/27 23:26:18 [warn] 99098#387203 Unit is running unprivileged, then it cannot use arbitrary user and group. 2024/02/27 23:26:18 [info] 99098#387203 unit 1.32.0 started ==> curl -s --unix-socket /private/tmp/unit-ruby-test-20240227-99083-5y4xbv/control.sock -X PUT -d @/private/tmp/unit-ruby-test-20240227-99083-5y4xbv/unit.conf 127.0.0.1/config { "error": "Failed to apply new configuration." } ==> curl -s 127.0.0.1:49392 Error: nginx/unit/unit-ruby: failed An exception occurred within a child process: Minitest::Assertion: Expected: 0 Actual: 7 /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/minitest-5.22.2/lib/minitest/assertions.rb:183:in `assert' /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/minitest-5.22.2/lib/minitest/assertions.rb:223:in `assert_equal' /usr/local/Homebrew/Library/Homebrew/formula_assertions.rb:26:in `shell_output' /usr/local/Homebrew/Library/Taps/nginx/homebrew-unit/Formula/unit-ruby.rb:86:in `block in <class:UnitRuby>' /usr/local/Homebrew/Library/Homebrew/formula.rb:2591:in `block (3 levels) in run_test' /usr/local/Homebrew/Library/Homebrew/extend/kernel.rb:493:in `with_env' /usr/local/Homebrew/Library/Homebrew/formula.rb:2590:in `block (2 levels) in run_test' /usr/local/Homebrew/Library/Homebrew/formula.rb:1056:in `with_logging' /usr/local/Homebrew/Library/Homebrew/formula.rb:2589:in `block in run_test' /usr/local/Homebrew/Library/Homebrew/mktemp.rb:75:in `block in run' /usr/local/Homebrew/Library/Homebrew/mktemp.rb:75:in `chdir' /usr/local/Homebrew/Library/Homebrew/mktemp.rb:75:in `run' /usr/local/Homebrew/Library/Homebrew/formula.rb:2883:in `mktemp' /usr/local/Homebrew/Library/Homebrew/formula.rb:2583:in `run_test' /usr/local/Homebrew/Library/Homebrew/test.rb:46:in `block in <main>' /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/timeout.rb:107:in `block in timeout' /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/timeout.rb:36:in `block in catch' /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/timeout.rb:36:in `catch' /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/timeout.rb:36:in `catch' /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/timeout.rb:123:in `timeout' /usr/local/Homebrew/Library/Homebrew/test.rb:50:in `<main>'
require "socket"

server = TCPServer.new(0)
Expand Down
29 changes: 26 additions & 3 deletions Formula/unit-wasm.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
class UnitWasm < Formula
desc "Ruby module for Unit application server"
homepage "https://unit.nginx.org"
url "https://unit.nginx.org/download/unit-1.31.1.tar.gz"
sha256 "9df604d49cb57ac0103202efb0f9373e3e48a7dd888c94af10d4f96ccded7d71"
url "https://unit.nginx.org/download/unit-1.32.0.tar.gz"
sha256 "4b5e9be3f3990fceabf06292c2b7853667aceb71fd8de5dc67cb7fb05d247a20"
head "https://github.com/nginx/unit.git", branch: "master"

depends_on "rust" => :build
depends_on "openssl"
depends_on "unit@1.31.1"
depends_on "unit@1.32.0"
depends_on "wasmtime"

# uname -o does not seem to exist on macOS 12.7 currently used in github actions
# which leads to FTBFS on that target
patch :DATA

def install
system "./configure",
"--prefix=#{prefix}",
Expand All @@ -33,5 +38,23 @@ def install
"--include-path=#{HOMEBREW_PREFIX}/usr/include/",
"--lib-path=#{HOMEBREW_PREFIX}/lib/"
system "make", "wasm-install"

system "./configure", "wasm-wasi-component"
system "make", "wasm-wasi-component-install"
end
end

__END__
diff --git a/auto/modules/wasm-wasi-component b/auto/modules/wasm-wasi-component
index bfb6ffcb..6c8258d7 100644
--- a/auto/modules/wasm-wasi-component
+++ b/auto/modules/wasm-wasi-component
@@ -82,7 +82,7 @@ fi
$echo " + $NXT_WCM_MODULE module: $NXT_WCM_MOD_NAME"


-NXT_OS=$(uname -o)
+NXT_OS=$(uname -s)

if [ $NXT_OS = "Darwin" ]; then
NXT_CARGO_CMD="cargo rustc --release --manifest-path src/wasm-wasi-component/Cargo.toml -- --emit link=target/release/libwasm_wasi_component.so -C link-args='-undefined dynamic_lookup'"
8 changes: 4 additions & 4 deletions Formula/unit.rb
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
class Unit < Formula
desc "Dynamic web and application server"
homepage "https://unit.nginx.org"
url "https://unit.nginx.org/download/unit-1.31.1.tar.gz"
sha256 "9df604d49cb57ac0103202efb0f9373e3e48a7dd888c94af10d4f96ccded7d71"
url "https://unit.nginx.org/download/unit-1.32.0.tar.gz"
sha256 "4b5e9be3f3990fceabf06292c2b7853667aceb71fd8de5dc67cb7fb05d247a20"
head "https://github.com/nginx/unit.git", branch: "master"

depends_on "openssl"
depends_on "pcre2"
depends_on "pkg-config"

resource "njs" do
url "https://hg.nginx.org/njs/archive/0.8.0.tar.gz"
sha256 "c6645f07f89b52d8169492f1101a767ce93d46554f48d3330cae343bee4c1695"
url "https://hg.nginx.org/njs/archive/0.8.2.tar.gz"
sha256 "86915b5046661466b324e08300696a74b8ffbe9b69fa9acbc10e9c487ac98cf8"
end

def install
Expand Down
Loading