diff --git a/recipes/wip/dev/lang/php-composer/recipe.toml b/recipes/dev/composer/recipe.toml similarity index 100% rename from recipes/wip/dev/lang/php-composer/recipe.toml rename to recipes/dev/composer/recipe.toml diff --git a/recipes/wip/dev/lang/php84/recipe.toml b/recipes/dev/php84/recipe.toml similarity index 85% rename from recipes/wip/dev/lang/php84/recipe.toml rename to recipes/dev/php84/recipe.toml index b15b88685..f7fc503b8 100644 --- a/recipes/wip/dev/lang/php84/recipe.toml +++ b/recipes/dev/php84/recipe.toml @@ -1,4 +1,3 @@ -#TODO promote [source] tar = "https://www.php.net/distributions/php-8.4.12.tar.xz" patches = [ @@ -32,6 +31,7 @@ dependencies = [ "sqlite3", "xz", "zlib", + "zstd", ] script = """ DYNAMIC_INIT @@ -40,14 +40,14 @@ export SUFFIX="84" export CURL_LIBS="-lcurl -lnghttp2 -lssl -lcrypto" COOKBOOK_CONFIGURE_FLAGS+=( --program-suffix=${SUFFIX} - --sysconfdir=/etc + --sysconfdir=/etc/php/$SUFFIX --with-config-file-path=/etc/php/$SUFFIX --with-config-file-scan-dir=/etc/php/$SUFFIX/conf.d --with-iconv="${COOKBOOK_SYSROOT}/usr" --disable-opcache --enable-bcmath --enable-calendar -# --enable-fpm # need times function + --enable-fpm # need times function --enable-gd --enable-intl --enable-mbstring @@ -70,9 +70,11 @@ COOKBOOK_CONFIGURE_FLAGS+=( INSTALL_ROOT="${COOKBOOK_STAGE}" \ datarootdir=/usr/share localstatedir=/var -for bin in "php-cgi" "php-config" "php" "phpdbg" "phpize"; do +mv ${COOKBOOK_STAGE}/usr/sbin/* ${COOKBOOK_STAGE}/usr/bin/ +for bin in "php-cgi" "php-config" "php" "phpdbg" "phpize" "php-fpm"; do ln -s "$bin$SUFFIX" ${COOKBOOK_STAGE}/usr/bin/$bin done +rm ${COOKBOOK_STAGE}/usr/bin/phar$SUFFIX mkdir -p ${COOKBOOK_STAGE}/etc/php/$SUFFIX/conf.d cp ${COOKBOOK_SOURCE}/php.ini* ${COOKBOOK_STAGE}/etc/php/$SUFFIX/ """ diff --git a/recipes/dev/php84/redox.patch b/recipes/dev/php84/redox.patch new file mode 100644 index 000000000..25308e146 --- /dev/null +++ b/recipes/dev/php84/redox.patch @@ -0,0 +1,89 @@ +diff -ruwN source/configure source-new/configure +--- source/configure 2025-08-26 20:36:28.000000000 +0700 ++++ source-new/configure 2025-09-26 16:31:28.871157195 +0700 +@@ -25863,7 +25863,7 @@ + then : + ac_cv_lib_curl_curl_easy_perform=yes + else case e in #( +- e) ac_cv_lib_curl_curl_easy_perform=no ;; ++ e) ac_cv_lib_curl_curl_easy_perform=yes ;; + esac + fi + rm -f core conftest.err conftest.$ac_objext conftest.beam \ +@@ -37356,7 +37356,7 @@ + then : + php_cv_lib_gd_works=yes + else case e in #( +- e) php_cv_lib_gd_works=no ;; ++ e) php_cv_lib_gd_works=yes ;; + esac + fi + rm -f core conftest.err conftest.$ac_objext conftest.beam \ +@@ -40056,7 +40056,7 @@ + LIBS_SAVED=$LIBS + CFLAGS="$CFLAGS $GMP_CFLAGS" + LIBS="$LIBS $GMP_LIBS" +- gmp_check=no ++ gmp_check=yes + ac_fn_c_check_header_compile "$LINENO" "gmp.h" "ac_cv_header_gmp_h" "$ac_includes_default" + if test "x$ac_cv_header_gmp_h" = xyes + then : +diff -ruwN source/ext/phar/Makefile.frag source-new/ext/phar/Makefile.frag +--- source/ext/phar/Makefile.frag 2025-08-26 20:36:28.000000000 +0700 ++++ source-new/ext/phar/Makefile.frag 2025-09-26 16:31:29.029526842 +0700 +@@ -30,7 +30,7 @@ + -@test -f $(builddir)/phar/phar.inc || cp $(srcdir)/phar/phar.inc $(builddir)/phar/phar.inc + + TEST_PHP_EXECUTABLE = $(shell $(PHP_EXECUTABLE) -v 2>&1) +-TEST_PHP_EXECUTABLE_RES = $(shell echo "$(TEST_PHP_EXECUTABLE)" | grep -c 'Exec format error') ++TEST_PHP_EXECUTABLE_RES = $(shell echo "$(TEST_PHP_EXECUTABLE)" | grep -E -c 'Exec format error|required file not found') + + $(builddir)/phar.php: $(srcdir)/build_precommand.php $(srcdir)/phar/*.inc $(srcdir)/phar/*.php $(SAPI_CLI_PATH) + -@(echo "Generating phar.php"; \ +diff -ruwN source/ext/posix/posix.c source-new/ext/posix/posix.c +--- source/ext/posix/posix.c 2025-08-26 20:36:28.000000000 +0700 ++++ source-new/ext/posix/posix.c 2025-09-26 16:31:29.085983450 +0700 +@@ -375,7 +375,7 @@ + + ZEND_PARSE_PARAMETERS_NONE(); + +- if ((ticks = times(&t)) == -1) { ++ { + POSIX_G(last_error) = errno; + RETURN_FALSE; + } +diff -ruwN source/sapi/fpm/fpm/fpm_status.c source-new/sapi/fpm/fpm/fpm_status.c +--- source/sapi/fpm/fpm/fpm_status.c 2025-08-26 20:36:28.000000000 +0700 ++++ source-new/sapi/fpm/fpm/fpm_status.c 2025-09-27 01:07:38.657514932 +0700 +@@ -104,11 +104,15 @@ + } + proc_p = &procs[i]; + /* prevent NaN */ ++#ifdef HAVE_TIMES + if (procs[i].cpu_duration.tv_sec == 0 && procs[i].cpu_duration.tv_usec == 0) { + cpu = 0.; + } else { + cpu = (procs[i].last_request_cpu.tms_utime + procs[i].last_request_cpu.tms_stime + procs[i].last_request_cpu.tms_cutime + procs[i].last_request_cpu.tms_cstime) / fpm_scoreboard_get_tick() / (procs[i].cpu_duration.tv_sec + procs[i].cpu_duration.tv_usec / 1000000.) * 100.; + } ++#else ++ cpu = 0.; ++#endif + + array_init(&fpm_proc_stat); + add_assoc_long(&fpm_proc_stat, "pid", procs[i].pid); +@@ -590,11 +594,15 @@ + } + + /* prevent NaN */ ++#ifdef HAVE_TIMES + if (proc->cpu_duration.tv_sec == 0 && proc->cpu_duration.tv_usec == 0) { + cpu = 0.; + } else { + cpu = (proc->last_request_cpu.tms_utime + proc->last_request_cpu.tms_stime + proc->last_request_cpu.tms_cutime + proc->last_request_cpu.tms_cstime) / fpm_scoreboard_get_tick() / (proc->cpu_duration.tv_sec + proc->cpu_duration.tv_usec / 1000000.) * 100.; + } ++#else ++ cpu = 0.; ++#endif + + if (proc->request_stage == FPM_REQUEST_ACCEPTING) { + duration = proc->duration; diff --git a/recipes/wip/dev/lang/python312/recipe.toml b/recipes/dev/python312/recipe.toml similarity index 76% rename from recipes/wip/dev/lang/python312/recipe.toml rename to recipes/dev/python312/recipe.toml index 09bbee22e..1209eb07b 100644 --- a/recipes/wip/dev/lang/python312/recipe.toml +++ b/recipes/dev/python312/recipe.toml @@ -1,4 +1,3 @@ -#TODO works without pip [source] tar = "https://www.python.org/ftp/python/3.12.0/Python-3.12.0.tar.xz" patches = [ @@ -17,13 +16,18 @@ dependencies = [ "readline", "sqlite3", "zlib", - "xz" + "xz", + "zstd", ] script = """ DYNAMIC_INIT export PYTHONDONTWRITEBYTECODE=1 ARCH="${TARGET%%-*}" +# Packages are considerably larger because of this issue +# https://gitlab.redox-os.org/redox-os/relibc/-/issues/227 +export MODULE_BUILDTYPE=static + COOKBOOK_CONFIGURE_FLAGS=( --prefix=/usr --enable-shared @@ -32,6 +36,7 @@ COOKBOOK_CONFIGURE_FLAGS=( --build=$ARCH --with-build-python --with-ensurepip=install + --disable-test-modules ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no ) diff --git a/recipes/wip/dev/lang/python312/redox.patch b/recipes/dev/python312/redox.patch similarity index 100% rename from recipes/wip/dev/lang/python312/redox.patch rename to recipes/dev/python312/redox.patch diff --git a/recipes/wip/net/http/nginx/recipe.toml b/recipes/net/nginx/recipe.toml similarity index 88% rename from recipes/wip/net/http/nginx/recipe.toml rename to recipes/net/nginx/recipe.toml index da416dcae..e6583d63b 100644 --- a/recipes/wip/net/http/nginx/recipe.toml +++ b/recipes/net/nginx/recipe.toml @@ -56,5 +56,9 @@ unset AR AS CC CXX LD LDFLAGS NM OBJCOPY OBJDUMP RANLIB READELF RUSTFLAGS STRIP cookbook_configure -mkdir -p "$COOKBOOK_STAGE"/var/lib/nginx/{body,proxy,fastcgi,uwsgi,scgi} +mkdir -p "$COOKBOOK_STAGE"/var/lib/nginx/{body,proxy,fastcgi,uwsgi,scgi} \ + "$COOKBOOK_STAGE"/var/log/nginx/ +#TODO: pkgar don't track empty directories +touch "$COOKBOOK_STAGE"/var/lib/nginx/{body,proxy,fastcgi,uwsgi,scgi}/.tmp \ + "$COOKBOOK_STAGE"/var/log/nginx/.tmp """ diff --git a/recipes/wip/net/http/nginx/redox.patch b/recipes/net/nginx/redox.patch similarity index 100% rename from recipes/wip/net/http/nginx/redox.patch rename to recipes/net/nginx/redox.patch diff --git a/recipes/wip/ssh/openssh/recipe.toml b/recipes/net/openssh/recipe.toml similarity index 100% rename from recipes/wip/ssh/openssh/recipe.toml rename to recipes/net/openssh/recipe.toml diff --git a/recipes/wip/ssh/openssh/redox.patch b/recipes/net/openssh/redox.patch similarity index 100% rename from recipes/wip/ssh/openssh/redox.patch rename to recipes/net/openssh/redox.patch diff --git a/recipes/web/website/recipe.toml b/recipes/web/website/recipe.toml index 4df01db06..e9d240f19 100644 --- a/recipes/web/website/recipe.toml +++ b/recipes/web/website/recipe.toml @@ -3,6 +3,7 @@ git = "https://gitlab.redox-os.org/redox-os/website" [build] template = "custom" script = """ +rsync -a "${COOKBOOK_SOURCE}/" ./ ./hugo.sh mkdir -pv "${COOKBOOK_STAGE}"/usr/share/website cp -rv "${COOKBOOK_BUILD}"/build/public/* "${COOKBOOK_STAGE}"/usr/share/website diff --git a/recipes/wip/dev/lang/go/recipe.toml b/recipes/wip/dev/lang/go/recipe.toml index 906c92530..278f374bf 100644 --- a/recipes/wip/dev/lang/go/recipe.toml +++ b/recipes/wip/dev/lang/go/recipe.toml @@ -41,7 +41,7 @@ rsync -a bin/redox_${GOARCH}/* "${COOKBOOK_STAGE}"/usr/lib/golang/bin/ rsync -a lib/* "${COOKBOOK_STAGE}"/usr/lib/golang/lib/ rsync -a misc/* "${COOKBOOK_STAGE}"/usr/lib/golang/misc/ rsync -a pkg/include/* "${COOKBOOK_STAGE}"/usr/lib/golang/pkg/include/ -rsync -a pkg/tool/redox_${GOARCH}/* "${COOKBOOK_STAGE}"/usr/lib/golang/pkg/tool/ +rsync -a pkg/tool/redox_${GOARCH} "${COOKBOOK_STAGE}"/usr/lib/golang/pkg/tool/ rsync -a src/* "${COOKBOOK_STAGE}"/usr/lib/golang/src/ cat go.env > "${COOKBOOK_STAGE}"/usr/lib/golang/go.env ln -s "../lib/golang/bin/go" "${COOKBOOK_STAGE}"/usr/bin/go diff --git a/recipes/wip/dev/lang/php84/redox.patch b/recipes/wip/dev/lang/php84/redox.patch deleted file mode 100644 index 916f9fa3d..000000000 --- a/recipes/wip/dev/lang/php84/redox.patch +++ /dev/null @@ -1,54 +0,0 @@ -diff --color -ruwN source/configure source-new/configure ---- source/configure 2025-08-26 20:36:28.000000000 +0700 -+++ source-new/configure 2025-09-16 07:50:56.962975667 +0700 -@@ -25863,7 +25863,7 @@ - then : - ac_cv_lib_curl_curl_easy_perform=yes - else case e in #( -- e) ac_cv_lib_curl_curl_easy_perform=no ;; -+ e) ac_cv_lib_curl_curl_easy_perform=yes ;; - esac - fi - rm -f core conftest.err conftest.$ac_objext conftest.beam \ -@@ -37356,7 +37356,7 @@ - then : - php_cv_lib_gd_works=yes - else case e in #( -- e) php_cv_lib_gd_works=no ;; -+ e) php_cv_lib_gd_works=yes ;; - esac - fi - rm -f core conftest.err conftest.$ac_objext conftest.beam \ -@@ -40056,7 +40056,7 @@ - LIBS_SAVED=$LIBS - CFLAGS="$CFLAGS $GMP_CFLAGS" - LIBS="$LIBS $GMP_LIBS" -- gmp_check=no -+ gmp_check=yes - ac_fn_c_check_header_compile "$LINENO" "gmp.h" "ac_cv_header_gmp_h" "$ac_includes_default" - if test "x$ac_cv_header_gmp_h" = xyes - then : -diff --color -ruwN source/ext/phar/Makefile.frag source-new/ext/phar/Makefile.frag ---- source/ext/phar/Makefile.frag 2025-08-26 20:36:28.000000000 +0700 -+++ source-new/ext/phar/Makefile.frag 2025-09-18 07:37:43.264765180 +0700 -@@ -30,7 +30,7 @@ - -@test -f $(builddir)/phar/phar.inc || cp $(srcdir)/phar/phar.inc $(builddir)/phar/phar.inc - - TEST_PHP_EXECUTABLE = $(shell $(PHP_EXECUTABLE) -v 2>&1) --TEST_PHP_EXECUTABLE_RES = $(shell echo "$(TEST_PHP_EXECUTABLE)" | grep -c 'Exec format error') -+TEST_PHP_EXECUTABLE_RES = $(shell echo "$(TEST_PHP_EXECUTABLE)" | grep -E -c 'Exec format error|required file not found') - - $(builddir)/phar.php: $(srcdir)/build_precommand.php $(srcdir)/phar/*.inc $(srcdir)/phar/*.php $(SAPI_CLI_PATH) - -@(echo "Generating phar.php"; \ -diff --color -ruwN source/ext/posix/posix.c source-new/ext/posix/posix.c ---- source/ext/posix/posix.c 2025-08-26 20:36:28.000000000 +0700 -+++ source-new/ext/posix/posix.c 2025-09-16 07:50:56.989976200 +0700 -@@ -375,7 +375,7 @@ - - ZEND_PARSE_PARAMETERS_NONE(); - -- if ((ticks = times(&t)) == -1) { -+ { - POSIX_G(last_error) = errno; - RETURN_FALSE; - } diff --git a/recipes/wip/games/music/composer/recipe.toml b/recipes/wip/games/music/performous-composer/recipe.toml similarity index 100% rename from recipes/wip/games/music/composer/recipe.toml rename to recipes/wip/games/music/performous-composer/recipe.toml diff --git a/recipes/wip/libs/other/libonig/recipe.toml b/recipes/wip/libs/other/libonig/recipe.toml index 9633af050..894e8b0a8 100644 --- a/recipes/wip/libs/other/libonig/recipe.toml +++ b/recipes/wip/libs/other/libonig/recipe.toml @@ -1,5 +1,6 @@ [source] git = "https://github.com/kkos/oniguruma" +rev = "f95747b462de672b6f8dbdeb478245ddf061ca53" script = """ DYNAMIC_INIT autotools_recursive_regenerate