From 51264207ae94fda92d74484301a72d301ab22926 Mon Sep 17 00:00:00 2001 From: Wildan M Date: Sat, 14 Mar 2026 11:49:36 +0700 Subject: [PATCH] Partially port postgres, update valkey --- recipes/wip/db/postgresql18/recipe.toml | 15 +++++++ recipes/wip/db/postgresql18/redox.patch | 40 +++++++++++++++++++ .../wip/{dev/other => db}/valkey/recipe.toml | 9 +++-- recipes/wip/dev/lang/nodejs-21/recipe.toml | 2 +- 4 files changed, 61 insertions(+), 5 deletions(-) create mode 100644 recipes/wip/db/postgresql18/recipe.toml create mode 100644 recipes/wip/db/postgresql18/redox.patch rename recipes/wip/{dev/other => db}/valkey/recipe.toml (72%) diff --git a/recipes/wip/db/postgresql18/recipe.toml b/recipes/wip/db/postgresql18/recipe.toml new file mode 100644 index 000000000..7b636775b --- /dev/null +++ b/recipes/wip/db/postgresql18/recipe.toml @@ -0,0 +1,15 @@ +#TODO require sys/ipc.h +[source] +tar = "https://ftp.postgresql.org/pub/source/v18.3/postgresql-18.3.tar.bz2" +blake3 = "52696c9d474ce3e2073f97d4ba891af59ffc67a9dfb8f9f5adac409d1fe0dc28" +patches = [ + "redox.patch" +] +[build] +template = "meson" +mesonflags = [ +] +dependencies = [ + "zstd", + "readline", +] diff --git a/recipes/wip/db/postgresql18/redox.patch b/recipes/wip/db/postgresql18/redox.patch new file mode 100644 index 000000000..117068fe5 --- /dev/null +++ b/recipes/wip/db/postgresql18/redox.patch @@ -0,0 +1,40 @@ +diff --color -ruwN source/meson.build source-new/meson.build +--- source/meson.build 2026-02-24 04:56:43.000000000 +0700 ++++ source-new/meson.build 2026-03-14 10:58:35.570033768 +0700 +@@ -256,6 +256,10 @@ + # LDFLAGS. + ldflags += ['-Wl,-z,now', '-Wl,-z,relro'] + ++elif host_system == 'redox' ++ sema_kind = 'unnamed_posix' ++ shmem_kind = 'sysv' ++ + elif host_system == 'openbsd' + # you're ok + +diff --color -ruwN source/src/include/port/redox.h source-new/src/include/port/redox.h +--- source/src/include/port/redox.h 1970-01-01 07:00:00.000000000 +0700 ++++ source-new/src/include/port/redox.h 2026-03-14 10:50:26.877146350 +0700 +@@ -0,0 +1 @@ ++/* src/include/port/redox.h */ +diff --color -ruwN source/src/makefiles/Makefile.redox source-new/src/makefiles/Makefile.redox +--- source/src/makefiles/Makefile.redox 1970-01-01 07:00:00.000000000 +0700 ++++ source-new/src/makefiles/Makefile.redox 2026-03-14 10:51:25.313879766 +0700 +@@ -0,0 +1,6 @@ ++rpath = -Wl,-R'$(rpathdir)' ++ ++ ++# Rule for building a shared library from a single .o file ++%.so: %.o ++ $(CC) $(CFLAGS) $< $(LDFLAGS) $(LDFLAGS_SL) -shared -o $@ +diff --color -ruwN source/src/template/redox source-new/src/template/redox +--- source/src/template/redox 1970-01-01 07:00:00.000000000 +0700 ++++ source-new/src/template/redox 2026-03-14 10:55:40.896750233 +0700 +@@ -0,0 +1,7 @@ ++# src/template/redox ++ ++# Prefer unnamed POSIX semaphores ++PREFERRED_SEMAPHORES=UNNAMED_POSIX ++ ++# Extra CFLAGS for code that will go into a shared library ++CFLAGS_SL="-fPIC" diff --git a/recipes/wip/dev/other/valkey/recipe.toml b/recipes/wip/db/valkey/recipe.toml similarity index 72% rename from recipes/wip/dev/other/valkey/recipe.toml rename to recipes/wip/db/valkey/recipe.toml index 30c251925..41dea1359 100644 --- a/recipes/wip/dev/other/valkey/recipe.toml +++ b/recipes/wip/db/valkey/recipe.toml @@ -1,12 +1,13 @@ -#TODO Compiling, server crashes in page fault +#TODO Compiling, not tested [source] git = "https://github.com/valkey-io/valkey" -rev = "a47e8fa1505578d78cef5c5e11da0972c3dae560" # 8.1.3 +shallow_clone = true +rev = "9.0.3" [build] template = "custom" dependencies = [ - "openssl1" + "openssl3" ] script = """ @@ -14,6 +15,6 @@ rsync -av --delete "${COOKBOOK_SOURCE}"/* ./ ${COOKBOOK_MAKE} MALLOC=libc BUILD_TLS=yes \ WARN="-Wall -W -Wno-missing-field-initializers" \ WARNINGS="-Wall -W -Wno-missing-field-initializers" \ - AR="${TARGET}-gcc-ar" + AR="${TARGET}-gcc-ar" CFLAGS="${CFLAGS} ${CPPFLAGS}" ${COOKBOOK_MAKE} install PREFIX="${COOKBOOK_STAGE}"/usr """ diff --git a/recipes/wip/dev/lang/nodejs-21/recipe.toml b/recipes/wip/dev/lang/nodejs-21/recipe.toml index 1d08638e2..351b3db08 100644 --- a/recipes/wip/dev/lang/nodejs-21/recipe.toml +++ b/recipes/wip/dev/lang/nodejs-21/recipe.toml @@ -1,4 +1,4 @@ -#TODO node is working but ld.so crashing with npm +#TODO promote [source] tar = "https://nodejs.org/dist/v21.7.3/node-v21.7.3.tar.xz" blake3 = "95a56db4f9729b2f8384ab58ccb2ec0c41da05991f7400ef97bd76748d77870b"