mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-22 12:54:20 +08:00
Merge branch cookbook:master into add-zig
This commit is contained in:
commit
63643dbf63
1
.gitignore
vendored
1
.gitignore
vendored
@ -6,3 +6,4 @@ source-new
|
||||
source.tar
|
||||
source.tar.tmp
|
||||
target
|
||||
wget-log
|
||||
|
||||
9
clean.sh
9
clean.sh
@ -5,12 +5,15 @@ source config.sh
|
||||
|
||||
if [ $# = 0 ]
|
||||
then
|
||||
recipes="$(target/release/list_recipes)"
|
||||
recipes="$(target/release/list_recipes --short)"
|
||||
else
|
||||
recipes="$@"
|
||||
fi
|
||||
|
||||
for recipe_path in $recipes
|
||||
for recipe_name in $recipes
|
||||
do
|
||||
IGNORE_ERROR=1 ./cook.sh "$recipe_path" distclean
|
||||
recipe_path=`target/release/find_recipe $recipe_name`
|
||||
|
||||
echo -e "\033[01;38;5;215mcook - clean $recipe_name\033[0m"
|
||||
rm -rf "${ROOT}/$recipe_path/target/${TARGET}"
|
||||
done
|
||||
|
||||
18
config.sh
18
config.sh
@ -14,7 +14,6 @@ fi
|
||||
|
||||
# Automatic variables
|
||||
ROOT="$(cd `dirname "$0"` && pwd)"
|
||||
REPO="$ROOT/repo/$TARGET"
|
||||
export PATH="${ROOT}/bin:$PATH"
|
||||
|
||||
export AR="${HOST}-gcc-ar"
|
||||
@ -43,26 +42,11 @@ 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" ]
|
||||
then
|
||||
|
||||
379
cook.sh
379
cook.sh
@ -1,379 +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}"
|
||||
;;
|
||||
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="recipes/$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="recipes/$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
|
||||
target/release/cook --fetch-only ${@:1}
|
||||
|
||||
@ -8,9 +8,11 @@ dependencies=[
|
||||
]
|
||||
template = "custom"
|
||||
script = """
|
||||
set -x
|
||||
"${CXX}" -O2 -I "${COOKBOOK_SYSROOT}/usr/include" -L "${COOKBOOK_SYSROOT}/usr/lib" "${COOKBOOK_RECIPE}/gears.c" -o gears -static -lorbital $("${PKG_CONFIG}" --libs glu) -lz
|
||||
set +x
|
||||
DYNAMIC_INIT
|
||||
|
||||
${CXX} -O2 -I "${COOKBOOK_SYSROOT}/usr/include" \
|
||||
$LDFLAGS "${COOKBOOK_RECIPE}/gears.c" \
|
||||
-o gears -lorbital $("${PKG_CONFIG}" --libs glu) -lz
|
||||
mkdir -pv "${COOKBOOK_STAGE}/usr/bin"
|
||||
cp -v "gears" "${COOKBOOK_STAGE}/usr/bin/gears"
|
||||
"""
|
||||
"""
|
||||
|
||||
@ -11,6 +11,7 @@ dependencies = [
|
||||
"zlib"
|
||||
]
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
EXAMPLES=(
|
||||
window
|
||||
)
|
||||
@ -21,9 +22,7 @@ do
|
||||
--release \
|
||||
--manifest-path "${COOKBOOK_SOURCE}/glutin_examples/Cargo.toml" \
|
||||
--example "${example}" \
|
||||
-- \
|
||||
-L "${COOKBOK_SYSROOT}/lib" \
|
||||
-C link-args="-Wl,-Bstatic $("${TARGET}-pkg-config" --libs osmesa) -lz -lstdc++ -lc -lgcc"
|
||||
-- -C link-args="$LDFLAGS $("${TARGET}-pkg-config" --libs osmesa) -lz -lstdc++ -lc -lgcc"
|
||||
mkdir -pv "${COOKBOOK_STAGE}/bin"
|
||||
cp -v "target/${TARGET}/release/examples/${example}" "${COOKBOOK_STAGE}/bin/glutin_${example}"
|
||||
done
|
||||
|
||||
@ -8,8 +8,11 @@ dependencies = [
|
||||
"zlib"
|
||||
]
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
|
||||
cp "${COOKBOOK_SOURCE}/../osdemo.c" ./osdemo.c
|
||||
"${CXX}" -O2 -I "${COOKBOOK_SYSROOT}/include" -L "${COOKBOOK_SYSROOT}/lib" osdemo.c -o osdemo -static -lorbital $("${PKG_CONFIG}" --libs glu) -lz
|
||||
${CXX} -O2 -I "${COOKBOOK_SYSROOT}/include" $LDFLAGS osdemo.c -o osdemo \
|
||||
-lorbital $("${PKG_CONFIG}" --libs glu) -lz
|
||||
mkdir -pv "${COOKBOOK_STAGE}/usr/bin"
|
||||
cp -v "osdemo" "${COOKBOOK_STAGE}/usr/bin/osdemo"
|
||||
"""
|
||||
|
||||
@ -16,9 +16,12 @@ dependencies = [
|
||||
"zlib"
|
||||
]
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
cp "${COOKBOOK_SOURCE}/../gears.c" ./gears.c
|
||||
rsync -av --delete --exclude='.git' "${COOKBOOK_SOURCE}/../assets" ./assets
|
||||
"${CXX}" -O2 -I "${COOKBOOK_SYSROOT}/include" -L "${COOKBOOK_SYSROOT}/lib" gears.c -o sdl2_gears -dynamic -lSDL2_image -lSDL2_mixer -lSDL2_ttf -lSDL2 -lorbital $("${PKG_CONFIG}" --libs osmesa) -lfreetype -lpng -ljpeg -lvorbisfile -lvorbis -logg -lz
|
||||
${CXX} -O2 -I "${COOKBOOK_SYSROOT}/include" $LDFLAGS gears.c -o sdl2_gears \
|
||||
-dynamic -lSDL2_image -lSDL2_mixer -lSDL2_ttf -lSDL2 -lorbital \
|
||||
$("${PKG_CONFIG}" --libs osmesa) -lfreetype -lpng -ljpeg -lvorbisfile -lvorbis -logg -lz
|
||||
rm -rf "${COOKBOOK_STAGE}/usr/games/sdl2_gears"
|
||||
mkdir -pv "${COOKBOOK_STAGE}/usr/games/sdl2_gears"
|
||||
cp -v "sdl2_gears" "${COOKBOOK_STAGE}/usr/games/sdl2_gears/sdl2_gears"
|
||||
|
||||
@ -15,12 +15,10 @@ dependencies = [
|
||||
"shared-mime-info",
|
||||
"zlib",
|
||||
]
|
||||
template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
cookbook_meson \
|
||||
-Dbuiltin_loaders=all \
|
||||
-Dgir=false \
|
||||
-Dinstalled_tests=false \
|
||||
-Dx11=false
|
||||
"""
|
||||
template = "meson"
|
||||
mesonflags = [
|
||||
"-Dbuiltin_loaders=all",
|
||||
"-Dgir=false",
|
||||
"-Dinstalled_tests=false",
|
||||
"-Dx11=false",
|
||||
]
|
||||
|
||||
@ -152,7 +152,7 @@ diff -ruwN git-2.13.1/git-compat-util.h source/git-compat-util.h
|
||||
+
|
||||
+#ifndef DEV_NULL
|
||||
+#if defined(__redox__)
|
||||
+#define DEV_NULL "null:"
|
||||
+#define DEV_NULL "/scheme/null"
|
||||
+#else
|
||||
+#define DEV_NULL "/dev/null"
|
||||
+#endif
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
git = "https://gitlab.redox-os.org/redox-os/llvm-project.git"
|
||||
upstream = "https://github.com/rust-lang/llvm-project.git"
|
||||
branch = "redox-2024-05-11"
|
||||
shallow_clone = true
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
@ -30,8 +31,6 @@ case "${TARGET}" in
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS="-Wl,-rpath-link,${COOKBOOK_SYSROOT}/lib $LDFLAGS"
|
||||
|
||||
COOKBOOK_CMAKE_FLAGS=(
|
||||
-DCMAKE_CXX_FLAGS="--std=gnu++11"
|
||||
-DBUILD_SHARED_LIBS=False
|
||||
@ -67,7 +66,5 @@ COOKBOOK_CMAKE_FLAGS=(
|
||||
-DLLVM_ENABLE_PROJECTS="llvm"
|
||||
)
|
||||
|
||||
set -x
|
||||
cookbook_cmake "${COOKBOOK_SOURCE}/llvm"
|
||||
set +x
|
||||
"""
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
tar = "https://pkg-config.freedesktop.org/releases/pkg-config-0.29.2.tar.gz"
|
||||
blake3 = "713372b09a1fafeec130dc9bf812a3880f2a90496af5d2194e508d91ccf667d0"
|
||||
script = """
|
||||
wget -O config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false"
|
||||
GNU_CONFIG_GET config.sub
|
||||
"""
|
||||
|
||||
[build]
|
||||
@ -15,6 +15,5 @@ dependencies = [
|
||||
template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
export LIBS="-lpcre2-8"
|
||||
cookbook_configure
|
||||
"""
|
||||
|
||||
@ -13,7 +13,6 @@ template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
|
||||
(cd "${COOKBOOK_SOURCE}" && bash scripts/redox/uncomment-cargo.sh && cargo update)
|
||||
export BUILDTIME_RUSTPYTHONPATH=/lib/rustpython
|
||||
export OPENSSL_DIR="${COOKBOOK_SYSROOT}"
|
||||
export ZLIB_STATIC=1
|
||||
|
||||
@ -4,7 +4,7 @@ blake3 = "8bc50ffdba20579fb3080a0dca32cb939c8a3c19259aed026482c6ac069b0007"
|
||||
patches = ["01_redox.patch"]
|
||||
script = """
|
||||
./autogen.sh
|
||||
wget -O config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false"
|
||||
GNU_CONFIG_GET config.sub
|
||||
"""
|
||||
|
||||
[build]
|
||||
@ -14,9 +14,10 @@ dependencies = [
|
||||
]
|
||||
template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
export CFLAGS="-I${COOKBOOK_SYSROOT}/include/SDL"
|
||||
export CPPFLAGS="-I${COOKBOOK_SYSROOT}/include/SDL"
|
||||
export LDFLAGS="-L${COOKBOOK_SYSROOT}/lib -static"
|
||||
export LDFLAGS+=" -lorbital"
|
||||
COOKBOOK_CONFIGURE_FLAGS+=(
|
||||
--disable-opengl
|
||||
--disable-sdltest
|
||||
|
||||
@ -4,24 +4,15 @@ blake3 = "a1b9e797a5058f5264d276805aef5643b7ea460916e491a0098ba32d87f1519e"
|
||||
patches = ["redox.patch"]
|
||||
|
||||
[build]
|
||||
dependencies = [
|
||||
"libiconv",
|
||||
"liborbital",
|
||||
"libpng",
|
||||
"pixman",
|
||||
"sdl1",
|
||||
"zlib",
|
||||
dependencies = ["libiconv", "liborbital", "libpng", "pixman", "sdl1", "zlib"]
|
||||
template = "cmake"
|
||||
cmakeflags = [
|
||||
"-DBUILD_QT=OFF",
|
||||
"-DBUILD_SHARED=ON",
|
||||
"-DBUILD_STATIC=OFF",
|
||||
"-DUSE_SQLITE3=OFF",
|
||||
"-DUSE_DEBUGGERS=OFF",
|
||||
"-DBUILD_SDL=ON",
|
||||
"-DSDL_VERSION=1.2",
|
||||
"-DSDL_LIBRARY=-lSDL -lorbital",
|
||||
]
|
||||
template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
cookbook_cmake \
|
||||
-DBUILD_QT=OFF \
|
||||
-DBUILD_SHARED=ON \
|
||||
-DBUILD_STATIC=OFF \
|
||||
-DUSE_SQLITE3=OFF \
|
||||
-DUSE_DEBUGGERS=OFF \
|
||||
-DBUILD_SDL=ON \
|
||||
-DSDL_VERSION="1.2" \
|
||||
-DSDL_LIBRARY="-lSDL -lorbital"
|
||||
"""
|
||||
|
||||
@ -3,7 +3,7 @@ tar = "https://downloads.scummvm.org/frs/scummvm/2.0.0/scummvm-2.0.0.tar.xz"
|
||||
blake3 = "02e6791fd43ad3cb4238c07d23350ca1459a0f692689e585dba1d46648f64327"
|
||||
patches = ["redox.patch"]
|
||||
script = """
|
||||
wget -O config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false"
|
||||
GNU_CONFIG_GET config.sub
|
||||
"""
|
||||
|
||||
[build]
|
||||
@ -16,12 +16,12 @@ dependencies = [
|
||||
"libpng",
|
||||
]
|
||||
script = """
|
||||
export LDFLAGS="-static"
|
||||
DYNAMIC_INIT
|
||||
|
||||
COOKBOOK_CONFIGURE="${COOKBOOK_SOURCE}/configure"
|
||||
export LDFLAGS+=" -lorbital"
|
||||
COOKBOOK_CONFIGURE_FLAGS=(
|
||||
--host="${TARGET}"
|
||||
--prefix=""
|
||||
--prefix="/usr"
|
||||
--with-sdl-prefix="${COOKBOOK_SYSROOT}"
|
||||
--with-freetype2-prefix="${COOKBOOK_SYSROOT}"
|
||||
--with-png-prefix="${COOKBOOK_SYSROOT}"
|
||||
|
||||
@ -29,7 +29,6 @@ env -i \
|
||||
PKG_CONFIG="pkg-config" \
|
||||
"${COOKBOOK_MAKE}" -j"${COOKBOOK_MAKE_JOBS}" ENABLE_FS=stdio mapc sols
|
||||
|
||||
export LDFLAGS+="-L${COOKBOOK_SYSROOT}/lib -z noexecstack"
|
||||
"${COOKBOOK_MAKE}" -j"${COOKBOOK_MAKE_JOBS}" ENABLE_FS=stdio ENABLE_NLS=0 clean-src
|
||||
"${COOKBOOK_MAKE}" -j"${COOKBOOK_MAKE_JOBS}" ENABLE_FS=stdio ENABLE_NLS=0 neverball neverputt
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
[source]
|
||||
git = "https://github.com/OpenTTD/OpenTTD.git"
|
||||
branch = "release/1.8"
|
||||
shallow_clone = true
|
||||
patches = ["redox.patch"]
|
||||
|
||||
[build]
|
||||
|
||||
@ -1,15 +1,3 @@
|
||||
diff -burpN source-original/configure.ac source/configure.ac
|
||||
--- source-original/configure.ac 2008-11-09 12:12:37.000000000 -0700
|
||||
+++ source/configure.ac 2024-09-07 10:06:36.540104562 -0600
|
||||
@@ -85,8 +85,6 @@ if test "$cross_compiling" != "yes"; the
|
||||
fi
|
||||
|
||||
dnl --- Header files, typedefs, structures
|
||||
-AC_TYPE_UID_T
|
||||
-AC_TYPE_SIZE_T
|
||||
AC_DECL_SYS_SIGLIST
|
||||
AC_HEADER_SYS_WAIT
|
||||
AC_CHECK_HEADERS(unistd.h asm/byteorder.h sched.h)
|
||||
diff -burpN source-original/src/m_misc.c source/src/m_misc.c
|
||||
--- source-original/src/m_misc.c 2008-11-09 10:13:04.000000000 -0700
|
||||
+++ source/src/m_misc.c 2024-09-07 10:09:06.890301682 -0600
|
||||
|
||||
@ -27,6 +27,8 @@ COOKBOOK_CONFIGURE_FLAGS+=(
|
||||
--without-net
|
||||
--with-sdl-prefix="${COOKBOOK_SYSROOT}"
|
||||
ac_cv_lib_SDL_mixer_Mix_OpenAudio=yes
|
||||
ac_cv_type_gid_t=yes
|
||||
ac_cv_type_uid_t=yes
|
||||
)
|
||||
cookbook_configure
|
||||
"""
|
||||
|
||||
@ -16,17 +16,12 @@ dependencies = [
|
||||
"zlib",
|
||||
]
|
||||
script = """
|
||||
COOKBOOK_CONFIGURE="cmake"
|
||||
DYNAMIC_INIT
|
||||
COOKBOOK_CONFIGURE_FLAGS=(
|
||||
-DCMAKE_VERBOSE_MAKEFILE=On
|
||||
-DCMAKE_CROSSCOMPILING=True
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DCMAKE_INSTALL_PREFIX="/usr"
|
||||
-DSDL2_INCLUDE_DIR="${COOKBOOK_SYSROOT}/include/SDL2"
|
||||
-DSDL2_LIBRARY="-lSDL2_mixer -lvorbisfile -lvorbis -logg -lSDL2 -lorbital $("${TARGET}-pkg-config" --libs osmesa)"
|
||||
-DSDL2_MIXER_INCLUDE_DIR="${COOKBOOK_SYSROOT}/include/SDL2"
|
||||
-DSDL2_MIXER_LIBRARY="SDL2_mixer"
|
||||
"${COOKBOOK_SOURCE}"
|
||||
)
|
||||
cookbook_configure
|
||||
cookbook_cmake
|
||||
"""
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
tar = "https://download.gnome.org/sources/atk/2.38/atk-2.38.0.tar.xz"
|
||||
blake3 = "cbc1b7ba03009ee5cc0e646d8a86117e0d65bf8d105f2e8714fbde0299a8012e"
|
||||
script = """
|
||||
wget -O config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false"
|
||||
GNU_CONFIG_GET config.sub
|
||||
"""
|
||||
|
||||
[build]
|
||||
|
||||
@ -28,9 +28,8 @@ script = """
|
||||
DYNAMIC_INIT
|
||||
#TODO: fix mutex implementation
|
||||
#TODO: why are math defines missing?
|
||||
#TODO: why is -lexpat not automatic?
|
||||
CFLAGS="${CFLAGS} -DCAIRO_NO_MUTEX=1 -DM_SQRT2=1.41421356237309504880 -DM_LN2=0.69314718055994530942"
|
||||
cookbook_meson \
|
||||
-Dc_args="-DCAIRO_NO_MUTEX=1 -DM_SQRT2=1.41421356237309504880 -DM_LN2=0.69314718055994530942 -lexpat" \
|
||||
-Dxlib-xcb=enabled \
|
||||
-Dtests=disabled
|
||||
"""
|
||||
|
||||
@ -16,14 +16,19 @@ dependencies = [
|
||||
"zlib",
|
||||
]
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
|
||||
export LDFLAGS="$LDFLAGS -lSDL2 -lorbital -lOSMesa -lstdc++"
|
||||
ARCH="${TARGET%%-*}"
|
||||
COOKBOOK_CONFIGURE_FLAGS=(
|
||||
--enable-cross-compile
|
||||
--target-os=redox
|
||||
--arch="${ARCH}"
|
||||
--cross_prefix="${TARGET}-"
|
||||
--prefix=/
|
||||
--prefix=/usr
|
||||
--disable-doc
|
||||
--enable-shared
|
||||
--disable-static
|
||||
--disable-network
|
||||
--enable-sdl2
|
||||
--enable-zlib
|
||||
|
||||
@ -62,8 +62,8 @@ DYNAMIC_INIT
|
||||
export GLIB_GENMARSHAL="$(which glib-genmarshal)"
|
||||
export GLIB_MKENUMS="$(which glib-mkenums)"
|
||||
|
||||
CFLAGS="${CFLAGS} -DM_LN2=0.69314718055994530942"
|
||||
cookbook_meson \
|
||||
-Dc_args="-DM_LN2=0.69314718055994530942" \
|
||||
-Ddevtools=disabled \
|
||||
-Dexamples=disabled \
|
||||
-Dlibav=disabled \
|
||||
|
||||
@ -6,18 +6,9 @@ patches = [
|
||||
]
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
GNU_CONFIG_GET config.sub
|
||||
autotools_recursive_regenerate
|
||||
"""
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
COOKBOOK_CONFIGURE_FLAGS=(
|
||||
--host="${GNU_TARGET}"
|
||||
--prefix="/usr"
|
||||
--enable-shared
|
||||
--enable-static
|
||||
)
|
||||
cookbook_configure
|
||||
"""
|
||||
template = "configure"
|
||||
|
||||
@ -4,7 +4,7 @@ blake3 = "36f4bbb48c70975116b00ab0cff577931b96f703b2774ac3b33131d001419435"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
chmod +w config.sub
|
||||
wget -O config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false"
|
||||
GNU_CONFIG_GET config.sub
|
||||
autotools_recursive_regenerate
|
||||
"""
|
||||
|
||||
|
||||
@ -3,21 +3,12 @@ tar = "https://github.com/xiph/vorbis/releases/download/v1.3.7/libvorbis-1.3.7.t
|
||||
blake3 = "c67f3f74ec26d93a5571c4404a64eb6e6587d7d77b46b552f7b410f5bc5b1f03"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
GNU_CONFIG_GET config.sub
|
||||
autotools_recursive_regenerate
|
||||
"""
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
template = "configure"
|
||||
dependencies = [
|
||||
"libogg"
|
||||
]
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
COOKBOOK_CONFIGURE_FLAGS=(
|
||||
--host="${GNU_TARGET}"
|
||||
--prefix="/usr"
|
||||
--enable-shared
|
||||
--enable-static
|
||||
)
|
||||
cookbook_configure
|
||||
"""
|
||||
|
||||
@ -13,8 +13,8 @@ dependencies = [
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
|
||||
export CFLAGS+="-I${COOKBOOK_SYSROOT}/include -DHAVE_PTHREAD=1"
|
||||
export CPPFLAGS+="-I${COOKBOOK_SYSROOT}/include -DHAVE_PTHREAD=1"
|
||||
export CFLAGS+=" -DHAVE_PTHREAD=1"
|
||||
export CPPFLAGS+=" -DHAVE_PTHREAD=1"
|
||||
export LLVM_CONFIG="${TARGET}-llvm-config"
|
||||
|
||||
if [[ -n "${COOKBOOK_PREFER_STATIC}" ]]; then
|
||||
|
||||
@ -5,6 +5,7 @@ blake3 = "0d1c9fdf53c0ca4bd66ba707d49a079d2dd6f5a960cdec74a56e29952c4ffe73"
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
COOKBOOK_CONFIGURE_FLAGS+=(
|
||||
--disable-db-install
|
||||
--disable-stripping
|
||||
|
||||
@ -1,31 +1,39 @@
|
||||
[source]
|
||||
tar="https://download.gnome.org/sources/pango/1.56/pango-1.56.3.tar.xz"
|
||||
tar = "https://download.gnome.org/sources/pango/1.56/pango-1.56.3.tar.xz"
|
||||
blake3 = "78542feaaf007c1d648b94c4e9b6655ed7515d27ce434766aea99bef886c21ac"
|
||||
patches = ["redox.patch"]
|
||||
|
||||
[build]
|
||||
dependencies = [
|
||||
"cairo",
|
||||
"expat",
|
||||
"fontconfig",
|
||||
"freetype2",
|
||||
"fribidi",
|
||||
"gettext",
|
||||
"glib",
|
||||
"harfbuzz",
|
||||
"libffi",
|
||||
"libiconv",
|
||||
"libpng",
|
||||
"pcre",
|
||||
"pixman",
|
||||
"zlib",
|
||||
"cairo",
|
||||
"expat",
|
||||
"fontconfig",
|
||||
"freetype2",
|
||||
"fribidi",
|
||||
"gettext",
|
||||
"glib",
|
||||
"harfbuzz",
|
||||
"libffi",
|
||||
"libiconv",
|
||||
"libpng",
|
||||
"libpthread-stubs",
|
||||
"libx11",
|
||||
"libxau",
|
||||
"libxcb",
|
||||
"libxext",
|
||||
"libxrender",
|
||||
"pcre",
|
||||
"pcre2",
|
||||
"pixman",
|
||||
"x11proto",
|
||||
"xcb-proto",
|
||||
"xextproto",
|
||||
"zlib",
|
||||
]
|
||||
template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
#TODO: why are these libs not automatic?
|
||||
cookbook_meson \
|
||||
-Dc_args="-lfontconfig -lexpat -lpixman-1 -lpng -lz" \
|
||||
-Dbuild-examples=false \
|
||||
-Dbuild-testsuite=false
|
||||
"""
|
||||
|
||||
@ -15,6 +15,7 @@ dependencies = [
|
||||
]
|
||||
template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
export LIBS="-lvorbis -logg"
|
||||
COOKBOOK_CONFIGURE_FLAGS+=(
|
||||
--enable-music-ogg
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
tar = "http://www.ferzkopp.net/Software/SDL2_gfx/SDL2_gfx-1.0.4.tar.gz"
|
||||
blake3 = "2e9bd2dc0f004349b51418f33219ebf5cd69f25ed0ba660373652a662cbb857c"
|
||||
script = """
|
||||
wget -O config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false"
|
||||
GNU_CONFIG_GET config.sub
|
||||
"""
|
||||
|
||||
[build]
|
||||
|
||||
@ -1,23 +1,25 @@
|
||||
[source]
|
||||
tar = "https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.4.tar.gz"
|
||||
tar = "https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.8.1.tar.gz"
|
||||
blake3 = "fa0798ce7ffdb5f89545311292374e5b7af479df8bc99a4aacfb40d2ab2f8384"
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
dependencies = [
|
||||
"sdl2",
|
||||
"liborbital",
|
||||
"llvm18",
|
||||
"mesa",
|
||||
"zlib",
|
||||
"libogg",
|
||||
"libvorbis",
|
||||
"sdl2",
|
||||
"liborbital",
|
||||
"llvm18",
|
||||
"mesa",
|
||||
"zlib",
|
||||
"libogg",
|
||||
"libvorbis",
|
||||
]
|
||||
script = """
|
||||
export SDL_LIBS="-lSDL2 -lorbital $("${TARGET}-pkg-config" --libs osmesa) -lvorbis -logg -lz -lm -lpthread -lstdc++"
|
||||
DYNAMIC_INIT
|
||||
|
||||
export SDL_LIBS="-lSDL2 -lorbital -lOSMesa -lvorbis -logg -lz -lm -lpthread -lstdc++"
|
||||
COOKBOOK_CONFIGURE_FLAGS=(
|
||||
--prefix=/
|
||||
--host="${TARGET}"
|
||||
--disable-shared
|
||||
--disable-sdltest
|
||||
--enable-music-ogg
|
||||
--disable-music-cmd
|
||||
@ -26,6 +28,5 @@ COOKBOOK_CONFIGURE_FLAGS=(
|
||||
--disable-music-midi
|
||||
--disable-music-mod
|
||||
)
|
||||
set -x
|
||||
cookbook_configure
|
||||
"""
|
||||
|
||||
@ -6,14 +6,15 @@ git = "https://gitlab.redox-os.org/redox-os/sdl2.git"
|
||||
template = "custom"
|
||||
dependencies = [
|
||||
"liborbital",
|
||||
"llvm18",
|
||||
"mesa",
|
||||
"zlib",
|
||||
]
|
||||
script = """
|
||||
COOKBOOK_CONFIGURE_FLAGS=(
|
||||
--host="${TARGET}"
|
||||
--prefix="/"
|
||||
DYNAMIC_INIT
|
||||
export LDFLAGS="$LDFLAGS -lorbital -lOSMesa -lstdc++"
|
||||
COOKBOOK_CONFIGURE_FLAGS+=(
|
||||
--disable-pulseaudio
|
||||
--disable-shared
|
||||
--disable-video-x11
|
||||
--enable-audio
|
||||
--enable-dummyaudio
|
||||
@ -24,5 +25,5 @@ COOKBOOK_CONFIGURE_FLAGS=(
|
||||
cookbook_configure
|
||||
|
||||
# Hack to add OSMesa
|
||||
sed -i "s/Requires:/Requires: osmesa >= 8.0.0/" "${COOKBOOK_STAGE}/lib/pkgconfig/sdl2.pc"
|
||||
sed -i "s/Requires:/Requires: osmesa >= 8.0.0/" "${COOKBOOK_STAGE}/usr/lib/pkgconfig/sdl2.pc"
|
||||
"""
|
||||
|
||||
15
recipes/libs/unibilium/recipe.toml
Normal file
15
recipes/libs/unibilium/recipe.toml
Normal file
@ -0,0 +1,15 @@
|
||||
[source]
|
||||
tar = "https://github.com/neovim/unibilium/archive/refs/tags/v2.1.2.tar.gz"
|
||||
blake3 = "856a7593a412942f4716bb55bfdd225f3ce92cb013b9d4a44693255f0570b1c7"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
autotools_recursive_regenerate
|
||||
"""
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
rsync -av --delete "${COOKBOOK_SOURCE}/" ./
|
||||
cookbook_configure
|
||||
"""
|
||||
23
recipes/libs/utf8proc/recipe.toml
Normal file
23
recipes/libs/utf8proc/recipe.toml
Normal file
@ -0,0 +1,23 @@
|
||||
[source]
|
||||
tar = "https://github.com/JuliaStrings/utf8proc/archive/refs/tags/v2.10.0.tar.gz"
|
||||
blake3 = "6f675db5d1ae55ad0825351ba9c58a5b5c24c862f559cc7bfed1cb63c1185594"
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
COOKBOOK_CONFIGURE="cmake"
|
||||
COOKBOOK_CONFIGURE_FLAGS=(
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DCMAKE_CROSSCOMPILING=True
|
||||
-DCMAKE_CXX_COMPILER="${TARGET}-g++"
|
||||
-DCMAKE_C_COMPILER="${TARGET}-gcc"
|
||||
-DCMAKE_INSTALL_PREFIX="/"
|
||||
-DCMAKE_PREFIX_PATH="${COOKBOOK_SYSROOT}"
|
||||
-DCMAKE_SYSTEM_NAME=Generic
|
||||
-DCMAKE_SYSTEM_PROCESSOR="$(echo "${TARGET}" | cut -d - -f1)"
|
||||
-DCMAKE_VERBOSE_MAKEFILE=On
|
||||
"${COOKBOOK_SOURCE}"
|
||||
)
|
||||
cookbook_configure
|
||||
"""
|
||||
@ -13,26 +13,20 @@ dependencies = [
|
||||
]
|
||||
script = """
|
||||
rsync -av --delete "${COOKBOOK_SOURCE}/" ./
|
||||
wget -O config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false"
|
||||
# FIXME(andypython): dynamically compile
|
||||
GNU_CONFIG_GET config.sub
|
||||
DYNAMIC_INIT
|
||||
autotools_recursive_regenerate
|
||||
COOKBOOK_CONFIGURE="./configure"
|
||||
COOKBOOK_CONFIGURE_FLAGS=(
|
||||
--build="$(cc -dumpmachine)"
|
||||
--host="${TARGET}"
|
||||
--prefix=""
|
||||
COOKBOOK_CONFIGURE_FLAGS+=(
|
||||
--disable-ftp
|
||||
--disable-ipv6
|
||||
--disable-ntlm-wb
|
||||
--disable-tftp
|
||||
--disable-threaded-resolver
|
||||
--enable-shared
|
||||
--enable-static
|
||||
--with-ca-path=/etc/ssl/certs
|
||||
--with-nghttp2="${COOKBOOK_SYSROOT}"
|
||||
--with-ssl="${COOKBOOK_SYSROOT}"
|
||||
--with-zlib="${COOKBOOK_SYSROOT}"
|
||||
--with-nghttp2
|
||||
--with-ssl
|
||||
--with-zlib
|
||||
--without-libpsl
|
||||
)
|
||||
cookbook_configure
|
||||
|
||||
@ -1,13 +1,10 @@
|
||||
[source]
|
||||
tar = "https://ftp.gnu.org/gnu/wget/wget-1.21.4.tar.gz"
|
||||
[build]
|
||||
template = "custom"
|
||||
dependencies = [
|
||||
"openssl1",
|
||||
]
|
||||
script = """
|
||||
COOKBOOK_CONFIGURE_FLAGS+=(
|
||||
--with-ssl=openssl
|
||||
)
|
||||
cookbook_configure
|
||||
"""
|
||||
template = "configure"
|
||||
configureflags = [
|
||||
"--with-ssl=openssl"
|
||||
]
|
||||
|
||||
9
recipes/other/rustconf2025/recipe.toml
Normal file
9
recipes/other/rustconf2025/recipe.toml
Normal file
@ -0,0 +1,9 @@
|
||||
[source]
|
||||
git = "https://github.com/jackpot51/rustconf2025.git"
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
mkdir -p "${COOKBOOK_STAGE}/home/user"
|
||||
cp -v "${COOKBOOK_SOURCE}/"*.pdf "${COOKBOOK_STAGE}/home/user"
|
||||
"""
|
||||
@ -5,7 +5,14 @@ branch = "master"
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
mkdir -p ${COOKBOOK_STAGE}/share
|
||||
cp -r ${COOKBOOK_SOURCE}/. ${COOKBOOK_STAGE}/share/
|
||||
# only copy common TERM envar
|
||||
mkdir -p ${COOKBOOK_STAGE}/share/terminfo/{a,d,l,s,t,v,x}
|
||||
cp -r ${COOKBOOK_SOURCE}/tabset ${COOKBOOK_STAGE}/share/
|
||||
cp ${COOKBOOK_SOURCE}/terminfo/a/ansi{,-*} ${COOKBOOK_STAGE}/share/terminfo/a/
|
||||
cp ${COOKBOOK_SOURCE}/terminfo/d/dumb{,-*} ${COOKBOOK_STAGE}/share/terminfo/d/
|
||||
cp ${COOKBOOK_SOURCE}/terminfo/l/linux{,-*} ${COOKBOOK_STAGE}/share/terminfo/l/
|
||||
cp ${COOKBOOK_SOURCE}/terminfo/s/screen{,-*} ${COOKBOOK_STAGE}/share/terminfo/s/
|
||||
cp ${COOKBOOK_SOURCE}/terminfo/t/tmux{,-*} ${COOKBOOK_STAGE}/share/terminfo/t/
|
||||
cp ${COOKBOOK_SOURCE}/terminfo/v/vt100{,-*} ${COOKBOOK_STAGE}/share/terminfo/v/
|
||||
cp ${COOKBOOK_SOURCE}/terminfo/x/xterm{,-*} ${COOKBOOK_STAGE}/share/terminfo/x/
|
||||
"""
|
||||
|
||||
|
||||
17
recipes/tests/os-test/recipe.toml
Normal file
17
recipes/tests/os-test/recipe.toml
Normal file
@ -0,0 +1,17 @@
|
||||
[source]
|
||||
git = "https://gitlab.com/sortix/os-test"
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
mkdir -pv "${COOKBOOK_STAGE}/share/os-test"
|
||||
cp -rv "${COOKBOOK_SOURCE}"/* "${COOKBOOK_STAGE}/share/os-test"
|
||||
"""
|
||||
|
||||
[package]
|
||||
dependencies = [
|
||||
"gnu-binutils",
|
||||
"gnu-make",
|
||||
"gcc13",
|
||||
"libarchive",
|
||||
]
|
||||
@ -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"
|
||||
|
||||
@ -3,7 +3,7 @@ tar = "https://invisible-island.net/archives/vttest/vttest-20140305.tgz"
|
||||
blake3 = "b515b9a5e1f1498ed99e1a1c172fbcfdf2b7a214e185bd2005cc994407ded89e"
|
||||
patches = ["redox.patch"]
|
||||
script = """
|
||||
wget -O config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false"
|
||||
GNU_CONFIG_GET config.sub
|
||||
"""
|
||||
|
||||
[build]
|
||||
|
||||
@ -4,8 +4,34 @@ branch = "master"
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
dependencies = [
|
||||
"expat",
|
||||
"fontconfig",
|
||||
"freetype2",
|
||||
"libpng",
|
||||
"zlib",
|
||||
]
|
||||
script = """
|
||||
cookbook_cargo --no-default-features
|
||||
DYNAMIC_INIT
|
||||
export BINDGEN_EXTRA_CLANG_ARGS="--sysroot=${COOKBOOK_HOST_SYSROOT}/${GNU_TARGET} -I${COOKBOOK_HOST_SYSROOT}/${GNU_TARGET}/include"
|
||||
"${COOKBOOK_CARGO}" rustc \
|
||||
--manifest-path "${COOKBOOK_SOURCE}/Cargo.toml" \
|
||||
--release \
|
||||
--bin cosmic-reader \
|
||||
--no-default-features \
|
||||
--features mupdf \
|
||||
-- \
|
||||
-C link-args="-lpng -lexpat"
|
||||
mkdir -pv "${COOKBOOK_STAGE}/usr/bin/"
|
||||
cp -v "target/${TARGET}/release/cosmic-reader" "${COOKBOOK_STAGE}/usr/bin/"
|
||||
mkdir -pv "${COOKBOOK_STAGE}/ui/apps"
|
||||
cp -v "${COOKBOOK_RECIPE}/manifest" "${COOKBOOK_STAGE}/ui/apps/40_cosmic-reader"
|
||||
#TODO: install with just?
|
||||
APPID="com.system76.CosmicReader"
|
||||
mkdir -pv "${COOKBOOK_STAGE}/usr/share/applications/"
|
||||
cp -v "${COOKBOOK_SOURCE}/res/${APPID}.desktop" "${COOKBOOK_STAGE}/usr/share/applications/"
|
||||
mkdir -pv "${COOKBOOK_STAGE}/usr/share/thumbnailers/"
|
||||
cp -v "${COOKBOOK_SOURCE}/res/${APPID}.thumbnailer" "${COOKBOOK_STAGE}/usr/share/thumbnailers/"
|
||||
mkdir -pv "${COOKBOOK_STAGE}/usr/share/icons/"
|
||||
cp -rv "${COOKBOOK_SOURCE}/res/icons/hicolor/" "${COOKBOOK_STAGE}/usr/share/icons/"
|
||||
"""
|
||||
|
||||
@ -1,2 +0,0 @@
|
||||
GIT=https://gitlab.redox-os.org/redox-os/miniserve
|
||||
BUILD_DEPENDS=(openssl1 zlib)
|
||||
@ -6,7 +6,7 @@ dependencies = [
|
||||
"ncurses",
|
||||
]
|
||||
script = """
|
||||
export CPPFLAGS="-I${COOKBOOK_SYSROOT}/include/ncurses"
|
||||
DYNAMIC_INIT
|
||||
cookbook_configure
|
||||
"""
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
[source]
|
||||
tar = "https://github.com/vim/vim/archive/refs/tags/v8.2.5172.tar.gz"
|
||||
blake3 = "28a58578a6655e2e45078331569d6e6c96ed05189acda34c2a784581bf614cd2"
|
||||
patch = ["vim.patch"]
|
||||
tar = "https://github.com/vim/vim/archive/refs/tags/v9.1.0821.tar.gz"
|
||||
blake3 = "d1f5802ceb047b09143f1764bf4016f084cf7e6c026c7047919264c9f262a5dd"
|
||||
patches = ["vim.patch"]
|
||||
|
||||
[build]
|
||||
dependencies = ["ncurses"]
|
||||
|
||||
@ -1,22 +1,45 @@
|
||||
diff -ruwN source/src/configure.ac source-new/src/configure.ac
|
||||
--- source/src/configure.ac 2024-10-29 04:05:26.000000000 +0700
|
||||
+++ source-new/src/configure.ac 2025-08-06 03:15:52.796303989 +0700
|
||||
@@ -3759,7 +3759,7 @@
|
||||
dnl Check for functions in one big call, to reduce the size of configure.
|
||||
dnl Can only be used for functions that do not require any include.
|
||||
AC_CHECK_FUNCS(fchdir fchown fchmod fsync getcwd getpseudotty \
|
||||
- getpwent getpwnam getpwuid getrlimit gettimeofday localtime_r lstat \
|
||||
+ getpwent getpwnam getpwuid gettimeofday localtime_r lstat \
|
||||
memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \
|
||||
getpgid setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
|
||||
sigprocmask sigvec strcasecmp strcoll strerror strftime stricmp strncasecmp \
|
||||
diff -ruwN source/src/feature.h source-new/src/feature.h
|
||||
--- source/src/feature.h 2024-10-29 04:05:26.000000000 +0700
|
||||
+++ source-new/src/feature.h 2025-08-06 03:16:27.596296730 +0700
|
||||
@@ -272,6 +272,7 @@
|
||||
*/
|
||||
#if defined(FEAT_NORMAL) \
|
||||
&& defined(FEAT_EVAL) \
|
||||
+ && !defined (__redox__) /* disable setitimer */ \
|
||||
&& ((defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H) \
|
||||
&& (!defined(MACOS_X) || defined(HAVE_DISPATCH_DISPATCH_H))) \
|
||||
|| defined(MSWIN))
|
||||
diff -ruwN source/src/libvterm/include/vterm.h source-new/src/libvterm/include/vterm.h
|
||||
--- source/src/libvterm/include/vterm.h 2019-12-04 14:09:41.000000000 -0700
|
||||
+++ source-new/src/libvterm/include/vterm.h 2023-09-09 19:06:56.211783900 -0600
|
||||
@@ -15,9 +15,11 @@
|
||||
#define TRUE 1
|
||||
--- source/src/libvterm/include/vterm.h 2024-10-29 04:05:26.000000000 +0700
|
||||
+++ source-new/src/libvterm/include/vterm.h 2025-08-06 03:15:02.506316769 +0700
|
||||
@@ -17,9 +17,11 @@
|
||||
#define FALSE 0
|
||||
|
||||
// VIM: from stdint.h
|
||||
+#if !defined (__redox__)
|
||||
// from stdint.h
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef unsigned int uint32_t;
|
||||
+#endif
|
||||
|
||||
typedef struct VTerm VTerm;
|
||||
typedef struct VTermState VTermState;
|
||||
// VIM: define max screen cols and rows
|
||||
#define VTERM_MAX_COLS 1000
|
||||
diff -ruwN source/src/memfile.c source-new/src/memfile.c
|
||||
--- source/src/memfile.c 2019-12-04 13:51:25.000000000 -0700
|
||||
+++ source-new/src/memfile.c 2023-09-09 19:06:08.999846625 -0600
|
||||
@@ -610,6 +610,8 @@
|
||||
--- source/src/memfile.c 2024-10-29 04:05:26.000000000 +0700
|
||||
+++ source-new/src/memfile.c 2025-08-06 03:15:36.896308173 +0700
|
||||
@@ -599,6 +599,8 @@
|
||||
// No sync() on Stratus VOS
|
||||
# if defined(__OPENNT) || defined(__TANDEM) || defined(__VOS__)
|
||||
fflush(NULL);
|
||||
@ -25,3 +48,19 @@ diff -ruwN source/src/memfile.c source-new/src/memfile.c
|
||||
# else
|
||||
sync();
|
||||
# endif
|
||||
diff -ruwN source/src/auto/configure source-new/src/auto/configure
|
||||
--- source/src/auto/configure 2024-10-29 04:05:26.000000000 +0700
|
||||
+++ source-new/src/auto/configure 2025-08-06 03:56:11.765660165 +0700
|
||||
@@ -13358,12 +13358,6 @@
|
||||
printf "%s\n" "#define HAVE_GETPWUID 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
-ac_fn_c_check_func "$LINENO" "getrlimit" "ac_cv_func_getrlimit"
|
||||
-if test "x$ac_cv_func_getrlimit" = xyes
|
||||
-then :
|
||||
- printf "%s\n" "#define HAVE_GETRLIMIT 1" >>confdefs.h
|
||||
-
|
||||
-fi
|
||||
ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
|
||||
if test "x$ac_cv_func_gettimeofday" = xyes
|
||||
then :
|
||||
|
||||
6
recipes/wip/analysis/flowgger/recipe.toml
Normal file
6
recipes/wip/analysis/flowgger/recipe.toml
Normal file
@ -0,0 +1,6 @@
|
||||
#TODO not compiled or tested
|
||||
# build instructions: https://github.com/awslabs/flowgger/wiki/Installation
|
||||
[source]
|
||||
git = "https://github.com/awslabs/flowgger"
|
||||
[build]
|
||||
template = "cargo"
|
||||
8
recipes/wip/data-integrity/rapidhash/recipe.toml
Normal file
8
recipes/wip/data-integrity/rapidhash/recipe.toml
Normal file
@ -0,0 +1,8 @@
|
||||
#TODO not compiled or tested
|
||||
[source]
|
||||
git = "https://github.com/hoxxep/rapidhash"
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
cookbook_cargo_packages rapidhash
|
||||
"""
|
||||
8
recipes/wip/demos/feoxdb/recipe.toml
Normal file
8
recipes/wip/demos/feoxdb/recipe.toml
Normal file
@ -0,0 +1,8 @@
|
||||
#TODO not compiled or tested
|
||||
[source]
|
||||
git = "https://github.com/mehrantsi/FeOxDB"
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
cookbook_cargo_examples basic_usage deterministic_test
|
||||
"""
|
||||
8
recipes/wip/demos/genpdf-rs/recipe.toml
Normal file
8
recipes/wip/demos/genpdf-rs/recipe.toml
Normal file
@ -0,0 +1,8 @@
|
||||
#TODO not compiled or tested
|
||||
[source]
|
||||
git = "https://git.sr.ht/~ireas/genpdf-rs"
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
cookbook_cargo_examples demo
|
||||
"""
|
||||
10
recipes/wip/demos/iocraft/recipe.toml
Normal file
10
recipes/wip/demos/iocraft/recipe.toml
Normal file
@ -0,0 +1,10 @@
|
||||
#TODO not compiled or tested
|
||||
[source]
|
||||
git = "https://github.com/ccbrown/iocraft"
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
cookbook_cargo_examples borders calculator counter \
|
||||
fullscreen hello_world overlap progress_bar scrolling \
|
||||
table use_input use_output weather
|
||||
"""
|
||||
9
recipes/wip/demos/reticulum-rs/recipe.toml
Normal file
9
recipes/wip/demos/reticulum-rs/recipe.toml
Normal file
@ -0,0 +1,9 @@
|
||||
#TODO not compiled or tested
|
||||
# the protobuf compiler needs to be installed
|
||||
[source]
|
||||
git = "https://github.com/BeechatNetworkSystemsLtd/Reticulum-rs"
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
cookbook_cargo_examples tcp_client kaonic_client
|
||||
"""
|
||||
9
recipes/wip/demos/rustui/recipe.toml
Normal file
9
recipes/wip/demos/rustui/recipe.toml
Normal file
@ -0,0 +1,9 @@
|
||||
#TODO not compiled or tested
|
||||
[source]
|
||||
git = "https://github.com/broccolingual/rustui"
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
cookbook_cargo_examples hello_world colors inputs file_reader
|
||||
cookbook_cargo_packages tetris
|
||||
"""
|
||||
@ -1,800 +0,0 @@
|
||||
diff -ruwN source/src/cmd/dist/build.go source-new/src/cmd/dist/build.go
|
||||
--- source/src/cmd/dist/build.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/cmd/dist/build.go 2025-07-20 23:50:47.312425484 +0700
|
||||
@@ -94,6 +94,7 @@
|
||||
"wasip1",
|
||||
"linux",
|
||||
"android",
|
||||
+ "redox",
|
||||
"solaris",
|
||||
"freebsd",
|
||||
"nacl", // keep;
|
||||
@@ -764,7 +765,7 @@
|
||||
elem = "go_bootstrap"
|
||||
}
|
||||
link = []string{pathf("%s/link", tooldir)}
|
||||
- if goos == "android" {
|
||||
+ if goos == "android" || goos == "redox" {
|
||||
link = append(link, "-buildmode=pie")
|
||||
}
|
||||
if goldflags != "" {
|
||||
@@ -1020,7 +1021,7 @@
|
||||
if symabis != "" {
|
||||
compile = append(compile, "-symabis", symabis)
|
||||
}
|
||||
- if goos == "android" {
|
||||
+ if goos == "android" || goos == "redox" {
|
||||
compile = append(compile, "-shared")
|
||||
}
|
||||
|
||||
@@ -1084,6 +1085,7 @@
|
||||
"linux": true,
|
||||
"netbsd": true,
|
||||
"openbsd": true,
|
||||
+ "redox": true,
|
||||
"solaris": true,
|
||||
}
|
||||
|
||||
@@ -1093,7 +1095,7 @@
|
||||
case "gc", "cmd_go_bootstrap", "go1.1":
|
||||
return true
|
||||
case "linux":
|
||||
- return goos == "linux" || goos == "android"
|
||||
+ return goos == "linux" || goos == "android" || goos == "redox"
|
||||
case "solaris":
|
||||
return goos == "solaris" || goos == "illumos"
|
||||
case "darwin":
|
||||
@@ -1118,7 +1120,7 @@
|
||||
name := filepath.Base(file)
|
||||
excluded := func(list []string, ok string) bool {
|
||||
for _, x := range list {
|
||||
- if x == ok || (ok == "android" && x == "linux") || (ok == "illumos" && x == "solaris") || (ok == "ios" && x == "darwin") {
|
||||
+ if x == ok || (ok == "android" && x == "linux") || (ok == "redox" && x == "linux") || (ok == "illumos" && x == "solaris") || (ok == "ios" && x == "darwin") {
|
||||
continue
|
||||
}
|
||||
i := strings.Index(name, x)
|
||||
@@ -1794,6 +1796,10 @@
|
||||
"android/amd64": true,
|
||||
"android/arm": true,
|
||||
"android/arm64": true,
|
||||
+ "redox/386": true,
|
||||
+ "redox/amd64": true,
|
||||
+ "redox/arm64": true,
|
||||
+ "redox/riscv64": true,
|
||||
"ios/arm64": true,
|
||||
"ios/amd64": true,
|
||||
"js/wasm": false,
|
||||
diff -ruwN source/src/cmd/go/go_test.go source-new/src/cmd/go/go_test.go
|
||||
--- source/src/cmd/go/go_test.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/cmd/go/go_test.go 2025-07-20 23:50:47.312425484 +0700
|
||||
@@ -2081,7 +2081,7 @@
|
||||
tg.run(args...)
|
||||
|
||||
switch runtime.GOOS {
|
||||
- case "linux", "android", "freebsd":
|
||||
+ case "linux", "android", "redox", "freebsd":
|
||||
f, err := elf.Open(obj)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
diff -ruwN source/src/cmd/go/internal/modindex/build.go source-new/src/cmd/go/internal/modindex/build.go
|
||||
--- source/src/cmd/go/internal/modindex/build.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/cmd/go/internal/modindex/build.go 2025-07-20 23:50:47.312425484 +0700
|
||||
@@ -873,6 +873,9 @@
|
||||
if ctxt.GOOS == "android" && name == "linux" {
|
||||
return true
|
||||
}
|
||||
+ if ctxt.GOOS == "redox" && name == "linux" {
|
||||
+ return true
|
||||
+ }
|
||||
if ctxt.GOOS == "illumos" && name == "solaris" {
|
||||
return true
|
||||
}
|
||||
diff -ruwN source/src/cmd/go/internal/work/exec.go source-new/src/cmd/go/internal/work/exec.go
|
||||
--- source/src/cmd/go/internal/work/exec.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/cmd/go/internal/work/exec.go 2025-07-20 23:50:47.312425484 +0700
|
||||
@@ -3056,7 +3056,7 @@
|
||||
dynobj := objdir + "_cgo_.o"
|
||||
|
||||
ldflags := cgoLDFLAGS
|
||||
- if (cfg.Goarch == "arm" && cfg.Goos == "linux") || cfg.Goos == "android" {
|
||||
+ if (cfg.Goarch == "arm" && cfg.Goos == "linux") || (cfg.Goarch == "arm" && cfg.Goos == "redox") || cfg.Goos == "android" {
|
||||
if !slices.Contains(ldflags, "-no-pie") {
|
||||
// we need to use -pie for Linux/ARM to get accurate imported sym (added in https://golang.org/cl/5989058)
|
||||
// this seems to be outdated, but we don't want to break existing builds depending on this (Issue 45940)
|
||||
diff -ruwN source/src/cmd/go/internal/work/init.go source-new/src/cmd/go/internal/work/init.go
|
||||
--- source/src/cmd/go/internal/work/init.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/cmd/go/internal/work/init.go 2025-07-20 23:50:47.312425484 +0700
|
||||
@@ -220,7 +220,7 @@
|
||||
codegenArg = "-fPIC"
|
||||
} else {
|
||||
switch cfg.Goos {
|
||||
- case "linux", "android", "freebsd":
|
||||
+ case "linux", "android", "redox", "freebsd":
|
||||
codegenArg = "-shared"
|
||||
case "windows":
|
||||
// Do not add usual .exe suffix to the .dll file.
|
||||
diff -ruwN source/src/cmd/go/testdata/script/cgo_suspect_flag_force_external.txt source-new/src/cmd/go/testdata/script/cgo_suspect_flag_force_external.txt
|
||||
--- source/src/cmd/go/testdata/script/cgo_suspect_flag_force_external.txt 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/cmd/go/testdata/script/cgo_suspect_flag_force_external.txt 2025-08-03 00:53:55.626580074 +0700
|
||||
@@ -39,7 +39,7 @@
|
||||
! stderr preferlinkext
|
||||
env CGO_CFLAGS=-flto
|
||||
go build -x -n -o dummy.exe ./noUseOfCgo
|
||||
-! stderr preferlinkext
|
||||
+! stderr preferlinkextg
|
||||
env CGO_CFLAGS=
|
||||
|
||||
# Second build uses CGO, so we expect to see the token present in the
|
||||
diff -ruwN source/src/cmd/internal/obj/x86/asm6.go source-new/src/cmd/internal/obj/x86/asm6.go
|
||||
--- source/src/cmd/internal/obj/x86/asm6.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/cmd/internal/obj/x86/asm6.go 2025-08-03 01:50:35.376496054 +0700
|
||||
@@ -28,6 +28,13 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
+// ------------------- HELP NEEDED FOR REDOX -------------------
|
||||
+// We need to write the definition for obj files in Redox!!!!!!!
|
||||
+// Yes, Redox is using ELF but that ELF is different with Linux
|
||||
+// As of current implemention, it emits Linux binaries instead
|
||||
+// Please continue your work in this file if you know how to do it
|
||||
+// -------------------------------------------------------------
|
||||
+
|
||||
package x86
|
||||
|
||||
import (
|
||||
diff -ruwN source/src/cmd/internal/objabi/head.go source-new/src/cmd/internal/objabi/head.go
|
||||
--- source/src/cmd/internal/objabi/head.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/cmd/internal/objabi/head.go 2025-07-20 23:50:47.312425484 +0700
|
||||
@@ -63,7 +63,7 @@
|
||||
*h = Hfreebsd
|
||||
case "js":
|
||||
*h = Hjs
|
||||
- case "linux", "android":
|
||||
+ case "linux", "android", "redox":
|
||||
*h = Hlinux
|
||||
case "netbsd":
|
||||
*h = Hnetbsd
|
||||
diff -ruwN source/src/cmd/link/internal/amd64/obj.go source-new/src/cmd/link/internal/amd64/obj.go
|
||||
--- source/src/cmd/link/internal/amd64/obj.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/cmd/link/internal/amd64/obj.go 2025-08-03 01:04:51.706561825 +0700
|
||||
@@ -64,6 +64,7 @@
|
||||
ELF: ld.ELFArch{
|
||||
Linuxdynld: "/lib64/ld-linux-x86-64.so.2",
|
||||
LinuxdynldMusl: "/lib/ld-musl-x86_64.so.1",
|
||||
+ Redoxdynld: "/usr/lib/ld64.so.1",
|
||||
Freebsddynld: "/libexec/ld-elf.so.1",
|
||||
Openbsddynld: "/usr/libexec/ld.so",
|
||||
Netbsddynld: "/libexec/ld.elf_so",
|
||||
diff -ruwN source/src/cmd/link/internal/arm64/obj.go source-new/src/cmd/link/internal/arm64/obj.go
|
||||
--- source/src/cmd/link/internal/arm64/obj.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/cmd/link/internal/arm64/obj.go 2025-08-03 01:03:56.606564078 +0700
|
||||
@@ -61,6 +61,7 @@
|
||||
|
||||
ELF: ld.ELFArch{
|
||||
Androiddynld: "/system/bin/linker64",
|
||||
+ Redoxdynld: "/usr/lib/ld64.so.1",
|
||||
Linuxdynld: "/lib/ld-linux-aarch64.so.1",
|
||||
LinuxdynldMusl: "/lib/ld-musl-aarch64.so.1",
|
||||
|
||||
diff -ruwN source/src/cmd/link/internal/ld/elf.go source-new/src/cmd/link/internal/ld/elf.go
|
||||
--- source/src/cmd/link/internal/ld/elf.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/cmd/link/internal/ld/elf.go 2025-08-03 01:13:08.346551565 +0700
|
||||
@@ -197,6 +197,7 @@
|
||||
type ELFArch struct {
|
||||
// TODO: Document these fields.
|
||||
|
||||
+ Redoxdynld string
|
||||
Androiddynld string
|
||||
Linuxdynld string
|
||||
LinuxdynldMusl string
|
||||
@@ -204,6 +205,7 @@
|
||||
Netbsddynld string
|
||||
Openbsddynld string
|
||||
Dragonflydynld string
|
||||
+ Redoxflydynld string
|
||||
Solarisdynld string
|
||||
|
||||
Reloc1 func(*Link, *OutBuf, *loader.Loader, loader.Sym, loader.ExtReloc, int, int64) bool
|
||||
@@ -1939,6 +1941,11 @@
|
||||
if interpreter == "" {
|
||||
Exitf("ELF interpreter not set")
|
||||
}
|
||||
+ } else if buildcfg.GOOS == "redox" {
|
||||
+ interpreter = thearch.ELF.Redoxdynld
|
||||
+ if interpreter == "" {
|
||||
+ Exitf("ELF interpreter not set")
|
||||
+ }
|
||||
} else {
|
||||
interpreter = thearch.ELF.Linuxdynld
|
||||
// If interpreter does not exist, try musl instead.
|
||||
diff -ruwN source/src/cmd/link/internal/riscv64/obj.go source-new/src/cmd/link/internal/riscv64/obj.go
|
||||
--- source/src/cmd/link/internal/riscv64/obj.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/cmd/link/internal/riscv64/obj.go 2025-08-03 01:05:35.886560535 +0700
|
||||
@@ -38,6 +38,7 @@
|
||||
Machoreloc1: machoreloc1,
|
||||
|
||||
ELF: ld.ELFArch{
|
||||
+ Redoxdynld: "/usr/lib/ld64.so.1",
|
||||
Linuxdynld: "/lib/ld.so.1",
|
||||
|
||||
Freebsddynld: "/usr/libexec/ld-elf.so.1",
|
||||
diff -ruwN source/src/cmd/link/internal/x86/obj.go source-new/src/cmd/link/internal/x86/obj.go
|
||||
--- source/src/cmd/link/internal/x86/obj.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/cmd/link/internal/x86/obj.go 2025-08-03 01:05:11.816561638 +0700
|
||||
@@ -59,6 +59,7 @@
|
||||
PEreloc1: pereloc1,
|
||||
|
||||
ELF: ld.ELFArch{
|
||||
+ Redoxdynld: "/usr/lib/ld.so.1",
|
||||
Linuxdynld: "/lib/ld-linux.so.2",
|
||||
LinuxdynldMusl: "/lib/ld-musl-i386.so.1",
|
||||
Freebsddynld: "/usr/libexec/ld-elf.so.1",
|
||||
diff -ruwN source/src/cmd/vendor/golang.org/x/telemetry/internal/telemetry/dir.go source-new/src/cmd/vendor/golang.org/x/telemetry/internal/telemetry/dir.go
|
||||
--- source/src/cmd/vendor/golang.org/x/telemetry/internal/telemetry/dir.go 2025-07-03 04:47:15.000000000 +0700
|
||||
`+++ source-new/src/cmd/vendor/golang.org/x/telemetry/internal/telemetry/dir.go 2025-07-20 23:50:47.312425484 +0700
|
||||
@@ -155,6 +155,7 @@
|
||||
runtime.GOOS == "openbsd" || // #60614
|
||||
runtime.GOOS == "solaris" || // #60968 #60970
|
||||
runtime.GOOS == "android" || // #60967
|
||||
+ runtime.GOOS == "redox" || // plz no
|
||||
runtime.GOOS == "illumos" || // #65544
|
||||
// These platforms fundamentally can't be supported:
|
||||
runtime.GOOS == "js" || // #60971
|
||||
diff -ruwN source/src/crypto/internal/sysrand/internal/seccomp/seccomp_linux.go source-new/src/crypto/internal/sysrand/internal/seccomp/seccomp_linux.go
|
||||
--- source/src/crypto/internal/sysrand/internal/seccomp/seccomp_linux.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/crypto/internal/sysrand/internal/seccomp/seccomp_linux.go 2025-08-02 17:13:31.518836103 +0700
|
||||
@@ -2,6 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
+//go:build !linux
|
||||
+
|
||||
package seccomp
|
||||
|
||||
/*
|
||||
diff -ruwN source/src/crypto/internal/sysrand/internal/seccomp/seccomp_unsupported.go source-new/src/crypto/internal/sysrand/internal/seccomp/seccomp_unsupported.go
|
||||
--- source/src/crypto/internal/sysrand/internal/seccomp/seccomp_unsupported.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/crypto/internal/sysrand/internal/seccomp/seccomp_unsupported.go 2025-08-02 17:13:37.268835776 +0700
|
||||
@@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
-//go:build !linux || !cgo
|
||||
+//go:build !linux || !cgo || redox
|
||||
|
||||
package seccomp
|
||||
|
||||
diff -ruwN source/src/go/build/build.go source-new/src/go/build/build.go
|
||||
--- source/src/go/build/build.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/go/build/build.go 2025-07-20 23:50:47.312425484 +0700
|
||||
@@ -1971,6 +1971,9 @@
|
||||
if ctxt.GOOS == "android" && name == "linux" {
|
||||
return true
|
||||
}
|
||||
+ if ctxt.GOOS == "redox" && name == "linux" {
|
||||
+ return true
|
||||
+ }
|
||||
if ctxt.GOOS == "illumos" && name == "solaris" {
|
||||
return true
|
||||
}
|
||||
diff -ruwN source/src/internal/goos/gengoos.go source-new/src/internal/goos/gengoos.go
|
||||
--- source/src/internal/goos/gengoos.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/internal/goos/gengoos.go 2025-07-20 23:50:47.312425484 +0700
|
||||
@@ -43,6 +43,7 @@
|
||||
var tags []string
|
||||
if target == "linux" {
|
||||
tags = append(tags, "!android") // must explicitly exclude android for linux
|
||||
+ tags = append(tags, "!redox") // must explicitly exclude redox for linux
|
||||
}
|
||||
if target == "solaris" {
|
||||
tags = append(tags, "!illumos") // must explicitly exclude illumos for solaris
|
||||
diff -ruwN source/src/internal/goos/zgoos_aix.go source-new/src/internal/goos/zgoos_aix.go
|
||||
--- source/src/internal/goos/zgoos_aix.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/internal/goos/zgoos_aix.go 2025-07-20 23:50:47.312425484 +0700
|
||||
@@ -20,6 +20,7 @@
|
||||
const IsNetbsd = 0
|
||||
const IsOpenbsd = 0
|
||||
const IsPlan9 = 0
|
||||
+const IsRedox = 0
|
||||
const IsSolaris = 0
|
||||
const IsWasip1 = 0
|
||||
const IsWindows = 0
|
||||
diff -ruwN source/src/internal/goos/zgoos_android.go source-new/src/internal/goos/zgoos_android.go
|
||||
--- source/src/internal/goos/zgoos_android.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/internal/goos/zgoos_android.go 2025-07-20 23:50:47.312425484 +0700
|
||||
@@ -20,6 +20,7 @@
|
||||
const IsNetbsd = 0
|
||||
const IsOpenbsd = 0
|
||||
const IsPlan9 = 0
|
||||
+const IsRedox = 0
|
||||
const IsSolaris = 0
|
||||
const IsWasip1 = 0
|
||||
const IsWindows = 0
|
||||
diff -ruwN source/src/internal/goos/zgoos_darwin.go source-new/src/internal/goos/zgoos_darwin.go
|
||||
--- source/src/internal/goos/zgoos_darwin.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/internal/goos/zgoos_darwin.go 2025-07-20 23:50:47.312425484 +0700
|
||||
@@ -20,6 +20,7 @@
|
||||
const IsNetbsd = 0
|
||||
const IsOpenbsd = 0
|
||||
const IsPlan9 = 0
|
||||
+const IsRedox = 0
|
||||
const IsSolaris = 0
|
||||
const IsWasip1 = 0
|
||||
const IsWindows = 0
|
||||
diff -ruwN source/src/internal/goos/zgoos_dragonfly.go source-new/src/internal/goos/zgoos_dragonfly.go
|
||||
--- source/src/internal/goos/zgoos_dragonfly.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/internal/goos/zgoos_dragonfly.go 2025-07-20 23:50:47.312425484 +0700
|
||||
@@ -20,6 +20,7 @@
|
||||
const IsNetbsd = 0
|
||||
const IsOpenbsd = 0
|
||||
const IsPlan9 = 0
|
||||
+const IsRedox = 0
|
||||
const IsSolaris = 0
|
||||
const IsWasip1 = 0
|
||||
const IsWindows = 0
|
||||
diff -ruwN source/src/internal/goos/zgoos_freebsd.go source-new/src/internal/goos/zgoos_freebsd.go
|
||||
--- source/src/internal/goos/zgoos_freebsd.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/internal/goos/zgoos_freebsd.go 2025-07-20 23:50:47.312425484 +0700
|
||||
@@ -20,6 +20,7 @@
|
||||
const IsNetbsd = 0
|
||||
const IsOpenbsd = 0
|
||||
const IsPlan9 = 0
|
||||
+const IsRedox = 0
|
||||
const IsSolaris = 0
|
||||
const IsWasip1 = 0
|
||||
const IsWindows = 0
|
||||
diff -ruwN source/src/internal/goos/zgoos_hurd.go source-new/src/internal/goos/zgoos_hurd.go
|
||||
--- source/src/internal/goos/zgoos_hurd.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/internal/goos/zgoos_hurd.go 2025-07-20 23:50:47.312425484 +0700
|
||||
@@ -20,6 +20,7 @@
|
||||
const IsNetbsd = 0
|
||||
const IsOpenbsd = 0
|
||||
const IsPlan9 = 0
|
||||
+const IsRedox = 0
|
||||
const IsSolaris = 0
|
||||
const IsWasip1 = 0
|
||||
const IsWindows = 0
|
||||
diff -ruwN source/src/internal/goos/zgoos_illumos.go source-new/src/internal/goos/zgoos_illumos.go
|
||||
--- source/src/internal/goos/zgoos_illumos.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/internal/goos/zgoos_illumos.go 2025-07-20 23:50:47.312425484 +0700
|
||||
@@ -20,6 +20,7 @@
|
||||
const IsNetbsd = 0
|
||||
const IsOpenbsd = 0
|
||||
const IsPlan9 = 0
|
||||
+const IsRedox = 0
|
||||
const IsSolaris = 0
|
||||
const IsWasip1 = 0
|
||||
const IsWindows = 0
|
||||
diff -ruwN source/src/internal/goos/zgoos_ios.go source-new/src/internal/goos/zgoos_ios.go
|
||||
--- source/src/internal/goos/zgoos_ios.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/internal/goos/zgoos_ios.go 2025-07-20 23:50:47.322425484 +0700
|
||||
@@ -20,6 +20,7 @@
|
||||
const IsNetbsd = 0
|
||||
const IsOpenbsd = 0
|
||||
const IsPlan9 = 0
|
||||
+const IsRedox = 0
|
||||
const IsSolaris = 0
|
||||
const IsWasip1 = 0
|
||||
const IsWindows = 0
|
||||
diff -ruwN source/src/internal/goos/zgoos_js.go source-new/src/internal/goos/zgoos_js.go
|
||||
--- source/src/internal/goos/zgoos_js.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/internal/goos/zgoos_js.go 2025-07-20 23:50:47.322425484 +0700
|
||||
@@ -20,6 +20,7 @@
|
||||
const IsNetbsd = 0
|
||||
const IsOpenbsd = 0
|
||||
const IsPlan9 = 0
|
||||
+const IsRedox = 0
|
||||
const IsSolaris = 0
|
||||
const IsWasip1 = 0
|
||||
const IsWindows = 0
|
||||
diff -ruwN source/src/internal/goos/zgoos_linux.go source-new/src/internal/goos/zgoos_linux.go
|
||||
--- source/src/internal/goos/zgoos_linux.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/internal/goos/zgoos_linux.go 2025-07-20 23:50:47.322425484 +0700
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by gengoos.go using 'go generate'. DO NOT EDIT.
|
||||
|
||||
-//go:build !android && linux
|
||||
+//go:build !android && !redox && linux
|
||||
|
||||
package goos
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
const IsNetbsd = 0
|
||||
const IsOpenbsd = 0
|
||||
const IsPlan9 = 0
|
||||
+const IsRedox = 0
|
||||
const IsSolaris = 0
|
||||
const IsWasip1 = 0
|
||||
const IsWindows = 0
|
||||
diff -ruwN source/src/internal/goos/zgoos_netbsd.go source-new/src/internal/goos/zgoos_netbsd.go
|
||||
--- source/src/internal/goos/zgoos_netbsd.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/internal/goos/zgoos_netbsd.go 2025-07-20 23:50:47.322425484 +0700
|
||||
@@ -20,6 +20,7 @@
|
||||
const IsNetbsd = 1
|
||||
const IsOpenbsd = 0
|
||||
const IsPlan9 = 0
|
||||
+const IsRedox = 0
|
||||
const IsSolaris = 0
|
||||
const IsWasip1 = 0
|
||||
const IsWindows = 0
|
||||
diff -ruwN source/src/internal/goos/zgoos_openbsd.go source-new/src/internal/goos/zgoos_openbsd.go
|
||||
--- source/src/internal/goos/zgoos_openbsd.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/internal/goos/zgoos_openbsd.go 2025-07-20 23:50:47.322425484 +0700
|
||||
@@ -20,6 +20,7 @@
|
||||
const IsNetbsd = 0
|
||||
const IsOpenbsd = 1
|
||||
const IsPlan9 = 0
|
||||
+const IsRedox = 0
|
||||
const IsSolaris = 0
|
||||
const IsWasip1 = 0
|
||||
const IsWindows = 0
|
||||
diff -ruwN source/src/internal/goos/zgoos_plan9.go source-new/src/internal/goos/zgoos_plan9.go
|
||||
--- source/src/internal/goos/zgoos_plan9.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/internal/goos/zgoos_plan9.go 2025-07-20 23:50:47.322425484 +0700
|
||||
@@ -20,6 +20,7 @@
|
||||
const IsNetbsd = 0
|
||||
const IsOpenbsd = 0
|
||||
const IsPlan9 = 1
|
||||
+const IsRedox = 0
|
||||
const IsSolaris = 0
|
||||
const IsWasip1 = 0
|
||||
const IsWindows = 0
|
||||
diff -ruwN source/src/internal/goos/zgoos_redox.go source-new/src/internal/goos/zgoos_redox.go
|
||||
--- source/src/internal/goos/zgoos_redox.go 1970-01-01 07:00:00.000000000 +0700
|
||||
+++ source-new/src/internal/goos/zgoos_redox.go 2025-07-20 23:50:47.322425484 +0700
|
||||
@@ -0,0 +1,27 @@
|
||||
+// Code generated by gengoos.go using 'go generate'. DO NOT EDIT.
|
||||
+
|
||||
+//go:build redox
|
||||
+
|
||||
+package goos
|
||||
+
|
||||
+const GOOS = `redox`
|
||||
+
|
||||
+const IsAix = 0
|
||||
+const IsAndroid = 0
|
||||
+const IsDarwin = 0
|
||||
+const IsDragonfly = 0
|
||||
+const IsFreebsd = 0
|
||||
+const IsHurd = 0
|
||||
+const IsIllumos = 0
|
||||
+const IsIos = 0
|
||||
+const IsJs = 0
|
||||
+const IsLinux = 0
|
||||
+const IsNacl = 0
|
||||
+const IsNetbsd = 0
|
||||
+const IsOpenbsd = 0
|
||||
+const IsPlan9 = 0
|
||||
+const IsRedox = 1
|
||||
+const IsSolaris = 0
|
||||
+const IsWasip1 = 0
|
||||
+const IsWindows = 0
|
||||
+const IsZos = 0
|
||||
diff -ruwN source/src/internal/goos/zgoos_solaris.go source-new/src/internal/goos/zgoos_solaris.go
|
||||
--- source/src/internal/goos/zgoos_solaris.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/internal/goos/zgoos_solaris.go 2025-07-20 23:50:47.322425484 +0700
|
||||
@@ -20,6 +20,7 @@
|
||||
const IsNetbsd = 0
|
||||
const IsOpenbsd = 0
|
||||
const IsPlan9 = 0
|
||||
+const IsRedox = 0
|
||||
const IsSolaris = 1
|
||||
const IsWasip1 = 0
|
||||
const IsWindows = 0
|
||||
diff -ruwN source/src/internal/goos/zgoos_wasip1.go source-new/src/internal/goos/zgoos_wasip1.go
|
||||
--- source/src/internal/goos/zgoos_wasip1.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/internal/goos/zgoos_wasip1.go 2025-07-20 23:50:47.322425484 +0700
|
||||
@@ -20,6 +20,7 @@
|
||||
const IsNetbsd = 0
|
||||
const IsOpenbsd = 0
|
||||
const IsPlan9 = 0
|
||||
+const IsRedox = 0
|
||||
const IsSolaris = 0
|
||||
const IsWasip1 = 1
|
||||
const IsWindows = 0
|
||||
diff -ruwN source/src/internal/goos/zgoos_windows.go source-new/src/internal/goos/zgoos_windows.go
|
||||
--- source/src/internal/goos/zgoos_windows.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/internal/goos/zgoos_windows.go 2025-07-20 23:50:47.322425484 +0700
|
||||
@@ -20,6 +20,7 @@
|
||||
const IsNetbsd = 0
|
||||
const IsOpenbsd = 0
|
||||
const IsPlan9 = 0
|
||||
+const IsRedox = 0
|
||||
const IsSolaris = 0
|
||||
const IsWasip1 = 0
|
||||
const IsWindows = 1
|
||||
diff -ruwN source/src/internal/goos/zgoos_zos.go source-new/src/internal/goos/zgoos_zos.go
|
||||
--- source/src/internal/goos/zgoos_zos.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/internal/goos/zgoos_zos.go 2025-07-20 23:50:47.322425484 +0700
|
||||
@@ -20,6 +20,7 @@
|
||||
const IsNetbsd = 0
|
||||
const IsOpenbsd = 0
|
||||
const IsPlan9 = 0
|
||||
+const IsRedox = 0
|
||||
const IsSolaris = 0
|
||||
const IsWasip1 = 0
|
||||
const IsWindows = 0
|
||||
diff -ruwN source/src/internal/platform/supported.go source-new/src/internal/platform/supported.go
|
||||
--- source/src/internal/platform/supported.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/internal/platform/supported.go 2025-08-02 18:27:27.688723910 +0700
|
||||
@@ -194,6 +194,7 @@
|
||||
"ios/amd64", "ios/arm64",
|
||||
"aix/ppc64",
|
||||
"openbsd/arm64",
|
||||
+ "redox/386","redox/amd64","redox/arm64",
|
||||
"windows/386", "windows/amd64", "windows/arm", "windows/arm64":
|
||||
return true
|
||||
}
|
||||
@@ -209,7 +210,7 @@
|
||||
case "plugin":
|
||||
switch platform {
|
||||
case "linux/amd64", "linux/arm", "linux/arm64", "linux/386", "linux/loong64", "linux/s390x", "linux/ppc64le",
|
||||
- "android/amd64", "android/386",
|
||||
+ "android/amd64", "android/386", "redox/amd64", "redox/386",
|
||||
"darwin/amd64", "darwin/arm64",
|
||||
"freebsd/amd64":
|
||||
return true
|
||||
@@ -226,6 +227,7 @@
|
||||
case "android/arm64",
|
||||
"darwin/amd64", "darwin/arm64",
|
||||
"linux/amd64", "linux/arm64", "linux/ppc64le",
|
||||
+ "redox/386","redox/amd64","redox/arm64",
|
||||
"windows/386", "windows/amd64", "windows/arm", "windows/arm64":
|
||||
return true
|
||||
}
|
||||
@@ -237,7 +239,7 @@
|
||||
// so force the caller to pass that in to centralize that choice.
|
||||
func DefaultPIE(goos, goarch string, isRace bool) bool {
|
||||
switch goos {
|
||||
- case "android", "ios":
|
||||
+ case "android", "ios", "redox":
|
||||
return true
|
||||
case "windows":
|
||||
if isRace {
|
||||
diff -ruwN source/src/internal/platform/zosarch.go source-new/src/internal/platform/zosarch.go
|
||||
--- source/src/internal/platform/zosarch.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/internal/platform/zosarch.go 2025-07-20 23:50:47.322425484 +0700
|
||||
@@ -13,6 +13,9 @@
|
||||
{"android", "amd64"},
|
||||
{"android", "arm"},
|
||||
{"android", "arm64"},
|
||||
+ {"redox", "386"},
|
||||
+ {"redox", "amd64"},
|
||||
+ {"redox", "arm64"},
|
||||
{"darwin", "amd64"},
|
||||
{"darwin", "arm64"},
|
||||
{"dragonfly", "amd64"},
|
||||
@@ -67,6 +70,9 @@
|
||||
{"android", "amd64"}: {CgoSupported: true},
|
||||
{"android", "arm"}: {CgoSupported: true},
|
||||
{"android", "arm64"}: {CgoSupported: true},
|
||||
+ {"redox", "386"}: {CgoSupported: true},
|
||||
+ {"redox", "amd64"}: {CgoSupported: true},
|
||||
+ {"redox", "arm64"}: {CgoSupported: true},
|
||||
{"darwin", "amd64"}: {CgoSupported: true, FirstClass: true},
|
||||
{"darwin", "arm64"}: {CgoSupported: true, FirstClass: true},
|
||||
{"dragonfly", "amd64"}: {CgoSupported: true},
|
||||
diff -ruwN source/src/internal/poll/sendfile_unix.go source-new/src/internal/poll/sendfile_unix.go
|
||||
--- source/src/internal/poll/sendfile_unix.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/internal/poll/sendfile_unix.go 2025-07-20 23:50:47.322425484 +0700
|
||||
@@ -28,7 +28,7 @@
|
||||
// has not modified the source or destination,
|
||||
// and the caller should perform the copy using a fallback implementation.
|
||||
func SendFile(dstFD *FD, src int, size int64) (n int64, err error, handled bool) {
|
||||
- if goos := runtime.GOOS; goos == "linux" || goos == "android" {
|
||||
+ if goos := runtime.GOOS; goos == "linux" || goos == "android" || goos == "redox" {
|
||||
// Linux's sendfile doesn't require any setup:
|
||||
// It sends from the current position of the source file and
|
||||
// updates the position of the source after sending.
|
||||
diff -ruwN source/src/internal/syslist/syslist.go source-new/src/internal/syslist/syslist.go
|
||||
--- source/src/internal/syslist/syslist.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/internal/syslist/syslist.go 2025-07-20 23:50:47.322425484 +0700
|
||||
@@ -29,6 +29,7 @@
|
||||
"netbsd": true,
|
||||
"openbsd": true,
|
||||
"plan9": true,
|
||||
+ "redox": true,
|
||||
"solaris": true,
|
||||
"wasip1": true,
|
||||
"windows": true,
|
||||
@@ -50,6 +51,7 @@
|
||||
"linux": true,
|
||||
"netbsd": true,
|
||||
"openbsd": true,
|
||||
+ "redox": true,
|
||||
"solaris": true,
|
||||
}
|
||||
|
||||
diff -ruwN source/src/net/cgo_stub.go source-new/src/net/cgo_stub.go
|
||||
--- source/src/net/cgo_stub.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/net/cgo_stub.go 2025-08-02 18:20:37.688742244 +0700
|
||||
@@ -9,7 +9,7 @@
|
||||
// (Darwin always provides the cgo functions, in cgo_unix_syscall.go)
|
||||
// - on wasip1, where cgo is never available
|
||||
|
||||
-//go:build (netgo && unix) || (unix && !cgo && !darwin) || js || wasip1
|
||||
+//go:build (netgo && unix) || (unix && !cgo && !darwin) || js || wasip1 || redox
|
||||
|
||||
package net
|
||||
|
||||
diff -ruwN source/src/net/cgo_unix.go source-new/src/net/cgo_unix.go
|
||||
--- source/src/net/cgo_unix.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/net/cgo_unix.go 2025-08-02 17:54:26.168771131 +0700
|
||||
@@ -7,7 +7,7 @@
|
||||
// Instead of C.foo it uses _C_foo, which is defined in either
|
||||
// cgo_unix_cgo.go or cgo_unix_syscall.go
|
||||
|
||||
-//go:build !netgo && ((cgo && unix) || darwin)
|
||||
+//go:build !netgo && ((cgo && unix) || darwin) && !redox
|
||||
|
||||
package net
|
||||
|
||||
diff -ruwN source/src/net/cgo_unix_cgo_res.go source-new/src/net/cgo_unix_cgo_res.go
|
||||
--- source/src/net/cgo_unix_cgo_res.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/net/cgo_unix_cgo_res.go 2025-08-02 23:37:48.006690697 +0700
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
// res_search, for cgo systems where that is thread-safe.
|
||||
|
||||
-//go:build cgo && !netgo && (linux || openbsd)
|
||||
+//go:build cgo && !netgo && (linux || openbsd) && !redox
|
||||
|
||||
package net
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include <arpa/nameser.h>
|
||||
#include <resolv.h>
|
||||
|
||||
-#cgo !android,!openbsd LDFLAGS: -lresolv
|
||||
+#cgo !android,!openbsd,!redox LDFLAGS: -lresolv
|
||||
*/
|
||||
import "C"
|
||||
|
||||
diff -ruwN source/src/net/cgo_unix_cgo_resn.go source-new/src/net/cgo_unix_cgo_resn.go
|
||||
--- source/src/net/cgo_unix_cgo_resn.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/net/cgo_unix_cgo_resn.go 2025-08-02 23:37:55.206690614 +0700
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
// res_nsearch, for cgo systems where that's available.
|
||||
|
||||
-//go:build cgo && !netgo && unix && !(darwin || linux || openbsd)
|
||||
+//go:build cgo && !netgo && unix && !(darwin || linux || openbsd || redox)
|
||||
|
||||
package net
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include <arpa/nameser.h>
|
||||
#include <resolv.h>
|
||||
|
||||
-#cgo !aix,!dragonfly,!freebsd LDFLAGS: -lresolv
|
||||
+#cgo !aix,!dragonfly,!freebsd,!redox LDFLAGS: -lresolv
|
||||
*/
|
||||
import "C"
|
||||
|
||||
diff -ruwN source/src/os/user/cgo_lookup_unix.go source-new/src/os/user/cgo_lookup_unix.go
|
||||
--- source/src/os/user/cgo_lookup_unix.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/os/user/cgo_lookup_unix.go 2025-08-02 17:15:57.178834645 +0700
|
||||
@@ -194,7 +194,7 @@
|
||||
// Because we can't use cgo in tests:
|
||||
func structPasswdForNegativeTest() _C_struct_passwd {
|
||||
sp := _C_struct_passwd{}
|
||||
- *_C_pw_uidp(&sp) = 1<<32 - 2
|
||||
- *_C_pw_gidp(&sp) = 1<<32 - 3
|
||||
+ *_C_pw_uidp(&sp) = 1<<31 - 2
|
||||
+ *_C_pw_gidp(&sp) = 1<<31 - 3
|
||||
return sp
|
||||
}
|
||||
diff -ruwN source/src/runtime/cgo/cgo.go source-new/src/runtime/cgo/cgo.go
|
||||
--- source/src/runtime/cgo/cgo.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/runtime/cgo/cgo.go 2025-07-20 23:50:47.322425484 +0700
|
||||
@@ -16,7 +16,8 @@
|
||||
#cgo dragonfly LDFLAGS: -lpthread
|
||||
#cgo freebsd LDFLAGS: -lpthread
|
||||
#cgo android LDFLAGS: -llog
|
||||
-#cgo !android,linux LDFLAGS: -lpthread
|
||||
+#cgo redox LDFLAGS: -llog
|
||||
+#cgo !android,!redox,linux LDFLAGS: -lpthread
|
||||
#cgo netbsd LDFLAGS: -lpthread
|
||||
#cgo openbsd LDFLAGS: -lpthread
|
||||
#cgo aix LDFLAGS: -Wl,-berok
|
||||
diff -ruwN source/src/runtime/pprof/pprof_rusage.go source-new/src/runtime/pprof/pprof_rusage.go
|
||||
--- source/src/runtime/pprof/pprof_rusage.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/runtime/pprof/pprof_rusage.go 2025-07-20 23:50:47.322425484 +0700
|
||||
@@ -17,7 +17,7 @@
|
||||
func addMaxRSS(w io.Writer) {
|
||||
var rssToBytes uintptr
|
||||
switch runtime.GOOS {
|
||||
- case "aix", "android", "dragonfly", "freebsd", "linux", "netbsd", "openbsd":
|
||||
+ case "aix", "android", "redox", "dragonfly", "freebsd", "linux", "netbsd", "openbsd":
|
||||
rssToBytes = 1024
|
||||
case "darwin", "ios":
|
||||
rssToBytes = 1
|
||||
diff -ruwN source/src/runtime/pprof/proto_test.go source-new/src/runtime/pprof/proto_test.go
|
||||
--- source/src/runtime/pprof/proto_test.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/runtime/pprof/proto_test.go 2025-07-20 23:50:47.322425484 +0700
|
||||
@@ -83,7 +83,7 @@
|
||||
// to use in test profiles.
|
||||
func testPCs(t *testing.T) (addr1, addr2 uint64, map1, map2 *profile.Mapping) {
|
||||
switch runtime.GOOS {
|
||||
- case "linux", "android", "netbsd":
|
||||
+ case "linux", "android", "redox", "netbsd":
|
||||
// Figure out two addresses from /proc/self/maps.
|
||||
mmap, err := os.ReadFile("/proc/self/maps")
|
||||
if err != nil {
|
||||
diff -ruwN source/src/runtime/race/internal/amd64v1/doc.go source-new/src/runtime/race/internal/amd64v1/doc.go
|
||||
--- source/src/runtime/race/internal/amd64v1/doc.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/runtime/race/internal/amd64v1/doc.go 2025-07-20 23:50:47.322425484 +0700
|
||||
@@ -5,6 +5,6 @@
|
||||
// This package holds the race detector .syso for
|
||||
// amd64 architectures with GOAMD64<v3.
|
||||
|
||||
-//go:build amd64 && ((linux && !amd64.v3) || darwin || freebsd || netbsd || openbsd || windows)
|
||||
+//go:build amd64 && ((linux && !amd64.v3) || redox || darwin || freebsd || netbsd || openbsd || windows)
|
||||
|
||||
package amd64v1
|
||||
diff -ruwN source/src/runtime/rt0_redox_386.s source-new/src/runtime/rt0_redox_386.s
|
||||
--- source/src/runtime/rt0_redox_386.s 1970-01-01 07:00:00.000000000 +0700
|
||||
+++ source-new/src/runtime/rt0_redox_386.s 2025-08-02 22:31:44.966787048 +0700
|
||||
@@ -0,0 +1,11 @@
|
||||
+// Copyright 2009 The Go Authors. All rights reserved.
|
||||
+// Use of this source code is governed by a BSD-style
|
||||
+// license that can be found in the LICENSE file.
|
||||
+
|
||||
+#include "textflag.h"
|
||||
+
|
||||
+TEXT _rt0_386_redox(SB),NOSPLIT,$-8
|
||||
+ JMP _rt0_386(SB)
|
||||
+
|
||||
+TEXT _rt0_386_redox_lib(SB),NOSPLIT,$0
|
||||
+ JMP _rt0_386_lib(SB)
|
||||
diff -ruwN source/src/runtime/rt0_redox_amd64.s source-new/src/runtime/rt0_redox_amd64.s
|
||||
--- source/src/runtime/rt0_redox_amd64.s 1970-01-01 07:00:00.000000000 +0700
|
||||
+++ source-new/src/runtime/rt0_redox_amd64.s 2025-08-02 22:30:35.106789542 +0700
|
||||
@@ -0,0 +1,11 @@
|
||||
+// Copyright 2009 The Go Authors. All rights reserved.
|
||||
+// Use of this source code is governed by a BSD-style
|
||||
+// license that can be found in the LICENSE file.
|
||||
+
|
||||
+#include "textflag.h"
|
||||
+
|
||||
+TEXT _rt0_amd64_redox(SB),NOSPLIT,$-8
|
||||
+ JMP _rt0_amd64(SB)
|
||||
+
|
||||
+TEXT _rt0_amd64_redox_lib(SB),NOSPLIT,$0
|
||||
+ JMP _rt0_amd64_lib(SB)
|
||||
diff -ruwN source/src/runtime/rt0_redox_arm64.s source-new/src/runtime/rt0_redox_arm64.s
|
||||
--- source/src/runtime/rt0_redox_arm64.s 1970-01-01 07:00:00.000000000 +0700
|
||||
+++ source-new/src/runtime/rt0_redox_arm64.s 2025-08-02 22:31:21.176788037 +0700
|
||||
@@ -0,0 +1,11 @@
|
||||
+// Copyright 2009 The Go Authors. All rights reserved.
|
||||
+// Use of this source code is governed by a BSD-style
|
||||
+// license that can be found in the LICENSE file.
|
||||
+
|
||||
+#include "textflag.h"
|
||||
+
|
||||
+TEXT _rt0_arm64_redox(SB),NOSPLIT,$-8
|
||||
+ JMP _rt0_arm64(SB)
|
||||
+
|
||||
+TEXT _rt0_arm64_redox_lib(SB),NOSPLIT,$0
|
||||
+ JMP _rt0_arm64_lib(SB)
|
||||
diff -ruwN source/src/runtime/signal_unix.go source-new/src/runtime/signal_unix.go
|
||||
--- source/src/runtime/signal_unix.go 2025-07-03 04:47:15.000000000 +0700
|
||||
+++ source-new/src/runtime/signal_unix.go 2025-07-20 23:50:47.322425484 +0700
|
||||
@@ -162,7 +162,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (GOOS == "linux" || GOOS == "android") && !iscgo && sig == sigPerThreadSyscall {
|
||||
+ if (GOOS == "linux" || GOOS == "android" || GOOS == "linux") && !iscgo && sig == sigPerThreadSyscall {
|
||||
// sigPerThreadSyscall is the same signal used by glibc for
|
||||
// per-thread syscalls on Linux. We use it for the same purpose
|
||||
// in non-cgo binaries.
|
||||
@@ -673,7 +673,7 @@
|
||||
return
|
||||
}
|
||||
|
||||
- if (GOOS == "linux" || GOOS == "android") && sig == sigPerThreadSyscall {
|
||||
+ if (GOOS == "linux" || GOOS == "android" || GOOS == "redox") && sig == sigPerThreadSyscall {
|
||||
// sigPerThreadSyscall is the same signal used by glibc for
|
||||
// per-thread syscalls on Linux. We use it for the same purpose
|
||||
// in non-cgo binaries. Since this signal is not _SigNotify,
|
||||
@ -1,9 +1,8 @@
|
||||
#TODO: Can build, but emits Linux binaries instead (read the asm6.go patches)
|
||||
#TODO: Can be built, but ends in breakpoint trap
|
||||
[source]
|
||||
tar = "https://go.dev/dl/go1.24.5.src.tar.gz"
|
||||
patches = [
|
||||
"01_redox.patch"
|
||||
]
|
||||
git = "https://github.com/willnode/go"
|
||||
branch = "go-1.25-redox"
|
||||
shallow_clone = true
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
@ -13,7 +12,7 @@ export PATH=$HOME/go/bin:$PATH
|
||||
rm -rf $HOME/.cache/go-build
|
||||
export GOPATH=${COOKBOOK_BUILD}/gopath
|
||||
if ! command -v go &> /dev/null; then
|
||||
GO_TARBALL=go1.24.5.linux-$( [ "$(uname -m)" = "aarch64" ] && echo "arm64" || echo "amd64" ).tar.gz
|
||||
GO_TARBALL=go1.24.6.linux-$( [ "$(uname -m)" = "aarch64" ] && echo "arm64" || echo "amd64" ).tar.gz
|
||||
GO_DOWNLOAD_URL="https://dl.google.com/go/${GO_TARBALL}"
|
||||
echo "Installing Go..."
|
||||
wget -q --show-progress "${GO_DOWNLOAD_URL}"
|
||||
@ -23,33 +22,19 @@ fi
|
||||
# Go does not support out-of-tree builds :(
|
||||
rsync -a --delete "${COOKBOOK_SOURCE}/" ./
|
||||
|
||||
export GOHOSTOS=redox
|
||||
export GOOS=redox
|
||||
case "${TARGET}" in
|
||||
x86-unknown-redox)
|
||||
export GOHOSTARCH=386
|
||||
;;
|
||||
x86_64-unknown-redox)
|
||||
export GOHOSTARCH=amd64
|
||||
;;
|
||||
aarch64-unknown-redox)
|
||||
export GOHOSTARCH=arm64
|
||||
;;
|
||||
riscv64-unknown-redox)
|
||||
# TODO: Patches for this ARCH is not complete
|
||||
export GOHOSTARCH=riscv64
|
||||
;;
|
||||
x86-unknown-redox) export GOARCH=386;;
|
||||
x86_64-unknown-redox) export GOARCH=amd64;;
|
||||
aarch64-unknown-redox) export GOARCH=arm64;;
|
||||
riscv64-unknown-redox) export GOARCH=riscv64;;
|
||||
esac
|
||||
|
||||
export GOOS=${GOHOSTOS}
|
||||
export GOARCH=${GOHOSTARCH}
|
||||
|
||||
export CGO_ENABLED=1
|
||||
export CC_FOR_redox_${GOHOSTARCH}="${CC}"
|
||||
export CXX_FOR_redox_${GOHOSTARCH}="${CXX}"
|
||||
# Don't poison the runtime tools (host -> host)
|
||||
unset AR AS CC CXX LD LDFLAGS NM OBJCOPY OBJDUMP RANLIB READELF STRIP
|
||||
(cd ./src && bash ./make.bash -v --no-banner)
|
||||
export CC=x86_64-unknown-redox-gcc
|
||||
export CCX=x86_64-unknown-redox-g++
|
||||
(cd ./src && bash ./make.bash)
|
||||
|
||||
mkdir -p ${COOKBOOK_STAGE}/bin
|
||||
rsync -a --delete "bin/redox_${GOHOSTARCH}/" ${COOKBOOK_STAGE}/bin
|
||||
rsync -a --delete "bin/redox_${GOARCH}/" ${COOKBOOK_STAGE}/bin
|
||||
"""
|
||||
|
||||
8
recipes/wip/dev/lang/tur/recipe.toml
Normal file
8
recipes/wip/dev/lang/tur/recipe.toml
Normal file
@ -0,0 +1,8 @@
|
||||
#TODO not compiled or tested
|
||||
[source]
|
||||
git = "https://github.com/rezigned/tur"
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
cookbook_cargo_packages tur-cli tur-tui
|
||||
"""
|
||||
8
recipes/wip/fuse/lis/recipe.toml
Normal file
8
recipes/wip/fuse/lis/recipe.toml
Normal file
@ -0,0 +1,8 @@
|
||||
#TODO not compiled or tested
|
||||
[source]
|
||||
git = "https://github.com/riffcc/lis"
|
||||
[build]
|
||||
template = "cargo"
|
||||
dependencies = [
|
||||
"libfuse3",
|
||||
]
|
||||
5
recipes/wip/image/converters/dipc/recipe.toml
Normal file
5
recipes/wip/image/converters/dipc/recipe.toml
Normal file
@ -0,0 +1,5 @@
|
||||
#TODO not compiled or tested
|
||||
[source]
|
||||
git = "https://github.com/doprz/dipc"
|
||||
[build]
|
||||
template = "cargo"
|
||||
@ -1,21 +0,0 @@
|
||||
GIT=https://gitlab.redox-os.org/redox-os/pastel.git
|
||||
GIT_UPSTREAM=https://github.com/robbycerantola/pastel.git
|
||||
BINDIR=/usr/bin
|
||||
DEPENDS="orbital"
|
||||
|
||||
function recipe_stage {
|
||||
mkdir "$1/ui"
|
||||
cp -rv res "$1/ui/pastel"
|
||||
mkdir "$1/ui/apps"
|
||||
cat > "$1/ui/apps/pastel" <<-EOF
|
||||
name=Pastel
|
||||
binary=/usr/bin/pastel
|
||||
icon=/ui/pastel/accessories-bitmap-editor.png
|
||||
accept=*.bmp
|
||||
accept=*.jpg
|
||||
accept=*.jpeg
|
||||
accept=*.png
|
||||
author=Robby Cerantola
|
||||
description=Bitmap Editor
|
||||
EOF
|
||||
}
|
||||
@ -43,9 +43,8 @@ dependencies = [
|
||||
template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
#TODO: why are libs not automatically detected?
|
||||
CFLAGS="${CFLAGS} -DM_SQRT2=1.41421356237309504880"
|
||||
cookbook_meson \
|
||||
-Dc_args="-DM_SQRT2=1.41421356237309504880 -lXext -lX11 -lxcb -lXau" \
|
||||
-Dintrospection=false \
|
||||
-Dwayland_backend=false
|
||||
"""
|
||||
|
||||
40
recipes/wip/libs/mozjs/recipe.toml
Normal file
40
recipes/wip/libs/mozjs/recipe.toml
Normal file
@ -0,0 +1,40 @@
|
||||
#TODO "No suitable wgpu::Adapter found" error on execution
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/njskalski/mozjs.git"
|
||||
branch = "redox_mods"
|
||||
[build]
|
||||
template = "custom"
|
||||
|
||||
#these dependencies are copied from Servo recipe. Some of them may be redundant, but I needed to reproduce the build bug.
|
||||
dependencies = [
|
||||
"freetype2",
|
||||
"gettext",
|
||||
"glib",
|
||||
"gstreamer",
|
||||
"harfbuzz",
|
||||
"libffi",
|
||||
"libiconv",
|
||||
"libx11",
|
||||
"libxcb",
|
||||
"libpng",
|
||||
"openssl1",
|
||||
"pcre",
|
||||
"zlib",
|
||||
|
||||
"x11proto",
|
||||
"x11proto-kb",
|
||||
"xcb-proto",
|
||||
"xextproto",
|
||||
"libxau",
|
||||
"libpthread-stubs",
|
||||
"fontconfig",
|
||||
"expat",
|
||||
"llvm18",
|
||||
"gcc13",
|
||||
]
|
||||
|
||||
script = """
|
||||
# Build the library crates
|
||||
"${COOKBOOK_REDOXER}" build --manifest-path "${COOKBOOK_SOURCE}/Cargo.toml" --workspace --release
|
||||
# Library crates don't need installation, they're used as dependencies
|
||||
"""
|
||||
15
recipes/wip/libs/other/aws-lc-rs/recipe.toml
Normal file
15
recipes/wip/libs/other/aws-lc-rs/recipe.toml
Normal file
@ -0,0 +1,15 @@
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/njskalski/aws-lc-rs.git"
|
||||
branch = "redox_mods"
|
||||
[build]
|
||||
template = "custom"
|
||||
|
||||
script = """
|
||||
# we need HOST != TARGET, because otherwise we get this error: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95189
|
||||
# by this line https://gitlab.redox-os.org/njskalski/aws-lc-rs/-/blob/main/aws-lc-sys/builder/cc_builder.rs#L493
|
||||
export HOST=x86_64-linux-gnu
|
||||
|
||||
rsync -a --delete "${COOKBOOK_SOURCE}/" ./
|
||||
cargo build -p aws-lc-sys --target ${TARGET} --release
|
||||
cargo build -p aws-lc-rs --target ${TARGET} --release
|
||||
"""
|
||||
28
recipes/wip/libs/other/freetype-sys/recipe.toml
Normal file
28
recipes/wip/libs/other/freetype-sys/recipe.toml
Normal file
@ -0,0 +1,28 @@
|
||||
[source]
|
||||
git = "https://github.com/PistonDevelopers/freetype-sys.git"
|
||||
[build]
|
||||
template = "custom"
|
||||
dependencies = [
|
||||
"freetype2",
|
||||
"zlib",
|
||||
"libpng"
|
||||
]
|
||||
|
||||
script = """
|
||||
# export PKG_CONFIG_PATH="${COOKBOOK_SYSROOT}/lib/pkgconfig"
|
||||
# #:${COOKBOOK_SYSROOT}/usr/lib/pkgconfig:${COOKBOOK_SYSROOT}/usr/share/pkgconfig"
|
||||
# export PKG_CONFIG_LIBDIR="${COOKBOOK_SYSROOT}/lib/pkgconfig"
|
||||
# #:${COOKBOOK_SYSROOT}/usr/lib/pkgconfig"
|
||||
# export PKG_CONFIG_SYSROOT_DIR="${COOKBOOK_SYSROOT}"
|
||||
|
||||
# # I'm tired trying figure out why multiple pkgconfig paths are ignored by cargo building stuff
|
||||
# # rsync -a -v ${COOKBOOK_SYSROOT}/usr/share/pkgconfig/*.pc ${COOKBOOK_SYSROOT}/lib/pkgconfig/
|
||||
# rsync -a -v ${COOKBOOK_SYSROOT}/usr/lib/pkgconfig/*.pc ${COOKBOOK_SYSROOT}/lib/pkgconfig/
|
||||
|
||||
# ls -al $PKG_CONFIG_PATH
|
||||
|
||||
# env
|
||||
|
||||
rsync -a --delete "${COOKBOOK_SOURCE}/" ./
|
||||
cargo build --release
|
||||
"""
|
||||
@ -1,21 +1,47 @@
|
||||
#TODO maybe incomplete script, see https://gitlab.freedesktop.org/poppler/poppler/-/blob/master/INSTALL?ref_type=heads
|
||||
#TODO needs encoding data - https://poppler.freedesktop.org/poppler-data-0.4.12.tar.gz
|
||||
[source]
|
||||
tar = "https://poppler.freedesktop.org/poppler-23.12.0.tar.xz"
|
||||
tar = "https://poppler.freedesktop.org/poppler-25.08.0.tar.xz"
|
||||
blake3 = "0732ef20594d084ae3c24cb75079a2be347df78acac80fdcbd6149b8dce197d4"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
autotools_recursive_regenerate
|
||||
"""
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
dependencies = [
|
||||
"cairo",
|
||||
"curl",
|
||||
"expat",
|
||||
"fontconfig",
|
||||
"freetype2",
|
||||
"gettext",
|
||||
"glib",
|
||||
"libffi",
|
||||
"libiconv",
|
||||
"libjpeg",
|
||||
"libpng",
|
||||
"libx11",
|
||||
"libxau",
|
||||
"libxcb",
|
||||
"nghttp2",
|
||||
"openssl1",
|
||||
"pcre2",
|
||||
"pixman",
|
||||
#TODO: compile dylib "libtiff",
|
||||
"zlib",
|
||||
]
|
||||
script = """
|
||||
COOKBOOK_CONFIGURE="cmake"
|
||||
COOKBOOK_CONFIGURE_FLAGS=(
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DCMAKE_CROSSCOMPILING=True
|
||||
-DCMAKE_EXE_LINKER_FLAGS="-static"
|
||||
-DCMAKE_INSTALL_PREFIX="/"
|
||||
-DCMAKE_PREFIX_PATH="${COOKBOOK_SYSROOT}"
|
||||
-DCMAKE_SYSTEM_NAME=Generic
|
||||
-DCMAKE_SYSTEM_PROCESSOR="$(echo "${TARGET}" | cut -d - -f1)"
|
||||
-DCMAKE_VERBOSE_MAKEFILE=On
|
||||
"${COOKBOOK_SOURCE}"
|
||||
)
|
||||
cookbook_configure
|
||||
DYNAMIC_INIT
|
||||
cookbook_cmake \
|
||||
-DCMAKE_C_FLAGS="-I${COOKBOOK_SYSROOT}/include" \
|
||||
-DCMAKE_CXX_FLAGS="-I${COOKBOOK_SYSROOT}/include" \
|
||||
-DENABLE_BOOST=OFF \
|
||||
-DENABLE_GPGME=OFF \
|
||||
-DENABLE_LCMS=OFF \
|
||||
-DENABLE_LIBOPENJPEG=none \
|
||||
-DENABLE_LIBTIFF=OFF \
|
||||
-DENABLE_QT5=OFF \
|
||||
-DENABLE_QT6=OFF \
|
||||
-DENABLE_NSS3=OFF
|
||||
"""
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
[source]
|
||||
tar = "http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2"
|
||||
script = """
|
||||
wget -O config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false"
|
||||
GNU_CONFIG_GET config.sub
|
||||
"""
|
||||
|
||||
[build]
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#TODO compilation error
|
||||
#TODO finish libtool setup
|
||||
[source]
|
||||
tar = "https://ftpmirror.gnu.org/libtool/libtool-2.4.6.tar.gz"
|
||||
tar = "https://ftpmirror.gnu.org/libtool/libtool-2.5.4.tar.gz"
|
||||
[build]
|
||||
template = "configure"
|
||||
|
||||
41
recipes/wip/libs/other/mozangle/recipe.toml
Normal file
41
recipes/wip/libs/other/mozangle/recipe.toml
Normal file
@ -0,0 +1,41 @@
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/njskalski/mozangle.git"
|
||||
branch = "redox_mods"
|
||||
[build]
|
||||
template = "custom"
|
||||
dependencies = [
|
||||
"freetype2",
|
||||
"gettext",
|
||||
"glib",
|
||||
"gstreamer",
|
||||
"harfbuzz",
|
||||
"libffi",
|
||||
"libiconv",
|
||||
"libx11",
|
||||
"libxcb",
|
||||
"libpng",
|
||||
"openssl1",
|
||||
"pcre",
|
||||
"zlib",
|
||||
|
||||
"x11proto",
|
||||
"x11proto-kb",
|
||||
"xcb-proto",
|
||||
"xextproto",
|
||||
"libxau",
|
||||
"libpthread-stubs",
|
||||
"fontconfig",
|
||||
"expat",
|
||||
"relibc",
|
||||
"gcc13",
|
||||
]
|
||||
|
||||
script = """
|
||||
export TARGET=${TARGET}
|
||||
export TARGET_CC=${TARGET}-gcc
|
||||
export TARGET_CXX=${TARGET}-g++
|
||||
export TARGET_AR=${TARGET}-ar
|
||||
|
||||
rsync -a --delete "${COOKBOOK_SOURCE}/" ./
|
||||
cargo build --release --target ${TARGET}
|
||||
"""
|
||||
12
recipes/wip/libs/tikv-jemallocator/recipe.toml
Normal file
12
recipes/wip/libs/tikv-jemallocator/recipe.toml
Normal file
@ -0,0 +1,12 @@
|
||||
#TODO "No suitable wgpu::Adapter found" error on execution
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/njskalski/jemallocator.git"
|
||||
branch = "redox_mods"
|
||||
[build]
|
||||
template = "custom"
|
||||
|
||||
script = """
|
||||
# Build the library crates
|
||||
"${COOKBOOK_REDOXER}" build --manifest-path "${COOKBOOK_SOURCE}/Cargo.toml" --workspace --release
|
||||
# Library crates don't need installation, they're used as dependencies
|
||||
"""
|
||||
8
recipes/wip/monitors/socktop/recipe.toml
Normal file
8
recipes/wip/monitors/socktop/recipe.toml
Normal file
@ -0,0 +1,8 @@
|
||||
#TODO not compiled or tested
|
||||
[source]
|
||||
git = "https://github.com/jasonwitty/socktop"
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
cookbook_cargo_packages socktop socktop_agent
|
||||
"""
|
||||
5
recipes/wip/net/analysis/angryether-rs/recipe.toml
Normal file
5
recipes/wip/net/analysis/angryether-rs/recipe.toml
Normal file
@ -0,0 +1,5 @@
|
||||
#TODO not compiled or tested
|
||||
[source]
|
||||
git = "https://github.com/pg3uk/AngryEtherRust"
|
||||
[build]
|
||||
template = "cargo"
|
||||
@ -2,10 +2,8 @@
|
||||
[source]
|
||||
git = "https://github.com/Siriusmart/youtube-tui"
|
||||
[build]
|
||||
template = "custom"
|
||||
template = "cargo"
|
||||
cargoflags = "--no-default-features"
|
||||
dependencies = [
|
||||
"openssl1",
|
||||
]
|
||||
script = """
|
||||
cookbook_cargo --no-default-features
|
||||
"""
|
||||
|
||||
12
recipes/wip/net/http/miniserve/recipe.toml
Normal file
12
recipes/wip/net/http/miniserve/recipe.toml
Normal file
@ -0,0 +1,12 @@
|
||||
#TODO missing libc:: socket-related imports
|
||||
|
||||
[source]
|
||||
git = "https://github.com/svenstaro/miniserve"
|
||||
|
||||
[build]
|
||||
dependencies = [
|
||||
"openssl1",
|
||||
"zlib"
|
||||
]
|
||||
template = "cargo"
|
||||
|
||||
8
recipes/wip/net/lan/malai/recipe.toml
Normal file
8
recipes/wip/net/lan/malai/recipe.toml
Normal file
@ -0,0 +1,8 @@
|
||||
#TODO not compiled or tested
|
||||
[source]
|
||||
git = "https://github.com/fastn-stack/kulfi"
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
cookbook_cargo_packages malai
|
||||
"""
|
||||
5
recipes/wip/net/p2p/dumbpipe/recipe.toml
Normal file
5
recipes/wip/net/p2p/dumbpipe/recipe.toml
Normal file
@ -0,0 +1,5 @@
|
||||
#TODO not compiled or tested
|
||||
[source]
|
||||
git = "https://github.com/n0-computer/dumbpipe"
|
||||
[build]
|
||||
template = "cargo"
|
||||
5
recipes/wip/net/remote/bayesian-ssh/recipe.toml
Normal file
5
recipes/wip/net/remote/bayesian-ssh/recipe.toml
Normal file
@ -0,0 +1,5 @@
|
||||
#TODO not compiled or tested
|
||||
[source]
|
||||
git = "https://github.com/abdoufermat5/bayesian-ssh"
|
||||
[build]
|
||||
template = "cargo"
|
||||
5
recipes/wip/net/remote/do-ssh/recipe.toml
Normal file
5
recipes/wip/net/remote/do-ssh/recipe.toml
Normal file
@ -0,0 +1,5 @@
|
||||
#TODO not compiled or tested
|
||||
[source]
|
||||
git = "https://github.com/doEggi/do-ssh"
|
||||
[build]
|
||||
template = "cargo"
|
||||
5
recipes/wip/net/remote/iroh-ssh/recipe.toml
Normal file
5
recipes/wip/net/remote/iroh-ssh/recipe.toml
Normal file
@ -0,0 +1,5 @@
|
||||
#TODO not compiled or tested
|
||||
[source]
|
||||
git = "https://github.com/rustonbsd/iroh-ssh"
|
||||
[build]
|
||||
template = "cargo"
|
||||
5
recipes/wip/net/remote/zeco/recipe.toml
Normal file
5
recipes/wip/net/remote/zeco/recipe.toml
Normal file
@ -0,0 +1,5 @@
|
||||
#TODO not compiled or tested
|
||||
[source]
|
||||
git = "https://github.com/julianbuettner/zeco"
|
||||
[build]
|
||||
template = "cargo"
|
||||
5
recipes/wip/net/server/feox-server/recipe.toml
Normal file
5
recipes/wip/net/server/feox-server/recipe.toml
Normal file
@ -0,0 +1,5 @@
|
||||
#TODO not compiled or tested
|
||||
[source]
|
||||
git = "https://github.com/mehrantsi/feox-server"
|
||||
[build]
|
||||
template = "cargo"
|
||||
5
recipes/wip/net/server/vproxy/recipe.toml
Normal file
5
recipes/wip/net/server/vproxy/recipe.toml
Normal file
@ -0,0 +1,5 @@
|
||||
#TODO not compiled or tested
|
||||
[source]
|
||||
git = "https://github.com/0x676e67/vproxy"
|
||||
[build]
|
||||
template = "cargo"
|
||||
5
recipes/wip/net/sharing/sendme/recipe.toml
Normal file
5
recipes/wip/net/sharing/sendme/recipe.toml
Normal file
@ -0,0 +1,5 @@
|
||||
#TODO not compiled or tested
|
||||
[source]
|
||||
git = "https://github.com/n0-computer/sendme"
|
||||
[build]
|
||||
template = "cargo"
|
||||
5
recipes/wip/office/doxx/recipe.toml
Normal file
5
recipes/wip/office/doxx/recipe.toml
Normal file
@ -0,0 +1,5 @@
|
||||
#TODO not compiled or tested
|
||||
[source]
|
||||
git = "https://github.com/bgreenwell/doxx"
|
||||
[build]
|
||||
template = "cargo"
|
||||
5
recipes/wip/security/safecloset/recipe.toml
Normal file
5
recipes/wip/security/safecloset/recipe.toml
Normal file
@ -0,0 +1,5 @@
|
||||
#TODO not compiled or tested
|
||||
[source]
|
||||
git = "https://github.com/Canop/safecloset"
|
||||
[build]
|
||||
template = "cargo"
|
||||
54
recipes/wip/shells/zsh/01_redox.patch
Normal file
54
recipes/wip/shells/zsh/01_redox.patch
Normal file
@ -0,0 +1,54 @@
|
||||
diff --color -ruwN source/configure.ac source-new/configure.ac
|
||||
--- source/configure.ac 2022-05-15 01:59:21.000000000 +0700
|
||||
+++ source-new/configure.ac 2025-08-06 02:08:48.797381523 +0700
|
||||
@@ -1311,7 +1311,7 @@
|
||||
setuid seteuid setreuid setresuid setsid \
|
||||
setgid setegid setregid setresgid \
|
||||
memcpy memmove strstr strerror strtoul \
|
||||
- getrlimit getrusage \
|
||||
+ getrusage \
|
||||
setlocale \
|
||||
isblank iswblank \
|
||||
uname \
|
||||
diff --color -ruwN source/Src/builtin.c source-new/Src/builtin.c
|
||||
--- source/Src/builtin.c 2022-05-15 01:59:21.000000000 +0700
|
||||
+++ source-new/Src/builtin.c 2025-08-06 02:41:57.266846385 +0700
|
||||
@@ -7160,16 +7160,7 @@
|
||||
long clktck = get_clktck();
|
||||
|
||||
/* get time accounting information */
|
||||
- if (times(&buf) == -1)
|
||||
- return 1;
|
||||
- pttime(buf.tms_utime); /* user time */
|
||||
- putchar(' ');
|
||||
- pttime(buf.tms_stime); /* system time */
|
||||
- putchar('\n');
|
||||
- pttime(buf.tms_cutime); /* user time, children */
|
||||
- putchar(' ');
|
||||
- pttime(buf.tms_cstime); /* system time, children */
|
||||
- putchar('\n');
|
||||
+ // Somehow times() is not linking correctly
|
||||
return 0;
|
||||
}
|
||||
|
||||
diff --color -ruwN source/Src/Builtins/rlimits.c source-new/Src/Builtins/rlimits.c
|
||||
--- source/Src/Builtins/rlimits.c 2022-05-15 01:59:21.000000000 +0700
|
||||
+++ source-new/Src/Builtins/rlimits.c 2025-08-06 02:24:09.457135439 +0700
|
||||
@@ -892,7 +892,7 @@
|
||||
int
|
||||
boot_(UNUSED(Module m))
|
||||
{
|
||||
- set_resinfo();
|
||||
+// set_resinfo();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -900,7 +900,7 @@
|
||||
int
|
||||
cleanup_(Module m)
|
||||
{
|
||||
- free_resinfo();
|
||||
+// free_resinfo();
|
||||
return setfeatureenables(m, &module_features, NULL);
|
||||
}
|
||||
|
||||
24
recipes/wip/shells/zsh/recipe.toml
Normal file
24
recipes/wip/shells/zsh/recipe.toml
Normal file
@ -0,0 +1,24 @@
|
||||
#TODO: Buggy, can't return after running commands
|
||||
[source]
|
||||
tar = "https://github.com/zsh-users/zsh/archive/refs/tags/zsh-5.9.tar.gz"
|
||||
blake3 = "a15b94fae03e87aba6fc6a27df3c98e610b85b0c7c0fc90248f07fdcb8816860"
|
||||
patches = [
|
||||
"01_redox.patch"
|
||||
]
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
autotools_recursive_regenerate
|
||||
"""
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
dependencies = [
|
||||
"ncursesw",
|
||||
]
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
|
||||
"${COOKBOOK_CONFIGURE}" "${COOKBOOK_CONFIGURE_FLAGS[@]}"
|
||||
"${COOKBOOK_MAKE}" -j "${COOKBOOK_MAKE_JOBS}"
|
||||
"${COOKBOOK_MAKE}" install.bin install.modules install.fns DESTDIR="${COOKBOOK_STAGE}"
|
||||
"""
|
||||
5
recipes/wip/sound/jukebox-cli/recipe.toml
Normal file
5
recipes/wip/sound/jukebox-cli/recipe.toml
Normal file
@ -0,0 +1,5 @@
|
||||
#TODO not compiled or tested
|
||||
[source]
|
||||
git = "https://github.com/FedeCarollo/jukebox-cli"
|
||||
[build]
|
||||
template = "cargo"
|
||||
@ -1,13 +1,42 @@
|
||||
#TODO update the patch to match the current version
|
||||
#TODO does the patch is still needed?
|
||||
#TODO lack of resolv.h, expect dns not working
|
||||
#TODO lack of utmpx.h, expect no way to track login in sshd
|
||||
#TODO lack of an equivalent to shadow.h, expect sshd password not working
|
||||
#TODO lack of openssl support, use only ssh-keygen from redox
|
||||
[source]
|
||||
tar = "https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.8p1.tar.gz"
|
||||
patches = [
|
||||
"redox.patch",
|
||||
]
|
||||
[build]
|
||||
template = "configure"
|
||||
template = "custom"
|
||||
dependencies = [
|
||||
"openssl1",
|
||||
"zlib",
|
||||
]
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
COOKBOOK_CONFIGURE_FLAGS+=(
|
||||
--disable-strip
|
||||
# requires openssl 1.1.1, result in libcrypto error otherwise
|
||||
--without-openssl
|
||||
--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: Very insecure! but there's no postscript yet
|
||||
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}"
|
||||
# hardcoded to 0.0.0.0 in patches
|
||||
sed -i "s/#ListenAddress 0.0.0.0/ListenAddress 0.0.0.0/g" "${CONFIG_FILE}"
|
||||
# will never work
|
||||
sed -i "s/#PasswordAuthentication yes/PasswordAuthentication no/g" "${CONFIG_FILE}"
|
||||
"""
|
||||
|
||||
@ -1,138 +1,699 @@
|
||||
diff -ruwN source/channels.c source-new/channels.c
|
||||
--- source/channels.c 2018-10-16 18:01:20.000000000 -0600
|
||||
+++ source-new/channels.c 2019-01-15 21:01:12.203686148 -0700
|
||||
@@ -1865,10 +1865,10 @@
|
||||
fatal(":%s: channel %d: no remote id", __func__, c->self);
|
||||
/* for rdynamic the OPEN_CONFIRMATION has been sent already */
|
||||
isopen = (c->type == SSH_CHANNEL_RDYNAMIC_FINISH);
|
||||
- if (getsockopt(c->sock, SOL_SOCKET, SO_ERROR, &err, &sz) < 0) {
|
||||
- err = errno;
|
||||
- error("getsockopt SO_ERROR failed");
|
||||
- }
|
||||
+ // if (getsockopt(c->sock, SOL_SOCKET, SO_ERROR, &err, &sz) < 0) {
|
||||
+ // err = errno;
|
||||
+ // error("getsockopt SO_ERROR failed");
|
||||
+ // }
|
||||
if (err == 0) {
|
||||
debug("channel %d: connected to %s port %d",
|
||||
c->self, c->connect_ctx.host, c->connect_ctx.port);
|
||||
diff -ruwN source/config.sub source-new/config.sub
|
||||
--- source/config.sub 2018-10-16 18:01:20.000000000 -0600
|
||||
+++ source-new/config.sub 2019-01-15 19:39:26.234492329 -0700
|
||||
@@ -1407,7 +1407,7 @@
|
||||
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
|
||||
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
|
||||
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
|
||||
- | -onefs* | -tirtos* | -phoenix*)
|
||||
+ | -onefs* | -tirtos* | -phoenix* | -redox*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-qnx*)
|
||||
diff -ruwN source/openbsd-compat/bindresvport.c source-new/openbsd-compat/bindresvport.c
|
||||
--- source/openbsd-compat/bindresvport.c 2018-10-16 18:01:20.000000000 -0600
|
||||
+++ source-new/openbsd-compat/bindresvport.c 2019-01-15 20:46:06.879804135 -0700
|
||||
@@ -42,6 +42,10 @@
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
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-09-07 01:35:40.209700338 +0700
|
||||
@@ -52,6 +52,18 @@
|
||||
#define IPPORT_RESERVED 0
|
||||
#endif
|
||||
|
||||
+#ifndef IPPORT_RESERVED
|
||||
+#define IPPORT_RESERVED 1024
|
||||
+#endif
|
||||
+
|
||||
#define STARTPORT 600
|
||||
#define ENDPORT (IPPORT_RESERVED - 1)
|
||||
#define NPORTS (ENDPORT - STARTPORT + 1)
|
||||
diff -ruwN source/openbsd-compat/bsd-getpeereid.c source-new/openbsd-compat/bsd-getpeereid.c
|
||||
--- source/openbsd-compat/bsd-getpeereid.c 2018-10-16 18:01:20.000000000 -0600
|
||||
+++ source-new/openbsd-compat/bsd-getpeereid.c 2019-01-15 20:43:12.410583244 -0700
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
-#if defined(SO_PEERCRED)
|
||||
+#if defined(SO_PEERCRED) && !defined(__redox__)
|
||||
int
|
||||
getpeereid(int s, uid_t *euid, gid_t *gid)
|
||||
{
|
||||
diff -ruwN source/openbsd-compat/bsd-misc.c source-new/openbsd-compat/bsd-misc.c
|
||||
--- source/openbsd-compat/bsd-misc.c 2018-10-16 18:01:20.000000000 -0600
|
||||
+++ source-new/openbsd-compat/bsd-misc.c 2019-01-15 20:28:46.619332501 -0700
|
||||
@@ -25,6 +25,9 @@
|
||||
# include <sys/time.h>
|
||||
+#ifndef IN_LOOPBACKNET
|
||||
+#define IN_LOOPBACKNET 127
|
||||
+#endif
|
||||
+
|
||||
+#ifndef MAXDNAME
|
||||
+#define MAXDNAME 256
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
* Definitions for IP type of service (ip_tos)
|
||||
*/
|
||||
@@ -454,19 +466,21 @@
|
||||
# define _PATH_DEVNULL "/dev/null"
|
||||
#endif
|
||||
|
||||
+#if defined(__redox__)
|
||||
+#include <fcntl.h>
|
||||
-/* user may have set a different path */
|
||||
-#if defined(_PATH_MAILDIR) && defined(MAIL_DIRECTORY)
|
||||
-# undef _PATH_MAILDIR
|
||||
-#endif /* defined(_PATH_MAILDIR) && defined(MAIL_DIRECTORY) */
|
||||
-
|
||||
-#ifdef MAIL_DIRECTORY
|
||||
-# define _PATH_MAILDIR MAIL_DIRECTORY
|
||||
+#ifndef _PATH_MAILDIR
|
||||
+# define _PATH_MAILDIR "/var/mail"
|
||||
#endif
|
||||
|
||||
#ifndef _PATH_NOLOGIN
|
||||
# define _PATH_NOLOGIN "/etc/nologin"
|
||||
#endif
|
||||
|
||||
+#ifndef ST_RDONLY
|
||||
+#define ST_RDONLY 1
|
||||
+#endif
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
+#ifndef ST_NOSUID
|
||||
+#define ST_NOSUID 2
|
||||
+#endif
|
||||
+
|
||||
/* Define this to be the path of the xauth program. */
|
||||
#ifdef XAUTH_PATH
|
||||
#define _PATH_XAUTH XAUTH_PATH
|
||||
diff -ruwN source/hostfile.c source-new/hostfile.c
|
||||
--- source/hostfile.c 2024-07-01 11:36:28.000000000 +0700
|
||||
+++ source-new/hostfile.c 2025-09-06 21:09:36.555438339 +0700
|
||||
@@ -44,7 +44,9 @@
|
||||
#include <netinet/in.h>
|
||||
|
||||
#include <errno.h>
|
||||
+#ifndef __redox__
|
||||
#include <resolv.h>
|
||||
+#endif
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#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-09-06 21:09:36.556438304 +0700
|
||||
@@ -1033,7 +1033,7 @@
|
||||
return (0);
|
||||
}
|
||||
# else
|
||||
- if (!utmpx_write_direct(li, &ut)) {
|
||||
+ if (!utmpx_write_direct(li, &utx)) {
|
||||
logit("%s: utmp_write_direct() failed", __func__);
|
||||
return (0);
|
||||
}
|
||||
diff -ruwN source/loginrec.h source-new/loginrec.h
|
||||
--- source/loginrec.h 2024-07-01 11:36:28.000000000 +0700
|
||||
+++ source-new/loginrec.h 2025-09-06 21:09:36.556438304 +0700
|
||||
@@ -30,6 +30,7 @@
|
||||
**/
|
||||
|
||||
#include "includes.h"
|
||||
+#include "openbsd-compat/utmpx.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-09-06 21:09:36.556438304 +0700
|
||||
@@ -37,13 +37,6 @@
|
||||
typedef unsigned long fsfilcnt_t;
|
||||
#endif
|
||||
|
||||
-#ifndef ST_RDONLY
|
||||
-#define ST_RDONLY 1
|
||||
-#endif
|
||||
-#ifndef ST_NOSUID
|
||||
-#define ST_NOSUID 2
|
||||
-#endif
|
||||
-
|
||||
/* as defined in IEEE Std 1003.1, 2004 Edition */
|
||||
struct statvfs {
|
||||
unsigned long f_bsize; /* File system block size. */
|
||||
diff -ruwN source/openbsd-compat/getrrsetbyname.c source-new/openbsd-compat/getrrsetbyname.c
|
||||
--- source/openbsd-compat/getrrsetbyname.c 2018-10-16 18:01:20.000000000 -0600
|
||||
+++ source-new/openbsd-compat/getrrsetbyname.c 2019-01-15 20:57:20.248721738 -0700
|
||||
@@ -47,7 +47,7 @@
|
||||
--- source/openbsd-compat/getrrsetbyname.c 2024-07-01 11:36:28.000000000 +0700
|
||||
+++ source-new/openbsd-compat/getrrsetbyname.c 2025-09-06 21:09:36.556438304 +0700
|
||||
@@ -67,6 +67,52 @@
|
||||
#endif
|
||||
#define _THREAD_PRIVATE(a,b,c) (c)
|
||||
|
||||
#include "includes.h"
|
||||
+#ifdef __redox__
|
||||
+
|
||||
+#include <sys/types.h>
|
||||
+#include <stdint.h>
|
||||
+
|
||||
+/*
|
||||
+ * Minimalist replacement for <resolv.h> for systems that lack it,
|
||||
+ * such as Redox OS. This provides the basic structures needed by
|
||||
+ * the OpenSSH compatibility layer.
|
||||
+ */
|
||||
+
|
||||
+// Define necessary constants
|
||||
+#define MAXNS 3 /* max # name servers we'll track */
|
||||
+#define MAXDNSRCH 6 /* max # domains in search path */
|
||||
+#define MAXRESOLVSORT 10 /* number of nets to sort on */
|
||||
+#define MAXDNAME 256 /* max length of a domain name */
|
||||
+
|
||||
+/*
|
||||
+ * A simplified, portable version of the resolver state structure.
|
||||
+ * Glibc-specific fields, hooks, and complex unions have been removed.
|
||||
+ */
|
||||
+struct __res_state {
|
||||
+ int retrans; /* retransmission time interval */
|
||||
+ int retry; /* number of times to retransmit */
|
||||
+ unsigned long options; /* option flags */
|
||||
+ int nscount; /* number of name servers */
|
||||
+ struct sockaddr_in nsaddr_list[MAXNS]; /* address of name servers */
|
||||
+ unsigned short id; /* current message id */
|
||||
+ char *dnsrch[MAXDNSRCH + 1]; /* components of domain to search */
|
||||
+ char defdname[MAXDNAME]; /* default domain name */
|
||||
+
|
||||
+ struct {
|
||||
+ struct in_addr addr;
|
||||
+ uint32_t mask;
|
||||
+ } sort_list[MAXRESOLVSORT];
|
||||
+
|
||||
+ int res_h_errno; /* last error code for this context */
|
||||
+
|
||||
+ // Simplified bitfields, removing glibc internals
|
||||
+ unsigned ndots : 4; /* threshold for initial abs. query */
|
||||
+ unsigned nsort : 4; /* number of elements in sort_list[] */
|
||||
+};
|
||||
+
|
||||
+typedef struct __res_state *res_state;
|
||||
+#endif /* __redox */
|
||||
+
|
||||
#ifndef HAVE__RES_EXTERN
|
||||
struct __res_state _res;
|
||||
#endif
|
||||
@@ -167,6 +213,24 @@
|
||||
struct dns_rr *next;
|
||||
};
|
||||
|
||||
-#if !defined (HAVE_GETRRSETBYNAME) && !defined (HAVE_LDNS)
|
||||
+#if !defined (HAVE_GETRRSETBYNAME) && !defined (HAVE_LDNS) && !defined(__redox__)
|
||||
+#ifdef __redox__
|
||||
+typedef struct {
|
||||
+ uint16_t id;
|
||||
+ uint8_t rd : 1;
|
||||
+ uint8_t tc : 1;
|
||||
+ uint8_t aa : 1;
|
||||
+ uint8_t opcode : 4;
|
||||
+ uint8_t qr : 1;
|
||||
+ uint8_t rcode : 4;
|
||||
+ uint8_t z : 3;
|
||||
+ uint8_t ra : 1;
|
||||
+ uint16_t qdcount;
|
||||
+ uint16_t ancount;
|
||||
+ uint16_t nscount;
|
||||
+ uint16_t arcount;
|
||||
+} HEADER;
|
||||
+#endif
|
||||
+
|
||||
struct dns_response {
|
||||
HEADER header;
|
||||
struct dns_query *query;
|
||||
@@ -221,10 +285,10 @@
|
||||
}
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
/* initialize resolver */
|
||||
- if ((_resp->options & RES_INIT) == 0 && res_init() == -1) {
|
||||
+ // if (res_init() == -1) {
|
||||
result = ERRSET_FAIL;
|
||||
goto fail;
|
||||
- }
|
||||
+ // }
|
||||
|
||||
#ifdef DEBUG
|
||||
_resp->options |= RES_DEBUG;
|
||||
@@ -482,12 +546,12 @@
|
||||
prev->next = curr;
|
||||
|
||||
/* name */
|
||||
- length = dn_expand(answer, answer + size, *cp, name,
|
||||
- sizeof(name));
|
||||
- if (length < 0) {
|
||||
+ // length = dn_expand(answer, answer + size, *cp, name,
|
||||
+ // sizeof(name));
|
||||
+ // if (length < 0) {
|
||||
free_dns_query(head);
|
||||
return (NULL);
|
||||
- }
|
||||
+ // }
|
||||
curr->name = strdup(name);
|
||||
if (curr->name == NULL) {
|
||||
free_dns_query(head);
|
||||
@@ -542,12 +606,12 @@
|
||||
prev->next = curr;
|
||||
|
||||
/* name */
|
||||
- length = dn_expand(answer, answer + size, *cp, name,
|
||||
- sizeof(name));
|
||||
- if (length < 0) {
|
||||
+ // length = dn_expand(answer, answer + size, *cp, name,
|
||||
+ // sizeof(name));
|
||||
+ // if (length < 0) {
|
||||
free_dns_rr(head);
|
||||
return (NULL);
|
||||
- }
|
||||
+ // }
|
||||
curr->name = strdup(name);
|
||||
if (curr->name == NULL) {
|
||||
free_dns_rr(head);
|
||||
diff -ruwN source/openbsd-compat/getrrsetbyname.h source-new/openbsd-compat/getrrsetbyname.h
|
||||
--- source/openbsd-compat/getrrsetbyname.h 2018-10-16 18:01:20.000000000 -0600
|
||||
+++ source-new/openbsd-compat/getrrsetbyname.h 2019-01-15 19:54:39.564320719 -0700
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
-#ifndef HAVE_GETRRSETBYNAME
|
||||
+#if !defined(HAVE_GETRRSETBYNAME) && !defined(__redox__)
|
||||
--- source/openbsd-compat/getrrsetbyname.h 2024-07-01 11:36:28.000000000 +0700
|
||||
+++ source-new/openbsd-compat/getrrsetbyname.h 2025-09-06 21:09:36.557438268 +0700
|
||||
@@ -54,9 +54,13 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
+#ifndef __redox__
|
||||
#include <arpa/nameser.h>
|
||||
+#endif
|
||||
#include <netdb.h>
|
||||
+#ifndef __redox__
|
||||
#include <resolv.h>
|
||||
+#endif
|
||||
|
||||
#ifndef HFIXEDSZ
|
||||
#define HFIXEDSZ 12
|
||||
diff -ruwN source/openbsd-compat/inet_ntop.c source-new/openbsd-compat/inet_ntop.c
|
||||
--- source/openbsd-compat/inet_ntop.c 2024-07-01 11:36:28.000000000 +0700
|
||||
+++ source-new/openbsd-compat/inet_ntop.c 2025-09-06 21:09:36.557438268 +0700
|
||||
@@ -26,7 +26,9 @@
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
+#ifndef __redox__
|
||||
#include <arpa/nameser.h>
|
||||
+#endif
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
diff -ruwN source/openbsd-compat/openbsd-compat.h source-new/openbsd-compat/openbsd-compat.h
|
||||
--- source/openbsd-compat/openbsd-compat.h 2018-10-16 18:01:20.000000000 -0600
|
||||
+++ source-new/openbsd-compat/openbsd-compat.h 2019-01-15 20:14:24.316498869 -0700
|
||||
@@ -36,6 +36,10 @@
|
||||
--- source/openbsd-compat/openbsd-compat.h 2024-07-01 11:36:28.000000000 +0700
|
||||
+++ source-new/openbsd-compat/openbsd-compat.h 2025-09-06 21:09:36.557438268 +0700
|
||||
@@ -36,6 +36,8 @@
|
||||
|
||||
#include <stddef.h> /* for wchar_t */
|
||||
|
||||
+#if defined(__redox__)
|
||||
+#include <stdio.h>
|
||||
+#endif
|
||||
+#include "getopt.h"
|
||||
+
|
||||
/* OpenBSD function replacements */
|
||||
#include "base64.h"
|
||||
#include "sigact.h"
|
||||
diff -ruwN source/openbsd-compat/utmpx.c source-new/openbsd-compat/utmpx.c
|
||||
--- source/openbsd-compat/utmpx.c 1970-01-01 07:00:00.000000000 +0700
|
||||
+++ source-new/openbsd-compat/utmpx.c 2025-09-06 21:09:36.557438268 +0700
|
||||
@@ -0,0 +1,13 @@
|
||||
+#include "utmpx.h"
|
||||
+#include <stddef.h> // For NULL
|
||||
+
|
||||
+#ifdef __redox__
|
||||
+
|
||||
+void endutxent(void) { /* Do nothing */ }
|
||||
+struct utmpx *getutxent(void) { return NULL; }
|
||||
+struct utmpx *getutxid(const struct utmpx *ut) { return NULL; }
|
||||
+struct utmpx *getutxline(const struct utmpx *ut) { return NULL; }
|
||||
+struct utmpx *pututxline(const struct utmpx *ut) { return NULL; }
|
||||
+void setutxent(void) { /* Do nothing */ }
|
||||
+
|
||||
+#endif
|
||||
\ No newline at end of file
|
||||
diff -ruwN source/openbsd-compat/utmpx.h source-new/openbsd-compat/utmpx.h
|
||||
--- source/openbsd-compat/utmpx.h 1970-01-01 07:00:00.000000000 +0700
|
||||
+++ source-new/openbsd-compat/utmpx.h 2025-09-06 21:09:36.557438268 +0700
|
||||
@@ -0,0 +1,69 @@
|
||||
+#ifndef _COMPAT_UTMPX_H
|
||||
+#define _COMPAT_UTMPX_H
|
||||
+#ifdef __redox__
|
||||
+#include <sys/types.h>
|
||||
+#include <sys/time.h>
|
||||
+
|
||||
+#ifdef __cplusplus
|
||||
+extern "C" {
|
||||
+#endif
|
||||
+
|
||||
+/*
|
||||
+ * This header provides a POSIX-compliant definition of the utmpx structure
|
||||
+ * and related functions for systems that lack a native <utmpx.h>, such as Redox OS.
|
||||
+ */
|
||||
+
|
||||
+// Define standard sizes for character arrays, based on common practice (e.g., Linux)
|
||||
+#define UT_LINESIZE 32
|
||||
+#define UT_NAMESIZE 32
|
||||
+#define UT_HOSTSIZE 256
|
||||
+#define UT_IDSIZE 4
|
||||
+
|
||||
+/*
|
||||
+ * The utmpx structure, containing user accounting information.
|
||||
+ */
|
||||
+struct utmpx {
|
||||
+ char ut_user[UT_NAMESIZE]; /* User login name */
|
||||
+ char ut_id[UT_IDSIZE]; /* Unspecified terminal id */
|
||||
+ char ut_line[UT_LINESIZE]; /* Device name of tty */
|
||||
+ pid_t ut_pid; /* Process ID */
|
||||
+ short ut_type; /* Type of entry */
|
||||
+ struct timeval ut_tv; /* Time entry was made */
|
||||
+ // Non-standard but very common fields, often needed for compatibility
|
||||
+ char ut_host[UT_HOSTSIZE]; /* Host name for remote login */
|
||||
+ // Padding to align the structure, if necessary
|
||||
+ char __padding[16];
|
||||
+};
|
||||
+
|
||||
+/*
|
||||
+ * Symbolic constants for the ut_type field.
|
||||
+ */
|
||||
+#define EMPTY 0 /* No valid user accounting information */
|
||||
+#define BOOT_TIME 1 /* Time of system boot */
|
||||
+#define OLD_TIME 2 /* Time when system clock changed */
|
||||
+#define NEW_TIME 3 /* Time after system clock changed */
|
||||
+#define USER_PROCESS 4 /* A user process */
|
||||
+#define INIT_PROCESS 5 /* A process spawned by the init process */
|
||||
+#define LOGIN_PROCESS 6 /* The session leader of a logged-in user */
|
||||
+#define DEAD_PROCESS 7 /* A session leader who has exited */
|
||||
+
|
||||
+/*
|
||||
+ * Function prototypes for utmpx database manipulation.
|
||||
+ *
|
||||
+ * NOTE: These are stubs. Since Redox OS does not have a utmp/utmpx
|
||||
+ * database, these functions won't have a real implementation. They
|
||||
+ * are declared here to satisfy the linker.
|
||||
+ */
|
||||
+void endutxent(void);
|
||||
+struct utmpx *getutxent(void);
|
||||
+struct utmpx *getutxid(const struct utmpx *);
|
||||
+struct utmpx *getutxline(const struct utmpx *);
|
||||
+struct utmpx *pututxline(const struct utmpx *);
|
||||
+void setutxent(void);
|
||||
+
|
||||
+#ifdef __cplusplus
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+#endif /* __redox__ */
|
||||
+#endif /* _COMPAT_UTMPX_H */
|
||||
\ No newline at end of file
|
||||
diff -ruwN source/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-09-06 21:09:36.558438233 +0700
|
||||
@@ -1384,7 +1384,9 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
+#ifndef __redox__
|
||||
#include <resolv.h>
|
||||
+#endif
|
||||
|
||||
#define SOCKS_PORT "1080"
|
||||
#define HTTP_PROXY_PORT "3128"
|
||||
diff -ruwN source/servconf.c source-new/servconf.c
|
||||
--- source/servconf.c 2024-07-01 11:36:28.000000000 +0700
|
||||
+++ source-new/servconf.c 2025-09-07 01:38:08.219942429 +0700
|
||||
@@ -857,7 +857,8 @@
|
||||
hints.ai_socktype = SOCK_STREAM;
|
||||
hints.ai_flags = (addr == NULL) ? AI_PASSIVE : 0;
|
||||
snprintf(strport, sizeof strport, "%d", port);
|
||||
- if ((gaierr = getaddrinfo(addr, strport, &hints, &aitop)) != 0)
|
||||
+ // redox don't accept addr == NULL yet
|
||||
+ if ((gaierr = getaddrinfo("0.0.0.0", strport, &hints, &aitop)) != 0)
|
||||
fatal("bad addr or host: %s (%s)",
|
||||
addr ? addr : "<NULL>",
|
||||
ssh_gai_strerror(gaierr));
|
||||
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 2018-10-16 18:01:20.000000000 -0600
|
||||
+++ source-new/sshbuf-misc.c 2019-01-15 20:45:08.969783102 -0700
|
||||
--- source/sshbuf-misc.c 2024-07-01 11:36:28.000000000 +0700
|
||||
+++ source-new/sshbuf-misc.c 2025-09-06 21:09:36.559438198 +0700
|
||||
@@ -28,7 +28,9 @@
|
||||
#include <stdio.h>
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
+#if !defined(__redox__)
|
||||
+#ifndef __redox__
|
||||
#include <resolv.h>
|
||||
+#endif
|
||||
#include <ctype.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "ssherr.h"
|
||||
@@ -158,4 +160,3 @@
|
||||
r[l] = '\0';
|
||||
return r;
|
||||
}
|
||||
-
|
||||
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 2018-10-16 18:01:20.000000000 -0600
|
||||
+++ source-new/sshkey.c 2019-01-15 20:13:21.629829281 -0700
|
||||
@@ -42,7 +42,9 @@
|
||||
#include <limits.h>
|
||||
--- source/sshkey.c 2024-07-01 11:36:28.000000000 +0700
|
||||
+++ source-new/sshkey.c 2025-09-06 21:09:36.567437916 +0700
|
||||
@@ -43,7 +43,9 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
+#if !defined(__redox__)
|
||||
+#ifndef __redox__
|
||||
#include <resolv.h>
|
||||
+#endif
|
||||
#include <time.h>
|
||||
#ifdef HAVE_UTIL_H
|
||||
#include <util.h>
|
||||
#endif /* HAVE_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;
|
||||
}
|
||||
|
||||
|
||||
5
recipes/wip/sys-info/ffetch/recipe.toml
Normal file
5
recipes/wip/sys-info/ffetch/recipe.toml
Normal file
@ -0,0 +1,5 @@
|
||||
#TODO not compiled or tested
|
||||
[source]
|
||||
git = "https://github.com/0l3d/ffetch"
|
||||
[build]
|
||||
template = "cargo"
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user