%global _hardened_build 1 %global angie_user angie # Disable strict symbol checks in the link editor. # See: https://src.fedoraproject.org/rpms/redhat-rpm-config/c/078af19 %undefine _strict_symbol_defs_build %if 0%{?fedora} || 0%{?epel} == 8 %bcond_without geoip %else %bcond_with geoip %endif # gperftools support should be disabled for RHEL >= 8 # see: https://bugzilla.redhat.com/show_bug.cgi?id=1931402 %if 0%{?rhel} >= 8 %global with_gperftools 0 %else # gperftools exists only on selected arches # gperftools *detection* is failing on ppc64*, possibly only configure # bug, but disable anyway. %ifnarch s390 s390x ppc64 ppc64le %global with_gperftools 1 %endif %endif %global with_aio 1 %if 0%{?fedora} > 40 || 0%{?rhel} > 9 %bcond_with engine %else %bcond_without engine %endif # kTLS requires OpenSSL 3.0 (default in F36+ and EL9+, available in EPEL8) %if 0%{?fedora} >= 36 || 0%{?rhel} >= 9 || 0%{?epel} >= 8 %global with_ktls 1 %endif # Build against OpenSSL 3 on EL8 %if 0%{?epel} == 8 %global openssl_pkgversion 3 %endif %global angie_abiversion %{version} %global angie_moduledir %{_libdir}/angie/modules %global angie_moduleconfdir %{_datadir}/angie/modules %global angie_srcdir %{_usrsrc}/%{name}-%{version}-%{release} # Perl module is still called "nginx"; keep it out of the system perl # paths so it does not conflict with nginx-mod-http-perl. %global angie_perldir %{_libdir}/angie/perl # Do not generate provides/requires from angie sources, and do not let the # private perl module provide perl(nginx) %global __provides_exclude_from ^(%{angie_srcdir}|%{angie_perldir})/.*$ %global __requires_exclude_from ^%{angie_srcdir}/.*$ Name: angie Version: 1.12.4 Release: 1%{?dist} Summary: Efficient, powerful and scalable web server, nginx fork License: BSD-2-Clause URL: https://angie.software Source0: https://download.angie.software/files/angie-%{version}.tar.gz Source1: https://download.angie.software/files/angie-%{version}.tar.gz.asc Source2: https://angie.software/keys/angie-signing.gpg.asc Source10: angie.service Source11: angie.logrotate Source12: angie.conf Source13: angie-upgrade Source15: macros.angiemods.in Source16: angiemods.attr Source18: angie@.service Source19: angie.sysusers Source20: angie.tmpfiles Source200: README.dynamic Source220: instance.conf # removes -Werror in upstream build scripts. -Werror conflicts with # -D_FORTIFY_SOURCE=2 causing warnings to turn into errors. Patch0: 0001-remove-Werror-in-upstream-build-scripts.patch # downstream patch (from Fedora nginx) - Disable ENGINE support by default # for F41+ Patch1: 0002-Disable-ENGINE-support.patch # downstream patch (from Fedora nginx) - Compile perl module with O2 Patch2: 0003-Compile-perl-module-with-O2.patch BuildRequires: make BuildRequires: gcc %if 0%{?fedora} > 42 BuildRequires: openpgpverify %else BuildRequires: gnupg2 %endif %if 0%{?with_gperftools} BuildRequires: gperftools-devel %endif BuildRequires: libxcrypt-devel BuildRequires: openssl%{?openssl_pkgversion}-devel BuildRequires: pcre2-devel BuildRequires: perl-podlators %if 0%{?fedora} || 0%{?rhel} >= 10 || 0%{?epel} >= 9 BuildRequires: zlib-ng-devel %else BuildRequires: zlib-devel %endif Requires: angie-filesystem = %{version}-%{release} Provides: webserver Recommends: logrotate Requires: %{name}-core = %{version}-%{release} BuildRequires: systemd BuildRequires: systemd-rpm-macros %{?systemd_requires} %description Angie is an efficient, powerful, and scalable web server that was forked from nginx. It is a web server and a reverse proxy server for HTTP, SMTP, POP3 and IMAP protocols, with a strong focus on high concurrency, performance and low memory usage. Compared to nginx it adds a built-in ACME client, a REST API with Prometheus metrics, active upstream health probes, dynamic upstream configuration via Docker labels and other features. %package core Summary: Angie minimal core Requires: openssl%{?openssl_pkgversion}-libs Requires(pre): angie-filesystem # For external angie modules Provides: angie(abi) = %{angie_abiversion} %description core Angie minimal core. %package all-modules Summary: A meta package that installs all available Angie modules BuildArch: noarch %if %{with geoip} Requires: angie-mod-http-geoip = %{version}-%{release} Requires: angie-mod-stream-geoip = %{version}-%{release} %endif Requires: angie-mod-http-image-filter = %{version}-%{release} Requires: angie-mod-http-perl = %{version}-%{release} Requires: angie-mod-http-xslt-filter = %{version}-%{release} Requires: angie-mod-mail = %{version}-%{release} Requires: angie-mod-stream = %{version}-%{release} %description all-modules Meta package that installs all available Angie modules. %package filesystem Summary: The basic directory layout for the Angie server BuildArch: noarch # RHEL 9 compat, remove after RHEL 9 EOL %{?sysusers_requires_compat} %description filesystem The angie-filesystem package contains the basic directory layout for the Angie server including the correct permissions for the directories. %if %{with geoip} %package mod-http-geoip Summary: Angie HTTP geoip module BuildRequires: GeoIP-devel Requires: angie(abi) = %{angie_abiversion} %description mod-http-geoip %{summary}. %package mod-stream-geoip Summary: Angie stream geoip module BuildRequires: GeoIP-devel Requires: angie(abi) = %{angie_abiversion} Requires: angie-mod-stream = %{version}-%{release} %description mod-stream-geoip %{summary}. %endif %package mod-http-image-filter Summary: Angie HTTP image filter module BuildRequires: gd-devel Requires: angie(abi) = %{angie_abiversion} Requires: gd %description mod-http-image-filter %{summary}. %package mod-http-perl Summary: Angie HTTP perl module BuildRequires: perl-devel BuildRequires: perl-generators BuildRequires: perl(ExtUtils::Embed) Requires: angie(abi) = %{angie_abiversion} Requires: perl(constant) %description mod-http-perl %{summary}. %package mod-http-xslt-filter Summary: Angie XSLT module BuildRequires: libxslt-devel Requires: angie(abi) = %{angie_abiversion} %description mod-http-xslt-filter %{summary}. %package mod-mail Summary: Angie mail modules Requires: angie(abi) = %{angie_abiversion} %description mod-mail %{summary}. %package mod-stream Summary: Angie stream modules Requires: angie(abi) = %{angie_abiversion} %description mod-stream %{summary}. %package mod-devel Summary: Angie module development files Requires: angie = %{version}-%{release} Requires: make Requires: gcc Requires: gd-devel %if 0%{?with_gperftools} Requires: gperftools-devel %endif %if %{with geoip} Requires: GeoIP-devel %endif Requires: libxslt-devel Requires: openssl%{?openssl_pkgversion}-devel Requires: pcre2-devel Requires: perl-devel Requires: perl(ExtUtils::Embed) %if 0%{?fedora} || 0%{?rhel} >= 10 || 0%{?epel} >= 9 Requires: zlib-ng-devel %else Requires: zlib-devel %endif %description mod-devel %{summary}. %prep %if 0%{?fedora} > 42 %{openpgpverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' %else %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' %endif %autosetup -p1 cp %{SOURCE200} %{SOURCE10} %{SOURCE12} %{SOURCE18} %{SOURCE220} . %if 0%{?openssl_pkgversion} sed \ -e 's|\(ngx_feature_path=\)$|\1%{_includedir}/openssl%{openssl_pkgversion}|' \ -e 's|\(ngx_feature_libs="\)|\1-L%{_libdir}/openssl%{openssl_pkgversion} |' \ -i auto/lib/openssl/conf %endif # Prepare template config for instances sed -e '/^error_log /s|error\.log|@INSTANCE@_error.log|' \ -e '/^pid /s|angie\.pid|angie-@INSTANCE@.pid|' \ -e '/^ *access_log/s|access\.log|@INSTANCE@_access.log|' \ angie.conf >> instance.conf touch -r %{SOURCE12} instance.conf # Prepare sources for installation cp -a ../%{name}-%{version} ../%{name}-%{version}-%{release}-src mv ../%{name}-%{version}-%{release}-src . %build # angie does not utilize a standard configure script. It has its own # and the standard configure options cause the angie configure script # to error out. if ! ./configure \ --prefix=%{_datadir}/angie \ --sbin-path=%{_sbindir}/angie \ --modules-path=%{angie_moduledir} \ --conf-path=%{_sysconfdir}/angie/angie.conf \ --error-log-path=%{_localstatedir}/log/angie/error.log \ --http-log-path=%{_localstatedir}/log/angie/access.log \ --http-client-body-temp-path=%{_localstatedir}/lib/angie/tmp/client_body \ --http-proxy-temp-path=%{_localstatedir}/lib/angie/tmp/proxy \ --http-fastcgi-temp-path=%{_localstatedir}/lib/angie/tmp/fastcgi \ --http-uwsgi-temp-path=%{_localstatedir}/lib/angie/tmp/uwsgi \ --http-scgi-temp-path=%{_localstatedir}/lib/angie/tmp/scgi \ --http-acme-client-path=%{_localstatedir}/lib/angie/acme \ --pid-path=/run/angie.pid \ --lock-path=/run/lock/subsys/angie \ --user=%{angie_user} \ --group=%{angie_user} \ --with-compat \ --with-debug \ %if 0%{?with_aio} --with-file-aio \ %endif %if 0%{?with_gperftools} --with-google_perftools_module \ %endif --with-http_acme_module \ --with-http_addition_module \ --with-http_auth_request_module \ --with-http_dav_module \ --with-http_degradation_module \ --with-http_flv_module \ %if %{with geoip} --with-http_geoip_module=dynamic \ --with-stream_geoip_module=dynamic \ %endif --with-http_gunzip_module \ --with-http_gzip_static_module \ --with-http_image_filter_module=dynamic \ --with-http_mp4_module \ --with-http_perl_module=dynamic \ --with-perl_modules_path=%{angie_perldir} \ --with-http_random_index_module \ --with-http_realip_module \ --with-http_secure_link_module \ --with-http_slice_module \ --with-http_ssl_module \ --with-http_stub_status_module \ --with-http_sub_module \ --with-http_v2_module \ --with-http_v3_module \ --with-http_xslt_module=dynamic \ --with-mail=dynamic \ --with-mail_ssl_module \ %if 0%{?with_ktls} --with-openssl-opt=enable-ktls \ %endif %if %{without engine} --without-engine \ %endif --with-pcre \ --with-pcre-jit \ --with-stream=dynamic \ --with-stream_acme_module \ --with-stream_mqtt_preread_module \ --with-stream_rdp_preread_module \ --with-stream_realip_module \ --with-stream_ssl_module \ --with-stream_ssl_preread_module \ --with-threads \ --with-cc-opt="%{optflags}" \ --with-ld-opt="$RPM_LD_FLAGS"; then : configure failed cat objs/autoconf.err exit 1 fi %make_build %install %make_install INSTALLDIRS=vendor find %{buildroot} -type f -name .packlist -exec rm -f '{}' \; find %{buildroot} -type f -name perllocal.pod -exec rm -f '{}' \; find %{buildroot} -type f -empty -exec rm -f '{}' \; find %{buildroot} -type f -iname '*.so' -exec chmod 0755 '{}' \; # Perl module man page is named nginx(3pm) and would conflict with # nginx-mod-http-perl. rm -rf %{buildroot}%{_mandir}/man3 %{buildroot}%{angie_perldir}/man3 install -p -D -m 0644 ./angie.service \ %{buildroot}%{_unitdir}/angie.service install -p -D -m 0644 ./angie@.service \ %{buildroot}%{_unitdir}/angie@.service install -p -D -m 0644 %{SOURCE11} \ %{buildroot}%{_sysconfdir}/logrotate.d/angie install -p -d -m 0755 %{buildroot}%{_sysconfdir}/systemd/system/angie.service.d install -p -d -m 0755 %{buildroot}%{_unitdir}/angie.service.d install -p -d -m 0755 %{buildroot}%{_sysconfdir}/angie/conf.d install -p -d -m 0755 %{buildroot}%{_sysconfdir}/angie/default.d install -p -d -m 0700 %{buildroot}%{_localstatedir}/lib/angie install -p -d -m 0700 %{buildroot}%{_localstatedir}/lib/angie/tmp install -p -d -m 0700 %{buildroot}%{_localstatedir}/lib/angie/acme install -p -d -m 0700 %{buildroot}%{_localstatedir}/log/angie install -p -d -m 0755 %{buildroot}%{_datadir}/angie/html install -p -d -m 0755 %{buildroot}%{angie_moduleconfdir} install -p -d -m 0755 %{buildroot}%{angie_moduledir} install -p -m 0644 ./angie.conf \ %{buildroot}%{_sysconfdir}/angie install -p -D -m 0644 %{_builddir}/angie-%{version}/objs/angie.8 \ %{buildroot}%{_mandir}/man8/angie.8 install -p -D -m 0755 %{SOURCE13} %{buildroot}%{_bindir}/angie-upgrade pod2man --section=8 --name=angie-upgrade \ --release="%{version}-%{release}" \ --center="Angie Zero-Downtime Upgrade Utility" \ --date="$(sed -nE 's/# Last updated: (.+)/\1/p' %{SOURCE13})" \ %{SOURCE13} > %{buildroot}%{_mandir}/man8/angie-upgrade.8 for i in ftdetect ftplugin indent syntax; do install -p -D -m644 contrib/vim/${i}/angie.vim \ %{buildroot}%{_datadir}/vim/vimfiles/${i}/angie.vim done %if %{with geoip} echo 'load_module "%{angie_moduledir}/ngx_http_geoip_module.so";' \ > %{buildroot}%{angie_moduleconfdir}/mod-http-geoip.conf echo 'load_module "%{angie_moduledir}/ngx_stream_geoip_module.so";' \ > %{buildroot}%{angie_moduleconfdir}/zz-mod-stream-geoip.conf %endif echo 'load_module "%{angie_moduledir}/ngx_http_image_filter_module.so";' \ > %{buildroot}%{angie_moduleconfdir}/mod-http-image-filter.conf echo 'load_module "%{angie_moduledir}/ngx_http_perl_module.so";' \ > %{buildroot}%{angie_moduleconfdir}/mod-http-perl.conf echo 'load_module "%{angie_moduledir}/ngx_http_xslt_filter_module.so";' \ > %{buildroot}%{angie_moduleconfdir}/mod-http-xslt-filter.conf echo 'load_module "%{angie_moduledir}/ngx_mail_module.so";' \ > %{buildroot}%{angie_moduleconfdir}/mod-mail.conf echo 'load_module "%{angie_moduledir}/ngx_stream_module.so";' \ > %{buildroot}%{angie_moduleconfdir}/mod-stream.conf # Install files for supporting angie module builds ## Install source files mkdir -p %{buildroot}%{_usrsrc} mv %{name}-%{version}-%{release}-src %{buildroot}%{angie_srcdir} ## Install rpm macros mkdir -p %{buildroot}%{_rpmmacrodir} sed -e "s|@@ANGIE_ABIVERSION@@|%{angie_abiversion}|g" \ -e "s|@@ANGIE_MODDIR@@|%{angie_moduledir}|g" \ -e "s|@@ANGIE_MODCONFDIR@@|%{angie_moduleconfdir}|g" \ -e "s|@@ANGIE_SRCDIR@@|%{angie_srcdir}|g" \ %{SOURCE15} > %{buildroot}%{_rpmmacrodir}/macros.angiemods ## Install dependency generator install -Dpm0644 %{SOURCE16} %{buildroot}%{_fileattrsdir}/angiemods.attr # install sysusers file install -p -D -m 0644 %{SOURCE19} %{buildroot}%{_sysusersdir}/angie.conf # tmpfiles.d configuration mkdir -p %{buildroot}%{_tmpfilesdir} install -m 644 -p %{SOURCE20} %{buildroot}%{_tmpfilesdir}/angie.conf %pre filesystem # RHEL 9 compat, remove after RHEL 9 EOL %sysusers_create_compat %{SOURCE19} %post %systemd_post angie.service %preun %systemd_preun angie.service %postun %systemd_postun angie.service # Request zero-downtime upgrade upon installation of a new angie binary or modules # A reload is not sufficient here: https://blog.nginx.org/blog/nginx-dynamic-modules-how-they-work#upgradeMod %transfiletriggerin -- %{_sbindir}/angie %{angie_moduleconfdir} %{angie_moduledir} if [ $1 -ge 1 ]; then test -f %{_sysconfdir}/angie/rpm-disable-upgrade || /usr/bin/angie-upgrade >/dev/null 2>&1 || : fi %files %doc instance.conf %{_datadir}/angie/html/* %{_bindir}/angie-upgrade %{_datadir}/vim/vimfiles/ftdetect/angie.vim %{_datadir}/vim/vimfiles/ftplugin/angie.vim %{_datadir}/vim/vimfiles/syntax/angie.vim %{_datadir}/vim/vimfiles/indent/angie.vim %{_mandir}/man8/angie.8* %{_mandir}/man8/angie-upgrade.8* %{_unitdir}/angie.service %{_unitdir}/angie@.service %config(noreplace) %{_sysconfdir}/logrotate.d/angie %files core %license LICENSE %doc CHANGES README README.dynamic %{_sbindir}/angie %config(noreplace) %{_sysconfdir}/angie/fastcgi.conf %config(noreplace) %{_sysconfdir}/angie/fastcgi.conf.default %config(noreplace) %{_sysconfdir}/angie/fastcgi_params %config(noreplace) %{_sysconfdir}/angie/fastcgi_params.default %config(noreplace) %{_sysconfdir}/angie/koi-utf %config(noreplace) %{_sysconfdir}/angie/koi-win %config(noreplace) %{_sysconfdir}/angie/mime.types %config(noreplace) %{_sysconfdir}/angie/mime.types.default %config(noreplace) %{_sysconfdir}/angie/angie.conf %config(noreplace) %{_sysconfdir}/angie/angie.conf.default %config(noreplace) %{_sysconfdir}/angie/prometheus_all.conf %config(noreplace) %{_sysconfdir}/angie/prometheus_all.conf.default %config(noreplace) %{_sysconfdir}/angie/scgi_params %config(noreplace) %{_sysconfdir}/angie/scgi_params.default %config(noreplace) %{_sysconfdir}/angie/uwsgi_params %config(noreplace) %{_sysconfdir}/angie/uwsgi_params.default %config(noreplace) %{_sysconfdir}/angie/win-utf %attr(770,%{angie_user},root) %dir %{_localstatedir}/lib/angie %attr(770,%{angie_user},root) %dir %{_localstatedir}/lib/angie/tmp %attr(700,root,root) %dir %{_localstatedir}/lib/angie/acme %{_tmpfilesdir}/angie.conf %ghost %attr(640,%{angie_user},root) %{_localstatedir}/log/angie/access.log %ghost %attr(640,%{angie_user},root) %{_localstatedir}/log/angie/error.log %dir %{_libdir}/angie %dir %{angie_moduledir} %dir %{angie_moduleconfdir} %files all-modules %files filesystem %dir %{_datadir}/angie %dir %{_datadir}/angie/html %dir %{_sysconfdir}/angie %dir %{_sysconfdir}/angie/conf.d %dir %{_sysconfdir}/angie/default.d %dir %{_sysconfdir}/systemd/system/angie.service.d %dir %{_unitdir}/angie.service.d %attr(711,root,root) %dir %{_localstatedir}/log/angie %{_sysusersdir}/angie.conf %if %{with geoip} %files mod-http-geoip %{angie_moduleconfdir}/mod-http-geoip.conf %{angie_moduledir}/ngx_http_geoip_module.so %files mod-stream-geoip %{angie_moduleconfdir}/zz-mod-stream-geoip.conf %{angie_moduledir}/ngx_stream_geoip_module.so %endif %files mod-http-image-filter %{angie_moduleconfdir}/mod-http-image-filter.conf %{angie_moduledir}/ngx_http_image_filter_module.so %files mod-http-perl %{angie_moduleconfdir}/mod-http-perl.conf %{angie_moduledir}/ngx_http_perl_module.so %{angie_perldir}/ %files mod-http-xslt-filter %{angie_moduleconfdir}/mod-http-xslt-filter.conf %{angie_moduledir}/ngx_http_xslt_filter_module.so %files mod-mail %{angie_moduleconfdir}/mod-mail.conf %{angie_moduledir}/ngx_mail_module.so %files mod-stream %{angie_moduleconfdir}/mod-stream.conf %{angie_moduledir}/ngx_stream_module.so %files mod-devel %{_rpmmacrodir}/macros.angiemods %{_fileattrsdir}/angiemods.attr %{angie_srcdir}/ %changelog * Sun Oct 18 2026 Zoran Pericic - 1.12.4-1 - Initial package, based on Fedora nginx 1.30.6 packaging - Dropped Fedora nginx PIDFile patch (Angie syncs daemon PID file itself) - Dropped Fedora nginx SSL passphrase dialog patch (does not apply) - Enable ACME (http + stream), MQTT and RDP preread modules - Perl module installed into private angie libdir path