From c282bde1cc5281aa56095acf6c13a3eae5a7d599 Mon Sep 17 00:00:00 2001 From: auronandace Date: Sun, 3 Aug 2025 15:45:10 +0100 Subject: [PATCH 01/12] add os-test recipe --- recipes/tests/os-test/recipe.toml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 recipes/tests/os-test/recipe.toml diff --git a/recipes/tests/os-test/recipe.toml b/recipes/tests/os-test/recipe.toml new file mode 100644 index 000000000..08de29695 --- /dev/null +++ b/recipes/tests/os-test/recipe.toml @@ -0,0 +1,18 @@ +[source] +git = "https://gitlab.com/sortix/os-test" + +[build] +template = "custom" +script = """ +rsync -av --delete "${COOKBOOK_SOURCE}/" ./ +mkdir -pv "${COOKBOOK_STAGE}/share/os-test" +rsync -av --delete . "${COOKBOOK_STAGE}/share/os-test" +""" + +[package] +dependencies = [ + "gnu-binutils", + "gnu-make", + "gcc13", + "libarchive" +] From 464bc977b49994ce35913ce61e50c6fabbde1466 Mon Sep 17 00:00:00 2001 From: auronandace Date: Mon, 4 Aug 2025 16:33:10 +0100 Subject: [PATCH 02/12] use cp instead of rsync --- recipes/tests/os-test/recipe.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/recipes/tests/os-test/recipe.toml b/recipes/tests/os-test/recipe.toml index 08de29695..db2771367 100644 --- a/recipes/tests/os-test/recipe.toml +++ b/recipes/tests/os-test/recipe.toml @@ -4,9 +4,8 @@ git = "https://gitlab.com/sortix/os-test" [build] template = "custom" script = """ -rsync -av --delete "${COOKBOOK_SOURCE}/" ./ mkdir -pv "${COOKBOOK_STAGE}/share/os-test" -rsync -av --delete . "${COOKBOOK_STAGE}/share/os-test" +cp -rv "${COOKBOOK_SOURCE}"/* "${COOKBOOK_STAGE}/share/os-test" """ [package] From 2afdaac5be2106b4584c508e9352542460e84fe9 Mon Sep 17 00:00:00 2001 From: Ribbon Date: Fri, 15 Aug 2025 03:21:42 -0300 Subject: [PATCH 03/12] Add recipes --- recipes/wip/analysis/flowgger/recipe.toml | 6 ++++++ recipes/wip/data-integrity/rapidhash/recipe.toml | 8 ++++++++ recipes/wip/demos/iocraft/recipe.toml | 10 ++++++++++ recipes/wip/demos/rustui/recipe.toml | 9 +++++++++ recipes/wip/dev/lang/tur/recipe.toml | 8 ++++++++ recipes/wip/fuse/lis/recipe.toml | 8 ++++++++ recipes/wip/image/converters/dipc/recipe.toml | 5 +++++ recipes/wip/net/p2p/dumbpipe/recipe.toml | 5 +++++ recipes/wip/net/remote/zeco/recipe.toml | 5 +++++ recipes/wip/net/server/vproxy/recipe.toml | 5 +++++ 10 files changed, 69 insertions(+) create mode 100644 recipes/wip/analysis/flowgger/recipe.toml create mode 100644 recipes/wip/data-integrity/rapidhash/recipe.toml create mode 100644 recipes/wip/demos/iocraft/recipe.toml create mode 100644 recipes/wip/demos/rustui/recipe.toml create mode 100644 recipes/wip/dev/lang/tur/recipe.toml create mode 100644 recipes/wip/fuse/lis/recipe.toml create mode 100644 recipes/wip/image/converters/dipc/recipe.toml create mode 100644 recipes/wip/net/p2p/dumbpipe/recipe.toml create mode 100644 recipes/wip/net/remote/zeco/recipe.toml create mode 100644 recipes/wip/net/server/vproxy/recipe.toml diff --git a/recipes/wip/analysis/flowgger/recipe.toml b/recipes/wip/analysis/flowgger/recipe.toml new file mode 100644 index 000000000..efcaed09d --- /dev/null +++ b/recipes/wip/analysis/flowgger/recipe.toml @@ -0,0 +1,6 @@ +#TODO not compiled or tested +# build instructions: https://github.com/awslabs/flowgger/wiki/Installation +[source] +git = "https://github.com/awslabs/flowgger" +[build] +template = "cargo" diff --git a/recipes/wip/data-integrity/rapidhash/recipe.toml b/recipes/wip/data-integrity/rapidhash/recipe.toml new file mode 100644 index 000000000..c1c746e76 --- /dev/null +++ b/recipes/wip/data-integrity/rapidhash/recipe.toml @@ -0,0 +1,8 @@ +#TODO not compiled or tested +[source] +git = "https://github.com/hoxxep/rapidhash" +[build] +template = "custom" +script = """ +cookbook_cargo_packages rapidhash +""" diff --git a/recipes/wip/demos/iocraft/recipe.toml b/recipes/wip/demos/iocraft/recipe.toml new file mode 100644 index 000000000..18ad8f48f --- /dev/null +++ b/recipes/wip/demos/iocraft/recipe.toml @@ -0,0 +1,10 @@ +#TODO not compiled or tested +[source] +git = "https://github.com/ccbrown/iocraft" +[build] +template = "custom" +script = """ +cookbook_cargo_examples borders calculator counter \ +fullscreen hello_world overlap progress_bar scrolling \ +table use_input use_output weather +""" diff --git a/recipes/wip/demos/rustui/recipe.toml b/recipes/wip/demos/rustui/recipe.toml new file mode 100644 index 000000000..cda858c7b --- /dev/null +++ b/recipes/wip/demos/rustui/recipe.toml @@ -0,0 +1,9 @@ +#TODO not compiled or tested +[source] +git = "https://github.com/broccolingual/rustui" +[build] +template = "custom" +script = """ +cookbook_cargo_examples hello_world colors inputs file_reader +cookbook_cargo_packages tetris +""" diff --git a/recipes/wip/dev/lang/tur/recipe.toml b/recipes/wip/dev/lang/tur/recipe.toml new file mode 100644 index 000000000..13ffc9d4c --- /dev/null +++ b/recipes/wip/dev/lang/tur/recipe.toml @@ -0,0 +1,8 @@ +#TODO not compiled or tested +[source] +git = "https://github.com/rezigned/tur" +[build] +template = "custom" +script = """ +cookbook_cargo_packages tur-cli tur-tui +""" diff --git a/recipes/wip/fuse/lis/recipe.toml b/recipes/wip/fuse/lis/recipe.toml new file mode 100644 index 000000000..400e1fbd9 --- /dev/null +++ b/recipes/wip/fuse/lis/recipe.toml @@ -0,0 +1,8 @@ +#TODO not compiled or tested +[source] +git = "https://github.com/riffcc/lis" +[build] +template = "cargo" +dependencies = [ + "libfuse3", +] diff --git a/recipes/wip/image/converters/dipc/recipe.toml b/recipes/wip/image/converters/dipc/recipe.toml new file mode 100644 index 000000000..a4bdfb619 --- /dev/null +++ b/recipes/wip/image/converters/dipc/recipe.toml @@ -0,0 +1,5 @@ +#TODO not compiled or tested +[source] +git = "https://github.com/doprz/dipc" +[build] +template = "cargo" diff --git a/recipes/wip/net/p2p/dumbpipe/recipe.toml b/recipes/wip/net/p2p/dumbpipe/recipe.toml new file mode 100644 index 000000000..4ae3400fc --- /dev/null +++ b/recipes/wip/net/p2p/dumbpipe/recipe.toml @@ -0,0 +1,5 @@ +#TODO not compiled or tested +[source] +git = "https://github.com/n0-computer/dumbpipe" +[build] +template = "cargo" diff --git a/recipes/wip/net/remote/zeco/recipe.toml b/recipes/wip/net/remote/zeco/recipe.toml new file mode 100644 index 000000000..8a4e04275 --- /dev/null +++ b/recipes/wip/net/remote/zeco/recipe.toml @@ -0,0 +1,5 @@ +#TODO not compiled or tested +[source] +git = "https://github.com/julianbuettner/zeco" +[build] +template = "cargo" diff --git a/recipes/wip/net/server/vproxy/recipe.toml b/recipes/wip/net/server/vproxy/recipe.toml new file mode 100644 index 000000000..db161785d --- /dev/null +++ b/recipes/wip/net/server/vproxy/recipe.toml @@ -0,0 +1,5 @@ +#TODO not compiled or tested +[source] +git = "https://github.com/0x676e67/vproxy" +[build] +template = "cargo" From 85613a52b496858d639c668825ff29ed18c1b2e3 Mon Sep 17 00:00:00 2001 From: Ribbon Date: Fri, 15 Aug 2025 03:31:54 -0300 Subject: [PATCH 04/12] Add recipes --- recipes/wip/net/lan/malai/recipe.toml | 8 ++++++++ recipes/wip/net/remote/do-ssh/recipe.toml | 5 +++++ recipes/wip/net/remote/iroh-ssh/recipe.toml | 5 +++++ recipes/wip/net/sharing/sendme/recipe.toml | 5 +++++ 4 files changed, 23 insertions(+) create mode 100644 recipes/wip/net/lan/malai/recipe.toml create mode 100644 recipes/wip/net/remote/do-ssh/recipe.toml create mode 100644 recipes/wip/net/remote/iroh-ssh/recipe.toml create mode 100644 recipes/wip/net/sharing/sendme/recipe.toml diff --git a/recipes/wip/net/lan/malai/recipe.toml b/recipes/wip/net/lan/malai/recipe.toml new file mode 100644 index 000000000..237c72592 --- /dev/null +++ b/recipes/wip/net/lan/malai/recipe.toml @@ -0,0 +1,8 @@ +#TODO not compiled or tested +[source] +git = "https://github.com/fastn-stack/kulfi" +[build] +template = "custom" +script = """ +cookbook_cargo_packages malai +""" diff --git a/recipes/wip/net/remote/do-ssh/recipe.toml b/recipes/wip/net/remote/do-ssh/recipe.toml new file mode 100644 index 000000000..41632fc5e --- /dev/null +++ b/recipes/wip/net/remote/do-ssh/recipe.toml @@ -0,0 +1,5 @@ +#TODO not compiled or tested +[source] +git = "https://github.com/doEggi/do-ssh" +[build] +template = "cargo" diff --git a/recipes/wip/net/remote/iroh-ssh/recipe.toml b/recipes/wip/net/remote/iroh-ssh/recipe.toml new file mode 100644 index 000000000..3af3dc0f1 --- /dev/null +++ b/recipes/wip/net/remote/iroh-ssh/recipe.toml @@ -0,0 +1,5 @@ +#TODO not compiled or tested +[source] +git = "https://github.com/rustonbsd/iroh-ssh" +[build] +template = "cargo" diff --git a/recipes/wip/net/sharing/sendme/recipe.toml b/recipes/wip/net/sharing/sendme/recipe.toml new file mode 100644 index 000000000..e4162119a --- /dev/null +++ b/recipes/wip/net/sharing/sendme/recipe.toml @@ -0,0 +1,5 @@ +#TODO not compiled or tested +[source] +git = "https://github.com/n0-computer/sendme" +[build] +template = "cargo" From db7d763fe694fcf1f3086e333e100a1115682402 Mon Sep 17 00:00:00 2001 From: Mathew John Roberts Date: Fri, 15 Aug 2025 07:56:56 +0100 Subject: [PATCH 05/12] Apply 1 suggestion(s) to 1 file(s) Co-authored-by: Ribbon --- recipes/tests/os-test/recipe.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/tests/os-test/recipe.toml b/recipes/tests/os-test/recipe.toml index db2771367..59467c204 100644 --- a/recipes/tests/os-test/recipe.toml +++ b/recipes/tests/os-test/recipe.toml @@ -13,5 +13,5 @@ dependencies = [ "gnu-binutils", "gnu-make", "gcc13", - "libarchive" + "libarchive", ] From efd3485ecda13e5c7ef13224d1d6db2c6025fbaf Mon Sep 17 00:00:00 2001 From: Wildan Mubarok Date: Fri, 15 Aug 2025 08:36:48 +0000 Subject: [PATCH 06/12] Only include subset of terminfo --- recipes/other/terminfo/recipe.toml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/recipes/other/terminfo/recipe.toml b/recipes/other/terminfo/recipe.toml index 856ea8735..ea8ed3129 100644 --- a/recipes/other/terminfo/recipe.toml +++ b/recipes/other/terminfo/recipe.toml @@ -5,7 +5,14 @@ branch = "master" [build] template = "custom" script = """ -mkdir -p ${COOKBOOK_STAGE}/share -cp -r ${COOKBOOK_SOURCE}/. ${COOKBOOK_STAGE}/share/ +# only copy common TERM envar +mkdir -p ${COOKBOOK_STAGE}/share/terminfo/{a,d,l,s,t,v,x} +cp -r ${COOKBOOK_SOURCE}/tabset ${COOKBOOK_STAGE}/share/ +cp ${COOKBOOK_SOURCE}/terminfo/a/ansi{,-*} ${COOKBOOK_STAGE}/share/terminfo/a/ +cp ${COOKBOOK_SOURCE}/terminfo/d/dumb{,-*} ${COOKBOOK_STAGE}/share/terminfo/d/ +cp ${COOKBOOK_SOURCE}/terminfo/l/linux{,-*} ${COOKBOOK_STAGE}/share/terminfo/l/ +cp ${COOKBOOK_SOURCE}/terminfo/s/screen{,-*} ${COOKBOOK_STAGE}/share/terminfo/s/ +cp ${COOKBOOK_SOURCE}/terminfo/t/tmux{,-*} ${COOKBOOK_STAGE}/share/terminfo/t/ +cp ${COOKBOOK_SOURCE}/terminfo/v/vt100{,-*} ${COOKBOOK_STAGE}/share/terminfo/v/ +cp ${COOKBOOK_SOURCE}/terminfo/x/xterm{,-*} ${COOKBOOK_STAGE}/share/terminfo/x/ """ - From 3da709fb1fc1a67dfa9e97a72e095c8a3c67cdfd Mon Sep 17 00:00:00 2001 From: Wildan M Date: Mon, 18 Aug 2025 08:45:52 +0700 Subject: [PATCH 07/12] Cache auto deps --- cook.sh | 1 + src/bin/cook.rs | 86 +++++++++++++++++++++++++++++++++---------------- src/recipe.rs | 7 +++- 3 files changed, 65 insertions(+), 29 deletions(-) diff --git a/cook.sh b/cook.sh index 521668f94..6435f2cce 100755 --- a/cook.sh +++ b/cook.sh @@ -288,6 +288,7 @@ function op { ;; unstage) rm -rfv "${COOKBOOK_STAGE}" + rm -fv "${TARGET_DIR}/auto_deps.toml" ;; pkg) pkgar \ diff --git a/src/bin/cook.rs b/src/bin/cook.rs index 4002f712d..77a8b2698 100644 --- a/src/bin/cook.rs +++ b/src/bin/cook.rs @@ -1,7 +1,8 @@ use cookbook::blake3::blake3_progress; -use cookbook::recipe::{BuildKind, CookRecipe, Recipe, SourceRecipe}; +use cookbook::recipe::{AutoDeps, BuildKind, CookRecipe, Recipe, SourceRecipe}; use pkg::package::Package; use pkg::{recipes, PackageName}; +use serde::Serialize; use std::collections::VecDeque; use std::convert::TryInto; use std::{ @@ -187,6 +188,20 @@ fn run_command_stdin(mut command: process::Command, stdin_data: &[u8]) -> Result Ok(()) } +fn serialize_and_write(file_path: &Path, content: &T) -> Result<(), String> { + let toml_content = toml::to_string(content).map_err(|err| { + format!( + "Failed to serialize content for '{}': {}", + file_path.display(), + err + ) + })?; + + fs::write(file_path, toml_content) + .map_err(|err| format!("Failed to write to file '{}': {}", file_path.display(), err))?; + Ok(()) +} + static SHARED_PRESCRIPT: &str = r#" function DYNAMIC_INIT { COOKBOOK_AUTORECONF="autoreconf" @@ -704,16 +719,16 @@ fn build( let sysroot_dir = target_dir.join("sysroot"); // Rebuild sysroot if source is newer //TODO: rebuild on recipe changes - if sysroot_dir.is_dir() - && (modified_dir(&sysroot_dir)? < source_modified - || modified_dir(&sysroot_dir)? < deps_modified) - { - eprintln!( - "DEBUG: '{}' newer than '{}'", - source_dir.display(), - sysroot_dir.display() - ); - remove_all(&sysroot_dir)?; + if sysroot_dir.is_dir() { + let sysroot_modified = modified_dir(&sysroot_dir)?; + if sysroot_modified < source_modified || sysroot_modified < deps_modified { + eprintln!( + "DEBUG: '{}' newer than '{}'", + source_dir.display(), + sysroot_dir.display() + ); + remove_all(&sysroot_dir)?; + } } if !sysroot_dir.is_dir() { // Create sysroot.tmp @@ -754,16 +769,16 @@ fn build( let stage_dir = target_dir.join("stage"); // Rebuild stage if source is newer //TODO: rebuild on recipe changes - if stage_dir.is_dir() - && (modified_dir(&stage_dir)? < source_modified - || modified_dir(&stage_dir)? < deps_modified) - { - eprintln!( - "DEBUG: '{}' newer than '{}'", - source_dir.display(), - stage_dir.display() - ); - remove_all(&stage_dir)?; + if stage_dir.is_dir() { + let stage_modified = modified_dir(&stage_dir)?; + if stage_modified < source_modified || stage_modified < deps_modified { + eprintln!( + "DEBUG: '{}' newer than '{}'", + source_dir.display(), + stage_dir.display() + ); + remove_all(&stage_dir)?; + } } if !stage_dir.is_dir() { @@ -1069,8 +1084,24 @@ done rename(&stage_dir_tmp, &stage_dir)?; } - // Calculate automatic dependencies - let auto_deps = auto_deps(&stage_dir, &dep_pkgars); + let auto_deps_path = target_dir.join("auto_deps.toml"); + + if auto_deps_path.is_file() && modified(&auto_deps_path)? < modified(&stage_dir)? { + remove_all(&auto_deps_path)? + } + + let auto_deps = if auto_deps_path.exists() { + let toml_content = + fs::read_to_string(&auto_deps_path).map_err(|_| "failed to read cached auto_deps")?; + let wrapper: AutoDeps = + toml::from_str(&toml_content).map_err(|_| "failed to deserialize cached auto_deps")?; + wrapper.packages + } else { + let packages = auto_deps(&stage_dir, &dep_pkgars); + let wrapper = AutoDeps { packages }; + serialize_and_write(&auto_deps_path, &wrapper)?; + wrapper.packages + }; Ok((stage_dir, auto_deps)) } @@ -1137,15 +1168,14 @@ fn package_toml( depends.push(dep.clone()); } } - let stage_toml = toml::to_string(&Package { + let package = Package { name: name.clone(), version: package_version(recipe), target: env::var("TARGET").map_err(|err| format!("failed to read TARGET: {:?}", err))?, depends, - }) - .map_err(|err| format!("failed to serialize stage.toml: {:?}", err))?; - fs::write(target_dir.join("stage.toml"), stage_toml) - .map_err(|err| format!("failed to write stage.toml: {:?}", err))?; + }; + + serialize_and_write(&target_dir.join("stage.toml"), &package)?; return Ok(()); } diff --git a/src/recipe.rs b/src/recipe.rs index 4341551d7..0a0b49347 100644 --- a/src/recipe.rs +++ b/src/recipe.rs @@ -1,4 +1,4 @@ -use std::{convert::TryInto, fs, path::PathBuf}; +use std::{collections::BTreeSet, convert::TryInto, fs, path::PathBuf}; use pkg::{package::PackageError, recipes, PackageName}; use serde::{ @@ -215,6 +215,11 @@ impl CookRecipe { } } +#[derive(Serialize, Deserialize)] +pub struct AutoDeps { + pub packages: BTreeSet, +} + #[cfg(test)] mod tests { use pkg::PackageName; From fec945560ee0f005d03714f604f75a2e2228b5c6 Mon Sep 17 00:00:00 2001 From: Wildan Mubarok Date: Mon, 18 Aug 2025 02:00:58 +0000 Subject: [PATCH 08/12] Retain comment --- src/bin/cook.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bin/cook.rs b/src/bin/cook.rs index 77a8b2698..dde130ffa 100644 --- a/src/bin/cook.rs +++ b/src/bin/cook.rs @@ -1084,6 +1084,7 @@ done rename(&stage_dir_tmp, &stage_dir)?; } + // Calculate automatic dependencies let auto_deps_path = target_dir.join("auto_deps.toml"); if auto_deps_path.is_file() && modified(&auto_deps_path)? < modified(&stage_dir)? { From c64fb342b41ea317b6c843f428b72f28c7bc1af8 Mon Sep 17 00:00:00 2001 From: Bendeguz Pisch Date: Wed, 20 Aug 2025 10:12:02 +0200 Subject: [PATCH 09/12] Move miniserve to wip/net/http, change it to toml and change source to upstream --- recipes/tools/miniserve/recipe.sh | 2 -- recipes/wip/net/http/miniserve/recipe.toml | 12 ++++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) delete mode 100644 recipes/tools/miniserve/recipe.sh create mode 100644 recipes/wip/net/http/miniserve/recipe.toml diff --git a/recipes/tools/miniserve/recipe.sh b/recipes/tools/miniserve/recipe.sh deleted file mode 100644 index fdd79422a..000000000 --- a/recipes/tools/miniserve/recipe.sh +++ /dev/null @@ -1,2 +0,0 @@ -GIT=https://gitlab.redox-os.org/redox-os/miniserve -BUILD_DEPENDS=(openssl1 zlib) diff --git a/recipes/wip/net/http/miniserve/recipe.toml b/recipes/wip/net/http/miniserve/recipe.toml new file mode 100644 index 000000000..f5d958043 --- /dev/null +++ b/recipes/wip/net/http/miniserve/recipe.toml @@ -0,0 +1,12 @@ +#TODO missing libc:: socket-related imports + +[source] +git = "https://github.com/svenstaro/miniserve" + +[build] +dependencies = [ + "openssl1", + "zlib" +] +template = "cargo" + From 541e855d72abb05ee2ce898c3876bf9de2ba78f6 Mon Sep 17 00:00:00 2001 From: Wildan Mubarok Date: Wed, 20 Aug 2025 12:53:38 +0000 Subject: [PATCH 10/12] Add more build templates and automatic DYNAMIC_INIT --- recipes/dev/gdk-pixbuf/recipe.toml | 16 +++++----- recipes/emulators/mgba/recipe.toml | 31 +++++++------------ recipes/net/download/wget/recipe.toml | 11 +++---- .../wip/net/download/youtube-tui/recipe.toml | 6 ++-- src/bin/cook.rs | 24 +++++++++++++- src/recipe.rs | 18 +++++++++-- 6 files changed, 63 insertions(+), 43 deletions(-) diff --git a/recipes/dev/gdk-pixbuf/recipe.toml b/recipes/dev/gdk-pixbuf/recipe.toml index afa8bff21..7ae9aa5c7 100644 --- a/recipes/dev/gdk-pixbuf/recipe.toml +++ b/recipes/dev/gdk-pixbuf/recipe.toml @@ -15,12 +15,10 @@ dependencies = [ "shared-mime-info", "zlib", ] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_meson \ - -Dbuiltin_loaders=all \ - -Dgir=false \ - -Dinstalled_tests=false \ - -Dx11=false -""" +template = "meson" +mesonflags = [ + "-Dbuiltin_loaders=all", + "-Dgir=false", + "-Dinstalled_tests=false", + "-Dx11=false", +] diff --git a/recipes/emulators/mgba/recipe.toml b/recipes/emulators/mgba/recipe.toml index 5a4d65aeb..b61b7bd05 100644 --- a/recipes/emulators/mgba/recipe.toml +++ b/recipes/emulators/mgba/recipe.toml @@ -4,24 +4,15 @@ blake3 = "a1b9e797a5058f5264d276805aef5643b7ea460916e491a0098ba32d87f1519e" patches = ["redox.patch"] [build] -dependencies = [ - "libiconv", - "liborbital", - "libpng", - "pixman", - "sdl1", - "zlib", +dependencies = ["libiconv", "liborbital", "libpng", "pixman", "sdl1", "zlib"] +template = "cmake" +cmakeflags = [ + "-DBUILD_QT=OFF", + "-DBUILD_SHARED=ON", + "-DBUILD_STATIC=OFF", + "-DUSE_SQLITE3=OFF", + "-DUSE_DEBUGGERS=OFF", + "-DBUILD_SDL=ON", + "-DSDL_VERSION=1.2", + "-DSDL_LIBRARY=-lSDL -lorbital", ] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cmake \ - -DBUILD_QT=OFF \ - -DBUILD_SHARED=ON \ - -DBUILD_STATIC=OFF \ - -DUSE_SQLITE3=OFF \ - -DUSE_DEBUGGERS=OFF \ - -DBUILD_SDL=ON \ - -DSDL_VERSION="1.2" \ - -DSDL_LIBRARY="-lSDL -lorbital" -""" diff --git a/recipes/net/download/wget/recipe.toml b/recipes/net/download/wget/recipe.toml index dd4f52e69..fb2d6ab4b 100644 --- a/recipes/net/download/wget/recipe.toml +++ b/recipes/net/download/wget/recipe.toml @@ -1,13 +1,10 @@ [source] tar = "https://ftp.gnu.org/gnu/wget/wget-1.21.4.tar.gz" [build] -template = "custom" dependencies = [ "openssl1", ] -script = """ -COOKBOOK_CONFIGURE_FLAGS+=( - --with-ssl=openssl -) -cookbook_configure -""" +template = "configure" +configureflags = [ + "--with-ssl=openssl" +] diff --git a/recipes/wip/net/download/youtube-tui/recipe.toml b/recipes/wip/net/download/youtube-tui/recipe.toml index 83406f0ea..5306f25dc 100644 --- a/recipes/wip/net/download/youtube-tui/recipe.toml +++ b/recipes/wip/net/download/youtube-tui/recipe.toml @@ -2,10 +2,8 @@ [source] git = "https://github.com/Siriusmart/youtube-tui" [build] -template = "custom" +template = "cargo" +cargoflags = "--no-default-features" dependencies = [ "openssl1", ] -script = """ -cookbook_cargo --no-default-features -""" diff --git a/src/bin/cook.rs b/src/bin/cook.rs index 4002f712d..6d37332d3 100644 --- a/src/bin/cook.rs +++ b/src/bin/cook.rs @@ -1014,6 +1014,17 @@ do done "#; + let flags_fn = |name, flags: &Vec| { + format!( + "{name}+=(\n{}\n)\n", + flags + .iter() + .map(|s| format!(" \"{s}\"")) + .collect::>() + .join("\n") + ) + }; + //TODO: better integration with redoxer (library instead of binary) //TODO: configurable target //TODO: Add more configurability, convert scripts to Rust? @@ -1027,7 +1038,18 @@ done package_path.as_deref().unwrap_or(".") ) } - BuildKind::Configure => "cookbook_configure".to_owned(), + BuildKind::Configure { configureflags } => format!( + "DYNAMIC_INIT\n{}cookbook_configure", + flags_fn("COOKBOOK_CONFIGURE_FLAGS", configureflags), + ), + BuildKind::Cmake { cmakeflags } => format!( + "DYNAMIC_INIT\n{}cookbook_cmake", + flags_fn("COOKBOOK_CMAKE_FLAGS", cmakeflags), + ), + BuildKind::Meson { mesonflags } => format!( + "DYNAMIC_INIT\n{}cookbook_meson", + flags_fn("COOKBOOK_MESON_FLAGS", mesonflags), + ), BuildKind::Custom { script } => script.clone(), BuildKind::None => "".to_owned(), }; diff --git a/src/recipe.rs b/src/recipe.rs index 4341551d7..e6252811b 100644 --- a/src/recipe.rs +++ b/src/recipe.rs @@ -71,13 +71,27 @@ pub enum BuildKind { Cargo { #[serde(default)] package_path: Option, - #[serde(default)] cargoflags: String, }, /// Will build and install using configure and make #[serde(rename = "configure")] - Configure, + Configure { + #[serde(default)] + configureflags: Vec, + }, + /// Will build and install using cmake + #[serde(rename = "cmake")] + Cmake { + #[serde(default)] + cmakeflags: Vec, + }, + /// Will build and install using meson + #[serde(rename = "meson")] + Meson { + #[serde(default)] + mesonflags: Vec, + }, /// Will build and install using custom commands #[serde(rename = "custom")] Custom { script: String }, From 3a53c6abbb2a2881316ff2dce38ab129283b287f Mon Sep 17 00:00:00 2001 From: Wildan Mubarok Date: Wed, 20 Aug 2025 12:54:12 +0000 Subject: [PATCH 11/12] Update openssh patches --- recipes/wip/ssh/openssh/recipe.toml | 13 +- recipes/wip/ssh/openssh/redox.patch | 461 ++++++++++++++++++++++------ 2 files changed, 374 insertions(+), 100 deletions(-) diff --git a/recipes/wip/ssh/openssh/recipe.toml b/recipes/wip/ssh/openssh/recipe.toml index 4d7261da5..26ed0f91f 100644 --- a/recipes/wip/ssh/openssh/recipe.toml +++ b/recipes/wip/ssh/openssh/recipe.toml @@ -1,13 +1,20 @@ -#TODO update the patch to match the current version -#TODO does the patch is still needed? +#TODO compiled but not tested +#TODO lack of utmpx.h and resolv.h, expect dns not working +#TODO maybe actually implement utmpx.h in relibc? [source] tar = "https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.8p1.tar.gz" patches = [ "redox.patch", ] [build] -template = "configure" +template = "custom" dependencies = [ "openssl1", "zlib", ] +script = """ +DYNAMIC_INIT +cookbook_configure +mv "${COOKBOOK_STAGE}"/usr/sbin/sshd "${COOKBOOK_STAGE}"/usr/bin/sshd +rmdir "${COOKBOOK_STAGE}"/usr/sbin +""" diff --git a/recipes/wip/ssh/openssh/redox.patch b/recipes/wip/ssh/openssh/redox.patch index f19001f78..e1b43cae3 100644 --- a/recipes/wip/ssh/openssh/redox.patch +++ b/recipes/wip/ssh/openssh/redox.patch @@ -1,138 +1,405 @@ -diff -ruwN source/channels.c source-new/channels.c ---- source/channels.c 2018-10-16 18:01:20.000000000 -0600 -+++ source-new/channels.c 2019-01-15 21:01:12.203686148 -0700 -@@ -1865,10 +1865,10 @@ - fatal(":%s: channel %d: no remote id", __func__, c->self); - /* for rdynamic the OPEN_CONFIRMATION has been sent already */ - isopen = (c->type == SSH_CHANNEL_RDYNAMIC_FINISH); -- if (getsockopt(c->sock, SOL_SOCKET, SO_ERROR, &err, &sz) < 0) { -- err = errno; -- error("getsockopt SO_ERROR failed"); -- } -+ // if (getsockopt(c->sock, SOL_SOCKET, SO_ERROR, &err, &sz) < 0) { -+ // err = errno; -+ // error("getsockopt SO_ERROR failed"); -+ // } - if (err == 0) { - debug("channel %d: connected to %s port %d", - c->self, c->connect_ctx.host, c->connect_ctx.port); -diff -ruwN source/config.sub source-new/config.sub ---- source/config.sub 2018-10-16 18:01:20.000000000 -0600 -+++ source-new/config.sub 2019-01-15 19:39:26.234492329 -0700 -@@ -1407,7 +1407,7 @@ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ -- | -onefs* | -tirtos* | -phoenix*) -+ | -onefs* | -tirtos* | -phoenix* | -redox*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) -diff -ruwN source/openbsd-compat/bindresvport.c source-new/openbsd-compat/bindresvport.c ---- source/openbsd-compat/bindresvport.c 2018-10-16 18:01:20.000000000 -0600 -+++ source-new/openbsd-compat/bindresvport.c 2019-01-15 20:46:06.879804135 -0700 -@@ -42,6 +42,10 @@ - #include - #include +diff -ruwN source/defines.h source-new/defines.h +--- source/defines.h 2024-07-01 11:36:28.000000000 +0700 ++++ source-new/defines.h 2025-08-20 13:37:45.820728226 +0700 +@@ -52,6 +52,18 @@ + #define IPPORT_RESERVED 0 + #endif +#ifndef IPPORT_RESERVED +#define IPPORT_RESERVED 1024 +#endif + - #define STARTPORT 600 - #define ENDPORT (IPPORT_RESERVED - 1) - #define NPORTS (ENDPORT - STARTPORT + 1) -diff -ruwN source/openbsd-compat/bsd-getpeereid.c source-new/openbsd-compat/bsd-getpeereid.c ---- source/openbsd-compat/bsd-getpeereid.c 2018-10-16 18:01:20.000000000 -0600 -+++ source-new/openbsd-compat/bsd-getpeereid.c 2019-01-15 20:43:12.410583244 -0700 -@@ -23,7 +23,7 @@ - - #include - --#if defined(SO_PEERCRED) -+#if defined(SO_PEERCRED) && !defined(__redox__) - int - getpeereid(int s, uid_t *euid, gid_t *gid) - { -diff -ruwN source/openbsd-compat/bsd-misc.c source-new/openbsd-compat/bsd-misc.c ---- source/openbsd-compat/bsd-misc.c 2018-10-16 18:01:20.000000000 -0600 -+++ source-new/openbsd-compat/bsd-misc.c 2019-01-15 20:28:46.619332501 -0700 -@@ -25,6 +25,9 @@ - # include ++#ifndef IN_LOOPBACKNET ++#define IN_LOOPBACKNET 127 ++#endif ++ ++#ifndef MAXDNAME ++#define MAXDNAME 256 ++#endif ++ + /* + * Definitions for IP type of service (ip_tos) + */ +@@ -454,19 +466,21 @@ + # define _PATH_DEVNULL "/dev/null" #endif -+#if defined(__redox__) -+#include +-/* user may have set a different path */ +-#if defined(_PATH_MAILDIR) && defined(MAIL_DIRECTORY) +-# undef _PATH_MAILDIR +-#endif /* defined(_PATH_MAILDIR) && defined(MAIL_DIRECTORY) */ +- +-#ifdef MAIL_DIRECTORY +-# define _PATH_MAILDIR MAIL_DIRECTORY ++#ifndef _PATH_MAILDIR ++# define _PATH_MAILDIR "/var/mail" + #endif + + #ifndef _PATH_NOLOGIN + # define _PATH_NOLOGIN "/etc/nologin" + #endif + ++#ifndef ST_RDONLY ++#define ST_RDONLY 1 +#endif - #include - #include ++#ifndef ST_NOSUID ++#define ST_NOSUID 2 ++#endif ++ + /* Define this to be the path of the xauth program. */ + #ifdef XAUTH_PATH + #define _PATH_XAUTH XAUTH_PATH +diff -ruwN source/hostfile.c source-new/hostfile.c +--- source/hostfile.c 2024-07-01 11:36:28.000000000 +0700 ++++ source-new/hostfile.c 2025-08-20 11:51:28.964103232 +0700 +@@ -44,7 +44,9 @@ + #include + + #include ++#ifndef __redox__ + #include ++#endif + #include + #include #include +diff -ruwN source/loginrec.c source-new/loginrec.c +--- source/loginrec.c 2024-07-01 11:36:28.000000000 +0700 ++++ source-new/loginrec.c 2025-08-20 13:43:02.970560664 +0700 +@@ -1033,7 +1033,7 @@ + return (0); + } + # else +- if (!utmpx_write_direct(li, &ut)) { ++ if (!utmpx_write_direct(li, &utx)) { + logit("%s: utmp_write_direct() failed", __func__); + return (0); + } +diff -ruwN source/loginrec.h source-new/loginrec.h +--- source/loginrec.h 2024-07-01 11:36:28.000000000 +0700 ++++ source-new/loginrec.h 2025-08-20 13:39:08.570682776 +0700 +@@ -30,6 +30,7 @@ + **/ + + #include "includes.h" ++#include "openbsd-compat/utmpx.h" + + struct ssh; + +diff -ruwN source/openbsd-compat/bsd-statvfs.h source-new/openbsd-compat/bsd-statvfs.h +--- source/openbsd-compat/bsd-statvfs.h 2024-07-01 11:36:28.000000000 +0700 ++++ source-new/openbsd-compat/bsd-statvfs.h 2025-08-20 13:37:42.000730245 +0700 +@@ -37,13 +37,6 @@ + typedef unsigned long fsfilcnt_t; + #endif + +-#ifndef ST_RDONLY +-#define ST_RDONLY 1 +-#endif +-#ifndef ST_NOSUID +-#define ST_NOSUID 2 +-#endif +- + /* as defined in IEEE Std 1003.1, 2004 Edition */ + struct statvfs { + unsigned long f_bsize; /* File system block size. */ diff -ruwN source/openbsd-compat/getrrsetbyname.c source-new/openbsd-compat/getrrsetbyname.c ---- source/openbsd-compat/getrrsetbyname.c 2018-10-16 18:01:20.000000000 -0600 -+++ source-new/openbsd-compat/getrrsetbyname.c 2019-01-15 20:57:20.248721738 -0700 -@@ -47,7 +47,7 @@ +--- source/openbsd-compat/getrrsetbyname.c 2024-07-01 11:36:28.000000000 +0700 ++++ source-new/openbsd-compat/getrrsetbyname.c 2025-08-20 13:51:15.020299084 +0700 +@@ -67,6 +67,52 @@ + #endif + #define _THREAD_PRIVATE(a,b,c) (c) - #include "includes.h" ++#ifdef __redox__ ++ ++#include ++#include ++ ++/* ++ * Minimalist replacement for for systems that lack it, ++ * such as Redox OS. This provides the basic structures needed by ++ * the OpenSSH compatibility layer. ++ */ ++ ++// Define necessary constants ++#define MAXNS 3 /* max # name servers we'll track */ ++#define MAXDNSRCH 6 /* max # domains in search path */ ++#define MAXRESOLVSORT 10 /* number of nets to sort on */ ++#define MAXDNAME 256 /* max length of a domain name */ ++ ++/* ++ * A simplified, portable version of the resolver state structure. ++ * Glibc-specific fields, hooks, and complex unions have been removed. ++ */ ++struct __res_state { ++ int retrans; /* retransmission time interval */ ++ int retry; /* number of times to retransmit */ ++ unsigned long options; /* option flags */ ++ int nscount; /* number of name servers */ ++ struct sockaddr_in nsaddr_list[MAXNS]; /* address of name servers */ ++ unsigned short id; /* current message id */ ++ char *dnsrch[MAXDNSRCH + 1]; /* components of domain to search */ ++ char defdname[MAXDNAME]; /* default domain name */ ++ ++ struct { ++ struct in_addr addr; ++ uint32_t mask; ++ } sort_list[MAXRESOLVSORT]; ++ ++ int res_h_errno; /* last error code for this context */ ++ ++ // Simplified bitfields, removing glibc internals ++ unsigned ndots : 4; /* threshold for initial abs. query */ ++ unsigned nsort : 4; /* number of elements in sort_list[] */ ++}; ++ ++typedef struct __res_state *res_state; ++#endif /* __redox */ ++ + #ifndef HAVE__RES_EXTERN + struct __res_state _res; + #endif +@@ -167,6 +213,24 @@ + struct dns_rr *next; + }; --#if !defined (HAVE_GETRRSETBYNAME) && !defined (HAVE_LDNS) -+#if !defined (HAVE_GETRRSETBYNAME) && !defined (HAVE_LDNS) && !defined(__redox__) ++#ifdef __redox__ ++typedef struct { ++ uint16_t id; ++ uint8_t rd : 1; ++ uint8_t tc : 1; ++ uint8_t aa : 1; ++ uint8_t opcode : 4; ++ uint8_t qr : 1; ++ uint8_t rcode : 4; ++ uint8_t z : 3; ++ uint8_t ra : 1; ++ uint16_t qdcount; ++ uint16_t ancount; ++ uint16_t nscount; ++ uint16_t arcount; ++} HEADER; ++#endif ++ + struct dns_response { + HEADER header; + struct dns_query *query; +@@ -221,10 +285,10 @@ + } - #include - #include + /* initialize resolver */ +- if ((_resp->options & RES_INIT) == 0 && res_init() == -1) { ++ // if (res_init() == -1) { + result = ERRSET_FAIL; + goto fail; +- } ++ // } + + #ifdef DEBUG + _resp->options |= RES_DEBUG; +@@ -482,12 +546,12 @@ + prev->next = curr; + + /* name */ +- length = dn_expand(answer, answer + size, *cp, name, +- sizeof(name)); +- if (length < 0) { ++ // length = dn_expand(answer, answer + size, *cp, name, ++ // sizeof(name)); ++ // if (length < 0) { + free_dns_query(head); + return (NULL); +- } ++ // } + curr->name = strdup(name); + if (curr->name == NULL) { + free_dns_query(head); +@@ -542,12 +606,12 @@ + prev->next = curr; + + /* name */ +- length = dn_expand(answer, answer + size, *cp, name, +- sizeof(name)); +- if (length < 0) { ++ // length = dn_expand(answer, answer + size, *cp, name, ++ // sizeof(name)); ++ // if (length < 0) { + free_dns_rr(head); + return (NULL); +- } ++ // } + curr->name = strdup(name); + if (curr->name == NULL) { + free_dns_rr(head); diff -ruwN source/openbsd-compat/getrrsetbyname.h source-new/openbsd-compat/getrrsetbyname.h ---- source/openbsd-compat/getrrsetbyname.h 2018-10-16 18:01:20.000000000 -0600 -+++ source-new/openbsd-compat/getrrsetbyname.h 2019-01-15 19:54:39.564320719 -0700 -@@ -50,7 +50,7 @@ - - #include "includes.h" - --#ifndef HAVE_GETRRSETBYNAME -+#if !defined(HAVE_GETRRSETBYNAME) && !defined(__redox__) +--- source/openbsd-compat/getrrsetbyname.h 2024-07-01 11:36:28.000000000 +0700 ++++ source-new/openbsd-compat/getrrsetbyname.h 2025-08-20 11:51:00.744118526 +0700 +@@ -54,9 +54,13 @@ #include #include ++#ifndef __redox__ + #include ++#endif + #include ++#ifndef __redox__ + #include ++#endif + + #ifndef HFIXEDSZ + #define HFIXEDSZ 12 +diff -ruwN source/openbsd-compat/inet_ntop.c source-new/openbsd-compat/inet_ntop.c +--- source/openbsd-compat/inet_ntop.c 2024-07-01 11:36:28.000000000 +0700 ++++ source-new/openbsd-compat/inet_ntop.c 2025-08-20 11:39:15.244488902 +0700 +@@ -26,7 +26,9 @@ + #include + #include + #include ++#ifndef __redox__ + #include ++#endif + #include + #include + #include diff -ruwN source/openbsd-compat/openbsd-compat.h source-new/openbsd-compat/openbsd-compat.h ---- source/openbsd-compat/openbsd-compat.h 2018-10-16 18:01:20.000000000 -0600 -+++ source-new/openbsd-compat/openbsd-compat.h 2019-01-15 20:14:24.316498869 -0700 -@@ -36,6 +36,10 @@ +--- source/openbsd-compat/openbsd-compat.h 2024-07-01 11:36:28.000000000 +0700 ++++ source-new/openbsd-compat/openbsd-compat.h 2025-08-20 13:15:22.721439992 +0700 +@@ -36,6 +36,8 @@ #include /* for wchar_t */ -+#if defined(__redox__) -+#include -+#endif ++#include "getopt.h" + /* OpenBSD function replacements */ #include "base64.h" #include "sigact.h" +diff -ruwN source/openbsd-compat/utmpx.c source-new/openbsd-compat/utmpx.c +--- source/openbsd-compat/utmpx.c 1970-01-01 07:00:00.000000000 +0700 ++++ source-new/openbsd-compat/utmpx.c 2025-08-20 13:13:54.971486065 +0700 +@@ -0,0 +1,13 @@ ++#include "utmpx.h" ++#include // For NULL ++ ++#ifdef __redox__ ++ ++void endutxent(void) { /* Do nothing */ } ++struct utmpx *getutxent(void) { return NULL; } ++struct utmpx *getutxid(const struct utmpx *ut) { return NULL; } ++struct utmpx *getutxline(const struct utmpx *ut) { return NULL; } ++struct utmpx *pututxline(const struct utmpx *ut) { return NULL; } ++void setutxent(void) { /* Do nothing */ } ++ ++#endif +\ No newline at end of file +diff -ruwN source/openbsd-compat/utmpx.h source-new/openbsd-compat/utmpx.h +--- source/openbsd-compat/utmpx.h 1970-01-01 07:00:00.000000000 +0700 ++++ source-new/openbsd-compat/utmpx.h 2025-08-20 13:13:07.201511825 +0700 +@@ -0,0 +1,69 @@ ++#ifndef _COMPAT_UTMPX_H ++#define _COMPAT_UTMPX_H ++#ifdef __redox__ ++#include ++#include ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++/* ++ * This header provides a POSIX-compliant definition of the utmpx structure ++ * and related functions for systems that lack a native , such as Redox OS. ++ */ ++ ++// Define standard sizes for character arrays, based on common practice (e.g., Linux) ++#define UT_LINESIZE 32 ++#define UT_NAMESIZE 32 ++#define UT_HOSTSIZE 256 ++#define UT_IDSIZE 4 ++ ++/* ++ * The utmpx structure, containing user accounting information. ++ */ ++struct utmpx { ++ char ut_user[UT_NAMESIZE]; /* User login name */ ++ char ut_id[UT_IDSIZE]; /* Unspecified terminal id */ ++ char ut_line[UT_LINESIZE]; /* Device name of tty */ ++ pid_t ut_pid; /* Process ID */ ++ short ut_type; /* Type of entry */ ++ struct timeval ut_tv; /* Time entry was made */ ++ // Non-standard but very common fields, often needed for compatibility ++ char ut_host[UT_HOSTSIZE]; /* Host name for remote login */ ++ // Padding to align the structure, if necessary ++ char __padding[16]; ++}; ++ ++/* ++ * Symbolic constants for the ut_type field. ++ */ ++#define EMPTY 0 /* No valid user accounting information */ ++#define BOOT_TIME 1 /* Time of system boot */ ++#define OLD_TIME 2 /* Time when system clock changed */ ++#define NEW_TIME 3 /* Time after system clock changed */ ++#define USER_PROCESS 4 /* A user process */ ++#define INIT_PROCESS 5 /* A process spawned by the init process */ ++#define LOGIN_PROCESS 6 /* The session leader of a logged-in user */ ++#define DEAD_PROCESS 7 /* A session leader who has exited */ ++ ++/* ++ * Function prototypes for utmpx database manipulation. ++ * ++ * NOTE: These are stubs. Since Redox OS does not have a utmp/utmpx ++ * database, these functions won't have a real implementation. They ++ * are declared here to satisfy the linker. ++ */ ++void endutxent(void); ++struct utmpx *getutxent(void); ++struct utmpx *getutxid(const struct utmpx *); ++struct utmpx *getutxline(const struct utmpx *); ++struct utmpx *pututxline(const struct utmpx *); ++void setutxent(void); ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif /* __redox__ */ ++#endif /* _COMPAT_UTMPX_H */ +\ No newline at end of file +diff -ruwN source/regress/netcat.c source-new/regress/netcat.c +--- source/regress/netcat.c 2024-07-01 11:36:28.000000000 +0700 ++++ source-new/regress/netcat.c 2025-08-20 11:50:49.164126484 +0700 +@@ -1384,7 +1384,9 @@ + #include + #include + #include ++#ifndef __redox__ + #include ++#endif + + #define SOCKS_PORT "1080" + #define HTTP_PROXY_PORT "3128" diff -ruwN source/sshbuf-misc.c source-new/sshbuf-misc.c ---- source/sshbuf-misc.c 2018-10-16 18:01:20.000000000 -0600 -+++ source-new/sshbuf-misc.c 2019-01-15 20:45:08.969783102 -0700 +--- source/sshbuf-misc.c 2024-07-01 11:36:28.000000000 +0700 ++++ source-new/sshbuf-misc.c 2025-08-20 11:51:17.444108963 +0700 @@ -28,7 +28,9 @@ #include #include #include -+#if !defined(__redox__) ++#ifndef __redox__ #include +#endif #include + #include - #include "ssherr.h" -@@ -158,4 +160,3 @@ - r[l] = '\0'; - return r; - } -- diff -ruwN source/sshkey.c source-new/sshkey.c ---- source/sshkey.c 2018-10-16 18:01:20.000000000 -0600 -+++ source-new/sshkey.c 2019-01-15 20:13:21.629829281 -0700 -@@ -42,7 +42,9 @@ - #include +--- source/sshkey.c 2024-07-01 11:36:28.000000000 +0700 ++++ source-new/sshkey.c 2025-08-20 11:50:36.114133643 +0700 +@@ -43,7 +43,9 @@ #include + #include #include -+#if !defined(__redox__) ++#ifndef __redox__ #include +#endif + #include #ifdef HAVE_UTIL_H #include - #endif /* HAVE_UTIL_H */ From 2b39e7caf25d17e9ee4ad49cd576b5cf2f91a527 Mon Sep 17 00:00:00 2001 From: Wildan Mubarok Date: Fri, 22 Aug 2025 13:41:34 +0000 Subject: [PATCH 12/12] Set openttd as shallow --- recipes/games/openttd/recipe.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/games/openttd/recipe.toml b/recipes/games/openttd/recipe.toml index 4e2a61bc3..e419e5495 100644 --- a/recipes/games/openttd/recipe.toml +++ b/recipes/games/openttd/recipe.toml @@ -1,6 +1,7 @@ [source] git = "https://github.com/OpenTTD/OpenTTD.git" branch = "release/1.8" +shallow_clone = true patches = ["redox.patch"] [build]