# remirepo/fedora spec file for unit-php # # Copyright (c) 2019-2022 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # %bcond_without tests %global gh_owner nginx %global project unit %global gh_commit 87a1a9c0d275c6869e50bc9f3dfca1227ec54868 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) Name: unit Summary: NGINX Unit application server Version: 1.29.0 Release: 1%{?dist} License: ASL 2.0 URL: https://unit.nginx.org/ Source0: https://github.com/%{gh_owner}/%{project}/archive/%{gh_commit}/%{project}-%{version}-%{gh_short}.tar.gz Source1: unit.service Source2: unit.init Source3: unit.sysconf Source4: unit.logrotate BuildRequires: make BuildRequires: gcc BuildRequires: openssl-devel BuildRequires: pcre2-devel BuildRequires: systemd %{?systemd_requires} Requires(pre): /usr/sbin/useradd Requires: logrotate Provides: nginx-unit = %{version}-%{release} %description NGINX Unit is a runtime and delivery environment for modern distributed applications. It runs the application code in multiple languages (PHP, Python, Go, etc.), and tightly couples it with traffic delivery in and out of the application. Take this application server and proxy directly in the cloud / container environments and fully control your app dynamically via an API. %package devel Summary: NGINX Unit (development files) Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Library and include files required for NGINX Unit modules development. %prep %setup -qn %{project}-%{gh_commit} cp pkg/rpm/rpmbuild/SOURCES/unit.example.config example.config %build # see https://github.com/nginx/unit/issues/467 %define _lto_cflags %{nil} unitconf() { ./configure \ --libdir=%{_libdir} \ --prefix=%{_prefix} \ --state=%{_sharedstatedir}/unit \ --control="unix:/run/unit/control.sock" \ --pid=/run/unit/unit.pid \ --log=/var/log/unit/unit.log \ --tmp=/var/tmp \ --user=unit \ --group=unit \ --openssl \ --cc-opt="%{optflags}" \ --tests \ $* } unitconf \ --modules=%{_libdir}/unit/debug-modules \ --debug make %{?_smp_mflags} make %{?_smp_mflags} build/libunit.a mv build build-debug unitconf \ --modules=%{_libdir}/unit/modules make %{?_smp_mflags} %install DESTDIR=%{buildroot} make unitd-install libunit-install manpage-install install -m755 build-debug/unitd %{buildroot}%{_sbindir}/unitd-debug install -m644 build-debug/libunit.a %{buildroot}%{_libdir}/libunit-debug.a mkdir -p %{buildroot}%{_sysconfdir}/%{name} mkdir -p %{buildroot}%{_libdir}/%{name}/modules mkdir -p %{buildroot}%{_libdir}/%{name}/debug-modules mkdir -p %{buildroot}%{_sharedstatedir}/%{name} mkdir -p %{buildroot}%{_localstatedir}/log/%{name} mkdir -p %{buildroot}%{_localstatedir}/run/%{name} install -p -D -m 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} # init scripts install -p -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service mkdir -p %{buildroot}%{_sysconfdir}/systemd/system/%{name}.service.d %check %if %{with tests} make tests %{?_smp_mflags} ./build/tests %endif %pre getent group unit >/dev/null || groupadd -r unit getent passwd unit >/dev/null || \ useradd -r -g unit -s /sbin/nologin \ -d /nonexistent -c "unit user" unit %post %systemd_post %{name}.service %preun %systemd_preun %{name}.service %postun %systemd_postun_with_restart %{name}.service %triggerpostun -- unit < 1.22.0 cat < - 1.29.0-1 - update to 1.29.0 - drop patches merged upstream * Tue Sep 13 2022 Remi Collet - 1.28.0-1 - update to 1.28.0 * Thu Jun 2 2022 Remi Collet - 1.27.0-1 - update to 1.27.0 * Mon Feb 21 2022 Remi Collet - 1.26.1-3 - test build for upstream patch * Fri Feb 11 2022 Remi Collet - 1.26.1-2 - fix build error with GCC 12 using workaround to https://github.com/nginx/unit/issues/639 * Thu Dec 2 2021 Remi Collet - 1.26.1-1 - update to 1.26.1 * Mon Nov 22 2021 Remi Collet - 1.26.0-3 - add patch proposal for https://github.com/nginx/unit/issues/600 * Thu Nov 18 2021 Remi Collet - 1.26.0-2 - add better workaround for OpenSSL 3.0 from https://github.com/nginx/unit/pull/598 * Thu Nov 18 2021 Remi Collet - 1.26.0-1 - update to 1.26.0 * Sat Nov 6 2021 Remi Collet - 1.25.0-3 - EL-9 build * Fri Sep 3 2021 Remi Collet - 1.25.0-2 - fix build with recent glibc using patch from https://github.com/nginx/unit/pull/576 * Tue Aug 24 2021 Remi Collet - 1.25.0-1 - update to 1.25.0 * Fri May 28 2021 Remi Collet - 1.24.0-1 - update to 1.24.0 * Fri Mar 26 2021 Remi Collet - 1.23.0-1 - update to 1.23.0 * Fri Feb 5 2021 Remi Collet - 1.22.0-1 - update to 1.22.0 * Fri Nov 20 2020 Remi Collet - 1.21.0-1 - update to 1.21.0 * Fri Oct 9 2020 Remi Collet - 1.20.0-1 - update to 1.20.0 * Tue Aug 18 2020 Remi Collet - 1.19.0-2 - F33 build without LTO reported as https://github.com/nginx/unit/issues/467 * Fri Aug 14 2020 Remi Collet - 1.19.0-1 - update to 1.19.0 * Sun May 31 2020 Remi Collet - 1.18.0-1 - update to 1.18.0 * Fri Apr 17 2020 Remi Collet - 1.17.0-1 - update to 1.17.0 * Fri Mar 13 2020 Remi Collet - 1.16.0-1 - update to 1.16.0 * Fri Feb 7 2020 Remi Collet - 1.15.0-1 - update to 1.15.0 * Fri Dec 27 2019 Remi Collet - 1.14.0-1 - update to 1.14.0 * Fri Nov 15 2019 Remi Collet - 1.13.0-1 - update to 1.13.0 * Fri Oct 4 2019 Remi Collet - 1.12.0-1 - update to 1.12.0 * Fri Sep 20 2019 Remi Collet - 1.11.0-1 - update to 1.11.0 * Fri Aug 23 2019 Remi Collet - 1.10.0-1 - update to 1.10.0 * Fri May 31 2019 Remi Collet - 1.9.0-1 - update to 1.9.0 * Sat Mar 2 2019 Remi Collet - 1.8.0-1 - update to 1.8.0 * Fri Feb 8 2019 Remi Collet - 1.7.1-1 - update to 1.7.1 * Thu Jan 17 2019 Remi Collet - 1.7-2 - provide logrotate configuration * Tue Jan 15 2019 Remi Collet - 1.7-1 - initial package - open https://github.com/nginx/unit/pull/215 system crypto policy - open https://github.com/nginx/unit/pull/212 systemd improvments