cub: full AUR package manager + Phase 1-5 native build tools
cub redesign (local/recipes/system/cub/): - AUR RPC v5 client (serde_json) with search/info - ~/.cub/ user-local recipe/source/repo storage - Enhanced PKGBUILD parser: optdepends, .SRCINFO, split packages, 19 linuxism patterns - Recipe generation: host: prefix on dev-deps, shallow_clone, cargopath, installs, optional-packages - Dependency resolver: scans build errors for missing commands/headers/libs/pkgconfig, maps to packages - Dependency installation: checks installed packages, fetches AUR deps, interactive prompt - ~110 Arc→Redox dependency mappings - ratatui TUI: search, info, install, build, query views - 14 Arch-style CLI switches (-S/-Si/-Syu/-G/-R/-Q/-Qi/-Ql) - 65 tests, 0 failures, clean build Phase 1-5 native build tools (local/recipes/dev/): - P1 Substrate: tar, m4, diffutils (gnulib bypass), mkfifo kernel patch (1085 lines) - P2 Build Systems: bison, flex, meson (standalone wrapper), ninja-build, libtool - P3 Native GCC: gcc-native, binutils-native (cross-compiled for redox host) - P4 Native LLVM: llvm-native (clang + lld from monorepo) - P5 Native Rust: rust-native (rustc + cargo) - Groups: build-essential-native, dev-essential expanded Config: - redbear-mini: +7 tools (diffutils, tar, bison, flex, meson, ninja, m4) - redbear-full: +4 native tools (gcc, binutils, llvm, rust) - All recipes moved to local/ with symlinks for cookbook discovery (Red Bear policy) Docs: - BUILD-TOOLS-PORTING-PLAN.md: phased porting roadmap - CUB-WORKFLOW-ASSESSMENT.md: gap analysis and integration assessment
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
[source]
|
||||
git = "https://github.com/uutils/tar"
|
||||
rev = "f85dddd20e33bb08000b0ed4277067a68a18fee4"
|
||||
shallow_clone = true
|
||||
|
||||
[build]
|
||||
template = "cargo"
|
||||
|
||||
[package]
|
||||
description = "GNU tar-compatible archive utility (Rust uutils implementation)"
|
||||
@@ -20,7 +20,7 @@
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/redox-os/kernel.git"
|
||||
rev = "866dfad0"
|
||||
patches = ["../../../local/patches/kernel/redbear-consolidated.patch", "../../../local/patches/kernel/P8-msi.patch", "../../../local/patches/kernel/P2-rebrand-start-message.patch", "P0-eventfd-kernel.patch"]
|
||||
patches = ["../../../local/patches/kernel/redbear-consolidated.patch", "../../../local/patches/kernel/P8-msi.patch", "../../../local/patches/kernel/P2-rebrand-start-message.patch", "P0-eventfd-kernel.patch", "../../../local/patches/kernel/P1-mkfifo-fifo-support.patch"]
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../local/recipes/dev/binutils-native
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../local/recipes/dev/bison
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../local/recipes/dev/flex
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../local/recipes/dev/gcc-native
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../local/recipes/dev/gnu-make
|
||||
@@ -1,21 +0,0 @@
|
||||
#TODO slower jobserver due to lack of named pipes
|
||||
[source]
|
||||
tar = "http://ftp.gnu.org/gnu/make/make-4.4.tar.gz"
|
||||
blake3 = "1a0e5353205e106bd9b3c0f4a5f37ee1156a1e1c8feb771d1b4842c216612cba"
|
||||
patches = [
|
||||
"redox.patch"
|
||||
]
|
||||
script = """
|
||||
autotools_recursive_regenerate
|
||||
"""
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
COOKBOOK_CONFIGURE_FLAGS+=(
|
||||
# TODO: https://gitlab.redox-os.org/redox-os/redox/-/issues/1753
|
||||
'ac_cv_func_mkfifo=no'
|
||||
)
|
||||
cookbook_configure
|
||||
"""
|
||||
@@ -1,40 +0,0 @@
|
||||
diff -ruwN make-4.4/src/arscan.c source/src/arscan.c
|
||||
--- make-4.4/src/arscan.c 2022-10-23 16:52:32.000000000 +0200
|
||||
+++ source/src/arscan.c 2024-08-23 18:28:49.206084084 +0200
|
||||
@@ -331,7 +331,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef WINDOWS32
|
||||
-# if !defined (__ANDROID__) && !defined (__BEOS__)
|
||||
+# if 0
|
||||
# include <ar.h>
|
||||
# else
|
||||
/* These platforms don't have <ar.h> but have archives in the same format
|
||||
diff -ruwN make-4.4/src/getopt1.c source/src/getopt1.c
|
||||
--- make-4.4/src/getopt1.c 2022-10-23 21:52:32.000000000 +0700
|
||||
+++ source/src/getopt1.c 2026-01-24 23:28:34.306706884 +0700
|
||||
@@ -48,6 +48,10 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+#ifdef __redox__
|
||||
+#define ELIDE_CODE
|
||||
+#endif
|
||||
+
|
||||
#ifndef ELIDE_CODE
|
||||
|
||||
|
||||
diff -ruwN make-4.4/src/getopt.c source/src/getopt.c
|
||||
--- make-4.4/src/getopt.c 2022-10-23 21:52:32.000000000 +0700
|
||||
+++ source/src/getopt.c 2026-01-24 23:21:09.488487860 +0700
|
||||
@@ -56,6 +56,10 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
+#ifdef __redox__
|
||||
+#define ELIDE_CODE
|
||||
+#endif
|
||||
+
|
||||
#ifndef ELIDE_CODE
|
||||
|
||||
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../local/recipes/dev/libtool
|
||||
@@ -1,22 +0,0 @@
|
||||
#TODO can build, not tested
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/redox-os/libtool"
|
||||
branch = "v2.5.4-redox"
|
||||
shallow_clone = true
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
|
||||
# libtool saves absolute path to sysroot which contains nothing
|
||||
unset CFLAGS
|
||||
|
||||
cp -r "${COOKBOOK_SOURCE}"/. ./
|
||||
./bootstrap \
|
||||
--skip-po \
|
||||
--force \
|
||||
--gnulib-srcdir=./gnulib
|
||||
COOKBOOK_CONFIGURE="./configure"
|
||||
cookbook_configure
|
||||
"""
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../local/recipes/dev/llvm-native
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../local/recipes/dev/m4
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../local/recipes/dev/meson
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../local/recipes/dev/ninja-build
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../local/recipes/dev/rust-native
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../local/recipes/tools/diffutils
|
||||
@@ -1,88 +0,0 @@
|
||||
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 */;
|
||||
@@ -1,25 +0,0 @@
|
||||
[source]
|
||||
tar = "https://ftp.gnu.org/gnu/diffutils/diffutils-3.6.tar.xz"
|
||||
blake3 = "086a95093c15edcdb826e75ff4de6c2213de6fbd2eb13538d07bdc3286dfb4a4"
|
||||
patches = ["diffutils.patch"]
|
||||
script = """
|
||||
autoreconf
|
||||
"""
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
dependencies = ["relibc"]
|
||||
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
|
||||
gl_cv_func_working_mktime=yes
|
||||
ac_cv_func_getprogname=yes
|
||||
)
|
||||
cookbook_configure
|
||||
rm -f "${COOKBOOK_STAGE}/usr/share/info/dir"
|
||||
"""
|
||||
@@ -1,5 +1,13 @@
|
||||
#TODO Compilation error
|
||||
[source]
|
||||
tar = "https://ftp.gnu.org/gnu/texinfo/texinfo-7.0.3.tar.xz"
|
||||
|
||||
[build]
|
||||
template = "configure"
|
||||
template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
COOKBOOK_CONFIGURE_FLAGS+=(
|
||||
--disable-nls
|
||||
--disable-perl-xs
|
||||
)
|
||||
cookbook_configure
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user