Commit Graph

99 Commits

Author SHA1 Message Date
Michael Heimpold 46b1738690 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>
(cherry picked from commit 551e00c8fc)
2026-01-27 20:56:48 +01:00
Daniel F. Dickinson 158855005e 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>
(cherry picked from commit f8b8ce62c5)
2026-01-27 20:56:48 +01:00
Daniel F. Dickinson a73f1416c7 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>
(cherry picked from commit 1a01a175fa)
2026-01-27 20:56:48 +01:00
Daniel F. Dickinson 72b19db6c7 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>
(cherry picked from commit 247c1a1964)
2026-01-27 20:56:48 +01:00
Daniel F. Dickinson 029b0bc809 php8: reformat CONFIG_DEPENDS
Switch to a single CONFIG_ per line, and alphabetize.

Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
(cherry picked from commit 8d7faa245a)
2026-01-27 20:56:48 +01:00
Florian Eckert 1ab0b9917a 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>
(cherry picked from commit 74a3da92b2)
2026-01-27 20:56:48 +01:00
Daniel F. Dickinson a6a63bd110 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>
(cherry picked from commit 73d8b6c6f3)
2025-12-30 01:08:33 +01:00
Michael Heimpold f7f50a8694 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>
(cherry picked from commit 7b4b55633b)
2025-12-24 11:07:43 +01:00
Michael Heimpold da88909f80 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>
(cherry picked from commit e6c59b5188)
2025-12-24 11:07:43 +01:00
Daniel F. Dickinson 62b9d577cf php8: bump PKG_RELEASE
Bump PKG_RELEASE for previous two commits

Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
(cherry picked from commit aa1acc0f21)
2025-12-24 11:07:43 +01:00
Daniel F. Dickinson d3e8dd2881 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>
(cherry picked from commit f9591b8518)
2025-12-24 11:07:43 +01:00
Daniel F. Dickinson 48f0206f05 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>
(cherry picked from commit 6d6233b6b7)
2025-12-24 11:07:43 +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.
https://github.com/freebsd/freebsd-ports/commit/e680bd98d34a86302db434c5be23d0cf9d23df23

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
Michael Heimpold 75bd8ebde4 php8: update to 8.2.8
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2023-07-12 22:35:08 +02:00
Michael Heimpold 1db2070f00 php8: update to 8.2.7
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2023-06-14 08:43:04 +02:00