Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Meta/CMake/ca_certificates_data.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include(${CMAKE_CURRENT_LIST_DIR}/utils.cmake)

set(CACERT_VERSION "2025-11-04")
set(CACERT_SHA256 "8ac40bdd3d3e151a6b4078d2b2029796e8f843e3f86fbf2adbc4dd9f05e79def")
set(CACERT_VERSION "2025-12-02")
set(CACERT_SHA256 "f1407d974c5ed87d544bd931a278232e13925177e239fca370619aba63c757b4")

set(CACERT_PATH "${SERENITY_CACHE_DIR}/CACERT" CACHE PATH "Download location for cacert.pem")
set(CACERT_VERSION_FILE "${CACERT_PATH}/version.txt")
Expand Down
4 changes: 2 additions & 2 deletions Meta/gn/secondary/Userland/Libraries/LibTLS/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ declare_args() {

cacert_cache = cache_path + "CACERT/"

cacert_version = "2025-11-04"
cacert_version = "2025-12-02"

if (enable_cacert_download) {
download_file("ca_certificates_download") {
version = cacert_version
url = "https://curl.se/ca/cacert-$version.pem"
output = "$root_build_dir/cacert.pem"
version_file = cacert_cache + "version.txt"
sha256 = "8ac40bdd3d3e151a6b4078d2b2029796e8f843e3f86fbf2adbc4dd9f05e79def"
sha256 = "f1407d974c5ed87d544bd931a278232e13925177e239fca370619aba63c757b4"
}
# FIXME: Copy file to /etc/cacert.pem on serenity
}
Expand Down
8 changes: 4 additions & 4 deletions Ports/AvailablePorts.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ This list is also available at [ports.serenityos.net](https://ports.serenityos.n
| [`bzip3`](bzip3/) | bzip3 | 1.5.1 | https://github.com/kspalaiologos/bzip3 |
| [`c-ares`](c-ares/) | c-ares | 1.19.0 | https://c-ares.org |
| [`c-ray`](c-ray/) | C-Ray | 8f30eb9 | https://github.com/vkoskiv/c-ray |
| [`ca-certificates`](ca-certificates/) | Mozilla CA certificate store | 2025-11-04 | https://curl.se/docs/caextract.html |
| [`ca-certificates`](ca-certificates/) | Mozilla CA certificate store | 2025-12-02 | https://curl.se/docs/caextract.html |
| [`cairo`](cairo/) | Cairo | 1.18.2 | https://www.cairographics.org/ |
| [`carl`](carl/) | Crypto Ancienne Resource Loader | 1.5 | https://github.com/classilla/cryanc |
| [`cavestory`](cavestory/) | Cave Story | 2.6.5-1 | https://github.com/nxengine/nxengine-evo |
Expand All @@ -45,7 +45,7 @@ This list is also available at [ports.serenityos.net](https://ports.serenityos.n
| [`cmake`](cmake/) | CMake | 3.26.4 | https://cmake.org/ |
| [`cmatrix`](cmatrix/) | cmatrix | 5c082c6 | https://github.com/abishekvashok/cmatrix |
| [`composer`](composer/) | Composer | 2.6.5 | https://getcomposer.org/ |
| [`coreutils`](coreutils/) | GNU core utilities | 9.5 | https://www.gnu.org/software/coreutils/ |
| [`coreutils`](coreutils/) | GNU core utilities | 9.9 | https://www.gnu.org/software/coreutils/ |
| [`cowsay`](cowsay/) | cowsay | 3.04 | https://github.com/tnalpgge/rank-amateur-cowsay |
| [`cpio`](cpio/) | GNU cpio archive utility | 2.15 | https://www.gnu.org/software/cpio/ |
| [`curl`](curl/) | curl | 8.17.0 | https://curl.se/ |
Expand Down Expand Up @@ -227,7 +227,7 @@ This list is also available at [ports.serenityos.net](https://ports.serenityos.n
| [`msttcorefonts`](msttcorefonts/) | Microsoft's TrueType core fonts | | https://corefonts.sourceforge.net/ |
| [`mysthous`](mysthous/) | Hi-Res Adventure #1: Mystery House | 1.0 | https://www.scummvm.org/games/#games-hires1 |
| [`nano`](nano/) | GNU nano | 8.5 | https://www.nano-editor.org/ |
| [`nasm`](nasm/) | Netwide Assembler (NASM) | 2.16.03 | https://www.nasm.us/ |
| [`nasm`](nasm/) | Netwide Assembler (NASM) | 3.01 | https://www.nasm.us/ |
| [`ncdu`](ncdu/) | Ncdu | 1.18.1 | https://dev.yorhel.nl/ncdu |
| [`ncurses`](ncurses/) | ncurses | 6.5 | https://invisible-island.net/ncurses/announce.html |
| [`neofetch`](neofetch/) | neofetch | 7.1.0 | https://github.com/dylanaraps/neofetch |
Expand Down Expand Up @@ -266,7 +266,7 @@ This list is also available at [ports.serenityos.net](https://ports.serenityos.n
| [`pcre2`](pcre2/) | Perl-compatible Regular Expressions (PCRE2) | 10.45 | https://www.pcre.org/ |
| [`perl5`](perl5/) | Perl | 5.40.1 | https://www.perl.org/ |
| [`pfetch`](pfetch/) | pfetch | a906ff8 | https://github.com/dylanaraps/pfetch/ |
| [`php`](php/) | PHP | 8.2.10 | https://www.php.net/ |
| [`php`](php/) | PHP | 8.5.0 | https://www.php.net/ |
| [`pixman`](pixman/) | pixman | 0.42.2 | http://pixman.org |
| [`pkgconf`](pkgconf/) | pkgconf | 2.0.2 | https://github.com/pkgconf/pkgconf |
| [`poppler`](poppler/) | Poppler is a PDF rendering library | 24.02.0 | https://poppler.freedesktop.org/ |
Expand Down
4 changes: 2 additions & 2 deletions Ports/ca-certificates/package.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env -S bash ../.port_include.sh
port='ca-certificates'
version='2025-11-04'
version='2025-12-02'
files=(
"https://curl.se/ca/cacert-${version}.pem#8ac40bdd3d3e151a6b4078d2b2029796e8f843e3f86fbf2adbc4dd9f05e79def"
"https://curl.se/ca/cacert-${version}.pem#f1407d974c5ed87d544bd931a278232e13925177e239fca370619aba63c757b4"
)
workdir='.'

Expand Down
8 changes: 2 additions & 6 deletions Ports/coreutils/package.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
#!/usr/bin/env -S bash ../.port_include.sh
port='coreutils'
version='9.5'
version='9.9'
useconfigure='true'
use_fresh_config_sub='true'
config_sub_paths=(
'build-aux/config.sub'
)
files=(
"https://ftpmirror.gnu.org/gnu/coreutils/coreutils-${version}.tar.gz#767ae6a22950ec42f3ba5f7c1de79dd27800ee8e9b8642da5dedb5974a1741e5"
"https://ftpmirror.gnu.org/gnu/coreutils/coreutils-${version}.tar.gz#91a719fcf923de686016f2c8d084a8be1f793f34173861273c4668f7c65af94a"
)

# Exclude some non-working utilities:
Expand Down
8 changes: 3 additions & 5 deletions Ports/nasm/package.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
#!/usr/bin/env -S bash ../.port_include.sh
port=nasm
version=2.16.03
port='nasm'
version='3.01'
files=(
"https://www.nasm.us/pub/nasm/releasebuilds/${version}/nasm-${version}.tar.gz#5bc940dd8a4245686976a8f7e96ba9340a0915f2d5b88356874890e207bdb581"
"https://www.nasm.us/pub/nasm/releasebuilds/${version}/nasm-${version}.tar.gz#aea120d4adb0241f08ae24d6add09e4a993bc1c4d9f754dbfc8020d6916c9be1"
)
useconfigure=true
use_fresh_config_sub=true
config_sub_paths=("autoconf/helpers/config.sub")
makeopts=()
6 changes: 3 additions & 3 deletions Ports/php/package.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env -S bash ../.port_include.sh
port='php'
useconfigure='true'
version='8.2.10'
version='8.5.0'
files=(
"https://www.php.net/distributions/php-${version}.tar.xz#561dc4acd5386e47f25be76f2c8df6ae854756469159248313bcf276e282fbb3"
"https://www.php.net/distributions/php-${version}.tar.xz#39cb6e4acd679b574d3d3276f148213e935fc25f90403eb84fb1b836a806ef1e"
)
depends=(
'curl'
Expand All @@ -16,7 +16,7 @@ depends=(
)
configopts=(
'--disable-cgi'
'--disable-opcache'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'--disable-opcache-jit'
'--enable-fpm'
"--prefix=${SERENITY_INSTALL_ROOT}/usr/local"
'--with-curl'
Expand Down
4 changes: 2 additions & 2 deletions Ports/php/patches/0001-Build-Disable-pharcmd.patch
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ not try to run phar locally.
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 42d6a3b6ca968b488c871f7c6f5395530481138b..dd244cdbc28e650237249ae8b636f6034a578826 100644
index a6078866df99986471679074841f679fe7332cd9..f73a3ab74762ba1e7c6878d1a4b35e889903f302 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1639,8 +1639,8 @@ CFLAGS="\$(CFLAGS_CLEAN) $standard_libtool_flag"
@@ -1614,8 +1614,8 @@ CFLAGS="\$(CFLAGS_CLEAN) $standard_libtool_flag"
CXXFLAGS="$CXXFLAGS $standard_libtool_flag \$(PROF_FLAGS)"

if test "$PHP_PHAR" != "no" && test "$PHP_CLI" != "no"; then
Expand Down
26 changes: 0 additions & 26 deletions Ports/php/patches/0002-Build-Force-inet_aton-detection.patch

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ to get PHP to build.
1 file changed, 4 insertions(+)

diff --git a/build/ltmain.sh b/build/ltmain.sh
index 2f1c8c9dc80f095832c58aeb30ca65fc27e8a64b..cce4f76267a211775ec97eb2b006df536cd4cc7b 100755
index 3c00e79157079f42d54032c4096be1de5cb9fffe..e15618374d55082081188e36e3a6b442daf43b48 100755
--- a/build/ltmain.sh
+++ b/build/ltmain.sh
@@ -2353,6 +2353,9 @@ EOF
Expand Down
21 changes: 21 additions & 0 deletions Ports/php/patches/0003-Remove-include-of-sys-ipc.h.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Linus Groh <[email protected]>
Date: Sat, 6 Dec 2025 17:11:07 +0000
Subject: [PATCH] Remove include of sys/ipc.h

---
ext/opcache/ZendAccelerator.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c
index 84acae980ce3a5ec1d03e4aebe2f30e3fd601bb3..904a9c2ae08fd9acab89e0f192cde9fc56dc53e9 100644
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@ -89,7 +89,6 @@ typedef int gid_t;
#ifndef ZEND_WIN32
# include <sys/types.h>
# include <sys/wait.h>
-# include <sys/ipc.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add an empty sys/ipc.h instead of this patch?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(to be clear,.this is not blocking or anything)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not in favor of that personally. In this specific case it seems like the include is unused (as per https://pubs.opengroup.org/onlinepubs/007904975/basedefs/sys/ipc.h.html it defines ftok() and a handful of IPC_ constants, none of which seem to be used here) so we got lucky. If they were used we'd have to patch out more things, so an empty header is unlikely to be generally useful.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we remove the include upstream then?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That I can do: php/php-src#20662

# include <pwd.h>
# include <grp.h>
#endif
23 changes: 23 additions & 0 deletions Ports/php/patches/0004-Disable-unsupported-prctl-call.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Linus Groh <[email protected]>
Date: Sat, 6 Dec 2025 17:16:03 +0000
Subject: [PATCH] Disable unsupported prctl call

Serenity has prctl but doesn't define PR_SET_PDEATHSIG.
---
sapi/cli/php_cli_server.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c
index da6732f06e72a297315615352a8f399107b7e096..21a4e3224bc4cd27045c346fe1334c01adae1019 100644
--- a/sapi/cli/php_cli_server.c
+++ b/sapi/cli/php_cli_server.c
@@ -2486,7 +2486,7 @@ static char *php_cli_server_parse_addr(const char *addr, int *pport) {
static void php_cli_server_worker_install_pdeathsig(void)
{
// Ignore failure to register PDEATHSIG, it's not available on all platforms anyway
-#if defined(HAVE_PRCTL)
+#if defined(HAVE_PRCTL) && !defined(__serenity__)
prctl(PR_SET_PDEATHSIG, SIGTERM);
#elif defined(HAVE_PROCCTL)
int signal = SIGTERM;
21 changes: 12 additions & 9 deletions Ports/php/patches/ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,21 @@ Build: Disable `pharcmd`
We do not support running the PHP binary locally after its build, so do
not try to run phar locally.

## `0002-Build-Force-inet_aton-detection.patch`

Build: Force `inet_aton` detection

For a reason unknown to me, the build system fails to find `inet_aton`
and tries to redefine it with its own implementation in
`flock_compat.c`.

## `0003-Build-Patch-Serenity-root-directory-into-libtool.patch`
## `0002-Build-Patch-Serenity-root-directory-into-libtool.patch`

Build: Patch Serenity root directory into libtool

PHP's libtool does not have sysroot support; this is the minimum change
to get PHP to build.

## `0003-Remove-include-of-sys-ipc.h.patch`

Remove include of sys/ipc.h


## `0004-Disable-unsupported-prctl-call.patch`

Disable unsupported prctl call

Serenity has prctl but doesn't define PR_SET_PDEATHSIG.

62 changes: 0 additions & 62 deletions Userland/Libraries/LibC/fcntl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*/

#include <bits/pthread_cancel.h>
#include <bits/utimens.h>
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
Expand Down Expand Up @@ -120,65 +119,4 @@ int posix_fallocate(int fd, off_t offset, off_t len)
// posix_fallocate does not set errno.
return -static_cast<int>(syscall(SC_posix_fallocate, fd, offset, len));
}

// https://pubs.opengroup.org/onlinepubs/9699919799/functions/utimensat.html
int utimensat(int dirfd, char const* path, struct timespec const times[2], int flag)
{
if (!path) {
errno = EFAULT;
return -1;
}
return __utimens(dirfd, path, times, flag);
}

int __utimens(int fd, char const* path, struct timespec const times[2], int flag)
{
size_t path_length = 0;
if (path) {
path_length = strlen(path);
if (path_length > INT32_MAX) {
errno = EINVAL;
return -1;
}
}

// POSIX allows AT_SYMLINK_NOFOLLOW flag or no flags.
if (flag & ~AT_SYMLINK_NOFOLLOW) {
errno = EINVAL;
return -1;
}

// Return early without error since both changes are to be omitted.
if (times && times[0].tv_nsec == UTIME_OMIT && times[1].tv_nsec == UTIME_OMIT)
return 0;

// According to POSIX, when times is a nullptr, it's equivalent to setting
// both last access time and last modification time to the current time.
// Setting the times argument to nullptr if it matches this case prevents
// the need to copy it in the kernel.
if (times && times[0].tv_nsec == UTIME_NOW && times[1].tv_nsec == UTIME_NOW)
times = nullptr;

if (times) {
for (int i = 0; i < 2; ++i) {
if ((times[i].tv_nsec != UTIME_NOW && times[i].tv_nsec != UTIME_OMIT)
&& (times[i].tv_nsec < 0 || times[i].tv_nsec >= 1'000'000'000L)) {
errno = EINVAL;
return -1;
}
}
}

int rc = 0;
if (path) {
// NOTE: fd is treated as dirfd for this syscall.
Syscall::SC_utimensat_params params { fd, { path, path_length }, times, flag };
rc = syscall(SC_utimensat, &params);
} else {
Syscall::SC_futimens_params params { fd, times };
rc = syscall(SC_futimens, &params);
}

__RETURN_WITH_ERRNO(rc, rc, -1);
}
}
2 changes: 0 additions & 2 deletions Userland/Libraries/LibC/fcntl.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,4 @@ int inode_watcher_remove_watch(int fd, int wd);
int posix_fadvise(int fd, off_t offset, off_t len, int advice);
int posix_fallocate(int fd, off_t offset, off_t len);

int utimensat(int dirfd, char const* path, struct timespec const times[2], int flag);

__END_DECLS
Loading