From c66ab720ba98699e815a51e1e8de83b50174e4b4 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Tue, 18 Oct 2022 17:23:08 +0200 Subject: [PATCH 01/18] Update GitHub Actions --- .github/workflows/blank.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 6a6934a..d25b79d 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -19,17 +19,17 @@ jobs: sudo apt update -qq sudo apt install libgd-dev -y - name: Mainline build - run: sudo bash nginx-build.sh || cat /tmp/nginx-ee.log + run: sudo bash nginx-build.sh || cat /tmp/nginx-ee.log; sudo nginx -V - name: Stable build - run: sudo bash nginx-build.sh --stable + run: sudo bash nginx-build.sh --stable || cat /tmp/nginx-ee.log; sudo nginx -V - name: Full build - run: sudo bash nginx-build.sh --full --stable + run: sudo bash nginx-build.sh --full --stable || cat /tmp/nginx-ee.log; sudo nginx -V - name: libressl build - run: sudo bash nginx-build.sh --libressl + run: sudo bash nginx-build.sh --libressl || cat /tmp/nginx-ee.log; sudo nginx -V - name: pagespeed beta build - run: sudo bash nginx-build.sh --pagespeed-beta + run: sudo bash nginx-build.sh --pagespeed-beta || cat /tmp/nginx-ee.log; sudo nginx -V - name: openssl-dev build - run: sudo bash nginx-build.sh --openssl-dev + run: sudo bash nginx-build.sh --openssl-dev || cat /tmp/nginx-ee.log; sudo nginx -V - name: dynamic build - run: sudo bash nginx-build.sh --dynamic + run: sudo bash nginx-build.sh --dynamic || cat /tmp/nginx-ee.log; sudo nginx -V From e7b054bef3eba5ddde6db6a89b95b44b9c182656 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Tue, 18 Oct 2022 17:26:03 +0200 Subject: [PATCH 02/18] Update GitHub actions --- .github/workflows/blank.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index d25b79d..cf2280c 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -15,9 +15,9 @@ jobs: - name: Prepare VM run: | sudo apt update -qq - sudo add-apt-repository ppa:ondrej/php -y - sudo apt update -qq - sudo apt install libgd-dev -y + sudo LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php -y > /dev/null 2>&1 + sudo apt-get purge --option=Dpkg::options::=--force-all --assume-yes graphviz* redis* php* mysql* nginx* > /dev/null 2>&1 + sudo apt-get -qq autoremove --purge > /dev/null 2>&1 - name: Mainline build run: sudo bash nginx-build.sh || cat /tmp/nginx-ee.log; sudo nginx -V - name: Stable build From 1c84bc52d3bcb65859aacc086902b4c19089fd74 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Tue, 18 Oct 2022 17:29:20 +0200 Subject: [PATCH 03/18] Fix GitHub actions --- .github/workflows/blank.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index cf2280c..a5b29fe 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -14,8 +14,10 @@ jobs: - uses: actions/checkout@v3 - name: Prepare VM run: | - sudo apt update -qq + unset LANG + sudo apt update -qq > /dev/null 2>&1 sudo LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php -y > /dev/null 2>&1 + sudo rm -rf /etc/mysql /var/lib/mysql sudo apt-get purge --option=Dpkg::options::=--force-all --assume-yes graphviz* redis* php* mysql* nginx* > /dev/null 2>&1 sudo apt-get -qq autoremove --purge > /dev/null 2>&1 - name: Mainline build From 7139211a7bb7f54790363abc824c7d7377ddccc7 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Tue, 18 Oct 2022 17:40:02 +0200 Subject: [PATCH 04/18] Fix apt-get --- .github/workflows/blank.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index a5b29fe..8a182c4 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -15,7 +15,7 @@ jobs: - name: Prepare VM run: | unset LANG - sudo apt update -qq > /dev/null 2>&1 + sudo apt-get update -qq > /dev/null 2>&1 sudo LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php -y > /dev/null 2>&1 sudo rm -rf /etc/mysql /var/lib/mysql sudo apt-get purge --option=Dpkg::options::=--force-all --assume-yes graphviz* redis* php* mysql* nginx* > /dev/null 2>&1 From 3ceb8a8a45565e0ed4a82b429f342914de564335 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Tue, 18 Oct 2022 17:47:15 +0200 Subject: [PATCH 05/18] Update blank.yml --- .github/workflows/blank.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 8a182c4..441576e 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -8,10 +8,10 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-20.04, ubuntu-18.04] + os: [ubuntu-20.04, ubuntu-22.04] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v2 - name: Prepare VM run: | unset LANG From 9943d2a6cb9deca8efb5346a4c6cdd56838f2e06 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Tue, 18 Oct 2022 17:49:09 +0200 Subject: [PATCH 06/18] Update blank.yml --- .github/workflows/blank.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 441576e..f94e2b4 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -14,7 +14,6 @@ jobs: - uses: actions/checkout@v2 - name: Prepare VM run: | - unset LANG sudo apt-get update -qq > /dev/null 2>&1 sudo LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php -y > /dev/null 2>&1 sudo rm -rf /etc/mysql /var/lib/mysql From b36ddcddebd908f93d0cd0423bcb732850b01622 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Tue, 18 Oct 2022 18:11:22 +0200 Subject: [PATCH 07/18] Just remove dependencies --- nginx-build.sh | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/nginx-build.sh b/nginx-build.sh index cb65ef0..36bce47 100755 --- a/nginx-build.sh +++ b/nginx-build.sh @@ -577,37 +577,6 @@ _gcc_ubuntu_setup() { } -_dependencies_repo() { - { - curl -sL https://build.opensuse.org/projects/home:virtubox:nginx-ee/public_key | apt-key add - - if [ ! -f /etc/apt/sources.list.d/nginx-ee.list ]; then - if [ "$DISTRO_ID" = "Ubuntu" ]; then - if [ "$DISTRO_CODENAME" = "xenial" ]; then - add-apt-repository ppa:virtubox/brotli -yu - fi - echo "deb http://download.opensuse.org/repositories/home:/virtubox:/nginx-ee/xUbuntu_${DISTRO_NUMBER}/ /" >/etc/apt/sources.list.d/nginx-ee.list - - elif [ "$DISTRO_ID" = "Debian" ]; then - if [ "$DISTRO_CODENAME" = "jessie" ]; then - echo 'deb http://download.opensuse.org/repositories/home:/virtubox:/nginx-ee/Debian_8.0/ /' >/etc/apt/sources.list.d/nginx-ee.list - elif [ "$DISTRO_CODENAME" = "strech" ]; then - echo 'deb http://download.opensuse.org/repositories/home:/virtubox:/nginx-ee/Debian_9.0/ /' >/etc/apt/sources.list.d/nginx-ee.list - else - echo 'deb http://download.opensuse.org/repositories/home:/virtubox:/nginx-ee/Debian_10/ /' >/etc/apt/sources.list.d/nginx-ee.list - fi - else - if [ "$DISTRO_CODENAME" = "strech" ]; then - echo 'deb http://download.opensuse.org/repositories/home:/virtubox:/nginx-ee/Raspbian_9.0/ /' >/etc/apt/sources.list.d/nginx-ee.list - else - echo 'deb http://download.opensuse.org/repositories/home:/virtubox:/nginx-ee/Raspbian_10/ /' >/etc/apt/sources.list.d/nginx-ee.list - fi - fi - - fi - apt-get update -qq - } >>/tmp/nginx-ee.log 2>&1 -} - ################################## # Install ffmpeg for rtmp module ################################## @@ -1253,7 +1222,7 @@ _final_tasks() { # Main Setup ################################## -_install_dependencies +apt-get update -qq > /dev/null 2>&1 if [ "$NGINX_FROM_SCRATCH" = "1" ]; then if [ "$NOCONF" != "y" ]; then _nginx_from_scratch_setup From 3b1131094e67849ff1561ad81b3308c6eed0a34b Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Tue, 18 Oct 2022 18:15:21 +0200 Subject: [PATCH 08/18] Update blank.yml --- .github/workflows/blank.yml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index f94e2b4..727d310 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -14,23 +14,25 @@ jobs: - uses: actions/checkout@v2 - name: Prepare VM run: | - sudo apt-get update -qq > /dev/null 2>&1 - sudo LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php -y > /dev/null 2>&1 + sudo apt-get update -qq + sudo LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php -y sudo rm -rf /etc/mysql /var/lib/mysql - sudo apt-get purge --option=Dpkg::options::=--force-all --assume-yes graphviz* redis* php* mysql* nginx* > /dev/null 2>&1 - sudo apt-get -qq autoremove --purge > /dev/null 2>&1 + sudo apt-get purge --option=Dpkg::options::=--force-all --assume-yes graphviz* redis* php* mysql* nginx* + sudo apt-get -qq autoremove --purge - name: Mainline build - run: sudo bash nginx-build.sh || cat /tmp/nginx-ee.log; sudo nginx -V + run: sudo bash nginx-build.sh || cat /tmp/nginx-ee.log + - name : Nginx check + run: sudo nginx -V - name: Stable build - run: sudo bash nginx-build.sh --stable || cat /tmp/nginx-ee.log; sudo nginx -V + run: sudo bash nginx-build.sh --stable || cat /tmp/nginx-ee.log - name: Full build - run: sudo bash nginx-build.sh --full --stable || cat /tmp/nginx-ee.log; sudo nginx -V + run: sudo bash nginx-build.sh --full --stable || cat /tmp/nginx-ee.log - name: libressl build - run: sudo bash nginx-build.sh --libressl || cat /tmp/nginx-ee.log; sudo nginx -V + run: sudo bash nginx-build.sh --libressl || cat /tmp/nginx-ee.log - name: pagespeed beta build - run: sudo bash nginx-build.sh --pagespeed-beta || cat /tmp/nginx-ee.log; sudo nginx -V + run: sudo bash nginx-build.sh --pagespeed-beta || cat /tmp/nginx-ee.log - name: openssl-dev build - run: sudo bash nginx-build.sh --openssl-dev || cat /tmp/nginx-ee.log; sudo nginx -V + run: sudo bash nginx-build.sh --openssl-dev || cat /tmp/nginx-ee.log - name: dynamic build - run: sudo bash nginx-build.sh --dynamic || cat /tmp/nginx-ee.log; sudo nginx -V + run: sudo bash nginx-build.sh --dynamic || cat /tmp/nginx-ee.log From e0c18591d29095d7407802bbbb9d594af111eee2 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Tue, 18 Oct 2022 18:17:13 +0200 Subject: [PATCH 09/18] Update blank.yml --- .github/workflows/blank.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 727d310..e676d62 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -17,7 +17,7 @@ jobs: sudo apt-get update -qq sudo LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php -y sudo rm -rf /etc/mysql /var/lib/mysql - sudo apt-get purge --option=Dpkg::options::=--force-all --assume-yes graphviz* redis* php* mysql* nginx* + sudo apt-get purge --option=Dpkg::options::=--force-all --assume-yes graphviz* redis* php* mysql* nginx sudo apt-get -qq autoremove --purge - name: Mainline build run: sudo bash nginx-build.sh || cat /tmp/nginx-ee.log From 798d0ef599eec5b65a60116090a515b0b1b530da Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Tue, 18 Oct 2022 18:11:22 +0200 Subject: [PATCH 10/18] Revert "Just remove dependencies" This reverts commit b36ddcddebd908f93d0cd0423bcb732850b01622. --- nginx-build.sh | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/nginx-build.sh b/nginx-build.sh index 36bce47..cb65ef0 100755 --- a/nginx-build.sh +++ b/nginx-build.sh @@ -577,6 +577,37 @@ _gcc_ubuntu_setup() { } +_dependencies_repo() { + { + curl -sL https://build.opensuse.org/projects/home:virtubox:nginx-ee/public_key | apt-key add - + if [ ! -f /etc/apt/sources.list.d/nginx-ee.list ]; then + if [ "$DISTRO_ID" = "Ubuntu" ]; then + if [ "$DISTRO_CODENAME" = "xenial" ]; then + add-apt-repository ppa:virtubox/brotli -yu + fi + echo "deb http://download.opensuse.org/repositories/home:/virtubox:/nginx-ee/xUbuntu_${DISTRO_NUMBER}/ /" >/etc/apt/sources.list.d/nginx-ee.list + + elif [ "$DISTRO_ID" = "Debian" ]; then + if [ "$DISTRO_CODENAME" = "jessie" ]; then + echo 'deb http://download.opensuse.org/repositories/home:/virtubox:/nginx-ee/Debian_8.0/ /' >/etc/apt/sources.list.d/nginx-ee.list + elif [ "$DISTRO_CODENAME" = "strech" ]; then + echo 'deb http://download.opensuse.org/repositories/home:/virtubox:/nginx-ee/Debian_9.0/ /' >/etc/apt/sources.list.d/nginx-ee.list + else + echo 'deb http://download.opensuse.org/repositories/home:/virtubox:/nginx-ee/Debian_10/ /' >/etc/apt/sources.list.d/nginx-ee.list + fi + else + if [ "$DISTRO_CODENAME" = "strech" ]; then + echo 'deb http://download.opensuse.org/repositories/home:/virtubox:/nginx-ee/Raspbian_9.0/ /' >/etc/apt/sources.list.d/nginx-ee.list + else + echo 'deb http://download.opensuse.org/repositories/home:/virtubox:/nginx-ee/Raspbian_10/ /' >/etc/apt/sources.list.d/nginx-ee.list + fi + fi + + fi + apt-get update -qq + } >>/tmp/nginx-ee.log 2>&1 +} + ################################## # Install ffmpeg for rtmp module ################################## @@ -1222,7 +1253,7 @@ _final_tasks() { # Main Setup ################################## -apt-get update -qq > /dev/null 2>&1 +_install_dependencies if [ "$NGINX_FROM_SCRATCH" = "1" ]; then if [ "$NOCONF" != "y" ]; then _nginx_from_scratch_setup From b51dd329b4c72424c570c4fa65b1a24f2a11dc65 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Wed, 19 Oct 2022 13:22:32 +0200 Subject: [PATCH 11/18] Fix GitHub actions --- .github/workflows/blank.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index e676d62..b6cd028 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -5,10 +5,7 @@ on: [push] jobs: build: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-20.04, ubuntu-22.04] + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 @@ -16,8 +13,8 @@ jobs: run: | sudo apt-get update -qq sudo LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php -y - sudo rm -rf /etc/mysql /var/lib/mysql - sudo apt-get purge --option=Dpkg::options::=--force-all --assume-yes graphviz* redis* php* mysql* nginx + sudo rm -rf /etc/mysql /var/lib/mysql /etc/nginx + sudo apt-get purge --option=Dpkg::options::=--force-all --assume-yes graphviz* redis* mysql* nginx sudo apt-get -qq autoremove --purge - name: Mainline build run: sudo bash nginx-build.sh || cat /tmp/nginx-ee.log @@ -25,14 +22,18 @@ jobs: run: sudo nginx -V - name: Stable build run: sudo bash nginx-build.sh --stable || cat /tmp/nginx-ee.log + - name : Nginx check + run: sudo nginx -V - name: Full build run: sudo bash nginx-build.sh --full --stable || cat /tmp/nginx-ee.log + - name : Nginx check + run: sudo nginx -V - name: libressl build run: sudo bash nginx-build.sh --libressl || cat /tmp/nginx-ee.log + - name : Nginx check + run: sudo nginx -V - name: pagespeed beta build run: sudo bash nginx-build.sh --pagespeed-beta || cat /tmp/nginx-ee.log - - name: openssl-dev build - run: sudo bash nginx-build.sh --openssl-dev || cat /tmp/nginx-ee.log - name: dynamic build run: sudo bash nginx-build.sh --dynamic || cat /tmp/nginx-ee.log From 823178cc751f52342864ee838683af36eb4de4b1 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Wed, 19 Oct 2022 13:26:02 +0200 Subject: [PATCH 12/18] Remove unused repo and cleanup code --- README.md | 10 ++---- nginx-build.sh | 90 ++++++++++++-------------------------------------- 2 files changed, 23 insertions(+), 77 deletions(-) diff --git a/README.md b/README.md index 477431a..0196401 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ Automated Nginx compilation from sources with additional modules support * Dynamic modules support * Brotli Support * TLS v1.3 support (Final) -* OpenSSL (1.1.1g or 3.0.0-dev or from system-lib) or LibreSSL +* OpenSSL or LibreSSL * Cloudflare HPACK * Cloudflare zlib * Automated nginx updates cronjob @@ -104,12 +104,8 @@ Optional modules : #### Also compatible -* Ubuntu 19.10 (Eoan) -* Ubuntu 16.04 LTS (Xenial) -* Debian 9 (Stretch) -* Debian 8 (Jessie) -* Raspbian 9 (Stretch) * Raspbian 10 (Buster) +* Raspbian 11 (Bullseye) ### Applications @@ -183,8 +179,6 @@ Optional third-party modules : * `--naxsi` : compile nginx with naxsi * `--rtmp` : compile nginx with rtmp module * `--libressl` : compile nginx with LibreSSL instead of OpenSSL -* `--openssl-dev` : compile nginx with OpenSSL 3.0.0-dev -* `--openssl-system` : compile nginx with OpenSSL system lib Extras : diff --git a/nginx-build.sh b/nginx-build.sh index cb65ef0..20ee149 100755 --- a/nginx-build.sh +++ b/nginx-build.sh @@ -7,7 +7,7 @@ # Copyright (c) 2019-2020 VirtuBox # This script is licensed under M.I.T # ------------------------------------------------------------------------- -# Version 3.7.0 - 2022-03-14 +# Version 3.7.0 - 2022-10-18 # ------------------------------------------------------------------------- ################################## @@ -82,12 +82,6 @@ else --naxsi) NAXSI="y" ;; - --openssl-dev) - OPENSSL_LIB="2" - ;; - --openssl-system) - OPENSSL_LIB="3" - ;; --libressl) LIBRESSL="y" ;; @@ -157,14 +151,18 @@ NGINX_EE_VER=$(curl -m 5 --retry 3 -sL https://api.github.com/repos/VirtuBox/ngi NGINX_MAINLINE="$(curl -sL https://nginx.org/en/download.html 2>&1 | grep -E -o 'nginx\-[0-9.]+\.tar[.a-z]*' | awk -F "nginx-" '/.tar.gz$/ {print $2}' | sed -e 's|.tar.gz||g' | head -n 1 2>&1)" NGINX_STABLE="$(curl -sL https://nginx.org/en/download.html 2>&1 | grep -E -o 'nginx\-[0-9.]+\.tar[.a-z]*' | awk -F "nginx-" '/.tar.gz$/ {print $2}' | sed -e 's|.tar.gz||g' | head -n 2 | grep 1.22 2>&1)" LIBRESSL_VER="3.1.4" -OPENSSL_VER="1.1.1g" +if command_exists openssl; then + OPENSSL_BIN_VER=$(openssl version) + OPENSSL_VER=${OPENSSL_BIN_VER:0:15} +else + OPENSSL_VER="From system" +fi TLS13_CIPHERS="TLS13+AESGCM+AES256:TLS13+AESGCM+AES128:TLS13+CHACHA20:EECDH+CHACHA20:EECDH+AESGCM:EECDH+AES" readonly OS_ARCH="$(uname -m)" OS_DISTRO_FULL="$(lsb_release -ds)" readonly DISTRO_ID="$(lsb_release -si)" readonly DISTRO_CODENAME="$(lsb_release -sc)" readonly DISTRO_NUMBER="$(lsb_release -sr)" -OPENSSL_COMMIT="7fa8bcfe4342df41919f5564b315f9c85d0a02d6" # Colors CSI='\033[' @@ -233,13 +231,7 @@ if [ "$INTERACTIVE_SETUP" = "1" ]; then echo -e "Select an option [1-2]: " && read -r SSL_LIB_CHOICE done if [ "$SSL_LIB_CHOICE" = "1" ]; then - echo -e '\nWhat OpenSSL release do you want ?\n' - echo -e " [1] OpenSSL stable $OPENSSL_VER\n" - echo -e ' [2] OpenSSL dev 3.0.0-dev\n' - echo -e ' [3] OpenSSL from system lib\n' - while [[ "$OPENSSL_LIB" != "1" && "$OPENSSL_LIB" != "2" && "$OPENSSL_LIB" != "3" ]]; do - echo -e "Select an option [1-2-3]: " && read -r OPENSSL_LIB - done + OPENSSL_LIB=3 else LIBRESSL="y" fi @@ -314,19 +306,10 @@ else OPENSSL_OPT="enable-tls1_3" fi fi - if [ "$OPENSSL_LIB" = "2" ]; then - NGX_SSL_LIB="--with-openssl=../openssl" - OPENSSL_VALID="3.0.0-dev" - LIBSSL_DEV="" - elif [ "$OPENSSL_LIB" = "3" ]; then - NGX_SSL_LIB="" - OPENSSL_VALID="from system" - LIBSSL_DEV="libssl-dev" - else - NGX_SSL_LIB="" - OPENSSL_VALID="$OPENSSL_VER Stable" - LIBSSL_DEV="libssl-dev" - fi + NGX_SSL_LIB="" + OPENSSL_VALID="from system" + LIBSSL_DEV="libssl-dev" + fi ################################## @@ -376,7 +359,7 @@ echo " Detected Arch : $OS_ARCH" echo "" echo -e " - Nginx release : $NGINX_VER" [ -n "$OPENSSL_VALID" ] && { - echo -e " - OPENSSL : $OPENSSL_VALID" + echo -e " - OPENSSL : $OPENSSL_VER" } [ -n "$LIBRESSL_VALID" ] && { echo -e " - LIBRESSL : $LIBRESSL_VALID" @@ -403,13 +386,13 @@ echo "" _gitget() { REPO="$1" repodir=$(echo "$REPO" | awk -F "/" '{print $2}') - if [ -d /usr/local/src/${repodir}/.git ]; then - git -C /usr/local/src/${repodir} pull & + if [ -d "/usr/local/src/${repodir}/.git" ]; then + git -C "/usr/local/src/${repodir}" pull & else - if [ -d /usr/local/src/${repodir} ]; then - rm -rf /usr/local/src/${repodir} + if [ -d "/usr/local/src/${repodir}" ]; then + rm -rf "/usr/local/src/${repodir}" fi - git clone --depth 1 https://github.com/${REPO}.git /usr/local/src/${repodir} & + git clone --depth 1 "https://github.com/${REPO}.git" "/usr/local/src/${repodir}" & fi } @@ -422,7 +405,7 @@ _install_dependencies() { libgd-dev dpkg-dev libgeoip-dev libjemalloc-dev \ libbz2-1.0 libreadline-dev libbz2-dev libbz2-ocaml libbz2-ocaml-dev software-properties-common tar \ libgoogle-perftools-dev perl libperl-dev libpam0g-dev libbsd-dev gnupg gnupg2 \ - libgmp-dev autotools-dev libxml2-dev libpcre3-dev uuid-dev libbrotli-dev "$LIBSSL_DEV" --ignore-hold + libgmp-dev autotools-dev libxml2-dev libpcre3-dev uuid-dev libbrotli-dev libpcre2-dev "$LIBSSL_DEV" } >>/tmp/nginx-ee.log 2>&1; then echo -ne " Installing dependencies [${CGREEN}OK${CEND}]\\r" echo -ne '\n' @@ -577,37 +560,6 @@ _gcc_ubuntu_setup() { } -_dependencies_repo() { - { - curl -sL https://build.opensuse.org/projects/home:virtubox:nginx-ee/public_key | apt-key add - - if [ ! -f /etc/apt/sources.list.d/nginx-ee.list ]; then - if [ "$DISTRO_ID" = "Ubuntu" ]; then - if [ "$DISTRO_CODENAME" = "xenial" ]; then - add-apt-repository ppa:virtubox/brotli -yu - fi - echo "deb http://download.opensuse.org/repositories/home:/virtubox:/nginx-ee/xUbuntu_${DISTRO_NUMBER}/ /" >/etc/apt/sources.list.d/nginx-ee.list - - elif [ "$DISTRO_ID" = "Debian" ]; then - if [ "$DISTRO_CODENAME" = "jessie" ]; then - echo 'deb http://download.opensuse.org/repositories/home:/virtubox:/nginx-ee/Debian_8.0/ /' >/etc/apt/sources.list.d/nginx-ee.list - elif [ "$DISTRO_CODENAME" = "strech" ]; then - echo 'deb http://download.opensuse.org/repositories/home:/virtubox:/nginx-ee/Debian_9.0/ /' >/etc/apt/sources.list.d/nginx-ee.list - else - echo 'deb http://download.opensuse.org/repositories/home:/virtubox:/nginx-ee/Debian_10/ /' >/etc/apt/sources.list.d/nginx-ee.list - fi - else - if [ "$DISTRO_CODENAME" = "strech" ]; then - echo 'deb http://download.opensuse.org/repositories/home:/virtubox:/nginx-ee/Raspbian_9.0/ /' >/etc/apt/sources.list.d/nginx-ee.list - else - echo 'deb http://download.opensuse.org/repositories/home:/virtubox:/nginx-ee/Raspbian_10/ /' >/etc/apt/sources.list.d/nginx-ee.list - fi - fi - - fi - apt-get update -qq - } >>/tmp/nginx-ee.log 2>&1 -} - ################################## # Install ffmpeg for rtmp module ################################## @@ -917,8 +869,8 @@ _download_nginx() { { rm -rf /usr/local/src/nginx - curl -sL http://nginx.org/download/nginx-${NGINX_VER}.tar.gz | /bin/tar xzf - -C "$DIR_SRC" - mv /usr/local/src/nginx-${NGINX_VER} /usr/local/src/nginx + curl -sL "http://nginx.org/download/nginx-${NGINX_VER}.tar.gz" | /bin/tar xzf - -C "$DIR_SRC" + mv "/usr/local/src/nginx-${NGINX_VER}" /usr/local/src/nginx } >>/tmp/nginx-ee.log 2>&1 }; then From 92a8332e61219d151ed2326bb3484b8890baedd0 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Wed, 19 Oct 2022 13:27:32 +0200 Subject: [PATCH 13/18] Bump Libressl version --- nginx-build.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nginx-build.sh b/nginx-build.sh index 20ee149..893501e 100755 --- a/nginx-build.sh +++ b/nginx-build.sh @@ -150,7 +150,7 @@ DIR_SRC="/usr/local/src" NGINX_EE_VER=$(curl -m 5 --retry 3 -sL https://api.github.com/repos/VirtuBox/nginx-ee/releases/latest 2>&1 | jq -r '.tag_name') NGINX_MAINLINE="$(curl -sL https://nginx.org/en/download.html 2>&1 | grep -E -o 'nginx\-[0-9.]+\.tar[.a-z]*' | awk -F "nginx-" '/.tar.gz$/ {print $2}' | sed -e 's|.tar.gz||g' | head -n 1 2>&1)" NGINX_STABLE="$(curl -sL https://nginx.org/en/download.html 2>&1 | grep -E -o 'nginx\-[0-9.]+\.tar[.a-z]*' | awk -F "nginx-" '/.tar.gz$/ {print $2}' | sed -e 's|.tar.gz||g' | head -n 2 | grep 1.22 2>&1)" -LIBRESSL_VER="3.1.4" +LIBRESSL_VER="3.5.3" if command_exists openssl; then OPENSSL_BIN_VER=$(openssl version) OPENSSL_VER=${OPENSSL_BIN_VER:0:15} @@ -162,7 +162,6 @@ readonly OS_ARCH="$(uname -m)" OS_DISTRO_FULL="$(lsb_release -ds)" readonly DISTRO_ID="$(lsb_release -si)" readonly DISTRO_CODENAME="$(lsb_release -sc)" -readonly DISTRO_NUMBER="$(lsb_release -sr)" # Colors CSI='\033[' From a4ade581388a82dd57eabac2516ac0c1e322558b Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Wed, 19 Oct 2022 13:39:36 +0200 Subject: [PATCH 14/18] Add naxsi mainline check --- .github/workflows/blank.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index b6cd028..6a9c807 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -24,10 +24,14 @@ jobs: run: sudo bash nginx-build.sh --stable || cat /tmp/nginx-ee.log - name : Nginx check run: sudo nginx -V - - name: Full build + - name: Full build stable run: sudo bash nginx-build.sh --full --stable || cat /tmp/nginx-ee.log - name : Nginx check run: sudo nginx -V + - name: Mainline naxsi + run: sudo bash nginx-build.sh --naxsi || cat /tmp/nginx-ee.log + - name : Nginx check + run: sudo nginx -V - name: libressl build run: sudo bash nginx-build.sh --libressl || cat /tmp/nginx-ee.log - name : Nginx check From c311fae5dab62fa94d9d64c98143f5cf6062d8ef Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Wed, 19 Oct 2022 14:59:24 +0200 Subject: [PATCH 15/18] Update Readme --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 0196401..8e81406 100644 --- a/README.md +++ b/README.md @@ -175,7 +175,6 @@ Nginx build options : Optional third-party modules : * `--pagespeed`: compile nginx with ngx_pagespeed latest-stable -* `--pagespeed-beta`: compile nginx with ngx_pagespeed latest-beta * `--naxsi` : compile nginx with naxsi * `--rtmp` : compile nginx with rtmp module * `--libressl` : compile nginx with LibreSSL instead of OpenSSL From ac42669ef024c176729de8834e478fda86572bbd Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Wed, 19 Oct 2022 15:05:09 +0200 Subject: [PATCH 16/18] Update GitHub page --- docs/index.md | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/docs/index.md b/docs/index.md index 4b2f575..b63705a 100644 --- a/docs/index.md +++ b/docs/index.md @@ -44,7 +44,7 @@ Automated Nginx compilation from sources with additional modules support
  • Dynamic modules support
  • Brotli Support
  • TLS v1.3 support (Final)
  • -
  • OpenSSL (1.1.1g or 3.0.0-dev or from system-lib) or LibreSSL
  • +
  • OpenSSL or LibreSSL
  • Cloudflare HPACK
  • Cloudflare zlib
  • Automated nginx updates cronjob
  • @@ -53,8 +53,8 @@ Automated Nginx compilation from sources with additional modules support

    Additional Third-party modules

    -

    Nginx current mainline release : v1.19.2 -Nginx current stable release : v1.18.0

    +

    Nginx current mainline release : v1.23.1 +Nginx current stable release : v1.22.0

    • ngx_cache_purge
    • headers-more-nginx-module
    • @@ -86,19 +86,15 @@ Nginx current stable release : v1.18.0

      Operating System

        +
      • Ubuntu 22.04 LTS (Jammy)
      • Ubuntu 20.04 LTS (Focal)
      • Ubuntu 18.04 LTS (Bionic)
      • +
      • Debian 11 (Bullseye)
      • Debian 10 (Buster)

      Also compatible

        -
      • Ubuntu 19.10 (Eoan)
      • -
      • Ubuntu 19.04 (Disco)
      • -
      • Ubuntu 18.10 (Cosmic)
      • -
      • Ubuntu 16.04 LTS (Xenial)
      • -
      • Debian 9 (Stretch)
      • -
      • Debian 8 (Jessie)
      • -
      • Raspbian 9 (Stretch)
      • +
      • Raspbian 11 (Bullseye)
      • Raspbian 10 (Buster)

      Applications

      @@ -120,7 +116,7 @@ Nginx current stable release : v1.18.0

      Default settings :

      • mainline release
      • -
      • openssl stable : 1.1.1g
      • +
      • openssl from system lib
      • without pagespeed
      • without naxsi
      • without rtmp
      • @@ -150,12 +146,9 @@ sudo bash nginx-build.sh

        Optional third-party modules :

        • --pagespeed: compile nginx with ngx_pagespeed latest-stable
        • -
        • --pagespeed-beta: compile nginx with ngx_pagespeed latest-beta
        • --naxsi : compile nginx with naxsi
        • --rtmp : compile nginx with rtmp module
        • --libressl : compile nginx with LibreSSL instead of OpenSSL
        • -
        • --openssl-dev : compile nginx with OpenSSL 3.0.0-dev
        • -
        • --openssl-system : compile nginx with OpenSSL system lib

        Extras :

          From aa84f6bc791de56fb3256460fed9f80e19e01487 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Wed, 19 Oct 2022 15:37:30 +0200 Subject: [PATCH 17/18] Update Nginx release numbers --- README.md | 4 ++-- docs/index.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8e81406..38c7770 100644 --- a/README.md +++ b/README.md @@ -60,8 +60,8 @@ Automated Nginx compilation from sources with additional modules support ## Additional Third-party modules -Nginx current mainline release : **v1.23.1** -Nginx current stable release : **v1.22.0** +Nginx current mainline release : **v1.23.2** +Nginx current stable release : **v1.22.1** * [ngx_cache_purge](https://github.com/FRiCKLE/ngx_cache_purge) * [headers-more-nginx-module](https://github.com/openresty/headers-more-nginx-module) diff --git a/docs/index.md b/docs/index.md index b63705a..be6aed3 100644 --- a/docs/index.md +++ b/docs/index.md @@ -53,8 +53,8 @@ Automated Nginx compilation from sources with additional modules support

        Additional Third-party modules

        -

        Nginx current mainline release : v1.23.1 -Nginx current stable release : v1.22.0

        +

        Nginx current mainline release : v1.23.2 +Nginx current stable release : v1.22.1

        • ngx_cache_purge
        • headers-more-nginx-module
        • From e724383153fbaa0a5c50d65c44198616a70e3e90 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Wed, 19 Oct 2022 15:56:57 +0200 Subject: [PATCH 18/18] Remove pagespeed-beta from Actions --- .github/workflows/blank.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 6a9c807..56e123d 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -36,8 +36,8 @@ jobs: run: sudo bash nginx-build.sh --libressl || cat /tmp/nginx-ee.log - name : Nginx check run: sudo nginx -V - - name: pagespeed beta build - run: sudo bash nginx-build.sh --pagespeed-beta || cat /tmp/nginx-ee.log + - name: pagespeed mainline build + run: sudo bash nginx-build.sh --pagespeed || cat /tmp/nginx-ee.log - name: dynamic build run: sudo bash nginx-build.sh --dynamic || cat /tmp/nginx-ee.log