Skip to content

Commit

Permalink
feature: upgrade nginx core to 1.25.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
swananan authored Aug 6, 2023
1 parent 23e45bc commit d48f057
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ env:
matrix:
- NGINX_VERSION=1.21.4 OPENSSL_VER=1.1.0l
- NGINX_VERSION=1.21.4 OPENSSL_VER=1.1.1s
- NGINX_VERSION=1.25.1 OPENSSL_VER=1.1.0l
- NGINX_VERSION=1.25.1 OPENSSL_VER=1.1.1s

services:
- memcache
Expand Down
14 changes: 14 additions & 0 deletions util/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,26 @@ version=$1
force=$2
home=~

add_http3_module=--with-http_v3_module
answer=`$root/util/ver-ge "$NGINX_VERSION" 1.25.1`
if [ "$OPENSSL_VER" = "1.1.0l" ] || [ "$answer" = "N" ]; then
add_http3_module=""
fi

disable_pcre2=--without-pcre2
answer=`$root/util/ver-ge "$NGINX_VERSION" 1.25.1`
if [ "$answer" = "N" ]; then
disable_pcre2=""
fi

#--add-module=$root/../stream-echo-nginx-module \
ngx-build $force $version \
--with-cc-opt="-DNGX_LUA_USE_ASSERT -I$PCRE_INC -I$OPENSSL_INC" \
--with-ld-opt="-L$PCRE_LIB -L$OPENSSL_LIB -Wl,-rpath,$PCRE_LIB:$LIBDRIZZLE_LIB:$OPENSSL_LIB" \
--with-http_stub_status_module \
--with-http_image_filter_module \
$add_http3_module \
$disable_pcre2 \
--with-http_ssl_module \
--without-mail_pop3_module \
--without-mail_imap_module \
Expand Down
41 changes: 41 additions & 0 deletions util/ver-ge
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/usr/bin/env perl

use strict;
use warnings;

sub usage {
die "Usage: $0 <ver1> <ver2>\n";
}

my $a = shift or usage();
my $b = shift or usage();

my @as = split /\./, $a;
my @bs = split /\./, $b;

my $n = @as > @bs ? scalar(@as) : scalar(@bs);

for (my $i = 0; $i < $n; $i++) {
my $x = $as[$i];
my $y = $bs[$i];

if (!defined $x) {
$x = 0;
}

if (!defined $y) {
$y = 0;
}

if ($x > $y) {
print "Y\n";
exit;

} elsif ($x < $y) {
print "N\n";
exit;
}
}

print "Y\n";

0 comments on commit d48f057

Please sign in to comment.