Red Bear OS — microkernel OS in Rust, based on Redox

Derivative of Redox OS (https://www.redox-os.org) adding:
- AMD GPU driver (amdgpu) via LinuxKPI compat layer
- ext4 filesystem support (ext4d scheme daemon)
- ACPI fixes for AMD bare metal (x2APIC, DMAR, IVRS, MCFG)
- Custom branding (hostname, os-release, boot identity)

Build system is full upstream Redox with RBOS overlay in local/.
Patches for kernel, base, and relibc are symlinked from local/patches/
and protected from make clean/distclean. Custom recipes live in
local/recipes/ with symlinks into the recipes/ search path.

Build:  make all CONFIG_NAME=redbear-full
Sync:   ./local/scripts/sync-upstream.sh
This commit is contained in:
2026-04-12 19:05:00 +01:00
commit 50b731f1b7
3392 changed files with 98327 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: bzip2
Description: A file compression library
Version: 1.0.8
Libs: -L${libdir} -lbz2
Cflags: -I${includedir}
+38
View File
@@ -0,0 +1,38 @@
[source]
tar = "https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz"
blake3 = "97af3f520629c65fe41292f77e6ca798fe594d7987bfb2aebe7c6fcdc7ab5ed2"
[build]
template = "custom"
script = """
DYNAMIC_INIT
# This installs the static library regardless of config options
# The static lib is preferred according to the README because it's faster
rsync -av --delete "${COOKBOOK_SOURCE}/" ./
"${COOKBOOK_MAKE}" -j"${COOKBOOK_MAKE_JOBS}" \
AR="${AR}" \
CC="${CC}" \
RANLIB="${RANLIB}" \
PREFIX="${COOKBOOK_STAGE}" \
install
# However, distros distribute libbz2 as well so we'll support it too
# Linking the lib fails if we don't rebuild the objects from earlier
"${COOKBOOK_MAKE}" clean
# This DOES NOT build/clobber the binaries already built above
"${COOKBOOK_MAKE}" -f Makefile-libbz2_so \
-j"${COOKBOOK_MAKE_JOBS}" \
AR="${AR}" \
CC="${CC}" \
RANLIB="${RANLIB}" \
PREFIX="${COOKBOOK_STAGE}"
cp -av libbz2.so* "${COOKBOOK_STAGE}/lib"
ln -sr "${COOKBOOK_STAGE}/lib/libbz2.so.1.0" "${COOKBOOK_STAGE}/lib/libbz2.so.1"
ln -sr "${COOKBOOK_STAGE}/lib/libbz2.so.1.0" "${COOKBOOK_STAGE}/lib/libbz2.so"
mkdir -p "${COOKBOOK_STAGE}/lib/pkgconfig"
cp "${COOKBOOK_RECIPE}/pkgconfig" "${COOKBOOK_STAGE}/lib/pkgconfig/bzip2.pc"
"""
+5
View File
@@ -0,0 +1,5 @@
[source]
git = "https://gitlab.redox-os.org/redox-os/cleye.git"
[build]
template = "cargo"
+17
View File
@@ -0,0 +1,17 @@
name=COSMIC Text Editor
binary=/bin/cosmic-edit
icon=/ui/icons/apps/accessories-text-editor.png
accept=*.asm
accept=*.conf
accept=*.html
accept=*.ion
accept=*.list
accept=*.lua
accept=*.md
accept=*.rc
accept=*.rs
accept=*.sh
accept=*.toml
accept=*.txt
author=Jeremy Soller
description=COSMIC Text Editor
+26
View File
@@ -0,0 +1,26 @@
[source]
git = "https://github.com/pop-os/cosmic-edit.git"
rev = "epoch-1.0.8"
[build]
template = "custom"
dependencies = [
"gettext",
"libxkbcommon",
]
script = """
DYNAMIC_INIT
export GETTEXT_DIR="${COOKBOOK_SYSROOT}/usr"
cookbook_cargo --no-default-features
mkdir -pv "${COOKBOOK_STAGE}/usr/share/ui/apps"
cp -v "${COOKBOOK_RECIPE}/manifest" "${COOKBOOK_STAGE}/usr/share/ui/apps/30_cosmic-edit"
#TODO: install with just?
APPID="com.system76.CosmicEdit"
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/metainfo/"
cp -v "${COOKBOOK_SOURCE}/res/${APPID}.metainfo.xml" "${COOKBOOK_STAGE}/usr/share/metainfo/"
mkdir -pv "${COOKBOOK_STAGE}/usr/share/icons/"
cp -rv "${COOKBOOK_SOURCE}/res/icons/hicolor/" "${COOKBOOK_STAGE}/usr/share/icons/"
"""
+5
View File
@@ -0,0 +1,5 @@
name=COSMIC File Manager
binary=/bin/cosmic-files
icon=/ui/icons/apps/system-file-manager.png
author=Jeremy Soller
description=COSMIC File Manager
+28
View File
@@ -0,0 +1,28 @@
[source]
git = "https://github.com/pop-os/cosmic-files.git"
rev = "epoch-1.0.8"
[build]
template = "custom"
dependencies = [
"gettext",
"libxkbcommon",
]
script = """
DYNAMIC_INIT
export GETTEXT_DIR="${COOKBOOK_SYSROOT}/usr"
cookbook_cargo --no-default-features
mkdir -pv "${COOKBOOK_STAGE}/usr/bin/"
cp -v "target/${TARGET}/release/cosmic-files" "${COOKBOOK_STAGE}/usr/bin/"
mkdir -pv "${COOKBOOK_STAGE}/usr/share/ui/apps/"
cp -v "${COOKBOOK_RECIPE}/manifest" "${COOKBOOK_STAGE}/usr/share/ui/apps/20_cosmic-files"
#TODO: install with just?
APPID="com.system76.CosmicFiles"
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/metainfo/"
cp -v "${COOKBOOK_SOURCE}/res/${APPID}.metainfo.xml" "${COOKBOOK_STAGE}/usr/share/metainfo/"
mkdir -pv "${COOKBOOK_STAGE}/usr/share/icons/"
cp -rv "${COOKBOOK_SOURCE}/res/icons/hicolor/" "${COOKBOOK_STAGE}/usr/share/icons/"
"""
+6
View File
@@ -0,0 +1,6 @@
name=COSMIC Reader
binary=/bin/cosmic-reader
icon=/ui/icons/apps/accessories-text-editor.png
accept=*.pdf
author=Jeremy Soller
description=COSMIC Reader
+37
View File
@@ -0,0 +1,37 @@
[source]
git = "https://github.com/pop-os/cosmic-reader.git"
rev = "epoch-1.0.8"
[build]
template = "custom"
dependencies = [
"expat",
"fontconfig",
"freetype2",
"libpng",
"zlib",
]
script = """
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}/usr/share/ui/apps"
cp -v "${COOKBOOK_RECIPE}/manifest" "${COOKBOOK_STAGE}/usr/share/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/"
"""
+30
View File
@@ -0,0 +1,30 @@
[source]
git = "https://github.com/pop-os/cosmic-settings.git"
branch = "master"
[build]
template = "custom"
dependencies = [
"gettext",
"libxkbcommon",
]
script = """
DYNAMIC_INIT
export GETTEXT_DIR="${COOKBOOK_SYSROOT}/usr"
(COOKBOOK_SOURCE+="/cosmic-settings" cookbook_cargo --no-default-features \
--config 'patch.crates-io.rustix.git = "https://github.com/bytecodealliance/rustix"' \
--config 'patch.crates-io.rustix.rev = "8bf15a0"')
mkdir -pv "${COOKBOOK_STAGE}/usr/bin/"
cp -v "target/${TARGET}/release/cosmic-settings" "${COOKBOOK_STAGE}/usr/bin/"
#TODO: install with just?
APPID="com.system76.CosmicSettings"
mkdir -pv "${COOKBOOK_STAGE}/usr/share/applications/"
sed 's/Categories=COSMIC/Categories=Settings/' "${COOKBOOK_SOURCE}/resources/applications/${APPID}.desktop" > "${COOKBOOK_STAGE}/usr/share/applications/${APPID}.desktop"
mkdir -pv "${COOKBOOK_STAGE}/usr/share/metainfo/"
cp -v "${COOKBOOK_SOURCE}/resources/${APPID}.metainfo.xml" "${COOKBOOK_STAGE}/usr/share/metainfo/"
mkdir -pv "${COOKBOOK_STAGE}/usr/share/"
cp -rv "${COOKBOOK_SOURCE}/resources/default_schema/" "${COOKBOOK_STAGE}/usr/share/cosmic/"
mkdir -pv "${COOKBOOK_STAGE}/usr/share/icons/"
cp -rv "${COOKBOOK_SOURCE}/resources/icons/" "${COOKBOOK_STAGE}/usr/share/icons/hicolor/"
"""
+26
View File
@@ -0,0 +1,26 @@
[source]
git = "https://github.com/pop-os/cosmic-store.git"
rev = "epoch-1.0.8"
[build]
template = "custom"
dependencies = [
"gettext",
"libxkbcommon",
"openssl3",
]
script = """
DYNAMIC_INIT
export GETTEXT_DIR="${COOKBOOK_SYSROOT}/usr"
export ZSTD_SYS_USE_PKG_CONFIG=1
cookbook_cargo --no-default-features --features desktop,pkgar
#TODO: install with just?
APPID="com.system76.CosmicStore"
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/metainfo/"
cp -v "${COOKBOOK_SOURCE}/res/${APPID}.metainfo.xml" "${COOKBOOK_STAGE}/usr/share/metainfo/"
mkdir -pv "${COOKBOOK_STAGE}/usr/share/icons/"
cp -rv "${COOKBOOK_SOURCE}/res/icons/hicolor/" "${COOKBOOK_STAGE}/usr/share/icons/"
"""
+5
View File
@@ -0,0 +1,5 @@
name=COSMIC Terminal
binary=/bin/cosmic-term
icon=/ui/icons/apps/utilities-terminal.png
author=Jeremy Soller
description=COSMIC Terminal
+26
View File
@@ -0,0 +1,26 @@
[source]
git = "https://github.com/pop-os/cosmic-term.git"
rev = "epoch-1.0.8"
[build]
template = "custom"
dependencies = [
"gettext",
"libxkbcommon",
]
script = """
DYNAMIC_INIT
export GETTEXT_DIR="${COOKBOOK_SYSROOT}/usr"
cookbook_cargo --no-default-features
mkdir -pv "${COOKBOOK_STAGE}/usr/share/ui/apps"
cp -v "${COOKBOOK_RECIPE}/manifest" "${COOKBOOK_STAGE}/usr/share/ui/apps/10_cosmic-term"
#TODO: install with just?
APPID="com.system76.CosmicTerm"
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/metainfo/"
cp -v "${COOKBOOK_SOURCE}/res/${APPID}.metainfo.xml" "${COOKBOOK_STAGE}/usr/share/metainfo/"
mkdir -pv "${COOKBOOK_STAGE}/usr/share/icons/"
cp -rv "${COOKBOOK_SOURCE}/res/icons/hicolor/" "${COOKBOOK_STAGE}/usr/share/icons/"
"""
+11
View File
@@ -0,0 +1,11 @@
[source]
git = "https://github.com/pop-os/cosmic-text.git"
branch = "main"
[build]
template = "custom"
script = """
DYNAMIC_INIT
COOKBOOK_CARGO_FLAGS=() # remove --locked
COOKBOOK_CARGO_PATH=examples/editor cookbook_cargo_build
"""
+88
View File
@@ -0,0 +1,88 @@
diff -ruw source/lib/cmpbuf.c source-new/lib/cmpbuf.c
--- source/lib/cmpbuf.c 2017-01-01 04:22:36.000000000 -0700
+++ source-new/lib/cmpbuf.c 2018-12-29 07:31:43.920193561 -0700
@@ -71,8 +71,8 @@
ancient AIX hosts that set errno to EINTR after uncaught
SIGCONT. See <news:1r77ojINN85n@ftp.UU.NET>
(1993-04-22). */
- if (! SA_RESTART && errno == EINTR)
- continue;
+ //if (! SA_RESTART && errno == EINTR)
+ // continue;
return SIZE_MAX;
}
diff -ruw source/lib/getdtablesize.c source-new/lib/getdtablesize.c
--- source/lib/getdtablesize.c 2017-05-18 10:23:32.000000000 -0600
+++ source-new/lib/getdtablesize.c 2018-12-29 07:32:31.709586573 -0700
@@ -109,6 +109,7 @@
int
getdtablesize (void)
{
+#if !defined(__redox__)
struct rlimit lim;
if (getrlimit (RLIMIT_NOFILE, &lim) == 0
@@ -117,6 +118,7 @@
&& lim.rlim_cur != RLIM_SAVED_CUR
&& lim.rlim_cur != RLIM_SAVED_MAX)
return lim.rlim_cur;
+#endif
return INT_MAX;
}
diff -ruw source/lib/getprogname.c source-new/lib/getprogname.c
--- source/lib/getprogname.c 2017-01-31 11:36:50.000000000 -0700
+++ source-new/lib/getprogname.c 2018-12-29 07:34:15.432575388 -0700
@@ -51,6 +51,14 @@
# include <sys/procfs.h>
#endif
+#if defined(__redox__)
+# include <string.h>
+# include <unistd.h>
+# include <stdio.h>
+# include <fcntl.h>
+# include <limits.h>
+#endif
+
#include "dirname.h"
#ifndef HAVE_GETPROGNAME /* not Mac OS X, FreeBSD, NetBSD, OpenBSD >= 5.4, Cygwin */
@@ -177,6 +185,17 @@
}
}
return NULL;
+# elif defined(__redox__)
+ char filename[PATH_MAX];
+ int fd = open ("sys:exe", O_RDONLY);
+ if (fd > 0) {
+ int len = read(fd, filename, PATH_MAX-1);
+ if (len > 0) {
+ filename[len] = '\0';
+ return strdup(filename);
+ }
+ }
+ return NULL;
# else
# error "getprogname module not ported to this OS"
# endif
diff -ruw source/lib/sigprocmask.c source-new/lib/sigprocmask.c
--- source/lib/sigprocmask.c 2017-05-18 10:23:32.000000000 -0600
+++ source-new/lib/sigprocmask.c 2018-12-29 07:45:02.610557142 -0700
@@ -126,6 +126,7 @@
return 0;
}
+#if !defined(__redox__)
int
sigemptyset (sigset_t *set)
{
@@ -180,6 +181,7 @@
*set = ((2U << (NSIG - 1)) - 1) & ~ SIGABRT_COMPAT_MASK;
return 0;
}
+#endif
/* Set of currently blocked signals. */
static volatile sigset_t blocked_set /* = 0 */;
+21
View File
@@ -0,0 +1,21 @@
[source]
tar = "https://ftp.gnu.org/gnu/diffutils/diffutils-3.6.tar.xz"
blake3 = "086a95093c15edcdb826e75ff4de6c2213de6fbd2eb13538d07bdc3286dfb4a4"
patches = ["diffutils.patch"]
script = """
autoreconf
"""
[build]
template = "custom"
script = """
DYNAMIC_INIT
COOKBOOK_CONFIGURE_FLAGS+=(
gt_cv_locale_fr=false
gt_cv_locale_fr_utf8=false
gt_cv_locale_ja=false
gt_cv_locale_tr_utf8=false
gt_cv_locale_zh_CN=false
)
cookbook_configure
"""
+5
View File
@@ -0,0 +1,5 @@
[source]
git = "https://github.com/sharkdp/fd.git"
rev = "840a565d3aadbeb303b10a01c0aa3561924dfc46"
[build]
template = "cargo"
+5
View File
@@ -0,0 +1,5 @@
#TODO compilation error
[source]
tar = "https://astron.com/pub/file/file-5.46.tar.gz"
[build]
template = "configure"
+4
View File
@@ -0,0 +1,4 @@
[source]
git = "https://github.com/jackpot51/friar.git"
[build]
template = "cargo"
+36
View File
@@ -0,0 +1,36 @@
# GNU gettext utilities are a set of tools that provides a framework to help
# other GNU packages produce multi-lingual messages.
[source]
tar = "https://ftp.gnu.org/gnu/gettext/gettext-0.22.5.tar.gz"
blake3 = "cb3f3a34da7ce1a92746df81f5b78c5d53841973a24eb80ab76537263d380ec0"
patches = [
"redox.patch"
]
script = """
DYNAMIC_INIT
GNU_CONFIG_GET build-aux/config.sub
( cd gettext-runtime/libasprintf && autoreconf -fvi -I${COOKBOOK_HOST_SYSROOT}/share/aclocal )
( cd gettext-runtime/intl && autoreconf -fvi -I${COOKBOOK_HOST_SYSROOT}/share/aclocal )
( cd gettext-runtime && autoreconf -fvi -I${COOKBOOK_HOST_SYSROOT}/share/aclocal )
( cd gettext-tools && autoreconf -fvi -I${COOKBOOK_HOST_SYSROOT}/share/aclocal )
( cd libtextstyle && autoreconf -fvi -I${COOKBOOK_HOST_SYSROOT}/share/aclocal )
autoreconf -fvi -I${COOKBOOK_HOST_SYSROOT}/share/aclocal
"""
[build]
template = "custom"
dependencies = [
"libiconv"
]
script = """
DYNAMIC_STATIC_INIT
COOKBOOK_CONFIGURE_FLAGS+=(
ac_cv_have_decl_program_invocation_name=no
gt_cv_locale_fr=false
gt_cv_locale_fr_utf8=false
gt_cv_locale_ja=false
gt_cv_locale_tr_utf8=false
gt_cv_locale_zh_CN=false
)
cookbook_configure
"""
+46
View File
@@ -0,0 +1,46 @@
diff -ruwN source/gettext-tools/gnulib-lib/getdtablesize.c source-new/gettext-tools/gnulib-lib/getdtablesize.c
--- source/gettext-tools/gnulib-lib/getdtablesize.c 2016-06-11 06:59:58.000000000 -0600
+++ source-new/gettext-tools/gnulib-lib/getdtablesize.c 2019-01-05 08:45:36.015291070 -0700
@@ -84,6 +84,14 @@
return dtablesize;
}
+#elif defined(__redox__)
+
+int
+getdtablesize (void)
+{
+ return INT_MAX;
+}
+
#else
# include <limits.h>
diff -ruwN source/gettext-tools/gnulib-lib/spawni.c source-new/gettext-tools/gnulib-lib/spawni.c
--- source/gettext-tools/gnulib-lib/spawni.c 2016-06-11 07:00:02.000000000 -0600
+++ source-new/gettext-tools/gnulib-lib/spawni.c 2019-01-05 08:55:44.661641522 -0700
@@ -51,10 +51,10 @@
# include <local-setxid.h>
#else
# if !HAVE_SETEUID
-# define seteuid(id) setresuid (-1, id, -1)
+# define seteuid(id) setreuid (-1, id)
# endif
# if !HAVE_SETEGID
-# define setegid(id) setresgid (-1, id, -1)
+# define setegid(id) setregid (-1, id)
# endif
# define local_seteuid(id) seteuid (id)
# define local_setegid(id) setegid (id)
diff -ruwN source/gettext-tools/Makefile.am source-new/gettext-tools/Makefile.am
--- source/gettext-tools/Makefile.am 2023-09-19 03:08:31.000000000 +0700
+++ source-new/gettext-tools/Makefile.am 2025-10-05 12:39:33.287595871 +0700
@@ -19,7 +19,7 @@
AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies
ACLOCAL_AMFLAGS = -I m4 -I ../gettext-runtime/m4 -I ../m4 -I gnulib-m4 -I libgrep/gnulib-m4 -I libgettextpo/gnulib-m4
-SUBDIRS = gnulib-lib libgrep src libgettextpo po its projects styles emacs misc man m4 tests system-tests gnulib-tests examples doc
+SUBDIRS = gnulib-lib libgrep src libgettextpo po its projects styles emacs misc man m4
EXTRA_DIST = misc/DISCLAIM
MOSTLYCLEANFILES = core *.stackdump
@@ -0,0 +1,24 @@
diff '--color=auto' -ur source/gprofng/libcollector/configure.ac source-new/gprofng/libcollector/configure.ac
--- source/gprofng/libcollector/configure.ac 2024-08-17 09:00:00.000000000 +1000
+++ source-new/gprofng/libcollector/configure.ac 2024-12-04 15:59:58.407412951 +1100
@@ -18,7 +18,7 @@
m4_include([../../bfd/version.m4])
AC_INIT([gprofng], [BFD_VERSION])
-AC_CONFIG_MACRO_DIRS([../../config ../..])
+#AC_CONFIG_MACRO_DIRS([../../config ../..])
AC_CONFIG_AUX_DIR(../..)
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE
diff '--color=auto' -ur source/libiberty/configure.ac source-new/libiberty/configure.ac
--- source/libiberty/configure.ac 2024-08-17 09:00:00.000000000 +1000
+++ source-new/libiberty/configure.ac 2024-12-04 15:59:31.572203764 +1100
@@ -37,7 +37,7 @@
libiberty_topdir="${srcdir}/.."
fi
AC_SUBST(libiberty_topdir)
-AC_CONFIG_AUX_DIR($libiberty_topdir)
+AC_CONFIG_AUX_DIR([.])
dnl Very limited version of automake's enable-maintainer-mode
+38
View File
@@ -0,0 +1,38 @@
[source]
tar = "https://ftp.gnu.org/gnu/binutils/binutils-2.43.1.tar.xz"
blake3 = "f074c81313b70eabc58ce9a9411cd771c5fa2433792d0ad8abcc45f603f58ed6"
patches = ["01_build_fix.patch"]
script = """
DYNAMIC_INIT
COOKBOOK_AUTORECONF=autoreconf2.69 autotools_recursive_regenerate -I"$(realpath ./config)"
cp -fpv ${COOKBOOK_HOST_SYSROOT}/share/libtool/build-aux/{config.sub,config.guess,install-sh} libiberty/
"""
[build]
template = "custom"
dependencies = [
"expat",
"libgmp",
"libmpfr",
"zlib",
]
script = """
DYNAMIC_INIT
COOKBOOK_CONFIGURE_FLAGS+=(
--target="${GNU_TARGET}"
--disable-werror
--disable-dependency-tracking
--disable-nls
--enable-colored-disassembly
--enable-gdb
--with-system-zlib
--with-multilib
--with-interwork
--with-pic
--with-expat
)
cookbook_configure
"""
+68
View File
@@ -0,0 +1,68 @@
Only in source: grep.patch
diff -ru source/lib/getdtablesize.c source-new/lib/getdtablesize.c
--- source/lib/getdtablesize.c 2017-07-23 20:50:44.287742363 -0700
+++ source-new/lib/getdtablesize.c 2017-07-23 20:51:06.271284748 -0700
@@ -109,15 +109,6 @@
int
getdtablesize (void)
{
- struct rlimit lim;
-
- if (getrlimit (RLIMIT_NOFILE, &lim) == 0
- && 0 <= lim.rlim_cur && lim.rlim_cur <= INT_MAX
- && lim.rlim_cur != RLIM_INFINITY
- && lim.rlim_cur != RLIM_SAVED_CUR
- && lim.rlim_cur != RLIM_SAVED_MAX)
- return lim.rlim_cur;
-
return INT_MAX;
}
diff -ru source/lib/getprogname.c source-new/lib/getprogname.c
--- source/lib/getprogname.c 2017-01-16 09:29:13.000000000 -0800
+++ source-new/lib/getprogname.c 2017-07-23 20:49:21.133618122 -0700
@@ -43,13 +43,11 @@
# include <string.h>
#endif
-#ifdef __sgi
# include <string.h>
# include <unistd.h>
# include <stdio.h>
# include <fcntl.h>
-# include <sys/procfs.h>
-#endif
+# include <limits.h>
#include "dirname.h"
@@ -178,7 +176,16 @@
}
return NULL;
# else
-# error "getprogname module not ported to this OS"
+ char filename[PATH_MAX];
+ int fd = open ("sys:exe", O_RDONLY);
+ if (fd > 0) {
+ int len = read(fd, filename, PATH_MAX-1);
+ if (len > 0) {
+ filename[len] = '\0';
+ return strdup(filename);
+ }
+ }
+ return NULL;
# endif
}
diff -ru source/src/grep.c source-new/src/grep.c
--- source/src/grep.c 2017-07-02 10:41:41.000000000 -0700
+++ source-new/src/grep.c 2017-07-23 20:53:10.439131874 -0700
@@ -2895,7 +2895,7 @@
#ifdef _SC_PAGESIZE
long psize = sysconf (_SC_PAGESIZE);
#else
- long psize = getpagesize ();
+ long psize = 4096;
#endif
if (! (0 < psize && psize <= (SIZE_MAX - sizeof (uword)) / 2))
abort ();
+15
View File
@@ -0,0 +1,15 @@
[source]
tar = "https://ftp.gnu.org/gnu/grep/grep-3.1.tar.xz"
blake3 = "46b6e24dfa1b0f309f4eae3c450d612396c8faa6510b53a55f629e4f4c70b4a3"
patches = ["grep.patch"]
[build]
template = "custom"
script = """
DYNAMIC_INIT
COOKBOOK_CONFIGURE_FLAGS+=(
--prefix=/
)
cookbook_configure
rm -rf "${COOKBOOK_STAGE}"/{lib,share}
"""
+30
View File
@@ -0,0 +1,30 @@
#TODO signal handling is disabled, it should be re-enabled when Redox is ready
#TODO language files are not built for fennel and crstalline langauges
#TODO configuration - https://docs.helix-editor.com/install.html#configuring-helixs-runtime-files
[source]
git = "https://github.com/greyshaman/helix.git"
branch = "port-to-redoxos"
[build]
template = "custom"
script = """
DYNAMIC_INIT
export CFLAGS="$CFLAGS -D__redox__"
COOKBOOK_CARGO_PATH="helix-term" cookbook_cargo
mv "${COOKBOOK_STAGE}/usr/bin/hx" "${COOKBOOK_STAGE}/usr/bin/helix"
mkdir -p "${COOKBOOK_STAGE}/usr/lib/helix/runtime/grammars"
mkdir -p "${COOKBOOK_STAGE}/usr/lib/helix/runtime/queries"
mkdir -p "${COOKBOOK_STAGE}/usr/lib/helix/runtime/themes"
echo "show runtime grammars dir content"
cp ${COOKBOOK_SOURCE}/runtime/grammars/*.so ${COOKBOOK_STAGE}/usr/lib/helix/runtime/grammars/
cp -r ${COOKBOOK_SOURCE}/runtime/queries/* ${COOKBOOK_STAGE}/usr/lib/helix/runtime/queries/
cp -r ${COOKBOOK_SOURCE}/runtime/themes/* ${COOKBOOK_STAGE}/usr/lib/helix/runtime/themes/
cp "${COOKBOOK_SOURCE}/runtime/tutor" ${COOKBOOK_STAGE}/usr/lib/helix/runtime/
echo '#!/usr/bin/env bash' > "${COOKBOOK_STAGE}/usr/bin/hx"
echo 'export HELIX_RUNTIME=/usr/lib/helix/runtime' >> "${COOKBOOK_STAGE}/usr/bin/hx"
echo '/usr/bin/helix $@' >> "${COOKBOOK_STAGE}/usr/bin/hx"
chmod +x ${COOKBOOK_STAGE}/usr/bin/hx
"""
+15
View File
@@ -0,0 +1,15 @@
[source]
tar = "https://www.etalabs.net/releases/libc-bench-20110206.tar.gz"
blake3 = "64093102f29faa76da455f55a7b4be25b6d74d5c3d6fe88dbbc38aaae185182f"
patches = ["redox.patch"]
[build]
template = "custom"
script = """
rsync -av --delete "${COOKBOOK_SOURCE}/" ./
"${COOKBOOK_MAKE}" -j"$(${NPROC})"
mkdir -pv "${COOKBOOK_STAGE}/usr/bin"
cp -v "libc-bench" "${COOKBOOK_STAGE}/usr/bin"
"""
+42
View File
@@ -0,0 +1,42 @@
diff -ruw source/Makefile source-new/Makefile
--- source/Makefile 2011-01-31 00:13:00.000000000 -0700
+++ source-new/Makefile 2018-12-25 09:07:37.564520567 -0700
@@ -4,7 +4,7 @@
CFLAGS = -Os
LDFLAGS = -static
-LIBS = -lpthread -lrt -lpthread
+LIBS = -lpthread
all: libc-bench
diff -ruw source/utf8.c source-new/utf8.c
--- source/utf8.c 2011-01-24 20:08:38.000000000 -0700
+++ source-new/utf8.c 2018-12-25 08:52:35.893821291 -0700
@@ -3,7 +3,7 @@
#include <string.h>
#include <wchar.h>
#include <locale.h>
-#include <langinfo.h>
+//#include <langinfo.h>
size_t b_utf8_bigbuf(void *dummy)
{
@@ -18,7 +18,7 @@
|| setlocale(LC_CTYPE, "en.UTF-8")
|| setlocale(LC_CTYPE, "de_DE-8")
|| setlocale(LC_CTYPE, "fr_FR-8");
- if (strcmp(nl_langinfo(CODESET), "UTF-8")) return -1;
+ //if (strcmp(nl_langinfo(CODESET), "UTF-8")) return -1;
buf = malloc(500000);
wbuf = malloc(500000*sizeof(wchar_t));
@@ -56,7 +56,7 @@
|| setlocale(LC_CTYPE, "en.UTF-8")
|| setlocale(LC_CTYPE, "de_DE-8")
|| setlocale(LC_CTYPE, "fr_FR-8");
- if (strcmp(nl_langinfo(CODESET), "UTF-8")) return -1;
+ //if (strcmp(nl_langinfo(CODESET), "UTF-8")) return -1;
buf = malloc(500000);
l = 0;
+4
View File
@@ -0,0 +1,4 @@
[source]
git = "https://github.com/lsd-rs/lsd"
[build]
template = "cargo"
+16
View File
@@ -0,0 +1,16 @@
[source]
tar = "https://www.nano-editor.org/dist/v7/nano-7.2.tar.xz"
[build]
template = "custom"
dependencies = [
"ncursesw",
]
script = """
DYNAMIC_INIT
cookbook_configure
"""
[package]
dependencies = [
"terminfo"
]
+4
View File
@@ -0,0 +1,4 @@
[source]
git = "https://github.com/o2sh/onefetch"
[build]
template = "cargo"
+13
View File
@@ -0,0 +1,13 @@
[source]
tar = "https://github.com/NixOS/patchelf/releases/download/0.18.0/patchelf-0.18.0.tar.bz2"
blake3 = "f843b32bdf3ee8a1f465e92d3fef34f30c48ccef9c112fdb793e2e7f2ae7283a"
script = """
autotools_recursive_regenerate
"""
[build]
template = "custom"
script = """
DYNAMIC_INIT
cookbook_configure
"""
+22
View File
@@ -0,0 +1,22 @@
[source]
git = "https://gitlab.redox-os.org/redox-os/pathfinder.git"
branch = "redox"
upstream = "https://github.com/servo/pathfinder.git"
[build]
template = "custom"
dependencies = [
"mesa",
"zlib",
]
script = """
cargo rustc \
--target "$TARGET" \
--release \
--manifest-path "${COOKBOOK_SOURCE}/examples/canvas_glutin_minimal/Cargo.toml" \
-- \
-L "${COOK_SYSROOT}/lib" \
-C link-args="-Wl,-Bstatic $("${TARGET}-pkg-config" --libs osmesa) -lz -lstdc++ -lc -lgcc"
mkdir -pv "${COOKBOOK_STAGE}/bin"
cp -v "target/${TARGET}/release/canvas_glutin_minimal" "${COOKBOOK_STAGE}/bin/pathfinder"
"""
+5
View File
@@ -0,0 +1,5 @@
[source]
git = "https://github.com/guerinoni/perg.git"
rev = "e206fab6bbd9c363c686fa7503d318304e48ddbe"
[build]
template = "cargo"
+18
View File
@@ -0,0 +1,18 @@
[source]
git = "https://gitlab.redox-os.org/redox-os/periodictable.git"
[build]
template = "custom"
script = """
DYNAMIC_INIT
cookbook_cargo
mkdir -pv "${COOKBOOK_STAGE}/usr/share/ui/apps"
cp -v "${COOKBOOK_SOURCE}/pkg/manifest" "${COOKBOOK_STAGE}/usr/share/ui/apps/periodictable"
mkdir -pv "${COOKBOOK_STAGE}/usr/share/icons"
cp -v "${COOKBOOK_SOURCE}/pkg/icon.png" "${COOKBOOK_STAGE}/usr/share/icons/periodictable.png"
"""
[package]
dependencies = [
"orbital",
]
+16
View File
@@ -0,0 +1,16 @@
[source]
git = "https://github.com/jD91mZM2/powerline-rs"
[build]
template = "custom"
script = """
export CARGOFLAGS="--no-default-features --features chrono"
# --locked uses a reallyyyy old redox_syscall and libc which fails
${COOKBOOK_CARGO} install \
--path "${COOKBOOK_SOURCE}/${COOKBOOK_CARGO_PATH}" \
--root "${COOKBOOK_STAGE}/usr" \
--no-default-features \
--features chrono \
${install_flags}
"""
+5
View File
@@ -0,0 +1,5 @@
[source]
git = "https://github.com/jackpot51/ripgrep.git"
[build]
template = "cargo"
+28
View File
@@ -0,0 +1,28 @@
[source]
tar = "https://github.com/schismtracker/schismtracker/archive/20181223.tar.gz"
blake3 = "057e973f4f84cf898e2240d67c0e92f25086d8b9ffdc7e0c7ef81dd8dc81bc70"
patches = ["redox.patch"]
script = """
autoreconf -i
"""
[build]
template = "custom"
dependencies = [
"sdl1",
"liborbital",
"libiconv",
]
script = """
export CFLAGS="${CFLAGS} -I${COOKBOOK_SYSROOT}/include/SDL"
export SDL_CONFIG="${COOKBOOK_SYSROOT}/bin/sdl-config"
COOKBOOK_CONFIGURE_FLAGS=(
--build="$(gcc -dumpmachine)"
--host="${TARGET}"
--prefix=""
--with-sdl-prefix="${COOKBOOK_SYSROOT}"
)
cookbook_configure
"""
+24
View File
@@ -0,0 +1,24 @@
diff -rupNw source-original/Makefile.am source/Makefile.am
--- source-original/Makefile.am 2018-08-10 07:04:54.000000000 +0200
+++ source/Makefile.am 2018-12-30 23:18:07.957244170 +0100
@@ -223,7 +223,7 @@ files_macosx = \
endif
if USE_NETWORK
-cflags_network=-DUSE_NETWORK
+#cflags_network=-DUSE_NETWORK
endif
diff -rupNw source-original/schism/main.c source/schism/main.c
--- source-original/schism/main.c 2018-08-10 07:04:54.000000000 +0200
+++ source/schism/main.c 2018-12-30 23:19:24.954046191 +0100
@@ -1033,7 +1033,7 @@ int main(int argc, char **argv)
video_fullscreen(0);
- tzset(); // localtime_r wants this
+ //tzset(); // localtime_r wants this
srand(time(NULL));
parse_options(argc, argv); /* shouldn't this be like, first? */
+9
View File
@@ -0,0 +1,9 @@
[source]
tar = "https://ftp.gnu.org/gnu/sed/sed-4.4.tar.xz"
blake3 = "a88c12b2b4304e53e3c7ae2eb0499d02e28873c1b9e1a6871e5347c6886a1ecd"
patches = [
"sed.patch"
]
[build]
template = "configure"
+11
View File
@@ -0,0 +1,11 @@
diff -ruN sed-4.4/sed/mbcs.c source/sed/mbcs.c
--- sed-4.4/sed/mbcs.c 2017-01-01 03:17:10.000000000 -0800
+++ source/sed/mbcs.c 2025-06-06 04:36:30.129312397 -0700
@@ -38,6 +38,7 @@
int
is_mb_char (int ch, mbstate_t *cur_stat)
{
+ return 0; // FIXME: Implement mbrtowc in relibc, then remove this line
const char c = ch ;
const int mb_pending = !mbsinit (cur_stat);
const int result = mbrtowc (NULL, &c, 1, cur_stat);
+5
View File
@@ -0,0 +1,5 @@
[source]
git = "https://github.com/anordal/shellharden.git"
rev = "bd24c99d5d1e76452b6d0749404837c1c95d923c"
[build]
template = "cargo"
+5
View File
@@ -0,0 +1,5 @@
[source]
git = "https://gitlab.redox-os.org/redox-os/shellstorm.git"
[build]
template = "cargo"
+5
View File
@@ -0,0 +1,5 @@
[source]
git = "https://gitlab.redox-os.org/redox-os/Smith.git"
[build]
template = "cargo"
+19
View File
@@ -0,0 +1,19 @@
[source]
git = "https://gitlab.redox-os.org/redox-os/sodium.git"
[build]
template = "custom"
script = """
DYNAMIC_INIT
"${COOKBOOK_CARGO}" install \
--path "${COOKBOOK_SOURCE}" \
--root "${COOKBOOK_STAGE}/usr" \
--locked \
${install_flags} \
--features orbital
mkdir -pv "${COOKBOOK_STAGE}/usr/share/ui/apps"
cp -v ${COOKBOOK_SOURCE}/manifest "${COOKBOOK_STAGE}/usr/share/ui/apps/sodium"
mkdir -pv "${COOKBOOK_STAGE}/usr/share/icons"
cp -v ${COOKBOOK_SOURCE}/icon.png "${COOKBOOK_STAGE}/usr/share/icons/sodium.png"
"""
+4
View File
@@ -0,0 +1,4 @@
[source]
git = "https://github.com/XAMPPRocky/tokei.git"
[build]
template = "cargo"
+5
View File
@@ -0,0 +1,5 @@
[source]
git = "https://github.com/kivimango/twin-commander.git"
[build]
template = "cargo"
+26
View File
@@ -0,0 +1,26 @@
[source]
tar = "https://github.com/vim/vim/archive/refs/tags/v9.1.0821.tar.gz"
blake3 = "d1f5802ceb047b09143f1764bf4016f084cf7e6c026c7047919264c9f262a5dd"
patches = ["vim.patch"]
[build]
dependencies = ["ncursesw"]
template = "custom"
script = """
DYNAMIC_INIT
rsync -av --delete "${COOKBOOK_SOURCE}/" ./
export vim_cv_toupper_broken=no
export vim_cv_tgetent=zero
export vim_cv_terminfo=yes
export vim_cv_tty_group=world
export vim_cv_getcwd_broken=no
export vim_cv_stat_ignores_slash=yes
export vim_cv_memmove_handles_overlap=yes
COOKBOOK_CONFIGURE="./configure"
COOKBOOK_CONFIGURE_FLAGS+=(
--with-tlib=ncursesw
)
cookbook_configure
"""
+66
View File
@@ -0,0 +1,66 @@
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 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__)
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
+#endif
// 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 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);
+# elif defined(__redox__)
+ fsync(mfp->mf_fd);
# 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 :
+20
View File
@@ -0,0 +1,20 @@
[source]
tar = "https://github.com/tukaani-project/xz/releases/download/v5.2.13/xz-5.2.13.tar.gz"
blake3 = "edc6350542e8cb7188a878135e5b9bd592d687e5b47451ca1c89d51cc4bc6b53"
script = """
autotools_recursive_regenerate
"""
[build]
template = "custom"
script = """
DYNAMIC_STATIC_INIT
COOKBOOK_CONFIGURE_FLAGS+=(
--disable-lzmadec
--disable-lzmainfo
--disable-xz
--disable-xzdec
--enable-threads=no
)
cookbook_configure
"""