Commit Graph

101 Commits

Author SHA1 Message Date
Michael Heimpold
551e00c8fc php8: small maintainance cleanups
- align the config option names
- re-order the configuration options
- add some help text
- drop obsolete notes regarding older PHP versions and obsolete CONFLICT
- remove (meanwhile) unrecognized configure options

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2026-01-25 07:06:40 +02:00
Daniel F. Dickinson
f8b8ce62c5 php8: fix gettext and intl dependencies and build
* Add a needed BUILD_DEPENDENCY on icu package, when PHP8_INTL is
  defined.
* Make PHP8_DOM selecting PHP8_LIBXML instead of depending on it.
* PHP8_INTL does not depend on PHP8_GETTEXT, it builds also
  without gettext.
* Always show option for choosing PHP8_FULLUCIDATA
* For php8-cgi, php-cli, etc, a libstdcpp dependency is only gained
when PHP8_INTL is selected, therefore update those conditional depends.

As some combinations of these changes can change the binaries output,
PKG_RELEASE has been bumped.

Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2026-01-16 07:35:52 +01:00
Daniel F. Dickinson
1a01a175fa php8: add more help text and tweak whitespace
Add more menuconfig help text descriptions, and
convert some mixed tabs and spaces to spaces.

Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
2026-01-16 07:35:52 +01:00
Daniel F. Dickinson
247c1a1964 php8: fix xmlreader dom circular dependency
xmlreader was selecting package php8-mod-dom as well as depending on
PHP8_DOM, while php8-mod-dom also depended on PHP8_DOM (and therefore
selected PHP8_DOM when php8-mod-dom was selected). This is a Kconfig
recursive dependency, so break the recursion by noting that because
php8-mod-xmlreader selects php8-mod-dom, PHP8_DOM is a transitive
depends, so php8-mod-xmlreader should not depend on PHP8_DOM itself.

Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
2026-01-16 07:35:52 +01:00
Daniel F. Dickinson
8d7faa245a php8: reformat CONFIG_DEPENDS
Switch to a single CONFIG_ per line, and alphabetize.

Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
2026-01-16 07:35:52 +01:00
Florian Eckert
74a3da92b2 php8: add php8 depends and move compile option to Config.in
The php8 Makefile is already quite large. To improve readability, move
config section to a separate 'Config.in' file. To ensure that the PHP8
option is only saved in '.config' if PHP8 has been selected for building. A
depends on 'PACKAGE_php8' is added to the configuration option in the
'Config.in' file.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2026-01-11 20:45:13 +01:00
Hannu Nyman
7e25efa101 php8: revert "php8: fix PHP8_GETTEXT missing icu dependency"
This reverts commit 996046e642.

After that faulty commit the 'icu' package is always selected
even if php8 itself is not even selected.

Simple bug reproduction process:

 perus@ub2510:/OpenWrt/aarch64$ rm .config
 perus@ub2510:/OpenWrt/aarch64$ touch .config
 perus@ub2510:/OpenWrt/aarch64$ make defconfig
 Collecting package info: done
 ...
 #
 # configuration written to .config
 #

 perus@ub2510:/OpenWrt/aarch64$ grep -iE "php8|icu" .config
 # PHP8
 # CONFIG_PACKAGE_php8 is not set
 CONFIG_PHP8_LIBXML=y
 CONFIG_PHP8_DOM=y
 CONFIG_PHP8_GETTEXT=y
 CONFIG_PHP8_INTL=y
 # CONFIG_PHP8_FULLICUDATA is not set
 # end of PHP8
 CONFIG_PACKAGE_icu=y
 # CONFIG_PACKAGE_icu-data-tools is not set
 # CONFIG_PACKAGE_icu-full-data is not set

Revert the commit, so that a fix can be developed and tested.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2025-12-31 21:45:30 +02:00
Daniel F. Dickinson
996046e642 php8: fix PHP8_GETTEXT missing icu dependency
With CONFIG_PHP8_GETTEXT php8 always gains a
dependency on a version of the 'icu' package,
however said dependency is not declared, so
on gets compilation errors when
CONFIG_PHP8_GETTEXT=y but PACKAGE_icu is not
selected.

Therefore select PACKAGE_icu when PHP8_GETTEXT is
selected.

Closes #28207

Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
2025-12-31 13:32:25 +01:00
Daniel F. Dickinson
73d8b6c6f3 tree-wide: remove obsolete SDK in conditionals
Obsolete use of $(SDK) in configure conditionals can result in
dependency errors when building a subset of packages for packages which
have multiple sub-packages.

The reason it causes dependency issues is that (using libdbi-drivers as
an example) lines like:

ifneq ($(SDK)$(CONFIG_PACKAGE_libdbd-sqlite3),)

always evaluate to true if you are compiling in the SDK. So for a user
compiling from the SDK, the configure arguments are always added to the package build.

In the case of libdbi-drivers:

CONFIGURE_ARGS += \
  --with-sqlite3 \
  --with-sqlite3-incdir=$(STAGING_DIR)/usr/include \
  -with-sqlite3-libdir=$(STAGING_DIR)/usr/lib

is always added even if PACKAGE_libdbd-sqlite3 is deselected. When
libdbd-sqlite3 is deselected, this dependency:

DEPENDS:=libdbi +libsqlite3

is not present, so when configure tries to find sqlite3 it fails.

Closes #28173 "tree-wide: obsolete $(SDK) in conditionals"

See also:

* "include: remove SDK exception from package install targets"
  openwrt/openwrt@28f44a4

Performed tree-wide to ease revert if necessary, per:
https://github.com/openwrt/packages/issues/28173#issuecomment-3694615980

Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
2025-12-30 00:16:16 +01:00
Michael Heimpold
7b4b55633b php8: update to 8.4.16
This fixes:
    - CVE-2025-14177
    - CVE-2025-14178
    - CVE-2025-14180

Upstream changelog:
https://www.php.net/ChangeLog-8.php#8.4.16

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2025-12-22 17:09:29 +01:00
Michael Heimpold
e6c59b5188 php8: fix dependency of php8-mod-xmlreader to php8-mod-dom
When PHP8_DOM is enabled then xmlreader automatically gains a
dependency to php8-mod-dom, not only when the dom module
is actually built.

So fix it by declaring this dependency.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2025-12-20 22:21:17 +01:00
Daniel F. Dickinson
aa1acc0f21 php8: bump PKG_RELEASE
Bump PKG_RELEASE for previous two commits

Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
2025-12-15 08:04:39 +01:00
Daniel F. Dickinson
f9591b8518 php8: xml modules affect others
As with gettext modules described in #28078 and #28075, xml and dom
related module selection affects the dependencies of other packages.

Therefore, we invert the dependency logic:

PHP8_LIBXML and PHP8_DOM are are enabled by default and packages
which depend on libxml2 and --enable-dom=shared are not shown (and
the related configure args are disabled) if the config options are
not enabled.

Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
2025-12-15 08:04:39 +01:00
Daniel F. Dickinson
6d6233b6b7 php8: module selection affects other sub-packages
Fixes: php8: global package dependency changes based on module
selection

Fixes: #28078

As described in #28078 and #28075,

Some binaries gain a dependency on libstdcpp when mod-gettext is included
in the build, however this was not explicitly declared, so packaging
fails with (e.g.):

Package php8-cgi is missing dependencies for the following libraries:
libstdc++.so.6

In contrast to #28075, this commit takes the approach:

* Make use of --with-gettext depend on a configure flag (enabled by
  default, since that matches current full build behaviour)
* Make sub-packages which require --with-gettext depend on the
  configure flag

This means that e.g. php-cgi would not have gettext support if the
configure flag was disabled, and e.g. php-mod-gettext and php-mod-intl
would not be selectable.

Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
2025-12-15 08:04:39 +01:00
Michael Heimpold
b1ca18e900 php8: update to 8.4.15
Upstream changelog:
https://www.php.net/ChangeLog-8.php#8.4.15

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2025-12-05 22:57:41 +01:00
Michael Heimpold
657f326b33 php8: update to 8.4.14
Upstream changelog:
https://www.php.net/ChangeLog-8.php#8.4.14

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2025-10-25 19:03:44 +03:00
Michael Heimpold
dd9c6ecd31 php8: update to 8.4.13
Upstream changelog:
https://www.php.net/ChangeLog-8.php#8.4.13

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2025-10-16 22:41:37 +02:00
Michael Heimpold
69e9d5c560 php8: update to 8.4.12
Upstream changelog:
https://www.php.net/ChangeLog-8.php#8.4.12

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2025-09-06 20:11:29 +02:00
Michael Heimpold
465ad70688 php8: update to 8.4.11
Upstream changelog:
https://www.php.net/ChangeLog-8.php#8.4.11

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2025-08-22 23:02:23 +02:00
Michael Heimpold
331c6bc7ca php8: link PCRE2 JIT usage to actual library configuration
libpcre2's JIT support is controlled with a compile-time flag.
When PHP is compiled against it (external libpcre2 - not PHP's bundled
version) as in our use-case, then it tries to auto-detect whether
JIT support is enalbed or not - but this is done based on a guess
when cross-compiling.

So instead of guessing, we need to tell the actual OpenWrt configuration
of libpcre2 to PHP.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2025-08-09 22:29:01 +02:00
Michael Heimpold
ae7cb49d6f php8: update to 8.4.10
Upstream changelog:
https://www.php.net/ChangeLog-8.php#8.4.10

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2025-07-21 23:10:18 +02:00
Michael Heimpold
f9ea6b5ee3 php8: add missing dependency for soap module
The soap module depends on the session module.
Add the missing dependency.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2025-06-15 17:57:31 +02:00
Michael Heimpold
8ba99fd701 php8: update to 8.4.8
Upstream changelog:
https://www.php.net/ChangeLog-8.php#8.4.8

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2025-06-15 17:57:31 +02:00
Michael Heimpold
f21bc7f170 php8: adapt test.sh for upcoming opkg -> apk transition
We used to rely on opkg to install the CLI tool for testing
PHP modules, but when opkg is not available anymore, we have to
use apk. The (simple) switch logic assumes, that only one
of both package manager tools is installed.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2025-05-17 17:25:18 +02:00
Michael Heimpold
8d999cfc50 php8: update to 8.4.7
Upstream changelog:
https://www.php.net/ChangeLog-8.php#8.4.7

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2025-05-17 17:25:18 +02:00
Michael Heimpold
b523439c90 php8: pass configure hints for snmp extension
The 'snmp' extension module uses net-snmp as library, but fails
to detect whether the library uses openssl when cross-compiling.
Pass the according autoconf variables as hint - net-snmp is not
using openssl at the moment as defined in the Makefile.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2025-05-01 15:40:26 +02:00
Michael Heimpold
3e34edcf3b php8: update to 8.4.6
Upstream changelog:
https://www.php.net/ChangeLog-8.php#8.4.6

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2025-05-01 15:40:26 +02:00
Michael Heimpold
9ebb457377 php8: update to 8.4.5
This is a major upgrade to latest stable PHP version.

- IMAP extension was unbundled from PHP
- align patch filenames with latest ones from Debian
- removed obsolete patches
- adapted/refreshed patches
- added patch to remove call to httpd during configure
  Note: this assumes that 'prefork' mpm is used

Upstream changelog for this specific release:
https://www.php.net/ChangeLog-8.php#8.4.5

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2025-04-10 06:45:31 +02:00
Michael Heimpold
ca9c3d1bae php8: add patch for loongarch64 support
This backported patch is required to fix the build for loongarch64:
...
... loongarch64-openwrt-linux-musl/bin/ld.bfd: Zend/zend_fibers.o: in function `zend_fiber_init_context':
zend_fibers.c:(.text+0xb34): undefined reference to `getcontext'
... loongarch64-openwrt-linux-musl/bin/ld.bfd: zend_fibers.c:(.text+0xb38): undefined reference to `getcontext'
... loongarch64-openwrt-linux-musl/bin/ld.bfd: zend_fibers.c:(.text+0xb74): undefined reference to `makecontext'
... loongarch64-openwrt-linux-musl/bin/ld.bfd: zend_fibers.c:(.text+0xb78): undefined reference to `makecontext'
... loongarch64-openwrt-linux-musl/bin/ld.bfd: Zend/zend_fibers.o: in function `.L170':
zend_fibers.c:(.text+0xe34): undefined reference to `swapcontext'
...

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2024-12-27 11:13:08 +01:00
Michael Heimpold
0b04156859 php8: update to 8.3.14
This fixes:
    - CVE-2024-8932
    - CVE-2024-11236
    - CVE-2024-11236
    - CVE-2024-11234
    - CVE-2024-11233

Upstream changelog:
https://www.php.net/ChangeLog-8.php#8.3.14

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2024-11-24 21:38:05 +01:00
Michael Heimpold
c20918cac7 php8: update to 8.3.12
This fixes:
    - CVE-2024-8925
    - CVE-2024-8926
    - CVE-2024-8927
    - CVE-2024-9026

Upstream changelog:
https://www.php.net/ChangeLog-8.php#8.3.12

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2024-10-06 10:30:06 +02:00
Michael Heimpold
1890b5fcc3 php8: update to 8.3.11
Upstream changelog:
https://www.php.net/ChangeLog-8.php#8.3.11

A minor adaption to a single patch is required.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2024-09-05 07:18:53 +02:00
Michael Heimpold
e06c27d264 php8: update to 8.3.10
Upstream changelog:
https://www.php.net/ChangeLog-8.php#8.3.10

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2024-08-07 07:01:44 +02:00
Michael Heimpold
183810bd5b php8: update to 8.3.9
Upstream changelog:
https://www.php.net/ChangeLog-8.php#8.3.9

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2024-07-09 20:49:44 +02:00
Michael Heimpold
1b7f11d96d php8: workaround libgd capability detection (refs #23846)
This is an alternative approach to #24209. Instead of switching
to bundled/internal libgd, workaround the capability detection
by giving the information to the build system directly.

PHP's original approach does not work when cross-compiling,
but since it is known which features are enabled in OpenWrt's
build, we can directly enable these features here, too.

This is not that future prove, but should do the job for the
moment until a proper solution was discussed with upstream.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2024-06-08 07:33:18 +02:00
Michael Heimpold
1dd9f4bfc8 php8: update to 8.3.8
This fixes:
    - CVE-2024-4577
    - CVE-2024-5458
    - CVE-2024-5585

Changelog: https://www.php.net/ChangeLog-8.php#8.3.8

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2024-06-08 06:17:24 +02:00
Michael Heimpold
533456bcc0 php8: update to 8.3.7
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2024-05-28 20:41:50 +02:00
Hirokazu MORIKAWA
6d6fed624f php8: Support for icu 75
Preparing to update icu4c to 75.
Created a patch for build errors in php-intl.
```
In file included from /mnt/node/openwrt/staging_dir/target-aarch64_generic_musl/usr/include/unicode/unistr.h:39,
                 from ext/intl/intl_convertcpp.h:22,
                 from ext/intl/intl_convertcpp.cpp:17:
/mnt/node/openwrt/staging_dir/target-aarch64_generic_musl/usr/include/unicode/stringpiece.h:133:29: error: 'enable_if_t' in namespace 'std' does not name a template type
  133 |             typename = std::enable_if_t<
      |                             ^~~~~~~~~~~
/mnt/node/openwrt/staging_dir/target-aarch64_generic_musl/usr/include/unicode/stringpiece.h:133:24: note: 'std::enable_if_t' is only available from C++14 onwards
  133 |             typename = std::enable_if_t<
      |                        ^~~
/mnt/node/openwrt/staging_dir/target-aarch64_generic_musl/usr/include/unicode/stringpiece.h:133:40: error: expected '>' before '<' token
  133 |             typename = std::enable_if_t<
      |                                        ^
```
The FreeBSD ports patch was used as a reference.
e680bd98d3

Signed-off-by: Hirokazu MORIKAWA <morikw2@gmail.com>
2024-05-09 11:43:21 +09:00
Michael Heimpold
2682b28cb3 php8: update to 8.3.6
This fixes:
    - CVE-2024-1874
    - CVE-2024-2756
    - CVE-2024-2757
    - CVE-2024-3096

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2024-04-17 20:56:55 +02:00
Michael Heimpold
a519774b97 php8: update to 8.3.4
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2024-03-17 18:00:30 +01:00
Michael Heimpold
42aa20ddeb php8/pecl8-pecl-*: use https URLs for PKG_SOURCE_URLs
Most packages already use https URLs and for PHP and PECL
package downloads https is working properly.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2024-02-26 21:03:22 +01:00
Michael Heimpold
a8c69cf6bf php8: update to 8.3.3
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2024-02-19 08:07:02 +01:00
Michael Heimpold
dd200c8fe0 php8: update to 8.3.2
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2024-01-28 11:20:07 +01:00
Michael Heimpold
b0a8ddf196 php8: update to 8.3.1
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2023-12-27 13:42:08 +01:00
Michael Heimpold
4e121ba69f php8: update to 8.3.0
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2023-12-17 19:52:35 +02:00
Michael Heimpold
8d6a63df8a php8: update to 8.2.12
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2023-10-27 07:45:18 +02:00
Michael Heimpold
3e0dccdea1 php8: update to 8.2.11
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2023-10-03 20:34:23 +02:00
Michael Heimpold
cb1070612b php8: update to 8.2.10
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2023-09-04 22:25:12 +02:00
Michael Heimpold
d85bac4d1e php8: update to 8.2.9
This fixes:
    - CVE-2023-3824

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2023-08-21 17:57:22 +02:00
Michael Heimpold
43b10ad9c1 php8: fix linking on riscv64 platform (again)
The initial fix was done in a2e76e497.
Later we could revert it with 5779ae4c5 since a global fix
in gcc was deployed.

But now, PHP itself applied a workaround/fix in 8.2.8,
so that we now require the initial fix again.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2023-08-16 21:38:54 +02:00