mirror of
https://github.com/openresty/openresty.git
synced 2024-10-13 00:29:41 +00:00
added patches for nginx 1.3.4.
This commit is contained in:
@ -1,9 +1,9 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#root=$(readlink -f -- "$(dirname -- "$0")/..")
|
||||
root=`perl -MCwd -e'print Cwd::abs_path(shift)' $(dirname -- "$0")/..`
|
||||
|
||||
. util/ver
|
||||
. ./util/ver
|
||||
|
||||
name=ngx_openresty-$version
|
||||
work=$root/work
|
||||
@ -73,14 +73,17 @@ patch -p1 < $root/patches/nginx-$main_ver-log_escape_non_ascii.patch || exit 1
|
||||
#echo applying filter_finalize_hang.patch ...
|
||||
#patch -p1 < $root/patches/nginx-$main_ver-filter_finalize_hang.patch || exit 1
|
||||
|
||||
echo applying add_core_vars_polluting_globals.patch ...
|
||||
patch -p1 < $root/patches/nginx-$main_ver-add_core_vars_polluting_globals.patch || exit 1
|
||||
answer=`$root/util/ver-ge "$main_ver" 1.3.4`
|
||||
if [ "$answer" = "N" ]; then
|
||||
echo applying add_core_vars_polluting_globals.patch ...
|
||||
patch -p1 < $root/patches/nginx-$main_ver-add_core_vars_polluting_globals.patch || exit 1
|
||||
|
||||
echo applying resolver_debug_log_overflow.patch ...
|
||||
patch -p1 < $root/patches/nginx-$main_ver-resolver_debug_log_overflow.patch || exit 1
|
||||
echo applying resolver_debug_log_overflow.patch ...
|
||||
patch -p1 < $root/patches/nginx-$main_ver-resolver_debug_log_overflow.patch || exit 1
|
||||
|
||||
echo applying poll_del_event_at_exit.patch ...
|
||||
patch -p1 < $root/patches/nginx-$main_ver-poll_del_event_at_exit.patch
|
||||
echo applying poll_del_event_at_exit.patch ...
|
||||
patch -p1 < $root/patches/nginx-$main_ver-poll_del_event_at_exit.patch
|
||||
fi
|
||||
|
||||
#echo "INFO: applying null-character-fixes patch"
|
||||
#patch -p0 < $root/patches/nginx-$main_ver-null_character_fixes.patch || exit 1
|
||||
|
41
util/ver-ge
Executable file
41
util/ver-ge
Executable file
@ -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";
|
||||
|
Reference in New Issue
Block a user