diff options
-rw-r--r-- | unit-php.spec | 53 | ||||
-rw-r--r-- | unit-php82.patch | 42 |
2 files changed, 37 insertions, 58 deletions
diff --git a/unit-php.spec b/unit-php.spec index 11604d3..4cd042c 100644 --- a/unit-php.spec +++ b/unit-php.spec @@ -1,7 +1,7 @@ # remirepo/fedora spec file for unit-php # -# Copyright (c) 2019-2021 Remi Collet -# License: CC-BY-SA +# Copyright (c) 2019-2024 Remi Collet +# License: CC-BY-SA-4.0 # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries @@ -9,7 +9,7 @@ %global gh_owner nginx %global project unit -%global gh_commit 3d1fa29f1d03e392df534b6589d3e1d2ed883671 +%global gh_commit 48d79170596d9923f2612d25e5a62ca0999b4313 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %undefine _debugsource_packages @@ -34,17 +34,14 @@ Requires: %{scl_prefix}php-embedded %endif Name: %{?scl_prefix}%{project}-php -Version: 1.27.0 -Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Version: 1.32.1 +Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} Summary: PHP module for NGINX Unit -License: ASL 2.0 +License: Apache-2.0 URL: https://unit.nginx.org/ Source0: https://github.com/%{gh_owner}/%{project}/archive/%{gh_commit}/%{project}-%{version}-%{gh_short}.tar.gz -# https://github.com/nginx/unit/pull/713 -Patch0: %{project}-php82.patch - BuildRequires: make BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel @@ -65,7 +62,6 @@ and NGINX unit %{version}. %prep %setup -qn %{project}-%{gh_commit} -%patch0 -p1 %build @@ -75,11 +71,13 @@ modbuild() { : Main unit configuration ./configure \ --prefix=%{_prefix} \ - --state=%{_root_sharedstatedir}/unit \ + --statedir=%{_root_sharedstatedir}/unit \ --control="unix:/var/run/unit/control.sock" \ --pid=/var/run/unit/unit.pid \ + --runstatedir=/var/run \ --log=/var/log/unit/unit.log \ - --tmp=/var/tmp \ + --logdir=/var/log \ + --tmpdir=/var/tmp \ --user=unit \ --group=unit \ --openssl \ @@ -94,11 +92,11 @@ make %{modname} %{?_smp_mflags} } : Debug build -modbuild --modules=%{_root_libdir}/unit/debug-modules --debug +modbuild --modulesdir=%{_root_libdir}/unit/debug-modules --debug mv build deb-build : Standard build -modbuild --modules=%{_root_libdir}/unit/modules +modbuild --modulesdir=%{_root_libdir}/unit/modules mv build std-build @@ -119,13 +117,36 @@ make %{modname}-install DESTDIR=%{buildroot} %{!?_licensedir:%global license %%doc} %license LICENSE %doc NOTICE CHANGES *.md -%doc pkg/rpm/rpmbuild/SOURCES/unit.example-php-app -%doc pkg/rpm/rpmbuild/SOURCES/unit.example-php-config %{_root_libdir}/unit/debug-modules/%{modname}.unit.so %{_root_libdir}/unit/modules/%{modname}.unit.so %changelog +* Tue Mar 26 2024 Remi Collet <remi@remirepo.net> - 1.32.1-1 +- update to 1.32.1 + +* Tue Feb 27 2024 Remi Collet <remi@remirepo.net> - 1.32.0-1 +- update to 1.32.0 + +* Thu Oct 19 2023 Remi Collet <remi@remirepo.net> - 1.31.1-1 +- update to 1.31.1 + +* Thu Aug 31 2023 Remi Collet <remi@remirepo.net> - 1.31.0-1 +- update to 1.31.0 + +* Thu May 11 2023 Remi Collet <remi@remirepo.net> - 1.30.0-1 +- update to 1.30.0 + +* Wed Mar 1 2023 Remi Collet <remi@remirepo.net> - 1.29.1-1 +- update to 1.29.1 + +* Thu Dec 15 2022 Remi Collet <remi@remirepo.net> - 1.29.0-1 +- update to 1.29.0 +- drop patch merged upstream + +* Tue Sep 13 2022 Remi Collet <remi@remirepo.net> - 1.28.0-1 +- update to 1.28.0 + * Thu Jun 2 2022 Remi Collet <remi@remirepo.net> - 1.27.0-2 - fix build with PHP 8.2 using patch from https://github.com/nginx/unit/pull/713 diff --git a/unit-php82.patch b/unit-php82.patch deleted file mode 100644 index abcfcf2..0000000 --- a/unit-php82.patch +++ /dev/null @@ -1,42 +0,0 @@ -From e90451adbe213803ef5f456e7715a2a79d83dccd Mon Sep 17 00:00:00 2001 -From: Remi Collet <remi@remirepo.net> -Date: Thu, 2 Jun 2022 16:16:35 +0200 -Subject: [PATCH] fix php_module_startup call for PHP 8.2 - ---- - auto/modules/php | 4 ++++ - src/nxt_php_sapi.c | 4 ++++ - 2 files changed, 8 insertions(+) - -diff --git a/auto/modules/php b/auto/modules/php -index e92a67cd3..328cd8df2 100644 ---- a/auto/modules/php -+++ b/auto/modules/php -@@ -149,7 +149,11 @@ nxt_feature_test=" - #include <php_main.h> - - int main() { -+ #if PHP_VERSION_ID < 80200 - php_module_startup(NULL, NULL, 0); -+ #else -+ php_module_startup(NULL, NULL); -+ #endif - return 0; - }" - -diff --git a/src/nxt_php_sapi.c b/src/nxt_php_sapi.c -index 68ef07eb1..dda3c1f21 100644 ---- a/src/nxt_php_sapi.c -+++ b/src/nxt_php_sapi.c -@@ -1150,7 +1150,11 @@ nxt_php_vcwd_chdir(nxt_unit_request_info_t *req, u_char *dir) - static int - nxt_php_startup(sapi_module_struct *sapi_module) - { -+#if PHP_VERSION_ID < 80200 - return php_module_startup(sapi_module, &nxt_php_unit_module, 1); -+#else -+ return php_module_startup(sapi_module, &nxt_php_unit_module); -+#endif - } - - |