add patches for freenginx #37
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ngx_hidden_signature_patch | |
on: ["push", "pull_request"] | |
jobs: | |
build_and_test: | |
strategy: | |
matrix: | |
ngx: ['1.23.1', '1.22.0', '1.20.2', '1.18.0', '1.16.1', '1.14.2'] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# Run build of the application | |
- name: Run build - nginx ${{ matrix.ngx }} | |
run: | | |
sudo apt update -y | |
sudo apt install gcc g++ make patch curl git libpcre3-dev zlib1g-dev -y | |
curl -ss -O https://nginx.org/download/nginx-${{ matrix.ngx }}.tar.gz | |
tar xvzf nginx-${{ matrix.ngx }}.tar.gz | |
cd nginx-${{ matrix.ngx }} | |
patch -p0 < ../nginx-1.14.x-1.17.x-ngx_http_header_filter_module.c.patch | |
patch -p0 < ../nginx-1.14.x-1.17.x-ngx_http_special_response.c.patch | |
patch -p0 < ../nginx-1.14.x-1.17.x-ngx_http_v2_filter_module.c.patch | |
./configure --prefix=/tmp/nginx/ ; make -j4 ; make install | |
sudo /tmp/nginx/sbin/nginx | |
CK_HEADER=$(curl -ss -I http://localhost/hello | fgrep -i nginx | wc -l) | |
if [ "$CK_HEADER" -eq "1" ]; then | |
exit 1 | |
fi | |
CK_ERRBODY=$(curl -ss http://localhost/hello | fgrep -i nginx | wc -l) | |
if [ "$CK_ERRBODY" -eq "1" ]; then | |
exit 1 | |
fi |