mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-07-04 18:48:43 +08:00
Merge branch cookbook:master into repo-bin
This commit is contained in:
commit
1b77b93f12
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,8 +1,10 @@
|
||||
/build
|
||||
/repo
|
||||
/cookbook.toml
|
||||
source
|
||||
source.tmp
|
||||
source-new
|
||||
source-old
|
||||
source.tar
|
||||
source.tar.tmp
|
||||
target
|
||||
|
||||
251
Cargo.lock
generated
251
Cargo.lock
generated
@ -642,11 +642,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "dirs"
|
||||
version = "5.0.1"
|
||||
version = "6.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225"
|
||||
checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e"
|
||||
dependencies = [
|
||||
"dirs-sys 0.4.1",
|
||||
"dirs-sys 0.5.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -656,20 +656,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"redox_users",
|
||||
"redox_users 0.4.6",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dirs-sys"
|
||||
version = "0.4.1"
|
||||
version = "0.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c"
|
||||
checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"option-ext",
|
||||
"redox_users",
|
||||
"windows-sys 0.48.0",
|
||||
"redox_users 0.5.2",
|
||||
"windows-sys 0.60.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -1538,6 +1538,8 @@ checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c"
|
||||
[[package]]
|
||||
name = "pkgar"
|
||||
version = "0.1.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "db98a45d3bdaf7dceeee5716f3eec9af0e67deec64eec9e717536b89de323c22"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"blake3 0.3.8",
|
||||
@ -1550,29 +1552,17 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "pkgar"
|
||||
version = "0.1.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "db98a45d3bdaf7dceeee5716f3eec9af0e67deec64eec9e717536b89de323c22"
|
||||
version = "0.1.19"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"blake3 0.3.8",
|
||||
"bytemuck",
|
||||
"clap",
|
||||
"pkgar-core 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pkgar-keys 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pkgar-core 0.1.19",
|
||||
"pkgar-keys 0.1.19",
|
||||
"thiserror 2.0.12",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pkgar-core"
|
||||
version = "0.1.18"
|
||||
dependencies = [
|
||||
"bitflags 1.3.2",
|
||||
"blake3 0.3.8",
|
||||
"bytemuck",
|
||||
"dryoc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pkgar-core"
|
||||
version = "0.1.18"
|
||||
@ -1585,9 +1575,21 @@ dependencies = [
|
||||
"dryoc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pkgar-core"
|
||||
version = "0.1.19"
|
||||
dependencies = [
|
||||
"bitflags 1.3.2",
|
||||
"blake3 0.3.8",
|
||||
"bytemuck",
|
||||
"dryoc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pkgar-keys"
|
||||
version = "0.1.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4494325c5c408d718d1df657cceeadc2102f02e7c9298343ce230f557f13e80c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap",
|
||||
@ -1604,16 +1606,14 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "pkgar-keys"
|
||||
version = "0.1.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4494325c5c408d718d1df657cceeadc2102f02e7c9298343ce230f557f13e80c"
|
||||
version = "0.1.19"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap",
|
||||
"dirs 3.0.2",
|
||||
"hex",
|
||||
"lazy_static",
|
||||
"pkgar-core 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pkgar-core 0.1.19",
|
||||
"seckey",
|
||||
"serde",
|
||||
"termion",
|
||||
@ -1832,32 +1832,16 @@ checksum = "436d45c2b6a5b159d43da708e62b25be3a4a3d5550d654b72216ade4c4bfd717"
|
||||
|
||||
[[package]]
|
||||
name = "redox-pkg"
|
||||
version = "0.2.5"
|
||||
version = "0.2.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "70f49b2c29ae3c72ff3a8dbc1c5eefba9093a8c5ceaa8ca5292833816fe931e2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"indicatif",
|
||||
"pkgar 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pkgar-core 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pkgar-keys 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"reqwest",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"thiserror 1.0.69",
|
||||
"toml 0.8.23",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "redox-pkg"
|
||||
version = "0.2.7"
|
||||
source = "git+https://gitlab.redox-os.org/redox-os/pkgutils#436c97a0df26bfce24e33a5a86a21218aca7591f"
|
||||
checksum = "6d50a7ed267e236ce8bfa178bfd3fb7a39765689d037e51c57f36bad46f474fd"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"ignore",
|
||||
"pkgar 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pkgar-core 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pkgar-keys 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"indicatif",
|
||||
"pkgar 0.1.18",
|
||||
"pkgar-core 0.1.18",
|
||||
"pkgar-keys 0.1.18",
|
||||
"reqwest",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
@ -1883,11 +1867,12 @@ dependencies = [
|
||||
"ignore",
|
||||
"object",
|
||||
"pbr",
|
||||
"pkgar 0.1.18",
|
||||
"pkgar-core 0.1.18",
|
||||
"pkgar-keys 0.1.18",
|
||||
"redox-pkg 0.2.7",
|
||||
"pkgar 0.1.19",
|
||||
"pkgar-core 0.1.19",
|
||||
"pkgar-keys 0.1.19",
|
||||
"redox-pkg",
|
||||
"redoxer",
|
||||
"regex",
|
||||
"serde",
|
||||
"tempfile",
|
||||
"termion",
|
||||
@ -1908,11 +1893,11 @@ dependencies = [
|
||||
"fscommon",
|
||||
"gpt",
|
||||
"libc",
|
||||
"pkgar 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pkgar-core 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pkgar-keys 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pkgar 0.1.18",
|
||||
"pkgar-core 0.1.18",
|
||||
"pkgar-keys 0.1.18",
|
||||
"rand 0.8.5",
|
||||
"redox-pkg 0.2.5",
|
||||
"redox-pkg",
|
||||
"redox_liner",
|
||||
"redox_syscall",
|
||||
"redoxfs",
|
||||
@ -1964,18 +1949,29 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "redoxer"
|
||||
version = "0.2.53"
|
||||
name = "redox_users"
|
||||
version = "0.5.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5558ef5ce386b5a4b7d5276467d940023b31c5a85484a05ac35b31da4055d740"
|
||||
checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac"
|
||||
dependencies = [
|
||||
"dirs 5.0.1",
|
||||
"getrandom 0.2.16",
|
||||
"libredox",
|
||||
"thiserror 2.0.12",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "redoxer"
|
||||
version = "0.2.54"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ead20eb76f54e16ecc3e678daca948d49497588a777148ac60d99a67dab8a2b0"
|
||||
dependencies = [
|
||||
"dirs 6.0.0",
|
||||
"proc-mounts",
|
||||
"redox_installer",
|
||||
"redox_syscall",
|
||||
"redoxfs",
|
||||
"tempfile",
|
||||
"toml 0.5.11",
|
||||
"toml 0.9.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2273,6 +2269,15 @@ dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_spanned"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "40734c41988f7306bb04f0ecf60ec0f3f1caa34290e4e8ea471dcd3346483b83"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_urlencoded"
|
||||
version = "0.7.1"
|
||||
@ -2546,15 +2551,6 @@ dependencies = [
|
||||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml"
|
||||
version = "0.5.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml"
|
||||
version = "0.8.23"
|
||||
@ -2562,11 +2558,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"serde_spanned",
|
||||
"toml_datetime",
|
||||
"serde_spanned 0.6.9",
|
||||
"toml_datetime 0.6.11",
|
||||
"toml_edit",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml"
|
||||
version = "0.9.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "75129e1dc5000bfbaa9fee9d1b21f974f9fbad9daec557a521ee6e080825f6e8"
|
||||
dependencies = [
|
||||
"indexmap",
|
||||
"serde",
|
||||
"serde_spanned 1.0.0",
|
||||
"toml_datetime 0.7.0",
|
||||
"toml_parser",
|
||||
"toml_writer",
|
||||
"winnow",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml_datetime"
|
||||
version = "0.6.11"
|
||||
@ -2576,6 +2587,15 @@ dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml_datetime"
|
||||
version = "0.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bade1c3e902f58d73d3f294cd7f20391c1cb2fbcb643b73566bc773971df91e3"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml_edit"
|
||||
version = "0.22.27"
|
||||
@ -2584,18 +2604,33 @@ checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a"
|
||||
dependencies = [
|
||||
"indexmap",
|
||||
"serde",
|
||||
"serde_spanned",
|
||||
"toml_datetime",
|
||||
"serde_spanned 0.6.9",
|
||||
"toml_datetime 0.6.11",
|
||||
"toml_write",
|
||||
"winnow",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml_parser"
|
||||
version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b551886f449aa90d4fe2bdaa9f4a2577ad2dde302c61ecf262d80b116db95c10"
|
||||
dependencies = [
|
||||
"winnow",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml_write"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801"
|
||||
|
||||
[[package]]
|
||||
name = "toml_writer"
|
||||
version = "1.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "df8b2b54733674ad286d16267dcfc7a71ed5c776e4ac7aa3c3e2561f7c637bf2"
|
||||
|
||||
[[package]]
|
||||
name = "tower"
|
||||
version = "0.5.2"
|
||||
@ -3000,15 +3035,6 @@ dependencies = [
|
||||
"windows-targets 0.42.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-sys"
|
||||
version = "0.48.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
|
||||
dependencies = [
|
||||
"windows-targets 0.48.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-sys"
|
||||
version = "0.52.0"
|
||||
@ -3051,21 +3077,6 @@ dependencies = [
|
||||
"windows_x86_64_msvc 0.42.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-targets"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
|
||||
dependencies = [
|
||||
"windows_aarch64_gnullvm 0.48.5",
|
||||
"windows_aarch64_msvc 0.48.5",
|
||||
"windows_i686_gnu 0.48.5",
|
||||
"windows_i686_msvc 0.48.5",
|
||||
"windows_x86_64_gnu 0.48.5",
|
||||
"windows_x86_64_gnullvm 0.48.5",
|
||||
"windows_x86_64_msvc 0.48.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-targets"
|
||||
version = "0.52.6"
|
||||
@ -3104,12 +3115,6 @@ version = "0.42.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_gnullvm"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_gnullvm"
|
||||
version = "0.52.6"
|
||||
@ -3128,12 +3133,6 @@ version = "0.42.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_msvc"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_msvc"
|
||||
version = "0.52.6"
|
||||
@ -3152,12 +3151,6 @@ version = "0.42.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnu"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnu"
|
||||
version = "0.52.6"
|
||||
@ -3188,12 +3181,6 @@ version = "0.42.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_msvc"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_msvc"
|
||||
version = "0.52.6"
|
||||
@ -3212,12 +3199,6 @@ version = "0.42.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnu"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnu"
|
||||
version = "0.52.6"
|
||||
@ -3236,12 +3217,6 @@ version = "0.42.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnullvm"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnullvm"
|
||||
version = "0.52.6"
|
||||
@ -3260,12 +3235,6 @@ version = "0.42.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_msvc"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_msvc"
|
||||
version = "0.52.6"
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
name = "redox_cookbook"
|
||||
version = "0.1.0"
|
||||
authors = ["Jeremy Soller <jackpot51@gmail.com>"]
|
||||
edition = "2018"
|
||||
edition = "2024"
|
||||
default-run = "cook"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
@ -18,6 +18,7 @@ path = "src/bin/cookbook_redoxer.rs"
|
||||
[lib]
|
||||
name = "cookbook"
|
||||
path = "src/lib.rs"
|
||||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
blake3 = "=1.5.3" # 1.5.4 is incompatible with blake3 0.3 dependency from pkgar
|
||||
@ -27,8 +28,9 @@ pbr = "1.0.2"
|
||||
pkgar = { path = "pkgar/pkgar" }
|
||||
pkgar-core = { path = "pkgar/pkgar-core" }
|
||||
pkgar-keys = { path = "pkgar/pkgar-keys" }
|
||||
redox-pkg = { git = "https://gitlab.redox-os.org/redox-os/pkgutils" }
|
||||
redox-pkg = "0.2.8"
|
||||
redoxer = "0.2"
|
||||
regex = "1.11"
|
||||
serde = { version = "=1.0.197", features = ["derive"] }
|
||||
termion = "4"
|
||||
toml = "0.8"
|
||||
|
||||
18
README.md
18
README.md
@ -9,10 +9,11 @@ This repository contains the system source code and packages inside the `recipes
|
||||
**Read [this](https://doc.redox-os.org/book/porting-applications.html) page before porting programs to Redox**
|
||||
|
||||
In order for this repository to be useful, it must be set up with an environment
|
||||
from the [redox](https://gitlab.redox-os.org/redox-os/redox) repository.
|
||||
from the [redox](https://gitlab.redox-os.org/redox-os/redox) repository or inside Redox OS with `cookbook` package.
|
||||
|
||||
[](./LICENSE)
|
||||
|
||||
- [Cookbook Config](#cookbook-config)
|
||||
- [Recipe Categories](#recipe-categories)
|
||||
- [Search Recipes](#search-recipes)
|
||||
- [Package Policy](#package-policy)
|
||||
@ -21,6 +22,21 @@ from the [redox](https://gitlab.redox-os.org/redox-os/redox) repository.
|
||||
- [Repository Layout](#repository-layout)
|
||||
- [TODO](#todo)
|
||||
|
||||
### Cookbook Config
|
||||
|
||||
Cookbook has special config to avoid repetitive args, place this file into `cookbook.toml` (in this cookbook directory, not redox build system) and configure it necessarily.
|
||||
|
||||
```toml
|
||||
# Configuration file
|
||||
# This is a configuration file to avoid repetitively spelling command args.
|
||||
# At the moment only mirrors here implemented but in future it will be expanded when scripts are rusted
|
||||
|
||||
[mirrors]
|
||||
# see list of GNU FTP mirrors at https://www.gnu.org/prep/ftp.en.html
|
||||
"ftp.gnu.org/gnu" = "example.com/gnu"
|
||||
"github.com/foo/bar" = "github.com/baz/bar"
|
||||
```
|
||||
|
||||
### Recipe Categories
|
||||
|
||||
The categories inside the `recipes` folder.
|
||||
|
||||
9
clean.sh
9
clean.sh
@ -5,12 +5,15 @@ source config.sh
|
||||
|
||||
if [ $# = 0 ]
|
||||
then
|
||||
recipes="$(target/release/list_recipes)"
|
||||
recipes="$(list_recipes --short)"
|
||||
else
|
||||
recipes="$@"
|
||||
fi
|
||||
|
||||
for recipe_path in $recipes
|
||||
for recipe_name in $recipes
|
||||
do
|
||||
./cook.sh "$recipe_path" distclean
|
||||
recipe_path=`find_recipe $recipe_name`
|
||||
|
||||
echo -e "\033[01;38;5;215mcook - clean $recipe_name\033[0m"
|
||||
rm -rf "${ROOT}/$recipe_path/target/${TARGET}"
|
||||
done
|
||||
|
||||
38
config.sh
38
config.sh
@ -6,6 +6,11 @@ if [ -z "${TARGET}" ]
|
||||
then
|
||||
export TARGET=x86_64-unknown-redox
|
||||
fi
|
||||
if [ $(uname -s) = 'Redox' ]
|
||||
then
|
||||
export IS_REDOX="1"
|
||||
fi
|
||||
|
||||
ARCH="${TARGET%%-*}"
|
||||
HOST="$TARGET"
|
||||
if [ x"${HOST}" == x"riscv64gc-unknown-redox" ] ; then
|
||||
@ -14,8 +19,6 @@ fi
|
||||
|
||||
# Automatic variables
|
||||
ROOT="$(cd `dirname "$0"` && pwd)"
|
||||
REPO="$ROOT/repo/$TARGET"
|
||||
export PATH="${ROOT}/bin:$PATH"
|
||||
|
||||
export AR="${HOST}-gcc-ar"
|
||||
export AS="${HOST}-as"
|
||||
@ -43,30 +46,27 @@ export PKG_CONFIG_FOR_BUILD="pkg-config"
|
||||
if [[ "$OSTYPE" == "darwin"* ]] || [[ "$OSTYPE" == "FreeBSD" ]]; then
|
||||
# GNU find
|
||||
FIND="gfind";
|
||||
|
||||
# GNU stat from Homebrew or MacPorts
|
||||
if [ ! -z "$(which brew)" ]; then
|
||||
STAT="$(brew --prefix)/opt/coreutils/libexec/gnubin/stat";
|
||||
elif [ ! -z "$(which port)" ]; then
|
||||
# TODO: find a programatic way of asking MacPorts for it's root dir.
|
||||
STAT="/opt/local/opt/coreutils/libexec/gnubin/stat";
|
||||
elif [ ! -z "$(which pkg)" ]; then
|
||||
STAT="gnustat"
|
||||
else
|
||||
echo "Please install either Homebrew or MacPorts and run the boostrap script."
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
FIND="find"
|
||||
STAT="stat";
|
||||
FIND="find";
|
||||
fi
|
||||
|
||||
export FIND
|
||||
export STAT
|
||||
|
||||
if [ ! "$(uname -s)" = "Redox" ]
|
||||
if [ -z "${IS_REDOX}" ]
|
||||
then
|
||||
function pkgar {
|
||||
"$ROOT/pkgar/target/release/pkgar" "$@"
|
||||
}
|
||||
function cook {
|
||||
"$ROOT/target/release/cook" "$@"
|
||||
}
|
||||
function repo_builder {
|
||||
"$ROOT/target/release/repo_builder" "$@"
|
||||
}
|
||||
function list_recipes {
|
||||
"$ROOT/target/release/list_recipes" "$@"
|
||||
}
|
||||
function find_recipe {
|
||||
"$ROOT/target/release/find_recipe" "$@"
|
||||
}
|
||||
fi
|
||||
|
||||
380
cook.sh
380
cook.sh
@ -1,380 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
shopt -s nullglob
|
||||
|
||||
source config.sh
|
||||
|
||||
# Variables to be overriden by recipes
|
||||
export BINDIR=bin
|
||||
export CARGO=(env RUSTFLAGS="$PREFIX_RUSTFLAGS -C link-arg=-zmuldefs" cargo)
|
||||
export CARGOBUILD=rustc
|
||||
export CARGOFLAGS=
|
||||
export DEBUG=
|
||||
export EXAMPLES=
|
||||
export PREPARE_COPY=1
|
||||
|
||||
if hash sha256sum 2>/dev/null
|
||||
then
|
||||
SHASUM="sha256sum"
|
||||
else
|
||||
SHASUM="shasum -a 256"
|
||||
fi
|
||||
|
||||
function usage {
|
||||
echo "cook.sh $1 <op>" >&2
|
||||
echo " dist" >&2
|
||||
echo " distclean" >&2
|
||||
echo " build" >&2
|
||||
echo " clean" >&2
|
||||
echo " fetch" >&2
|
||||
echo " unfetch" >&2
|
||||
echo " pkg" >&2
|
||||
echo " unpkg" >&2
|
||||
echo " prepare" >&2
|
||||
echo " unprepare" >&2
|
||||
echo " stage" >&2
|
||||
echo " unstage" >&2
|
||||
echo " version" >&2
|
||||
}
|
||||
|
||||
function op {
|
||||
if [ ! "$COOK_QUIET" = "1" ]
|
||||
then
|
||||
echo -e "\033[01;38;5;215mcook - $1 $2\033[0m" >&2
|
||||
fi
|
||||
|
||||
case "$2" in
|
||||
dist)
|
||||
op $1 prepare
|
||||
op $1 build
|
||||
op $1 stage
|
||||
op $1 pkg
|
||||
;;
|
||||
distclean)
|
||||
op $1 unpkg
|
||||
op $1 unstage
|
||||
op $1 unprepare
|
||||
;;
|
||||
fetch)
|
||||
skip=0
|
||||
if [ "$(type -t recipe_fetch)" = "function" ]
|
||||
then
|
||||
recipe_fetch
|
||||
fi
|
||||
if [ "$skip" -eq "0" ]
|
||||
then
|
||||
if [ -n "$TAR" ]
|
||||
then
|
||||
if [ ! -f source.tar ]
|
||||
then
|
||||
wget "$TAR" --continue -O source.tar.tmp
|
||||
mv source.tar.tmp source.tar
|
||||
fi
|
||||
|
||||
if [ -n "$TAR_SHA256" ]
|
||||
then
|
||||
$SHASUM -c <<< "${TAR_SHA256} source.tar"
|
||||
fi
|
||||
|
||||
if [ ! -d source ]
|
||||
then
|
||||
mkdir source
|
||||
tar xvf source.tar -C source --strip-components 1
|
||||
fi
|
||||
elif [ -n "$GIT" ]
|
||||
then
|
||||
if [ ! -d source ]
|
||||
then
|
||||
if [ -n "$BRANCH" ]
|
||||
then
|
||||
git clone --recursive "$GIT" -b "$BRANCH" source
|
||||
else
|
||||
git clone --recursive "$GIT" source
|
||||
fi
|
||||
fi
|
||||
|
||||
pushd source > /dev/null
|
||||
git remote set-url origin "$GIT"
|
||||
git fetch origin
|
||||
if [ -n "$GIT_UPSTREAM" ]
|
||||
then
|
||||
git remote set-url upstream "$GIT_UPSTREAM" &> /dev/null ||
|
||||
git remote add upstream "$GIT_UPSTREAM"
|
||||
git fetch upstream
|
||||
fi
|
||||
|
||||
ORIGIN_BRANCH="$(git branch --remotes | grep '^ origin/HEAD -> ' | cut -d ' ' -f 5-)"
|
||||
if [ -n "$BRANCH" ]
|
||||
then
|
||||
ORIGIN_BRANCH="origin/$BRANCH"
|
||||
fi
|
||||
|
||||
if [ "$(git rev-parse HEAD)" != "$(git rev-parse $ORIGIN_BRANCH)" ]
|
||||
then
|
||||
git checkout -B "$(echo "$ORIGIN_BRANCH" | cut -d / -f 2-)" "$ORIGIN_BRANCH"
|
||||
fi
|
||||
git submodule sync --recursive
|
||||
git submodule update --init --recursive
|
||||
popd > /dev/null
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
unfetch)
|
||||
rm -rfv source source.tar
|
||||
;;
|
||||
prepare)
|
||||
skip=0
|
||||
if [ "$(type -t recipe_prepare)" = "function" ]
|
||||
then
|
||||
recipe_prepare
|
||||
fi
|
||||
if [ "$skip" -eq "0" ]
|
||||
then
|
||||
rm -rf "${COOKBOOK_SYSROOT}"
|
||||
mkdir "${COOKBOOK_SYSROOT}"
|
||||
|
||||
# usrmerge
|
||||
mkdir "${COOKBOOK_SYSROOT}/usr"
|
||||
for folder in bin include lib share
|
||||
do
|
||||
mkdir "${COOKBOOK_SYSROOT}/usr/${folder}"
|
||||
ln -s "usr/${folder}" "${COOKBOOK_SYSROOT}/${folder}"
|
||||
done
|
||||
|
||||
if [ ${#BUILD_DEPENDS} -gt 0 ]
|
||||
then
|
||||
pushd $ROOT
|
||||
./repo.sh "${BUILD_DEPENDS[@]}"
|
||||
popd
|
||||
|
||||
for i in "${BUILD_DEPENDS[@]}"
|
||||
do
|
||||
pkgar \
|
||||
extract \
|
||||
"${COOKBOOK_SYSROOT}" \
|
||||
--archive "$REPO/$i.pkgar" \
|
||||
--pkey "${ROOT}/build/id_ed25519.pub.toml"
|
||||
done
|
||||
fi
|
||||
|
||||
rm -rf "${COOKBOOK_BUILD}"
|
||||
if [ "$PREPARE_COPY" -eq "0" ]
|
||||
then
|
||||
mkdir "${COOKBOOK_BUILD}"
|
||||
else
|
||||
cp -Rp source "${COOKBOOK_BUILD}"
|
||||
fi
|
||||
|
||||
for patch in *.patch
|
||||
do
|
||||
patch -p1 -d "${COOKBOOK_BUILD}" < "$patch"
|
||||
done
|
||||
fi
|
||||
;;
|
||||
unprepare)
|
||||
rm -rf "${COOKBOOK_BUILD}"
|
||||
rm -rf "${COOKBOOK_SYSROOT}"
|
||||
;;
|
||||
version)
|
||||
pushd "${COOKBOOK_BUILD}" > /dev/null
|
||||
skip=0
|
||||
if [ "$(type -t recipe_version)" = "function" ]
|
||||
then
|
||||
recipe_version
|
||||
fi
|
||||
if [ "$skip" -eq "0" ]
|
||||
then
|
||||
# there's an unstable built-in cargo config command, so hack around it
|
||||
cargo-config config package.version | tr -d '"'
|
||||
fi
|
||||
popd > /dev/null
|
||||
;;
|
||||
gitversion)
|
||||
if [ -d "${COOKBOOK_BUILD}"/.git ]
|
||||
then
|
||||
echo "$(op $1 version)-$(git -C "${COOKBOOK_BUILD}" rev-parse --short HEAD)"
|
||||
else
|
||||
op $1 version
|
||||
fi
|
||||
;;
|
||||
build)
|
||||
pushd "${COOKBOOK_BUILD}" > /dev/null
|
||||
skip=0
|
||||
if [ "$(type -t recipe_build)" = "function" ]
|
||||
then
|
||||
recipe_build
|
||||
fi
|
||||
|
||||
release_flag="--release"
|
||||
if [ "$DEBUG" == 1 ]
|
||||
then
|
||||
release_flag=
|
||||
fi
|
||||
|
||||
if [ -n "$CARGO_PACKAGE" ]; then
|
||||
package_flag="--package=$CARGO_PACKAGE"
|
||||
else
|
||||
package_flag=
|
||||
fi
|
||||
|
||||
if [ "$skip" -eq "0" ]
|
||||
then
|
||||
"${CARGO[@]}" "$CARGOBUILD" --target "$TARGET" $release_flag $package_flag $CARGOFLAGS
|
||||
fi
|
||||
popd > /dev/null
|
||||
;;
|
||||
clean)
|
||||
pushd "${COOKBOOK_BUILD}" > /dev/null
|
||||
skip=0
|
||||
if [ "$(type -t recipe_clean)" = "function" ]
|
||||
then
|
||||
recipe_clean
|
||||
fi
|
||||
if [ "$skip" -eq "0" ]
|
||||
then
|
||||
"${CARGO[@]}" clean
|
||||
fi
|
||||
popd > /dev/null
|
||||
;;
|
||||
stage)
|
||||
op $1 unstage
|
||||
mkdir -p "${COOKBOOK_STAGE}"
|
||||
stage="$(realpath "${COOKBOOK_STAGE}")"
|
||||
source="$(realpath source)"
|
||||
pushd "${COOKBOOK_BUILD}" > /dev/null
|
||||
skip=0
|
||||
if [ "$(type -t recipe_stage)" = "function" ]
|
||||
then
|
||||
recipe_stage "$stage"
|
||||
fi
|
||||
if [ "$skip" -eq "0" ]
|
||||
then
|
||||
#TODO "${CARGO[@]}" install --root "$stage" $CARGOFLAGS
|
||||
if [ "$DEBUG" == 1 ]
|
||||
then
|
||||
build=debug
|
||||
else
|
||||
build=release
|
||||
fi
|
||||
|
||||
bins="$(find target/$TARGET/$build/ -maxdepth 1 -type f ! -name '*.*')"
|
||||
if [ -z "$bins" ] || [ "$EXAMPLES" == 1 ]
|
||||
then
|
||||
example=true
|
||||
bins="$bins $(find target/$TARGET/$build/examples/ -maxdepth 1 -type f ! -name '*.*' ! -name '*-*' \
|
||||
2> /dev/null || true)"
|
||||
fi
|
||||
if [ -n "$bins" ]
|
||||
then
|
||||
if [ -n "$example" ] && [ "$EXAMPLES" != 1 ]
|
||||
then
|
||||
echo "$(tput bold)Note$(tput sgr0): No binaries detected, using example binaries"
|
||||
fi
|
||||
mkdir -p "$stage/$BINDIR"
|
||||
for bin in $bins
|
||||
do
|
||||
if [ "$DEBUG" == 1 ]
|
||||
then
|
||||
cp -v "$bin" "$stage/$BINDIR/$(basename $bin)"
|
||||
else
|
||||
"${STRIP}" -v "$bin" -o "$stage/$BINDIR/$(basename $bin)"
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo "$(tput bold)Warning$(tput sgr0): Recipe does not have any binaries" >&2
|
||||
fi
|
||||
fi
|
||||
popd > /dev/null
|
||||
;;
|
||||
unstage)
|
||||
rm -rfv "${COOKBOOK_STAGE}"
|
||||
rm -fv "${TARGET_DIR}/auto_deps.toml"
|
||||
;;
|
||||
pkg)
|
||||
pkgar \
|
||||
create \
|
||||
--archive "${COOKBOOK_STAGE}.pkgar" \
|
||||
--skey "${ROOT}/build/id_ed25519.toml" \
|
||||
"${COOKBOOK_STAGE}"
|
||||
|
||||
# Generate stage.toml
|
||||
echo "name = \"$1\"" > "${COOKBOOK_STAGE}.toml"
|
||||
echo "version = \"$(op $1 version)\"" >> "${COOKBOOK_STAGE}.toml"
|
||||
echo "target = \"$TARGET\"" >> "${COOKBOOK_STAGE}.toml"
|
||||
|
||||
# Add runtime dependencies to package if they exist
|
||||
if [ -n "$DEPENDS" ]
|
||||
then
|
||||
# Remove leading and trailing whitespace, replace whitespace between
|
||||
# package names with commas, and surround package names with quotes
|
||||
dependencies=$(echo -e "$DEPENDS" | sed -E 's/^[[:space:]]*//;s/[[:space:]]*$//;s/[[:space:]]+/,/g;s/[^, ][^, ]*/"&"/g')
|
||||
echo "depends = [$dependencies]" >> "${COOKBOOK_STAGE}.toml"
|
||||
else
|
||||
echo "depends = []" >> "${COOKBOOK_STAGE}.toml"
|
||||
fi
|
||||
;;
|
||||
unpkg)
|
||||
rm -fv "${COOKBOOK_STAGE}.pkgar" "${COOKBOOK_STAGE}.toml"
|
||||
;;
|
||||
*)
|
||||
usage $1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
if [ -n "$1" ]
|
||||
then
|
||||
if (echo "$1" | grep '.*/.*' >/dev/null); then
|
||||
recipe_name=$(basename "$1")
|
||||
recipe_path="$1"
|
||||
else
|
||||
recipe_name="$1"
|
||||
recipe_path=`target/release/find_recipe $recipe_name`
|
||||
fi
|
||||
|
||||
if [ -d "$ROOT/$recipe_path" ]
|
||||
then
|
||||
export COOKBOOK_RECIPE="${ROOT}/$recipe_path"
|
||||
|
||||
TARGET_DIR="${COOKBOOK_RECIPE}/target/${TARGET}"
|
||||
mkdir -p "${TARGET_DIR}"
|
||||
|
||||
export COOKBOOK_BUILD="${TARGET_DIR}/build"
|
||||
export COOKBOOK_STAGE="${TARGET_DIR}/stage"
|
||||
export COOKBOOK_SOURCE="${COOKBOOK_RECIPE}/source"
|
||||
export COOKBOOK_SYSROOT="${TARGET_DIR}/sysroot"
|
||||
|
||||
export PKG_CONFIG_ALLOW_CROSS=1
|
||||
export PKG_CONFIG_PATH=
|
||||
export PKG_CONFIG_LIBDIR="${COOKBOOK_SYSROOT}/lib/pkgconfig"
|
||||
export PKG_CONFIG_SYSROOT_DIR="${COOKBOOK_SYSROOT}"
|
||||
|
||||
cd "${COOKBOOK_RECIPE}"
|
||||
|
||||
if [ -e recipe.sh ]; then
|
||||
source recipe.sh
|
||||
fi
|
||||
|
||||
ops=()
|
||||
for arg in "${@:2}"
|
||||
do
|
||||
if [ "$arg" == "--debug" ]
|
||||
then
|
||||
DEBUG=1
|
||||
else
|
||||
ops[${#ops[@]}]="$arg"
|
||||
fi
|
||||
done
|
||||
|
||||
for i in "${ops[@]}"
|
||||
do
|
||||
op "$recipe_name" "$i"
|
||||
done
|
||||
elif [ "$IGNORE_ERROR" != "1" ]
|
||||
then
|
||||
echo "cook.sh: recipe '$recipe_name' at not found" >&2
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
usage "{package}"
|
||||
fi
|
||||
37
fetch.sh
37
fetch.sh
@ -3,39 +3,4 @@ set -e
|
||||
|
||||
source config.sh
|
||||
|
||||
recipes=""
|
||||
for arg in "${@:1}"
|
||||
do
|
||||
if [ "$arg" == "--nonstop" ]
|
||||
then
|
||||
set +e
|
||||
elif [ "$arg" == "--offline" ]
|
||||
then
|
||||
export COOKBOOK_OFFLINE="1"
|
||||
else
|
||||
recipes+=" $arg"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$recipes" == "" ]
|
||||
then
|
||||
recipes="$(target/release/list_recipes)"
|
||||
fi
|
||||
|
||||
for recipe_path in $recipes
|
||||
do
|
||||
if (echo "$recipe_path" | grep '.*/.*' >/dev/null); then
|
||||
recipe_name=$(basename "$recipe_path")
|
||||
recipe_path="$recipe_path"
|
||||
else
|
||||
recipe_name="$recipe_path"
|
||||
recipe_path=`target/release/find_recipe $recipe_name`
|
||||
fi
|
||||
|
||||
if [ -e "$recipe_path/recipe.toml" ]
|
||||
then
|
||||
target/release/cook --fetch-only "$recipe_name"
|
||||
else
|
||||
./cook.sh "$recipe_name" fetch
|
||||
fi
|
||||
done
|
||||
cook --fetch-only ${@:1}
|
||||
|
||||
2
pkgar
2
pkgar
@ -1 +1 @@
|
||||
Subproject commit 185fe5c3346d9aa552f308cf61c66f7b6e25280a
|
||||
Subproject commit 98aecac8d40b6a47429e2a5585416ad90c02e6db
|
||||
@ -6,13 +6,10 @@ patches = ["redox.patch"]
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
rsync -av --delete "${COOKBOOK_SOURCE}/" ./
|
||||
|
||||
# No configure provided
|
||||
COOKBOOK_CONFIGURE="true"
|
||||
COOKBOOK_CONFIGURE_FLAGS=""
|
||||
|
||||
export CPPFLAGS="${CPPFLAGS} -D_REDOX"
|
||||
|
||||
cookbook_configure
|
||||
${COOKBOOK_MAKE}
|
||||
${COOKBOOK_MAKE} install DESTDIR="${COOKBOOK_STAGE}" prefix="/usr"
|
||||
"""
|
||||
|
||||
@ -9,4 +9,5 @@ script = """
|
||||
DYNAMIC_INIT
|
||||
rsync -av --delete "${COOKBOOK_SOURCE}/" ./
|
||||
${COOKBOOK_MAKE}
|
||||
${COOKBOOK_MAKE} install DESTDIR="${COOKBOOK_STAGE}" prefix="/usr"
|
||||
"""
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
acpid
|
||||
hwd
|
||||
pcid
|
||||
pcid-spawner /etc/pcid/initfs.toml
|
||||
|
||||
@ -24,7 +24,6 @@ fbcond 2
|
||||
# Live disk
|
||||
# Note: Needs to start before drivers to ensure it gets priority when redoxfs searches for disks
|
||||
lived
|
||||
unset DISK_LIVE_ADDR DISK_LIVE_SIZE
|
||||
|
||||
# Drivers
|
||||
run /scheme/initfs/etc/init_drivers.rc
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
ps2d us
|
||||
acpid
|
||||
hwd
|
||||
pcid
|
||||
pcid-spawner /etc/pcid/initfs.toml
|
||||
|
||||
@ -8,6 +8,7 @@ BINS=(
|
||||
acpid
|
||||
fbbootlogd
|
||||
fbcond
|
||||
hwd
|
||||
inputd
|
||||
lived
|
||||
nvmed
|
||||
@ -64,7 +65,7 @@ export CARGO_PROFILE_RELEASE_PANIC=abort
|
||||
for bin in "${BINS[@]}"
|
||||
do
|
||||
case "${bin}" in
|
||||
pcid | pcid-spawner | fbbootlogd | fbcond | inputd | vesad | lived | ps2d | acpid | bcm2835-sdhcid | rtcd)
|
||||
pcid | pcid-spawner | fbbootlogd | fbcond | inputd | vesad | lived | ps2d | acpid | bcm2835-sdhcid | rtcd | hwd)
|
||||
cp -v "target/${TARGET}/${build_type}/${bin}" "${COOKBOOK_STAGE}/bin"
|
||||
;;
|
||||
*)
|
||||
|
||||
@ -41,6 +41,7 @@ BINS=(
|
||||
hashsum
|
||||
head
|
||||
join
|
||||
install
|
||||
link
|
||||
ln
|
||||
ls
|
||||
|
||||
@ -13,8 +13,6 @@ dependencies = [
|
||||
]
|
||||
template = "custom"
|
||||
script = """
|
||||
export LDFLAGS="-L${COOKBOOK_SYSROOT}/lib"
|
||||
export CPPFLAGS="-I${COOKBOOK_SYSROOT}/include"
|
||||
"${CXX}" \
|
||||
$("${PKG_CONFIG}" --cflags cairo) \
|
||||
"${COOKBOOK_RECIPE}/cairodemo.c" \
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/redox-os/cargo.git"
|
||||
upstream = "https://github.com/rust-lang/cargo.git"
|
||||
branch = "redox-2023-01-21"
|
||||
git = "https://github.com/rust-lang/cargo.git"
|
||||
rev = "d73d2caf9e41a39daf2a8d6ce60ec80bf354d2a7" # 0.86
|
||||
patches = [
|
||||
"redox.patch"
|
||||
]
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
@ -19,14 +21,13 @@ export LIBZ_SYS_STATIC=1
|
||||
export DEP_NGHTTP2_ROOT="${COOKBOOK_SYSROOT}"
|
||||
export DEP_OPENSSL_ROOT="${COOKBOOK_SYSROOT}"
|
||||
export DEP_Z_ROOT="${COOKBOOK_SYSROOT}"
|
||||
# Force linking system nghttp2
|
||||
"${COOKBOOK_CARGO}" rustc \
|
||||
--manifest-path "${COOKBOOK_SOURCE}/Cargo.toml" \
|
||||
--release \
|
||||
--bin cargo \
|
||||
-- \
|
||||
-L "${COOKBOOK_SYSROOT}/lib" \
|
||||
-C link-arg="-lnghttp2"
|
||||
-C link-arg=-Wl,-rpath-link,${COOKBOOK_SYSROOT}/lib
|
||||
mkdir -pv "${COOKBOOK_STAGE}/usr/bin"
|
||||
cp -v "target/${TARGET}/release/cargo" "${COOKBOOK_STAGE}/usr/bin/cargo"
|
||||
"""
|
||||
|
||||
37
recipes/dev/cargo/redox.patch
Normal file
37
recipes/dev/cargo/redox.patch
Normal file
@ -0,0 +1,37 @@
|
||||
diff --git a/crates/cargo-util/src/paths.rs b/crates/cargo-util/src/paths.rs
|
||||
index 5d7e3c5a6..b7de5655f 100644
|
||||
--- a/crates/cargo-util/src/paths.rs
|
||||
+++ b/crates/cargo-util/src/paths.rs
|
||||
@@ -201,7 +201,7 @@ pub fn write_atomic<P: AsRef<Path>, C: AsRef<[u8]>>(path: P, contents: C) -> Res
|
||||
use std::os::unix::fs::PermissionsExt;
|
||||
|
||||
// these constants are u16 on macOS
|
||||
- let mask = u32::from(libc::S_IRWXU | libc::S_IRWXG | libc::S_IRWXO);
|
||||
+ let mask = (libc::S_IRWXU | libc::S_IRWXG | libc::S_IRWXO) as u32;
|
||||
let mode = meta.permissions().mode() & mask;
|
||||
|
||||
std::fs::Permissions::from_mode(mode)
|
||||
@@ -611,8 +611,6 @@ fn _link_or_copy(src: &Path, dst: &Path) -> Result<()> {
|
||||
}
|
||||
|
||||
let link_result = if src.is_dir() {
|
||||
- #[cfg(target_os = "redox")]
|
||||
- use std::os::redox::fs::symlink;
|
||||
#[cfg(unix)]
|
||||
use std::os::unix::fs::symlink;
|
||||
#[cfg(windows)]
|
||||
diff --git a/src/cargo/core/compiler/build_config.rs b/src/cargo/core/compiler/build_config.rs
|
||||
index 80aa592dd..d40c2056b 100644
|
||||
--- a/src/cargo/core/compiler/build_config.rs
|
||||
+++ b/src/cargo/core/compiler/build_config.rs
|
||||
@@ -51,9 +51,7 @@ pub struct BuildConfig {
|
||||
}
|
||||
|
||||
fn default_parallelism() -> CargoResult<u32> {
|
||||
- Ok(available_parallelism()
|
||||
- .context("failed to determine the amount of parallelism available")?
|
||||
- .get() as u32)
|
||||
+ Ok(1)
|
||||
}
|
||||
|
||||
impl BuildConfig {
|
||||
@ -22,9 +22,7 @@ dependencies = [
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
|
||||
export LDFLAGS="-Wl,-rpath-link,${COOKBOOK_SYSROOT}/lib $LDFLAGS"
|
||||
|
||||
COOKBOOK_CMAKE_FLAGS=(
|
||||
COOKBOOK_CMAKE_FLAGS+=(
|
||||
-DBUILD_TESTING=Off
|
||||
-DCMAKE_USE_SYSTEM_BZIP2=On
|
||||
-DCMAKE_USE_SYSTEM_CURL=On
|
||||
|
||||
9
recipes/dev/composer/recipe.toml
Normal file
9
recipes/dev/composer/recipe.toml
Normal file
@ -0,0 +1,9 @@
|
||||
#TODO must be run using `php $(which composer)`
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
mkdir -p "${COOKBOOK_STAGE}"/usr/bin
|
||||
wget -c https://getcomposer.org/download/2.8.12/composer.phar
|
||||
chmod a+x composer.phar
|
||||
cp composer.phar ${COOKBOOK_STAGE}/usr/bin/composer
|
||||
"""
|
||||
@ -21,12 +21,8 @@ mkdir -p "${COOKBOOK_SYSROOT}/usr"
|
||||
ln -sf "${COOKBOOK_SYSROOT}/include" "${COOKBOOK_SYSROOT}/usr/include"
|
||||
ln -sf "${COOKBOOK_SYSROOT}/lib" "${COOKBOOK_SYSROOT}/usr/lib"
|
||||
|
||||
COOKBOOK_CONFIGURE_FLAGS=(
|
||||
--host="${GNU_TARGET}"
|
||||
COOKBOOK_CONFIGURE_FLAGS+=(
|
||||
--target="${GNU_TARGET}"
|
||||
--prefix=/
|
||||
--enable-shared
|
||||
--disable-static
|
||||
--with-sysroot=/
|
||||
--with-build-sysroot="${COOKBOOK_SYSROOT}"
|
||||
--enable-languages=c,c++,lto
|
||||
@ -40,9 +36,12 @@ COOKBOOK_CONFIGURE_FLAGS=(
|
||||
"${COOKBOOK_CONFIGURE}" "${COOKBOOK_CONFIGURE_FLAGS[@]}"
|
||||
"${COOKBOOK_MAKE}" -j "${COOKBOOK_MAKE_JOBS}" all-gcc all-target-libgcc all-target-libstdc++-v3
|
||||
"${COOKBOOK_MAKE}" install-gcc install-target-libgcc install-target-libstdc++-v3 DESTDIR="${COOKBOOK_STAGE}"
|
||||
ln -s "gcc" "${COOKBOOK_STAGE}/bin/cc"
|
||||
mkdir -p "${COOKBOOK_STAGE}/usr/libexec"
|
||||
ln -s "/libexec/gcc" "${COOKBOOK_STAGE}/usr/libexec/gcc"
|
||||
ln -s "gcc" "${COOKBOOK_STAGE}/usr/bin/cc"
|
||||
# Avoid conflict with libgcc & libstdcxx
|
||||
rm -f "${COOKBOOK_STAGE}"/lib/libgcc_s.so* "${COOKBOOK_STAGE}"/lib/libstdc++.so*
|
||||
rm -f "${COOKBOOK_STAGE}"/usr/lib/libgcc_s.so* "${COOKBOOK_STAGE}"/usr/lib/libstdc++.so*
|
||||
"""
|
||||
|
||||
[package]
|
||||
dependencies = [
|
||||
"gnu-binutils"
|
||||
]
|
||||
|
||||
@ -129,27 +129,10 @@ diff -ruwN git-2.13.1/git-compat-util.h source/git-compat-util.h
|
||||
#define _FILE_OFFSET_BITS 64
|
||||
|
||||
|
||||
@@ -179,7 +191,9 @@
|
||||
#include <assert.h>
|
||||
#include <regex.h>
|
||||
#include <utime.h>
|
||||
+#if !defined(__redox__)
|
||||
#include <syslog.h>
|
||||
+#endif
|
||||
#ifndef NO_SYS_POLL_H
|
||||
#include <sys/poll.h>
|
||||
#else
|
||||
@@ -320,8 +334,20 @@
|
||||
#endif
|
||||
|
||||
#ifndef PATH_SEP
|
||||
+#if defined(__redox__)
|
||||
+#define PATH_SEP ';'
|
||||
+#else
|
||||
@@ -323,6 +335,14 @@
|
||||
#define PATH_SEP ':'
|
||||
#endif
|
||||
+#endif
|
||||
+
|
||||
|
||||
+#ifndef DEV_NULL
|
||||
+#if defined(__redox__)
|
||||
+#define DEV_NULL "/scheme/null"
|
||||
@ -157,58 +140,13 @@ diff -ruwN git-2.13.1/git-compat-util.h source/git-compat-util.h
|
||||
+#define DEV_NULL "/dev/null"
|
||||
+#endif
|
||||
+#endif
|
||||
|
||||
+
|
||||
#ifdef HAVE_PATHS_H
|
||||
#include <paths.h>
|
||||
@@ -333,6 +359,16 @@
|
||||
#ifndef has_dos_drive_prefix
|
||||
static inline int git_has_dos_drive_prefix(const char *path)
|
||||
{
|
||||
+#if defined(__redox__)
|
||||
+ char * pos = (char *)path;
|
||||
+ char c;
|
||||
+ while (c = *pos) {
|
||||
+ pos++;
|
||||
+ if (c == ':') {
|
||||
+ return pos - path;
|
||||
+ }
|
||||
+ }
|
||||
+#endif
|
||||
return 0;
|
||||
}
|
||||
#define has_dos_drive_prefix git_has_dos_drive_prefix
|
||||
@@ -341,7 +377,13 @@
|
||||
#ifndef skip_dos_drive_prefix
|
||||
static inline int git_skip_dos_drive_prefix(char **path)
|
||||
{
|
||||
+#if defined(__redox__)
|
||||
+ int ret = has_dos_drive_prefix(*path);
|
||||
+ *path += ret;
|
||||
+ return ret;
|
||||
+#else
|
||||
return 0;
|
||||
+#endif
|
||||
}
|
||||
#define skip_dos_drive_prefix git_skip_dos_drive_prefix
|
||||
#endif
|
||||
@@ -357,7 +399,14 @@
|
||||
#ifndef offset_1st_component
|
||||
static inline int git_offset_1st_component(const char *path)
|
||||
{
|
||||
+#if defined(__redox__)
|
||||
+ char * pos = (char *)path;
|
||||
+ skip_dos_drive_prefix(&pos);
|
||||
+ pos += is_dir_sep(*pos);
|
||||
+ return pos - path;
|
||||
+#else
|
||||
return is_dir_sep(path[0]);
|
||||
+#endif
|
||||
}
|
||||
#define offset_1st_component git_offset_1st_component
|
||||
#endif
|
||||
diff -ruwN git-2.13.1/Makefile source/Makefile
|
||||
--- git-2.13.1/Makefile 2017-06-04 19:08:11.000000000 -0600
|
||||
+++ source/Makefile 2025-04-18 10:00:11.319697447 -0600
|
||||
--- git-2.13.1/Makefile 2017-06-05 08:08:11.000000000 +0700
|
||||
+++ source/Makefile 2025-09-01 04:41:10.339224568 +0700
|
||||
@@ -979,7 +979,7 @@
|
||||
BUILTIN_OBJS += builtin/write-tree.o
|
||||
|
||||
@ -272,18 +210,9 @@ diff -ruwN git-2.13.1/run-command.c source/run-command.c
|
||||
if (dup2(fd, to) < 0)
|
||||
die_errno(_("dup2(%d,%d) failed"), fd, to);
|
||||
close(fd);
|
||||
@@ -138,7 +138,7 @@
|
||||
return NULL;
|
||||
|
||||
while (1) {
|
||||
- const char *end = strchrnul(p, ':');
|
||||
+ const char *end = strchrnul(p, PATH_SEP);
|
||||
|
||||
strbuf_reset(&buf);
|
||||
|
||||
diff -ruwN git-2.13.1/setup.c source/setup.c
|
||||
--- git-2.13.1/setup.c 2017-06-04 19:08:11.000000000 -0600
|
||||
+++ source/setup.c 2025-04-18 10:00:11.320697447 -0600
|
||||
--- git-2.13.1/setup.c 2017-06-05 08:08:11.000000000 +0700
|
||||
+++ source/setup.c 2025-09-01 04:41:10.339224568 +0700
|
||||
@@ -1146,11 +1146,11 @@
|
||||
/* if any standard file descriptor is missing open it to /dev/null */
|
||||
void sanitize_stdfds(void)
|
||||
|
||||
@ -28,8 +28,6 @@ MAKEFLAGS=(
|
||||
BLK_SHA1=1
|
||||
V=1
|
||||
)
|
||||
export LDFLAGS="-L${COOKBOOK_SYSROOT}/usr/lib"
|
||||
export CPPFLAGS="-I${COOKBOOK_SYSROOT}/usr/include"
|
||||
export CURL_CONFIG="${COOKBOOK_SYSROOT}/usr/bin/curl-config"
|
||||
./configure \
|
||||
--host="${GNU_TARGET}" \
|
||||
|
||||
@ -31,7 +31,7 @@ case "${TARGET}" in
|
||||
;;
|
||||
esac
|
||||
|
||||
COOKBOOK_CMAKE_FLAGS=(
|
||||
COOKBOOK_CMAKE_FLAGS+=(
|
||||
-DCMAKE_CXX_FLAGS="--std=gnu++11"
|
||||
-DBUILD_SHARED_LIBS=False
|
||||
-DLLVM_LINK_LLVM_DYLIB=On
|
||||
|
||||
80
recipes/dev/php84/recipe.toml
Normal file
80
recipes/dev/php84/recipe.toml
Normal file
@ -0,0 +1,80 @@
|
||||
[source]
|
||||
tar = "https://www.php.net/distributions/php-8.4.12.tar.xz"
|
||||
patches = [
|
||||
"redox.patch"
|
||||
]
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
dependencies = [
|
||||
"bzip2",
|
||||
"curl",
|
||||
"gettext",
|
||||
"libffi",
|
||||
"libgmp",
|
||||
"libavif",
|
||||
"libicu",
|
||||
"libjpeg",
|
||||
"libedit",
|
||||
"libonig",
|
||||
"libpng",
|
||||
"libsodium",
|
||||
"libwebp",
|
||||
"libxml2",
|
||||
"libiconv",
|
||||
"libzip",
|
||||
"ncurses",
|
||||
"nghttp2",
|
||||
"openssl1",
|
||||
"openssl3", # put this after openssl1
|
||||
"pcre",
|
||||
"sqlite3",
|
||||
"xz",
|
||||
"zlib",
|
||||
"zstd",
|
||||
]
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
export SUFFIX="84"
|
||||
|
||||
export CURL_LIBS="-lcurl -lnghttp2 -lssl -lcrypto"
|
||||
COOKBOOK_CONFIGURE_FLAGS+=(
|
||||
--program-suffix=${SUFFIX}
|
||||
--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-gd
|
||||
--enable-intl
|
||||
--enable-mbstring
|
||||
--with-curl
|
||||
--with-gettext
|
||||
--with-gmp
|
||||
--with-jpeg
|
||||
--with-webp
|
||||
--with-avif
|
||||
--with-ffi
|
||||
--with-libedit
|
||||
--with-openssl
|
||||
--with-sodium
|
||||
--with-zip
|
||||
)
|
||||
|
||||
"${COOKBOOK_CONFIGURE}" "${COOKBOOK_CONFIGURE_FLAGS[@]}" "$@"
|
||||
"${COOKBOOK_MAKE}" -j "${COOKBOOK_MAKE_JOBS}"
|
||||
"${COOKBOOK_MAKE}" install \
|
||||
INSTALL_ROOT="${COOKBOOK_STAGE}" \
|
||||
datarootdir=/usr/share localstatedir=/var
|
||||
|
||||
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
|
||||
# will not exist on bash but exist on other shell
|
||||
rm -f ${COOKBOOK_STAGE}/usr/bin/phar$SUFFIX
|
||||
cp ${COOKBOOK_SOURCE}/php.ini* ${COOKBOOK_STAGE}/etc/php/$SUFFIX/
|
||||
"""
|
||||
89
recipes/dev/php84/redox.patch
Normal file
89
recipes/dev/php84/redox.patch
Normal file
@ -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;
|
||||
81
recipes/dev/python312/recipe.toml
Normal file
81
recipes/dev/python312/recipe.toml
Normal file
@ -0,0 +1,81 @@
|
||||
[source]
|
||||
tar = "https://www.python.org/ftp/python/3.12.0/Python-3.12.0.tar.xz"
|
||||
patches = [
|
||||
"redox.patch"
|
||||
]
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
dependencies = [
|
||||
"bzip2",
|
||||
"libffi",
|
||||
"libuuid",
|
||||
"openssl3",
|
||||
"ncurses",
|
||||
"ncursesw",
|
||||
"readline",
|
||||
"sqlite3",
|
||||
"zlib",
|
||||
"xz",
|
||||
"zstd",
|
||||
]
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
|
||||
# Build host python3
|
||||
mkdir -p host
|
||||
pushd host
|
||||
#TODO: easier way to build for host?
|
||||
HOST_ENV=(
|
||||
env
|
||||
--unset=AR
|
||||
--unset=AS
|
||||
--unset=CC
|
||||
--unset=CFLAGS
|
||||
--unset=CPPFLAGS
|
||||
--unset=CXX
|
||||
--unset=GNU_TARGET
|
||||
--unset=LD
|
||||
--unset=LDFLAGS
|
||||
--unset=NM
|
||||
--unset=OBJCOPY
|
||||
--unset=OBJDUMP
|
||||
--unset=PKG_CONFIG
|
||||
--unset=PKG_CONFIG_ALLOW_CROSS
|
||||
--unset=PKG_CONFIG_FOR_BUILD
|
||||
--unset=PKG_CONFIG_LIBDIR
|
||||
--unset=PKG_CONFIG_PATH
|
||||
--unset=PKG_CONFIG_SYSROOT_DIR
|
||||
--unset=PREFIX_RUSTFLAGS
|
||||
--unset=RANLIB
|
||||
--unset=READELF
|
||||
--unset=STRIP
|
||||
--unset=TARGET
|
||||
)
|
||||
"${HOST_ENV[@]}" "${COOKBOOK_CONFIGURE}" --prefix="${PWD}/usr"
|
||||
"${HOST_ENV[@]}" "${COOKBOOK_MAKE}" -j"${COOKBOOK_MAKE_JOBS}"
|
||||
"${HOST_ENV[@]}" "${COOKBOOK_MAKE}" altinstall
|
||||
popd
|
||||
|
||||
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
|
||||
--disable-ipv6
|
||||
--host=${GNU_TARGET}
|
||||
--build="$ARCH"
|
||||
--with-build-python="${PWD}/host/usr/bin/python3.12"
|
||||
--with-ensurepip=install
|
||||
--disable-test-modules
|
||||
ac_cv_file__dev_ptmx=no
|
||||
ac_cv_file__dev_ptc=no
|
||||
)
|
||||
|
||||
cookbook_configure
|
||||
"""
|
||||
216
recipes/dev/python312/redox.patch
Normal file
216
recipes/dev/python312/redox.patch
Normal file
@ -0,0 +1,216 @@
|
||||
diff -ruwN source/configure source-new/configure
|
||||
--- source/configure 2023-10-02 05:48:14.000000000 -0600
|
||||
+++ source-new/configure 2025-09-28 13:44:57.914820310 -0600
|
||||
@@ -4276,6 +4276,9 @@
|
||||
*-*-wasi)
|
||||
ac_sys_system=WASI
|
||||
;;
|
||||
+ *-*-redox*)
|
||||
+ ac_sys_system=Redox
|
||||
+ ;;
|
||||
*)
|
||||
# for now, limit cross builds to known configurations
|
||||
MACHDEP="unknown"
|
||||
@@ -4300,6 +4303,7 @@
|
||||
case $MACHDEP in
|
||||
aix*) MACHDEP="aix";;
|
||||
linux*) MACHDEP="linux";;
|
||||
+ redox*) MACHDEP="redox";;
|
||||
cygwin*) MACHDEP="cygwin";;
|
||||
darwin*) MACHDEP="darwin";;
|
||||
'') MACHDEP="unknown";;
|
||||
@@ -4311,7 +4315,7 @@
|
||||
|
||||
if test "$cross_compiling" = yes; then
|
||||
case "$host" in
|
||||
- *-*-linux*)
|
||||
+ *-*-linux*|*-*-redox*)
|
||||
case "$host_cpu" in
|
||||
arm*)
|
||||
_host_cpu=arm
|
||||
@@ -6746,6 +6750,7 @@
|
||||
#undef cris
|
||||
#undef fr30
|
||||
#undef linux
|
||||
+#undef redox
|
||||
#undef hppa
|
||||
#undef hpux
|
||||
#undef i386
|
||||
@@ -6891,6 +6896,18 @@
|
||||
# endif
|
||||
#elif defined(__gnu_hurd__)
|
||||
i386-gnu
|
||||
+#elif defined(__redox__)
|
||||
+# if defined(__x86_64__)
|
||||
+ x86_64-redox
|
||||
+# elif defined(__i386__)
|
||||
+ i386-redox
|
||||
+# elif defined(__aarch64__)
|
||||
+ aarch64-redox
|
||||
+# elif defined(__riscv)
|
||||
+ riscv64-redox
|
||||
+# else
|
||||
+# error unknown platform triplet
|
||||
+# endif
|
||||
#elif defined(__APPLE__)
|
||||
darwin
|
||||
#elif defined(__VXWORKS__)
|
||||
@@ -7488,7 +7505,7 @@
|
||||
PY3LIBRARY=libpython3.so
|
||||
fi
|
||||
;;
|
||||
- Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|VxWorks*)
|
||||
+ Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|VxWorks*|Redox*)
|
||||
LDLIBRARY='libpython$(LDVERSION).so'
|
||||
BLDLIBRARY='-L. -lpython$(LDVERSION)'
|
||||
RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
|
||||
@@ -12753,7 +12770,7 @@
|
||||
Emscripten|WASI)
|
||||
LDSHARED='$(CC) -shared'
|
||||
LDCXXSHARED='$(CXX) -shared';;
|
||||
- Linux*|GNU*|QNX*|VxWorks*|Haiku*)
|
||||
+ Linux*|GNU*|QNX*|VxWorks*|Haiku*|Redox*)
|
||||
LDSHARED='$(CC) -shared'
|
||||
LDCXXSHARED='$(CXX) -shared';;
|
||||
FreeBSD*)
|
||||
@@ -12839,7 +12856,7 @@
|
||||
else CCSHARED="+z";
|
||||
fi;;
|
||||
Linux-android*) ;;
|
||||
- Linux*|GNU*) CCSHARED="-fPIC";;
|
||||
+ Linux*|GNU*|Redox*) CCSHARED="-fPIC";;
|
||||
Emscripten*|WASI*)
|
||||
if test "x$enable_wasm_dynamic_linking" = xyes
|
||||
then :
|
||||
@@ -12877,7 +12894,7 @@
|
||||
LINKFORSHARED="-Wl,-E -Wl,+s";;
|
||||
# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
|
||||
Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
|
||||
- Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
|
||||
+ Linux*|GNU*|Redox*) LINKFORSHARED="-Xlinker -export-dynamic";;
|
||||
# -u libsys_s pulls in all symbols in libsys
|
||||
Darwin/*)
|
||||
LINKFORSHARED="$extra_undefs -framework CoreFoundation"
|
||||
diff -ruwN source/Include/pyport.h source-new/Include/pyport.h
|
||||
--- source/Include/pyport.h 2023-10-02 05:48:14.000000000 -0600
|
||||
+++ source-new/Include/pyport.h 2025-09-28 13:44:57.916856922 -0600
|
||||
@@ -684,7 +684,7 @@
|
||||
# error "Py_TRACE_REFS ABI is not compatible with release and debug ABI"
|
||||
#endif
|
||||
|
||||
-#if defined(__ANDROID__) || defined(__VXWORKS__)
|
||||
+#if defined(__ANDROID__) || defined(__VXWORKS__) || defined(__redox__)
|
||||
// Use UTF-8 as the locale encoding, ignore the LC_CTYPE locale.
|
||||
// See _Py_GetLocaleEncoding(), PyUnicode_DecodeLocale()
|
||||
// and PyUnicode_EncodeLocale().
|
||||
diff -ruwN source/Modules/_cryptmodule.c source-new/Modules/_cryptmodule.c
|
||||
--- source/Modules/_cryptmodule.c 2023-10-02 05:48:14.000000000 -0600
|
||||
+++ source-new/Modules/_cryptmodule.c 2025-09-28 13:44:57.917139387 -0600
|
||||
@@ -38,13 +38,7 @@
|
||||
/*[clinic end generated code: output=0512284a03d2803c input=0e8edec9c364352b]*/
|
||||
{
|
||||
char *crypt_result;
|
||||
-#ifdef HAVE_CRYPT_R
|
||||
- struct crypt_data data;
|
||||
- memset(&data, 0, sizeof(data));
|
||||
- crypt_result = crypt_r(word, salt, &data);
|
||||
-#else
|
||||
crypt_result = crypt(word, salt);
|
||||
-#endif
|
||||
if (crypt_result == NULL) {
|
||||
return PyErr_SetFromErrno(PyExc_OSError);
|
||||
}
|
||||
diff -ruwN source/Modules/posixmodule.c source-new/Modules/posixmodule.c
|
||||
--- source/Modules/posixmodule.c 2023-10-02 05:48:14.000000000 -0600
|
||||
+++ source-new/Modules/posixmodule.c 2025-09-28 13:44:57.918070573 -0600
|
||||
@@ -2610,8 +2610,7 @@
|
||||
#ifdef HAVE_FSTATAT
|
||||
if ((dir_fd != DEFAULT_DIR_FD) || !follow_symlinks) {
|
||||
if (HAVE_FSTATAT_RUNTIME) {
|
||||
- result = fstatat(dir_fd, path->narrow, &st,
|
||||
- follow_symlinks ? 0 : AT_SYMLINK_NOFOLLOW);
|
||||
+ result = fstatat(dir_fd, path->narrow, &st, 0);
|
||||
|
||||
} else {
|
||||
fstatat_unavailable = 1;
|
||||
@@ -3083,8 +3082,6 @@
|
||||
|
||||
if (HAVE_FACCESSAT_RUNTIME) {
|
||||
int flags = 0;
|
||||
- if (!follow_symlinks)
|
||||
- flags |= AT_SYMLINK_NOFOLLOW;
|
||||
if (effective_ids)
|
||||
flags |= AT_EACCESS;
|
||||
result = faccessat(dir_fd, path->narrow, mode, flags);
|
||||
@@ -3369,8 +3366,7 @@
|
||||
* support dir_fd and follow_symlinks=False. (Hopefully.)
|
||||
* Until then, we need to be careful what exception we raise.
|
||||
*/
|
||||
- result = fchmodat(dir_fd, path->narrow, mode,
|
||||
- follow_symlinks ? 0 : AT_SYMLINK_NOFOLLOW);
|
||||
+ result = fchmodat(dir_fd, path->narrow, mode, 0);
|
||||
/*
|
||||
* But wait! We can't throw the exception without allowing threads,
|
||||
* and we can't do that in this nested scope. (Macro trickery, sigh.)
|
||||
@@ -3747,8 +3743,7 @@
|
||||
#ifdef HAVE_FCHOWNAT
|
||||
if ((dir_fd != DEFAULT_DIR_FD) || (!follow_symlinks)) {
|
||||
if (HAVE_FCHOWNAT_RUNTIME) {
|
||||
- result = fchownat(dir_fd, path->narrow, uid, gid,
|
||||
- follow_symlinks ? 0 : AT_SYMLINK_NOFOLLOW);
|
||||
+ result = fchownat(dir_fd, path->narrow, uid, gid, 0);
|
||||
} else {
|
||||
fchownat_unsupported = 1;
|
||||
}
|
||||
@@ -14598,8 +14593,7 @@
|
||||
#ifdef HAVE_FSTATAT
|
||||
if (HAVE_FSTATAT_RUNTIME) {
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
- result = fstatat(self->dir_fd, path, &st,
|
||||
- follow_symlinks ? 0 : AT_SYMLINK_NOFOLLOW);
|
||||
+ result = fstatat(self->dir_fd, path, &st, 0);
|
||||
Py_END_ALLOW_THREADS
|
||||
} else
|
||||
|
||||
diff -ruwN source/Modules/resource.c source-new/Modules/resource.c
|
||||
--- source/Modules/resource.c 2023-10-02 05:48:14.000000000 -0600
|
||||
+++ source-new/Modules/resource.c 2025-09-28 13:44:57.919295094 -0600
|
||||
@@ -216,7 +216,7 @@
|
||||
{
|
||||
struct rlimit rl;
|
||||
|
||||
- if (resource < 0 || resource >= RLIM_NLIMITS) {
|
||||
+ if (resource < 0 || resource >= RLIMIT_NLIMITS) {
|
||||
PyErr_SetString(PyExc_ValueError,
|
||||
"invalid resource specified");
|
||||
return NULL;
|
||||
@@ -244,7 +244,7 @@
|
||||
{
|
||||
struct rlimit rl;
|
||||
|
||||
- if (resource < 0 || resource >= RLIM_NLIMITS) {
|
||||
+ if (resource < 0 || resource >= RLIMIT_NLIMITS) {
|
||||
PyErr_SetString(PyExc_ValueError,
|
||||
"invalid resource specified");
|
||||
return NULL;
|
||||
@@ -292,7 +292,7 @@
|
||||
struct rlimit old_limit, new_limit;
|
||||
int retval;
|
||||
|
||||
- if (resource < 0 || resource >= RLIM_NLIMITS) {
|
||||
+ if (resource < 0 || resource >= RLIMIT_NLIMITS) {
|
||||
PyErr_SetString(PyExc_ValueError,
|
||||
"invalid resource specified");
|
||||
return NULL;
|
||||
diff -ruwN source/Modules/timemodule.c source-new/Modules/timemodule.c
|
||||
--- source/Modules/timemodule.c 2023-10-02 05:48:14.000000000 -0600
|
||||
+++ source-new/Modules/timemodule.c 2025-09-28 13:45:28.513234796 -0600
|
||||
@@ -1494,7 +1494,7 @@
|
||||
|
||||
#elif defined(HAVE_CLOCK_GETTIME) && \
|
||||
defined(CLOCK_PROCESS_CPUTIME_ID) && \
|
||||
- !defined(__EMSCRIPTEN__) && !defined(__wasi__)
|
||||
+ !defined(__EMSCRIPTEN__) && !defined(__wasi__) && !defined(__redox__)
|
||||
#define HAVE_THREAD_TIME
|
||||
|
||||
#if defined(__APPLE__) && defined(__has_attribute) && __has_attribute(availability)
|
||||
@ -15,8 +15,8 @@ dependencies = [
|
||||
template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
export CFLAGS="-I${COOKBOOK_SYSROOT}/include/SDL"
|
||||
export CPPFLAGS="-I${COOKBOOK_SYSROOT}/include/SDL"
|
||||
export CFLAGS="${CFLAGS} -I${COOKBOOK_SYSROOT}/include/SDL"
|
||||
export CPPFLAGS="${CPPFLAGS} -I${COOKBOOK_SYSROOT}/include/SDL"
|
||||
export LDFLAGS+=" -lorbital"
|
||||
COOKBOOK_CONFIGURE_FLAGS+=(
|
||||
--disable-opengl
|
||||
|
||||
@ -16,8 +16,8 @@ dependencies = [
|
||||
]
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
export CFLAGS="${CFLAGS} -I${COOKBOOK_SYSROOT}/usr/include -I${COOKBOOK_SYSROOT}/usr/include/SDL2"
|
||||
export CXXFLAGS="${CXXFLAGS} -D_GLIBCXX_USE_C99_MATH_TR1=1 -I${COOKBOOK_SYSROOT}/usr/include -I${COOKBOOK_SYSROOT}/usr/include/SDL2"
|
||||
export CFLAGS="${CFLAGS} -I${COOKBOOK_SYSROOT}/usr/include/SDL2"
|
||||
export CXXFLAGS="${CXXFLAGS} -D_GLIBCXX_USE_C99_MATH_TR1=1 -I${COOKBOOK_SYSROOT}/usr/include/SDL2"
|
||||
#TODO: don't use this
|
||||
export SDL_LIBS="-lSDL2 -lorbital $("${TARGET}-pkg-config" --libs osmesa) -lstdc++"
|
||||
#TODO: don't add curl
|
||||
|
||||
@ -17,7 +17,7 @@ export BUILDDIR="${COOKBOOK_BUILD}"
|
||||
export DESTDIR="${COOKBOOK_STAGE}"
|
||||
|
||||
# Redox currently doesn't support dynamic library loading
|
||||
export LDFLAGS="$(pkg-config --libs sdl)"
|
||||
export LDFLAGS="${LDFLAGS} $(pkg-config --libs sdl)"
|
||||
|
||||
# Networking is currently broken on Redox (missing setsockopt?)
|
||||
export USE_NET=0
|
||||
|
||||
@ -19,14 +19,9 @@ DYNAMIC_INIT
|
||||
# Copy source to build directory
|
||||
rsync -av --delete "${COOKBOOK_SOURCE}/" ./
|
||||
|
||||
export CFLAGS="-I${COOKBOOK_SYSROOT}/include -I${COOKBOOK_SYSROOT}/include/SDL"
|
||||
export CFLAGS="${CFLAGS} -I${COOKBOOK_SYSROOT}/include/SDL"
|
||||
export SDLCONFIG="${COOKBOOK_SYSROOT}/bin/sdl-config --prefix=${COOKBOOK_SYSROOT}"
|
||||
|
||||
export LDFLAGS="-L${COOKBOOK_SYSROOT}/lib"
|
||||
if [[ -n "${COOKBOOK_PREFER_STATIC}" ]]; then
|
||||
LDFLAGS+=" -static"
|
||||
fi
|
||||
|
||||
PLATFORM=REDOX "${COOKBOOK_MAKE}" -j"$($NPROC)"
|
||||
|
||||
mkdir -pv "${COOKBOOK_STAGE}/usr/games"
|
||||
|
||||
@ -21,8 +21,6 @@ DYNAMIC_INIT
|
||||
rsync -av --delete "${COOKBOOK_SOURCE}/" ./
|
||||
|
||||
export CPPHOST="${TARGET}-g++"
|
||||
export LDFLAGS="-L${COOKBOOK_SYSROOT}/lib"
|
||||
export CPPFLAGS="-I${COOKBOOK_SYSROOT}/include"
|
||||
|
||||
"${REDOX_MAKE}" all -j"$(${NPROC})"
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ export bindir="${prefix}/games"
|
||||
export icondir="/ui/icons/apps"
|
||||
export gamesdir="${prefix}/share/games"
|
||||
|
||||
if ! [[ -n "${COOKBOOK_PREFER_STATIC}" ]]; then
|
||||
if [ "${COOKBOOK_DYNAMIC}" == "1" ]; then
|
||||
LDFLAGS+=" -lstdc++"
|
||||
fi
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ export USE_SDL2=1
|
||||
export USE_CODEC_MP3=0
|
||||
export DO_USERDIRS=1
|
||||
|
||||
if ! [[ -n "${COOKBOOK_PREFER_STATIC}" ]]; then
|
||||
if [ "${COOKBOOK_DYNAMIC}" == "1" ]; then
|
||||
LDFLAGS+=" -lstdc++"
|
||||
fi
|
||||
|
||||
|
||||
@ -10,8 +10,7 @@ dependencies = [
|
||||
"libiconv",
|
||||
]
|
||||
script = """
|
||||
export CFLAGS="-I${COOKBOOK_SYSROOT}/include -I${COOKBOOK_SYSROOT}/include/SDL"
|
||||
export LDFLAGS="-L${COOKBOOK_SYSROOT}/lib -static"
|
||||
export CFLAGS="${CFLAGS} -I${COOKBOOK_SYSROOT}/include/SDL"
|
||||
export LIBS="-lSDL -lorbital" # TODO: Uses sdl-config instead of pkg-config
|
||||
|
||||
# For some reason, cook_configure breaks spectacularly on this
|
||||
|
||||
@ -1,38 +0,0 @@
|
||||
VERSION=2.0
|
||||
GIT=https://github.com/xTibor/VVVVVV
|
||||
BRANCH=redox
|
||||
GIT_UPSTREAM=https://github.com/TerryCavanagh/VVVVVV
|
||||
BUILD_DEPENDS=(sdl2-image sdl2-mixer sdl2 liborbital llvm18 mesa mesa-glu zlib libogg libvorbis)
|
||||
|
||||
function recipe_version {
|
||||
printf "1.0.0"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_build {
|
||||
sysroot="$(realpath ../sysroot)"
|
||||
cd desktop_version
|
||||
|
||||
cmake \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=/ \
|
||||
-DBUILD_STATIC=ON \
|
||||
-DBUILD_SHARED=OFF \
|
||||
-DSDL2_INCLUDE_DIRS="$sysroot/include/SDL2" \
|
||||
-DSDL2_LIBRARIES="-static -lSDL2main -lSDL2_mixer -lSDL2 $("${PKG_CONFIG}" --libs glu) -lorbital -lz -lvorbisfile -lvorbis -logg" \
|
||||
.
|
||||
|
||||
"$REDOX_MAKE" -j"$($NPROC)"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_clean {
|
||||
echo "skipping clean"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_stage {
|
||||
dest="$(realpath $1)"
|
||||
mkdir -pv "$1/usr/games/vvvvvv"
|
||||
cp ./desktop_version/VVVVVV "$1/usr/games/vvvvvv"
|
||||
skip=1
|
||||
}
|
||||
@ -1,62 +0,0 @@
|
||||
VERSION=1.14.6
|
||||
GIT=https://github.com/wesnoth/wesnoth.git
|
||||
BRANCH=$VERSION
|
||||
BUILD_DEPENDS=(
|
||||
cairo
|
||||
freetype2
|
||||
glib
|
||||
libjpeg
|
||||
liborbital
|
||||
libpng
|
||||
libvorbis
|
||||
llvm18
|
||||
mesa mesa-glu
|
||||
pcre
|
||||
pixman
|
||||
sdl2 sdl2-image sdl2-mixer sdl2-ttf
|
||||
zlib
|
||||
)
|
||||
|
||||
function recipe_version {
|
||||
printf "$VERSION"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_build {
|
||||
sysroot="$(realpath ../sysroot)"
|
||||
export CFLAGS="-I$sysroot/include"
|
||||
export LDFLAGS="-L$sysroot/lib"
|
||||
|
||||
rm -rf build
|
||||
mkdir -p build
|
||||
cd build
|
||||
set -x
|
||||
cmake \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=/ \
|
||||
-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY \
|
||||
-DENABLE_SERVER=OFF \
|
||||
-DENABLE_TESTS=OFF \
|
||||
-DCRYPTO_LIBRARY=openssl \
|
||||
-DSDL2_LIBRARY=sdl2 \
|
||||
-DSDL2_IMAGE_LIBRARY=SDL2_image \
|
||||
-DSDL2_MIXER_LIBRARY=SDL2_mixer \
|
||||
-DSDL2_TTF_LIBRARY=SDL2_ttf \
|
||||
-DVORBISFILE_INCLUDE_DIR="${sysroot}/include" \
|
||||
-DVORBISFILE_LIBRARY=vorbisfile \
|
||||
..
|
||||
VERBOSE=1 "$REDOX_MAKE" all -j"$($NPROC)"
|
||||
set +x
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_clean {
|
||||
rm -rf build
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_stage {
|
||||
dest="$(realpath $1)"
|
||||
mkdir -pv "$dest/bin"
|
||||
cp "build/wesnoth" "$dest/bin/wesnoth"
|
||||
skip=1
|
||||
}
|
||||
6
recipes/gui/installer-gui/manifest
Normal file
6
recipes/gui/installer-gui/manifest
Normal file
@ -0,0 +1,6 @@
|
||||
name=Redox Installer
|
||||
category=System
|
||||
binary=/usr/bin/redox_installer_gui
|
||||
icon=/usr/share/icons/Pop/48x48/apps/system-os-installer.svg
|
||||
author=Jeremy Soller
|
||||
description=GUI Installer for Redox
|
||||
@ -2,4 +2,10 @@
|
||||
git = "https://gitlab.redox-os.org/redox-os/installer-gui.git"
|
||||
|
||||
[build]
|
||||
template = "cargo"
|
||||
template = "custom"
|
||||
script = """
|
||||
cookbook_cargo
|
||||
|
||||
mkdir -pv "${COOKBOOK_STAGE}/ui/apps"
|
||||
cp -v "${COOKBOOK_RECIPE}/manifest" "${COOKBOOK_STAGE}/ui/apps/redox-installer-gui"
|
||||
"""
|
||||
|
||||
@ -4,6 +4,6 @@ git = "https://gitlab.freedesktop.org/xdg/default-icon-theme.git"
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
meson setup -Dprefix=/usr . "${COOKBOOK_SOURCE}"
|
||||
meson setup --reconfigure -Dprefix=/usr . "${COOKBOOK_SOURCE}"
|
||||
env DESTDIR="${COOKBOOK_STAGE}" meson install
|
||||
"""
|
||||
|
||||
@ -9,12 +9,8 @@ autotools_recursive_regenerate
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
COOKBOOK_CONFIGURE_FLAGS=(
|
||||
--host="${GNU_TARGET}"
|
||||
--prefix="/usr"
|
||||
--enable-shared
|
||||
--enable-static
|
||||
DYNAMIC_STATIC_INIT
|
||||
COOKBOOK_CONFIGURE_FLAGS+=(
|
||||
--without-docbook
|
||||
--without-examples
|
||||
--without-tests
|
||||
|
||||
@ -9,6 +9,6 @@ dependencies = [
|
||||
"zlib"
|
||||
]
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
cookbook_meson -Ddefault_library=both
|
||||
DYNAMIC_STATIC_INIT
|
||||
cookbook_meson
|
||||
"""
|
||||
|
||||
@ -1,6 +1,20 @@
|
||||
diff -ruwN '--exclude=subprojects' glib-2.82.5/gio/glocalfile.c source/gio/glocalfile.c
|
||||
--- glib-2.82.5/gio/glocalfile.c 2025-02-20 06:08:16.000000000 -0700
|
||||
+++ source/gio/glocalfile.c 2025-09-08 15:00:09.240010601 -0600
|
||||
@@ -77,6 +77,10 @@
|
||||
|
||||
#include "glib-private.h"
|
||||
|
||||
+#if defined(__redox__)
|
||||
+#undef AT_FDCWD
|
||||
+#endif
|
||||
+
|
||||
#ifdef G_OS_WIN32
|
||||
#include <windows.h>
|
||||
#include <io.h>
|
||||
diff -ruwN '--exclude=subprojects' glib-2.82.5/gio/gnetworking.h.in source/gio/gnetworking.h.in
|
||||
--- glib-2.82.5/gio/gnetworking.h.in 2025-02-20 06:08:16.000000000 -0700
|
||||
+++ source/gio/gnetworking.h.in 2025-04-10 14:12:46.307891418 -0600
|
||||
+++ source/gio/gnetworking.h.in 2025-04-21 14:36:14.671018625 -0600
|
||||
@@ -40,13 +40,17 @@
|
||||
#include <netdb.h>
|
||||
#include <netinet/in.h>
|
||||
@ -19,9 +33,42 @@ diff -ruwN '--exclude=subprojects' glib-2.82.5/gio/gnetworking.h.in source/gio/g
|
||||
@NAMESER_COMPAT_INCLUDE@
|
||||
|
||||
#ifndef __GI_SCANNER__
|
||||
diff -ruwN '--exclude=subprojects' glib-2.82.5/gio/gsocket.c source/gio/gsocket.c
|
||||
--- glib-2.82.5/gio/gsocket.c 2025-02-20 06:08:16.000000000 -0700
|
||||
+++ source/gio/gsocket.c 2025-06-16 09:52:49.595949295 -0600
|
||||
@@ -487,6 +487,7 @@
|
||||
if (!g_socket_get_option (socket, SOL_SOCKET, SO_TYPE, &value, NULL))
|
||||
{
|
||||
errsv = get_socket_errno ();
|
||||
+ fprintf(stderr, "%s:%d\n", __FILE__, __LINE__);
|
||||
goto err;
|
||||
}
|
||||
|
||||
@@ -513,6 +514,7 @@
|
||||
if (getsockname (fd, &address.sa, &addrlen) != 0)
|
||||
{
|
||||
errsv = get_socket_errno ();
|
||||
+ fprintf(stderr, "%s:%d\n", __FILE__, __LINE__);
|
||||
goto err;
|
||||
}
|
||||
|
||||
@@ -531,11 +533,13 @@
|
||||
if (!g_socket_get_option (socket, SOL_SOCKET, SO_DOMAIN, &family, NULL))
|
||||
{
|
||||
errsv = get_socket_errno ();
|
||||
+ fprintf(stderr, "%s:%d\n", __FILE__, __LINE__);
|
||||
goto err;
|
||||
}
|
||||
#else
|
||||
/* This will translate to G_IO_ERROR_FAILED on either unix or windows */
|
||||
errsv = -1;
|
||||
+ fprintf(stderr, "%s:%d\n", __FILE__, __LINE__);
|
||||
goto err;
|
||||
#endif
|
||||
}
|
||||
diff -ruwN '--exclude=subprojects' glib-2.82.5/gio/gthreadedresolver.c source/gio/gthreadedresolver.c
|
||||
--- glib-2.82.5/gio/gthreadedresolver.c 2025-02-20 06:08:16.000000000 -0700
|
||||
+++ source/gio/gthreadedresolver.c 2025-04-10 15:19:32.649611384 -0600
|
||||
+++ source/gio/gthreadedresolver.c 2025-04-21 14:36:14.672018626 -0600
|
||||
@@ -579,8 +579,26 @@
|
||||
return g_task_propagate_pointer (G_TASK (result), error);
|
||||
}
|
||||
@ -64,7 +111,7 @@ diff -ruwN '--exclude=subprojects' glib-2.82.5/gio/gthreadedresolver.c source/gi
|
||||
len = res_query (rrname, C_IN, rrtype, answer->data, answer->len);
|
||||
diff -ruwN '--exclude=subprojects' glib-2.82.5/gio/gunixmounts.c source/gio/gunixmounts.c
|
||||
--- glib-2.82.5/gio/gunixmounts.c 2025-02-20 06:08:16.000000000 -0700
|
||||
+++ source/gio/gunixmounts.c 2025-04-10 14:57:29.342807607 -0600
|
||||
+++ source/gio/gunixmounts.c 2025-04-21 14:36:14.672018626 -0600
|
||||
@@ -1135,6 +1135,37 @@
|
||||
return NULL;
|
||||
}
|
||||
@ -134,7 +181,7 @@ diff -ruwN '--exclude=subprojects' glib-2.82.5/gio/gunixmounts.c source/gio/guni
|
||||
}
|
||||
diff -ruwN '--exclude=subprojects' glib-2.82.5/gio/meson.build source/gio/meson.build
|
||||
--- glib-2.82.5/gio/meson.build 2025-02-20 06:08:16.000000000 -0700
|
||||
+++ source/gio/meson.build 2025-04-10 14:06:57.909467382 -0600
|
||||
+++ source/gio/meson.build 2025-04-21 14:36:14.672018626 -0600
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
gnetworking_h_nameser_compat_include = ''
|
||||
@ -155,7 +202,7 @@ diff -ruwN '--exclude=subprojects' glib-2.82.5/gio/meson.build source/gio/meson.
|
||||
int main (int argc, char ** argv) {
|
||||
diff -ruwN '--exclude=subprojects' glib-2.82.5/gio/xdgmime/xdgmimecache.c source/gio/xdgmime/xdgmimecache.c
|
||||
--- glib-2.82.5/gio/xdgmime/xdgmimecache.c 2025-02-20 06:08:16.000000000 -0700
|
||||
+++ source/gio/xdgmime/xdgmimecache.c 2025-04-10 14:11:44.020815595 -0600
|
||||
+++ source/gio/xdgmime/xdgmimecache.c 2025-04-21 14:36:14.673018628 -0600
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <fnmatch.h>
|
||||
#include <assert.h>
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
[source]
|
||||
tar = "https://libarchive.org/downloads/libarchive-3.6.2.tar.xz"
|
||||
blake3 = "f98695fe81235a74fa3fc2c3ba0f0d4f13ea15f9be3850b83e304cf5d78be710"
|
||||
patches = [
|
||||
"redox.patch"
|
||||
]
|
||||
|
||||
[build]
|
||||
template = "configure"
|
||||
|
||||
13
recipes/libs/libarchive/redox.patch
Normal file
13
recipes/libs/libarchive/redox.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff -ruwN source/configure source-new/configure
|
||||
--- source/configure 2022-12-09 20:38:47.000000000 +0700
|
||||
+++ source-new/configure 2025-09-14 17:17:50.138530195 +0700
|
||||
@@ -19039,7 +19039,8 @@
|
||||
ac_fn_c_check_func "$LINENO" "fstatat" "ac_cv_func_fstatat"
|
||||
if test "x$ac_cv_func_fstatat" = xyes
|
||||
then :
|
||||
- printf "%s\n" "#define HAVE_FSTATAT 1" >>confdefs.h
|
||||
+# When fstatat works, remove this patch
|
||||
+# printf "%s\n" "#define HAVE_FSTATAT 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "fstatfs" "ac_cv_func_fstatfs"
|
||||
16
recipes/libs/libatomic/recipe.toml
Normal file
16
recipes/libs/libatomic/recipe.toml
Normal file
@ -0,0 +1,16 @@
|
||||
[source]
|
||||
same_as = "../../dev/gcc13"
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
dependencies = [
|
||||
"libgmp",
|
||||
"libmpfr",
|
||||
"mpc",
|
||||
"zlib"
|
||||
]
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
COOKBOOK_CONFIGURE="${COOKBOOK_SOURCE}/libatomic/configure"
|
||||
cookbook_configure
|
||||
"""
|
||||
@ -13,12 +13,6 @@ autotools_recursive_regenerate -I$(realpath ./m4)
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
COOKBOOK_CONFIGURE_FLAGS=(
|
||||
--host="${GNU_TARGET}"
|
||||
--prefix="/usr"
|
||||
--enable-shared
|
||||
--enable-static
|
||||
)
|
||||
DYNAMIC_STATIC_INIT
|
||||
cookbook_configure
|
||||
"""
|
||||
@ -19,12 +19,8 @@ autotools_recursive_regenerate -I$(realpath ./m4) -I$(realpath ./srcm4)
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
COOKBOOK_CONFIGURE_FLAGS=(
|
||||
--host="${GNU_TARGET}"
|
||||
--prefix="/usr"
|
||||
--enable-shared
|
||||
--enable-static
|
||||
DYNAMIC_STATIC_INIT
|
||||
COOKBOOK_CONFIGURE_FLAGS+=(
|
||||
ac_cv_have_decl_program_invocation_name=no
|
||||
)
|
||||
cookbook_configure
|
||||
|
||||
@ -6,6 +6,6 @@ blake3 = "3efc14da55c56fc0a6a50f109d9e1ee8a91f5ae7dd17a21d3aebe04a65f3ee96"
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
DYNAMIC_STATIC_INIT
|
||||
cookbook_cmake
|
||||
"""
|
||||
|
||||
@ -1,12 +1,8 @@
|
||||
[source]
|
||||
tar = "https://github.com/xiph/ogg/releases/download/v1.3.3/libogg-1.3.3.tar.xz"
|
||||
blake3 = "8220c0e4082fa26c07b10bfe31f641d2e33ebe1d1bb0b20221b7016bc8b78a3a"
|
||||
patches = [
|
||||
"redox.patch"
|
||||
]
|
||||
tar = "https://github.com/xiph/ogg/releases/download/v1.3.4/libogg-1.3.4.tar.xz"
|
||||
blake3 = "1cffbe7c498555ddfdb1390d7a38179c4bead6129ea37b1b1d54f3a76b816304"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
GNU_CONFIG_GET config.sub
|
||||
autotools_recursive_regenerate
|
||||
"""
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -4,8 +4,9 @@ git = "https://gitlab.redox-os.org/redox-os/liborbital.git"
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
DYNAMIC_STATIC_INIT
|
||||
rsync -av --delete "${COOKBOOK_SOURCE}/" ./
|
||||
"${COOKBOOK_CARGO}" build --release
|
||||
"${COOKBOOK_MAKE}" install HOST="${TARGET}" DESTDIR="${COOKBOOK_STAGE}"
|
||||
# other than x86_64 this will trigger error because of lacking .so files, which is fine
|
||||
"${COOKBOOK_MAKE}" install HOST="${TARGET}" DESTDIR="${COOKBOOK_STAGE}" || true
|
||||
"""
|
||||
|
||||
@ -12,12 +12,6 @@ autotools_recursive_regenerate
|
||||
template = "custom"
|
||||
dependencies = ["zlib"]
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
COOKBOOK_CONFIGURE_FLAGS=(
|
||||
--host="${GNU_TARGET}"
|
||||
--prefix="/usr"
|
||||
--enable-shared
|
||||
--enable-static
|
||||
)
|
||||
DYNAMIC_STATIC_INIT
|
||||
cookbook_configure
|
||||
"""
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
[source]
|
||||
tar = "https://dist.libuv.org/dist/v1.45.0/libuv-v1.45.0.tar.gz"
|
||||
blake3 = "b78eaba37bfa5fea75accc6d70c67358a4d0b6bb2dfb79b9bb17cb5478cdf797"
|
||||
tar = "https://dist.libuv.org/dist/v1.51.0/libuv-v1.51.0.tar.gz"
|
||||
blake3 = "e8b5e68bc2d0776ac4ea67df59d694fca58d5cc570c103443a2284e723d01fc2"
|
||||
patches = ["redox.patch"]
|
||||
|
||||
[build]
|
||||
@ -8,7 +8,7 @@ template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
|
||||
COOKBOOK_CMAKE_FLAGS=(
|
||||
COOKBOOK_CMAKE_FLAGS+=(
|
||||
-DBUILD_TESTING=Off
|
||||
)
|
||||
cookbook_cmake
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
diff -ruwN source/CMakeLists.txt source-new/CMakeLists.txt
|
||||
--- source/CMakeLists.txt 2023-05-19 18:21:01.000000000 +0700
|
||||
+++ source-new/CMakeLists.txt 2025-07-22 01:48:56.591286953 +0700
|
||||
--- source/CMakeLists.txt 2025-04-25 16:50:27.000000000 +0700
|
||||
+++ source-new/CMakeLists.txt 2025-10-10 11:19:40.329762962 +0700
|
||||
@@ -1,3 +1,4 @@
|
||||
+set (CMAKE_CXX_STANDARD 99)
|
||||
cmake_minimum_required(VERSION 3.4)
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
if(POLICY CMP0091)
|
||||
@@ -312,6 +313,17 @@
|
||||
@@ -323,6 +324,18 @@
|
||||
src/unix/hurd.c)
|
||||
endif()
|
||||
|
||||
@ -18,6 +18,7 @@ diff -ruwN source/CMakeLists.txt source-new/CMakeLists.txt
|
||||
+ src/unix/proctitle.c
|
||||
+ src/unix/posix-hrtime.c
|
||||
+ src/unix/posix-poll.c
|
||||
+ src/unix/redox.c
|
||||
+ )
|
||||
+endif()
|
||||
+
|
||||
@ -25,8 +26,8 @@ diff -ruwN source/CMakeLists.txt source-new/CMakeLists.txt
|
||||
list(APPEND uv_defines _GNU_SOURCE _POSIX_C_SOURCE=200112)
|
||||
list(APPEND uv_libraries dl rt)
|
||||
diff -ruwN source/include/uv/unix.h source-new/include/uv/unix.h
|
||||
--- source/include/uv/unix.h 2023-05-19 18:21:01.000000000 +0700
|
||||
+++ source-new/include/uv/unix.h 2025-07-22 01:53:54.941276543 +0700
|
||||
--- source/include/uv/unix.h 2025-04-25 16:50:27.000000000 +0700
|
||||
+++ source-new/include/uv/unix.h 2025-10-10 11:18:29.024386515 +0700
|
||||
@@ -66,6 +66,7 @@
|
||||
defined(__MSYS__) || \
|
||||
defined(__HAIKU__) || \
|
||||
@ -36,9 +37,9 @@ diff -ruwN source/include/uv/unix.h source-new/include/uv/unix.h
|
||||
# include "uv/posix.h"
|
||||
#endif
|
||||
diff -ruwN source/src/unix/core.c source-new/src/unix/core.c
|
||||
--- source/src/unix/core.c 2023-05-19 18:21:01.000000000 +0700
|
||||
+++ source-new/src/unix/core.c 2025-07-21 22:55:16.826444959 +0700
|
||||
@@ -97,6 +97,10 @@
|
||||
--- source/src/unix/core.c 2025-04-25 16:50:27.000000000 +0700
|
||||
+++ source-new/src/unix/core.c 2025-10-10 11:23:22.143824390 +0700
|
||||
@@ -110,6 +110,10 @@
|
||||
# include <sanitizer/linux_syscall_hooks.h>
|
||||
#endif
|
||||
|
||||
@ -49,7 +50,7 @@ diff -ruwN source/src/unix/core.c source-new/src/unix/core.c
|
||||
static void uv__run_pending(uv_loop_t* loop);
|
||||
|
||||
/* Verify that uv_buf_t is ABI-compatible with struct iovec. */
|
||||
@@ -709,7 +713,8 @@
|
||||
@@ -722,7 +726,8 @@
|
||||
defined(__FreeBSD__) || \
|
||||
defined(__NetBSD__) || \
|
||||
defined(__OpenBSD__) || \
|
||||
@ -59,10 +60,39 @@ diff -ruwN source/src/unix/core.c source-new/src/unix/core.c
|
||||
ssize_t rc;
|
||||
rc = recvmsg(fd, msg, flags | MSG_CMSG_CLOEXEC);
|
||||
if (rc == -1)
|
||||
@@ -1644,6 +1649,11 @@
|
||||
* So the output parameter priority is actually the nice value.
|
||||
*/
|
||||
int uv_thread_getpriority(uv_thread_t tid, int* priority) {
|
||||
+#ifdef __redox__
|
||||
+ if (priority == NULL)
|
||||
+ return UV_EINVAL;
|
||||
+ *priority = 0;
|
||||
+#else
|
||||
int r;
|
||||
int policy;
|
||||
struct sched_param param;
|
||||
@@ -1670,6 +1680,7 @@
|
||||
#endif
|
||||
|
||||
*priority = param.sched_priority;
|
||||
+#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1695,7 +1706,7 @@
|
||||
* If the function fails, the return value is non-zero.
|
||||
*/
|
||||
int uv_thread_setpriority(uv_thread_t tid, int priority) {
|
||||
-#if !defined(__GNU__)
|
||||
+#if !defined(__GNU__) && !defined(__redox__)
|
||||
int r;
|
||||
int min;
|
||||
int max;
|
||||
diff -ruwN source/src/unix/fs.c source-new/src/unix/fs.c
|
||||
--- source/src/unix/fs.c 2023-05-19 18:21:01.000000000 +0700
|
||||
+++ source-new/src/unix/fs.c 2025-07-21 22:55:16.826444959 +0700
|
||||
@@ -87,7 +87,8 @@
|
||||
--- source/src/unix/fs.c 2025-04-25 16:50:27.000000000 +0700
|
||||
+++ source-new/src/unix/fs.c 2025-10-10 11:18:29.024993834 +0700
|
||||
@@ -77,7 +77,8 @@
|
||||
defined(__MVS__) || \
|
||||
defined(__NetBSD__) || \
|
||||
defined(__HAIKU__) || \
|
||||
@ -72,7 +102,7 @@ diff -ruwN source/src/unix/fs.c source-new/src/unix/fs.c
|
||||
# include <sys/statvfs.h>
|
||||
#else
|
||||
# include <sys/statfs.h>
|
||||
@@ -648,13 +649,13 @@
|
||||
@@ -683,13 +684,13 @@
|
||||
defined(__MVS__) || \
|
||||
defined(__NetBSD__) || \
|
||||
defined(__HAIKU__) || \
|
||||
@ -88,7 +118,7 @@ diff -ruwN source/src/unix/fs.c source-new/src/unix/fs.c
|
||||
if (0 != statfs(req->path, &buf))
|
||||
#endif /* defined(__sun) */
|
||||
return -1;
|
||||
@@ -670,7 +671,8 @@
|
||||
@@ -705,7 +706,8 @@
|
||||
defined(__OpenBSD__) || \
|
||||
defined(__NetBSD__) || \
|
||||
defined(__HAIKU__) || \
|
||||
@ -99,8 +129,8 @@ diff -ruwN source/src/unix/fs.c source-new/src/unix/fs.c
|
||||
#else
|
||||
stat_fs->f_type = buf.f_type;
|
||||
diff -ruwN source/src/unix/proctitle.c source-new/src/unix/proctitle.c
|
||||
--- source/src/unix/proctitle.c 2023-05-19 18:21:01.000000000 +0700
|
||||
+++ source-new/src/unix/proctitle.c 2025-07-22 02:10:12.760625178 +0700
|
||||
--- source/src/unix/proctitle.c 2025-04-25 16:50:27.000000000 +0700
|
||||
+++ source-new/src/unix/proctitle.c 2025-10-10 11:18:29.025229760 +0700
|
||||
@@ -30,7 +30,13 @@
|
||||
size_t cap; /* Maximum capacity. Computed once in uv_setup_args(). */
|
||||
};
|
||||
@ -115,9 +145,115 @@ diff -ruwN source/src/unix/proctitle.c source-new/src/unix/proctitle.c
|
||||
|
||||
static uv_mutex_t process_title_mutex;
|
||||
static uv_once_t process_title_mutex_once = UV_ONCE_INIT;
|
||||
diff -ruwN source/src/unix/redox.c source-new/src/unix/redox.c
|
||||
--- source/src/unix/redox.c 1970-01-01 07:00:00.000000000 +0700
|
||||
+++ source-new/src/unix/redox.c 2025-10-10 11:18:29.028345924 +0700
|
||||
@@ -0,0 +1,102 @@
|
||||
+/* Copyright libuv contributors. All rights reserved.
|
||||
+ *
|
||||
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
+ * of this software and associated documentation files (the "Software"), to
|
||||
+ * deal in the Software without restriction, including without limitation the
|
||||
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
+ * sell copies of the Software, and to permit persons to whom the Software is
|
||||
+ * furnished to do so, subject to the following conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice shall be included in
|
||||
+ * all copies or substantial portions of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
+ * IN THE SOFTWARE.
|
||||
+ */
|
||||
+
|
||||
+#include "uv.h"
|
||||
+#include "internal.h"
|
||||
+
|
||||
+#include <errno.h>
|
||||
+#include <string.h>
|
||||
+#include <stdio.h>
|
||||
+
|
||||
+static void
|
||||
+get_mem_info(uint64_t* totalmem, uint64_t* freemem) {
|
||||
+ *totalmem = 0;
|
||||
+ *freemem = 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+void uv_loadavg(double avg[3]) {
|
||||
+ avg[0] = 0.0;
|
||||
+ avg[1] = 0.0;
|
||||
+ avg[2] = 0.0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+int uv_exepath(char* buffer, size_t* size) {
|
||||
+ if (buffer == NULL || size == NULL || *size == 0) {
|
||||
+ return UV_EINVAL;
|
||||
+ }
|
||||
+ FILE* fp = fopen("/scheme/sys/exe", "r");
|
||||
+ if (fp == NULL) {
|
||||
+ return -errno;
|
||||
+ }
|
||||
+ if (fgets(buffer, *size, fp) == NULL) {
|
||||
+ fclose(fp);
|
||||
+ return UV_EIO;
|
||||
+ }
|
||||
+ fclose(fp);
|
||||
+ buffer[strcspn(buffer, "\r\n")] = '\0';
|
||||
+ *size = strlen(buffer);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int uv_interface_addresses(uv_interface_address_t** addresses, int* count) {
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+uint64_t uv_get_free_memory(void) {
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+uint64_t uv_get_total_memory(void) {
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+uint64_t uv_get_constrained_memory(void) {
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+uint64_t uv_get_available_memory(void) {
|
||||
+ return uv_get_free_memory();
|
||||
+}
|
||||
+
|
||||
+
|
||||
+int uv_resident_set_memory(size_t* rss) {
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+int uv_uptime(double* uptime) {
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) {
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+void uv_free_interface_addresses(uv_interface_address_t* addresses,
|
||||
+ int count) {
|
||||
+}
|
||||
diff -ruwN source/src/unix/stream.c source-new/src/unix/stream.c
|
||||
--- source/src/unix/stream.c 2023-05-19 18:21:01.000000000 +0700
|
||||
+++ source-new/src/unix/stream.c 2025-07-21 22:55:16.826444959 +0700
|
||||
--- source/src/unix/stream.c 2025-04-25 16:50:27.000000000 +0700
|
||||
+++ source-new/src/unix/stream.c 2025-10-10 11:18:29.028522718 +0700
|
||||
@@ -29,7 +29,14 @@
|
||||
#include <errno.h>
|
||||
|
||||
@ -149,9 +285,59 @@ diff -ruwN source/src/unix/stream.c source-new/src/unix/stream.c
|
||||
|
||||
union uv__cmsg {
|
||||
struct cmsghdr hdr;
|
||||
diff -ruwN source/src/unix/tcp.c source-new/src/unix/tcp.c
|
||||
--- source/src/unix/tcp.c 2025-04-25 16:50:27.000000000 +0700
|
||||
+++ source-new/src/unix/tcp.c 2025-10-10 11:26:03.504101758 +0700
|
||||
@@ -31,7 +31,7 @@
|
||||
#include <sys/socket.h>
|
||||
|
||||
/* ifaddrs is not implemented on AIX and IBM i PASE */
|
||||
-#if !defined(_AIX)
|
||||
+#if !defined(_AIX) && !defined(__redox__)
|
||||
#include <ifaddrs.h>
|
||||
#endif
|
||||
|
||||
@@ -228,7 +228,7 @@
|
||||
static int uv__ipv6_link_local_scope_id(void) {
|
||||
struct sockaddr_in6* a6;
|
||||
int rv;
|
||||
-#if defined(_AIX)
|
||||
+#if defined(_AIX) || defined(__redox__)
|
||||
/* AIX & IBM i do not have ifaddrs
|
||||
* so fallback to use uv_interface_addresses */
|
||||
uv_interface_address_t* interfaces;
|
||||
@@ -268,7 +268,7 @@
|
||||
}
|
||||
|
||||
freeifaddrs(ifa);
|
||||
-#endif /* defined(_AIX) */
|
||||
+#endif /* defined(_AIX) || defined(__redox__) */
|
||||
|
||||
return rv;
|
||||
}
|
||||
diff -ruwN source/src/unix/thread.c source-new/src/unix/thread.c
|
||||
--- source/src/unix/thread.c 2025-04-25 16:50:27.000000000 +0700
|
||||
+++ source-new/src/unix/thread.c 2025-10-10 11:25:10.712328011 +0700
|
||||
@@ -897,7 +897,7 @@
|
||||
abort();
|
||||
}
|
||||
|
||||
-#if defined(_AIX) || defined(__MVS__) || defined(__PASE__)
|
||||
+#if defined(_AIX) || defined(__redox__) || defined(__MVS__) || defined(__PASE__)
|
||||
int uv__thread_setname(const char* name) {
|
||||
return UV_ENOSYS;
|
||||
}
|
||||
@@ -937,6 +937,7 @@
|
||||
|
||||
#if (defined(__ANDROID_API__) && __ANDROID_API__ < 26) || \
|
||||
defined(_AIX) || \
|
||||
+ defined(__redox__) || \
|
||||
defined(__MVS__) || \
|
||||
defined(__PASE__)
|
||||
int uv__thread_getname(uv_thread_t* tid, char* name, size_t size) {
|
||||
diff -ruwN source/src/unix/udp.c source-new/src/unix/udp.c
|
||||
--- source/src/unix/udp.c 2023-05-19 18:21:01.000000000 +0700
|
||||
+++ source-new/src/unix/udp.c 2025-07-21 22:55:16.826444959 +0700
|
||||
--- source/src/unix/udp.c 2025-04-25 16:50:27.000000000 +0700
|
||||
+++ source-new/src/unix/udp.c 2025-10-10 11:18:29.028778883 +0700
|
||||
@@ -31,6 +31,12 @@
|
||||
#include <xti.h>
|
||||
#endif
|
||||
|
||||
@ -13,12 +13,8 @@ dependencies = [
|
||||
"zlib"
|
||||
]
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
COOKBOOK_CONFIGURE_FLAGS=(
|
||||
--host="${GNU_TARGET}"
|
||||
--prefix="/usr"
|
||||
--enable-shared
|
||||
--enable-static
|
||||
DYNAMIC_STATIC_INIT
|
||||
COOKBOOK_CONFIGURE_FLAGS+=(
|
||||
--without-python
|
||||
)
|
||||
cookbook_configure
|
||||
|
||||
@ -3,25 +3,15 @@ git = "https://github.com/luvit/luv.git"
|
||||
[build]
|
||||
template = "custom"
|
||||
dependencies = [
|
||||
"lua54",
|
||||
"libuv",
|
||||
"lua-compat-53"
|
||||
"luajit"
|
||||
]
|
||||
script = """
|
||||
COOKBOOK_CONFIGURE="cmake"
|
||||
COOKBOOK_CONFIGURE_FLAGS=(
|
||||
-DBUILD_MODULE=OFF
|
||||
-DBUILD_STATIC_LIBS=ON
|
||||
-DWITH_SHARED_LIBUV=ON
|
||||
-DWITH_LUA_ENGINE=Lua
|
||||
DYNAMIC_INIT
|
||||
COOKBOOK_CMAKE_FLAGS+=(
|
||||
-DWITH_LUA_ENGINE=Luajit
|
||||
-DLUA_BUILD_TYPE=System
|
||||
-DLUA_COMPAT53_DIR="${COOKBOOK_SYSROOT}/bin"
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
-DLIBUV_LIBRARIES="${COOKBOOK_SYSROOT}/usr/lib/libuv.a"
|
||||
-DLIBUV_INCLUDE_DIR="${COOKBOOK_SYSROOT}/usr/include"
|
||||
-DLUA_INCLUDE_DIR="${COOKBOOK_SYSROOT}/include"
|
||||
-DLUV_INCLUDE_DIR="${COOKBOOK_SYSROOT}/include"
|
||||
"${COOKBOOK_SOURCE}"
|
||||
-DWITH_SHARED_LIBUV=On
|
||||
)
|
||||
cookbook_configure
|
||||
cookbook_cmake
|
||||
"""
|
||||
|
||||
@ -17,27 +17,19 @@ export CFLAGS+=" -DHAVE_PTHREAD=1"
|
||||
export CPPFLAGS+=" -DHAVE_PTHREAD=1"
|
||||
export LLVM_CONFIG="${TARGET}-llvm-config"
|
||||
|
||||
if [[ -n "${COOKBOOK_PREFER_STATIC}" ]]; then
|
||||
export LDFLAGS+=" --static"
|
||||
export DEFAULTLIB="static"
|
||||
export LLVMSHARED="disabled"
|
||||
if [ "${COOKBOOK_DYNAMIC}" == "1" ]; then
|
||||
COOKBOOK_MESON_FLAGS+=(-Dshared-llvm=enabled)
|
||||
else
|
||||
export DEFAULTLIB="shared"
|
||||
export LLVMSHARED="enabled"
|
||||
COOKBOOK_MESON_FLAGS+=(-Dshared-llvm=disabled)
|
||||
fi
|
||||
|
||||
COOKBOOK_MESON_FLAGS=(
|
||||
-Ddefault_library="${DEFAULTLIB}"
|
||||
-Dglx=disabled
|
||||
-Dllvm=enabled
|
||||
-Dosmesa=true
|
||||
-Dplatforms=
|
||||
-Dshader-cache=disabled
|
||||
-Dshared-llvm="${LLVMSHARED}"
|
||||
cookbook_meson \
|
||||
-Dglx=disabled \
|
||||
-Dllvm=enabled \
|
||||
-Dosmesa=true \
|
||||
-Dplatforms= \
|
||||
-Dshader-cache=disabled \
|
||||
-Dshared-glapi=disabled
|
||||
)
|
||||
|
||||
cookbook_meson
|
||||
|
||||
# Hack to add LLVM libs
|
||||
#TODO: only add necessary LLVM libs, not all of them
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
[source]
|
||||
tar = "https://ftp.gnu.org/gnu/ncurses/ncurses-6.4.tar.gz"
|
||||
blake3 = "0d1c9fdf53c0ca4bd66ba707d49a079d2dd6f5a960cdec74a56e29952c4ffe73"
|
||||
patches = [
|
||||
"redox.patch"
|
||||
]
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
@ -10,12 +13,15 @@ COOKBOOK_CONFIGURE_FLAGS+=(
|
||||
--disable-db-install
|
||||
--disable-stripping
|
||||
--without-ada
|
||||
--without-cxx-binding
|
||||
--without-manpages
|
||||
--without-tests
|
||||
cf_cv_func_mkstemp=yes
|
||||
)
|
||||
if [ "${COOKBOOK_DYNAMIC}" == "1" ]
|
||||
then
|
||||
COOKBOOK_CONFIGURE_FLAGS+=(--with-shared)
|
||||
fi
|
||||
cookbook_configure
|
||||
rm -rfv "${COOKBOOK_STAGE}/bin" "${COOKBOOK_STAGE}/share/"{doc,info,man}
|
||||
"""
|
||||
|
||||
[package]
|
||||
|
||||
12
recipes/libs/ncurses/redox.patch
Normal file
12
recipes/libs/ncurses/redox.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -ruwN source/configure source-new/configure
|
||||
--- source/configure 2022-11-06 04:13:26.000000000 +0700
|
||||
+++ source-new/configure 2025-09-17 21:14:28.163192730 +0700
|
||||
@@ -6386,7 +6386,7 @@
|
||||
fi
|
||||
cf_cv_rm_so_locs=yes
|
||||
;;
|
||||
- (linux*|gnu*|k*bsd*-gnu)
|
||||
+ (linux*|gnu*|k*bsd*-gnu|redox*)
|
||||
if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
|
||||
LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
|
||||
LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
|
||||
@ -1,22 +1,27 @@
|
||||
[source]
|
||||
tar = "https://ftp.gnu.org/gnu/ncurses/ncurses-6.4.tar.gz"
|
||||
blake3 = "0d1c9fdf53c0ca4bd66ba707d49a079d2dd6f5a960cdec74a56e29952c4ffe73"
|
||||
patches = [
|
||||
"redox.patch"
|
||||
]
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
COOKBOOK_CONFIGURE_FLAGS+=(
|
||||
--disable-db-install
|
||||
--disable-ext-colors
|
||||
--disable-stripping
|
||||
--enable-widec
|
||||
--without-ada
|
||||
--without-cxx-binding
|
||||
--without-manpages
|
||||
--without-tests
|
||||
--with-shared
|
||||
cf_cv_func_mkstemp=yes
|
||||
cf_cv_wint_t=yes
|
||||
)
|
||||
cookbook_configure
|
||||
rm -rfv "${COOKBOOK_STAGE}/bin" "${COOKBOOK_STAGE}/share/"{doc,info,man}
|
||||
"""
|
||||
|
||||
[package]
|
||||
|
||||
12
recipes/libs/ncursesw/redox.patch
Normal file
12
recipes/libs/ncursesw/redox.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -ruwN source/configure source-new/configure
|
||||
--- source/configure 2022-11-06 04:13:26.000000000 +0700
|
||||
+++ source-new/configure 2025-09-17 21:14:28.163192730 +0700
|
||||
@@ -6386,7 +6386,7 @@
|
||||
fi
|
||||
cf_cv_rm_so_locs=yes
|
||||
;;
|
||||
- (linux*|gnu*|k*bsd*-gnu)
|
||||
+ (linux*|gnu*|k*bsd*-gnu|redox*)
|
||||
if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
|
||||
LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
|
||||
LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
|
||||
@ -10,11 +10,12 @@ ARCH="${TARGET%%-*}"
|
||||
COOKBOOK_CONFIGURE="${COOKBOOK_SOURCE}/Configure"
|
||||
COOKBOOK_CONFIGURE_FLAGS=(
|
||||
shared
|
||||
threads
|
||||
no-dgram
|
||||
"redox-${ARCH}"
|
||||
--prefix="/"
|
||||
)
|
||||
export CC="${CC_WRAPPER} ${TARGET}-gcc"
|
||||
export CC="${CC_WRAPPER} ${GNU_TARGET}-gcc"
|
||||
"${COOKBOOK_CONFIGURE}" "${COOKBOOK_CONFIGURE_FLAGS[@]}"
|
||||
"${COOKBOOK_MAKE}" -j"${COOKBOOK_MAKE_JOBS}"
|
||||
"${COOKBOOK_MAKE}" install_sw install_ssldirs DESTDIR="${COOKBOOK_STAGE}"
|
||||
|
||||
@ -12,12 +12,6 @@ patches = [
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
COOKBOOK_CONFIGURE_FLAGS=(
|
||||
--host="${GNU_TARGET}"
|
||||
--prefix="/usr"
|
||||
--enable-shared
|
||||
--enable-static
|
||||
)
|
||||
DYNAMIC_STATIC_INIT
|
||||
cookbook_configure
|
||||
"""
|
||||
|
||||
@ -9,12 +9,6 @@ autotools_recursive_regenerate
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
COOKBOOK_CONFIGURE_FLAGS=(
|
||||
--host="${GNU_TARGET}"
|
||||
--prefix="/usr"
|
||||
--enable-shared
|
||||
--enable-static
|
||||
)
|
||||
DYNAMIC_STATIC_INIT
|
||||
cookbook_configure
|
||||
"""
|
||||
|
||||
@ -6,7 +6,13 @@ patches = [
|
||||
]
|
||||
|
||||
[build]
|
||||
template = "configure"
|
||||
depends = [
|
||||
template = "custom"
|
||||
dependencies = [
|
||||
"ncurses",
|
||||
]
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
cookbook_configure
|
||||
ln -s "libhistory.so.7" "${COOKBOOK_STAGE}"/usr/lib/libhistory.so
|
||||
ln -s "libreadline.so.7" "${COOKBOOK_STAGE}"/usr/lib/libreadline.so
|
||||
"""
|
||||
|
||||
@ -14,9 +14,6 @@ dependencies = [
|
||||
"libiconv",
|
||||
]
|
||||
script = """
|
||||
export CFLAGS="-I${COOKBOOK_SYSROOT}/include"
|
||||
export LDFLAGS="-L${COOKBOOK_SYSROOT}/lib"
|
||||
|
||||
COOKBOOK_CONFIGURE_FLAGS=(
|
||||
--prefix=/
|
||||
--build="$(gcc -dumpmachine)"
|
||||
|
||||
@ -16,8 +16,7 @@ dependencies = [
|
||||
"zlib",
|
||||
]
|
||||
script = """
|
||||
export CFLAGS="-I${COOKBOOK_SYSROOT}/include -I${COOKBOOK_SYSROOT}/include/freetype2"
|
||||
export LDFLAGS="-L${COOKBOOK_SYSROOT}/lib"
|
||||
export CFLAGS="${CFLAGS} -I${COOKBOOK_SYSROOT}/include/freetype2"
|
||||
|
||||
COOKBOOK_CONFIGURE_FLAGS=(
|
||||
--prefix=/
|
||||
|
||||
@ -12,7 +12,7 @@ dependencies = [
|
||||
]
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
export LDFLAGS="$LDFLAGS -lorbital -lOSMesa -lstdc++"
|
||||
export LDFLAGS="${LDFLAGS} -lorbital -lOSMesa -lstdc++"
|
||||
COOKBOOK_CONFIGURE_FLAGS+=(
|
||||
--disable-pulseaudio
|
||||
--disable-video-x11
|
||||
|
||||
@ -6,9 +6,20 @@ blake3 = "ec1abc6f672a7a6ee6f49ba544cc9529f73121b478310473be44fee22a140ebf"
|
||||
template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
COOKBOOK_CONFIGURE_FLAGS=(--prefix="/usr")
|
||||
if [ "${COOKBOOK_DYNAMIC}" == "1" ]
|
||||
then
|
||||
COOKBOOK_CONFIGURE_FLAGS+=(--shared)
|
||||
else
|
||||
COOKBOOK_CONFIGURE_FLAGS+=(--static)
|
||||
fi
|
||||
# See https://stackoverflow.com/questions/21396988/zlib-build-not-configuring-properly-with-cross-compiler-ignores-ar.
|
||||
CHOST="${TARGET}" "${COOKBOOK_CONFIGURE}" --prefix="/usr"
|
||||
env CHOST="${TARGET}" "${COOKBOOK_CONFIGURE}" "${COOKBOOK_CONFIGURE_FLAGS[@]}"
|
||||
"${COOKBOOK_MAKE}" -j "$(nproc)"
|
||||
"${COOKBOOK_MAKE}" install DESTDIR="${COOKBOOK_STAGE}"
|
||||
patchelf --set-soname 'libz.so.1.3' "${COOKBOOK_STAGE}/usr/lib/libz.so.1.3"
|
||||
solib="${COOKBOOK_STAGE}/usr/lib/libz.so.1.3"
|
||||
if [ -e "${solib}" ]
|
||||
then
|
||||
patchelf --set-soname 'libz.so.1.3' "${solib}"
|
||||
fi
|
||||
"""
|
||||
64
recipes/net/nginx/recipe.toml
Normal file
64
recipes/net/nginx/recipe.toml
Normal file
@ -0,0 +1,64 @@
|
||||
#TODO FastCGI not working
|
||||
[source]
|
||||
tar = "https://nginx.org/download/nginx-1.28.0.tar.gz"
|
||||
patches = [
|
||||
"redox.patch"
|
||||
]
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
dependencies = [
|
||||
"pcre",
|
||||
"openssl1",
|
||||
"zlib",
|
||||
]
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
rsync -av --delete "${COOKBOOK_SOURCE}"/* ./
|
||||
ARCH="${TARGET%%-*}"
|
||||
COOKBOOK_CONFIGURE_FLAGS=(
|
||||
--crossbuild=Redox:$ARCH
|
||||
--with-cc="$CC"
|
||||
--with-cc-opt="$CFLAGS"
|
||||
--with-ld-opt="$LDFLAGS"
|
||||
--sbin-path=/usr/bin/nginx
|
||||
--modules-path=/usr/lib/nginx/modules
|
||||
--conf-path=/etc/nginx/nginx.conf
|
||||
--error-log-path=/var/log/nginx/error.log
|
||||
--http-log-path=/var/log/nginx/access.log
|
||||
--http-client-body-temp-path=/var/lib/nginx/body
|
||||
--http-proxy-temp-path=/var/lib/nginx/proxy
|
||||
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi
|
||||
--http-uwsgi-temp-path=/var/lib/nginx/uwsgi
|
||||
--http-scgi-temp-path=/var/lib/nginx/scgi
|
||||
--pid-path=/var/run/nginx.pid
|
||||
--lock-path=/var/lock/nginx.lock
|
||||
--user=nginx
|
||||
--group=nginx
|
||||
--with-compat
|
||||
--with-debug
|
||||
--with-pcre
|
||||
--with-pcre-jit
|
||||
--with-stream
|
||||
--with-stream_realip_module
|
||||
--with-stream_ssl_module
|
||||
--with-stream_ssl_preread_module
|
||||
--with-threads
|
||||
--with-http_ssl_module
|
||||
--with-http_v2_module
|
||||
--with-http_realip_module
|
||||
--with-http_gzip_static_module
|
||||
--with-http_stub_status_module
|
||||
--with-http_addition_module
|
||||
)
|
||||
|
||||
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} \
|
||||
"$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
|
||||
"""
|
||||
85
recipes/net/nginx/redox.patch
Normal file
85
recipes/net/nginx/redox.patch
Normal file
@ -0,0 +1,85 @@
|
||||
diff -ruwN source/auto/feature source-new/auto/feature
|
||||
--- source/auto/feature 2025-04-23 18:48:54.000000000 +0700
|
||||
+++ source-new/auto/feature 2025-09-16 02:44:58.617532926 +0700
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
yes)
|
||||
# /bin/sh is used to intercept "Killed" or "Abort trap" messages
|
||||
- if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then
|
||||
+ #if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then
|
||||
echo " found"
|
||||
ngx_found=yes
|
||||
|
||||
@@ -61,9 +61,9 @@
|
||||
have=$ngx_have_feature . auto/have
|
||||
fi
|
||||
|
||||
- else
|
||||
- echo " found but is not working"
|
||||
- fi
|
||||
+ #else
|
||||
+ # echo " found but is not working"
|
||||
+ #fi
|
||||
;;
|
||||
|
||||
value)
|
||||
diff -ruwN source/auto/types/sizeof source-new/auto/types/sizeof
|
||||
--- source/auto/types/sizeof 2025-04-23 18:48:54.000000000 +0700
|
||||
+++ source-new/auto/types/sizeof 2025-09-16 02:44:58.618532943 +0700
|
||||
@@ -33,7 +33,7 @@
|
||||
END
|
||||
|
||||
|
||||
-ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS \
|
||||
+ngx_test="gcc $CC_TEST_FLAGS $CC_AUX_FLAGS \
|
||||
-o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_LD_OPT $ngx_feature_libs"
|
||||
|
||||
eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
|
||||
diff -ruwN source/auto/types/typedef source-new/auto/types/typedef
|
||||
--- source/auto/types/typedef 2025-04-23 18:48:54.000000000 +0700
|
||||
+++ source-new/auto/types/typedef 2025-09-16 02:44:58.618532943 +0700
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
END
|
||||
|
||||
- ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS \
|
||||
+ ngx_test="gcc $CC_TEST_FLAGS $CC_AUX_FLAGS \
|
||||
-o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_LD_OPT $ngx_feature_libs"
|
||||
|
||||
eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
|
||||
diff -ruwN source/src/os/unix/ngx_process.c source-new/src/os/unix/ngx_process.c
|
||||
--- source/src/os/unix/ngx_process.c 2025-04-23 18:48:54.000000000 +0700
|
||||
+++ source-new/src/os/unix/ngx_process.c 2025-09-16 02:44:58.618532943 +0700
|
||||
@@ -143,6 +143,7 @@
|
||||
}
|
||||
|
||||
on = 1;
|
||||
+ /*
|
||||
if (ioctl(ngx_processes[s].channel[0], FIOASYNC, &on) == -1) {
|
||||
ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
|
||||
"ioctl(FIOASYNC) failed while spawning \"%s\"", name);
|
||||
@@ -156,6 +157,7 @@
|
||||
ngx_close_channel(ngx_processes[s].channel, cycle->log);
|
||||
return NGX_INVALID_PID;
|
||||
}
|
||||
+ */
|
||||
|
||||
if (fcntl(ngx_processes[s].channel[0], F_SETFD, FD_CLOEXEC) == -1) {
|
||||
ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
|
||||
diff -ruwN source/src/os/unix/ngx_process_cycle.c source-new/src/os/unix/ngx_process_cycle.c
|
||||
--- source/src/os/unix/ngx_process_cycle.c 2025-04-23 18:48:54.000000000 +0700
|
||||
+++ source-new/src/os/unix/ngx_process_cycle.c 2025-09-27 02:17:21.509383985 +0700
|
||||
@@ -804,11 +804,13 @@
|
||||
exit(2);
|
||||
}
|
||||
|
||||
+ /*
|
||||
if (initgroups(ccf->username, ccf->group) == -1) {
|
||||
ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno,
|
||||
"initgroups(%s, %d) failed",
|
||||
ccf->username, ccf->group);
|
||||
}
|
||||
+ */
|
||||
|
||||
#if (NGX_HAVE_PR_SET_KEEPCAPS && NGX_HAVE_CAPABILITIES)
|
||||
if (ccf->transparent && ccf->user) {
|
||||
36
recipes/net/openssh/recipe.toml
Normal file
36
recipes/net/openssh/recipe.toml
Normal file
@ -0,0 +1,36 @@
|
||||
#TODO lack of resolv.h, expect dns not working
|
||||
#TODO lack of utmpx.h, expect no way to track login in sshd
|
||||
[source]
|
||||
tar = "https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.8p1.tar.gz"
|
||||
patches = [
|
||||
"redox.patch",
|
||||
]
|
||||
[build]
|
||||
template = "custom"
|
||||
dependencies = [
|
||||
"openssl3",
|
||||
"zlib",
|
||||
"zstd",
|
||||
]
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
COOKBOOK_CONFIGURE_FLAGS+=(
|
||||
--disable-strip
|
||||
--sysconfdir=/etc/ssh
|
||||
)
|
||||
cookbook_configure
|
||||
mv "${COOKBOOK_STAGE}"/usr/sbin/sshd "${COOKBOOK_STAGE}"/usr/bin/sshd
|
||||
rmdir "${COOKBOOK_STAGE}"/usr/sbin
|
||||
|
||||
# Extracted from `make host-key-force`
|
||||
# TODO: Postscript to generate this
|
||||
# ssh-keygen -t dsa -f "${COOKBOOK_STAGE}"/etc/ssh/ssh_host_dsa_key -N ""
|
||||
# ssh-keygen -t rsa -f "${COOKBOOK_STAGE}"/etc/ssh/ssh_host_rsa_key -N ""
|
||||
# ssh-keygen -t ed25519 -f "${COOKBOOK_STAGE}"/etc/ssh/ssh_host_ed25519_key -N ""
|
||||
# ssh-keygen -t ecdsa -f "${COOKBOOK_STAGE}"/etc/ssh/ssh_host_ecdsa_key -N ""
|
||||
|
||||
CONFIG_FILE="${COOKBOOK_STAGE}"/etc/ssh/sshd_config
|
||||
|
||||
# ipv6 is not working yet
|
||||
sed -i "s/#AddressFamily any/AddressFamily inet/g" "${CONFIG_FILE}"
|
||||
"""
|
||||
@ -1,6 +1,20 @@
|
||||
diff -ruwN source/configure source-new/configure
|
||||
--- source/configure 2024-07-01 11:36:28.000000000 +0700
|
||||
+++ source-new/configure 2025-09-06 23:54:58.147442355 +0700
|
||||
@@ -12606,6 +12606,10 @@
|
||||
printf "%s\n" "#define BROKEN_POLL 1" >>confdefs.h
|
||||
|
||||
;;
|
||||
+*-*-redox)
|
||||
+
|
||||
+ # todo
|
||||
+ ;;
|
||||
mips-sony-bsd|mips-sony-newsos4)
|
||||
|
||||
printf "%s\n" "#define NEED_SETPGRP 1" >>confdefs.h
|
||||
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
|
||||
+++ source-new/defines.h 2025-09-07 01:35:40.209700338 +0700
|
||||
@@ -52,6 +52,18 @@
|
||||
#define IPPORT_RESERVED 0
|
||||
#endif
|
||||
@ -51,7 +65,7 @@ diff -ruwN source/defines.h source-new/defines.h
|
||||
#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
|
||||
+++ source-new/hostfile.c 2025-09-06 21:09:36.555438339 +0700
|
||||
@@ -44,7 +44,9 @@
|
||||
#include <netinet/in.h>
|
||||
|
||||
@ -64,7 +78,7 @@ diff -ruwN source/hostfile.c source-new/hostfile.c
|
||||
#include <stdlib.h>
|
||||
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
|
||||
+++ source-new/loginrec.c 2025-09-06 21:09:36.556438304 +0700
|
||||
@@ -1033,7 +1033,7 @@
|
||||
return (0);
|
||||
}
|
||||
@ -76,7 +90,7 @@ diff -ruwN source/loginrec.c source-new/loginrec.c
|
||||
}
|
||||
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
|
||||
+++ source-new/loginrec.h 2025-09-06 21:09:36.556438304 +0700
|
||||
@@ -30,6 +30,7 @@
|
||||
**/
|
||||
|
||||
@ -85,9 +99,55 @@ diff -ruwN source/loginrec.h source-new/loginrec.h
|
||||
|
||||
struct ssh;
|
||||
|
||||
diff -ruwN source/misc.c source-new/misc.c
|
||||
--- source/misc.c 2024-07-01 11:36:28.000000000 +0700
|
||||
+++ source-new/misc.c 2025-09-07 01:21:42.201992304 +0700
|
||||
@@ -2843,7 +2843,6 @@
|
||||
error("%s: dup2: %s", tag, strerror(errno));
|
||||
_exit(1);
|
||||
}
|
||||
- closefrom(STDERR_FILENO + 1);
|
||||
|
||||
if (geteuid() == 0 &&
|
||||
initgroups(pw->pw_name, pw->pw_gid) == -1) {
|
||||
diff -ruwN source/monitor.c source-new/monitor.c
|
||||
--- source/monitor.c 2024-07-01 11:36:28.000000000 +0700
|
||||
+++ source-new/monitor.c 2025-09-07 00:46:23.435378053 +0700
|
||||
@@ -484,18 +484,19 @@
|
||||
pfd[0].events = POLLIN;
|
||||
pfd[1].fd = pmonitor->m_log_recvfd;
|
||||
pfd[1].events = pfd[1].fd == -1 ? 0 : POLLIN;
|
||||
- if (poll(pfd, pfd[1].fd == -1 ? 1 : 2, -1) == -1) {
|
||||
+ // redox can't handle timeout -1 (the poll stuck)
|
||||
+ if (poll(pfd, pfd[1].fd == -1 ? 1 : 2, 1000) == -1) {
|
||||
if (errno == EINTR || errno == EAGAIN)
|
||||
continue;
|
||||
fatal_f("poll: %s", strerror(errno));
|
||||
}
|
||||
if (pfd[1].revents) {
|
||||
+
|
||||
/*
|
||||
* Drain all log messages before processing next
|
||||
* monitor request.
|
||||
*/
|
||||
monitor_read_log(pmonitor);
|
||||
- continue;
|
||||
}
|
||||
if (pfd[0].revents)
|
||||
break; /* Continues below */
|
||||
@@ -1577,7 +1578,8 @@
|
||||
res = pty_allocate(&s->ptyfd, &s->ttyfd, s->tty, sizeof(s->tty));
|
||||
if (res == 0)
|
||||
goto error;
|
||||
- pty_setowner(authctxt->pw, s->tty);
|
||||
+ // non sense in redox
|
||||
+ // pty_setowner(authctxt->pw, s->tty);
|
||||
|
||||
if ((r = sshbuf_put_u32(m, 1)) != 0 ||
|
||||
(r = sshbuf_put_cstring(m, s->tty)) != 0)
|
||||
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
|
||||
+++ source-new/openbsd-compat/bsd-statvfs.h 2025-09-06 21:09:36.556438304 +0700
|
||||
@@ -37,13 +37,6 @@
|
||||
typedef unsigned long fsfilcnt_t;
|
||||
#endif
|
||||
@ -104,7 +164,7 @@ diff -ruwN source/openbsd-compat/bsd-statvfs.h source-new/openbsd-compat/bsd-sta
|
||||
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 2024-07-01 11:36:28.000000000 +0700
|
||||
+++ source-new/openbsd-compat/getrrsetbyname.c 2025-08-20 13:51:15.020299084 +0700
|
||||
+++ source-new/openbsd-compat/getrrsetbyname.c 2025-09-06 21:09:36.556438304 +0700
|
||||
@@ -67,6 +67,52 @@
|
||||
#endif
|
||||
#define _THREAD_PRIVATE(a,b,c) (c)
|
||||
@ -232,7 +292,7 @@ diff -ruwN source/openbsd-compat/getrrsetbyname.c source-new/openbsd-compat/getr
|
||||
free_dns_rr(head);
|
||||
diff -ruwN source/openbsd-compat/getrrsetbyname.h source-new/openbsd-compat/getrrsetbyname.h
|
||||
--- 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
|
||||
+++ source-new/openbsd-compat/getrrsetbyname.h 2025-09-06 21:09:36.557438268 +0700
|
||||
@@ -54,9 +54,13 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -249,7 +309,7 @@ diff -ruwN source/openbsd-compat/getrrsetbyname.h source-new/openbsd-compat/getr
|
||||
#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
|
||||
+++ source-new/openbsd-compat/inet_ntop.c 2025-09-06 21:09:36.557438268 +0700
|
||||
@@ -26,7 +26,9 @@
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
@ -262,7 +322,7 @@ diff -ruwN source/openbsd-compat/inet_ntop.c source-new/openbsd-compat/inet_ntop
|
||||
#include <stdio.h>
|
||||
diff -ruwN source/openbsd-compat/openbsd-compat.h source-new/openbsd-compat/openbsd-compat.h
|
||||
--- 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
|
||||
+++ source-new/openbsd-compat/openbsd-compat.h 2025-09-06 21:09:36.557438268 +0700
|
||||
@@ -36,6 +36,8 @@
|
||||
|
||||
#include <stddef.h> /* for wchar_t */
|
||||
@ -274,7 +334,7 @@ diff -ruwN source/openbsd-compat/openbsd-compat.h source-new/openbsd-compat/open
|
||||
#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
|
||||
+++ source-new/openbsd-compat/utmpx.c 2025-09-06 21:09:36.557438268 +0700
|
||||
@@ -0,0 +1,13 @@
|
||||
+#include "utmpx.h"
|
||||
+#include <stddef.h> // For NULL
|
||||
@ -292,7 +352,7 @@ diff -ruwN source/openbsd-compat/utmpx.c source-new/openbsd-compat/utmpx.c
|
||||
\ 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
|
||||
+++ source-new/openbsd-compat/utmpx.h 2025-09-06 21:09:36.557438268 +0700
|
||||
@@ -0,0 +1,69 @@
|
||||
+#ifndef _COMPAT_UTMPX_H
|
||||
+#define _COMPAT_UTMPX_H
|
||||
@ -364,9 +424,31 @@ diff -ruwN source/openbsd-compat/utmpx.h source-new/openbsd-compat/utmpx.h
|
||||
+#endif /* __redox__ */
|
||||
+#endif /* _COMPAT_UTMPX_H */
|
||||
\ No newline at end of file
|
||||
diff -ruwN source/readconf.c source-new/readconf.c
|
||||
--- source/readconf.c 2024-07-01 11:36:28.000000000 +0700
|
||||
+++ source-new/readconf.c 2025-09-07 01:21:42.201992304 +0700
|
||||
@@ -554,7 +554,6 @@
|
||||
|
||||
if (stdfd_devnull(1, 1, 0) == -1)
|
||||
fatal_f("stdfd_devnull failed");
|
||||
- closefrom(STDERR_FILENO + 1);
|
||||
|
||||
argv[0] = shell;
|
||||
argv[1] = "-c";
|
||||
diff -ruwN source/readpass.c source-new/readpass.c
|
||||
--- source/readpass.c 2024-07-01 11:36:28.000000000 +0700
|
||||
+++ source-new/readpass.c 2025-09-07 01:21:42.201992304 +0700
|
||||
@@ -278,7 +278,6 @@
|
||||
if (pid == 0) {
|
||||
if (stdfd_devnull(1, 1, 0) == -1)
|
||||
fatal_f("stdfd_devnull failed");
|
||||
- closefrom(STDERR_FILENO + 1);
|
||||
setenv("SSH_ASKPASS_PROMPT", "none", 1); /* hint to UI */
|
||||
execlp(askpass, askpass, prompt, (char *)NULL);
|
||||
error_f("exec(%s): %s", askpass, strerror(errno));
|
||||
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
|
||||
+++ source-new/regress/netcat.c 2025-09-06 21:09:36.558438233 +0700
|
||||
@@ -1384,7 +1384,9 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -377,9 +459,41 @@ diff -ruwN source/regress/netcat.c source-new/regress/netcat.c
|
||||
|
||||
#define SOCKS_PORT "1080"
|
||||
#define HTTP_PROXY_PORT "3128"
|
||||
diff -ruwN source/session.c source-new/session.c
|
||||
--- source/session.c 2024-07-01 11:36:28.000000000 +0700
|
||||
+++ source-new/session.c 2025-09-07 01:22:43.637928015 +0700
|
||||
@@ -1365,10 +1365,12 @@
|
||||
exit(1);
|
||||
}
|
||||
/* Initialize the group list. */
|
||||
+#ifndef __redox__
|
||||
if (initgroups(pw->pw_name, pw->pw_gid) < 0) {
|
||||
perror("initgroups");
|
||||
exit(1);
|
||||
}
|
||||
+#endif
|
||||
endgrent();
|
||||
#endif
|
||||
|
||||
@@ -1490,7 +1492,6 @@
|
||||
* initgroups, because at least on Solaris 2.3 it leaves file
|
||||
* descriptors open.
|
||||
*/
|
||||
- closefrom(STDERR_FILENO + 1);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1624,7 +1625,6 @@
|
||||
exit(1);
|
||||
}
|
||||
|
||||
- closefrom(STDERR_FILENO + 1);
|
||||
|
||||
do_rc_files(ssh, s, shell);
|
||||
|
||||
diff -ruwN source/sshbuf-misc.c source-new/sshbuf-misc.c
|
||||
--- 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
|
||||
+++ source-new/sshbuf-misc.c 2025-09-06 21:09:36.559438198 +0700
|
||||
@@ -28,7 +28,9 @@
|
||||
#include <stdio.h>
|
||||
#include <limits.h>
|
||||
@ -390,9 +504,112 @@ diff -ruwN source/sshbuf-misc.c source-new/sshbuf-misc.c
|
||||
#include <ctype.h>
|
||||
#include <unistd.h>
|
||||
|
||||
diff -ruwN source/ssh.c source-new/ssh.c
|
||||
--- source/ssh.c 2024-07-01 11:36:28.000000000 +0700
|
||||
+++ source-new/ssh.c 2025-09-07 01:22:43.638928030 +0700
|
||||
@@ -689,7 +689,6 @@
|
||||
* Discard other fds that are hanging around. These can cause problem
|
||||
* with backgrounded ssh processes started by ControlPersist.
|
||||
*/
|
||||
- closefrom(STDERR_FILENO + 1);
|
||||
|
||||
__progname = ssh_get_progname(av[0]);
|
||||
|
||||
diff -ruwN source/sshconnect2.c source-new/sshconnect2.c
|
||||
--- source/sshconnect2.c 2024-07-01 11:36:28.000000000 +0700
|
||||
+++ source-new/sshconnect2.c 2025-09-07 01:22:58.683157171 +0700
|
||||
@@ -2057,7 +2057,6 @@
|
||||
sock = STDERR_FILENO + 1;
|
||||
if (fcntl(sock, F_SETFD, 0) == -1) /* keep the socket on exec */
|
||||
debug3_f("fcntl F_SETFD: %s", strerror(errno));
|
||||
- closefrom(sock + 1);
|
||||
|
||||
debug3_f("[child] pid=%ld, exec %s",
|
||||
(long)getpid(), _PATH_SSH_KEY_SIGN);
|
||||
diff -ruwN source/sshd.c source-new/sshd.c
|
||||
--- source/sshd.c 2024-07-01 11:36:28.000000000 +0700
|
||||
+++ source-new/sshd.c 2025-09-07 01:39:34.681252169 +0700
|
||||
@@ -1222,7 +1222,7 @@
|
||||
debug("setgroups(): %.200s", strerror(errno));
|
||||
|
||||
/* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */
|
||||
- sanitise_stdfd();
|
||||
+ // sanitise_stdfd();
|
||||
|
||||
/* Initialize configuration options to their default values. */
|
||||
initialize_server_options(&options);
|
||||
@@ -1344,7 +1344,6 @@
|
||||
if (!test_flag && !do_dump_cfg && !path_absolute(av[0]))
|
||||
fatal("sshd requires execution with an absolute path");
|
||||
|
||||
- closefrom(STDERR_FILENO + 1);
|
||||
|
||||
/* Reserve fds we'll need later for reexec things */
|
||||
if ((devnull = open(_PATH_DEVNULL, O_RDWR)) == -1)
|
||||
@@ -1482,13 +1481,13 @@
|
||||
options.host_key_files[i]);
|
||||
key->sk_flags &= ~SSH_SK_USER_PRESENCE_REQD;
|
||||
}
|
||||
- if (r == 0 && key != NULL &&
|
||||
- (r = sshkey_shield_private(key)) != 0) {
|
||||
- do_log2_r(r, ll, "Unable to shield host key \"%s\"",
|
||||
- options.host_key_files[i]);
|
||||
- sshkey_free(key);
|
||||
- key = NULL;
|
||||
- }
|
||||
+ // if (r == 0 && key != NULL &&
|
||||
+ // (r = sshkey_shield_private(key)) != 0) {
|
||||
+ // do_log2_r(r, ll, "Unable to shield host key \"%s\"",
|
||||
+ // options.host_key_files[i]);
|
||||
+ // sshkey_free(key);
|
||||
+ // key = NULL;
|
||||
+ // }
|
||||
if ((r = sshkey_load_public(options.host_key_files[i],
|
||||
&pubkey, NULL)) != 0 && r != SSH_ERR_SYSTEM_ERROR)
|
||||
do_log2_r(r, ll, "Unable to load host key \"%s\"",
|
||||
@@ -1600,8 +1599,7 @@
|
||||
}
|
||||
|
||||
/* Ensure privsep directory is correctly configured. */
|
||||
- need_chroot = ((getuid() == 0 || geteuid() == 0) ||
|
||||
- options.kerberos_authentication);
|
||||
+ need_chroot = 0;// ((getuid() == 0 || geteuid() == 0) || options.kerberos_authentication);
|
||||
if ((getpwnam(SSH_PRIVSEP_USER)) == NULL && need_chroot) {
|
||||
fatal("Privilege separation user %s does not exist",
|
||||
SSH_PRIVSEP_USER);
|
||||
@@ -1773,7 +1771,7 @@
|
||||
close(startup_pipe);
|
||||
}
|
||||
log_redirect_stderr_to(NULL);
|
||||
- closefrom(REEXEC_MIN_FREE_FD);
|
||||
+ // closefrom(REEXEC_MIN_FREE_FD);
|
||||
|
||||
ssh_signal(SIGHUP, SIG_IGN); /* avoid reset to SIG_DFL */
|
||||
execv(rexec_argv[0], rexec_argv);
|
||||
diff -ruwN source/sshd-session.c source-new/sshd-session.c
|
||||
--- source/sshd-session.c 2024-07-01 11:36:28.000000000 +0700
|
||||
+++ source-new/sshd-session.c 2025-09-06 21:15:43.796191268 +0700
|
||||
@@ -1031,7 +1031,7 @@
|
||||
if (!rexeced_flag)
|
||||
fatal("sshd-session should not be executed directly");
|
||||
|
||||
- closefrom(REEXEC_MIN_FREE_FD);
|
||||
+ // closefrom(REEXEC_MIN_FREE_FD);
|
||||
|
||||
seed_rng();
|
||||
|
||||
@@ -1073,7 +1073,7 @@
|
||||
options.timing_secret = timing_secret;
|
||||
|
||||
/* Store privilege separation user for later use if required. */
|
||||
- privsep_chroot = (getuid() == 0 || geteuid() == 0);
|
||||
+ privsep_chroot = 0;// (getuid() == 0 || geteuid() == 0);
|
||||
if ((privsep_pw = getpwnam(SSH_PRIVSEP_USER)) == NULL) {
|
||||
if (privsep_chroot || options.kerberos_authentication)
|
||||
fatal("Privilege separation user %s does not exist",
|
||||
diff -ruwN source/sshkey.c source-new/sshkey.c
|
||||
--- source/sshkey.c 2024-07-01 11:36:28.000000000 +0700
|
||||
+++ source-new/sshkey.c 2025-08-20 11:50:36.114133643 +0700
|
||||
+++ source-new/sshkey.c 2025-09-06 21:09:36.567437916 +0700
|
||||
@@ -43,7 +43,9 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -403,3 +620,67 @@ diff -ruwN source/sshkey.c source-new/sshkey.c
|
||||
#include <time.h>
|
||||
#ifdef HAVE_UTIL_H
|
||||
#include <util.h>
|
||||
diff -ruwN source/ssh-sk-client.c source-new/ssh-sk-client.c
|
||||
--- source/ssh-sk-client.c 2024-07-01 11:36:28.000000000 +0700
|
||||
+++ source-new/ssh-sk-client.c 2025-09-07 01:21:42.201992304 +0700
|
||||
@@ -91,7 +91,6 @@
|
||||
}
|
||||
close(pair[0]);
|
||||
close(pair[1]);
|
||||
- closefrom(STDERR_FILENO + 1);
|
||||
debug_f("starting %s %s", helper,
|
||||
verbosity == NULL ? "" : verbosity);
|
||||
execlp(helper, helper, verbosity, (char *)NULL);
|
||||
diff -ruwN source/ssh-sk-helper.c source-new/ssh-sk-helper.c
|
||||
--- source/ssh-sk-helper.c 2024-07-01 11:36:28.000000000 +0700
|
||||
+++ source-new/ssh-sk-helper.c 2025-09-07 01:22:43.638928030 +0700
|
||||
@@ -303,7 +303,6 @@
|
||||
* Rearrange our file descriptors a little; we don't trust the
|
||||
* providers not to fiddle with stdin/out.
|
||||
*/
|
||||
- closefrom(STDERR_FILENO + 1);
|
||||
if ((in = dup(STDIN_FILENO)) == -1 || (out = dup(STDOUT_FILENO)) == -1)
|
||||
fatal("%s: dup: %s", __progname, strerror(errno));
|
||||
close(STDIN_FILENO);
|
||||
diff -ruwN source/uidswap.c source-new/uidswap.c
|
||||
--- source/uidswap.c 2024-07-01 11:36:28.000000000 +0700
|
||||
+++ source-new/uidswap.c 2025-09-07 00:01:52.531094834 +0700
|
||||
@@ -37,7 +37,7 @@
|
||||
* POSIX saved uids or not.
|
||||
*/
|
||||
|
||||
-#if defined(_POSIX_SAVED_IDS) && !defined(BROKEN_SAVED_UIDS)
|
||||
+#if !defined(BROKEN_SAVED_UIDS)
|
||||
/* Lets assume that posix saved ids also work with seteuid, even though that
|
||||
is not part of the posix specification. */
|
||||
#define SAVED_IDS_WORK_WITH_SETEUID
|
||||
@@ -83,6 +83,9 @@
|
||||
privileged = 1;
|
||||
temporarily_use_uid_effective = 1;
|
||||
|
||||
+ // getgroups broken in redox
|
||||
+#ifndef __redox__
|
||||
+
|
||||
saved_egroupslen = getgroups(0, NULL);
|
||||
if (saved_egroupslen == -1)
|
||||
fatal("getgroups: %.100s", strerror(errno));
|
||||
@@ -119,6 +122,7 @@
|
||||
/* Set the effective uid to the given (unprivileged) uid. */
|
||||
if (setgroups(user_groupslen, user_groups) == -1)
|
||||
fatal("setgroups: %.100s", strerror(errno));
|
||||
+#endif
|
||||
#ifndef SAVED_IDS_WORK_WITH_SETEUID
|
||||
/* Propagate the privileged gid to all of our gids. */
|
||||
if (setgid(getegid()) == -1)
|
||||
@@ -168,8 +172,11 @@
|
||||
fatal("%s: setgid failed: %s", __func__, strerror(errno));
|
||||
#endif /* SAVED_IDS_WORK_WITH_SETEUID */
|
||||
|
||||
+ // setgroups broken in redox
|
||||
+#ifndef __redox__
|
||||
if (setgroups(saved_egroupslen, saved_egroups) == -1)
|
||||
fatal("setgroups: %.100s", strerror(errno));
|
||||
+#endif
|
||||
temporarily_use_uid_effective = 0;
|
||||
}
|
||||
|
||||
12
recipes/net/rsync/recipe.toml
Normal file
12
recipes/net/rsync/recipe.toml
Normal file
@ -0,0 +1,12 @@
|
||||
[source]
|
||||
tar = "https://download.samba.org/pub/rsync/src/rsync-3.4.1.tar.gz"
|
||||
patches = ["redox.patch"]
|
||||
|
||||
[build]
|
||||
template = "configure"
|
||||
dependencies = [
|
||||
"zstd",
|
||||
"lz4",
|
||||
"openssl1",
|
||||
"xxhash",
|
||||
]
|
||||
25
recipes/net/rsync/redox.patch
Normal file
25
recipes/net/rsync/redox.patch
Normal file
@ -0,0 +1,25 @@
|
||||
diff -ruwN source/rsync.h source-new/rsync.h
|
||||
--- source/rsync.h 2025-01-16 02:21:54.000000000 +0700
|
||||
+++ source-new/rsync.h 2025-09-08 12:18:06.427647717 +0700
|
||||
@@ -483,6 +483,21 @@
|
||||
#include <sys/sysmacros.h>
|
||||
#endif
|
||||
|
||||
+#ifdef __redox__
|
||||
+
|
||||
+// no sys/sysmacros.h, probably no problem
|
||||
+#include <sys/types.h>
|
||||
+#define major(dev) (0)
|
||||
+#define minor(dev) (0)
|
||||
+#define makedev(maj, min) (0)
|
||||
+
|
||||
+// no openat yet
|
||||
+#undef O_NOFOLLOW
|
||||
+#undef O_DIRECTORY
|
||||
+#undef AT_FDCWD
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
#ifdef MAKEDEV_TAKES_3_ARGS
|
||||
#define MAKEDEV(devmajor,devminor) makedev(0,devmajor,devminor)
|
||||
#else
|
||||
28
recipes/other/cookbook/recipe.toml
Normal file
28
recipes/other/cookbook/recipe.toml
Normal file
@ -0,0 +1,28 @@
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/redox-os/cookbook.git"
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
cookbook_cargo
|
||||
|
||||
mkdir -pv "${COOKBOOK_STAGE}/home/user/cookbook"
|
||||
cp -rv "${COOKBOOK_SOURCE}"/* "${COOKBOOK_STAGE}/home/user/cookbook"
|
||||
"""
|
||||
|
||||
[package]
|
||||
dependencies = [
|
||||
# TODO: When rust working, use this
|
||||
# "dev-essential",
|
||||
"autoconf",
|
||||
"automake",
|
||||
"gcc13",
|
||||
"git",
|
||||
"gnu-make",
|
||||
"libtool",
|
||||
"patch",
|
||||
"pkg-config",
|
||||
"pkgar",
|
||||
"sed",
|
||||
"wget",
|
||||
]
|
||||
@ -1,6 +1,6 @@
|
||||
diff -ruwN bash-5.2.15/bashline.c source/bashline.c
|
||||
--- bash-5.2.15/bashline.c 2022-04-17 15:37:12.000000000 -0700
|
||||
+++ source/bashline.c 2024-12-05 16:04:07.566380980 -0800
|
||||
diff -ruwN source/bashline.c source-new/bashline.c
|
||||
--- source/bashline.c 2022-04-18 05:37:12.000000000 +0700
|
||||
+++ source-new/bashline.c 2025-09-01 04:36:35.272926519 +0700
|
||||
@@ -2645,7 +2645,7 @@
|
||||
const char *text;
|
||||
int state;
|
||||
@ -10,9 +10,9 @@ diff -ruwN bash-5.2.15/bashline.c source/bashline.c
|
||||
return ((char *)NULL);
|
||||
#else
|
||||
static char *gname = (char *)NULL;
|
||||
diff -ruwN bash-5.2.15/builtins/ulimit.def source/builtins/ulimit.def
|
||||
--- bash-5.2.15/builtins/ulimit.def 2021-11-05 06:19:53.000000000 -0700
|
||||
+++ source/builtins/ulimit.def 2024-12-05 16:04:07.567380980 -0800
|
||||
diff -ruwN source/builtins/ulimit.def source-new/builtins/ulimit.def
|
||||
--- source/builtins/ulimit.def 2021-11-05 20:19:53.000000000 +0700
|
||||
+++ source-new/builtins/ulimit.def 2025-09-01 04:36:35.272926519 +0700
|
||||
@@ -609,7 +609,7 @@
|
||||
}
|
||||
else
|
||||
@ -22,38 +22,9 @@ diff -ruwN bash-5.2.15/builtins/ulimit.def source/builtins/ulimit.def
|
||||
if (getrlimit (limits[ind].parameter, &limit) < 0)
|
||||
return -1;
|
||||
# if defined (HPUX9)
|
||||
diff -ruwN bash-5.2.15/config-top.h source/config-top.h
|
||||
--- bash-5.2.15/config-top.h 2021-11-05 06:11:12.000000000 -0700
|
||||
+++ source/config-top.h 2024-12-06 01:06:18.324586528 -0800
|
||||
@@ -63,24 +63,24 @@
|
||||
/* The default value of the PATH variable. */
|
||||
#ifndef DEFAULT_PATH_VALUE
|
||||
#define DEFAULT_PATH_VALUE \
|
||||
- "/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:."
|
||||
+ "/usr/local/bin;/usr/local/sbin;/usr/bin;/usr/sbin;/bin;/sbin;."
|
||||
#endif
|
||||
|
||||
/* If you want to unconditionally set a value for PATH in every restricted
|
||||
shell, set this. */
|
||||
-/* #define RBASH_STATIC_PATH_VALUE "/rbin:/usr/rbin" */
|
||||
+/* #define RBASH_STATIC_PATH_VALUE "/rbin;/usr/rbin" */
|
||||
|
||||
/* The value for PATH when invoking `command -p'. This is only used when
|
||||
the Posix.2 confstr () function, or CS_PATH define are not present. */
|
||||
#ifndef STANDARD_UTILS_PATH
|
||||
#define STANDARD_UTILS_PATH \
|
||||
- "/bin:/usr/bin:/sbin:/usr/sbin:/etc:/usr/etc"
|
||||
+ "/bin;/usr/bin;/sbin;/usr/sbin;/etc;/usr/etc"
|
||||
#endif
|
||||
|
||||
/* The default path for enable -f */
|
||||
#ifndef DEFAULT_LOADABLE_BUILTINS_PATH
|
||||
#define DEFAULT_LOADABLE_BUILTINS_PATH \
|
||||
- "/usr/local/lib/bash:/usr/lib/bash:/opt/local/lib/bash:/usr/pkg/lib/bash:/opt/pkg/lib/bash:."
|
||||
+ "/usr/local/lib/bash;/usr/lib/bash;/opt/local/lib/bash;/usr/pkg/lib/bash;/opt/pkg/lib/bash;."
|
||||
#endif
|
||||
|
||||
/* Default primary and secondary prompt strings. */
|
||||
diff -ruwN source/config-top.h source-new/config-top.h
|
||||
--- source/config-top.h 2021-11-05 20:11:12.000000000 +0700
|
||||
+++ source-new/config-top.h 2025-09-19 21:55:55.439030906 +0700
|
||||
@@ -199,3 +199,6 @@
|
||||
/* Undefine or define to 0 if you don't want to allow associative array
|
||||
assignment using a compound list of key-value pairs. */
|
||||
@ -61,9 +32,9 @@ diff -ruwN bash-5.2.15/config-top.h source/config-top.h
|
||||
+
|
||||
+/* Don't check for a valid inode number when pattern matching on Redox */
|
||||
+#define BROKEN_DIRENT_D_INO 1
|
||||
diff -ruwN bash-5.2.15/configure source/configure
|
||||
--- bash-5.2.15/configure 2022-09-23 07:13:22.000000000 -0700
|
||||
+++ source/configure 2024-12-05 16:06:32.812286102 -0800
|
||||
diff -ruwN source/configure source-new/configure
|
||||
--- source/configure 2022-09-23 21:13:22.000000000 +0700
|
||||
+++ source-new/configure 2025-09-01 04:52:47.542177017 +0700
|
||||
@@ -3298,6 +3298,7 @@
|
||||
*-nsk*) opt_bash_malloc=no ;; # HP NonStop
|
||||
*-haiku*) opt_bash_malloc=no ;; # Haiku OS
|
||||
@ -72,9 +43,9 @@ diff -ruwN bash-5.2.15/configure source/configure
|
||||
esac
|
||||
|
||||
# memory scrambling on free()
|
||||
diff -ruwN bash-5.2.15/configure.ac source/configure.ac
|
||||
--- bash-5.2.15/configure.ac 2022-09-23 07:12:27.000000000 -0700
|
||||
+++ source/configure.ac 2024-12-05 16:04:07.571380977 -0800
|
||||
diff -ruwN source/configure.ac source-new/configure.ac
|
||||
--- source/configure.ac 2022-09-23 21:12:27.000000000 +0700
|
||||
+++ source-new/configure.ac 2025-09-01 04:36:35.275926660 +0700
|
||||
@@ -92,6 +92,7 @@
|
||||
*-nsk*) opt_bash_malloc=no ;; # HP NonStop
|
||||
*-haiku*) opt_bash_malloc=no ;; # Haiku OS
|
||||
@ -83,9 +54,9 @@ diff -ruwN bash-5.2.15/configure.ac source/configure.ac
|
||||
esac
|
||||
|
||||
# memory scrambling on free()
|
||||
diff -ruwN bash-5.2.15/execute_cmd.c source/execute_cmd.c
|
||||
--- bash-5.2.15/execute_cmd.c 2022-12-13 09:09:02.000000000 -0800
|
||||
+++ source/execute_cmd.c 2024-12-05 16:04:07.573380976 -0800
|
||||
diff -ruwN source/execute_cmd.c source-new/execute_cmd.c
|
||||
--- source/execute_cmd.c 2022-12-14 00:09:02.000000000 +0700
|
||||
+++ source-new/execute_cmd.c 2025-09-01 04:36:35.275926660 +0700
|
||||
@@ -1379,11 +1379,11 @@
|
||||
nullcmd = (command == 0) || (command->type == cm_simple && command->value.Simple->words == 0 && command->value.Simple->redirects == 0);
|
||||
if (posixly_correct && nullcmd)
|
||||
@ -100,9 +71,9 @@ diff -ruwN bash-5.2.15/execute_cmd.c source/execute_cmd.c
|
||||
before.tms_utime = before.tms_stime = before.tms_cutime = before.tms_cstime = 0;
|
||||
tbefore = shell_start_time;
|
||||
#endif
|
||||
diff -ruwN bash-5.2.15/general.c source/general.c
|
||||
--- bash-5.2.15/general.c 2022-11-23 14:10:12.000000000 -0800
|
||||
+++ source/general.c 2024-12-05 16:04:07.574380975 -0800
|
||||
diff -ruwN source/general.c source-new/general.c
|
||||
--- source/general.c 2022-11-24 05:10:12.000000000 +0700
|
||||
+++ source-new/general.c 2025-09-19 17:09:24.754782168 +0700
|
||||
@@ -589,6 +589,7 @@
|
||||
void
|
||||
check_dev_tty ()
|
||||
@ -119,22 +90,9 @@ diff -ruwN bash-5.2.15/general.c source/general.c
|
||||
}
|
||||
|
||||
/* Return 1 if PATH1 and PATH2 are the same file. This is kind of
|
||||
@@ -1031,10 +1033,10 @@
|
||||
`:'. If I is 0, then the path has a leading colon. Trailing colons
|
||||
are handled OK by the `else' part of the if statement; an empty
|
||||
string is returned in that case. */
|
||||
- if (i && string[i] == ':')
|
||||
+ if (i && string[i] == ';')
|
||||
i++;
|
||||
|
||||
- for (start = i; string[i] && string[i] != ':'; i++)
|
||||
+ for (start = i; string[i] && string[i] != ';'; i++)
|
||||
;
|
||||
|
||||
*p_index = i;
|
||||
diff -ruwN bash-5.2.15/include/posixwait.h source/include/posixwait.h
|
||||
--- bash-5.2.15/include/posixwait.h 2019-03-29 10:25:52.000000000 -0700
|
||||
+++ source/include/posixwait.h 2024-12-05 16:04:07.574380975 -0800
|
||||
diff -ruwN source/include/posixwait.h source-new/include/posixwait.h
|
||||
--- source/include/posixwait.h 2019-03-30 00:25:52.000000000 +0700
|
||||
+++ source-new/include/posixwait.h 2025-09-01 04:36:35.276926707 +0700
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
/* How to get the status of a job. For Posix, this is just an
|
||||
@ -153,9 +111,9 @@ diff -ruwN bash-5.2.15/include/posixwait.h source/include/posixwait.h
|
||||
|
||||
# if !defined (WSTOPSIG)
|
||||
# define WSTOPSIG(s) ((s) >> 8)
|
||||
diff -ruwN bash-5.2.15/lib/readline/input.c source/lib/readline/input.c
|
||||
--- bash-5.2.15/lib/readline/input.c 2022-04-08 12:43:24.000000000 -0700
|
||||
+++ source/lib/readline/input.c 2024-12-05 16:04:07.575380974 -0800
|
||||
diff -ruwN source/lib/readline/input.c source-new/lib/readline/input.c
|
||||
--- source/lib/readline/input.c 2022-04-09 02:43:24.000000000 +0700
|
||||
+++ source-new/lib/readline/input.c 2025-09-01 04:36:35.276926707 +0700
|
||||
@@ -805,7 +805,7 @@
|
||||
int result;
|
||||
unsigned char c;
|
||||
@ -165,9 +123,9 @@ diff -ruwN bash-5.2.15/lib/readline/input.c source/lib/readline/input.c
|
||||
sigset_t empty_set;
|
||||
fd_set readfds;
|
||||
#endif
|
||||
diff -ruwN bash-5.2.15/lib/readline/terminal.c source/lib/readline/terminal.c
|
||||
--- bash-5.2.15/lib/readline/terminal.c 2022-04-05 07:44:17.000000000 -0700
|
||||
+++ source/lib/readline/terminal.c 2024-12-05 16:04:07.575380974 -0800
|
||||
diff -ruwN source/lib/readline/terminal.c source-new/lib/readline/terminal.c
|
||||
--- source/lib/readline/terminal.c 2022-04-05 21:44:17.000000000 +0700
|
||||
+++ source-new/lib/readline/terminal.c 2025-09-01 04:36:35.286927174 +0700
|
||||
@@ -102,7 +102,7 @@
|
||||
|
||||
static int tcap_initialized;
|
||||
@ -177,9 +135,9 @@ diff -ruwN bash-5.2.15/lib/readline/terminal.c source/lib/readline/terminal.c
|
||||
# if defined (__EMX__) || defined (NEED_EXTERN_PC)
|
||||
extern
|
||||
# endif /* __EMX__ || NEED_EXTERN_PC */
|
||||
diff -ruwN bash-5.2.15/lib/sh/getcwd.c source/lib/sh/getcwd.c
|
||||
--- bash-5.2.15/lib/sh/getcwd.c 2012-03-10 07:48:50.000000000 -0800
|
||||
+++ source/lib/sh/getcwd.c 2024-12-05 16:04:07.575380974 -0800
|
||||
diff -ruwN source/lib/sh/getcwd.c source-new/lib/sh/getcwd.c
|
||||
--- source/lib/sh/getcwd.c 2012-03-10 22:48:50.000000000 +0700
|
||||
+++ source-new/lib/sh/getcwd.c 2025-09-01 04:36:35.286927174 +0700
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include <config.h>
|
||||
@ -189,9 +147,9 @@ diff -ruwN bash-5.2.15/lib/sh/getcwd.c source/lib/sh/getcwd.c
|
||||
|
||||
#if !defined (__GNUC__) && !defined (HAVE_ALLOCA_H) && defined (_AIX)
|
||||
#pragma alloca
|
||||
diff -ruwN bash-5.2.15/lib/sh/input_avail.c source/lib/sh/input_avail.c
|
||||
--- bash-5.2.15/lib/sh/input_avail.c 2021-05-24 08:16:33.000000000 -0700
|
||||
+++ source/lib/sh/input_avail.c 2024-12-05 16:04:07.576380974 -0800
|
||||
diff -ruwN source/lib/sh/input_avail.c source-new/lib/sh/input_avail.c
|
||||
--- source/lib/sh/input_avail.c 2021-05-24 22:16:33.000000000 +0700
|
||||
+++ source-new/lib/sh/input_avail.c 2025-09-01 04:36:35.298927735 +0700
|
||||
@@ -33,7 +33,7 @@
|
||||
# include <sys/file.h>
|
||||
#endif /* HAVE_SYS_FILE_H */
|
||||
@ -201,9 +159,9 @@ diff -ruwN bash-5.2.15/lib/sh/input_avail.c source/lib/sh/input_avail.c
|
||||
# include <signal.h>
|
||||
#endif
|
||||
|
||||
diff -ruwN bash-5.2.15/lib/sh/strtoimax.c source/lib/sh/strtoimax.c
|
||||
--- bash-5.2.15/lib/sh/strtoimax.c 2021-09-10 07:32:35.000000000 -0700
|
||||
+++ source/lib/sh/strtoimax.c 2024-12-05 16:04:07.576380974 -0800
|
||||
diff -ruwN source/lib/sh/strtoimax.c source-new/lib/sh/strtoimax.c
|
||||
--- source/lib/sh/strtoimax.c 2021-09-10 21:32:35.000000000 +0700
|
||||
+++ source-new/lib/sh/strtoimax.c 2025-09-01 04:36:35.301927876 +0700
|
||||
@@ -55,6 +55,8 @@
|
||||
extern long long strtoll PARAMS((const char *, char **, int));
|
||||
#endif
|
||||
@ -222,9 +180,9 @@ diff -ruwN bash-5.2.15/lib/sh/strtoimax.c source/lib/sh/strtoimax.c
|
||||
#ifdef TESTING
|
||||
# include <stdio.h>
|
||||
int
|
||||
diff -ruwN bash-5.2.15/parse.y source/parse.y
|
||||
--- bash-5.2.15/parse.y 2022-12-13 09:09:02.000000000 -0800
|
||||
+++ source/parse.y 2024-12-05 16:04:07.577380973 -0800
|
||||
diff -ruwN source/parse.y source-new/parse.y
|
||||
--- source/parse.y 2022-12-14 00:09:02.000000000 +0700
|
||||
+++ source-new/parse.y 2025-09-01 04:36:35.302927923 +0700
|
||||
@@ -2625,6 +2625,7 @@
|
||||
parser_state |= PST_ENDALIAS;
|
||||
/* We need to do this to make sure last_shell_getc_is_singlebyte returns
|
||||
@ -241,9 +199,9 @@ diff -ruwN bash-5.2.15/parse.y source/parse.y
|
||||
return ' '; /* END_ALIAS */
|
||||
}
|
||||
#endif
|
||||
diff -ruwN bash-5.2.15/y.tab.c source/y.tab.c
|
||||
--- bash-5.2.15/y.tab.c 2022-12-13 09:09:02.000000000 -0800
|
||||
+++ source/y.tab.c 2024-12-05 16:04:07.579380972 -0800
|
||||
diff -ruwN source/y.tab.c source-new/y.tab.c
|
||||
--- source/y.tab.c 2022-12-14 00:09:02.000000000 +0700
|
||||
+++ source-new/y.tab.c 2025-09-01 04:36:35.307928157 +0700
|
||||
@@ -4936,6 +4936,7 @@
|
||||
parser_state |= PST_ENDALIAS;
|
||||
/* We need to do this to make sure last_shell_getc_is_singlebyte returns
|
||||
|
||||
5
recipes/tests/hello-redox/files/test.c
Normal file
5
recipes/tests/hello-redox/files/test.c
Normal file
@ -0,0 +1,5 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(void) {
|
||||
printf("Hello, Redox!\\n");
|
||||
}
|
||||
6
recipes/tests/hello-redox/files/test.cpp
Normal file
6
recipes/tests/hello-redox/files/test.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
#include <iostream>
|
||||
|
||||
int main()
|
||||
{
|
||||
std::cout << "Hello, Redox!" << std::endl;
|
||||
}
|
||||
5
recipes/tests/hello-redox/files/test.java
Normal file
5
recipes/tests/hello-redox/files/test.java
Normal file
@ -0,0 +1,5 @@
|
||||
public class Java {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello Redox");
|
||||
}
|
||||
}
|
||||
1
recipes/tests/hello-redox/files/test.js
Normal file
1
recipes/tests/hello-redox/files/test.js
Normal file
@ -0,0 +1 @@
|
||||
console.log("Hello Redox");
|
||||
1
recipes/tests/hello-redox/files/test.lua
Normal file
1
recipes/tests/hello-redox/files/test.lua
Normal file
@ -0,0 +1 @@
|
||||
print("Hello, Redox!")
|
||||
1
recipes/tests/hello-redox/files/test.py
Normal file
1
recipes/tests/hello-redox/files/test.py
Normal file
@ -0,0 +1 @@
|
||||
print("Hello, Redox!")
|
||||
3
recipes/tests/hello-redox/files/test.rs
Normal file
3
recipes/tests/hello-redox/files/test.rs
Normal file
@ -0,0 +1,3 @@
|
||||
fn main() {
|
||||
println!("Hello, Redox!");
|
||||
}
|
||||
6
recipes/tests/hello-redox/recipe.toml
Normal file
6
recipes/tests/hello-redox/recipe.toml
Normal file
@ -0,0 +1,6 @@
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
mkdir -pv "${COOKBOOK_STAGE}/home/user/hello-redox"
|
||||
cp -rv "${COOKBOOK_RECIPE}"/files/* "${COOKBOOK_STAGE}/home/user/hello-redox"
|
||||
"""
|
||||
@ -1,11 +1,19 @@
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/rw_van/openposixtestsuite.git"
|
||||
git = "https://gitlab.redox-os.org/redox-os/openposixtestsuite.git"
|
||||
branch = "redox"
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
rsync -av --delete "${COOKBOOK_SOURCE}/" ./
|
||||
mkdir -pv "${COOKBOOK_STAGE}/share/openposixtests"
|
||||
rsync -av --delete . "${COOKBOOK_STAGE}/share/openposixtestsuite"
|
||||
mkdir -pv "${COOKBOOK_STAGE}/share/openposixtestsuite"
|
||||
cp -rv "${COOKBOOK_SOURCE}"/* "${COOKBOOK_STAGE}/share/openposixtestsuite"
|
||||
"""
|
||||
|
||||
[package]
|
||||
dependencies = [
|
||||
"gcc13",
|
||||
"gnu-binutils",
|
||||
"gnu-make",
|
||||
"sed",
|
||||
]
|
||||
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
# TODO remove gnu-grep when extrautils grep supports grep -E
|
||||
[source]
|
||||
git = "https://gitlab.com/sortix/os-test"
|
||||
|
||||
@ -10,8 +11,10 @@ cp -rv "${COOKBOOK_SOURCE}"/* "${COOKBOOK_STAGE}/share/os-test"
|
||||
|
||||
[package]
|
||||
dependencies = [
|
||||
"gnu-binutils",
|
||||
"gnu-make",
|
||||
"gcc13",
|
||||
"gnu-binutils",
|
||||
"gnu-grep",
|
||||
"gnu-make",
|
||||
"libarchive",
|
||||
"sed",
|
||||
]
|
||||
|
||||
18
recipes/tests/redox-posix-tests/recipe.toml
Normal file
18
recipes/tests/redox-posix-tests/recipe.toml
Normal file
@ -0,0 +1,18 @@
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/redox-os/redox-posix-tests.git"
|
||||
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
mkdir -pv "${COOKBOOK_STAGE}/share/redox-posix-tests"
|
||||
cp -rv "${COOKBOOK_SOURCE}"/* "${COOKBOOK_STAGE}/share/redox-posix-tests"
|
||||
"""
|
||||
|
||||
[package]
|
||||
dependencies = [
|
||||
"gcc13",
|
||||
"gnu-binutils",
|
||||
"gnu-make",
|
||||
]
|
||||
|
||||
@ -8,7 +8,7 @@ script = """
|
||||
rsync -av --delete "${COOKBOOK_SOURCE}/" ./
|
||||
pushd tests
|
||||
export CARGO_TEST="${COOKBOOK_CARGO}"
|
||||
export NATIVE_RELIBC=1
|
||||
export NATIVE_RELIBC=0 # set 0 to link against relibc
|
||||
"${COOKBOOK_MAKE}" -j "${COOKBOOK_MAKE_JOBS}" all bins_verify/relibc-tests
|
||||
popd
|
||||
mkdir -pv "${COOKBOOK_STAGE}/share/relibc"
|
||||
|
||||
@ -8,7 +8,7 @@ patches = [
|
||||
]
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
wget -O build-aux/config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false"
|
||||
GNU_CONFIG_GET build-aux/config.sub
|
||||
( cd gettext-runtime/libasprintf && autoreconf -fvi -I${COOKBOOK_HOST_SYSROOT}/share/aclocal )
|
||||
( cd gettext-runtime/intl && autoreconf -fvi -I${COOKBOOK_HOST_SYSROOT}/share/aclocal )
|
||||
( cd gettext-runtime && autoreconf -fvi -I${COOKBOOK_HOST_SYSROOT}/share/aclocal )
|
||||
@ -23,10 +23,8 @@ dependencies = [
|
||||
"libiconv"
|
||||
]
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
DYNAMIC_STATIC_INIT
|
||||
COOKBOOK_CONFIGURE_FLAGS+=(
|
||||
--enable-static
|
||||
--enable-shared
|
||||
ac_cv_have_decl_program_invocation_name=no
|
||||
gt_cv_locale_fr=false
|
||||
gt_cv_locale_fr_utf8=false
|
||||
|
||||
@ -32,3 +32,15 @@ diff -ruwN source/gettext-tools/gnulib-lib/spawni.c source-new/gettext-tools/gnu
|
||||
# endif
|
||||
# define local_seteuid(id) seteuid (id)
|
||||
# define local_setegid(id) setegid (id)
|
||||
diff -ruwN source/gettext-tools/Makefile.am source-new/gettext-tools/Makefile.am
|
||||
--- source/gettext-tools/Makefile.am 2023-09-19 03:08:31.000000000 +0700
|
||||
+++ source-new/gettext-tools/Makefile.am 2025-10-05 12:39:33.287595871 +0700
|
||||
@@ -19,7 +19,7 @@
|
||||
AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies
|
||||
ACLOCAL_AMFLAGS = -I m4 -I ../gettext-runtime/m4 -I ../m4 -I gnulib-m4 -I libgrep/gnulib-m4 -I libgettextpo/gnulib-m4
|
||||
|
||||
-SUBDIRS = gnulib-lib libgrep src libgettextpo po its projects styles emacs misc man m4 tests system-tests gnulib-tests examples doc
|
||||
+SUBDIRS = gnulib-lib libgrep src libgettextpo po its projects styles emacs misc man m4
|
||||
|
||||
EXTRA_DIST = misc/DISCLAIM
|
||||
MOSTLYCLEANFILES = core *.stackdump
|
||||
|
||||
@ -14,8 +14,7 @@ dependencies = [
|
||||
"libiconv",
|
||||
]
|
||||
script = """
|
||||
export CFLAGS="-I${COOKBOOK_SYSROOT}/include -I${COOKBOOK_SYSROOT}/include/SDL"
|
||||
export LDFLAGS="-L${COOKBOOK_SYSROOT}/lib -static"
|
||||
export CFLAGS="${CFLAGS} -I${COOKBOOK_SYSROOT}/include/SDL"
|
||||
export SDL_CONFIG="${COOKBOOK_SYSROOT}/bin/sdl-config"
|
||||
|
||||
COOKBOOK_CONFIGURE_FLAGS=(
|
||||
|
||||
@ -9,16 +9,12 @@ autotools_recursive_regenerate
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
COOKBOOK_CONFIGURE_FLAGS=(
|
||||
--host="${GNU_TARGET}"
|
||||
--prefix="/usr"
|
||||
DYNAMIC_STATIC_INIT
|
||||
COOKBOOK_CONFIGURE_FLAGS+=(
|
||||
--disable-lzmadec
|
||||
--disable-lzmainfo
|
||||
--disable-xz
|
||||
--disable-xzdec
|
||||
--enable-shared=yes
|
||||
--enable-static=yes
|
||||
--enable-threads=no
|
||||
)
|
||||
cookbook_configure
|
||||
|
||||
@ -10,8 +10,7 @@ dependencies = [
|
||||
script = """
|
||||
rsync -av --delete --exclude='.git' "${COOKBOOK_SOURCE}/" ./
|
||||
|
||||
export CFLAGS="-I${COOKBOOK_SYSROOT}/include -I${COOKBOOK_SYSROOT}/include/ncursesw"
|
||||
export LDFLAGS="-L${COOKBOOK_SYSROOT}/lib"
|
||||
export CFLAGS="${CFLAGS} -I${COOKBOOK_SYSROOT}/include/ncursesw"
|
||||
|
||||
"${COOKBOOK_MAKE}" -j"$(${NPROC})"
|
||||
|
||||
|
||||
@ -11,8 +11,6 @@ dependencies = [
|
||||
]
|
||||
script = """
|
||||
rsync -av --delete --exclude='.git' "${COOKBOOK_SOURCE}/" ./
|
||||
export CPPFLAGS="-I${COOKBOOK_SYSROOT}/include"
|
||||
export LDFLAGS="-L${COOKBOOK_SYSROOT}/lib -static"
|
||||
"${COOKBOOK_MAKE}" -j"$(${NPROC})"
|
||||
|
||||
mkdir -pv "${COOKBOOK_STAGE}/bin"
|
||||
|
||||
@ -27,8 +27,8 @@ DYNAMIC_INIT
|
||||
rsync -av --delete "${COOKBOOK_SOURCE}/" ./
|
||||
|
||||
export TARGET="framebuffer"
|
||||
export CFLAGS="-I${COOKBOOK_SYSROOT}/include -I${PWD}/inst-${TARGET}/include"
|
||||
export LDFLAGS="-L${COOKBOOK_SYSROOT}/lib -L${PWD}/inst-${TARGET}/lib -Wl,--allow-multiple-definition -Wl,-rpath-link,${COOKBOOK_SYSROOT}/lib"
|
||||
export CFLAGS="${CFLAGS} -I${PWD}/inst-${TARGET}/include"
|
||||
export LDFLAGS="${LDFLAGS} -L${COOKBOOK_SYSROOT}/lib -L${PWD}/inst-${TARGET}/lib -Wl,--allow-multiple-definition -Wl,-rpath-link,${COOKBOOK_SYSROOT}/lib"
|
||||
# nghttp2 is not linked for some reason
|
||||
export LDFLAGS="${LDFLAGS} -lcurl -lnghttp2"
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user