a23012cee0
BREAKING CHANGE: The patch-based build system is removed. All Red Bear source now lives in local/sources/<component>/ as git repos. Changes: - src/recipe.rs: remove patches field from SourceRecipe::Git/Tar, add Local variant - src/cook/fetch.rs: delete fetch_apply_patches, validate_patches, normalize_patch, fetch_compute_patches_hash, fetch_write_patches_state, fetch_patches_state_stale, fetch_validate_patch_symlinks, fetch_is_patches_newer. Simplify fetch and fetch_offline. Remove recipe_has_patches. Add Local source handler. - src/bin/repo.rs: remove validate-patches command and handle_validate_patches - 70 recipe.toml files: remove patches arrays, convert core recipes to Local source - 272 .patch symlinks deleted from recipe directories - integrate-redbear.sh: replace patch symlink logic with source fork validation - Makefile: replace validate-patches with validate-sources target - AGENTS.md: remove 369 lines of patch documentation, add source ownership model - local/docs/PATCH-GOVERNANCE.md: deleted (replaced by SOURCE-OWNERSHIP-MODEL.md) - local/docs/SOURCE-OWNERSHIP-MODEL.md: new canonical reference - local/sources/: Red Bear fork repos created (kernel, relibc, base, bootloader, installer) from frozen 0.1.0 pre-patched archives - .gitignore: exclude local/sources/ (separate git repos) - create-forks.sh: new script for initializing fork repos Build: cargo check passes (5 warnings, 0 errors). Developer workflow is now: edit local/sources/ → repo cook → test. No patches.
131 lines
2.3 KiB
TOML
131 lines
2.3 KiB
TOML
# TODO Fix coreutils i18n/l10n behavior on Redox
|
|
# TODO Fix locale init bug on aarch64 before removing patches
|
|
# TODO https://github.com/uutils/coreutils/commit/e6f7ad06 broke locales on x86_64
|
|
[source]
|
|
git = "https://github.com/uutils/coreutils"
|
|
rev = "1f7c81f5d2d3e56c518349c0392158871a1ea9ec"
|
|
|
|
[build]
|
|
template = "custom"
|
|
script = """
|
|
DYNAMIC_INIT
|
|
python3 - <<'PY'
|
|
import os
|
|
from pathlib import Path
|
|
|
|
tmp_dir = Path(os.environ["COOKBOOK_SOURCE"]) / "src/uu/sort/src/tmp_dir.rs"
|
|
text = tmp_dir.read_text()
|
|
text = text.replace('use std::sync::atomic::{AtomicBool, Ordering};\\n', '')
|
|
text = text.replace('use uucore::{\\n error::{UResult, USimpleError},\\n show_error, translate,\\n};\\n', 'use uucore::error::UResult;\\n')
|
|
text = text.replace(' path::{Path, PathBuf},\\n', ' path::PathBuf,\\n')
|
|
start = text.find('/// Remove the directory at `path` by deleting its child files and then itself.')
|
|
if start != -1:
|
|
end = text.find('\\n}\\n', start)
|
|
if end != -1:
|
|
text = text[:start] + text[end + 3:]
|
|
tmp_dir.write_text(text)
|
|
PY
|
|
# TODO: upstream changes, consider using feat_require_unix_core if relibc is ready?
|
|
CARGO_PROFILE_RELEASE_LTO=thin cookbook_cargo --no-default-features --features feat_os_unix_redox,kill --bin coreutils
|
|
|
|
BINS=(
|
|
'['
|
|
b2sum
|
|
b3sum
|
|
base32
|
|
base64
|
|
basename
|
|
basenc
|
|
cat
|
|
chmod
|
|
cksum
|
|
comm
|
|
cp
|
|
csplit
|
|
cut
|
|
date
|
|
dd
|
|
#df not working, use redox coreutils
|
|
dir
|
|
dircolors
|
|
dirname
|
|
du
|
|
echo
|
|
env
|
|
expand
|
|
expr
|
|
factor
|
|
false
|
|
fmt
|
|
fold
|
|
hashsum
|
|
head
|
|
join
|
|
install
|
|
kill
|
|
link
|
|
ln
|
|
ls
|
|
md5sum
|
|
mkdir
|
|
mktemp
|
|
more
|
|
mv
|
|
nl
|
|
nproc
|
|
numfmt
|
|
od
|
|
paste
|
|
pr
|
|
printenv
|
|
printf
|
|
ptx
|
|
pwd
|
|
readlink
|
|
realpath
|
|
rm
|
|
rmdir
|
|
seq
|
|
sha1sum
|
|
sha224sum
|
|
sha256sum
|
|
sha3-224sum
|
|
sha3-256sum
|
|
sha3-384sum
|
|
sha3-512sum
|
|
sha384sum
|
|
sha3sum
|
|
sha512sum
|
|
shake128sum
|
|
shake256sum
|
|
shred
|
|
shuf
|
|
sleep
|
|
sort
|
|
split
|
|
stat
|
|
sum
|
|
tac
|
|
tail
|
|
tee
|
|
test
|
|
touch
|
|
tr
|
|
true
|
|
truncate
|
|
tsort
|
|
unexpand
|
|
uname
|
|
uniq
|
|
unlink
|
|
vdir
|
|
wc
|
|
yes
|
|
)
|
|
|
|
for bin in "${BINS[@]}"
|
|
do
|
|
ln -sv coreutils "${COOKBOOK_STAGE}/usr/bin/$bin"
|
|
done
|
|
"""
|