Skip to content

Commit 096978c

Browse files
authored
Set pip size function only on linux (#1994)
* Set pip size function only on linux * update testcase docker image version * update testcase docker image to ubuntu 22.04 * update testcase docker image to ubuntu 24.04 * fix depend lib * fix depend lib * fix testcase * use one thread complie luajit2 * testcase: change arm image * testcase: change arm image * testcae: change arm image * testcase: change arm image * testcase: change arm image
1 parent 5f8c760 commit 096978c

File tree

8 files changed

+28
-17
lines changed

8 files changed

+28
-17
lines changed

.github/workflows/ci-arm64.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
build-arm64:
10-
runs-on: "ubuntu-20.04"
10+
runs-on: "ubuntu-24.04"
1111
strategy:
1212
fail-fast: false
1313
matrix:
@@ -25,23 +25,23 @@ jobs:
2525
path: luajit2
2626

2727
- name: Compile with ${{ matrix.compiler.compiler }}
28-
uses: uraimo/run-on-arch-action@v2
28+
uses: uraimo/run-on-arch-action@v3
2929
with:
3030
arch: aarch64
31-
distro: ubuntu20.04
31+
distro: ubuntu24.04
3232
githubToken: ${{ github.token }}
3333
dockerRunArgs: |
3434
--volume "${PWD}:/tengine"
3535
install: |
3636
set -x
3737
apt-get update -q -y
38-
apt-get install -q -y make gcc g++ clang libgd-dev libgeoip-dev libxslt1-dev libpcre++0v5 libpcre++-dev liblua5.1-0-dev lua5.1 libperl-dev cpanminus libssl-dev file
38+
apt-get install -q -y make gcc g++ clang libgd-dev libgeoip-dev libxslt1-dev libpcre3 libpcre3-dev liblua5.1-0-dev lua5.1 libperl-dev cpanminus libssl-dev file
3939
run: |
4040
set -x
4141
cd /tengine
4242
echo "Build luajit2"
4343
cd luajit2
44-
make -j2
44+
make -j4
4545
make install
4646
cd ..
4747
echo "Build tengine"
@@ -85,6 +85,6 @@ jobs:
8585
--add-module=./modules/ngx_multi_upstream_module \
8686
--add-module=./modules/ngx_slab_stat \
8787
--without-http_upstream_keepalive_module
88-
make -j2
88+
make -j4
8989
make install
9090
file /usr/local/nginx/sbin/nginx | grep aarch64

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
build-and-test:
11-
runs-on: "ubuntu-20.04"
11+
runs-on: "ubuntu-24.04"
1212
strategy:
1313
fail-fast: false
1414
matrix:
@@ -21,7 +21,7 @@ jobs:
2121
run: |
2222
sudo apt update
2323
sudo apt remove nginx libgd3
24-
sudo apt install -y libgd-dev libgeoip-dev libxslt1-dev libpcre++0v5 libpcre++-dev liblua5.1-0-dev lua5.1 libperl-dev cpanminus libssl-dev
24+
sudo apt install -y libgd-dev libgeoip-dev libxslt1-dev libpcre3 libpcre3-dev liblua5.1-0-dev lua5.1 libperl-dev cpanminus libssl-dev
2525
- name: 'checkout luajit2'
2626
uses: actions/checkout@v3
2727
with:

.github/workflows/test-nginx-core.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
build-and-test:
11-
runs-on: "ubuntu-20.04"
11+
runs-on: "ubuntu-24.04"
1212
strategy:
1313
fail-fast: false
1414
matrix:
@@ -21,7 +21,7 @@ jobs:
2121
run: |
2222
sudo apt update
2323
sudo apt remove nginx libgd3
24-
sudo apt install -y libgd-dev libgeoip-dev libxslt1-dev libpcre++0v5 libpcre++-dev liblua5.1-0-dev lua5.1 libperl-dev cpanminus libssl-dev
24+
sudo apt install -y libgd-dev libgeoip-dev libxslt1-dev libpcre3 libpcre3-dev liblua5.1-0-dev lua5.1 libperl-dev cpanminus libssl-dev
2525
# for building nginx core
2626
sudo apt install -y libgoogle-perftools-dev
2727
# for running cases in nginx-tests

.github/workflows/test-ntls.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
build-and-test:
11-
runs-on: "ubuntu-20.04"
11+
runs-on: "ubuntu-24.04"
1212
strategy:
1313
fail-fast: false
1414
matrix:
@@ -19,6 +19,9 @@ jobs:
1919
- uses: actions/checkout@v3
2020
with:
2121
path: tengine
22+
- name: get dependencies
23+
run: |
24+
sudo apt install -y libpcre3 libpcre3-dev
2225
- name: 'checkout luajit2'
2326
uses: actions/checkout@v3
2427
with:

auto/modules

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1451,10 +1451,15 @@ cat << END >> $NGX_MODULES_C
14511451

14521452
END
14531453

1454+
case "$NGX_PLATFORM" in
1455+
Linux:*)
1456+
have=T_PIPE_SET_SIZE . auto/have
1457+
;;
1458+
esac
1459+
14541460
have=T_NGX_DNS_RESOLVE_BACKUP . auto/have
14551461
have=T_NGX_MASTER_ENV . auto/have
14561462
have=T_PIPES . auto/have
1457-
have=T_PIPE_SET_SIZE . auto/have
14581463
have=T_NGX_INPUT_BODY_FILTER . auto/have
14591464
have=T_NGX_GZIP_CLEAR_ETAG . auto/have
14601465
have=T_NGX_RESOLVER_FILE . auto/have

modules/ngx_http_lua_module/src/ngx_http_lua_headers_in.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -588,19 +588,20 @@ ngx_http_set_builtin_multi_header(ngx_http_request_t *r,
588588
{
589589
#if defined(nginx_version) && nginx_version >= 1023000
590590
ngx_table_elt_t **headers, **ph, *h;
591-
int nelts;
592591

593592
headers = (ngx_table_elt_t **) ((char *) &r->headers_in + hv->offset);
594593

595594
if (!hv->no_override && *headers != NULL) {
596-
nelts = 0;
595+
#if defined(DDEBUG) && (DDEBUG)
596+
int nelts = 0;
597+
597598
for (h = *headers; h; h = h->next) {
598599
nelts++;
599600
}
600601

601-
*headers = NULL;
602-
603602
dd("clear multi-value headers: %d", nelts);
603+
#endif
604+
*headers = NULL;
604605
}
605606

606607
if (ngx_http_set_header_helper(r, hv, value, &h) == NGX_ERROR) {

modules/ngx_multi_upstream_module/ngx_multi_upstream_module.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ typedef struct {
2828

2929
void *data_c;
3030

31-
ngx_flag_t connected:1;
31+
ngx_uint_t connected:1;
3232

3333
void *cur;
3434
} ngx_multi_connection_t;

tests/nginx-tests/nginx-tests/stream_status_variable.t

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ stream {
6767
listen 127.0.0.1:8084;
6868
proxy_pass example.com:$remote_port;
6969
access_log %%TESTDIR%%/500.log status;
70+
71+
proxy_connect_timeout 5;
7072
}
7173
7274
server {

0 commit comments

Comments
 (0)