%global nginx_user nginx %global njs_version 1.0.2 Summary: High-performance HTTP server and reverse proxy Name: nginx # Currently on "stable" version of nginx from https://nginx.org/en/download.html. # Note: Stable versions are even (1.20), mainline versions are odd (1.21) Version: 1.30.6 Release: 1%{?dist} License: BSD-2-Clause Vendor: Microsoft Corporation Distribution: Azure Linux Group: Applications/System URL: https://nginx.org/ Source0: https://nginx.org/download/%{name}-%{version}.tar.gz Source1: nginx.service Source2: https://github.com/nginx/njs/archive/refs/tags/%{njs_version}.tar.gz#/%{name}-njs-%{njs_version}.tar.gz %if 0%{?with_check} Source3: nginx-tests.tgz %endif Patch1: 0001-remove-Werror-in-upstream-build-scripts.patch Patch2: 0002-fix-PIDFile-handling.patch Patch3: 0003-Add-SSL-passphrase-dialog.patch Patch4: 0004-Disable-ENGINE-support.patch Patch5: 0005-Compile-perl-module-with-O2.patch BuildRequires: libxml2-devel BuildRequires: libxslt-devel BuildRequires: openssl-devel %if 0%{?with_check} BuildRequires: perl-FindBin BuildRequires: perl-Test-Harness BuildRequires: perl-lib BuildRequires: perl-App-cpanminus %endif BuildRequires: pcre2-devel BuildRequires: readline-devel BuildRequires: which BuildRequires: zlib-devel Requires: %{name}-filesystem = %{version}-%{release} Requires: %{name}-mimetypes %description NGINX is a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server. %package filesystem Summary: The basic directory layout for the Nginx server BuildArch: noarch Requires(pre): shadow-utils %description filesystem The nginx-filesystem package contains the basic directory layout for the Nginx server including the correct permissions for the directories. %package otel_ngx_module License: Apache-2.0 Summary: OpenTelemetry Nginx Module BuildRequires: grpc-devel BuildRequires: opentelemetry-cpp-devel BuildRequires: protobuf-devel Requires: opentelemetry-cpp %description otel_ngx_module The OpenTelemetry module for Nginx %prep %autosetup -N %autopatch -p1 mkdir -p ../nginx-njs tar -C ../nginx-njs -xf %{SOURCE2} pushd ../nginx-njs/njs-%{njs_version} popd %build sh configure \ --add-module=../nginx-njs/njs-%{njs_version}/nginx \ --conf-path=%{_sysconfdir}/nginx/nginx.conf \ --error-log-path=%{_var}/log/nginx/error.log \ --group=%{nginx_user} \ --http-log-path=%{_var}/log/nginx/access.log \ --lock-path=%{_var}/run/nginx.lock \ --pid-path=%{_var}/run/nginx.pid \ --prefix=%{_sysconfdir}/nginx \ --sbin-path=%{_sbindir}/nginx \ --user=%{nginx_user} \ --with-stream_ssl_module \ --with-http_auth_request_module \ --with-http_dav_module \ --with-http_gunzip_module \ --with-http_gzip_static_module \ --with-http_realip_module \ --with-http_ssl_module \ --with-http_stub_status_module \ --with-http_sub_module \ --with-http_v2_module \ --with-ipv6 \ --with-stream \ --with-compat \ --with-stream_ssl_preread_module %make_build %install %make_install install -vdm755 %{buildroot}%{_libdir}/systemd/system install -vdm755 %{buildroot}%{_var}/log install -vdm755 %{buildroot}%{_var}/opt/nginx/log ln -sfv %{_var}/opt/nginx/log %{buildroot}%{_var}/log/nginx install -p -m 0644 %{SOURCE1} %{buildroot}%{_libdir}/systemd/system/nginx.service # Using the ones provided through the "nginx-mimetype" package. rm -f %{buildroot}%{_sysconfdir}/%{name}/mime.types %pre filesystem getent group %{nginx_user} > /dev/null || groupadd -r %{nginx_user} getent passwd %{nginx_user} > /dev/null || \ useradd -r -d %{_localstatedir}/lib/nginx -g %{nginx_user} \ -s /sbin/nologin -c "Nginx web server" %{nginx_user} exit 0 %if 0%{?with_check} %check cpanm Test::Simple@1.302199 --force cpanm Time::HiRes cd %{buildroot} cp -r usr/sbin/* /usr/sbin/ cp -r var/opt/* /var/opt/ cp -r var/log/* /var/log/ cp -r usr/lib/debug/usr/sbin/* /usr/lib/debug/sbin/ cp -r usr/lib/systemd/* /usr/lib/systemd/ cp -r etc/* /etc/ cp /etc/nginx/mime.types.default /etc/nginx/mime.types useradd -s /usr/bin/sh %{nginx_user} tar -xvf %{SOURCE3} cd nginx-tests su nginx -s /bin/sh -c 'TEST_NGINX_BINARY=%{_sbindir}/nginx prove ./*.t' cd .. rm -rf nginx-tests %endif %files %defattr(-,root,root) %license LICENSE %config(noreplace) %{_sysconfdir}/%{name}/fastcgi.conf %config(noreplace) %{_sysconfdir}/%{name}/fastcgi.conf.default %config(noreplace) %{_sysconfdir}/%{name}/fastcgi_params %config(noreplace) %{_sysconfdir}/%{name}/fastcgi_params.default %config(noreplace) %{_sysconfdir}/%{name}/koi-utf %config(noreplace) %{_sysconfdir}/%{name}/koi-win %config(noreplace) %{_sysconfdir}/%{name}/mime.types.default %config(noreplace) %{_sysconfdir}/%{name}/nginx.conf %config(noreplace) %{_sysconfdir}/%{name}/nginx.conf.default %config(noreplace) %{_sysconfdir}/%{name}/scgi_params %config(noreplace) %{_sysconfdir}/%{name}/scgi_params.default %config(noreplace) %{_sysconfdir}/%{name}/uwsgi_params %config(noreplace) %{_sysconfdir}/%{name}/uwsgi_params.default %{_sysconfdir}/%{name}/html/* %{_sysconfdir}/%{name}/win-utf %{_sbindir}/* %{_libdir}/systemd/system/nginx.service %dir %{_var}/opt/nginx/log %{_var}/log/nginx %files filesystem %dir %{_sysconfdir}/%{name} %changelog * Wed Oct 14 2026 CBL-Mariner Servicing Account - 1.30.6-1 - Auto-upgrade to 1.30.6 - for CVE-2026-15176, CVE-2026-93479, CVE-2026-95101, CVE-2026-97629, CVE-2026-97205 - Upgrade njs to 1.0.2 for CVE-2026-101025, CVE-2026-101019 * Tue Sep 08 2026 Aditya Singh - 1.30.4-1 - Upgrade to version 1.30.4 and njs to version 1.0.1 - This upgrade fixes below CVEs, therefore removed patch files for them - CVE-2026-40460, CVE-2026-40701, CVE-2026-42934, CVE-2026-42945, CVE-2026-42946 CVE-2026-9256, CVE-2026-49975, CVE-2026-48142, CVE-2026-42055, CVE-2026-56434 CVE-2026-42533, CVE-2026-8711 - This upgrade also fixes below new CVEs - CVE-2026-78669, CVE-2026-78222, CVE-2026-18329 * Mon Jul 20 2026 Azure Linux Security Servicing Account - 1.28.3-8 - Patch for CVE-2026-56434 and CVE-2026-42533 * Tue Jun 30 2026 Azure Linux Security Servicing Account - 1.28.3-7 - Patch for CVE-2026-42055 * Sat Jun 27 2026 Azure Linux Security Servicing Account - 1.28.3-6 - Patch for CVE-2026-48142 * Fri Jun 05 2026 Akhila Guruju - 1.28.3-5 - Patch for CVE-2026-49975 * Wed May 27 2026 Azure Linux Security Servicing Account - 1.28.3-4 - Patch for CVE-2026-9256 * Mon May 25 2026 Azure Linux Security Servicing Account - 1.28.3-3 - Patch for CVE-2026-8711 * Fri May 15 2026 Azure Linux Security Servicing Account - 1.28.3-2 - Patch for CVE-2026-42946, CVE-2026-42945, CVE-2026-42934, CVE-2026-40701, CVE-2026-40460 * Thu Mar 26 2026 CBL-Mariner Servicing Account - 1.28.3-1 - Auto-upgrade to 1.28.3 - for CVE-2026-27654, CVE-2026-27784, CVE-2026-32647, CVE-2026-27651, CVE-2026-28753, CVE-2026-28755 * Tue Feb 10 2026 Akarsh Chaudhary - 1.28.2-1 - Upgrade to version 1.28.2 (fixes CVE-2026-1642). * Thu Oct 23 2025 Sandeep Karambelkar - 1.28.0-1 - Upgrade to 1.28.0 Upstream Stable Version * Tue Sep 09 2025 Mayank Singh - 1.25.4-6 - Enable stream ssl preread module * Tue Aug 19 2025 Azure Linux Security Servicing Account - 1.25.4-5 - Patch for CVE-2025-53859 * Tue Mar 11 2025 Sandeep Karambelkar - 1.25.4-4 - Enable webdav module - Added tests to verify nginx server and its supported modules * Mon Feb 10 2025 Mitch Zhu - 1.25.4-3 - Fix CVE-2025-23419 * Tue Aug 20 2024 Cameron Baird - 1.25.4-2 - Fix CVE-2024-7347 * Wed Mar 20 2024 Betty Lakes - 1.25.4-1 - Upgrade to 1.25.4, upgrade njs to 0.8.3 - Move from pcre to pcre2 * Fri Oct 27 2023 CBL-Mariner Servicing Account - 1.25.2-1 - Auto-upgrade to 1.25.2 - Azure Linux 3.0 - package upgrades * Thu Oct 05 2023 Dan Streetman - 1.22.1-11 - Fix CVE-2023-44487 * Wed Sep 20 2023 Jon Slobodzian - 1.22.1-10 - Recompile with stack-protection fixed gcc version (CVE-2023-4039) * Thu Aug 17 2023 Muhammad Falak R Wani - 1.22.1-9 - Add otel_ngx_module subpackage * Thu Aug 10 2023 Muhammad Falak R Wani - 1.22.1-8 - Configure with `--with-stream_ssl_module` to enable support for stream proxy server with SSL/TLS * Mon Jul 31 2023 Muhammad Falak R Wani - 1.22.1-7 - Configure with `--with-compat` to enable dynamic modules compatibility * Wed Jul 12 2023 Pete Birley - 1.22.1-6 - Enable building with http_gunzip_module * Mon Apr 17 2023 Olivia Crain - 1.22.1-5 - Upgrade bundled njs version to 0.7.12 to fix CVE-2020-19692, CVE-2020-19695 - Use SPDX expression in license tag * Tue Apr 04 2023 Mandeep Plaha - 1.22.1-4 - Enable building with ngx_http_gzip_static_module * Mon Mar 27 2023 Mandeep Plaha - 1.22.1-3 - Enable building with ngx_http_realip_module * Wed Nov 30 2022 Jon Slobodzian - 1.22.1-2 - Enable http2 support * Fri Oct 28 2022 Cameron Baird - 1.22.1-1 - Move to stable release * Tue Oct 25 2022 CBL-Mariner Servicing Account - 1.23.2-1 - Upgrade to 1.23.2 (fixes CVE-2022-41741 and CVE-2022-41742) * Tue Apr 19 2022 Max Brodeur-Urbas - 1.20.2-2 - Addressing CVE-2021-3618. * Wed Feb 23 2022 Max Brodeur-Urbas - 1.20.2-1 - Upgrading to latest version 1.20.2 from "stable" branch. * Wed Oct 13 2021 Pawel Winogrodzki - 1.20.1-2 - Split out "nginx-filesystem" using Fedora 34 spec (license: MIT) as guidance. - Removing conflicts with "nginx-mimetypes" over "mime.types". - Fixed changelog history to include version update. * Fri Jun 11 2021 Henry Beberman - 1.20.1-1 - Update to version 1.20.1 to resolve CVE-2021-23017 * Fri Apr 02 2021 Thomas Crain - 1.16.1-4 - Merge the following releases from 1.0 to dev branch - lihl@microsoft.com, 1.16.1-3: Used autosetup, Added patch to resolve CVE-2019-20372 - nicolasg@microsoft.com, 1.16.1-4: nopatch for CVE-2009-4487 * Wed Feb 10 2021 Henry Li - 1.16.1-3 - Add Provides for nginx-filesystem from nginx * Sat May 09 2020 Nick Samson - 1.16.1-2 - Added %%license line automatically * Fri Mar 13 2020 Paul Monson - 1.16.1-1 - Update to version 1.16.1. License verified. * Tue Sep 03 2019 Mateusz Malisz - 1.15.3-5 - Initial CBL-Mariner import from Photon (license: Apache2). * Fri Mar 15 2019 Keerthana K - 1.15.3-4 - Enable http_stub_status_module. * Wed Nov 07 2018 Ajay Kaher - 1.15.3-3 - mark config files as non replaceable on upgrade. * Mon Sep 17 2018 Keerthana K - 1.15.3-2 - Adding http_auth_request_module and http_sub_module. * Fri Sep 7 2018 Him Kalyan Bordoloi - 1.15.3-1 - Upgrade to version 1.15.3 * Fri Jul 20 2018 Keerthana K - 1.13.8-3 - Restarting nginx on failure. * Fri Jun 08 2018 Dheeraj Shetty - 1.13.8-2 - adding module njs. * Fri May 18 2018 Srivatsa S. Bhat - 1.13.8-1 - Update to version 1.13.8 to support nginx-ingress * Thu Dec 28 2017 Divya Thaluru - 1.13.5-2 - Fixed the log file directory structure * Wed Oct 04 2017 Xiaolin Li - 1.13.5-1 - Update to version 1.13.5 * Mon May 01 2017 Dheeraj Shetty - 1.11.13-2 - adding module stream to nginx. * Wed Apr 05 2017 Priyesh Padmavilasom - 1.11.13-1 - update to 1.11.13 * Fri Nov 18 2016 Anish Swaminathan - 1.10.0-5 - Add patch for CVE-2016-4450 * Wed Jul 27 2016 Divya Thaluru - 1.10.0-4 - Removed packaging of debug files * Fri Jul 8 2016 Divya Thaluru - 1.10.0-3 - Modified default pid filepath and fixed nginx systemd service * Tue May 24 2016 Priyesh Padmavilasom - 1.10.0-2 - GA - Bump release of all rpms * Mon May 16 2016 Xiaolin Li - 1.10.0-1 - Initial build. First version