2023-04-18 00:38:43 +08:00
|
|
|
%global nginx_user nginx
|
|
|
|
%global njs_version 0.7.12
|
2023-08-23 09:35:05 +08:00
|
|
|
%global opentelemetry_cpp_contrib_git_commit 37e4466d882cbddff6f607a20fe327060de76166
|
2021-10-14 14:31:16 +08:00
|
|
|
|
2020-08-07 11:17:52 +08:00
|
|
|
Summary: High-performance HTTP server and reverse proxy
|
|
|
|
Name: nginx
|
2022-02-25 02:36:57 +08:00
|
|
|
# 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)
|
2022-10-29 07:49:05 +08:00
|
|
|
Version: 1.22.1
|
2024-08-29 02:18:55 +08:00
|
|
|
Release: 12%{?dist}
|
2023-04-18 00:38:43 +08:00
|
|
|
License: BSD-2-Clause
|
2020-08-07 11:17:52 +08:00
|
|
|
Vendor: Microsoft Corporation
|
|
|
|
Distribution: Mariner
|
2021-02-13 09:01:13 +08:00
|
|
|
Group: Applications/System
|
|
|
|
URL: https://nginx.org/
|
2020-08-07 11:17:52 +08:00
|
|
|
Source0: https://nginx.org/download/%{name}-%{version}.tar.gz
|
|
|
|
Source1: nginx.service
|
2023-04-18 00:38:43 +08:00
|
|
|
Source2: https://github.com/nginx/njs/archive/refs/tags/%{njs_version}.tar.gz#/%{name}-njs-%{njs_version}.tar.gz
|
2023-08-23 09:35:05 +08:00
|
|
|
Source3: https://github.com/open-telemetry/opentelemetry-cpp-contrib/archive/%{opentelemetry_cpp_contrib_git_commit}.tar.gz#/opentelemetry-cpp-contrib-%{opentelemetry_cpp_contrib_git_commit}.tar.gz
|
2023-10-13 05:22:26 +08:00
|
|
|
Patch0: CVE-2023-44487.patch
|
2024-08-29 02:18:55 +08:00
|
|
|
Patch1: CVE-2024-7347.patch
|
2023-04-18 00:38:43 +08:00
|
|
|
BuildRequires: libxml2-devel
|
|
|
|
BuildRequires: libxslt-devel
|
2020-08-07 11:17:52 +08:00
|
|
|
BuildRequires: openssl-devel
|
|
|
|
BuildRequires: pcre-devel
|
2023-04-18 00:38:43 +08:00
|
|
|
BuildRequires: pcre2-devel
|
|
|
|
BuildRequires: readline-devel
|
2020-08-07 11:17:52 +08:00
|
|
|
BuildRequires: which
|
2023-04-18 00:38:43 +08:00
|
|
|
BuildRequires: zlib-devel
|
2021-10-14 14:31:16 +08:00
|
|
|
Requires: %{name}-filesystem = %{version}-%{release}
|
|
|
|
Requires: %{name}-mimetypes
|
2021-02-13 09:01:13 +08:00
|
|
|
|
2020-08-07 11:17:52 +08:00
|
|
|
%description
|
|
|
|
NGINX is a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server.
|
|
|
|
|
2021-10-14 14:31:16 +08:00
|
|
|
%package filesystem
|
2022-02-25 02:36:57 +08:00
|
|
|
Summary: The basic directory layout for the Nginx server
|
|
|
|
BuildArch: noarch
|
|
|
|
Requires(pre): shadow-utils
|
2021-10-14 14:31:16 +08:00
|
|
|
|
|
|
|
%description filesystem
|
|
|
|
The nginx-filesystem package contains the basic directory layout
|
|
|
|
for the Nginx server including the correct permissions for the
|
|
|
|
directories.
|
|
|
|
|
2023-08-23 09:35:05 +08:00
|
|
|
%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
|
|
|
|
|
2020-08-07 11:17:52 +08:00
|
|
|
%prep
|
2020-10-29 01:59:41 +08:00
|
|
|
%autosetup -p1
|
2020-08-07 11:17:52 +08:00
|
|
|
pushd ../
|
|
|
|
mkdir nginx-njs
|
|
|
|
tar -C nginx-njs -xf %{SOURCE2}
|
2023-08-23 09:35:05 +08:00
|
|
|
mkdir otel-cpp-contrib
|
|
|
|
tar -C otel-cpp-contrib -xf %{SOURCE3}
|
|
|
|
# The following change is a build break in upstream and a PR has been raised to fix it.
|
|
|
|
# PR: https://github.com/open-telemetry/opentelemetry-cpp-contrib/pull/314
|
|
|
|
sed -i \
|
|
|
|
'/\#include <opentelemetry\/sdk\/trace\/processor.h>$/a \#include <opentelemetry\/sdk\/trace\/batch_span_processor_options.h>' \
|
|
|
|
otel-cpp-contrib/opentelemetry-cpp-contrib-%{opentelemetry_cpp_contrib_git_commit}/instrumentation/nginx/src/otel_ngx_module.cpp
|
2020-08-07 11:17:52 +08:00
|
|
|
popd
|
|
|
|
|
|
|
|
%build
|
|
|
|
sh configure \
|
2023-04-18 00:38:43 +08:00
|
|
|
--add-module=../nginx-njs/njs-%{njs_version}/nginx \
|
2023-08-23 09:35:05 +08:00
|
|
|
--add-dynamic-module=../otel-cpp-contrib/opentelemetry-cpp-contrib-%{opentelemetry_cpp_contrib_git_commit}/instrumentation/nginx \
|
2021-10-14 14:31:16 +08:00
|
|
|
--conf-path=%{_sysconfdir}/nginx/nginx.conf \
|
2021-02-13 09:01:13 +08:00
|
|
|
--error-log-path=%{_var}/log/nginx/error.log \
|
2021-10-14 14:31:16 +08:00
|
|
|
--group=%{nginx_user} \
|
2021-02-13 09:01:13 +08:00
|
|
|
--http-log-path=%{_var}/log/nginx/access.log \
|
2021-10-14 14:31:16 +08:00
|
|
|
--lock-path=%{_var}/run/nginx.lock \
|
|
|
|
--pid-path=%{_var}/run/nginx.pid \
|
|
|
|
--prefix=%{_sysconfdir}/nginx \
|
|
|
|
--sbin-path=%{_sbindir}/nginx \
|
|
|
|
--user=%{nginx_user} \
|
2023-08-14 11:58:27 +08:00
|
|
|
--with-stream_ssl_module \
|
2020-08-07 11:17:52 +08:00
|
|
|
--with-http_auth_request_module \
|
2023-07-15 00:57:12 +08:00
|
|
|
--with-http_gunzip_module \
|
2023-04-05 03:42:42 +08:00
|
|
|
--with-http_gzip_static_module \
|
2023-03-28 04:01:40 +08:00
|
|
|
--with-http_realip_module \
|
2021-10-14 14:31:16 +08:00
|
|
|
--with-http_ssl_module \
|
|
|
|
--with-http_stub_status_module \
|
2020-08-07 11:17:52 +08:00
|
|
|
--with-http_sub_module \
|
2022-12-01 13:53:14 +08:00
|
|
|
--with-http_v2_module \
|
2021-10-14 14:31:16 +08:00
|
|
|
--with-ipv6 \
|
|
|
|
--with-pcre \
|
2023-08-04 12:24:32 +08:00
|
|
|
--with-stream \
|
|
|
|
--with-compat
|
2020-08-07 11:17:52 +08:00
|
|
|
|
2023-04-18 00:38:43 +08:00
|
|
|
%make_build
|
2021-02-13 09:01:13 +08:00
|
|
|
|
2020-08-07 11:17:52 +08:00
|
|
|
%install
|
2023-04-18 00:38:43 +08:00
|
|
|
%make_install
|
2021-02-13 09:01:13 +08:00
|
|
|
install -vdm755 %{buildroot}%{_libdir}/systemd/system
|
2020-08-07 11:17:52 +08:00
|
|
|
install -vdm755 %{buildroot}%{_var}/log
|
|
|
|
install -vdm755 %{buildroot}%{_var}/opt/nginx/log
|
|
|
|
ln -sfv %{_var}/opt/nginx/log %{buildroot}%{_var}/log/nginx
|
2021-02-13 09:01:13 +08:00
|
|
|
install -p -m 0644 %{SOURCE1} %{buildroot}%{_libdir}/systemd/system/nginx.service
|
2020-08-07 11:17:52 +08:00
|
|
|
|
2021-10-14 14:31:16 +08:00
|
|
|
# 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
|
|
|
|
|
2020-08-07 11:17:52 +08:00
|
|
|
%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/*
|
2023-08-23 09:35:05 +08:00
|
|
|
%{_sysconfdir}/%{name}/win-utf
|
2020-08-07 11:17:52 +08:00
|
|
|
%{_sbindir}/*
|
|
|
|
%{_libdir}/systemd/system/nginx.service
|
|
|
|
%dir %{_var}/opt/nginx/log
|
|
|
|
%{_var}/log/nginx
|
|
|
|
|
2021-10-14 14:31:16 +08:00
|
|
|
%files filesystem
|
|
|
|
%dir %{_sysconfdir}/%{name}
|
|
|
|
|
2023-08-23 09:35:05 +08:00
|
|
|
%files otel_ngx_module
|
|
|
|
%license ../otel-cpp-contrib/opentelemetry-cpp-contrib-%{opentelemetry_cpp_contrib_git_commit}/LICENSE
|
|
|
|
%{_sysconfdir}/%{name}/modules/otel_ngx_module.so
|
|
|
|
|
2020-08-07 11:17:52 +08:00
|
|
|
%changelog
|
2024-08-29 02:18:55 +08:00
|
|
|
* Tue Aug 20 2024 Cameron Baird <cameronbaird@microsoft.com> - 1.22.1-12
|
|
|
|
- Fix CVE-2024-7347
|
|
|
|
|
2023-10-13 05:22:26 +08:00
|
|
|
* Thu Oct 05 2023 Dan Streetman <ddstreet@ieee.org> - 1.22.1-11
|
|
|
|
- Fix CVE-2023-44487
|
|
|
|
|
2023-09-22 05:10:15 +08:00
|
|
|
* Wed Sep 20 2023 Jon Slobodzian <joslobo@microsoft.com> - 1.22.1-10
|
|
|
|
- Recompile with stack-protection fixed gcc version (CVE-2023-4039)
|
|
|
|
|
2023-08-23 09:35:05 +08:00
|
|
|
* Thu Aug 17 2023 Muhammad Falak R Wani <mwani@microsoft.com> - 1.22.1-9
|
|
|
|
- Add otel_ngx_module subpackage
|
|
|
|
|
2023-08-14 11:58:27 +08:00
|
|
|
* Thu Aug 10 2023 Muhammad Falak R Wani <mwani@microsoft.com> - 1.22.1-8
|
|
|
|
- Configure with `--with-stream_ssl_module` to enable support for stream proxy server with SSL/TLS
|
|
|
|
|
2023-08-04 12:24:32 +08:00
|
|
|
* Mon Jul 31 2023 Muhammad Falak R Wani <mwani@microsoft.com> - 1.22.1-7
|
|
|
|
- Configure with `--with-compat` to enable dynamic modules compatibility
|
|
|
|
|
2023-07-15 00:57:12 +08:00
|
|
|
* Wed Jul 12 2023 Pete Birley <petebirley@microsoft.com> - 1.22.1-6
|
|
|
|
- Enable building with http_gunzip_module
|
|
|
|
|
2023-04-18 00:38:43 +08:00
|
|
|
* Mon Apr 17 2023 Olivia Crain <oliviacrain@microsoft.com> - 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
|
|
|
|
|
2023-04-05 03:42:42 +08:00
|
|
|
* Tue Apr 04 2023 Mandeep Plaha <mandeepplaha@microsoft.com> - 1.22.1-4
|
|
|
|
- Enable building with ngx_http_gzip_static_module
|
|
|
|
|
2023-03-28 04:01:40 +08:00
|
|
|
* Mon Mar 27 2023 Mandeep Plaha <mandeepplaha@microsoft.com> - 1.22.1-3
|
|
|
|
- Enable building with ngx_http_realip_module
|
|
|
|
|
2022-12-01 13:53:14 +08:00
|
|
|
* Wed Nov 30 2022 Jon Slobodzian <joslobo@microsoft.com> - 1.22.1-2
|
|
|
|
- Enable http2 support
|
|
|
|
|
2022-10-29 07:49:05 +08:00
|
|
|
* Fri Oct 28 2022 Cameron Baird <cameronbaird@microsoft.com> - 1.22.1-1
|
|
|
|
- Move to stable release
|
|
|
|
|
2022-10-27 03:37:20 +08:00
|
|
|
* Tue Oct 25 2022 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 1.23.2-1
|
2022-10-29 07:49:05 +08:00
|
|
|
- Upgrade to 1.23.2 (fixes CVE-2022-41741 and CVE-2022-41742)
|
2022-10-27 03:37:20 +08:00
|
|
|
|
2022-04-26 07:38:03 +08:00
|
|
|
* Tue Apr 19 2022 Max Brodeur-Urbas <maxbr@microsoft.com> - 1.20.2-2
|
|
|
|
- Addressing CVE-2021-3618.
|
|
|
|
|
2022-02-25 02:36:57 +08:00
|
|
|
* Wed Feb 23 2022 Max Brodeur-Urbas <maxbr@microsoft.com> - 1.20.2-1
|
|
|
|
- Upgrading to latest version 1.20.2 from "stable" branch.
|
|
|
|
|
2021-10-14 14:31:16 +08:00
|
|
|
* Wed Oct 13 2021 Pawel Winogrodzki <pawelwi@microsoft.com> - 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 <henry.beberman@microsoft.com> - 1.20.1-1
|
|
|
|
- Update to version 1.20.1 to resolve CVE-2021-23017
|
|
|
|
|
2021-04-07 11:39:22 +08:00
|
|
|
* Fri Apr 02 2021 Thomas Crain <thcrain@microsoft.com> - 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
|
2020-11-18 04:40:54 +08:00
|
|
|
|
2021-02-13 09:01:13 +08:00
|
|
|
* Wed Feb 10 2021 Henry Li <lihl@microsoft.com> - 1.16.1-3
|
|
|
|
- Add Provides for nginx-filesystem from nginx
|
|
|
|
|
2021-08-20 04:46:51 +08:00
|
|
|
* Sat May 09 2020 Nick Samson <nisamson@microsoft.com> - 1.16.1-2
|
|
|
|
- Added %%license line automatically
|
2020-08-07 11:17:52 +08:00
|
|
|
|
2021-10-14 14:31:16 +08:00
|
|
|
* Fri Mar 13 2020 Paul Monson <paulmon@microsoft.com> - 1.16.1-1
|
|
|
|
- Update to version 1.16.1. License verified.
|
2021-02-13 09:01:13 +08:00
|
|
|
|
2021-10-14 14:31:16 +08:00
|
|
|
* Tue Sep 03 2019 Mateusz Malisz <mamalisz@microsoft.com> - 1.15.3-5
|
|
|
|
- Initial CBL-Mariner import from Photon (license: Apache2).
|
2021-02-13 09:01:13 +08:00
|
|
|
|
2021-10-14 14:31:16 +08:00
|
|
|
* Fri Mar 15 2019 Keerthana K <keerthanak@vmware.com> - 1.15.3-4
|
|
|
|
- Enable http_stub_status_module.
|
2021-02-13 09:01:13 +08:00
|
|
|
|
2021-10-14 14:31:16 +08:00
|
|
|
* Wed Nov 07 2018 Ajay Kaher <akaher@vmware.com> - 1.15.3-3
|
|
|
|
- mark config files as non replaceable on upgrade.
|
2021-02-13 09:01:13 +08:00
|
|
|
|
2021-10-14 14:31:16 +08:00
|
|
|
* Mon Sep 17 2018 Keerthana K <keerthanak@vmware.com> - 1.15.3-2
|
|
|
|
- Adding http_auth_request_module and http_sub_module.
|
2021-02-13 09:01:13 +08:00
|
|
|
|
2021-10-14 14:31:16 +08:00
|
|
|
* Fri Sep 7 2018 Him Kalyan Bordoloi <bordoloih@vmware.com> - 1.15.3-1
|
|
|
|
- Upgrade to version 1.15.3
|
2021-02-13 09:01:13 +08:00
|
|
|
|
2021-10-14 14:31:16 +08:00
|
|
|
* Fri Jul 20 2018 Keerthana K <keerthanak@vmware.com> - 1.13.8-3
|
|
|
|
- Restarting nginx on failure.
|
2021-02-13 09:01:13 +08:00
|
|
|
|
2021-10-14 14:31:16 +08:00
|
|
|
* Fri Jun 08 2018 Dheeraj Shetty <dheerajs@vmware.com> - 1.13.8-2
|
|
|
|
- adding module njs.
|
2021-02-13 09:01:13 +08:00
|
|
|
|
2021-10-14 14:31:16 +08:00
|
|
|
* Fri May 18 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> - 1.13.8-1
|
|
|
|
- Update to version 1.13.8 to support nginx-ingress
|
2021-02-13 09:01:13 +08:00
|
|
|
|
2021-10-14 14:31:16 +08:00
|
|
|
* Thu Dec 28 2017 Divya Thaluru <dthaluru@vmware.com> - 1.13.5-2
|
|
|
|
- Fixed the log file directory structure
|
2021-02-13 09:01:13 +08:00
|
|
|
|
2021-10-14 14:31:16 +08:00
|
|
|
* Wed Oct 04 2017 Xiaolin Li <xiaolinl@vmware.com> - 1.13.5-1
|
|
|
|
- Update to version 1.13.5
|
2021-02-13 09:01:13 +08:00
|
|
|
|
2021-10-14 14:31:16 +08:00
|
|
|
* Mon May 01 2017 Dheeraj Shetty <dheerajs@vmware.com> - 1.11.13-2
|
|
|
|
- adding module stream to nginx.
|
2021-02-13 09:01:13 +08:00
|
|
|
|
2021-10-14 14:31:16 +08:00
|
|
|
* Wed Apr 05 2017 Priyesh Padmavilasom <ppadmavilasom@vmware.com> - 1.11.13-1
|
|
|
|
- update to 1.11.13
|
2021-02-13 09:01:13 +08:00
|
|
|
|
2021-10-14 14:31:16 +08:00
|
|
|
* Fri Nov 18 2016 Anish Swaminathan <anishs@vmware.com> - 1.10.0-5
|
|
|
|
- Add patch for CVE-2016-4450
|
2021-02-13 09:01:13 +08:00
|
|
|
|
2021-10-14 14:31:16 +08:00
|
|
|
* Wed Jul 27 2016 Divya Thaluru <dthaluru@vmware.com> - 1.10.0-4
|
|
|
|
- Removed packaging of debug files
|
2021-02-13 09:01:13 +08:00
|
|
|
|
2021-10-14 14:31:16 +08:00
|
|
|
* Fri Jul 8 2016 Divya Thaluru <dthaluru@vmware.com> - 1.10.0-3
|
|
|
|
- Modified default pid filepath and fixed nginx systemd service
|
2021-02-13 09:01:13 +08:00
|
|
|
|
2021-10-14 14:31:16 +08:00
|
|
|
* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> - 1.10.0-2
|
|
|
|
- GA - Bump release of all rpms
|
2021-02-13 09:01:13 +08:00
|
|
|
|
2021-10-14 14:31:16 +08:00
|
|
|
* Mon May 16 2016 Xiaolin Li <xiaolinl@vmware.com> - 1.10.0-1
|
|
|
|
- Initial build. First version
|