Build prefix on Redox OS, add self hosted mode

This commit is contained in:
Wildan M 2026-02-26 19:03:07 +07:00
parent 45356b503f
commit b336b52f15
No known key found for this signature in database
GPG Key ID: 01AC53185C679C79
13 changed files with 230 additions and 53 deletions

View File

@ -38,6 +38,7 @@ bottom = {}
bzip2 = {}
ca-certificates = {}
cairo = {}
cbindgen = {}
cleye = {}
composer = {}
contain = {}
@ -159,6 +160,7 @@ perl5 = {}
php84 = {}
pixelcannon = {}
pkg-config = {}
pkgar = {}
pkgutils = {}
pls = {}
pop-icon-theme = {}
@ -299,7 +301,6 @@ zstd = {}
#pciids = {}
#pcre2 = {}
#pixman = {} # depends on glib which does not build
#pkgar = {} # uses virtual Cargo.toml, needs recipe update
#pls = {}
#pop-wallpapers = {}
#powerline = {} # dirs

View File

@ -46,7 +46,7 @@ ifeq ($(PODMAN_BUILD),1)
else
$(HOST_CARGO) build --manifest-path Cargo.toml --release
export CI=1 COOKBOOK_LOGS=true COOKBOOK_CLEAN_BUILD=true PATH="$(PREFIX_PATH):$$PATH" COOKBOOK_HOST_SYSROOT="$(ROOT)/$(PREFIX_INSTALL)" && \
./target/release/repo cook --with-package-deps "--filesystem=config/$(ARCH)/ci.toml"
$(REPO_BIN) cook --with-package-deps "--filesystem=config/$(ARCH)/ci.toml"
endif
# CI toolchain

View File

@ -57,6 +57,7 @@ CONTAINERFILE?=podman/redox-base-containerfile
NPROC=nproc
SED=sed
FIND=find
REPO_BIN=./target/release/repo
ifneq ($(PODMAN_BUILD),1)
FSTOOLS_IN_PODMAN=0
@ -114,7 +115,13 @@ else ifeq ($(UNAME),FreeBSD)
FIND=gfind
FUMOUNT=sudo umount
VB_AUDIO=pulse # To check, will probably be OSS on most setups
VBM=VBoxManage
VBM=VBoxManage'
else ifeq ($(UNAME),Redox)
PODMAN_BUILD=0
HOSTED_REDOX=1
ifeq ($(shell which rustc),)
REPO_BIN=repo
endif
else
# Detect which version of the fusermount binary is available.
ifneq (, $(shell which fusermount3))
@ -182,6 +189,10 @@ ifeq ($(SCCACHE_BUILD),1)
export RUSTC_WRAPPER:=$(CC_WRAPPER)
endif
ifeq ($(HOSTED_REDOX),1)
FSTOOLS_TAG=
endif
## If Podman is being used, a container is required
ifeq ($(PODMAN_BUILD),1)
CONTAINER_TAG=build/container.tag

View File

@ -1,32 +1,29 @@
# Configuration file for the build system dependencies
# Don't check for Rust/Cargo if you will be using Podman
# Don't check for depends if you will be using Podman
ifneq ($(PODMAN_BUILD),1)
# Don't check for depends if you will be using Hosted Redox
ifneq ($(HOSTED_REDOX),1)
# dont check for Rust and Cargo if building on a Nix system
# don't check for Rust and Cargo if building on a Nix system
ifneq ($(NIX_SHELL_BUILD),1)
ifeq ($(shell which rustup),)
$(error rustup not found, install from "https://rustup.rs/")
endif
endif
# dont check for compile tools, used internally when installing fstools on host
# don't check for compile tools, used internally when installing fstools on host
ifneq ($(SKIP_CHECK_TOOLS),1)
ifeq ($(shell which cbindgen),)
$(error cbindgen not found, install from crates.io or from your package manager)
endif
ifeq ($(shell which nasm),)
$(error nasm not found, install from your package manager)
endif
ifeq ($(shell which just),)
$(error 'just' not found, install from crates.io or from your package manager)
endif
endif
endif
endif

View File

@ -32,7 +32,7 @@ fstools_fetch: $(FSTOOLS_TAG) FORCE
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
./target/release/repo fetch installer redoxfs
$(REPO_BIN) fetch installer redoxfs
endif
$(FSTOOLS_TAG): $(CONTAINER_TAG)

View File

@ -50,7 +50,7 @@ else
cp -r "$(PREFIX)/gcc-install/$(GNU_TARGET)/include/c++" "$@.partial/$(GNU_TARGET)/include/c++"
export PATH="$(ROOT)/$@.partial/bin:$$PATH" && \
export CARGO="env -u CARGO cargo" $(PREFIX_CONFIG) && \
./target/release/repo cook relibc
$(REPO_BIN) cook relibc
cp -r "$(RELIBC_TARGET)/stage/usr/". "$@.partial/$(GNU_TARGET)"
mkdir -p "$@.partial/$(GNU_TARGET)/usr"
ln -s "../include" "$@.partial/$(GNU_TARGET)/usr/include"
@ -83,6 +83,9 @@ endif
# PREFIX_BINARY ---------------------------------------------------
ifeq ($(PREFIX_BINARY),1)
# PREFIX_BINARY FOR LINUX -----------------------------------------
ifneq ($(HOSTED_REDOX),1)
$(PREFIX)/gcc-install.tar.gz: | $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
@ -143,6 +146,150 @@ else
mv "$@.partial" "$@"
endif
# PREFIX_BINARY FOR REDOX -----------------------------------------
else
$(PREFIX)/id_ed25519.pub.toml: | $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
mkdir -p "$(@D)"
wget -O $@.partial "https://static.redox-os.org/pkg/id_ed25519.pub.toml"
mv $@.partial $@
endif
$(PREFIX)/libtool.pkgar: $(PREFIX)/id_ed25519.pub.toml | $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
mkdir -p "$(@D)"
wget -O $@.partial "https://static.redox-os.org/pkg/$(TARGET)/libtool.pkgar"
mv $@.partial $@
endif
$(PREFIX)/gcc13.pkgar: $(PREFIX)/id_ed25519.pub.toml | $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
mkdir -p "$(@D)"
wget -O $@.partial "https://static.redox-os.org/pkg/$(TARGET)/gcc13.pkgar"
mv $@.partial $@
endif
$(PREFIX)/libgcc.pkgar: $(PREFIX)/id_ed25519.pub.toml | $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
mkdir -p "$(@D)"
wget -O $@.partial "https://static.redox-os.org/pkg/$(TARGET)/libgcc.pkgar"
mv $@.partial $@
endif
$(PREFIX)/libstdcxx.pkgar: $(PREFIX)/id_ed25519.pub.toml | $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
mkdir -p "$(@D)"
wget -O $@.partial "https://static.redox-os.org/pkg/$(TARGET)/libstdcxx.pkgar"
mv $@.partial $@
endif
$(PREFIX)/gcc13.cxx.pkgar: $(PREFIX)/id_ed25519.pub.toml | $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
mkdir -p "$(@D)"
wget -O $@.partial "https://static.redox-os.org/pkg/$(TARGET)/gcc13.cxx.pkgar"
mv $@.partial $@
endif
$(PREFIX)/rust.pkgar: $(PREFIX)/id_ed25519.pub.toml | $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
mkdir -p "$(@D)"
wget -O $@.partial "https://static.redox-os.org/pkg/$(TARGET)/rust.pkgar"
mv $@.partial $@
endif
$(PREFIX)/llvm21.pkgar: $(PREFIX)/id_ed25519.pub.toml | $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
mkdir -p "$(@D)"
wget -O $@.partial "https://static.redox-os.org/pkg/$(TARGET)/llvm21.pkgar"
mv $@.partial $@
endif
$(PREFIX)/llvm21.runtime.pkgar: $(PREFIX)/id_ed25519.pub.toml | $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
mkdir -p "$(@D)"
wget -O $@.partial "https://static.redox-os.org/pkg/$(TARGET)/llvm21.runtime.pkgar"
mv $@.partial $@
endif
$(PREFIX)/clang21.pkgar: $(PREFIX)/id_ed25519.pub.toml | $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
mkdir -p "$(@D)"
wget -O $@.partial "https://static.redox-os.org/pkg/$(TARGET)/clang21.pkgar"
mv $@.partial $@
endif
$(PREFIX)/lld21.pkgar: $(PREFIX)/id_ed25519.pub.toml | $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
mkdir -p "$(@D)"
wget -O $@.partial "https://static.redox-os.org/pkg/$(TARGET)/lld21.pkgar"
mv $@.partial $@
endif
$(PREFIX)/gcc-install: $(PREFIX)/gcc13.pkgar $(PREFIX)/gcc13.cxx.pkgar $(PREFIX)/libgcc.pkgar $(PREFIX)/libstdcxx.pkgar $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
rm -rf "$@.partial" "$@"
mkdir -p "$@.partial"
pkgar extract --pkey $(PREFIX)/id_ed25519.pub.toml --archive "$(PREFIX)/gcc13.pkgar" "$@.partial"
pkgar extract --pkey $(PREFIX)/id_ed25519.pub.toml --archive "$(PREFIX)/gcc13.cxx.pkgar" "$@.partial"
pkgar extract --pkey $(PREFIX)/id_ed25519.pub.toml --archive "$(PREFIX)/libgcc.pkgar" "$@.partial"
pkgar extract --pkey $(PREFIX)/id_ed25519.pub.toml --archive "$(PREFIX)/libstdcxx.pkgar" "$@.partial"
touch "$@.partial"
mv "$@.partial" "$@"
endif
$(PREFIX)/rust-install: $(PREFIX)/llvm21.pkgar $(PREFIX)/rust.pkgar $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
rm -rf "$@.partial" "$@"
mkdir -p "$@.partial"
pkgar extract --pkey $(PREFIX)/id_ed25519.pub.toml --archive "$(PREFIX)/llvm21.pkgar" "$@.partial"
pkgar extract --pkey $(PREFIX)/id_ed25519.pub.toml --archive "$(PREFIX)/rust.pkgar" "$@.partial"
touch "$@.partial"
mv "$@.partial" "$@"
endif
$(PREFIX)/clang-install: $(PREFIX)/llvm21.runtime.pkgar $(PREFIX)/clang21.pkgar $(PREFIX)/lld21.pkgar $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
rm -rf "$@.partial" "$@"
mkdir -p "$@.partial"
pkgar extract --pkey $(PREFIX)/id_ed25519.pub.toml --archive "$(PREFIX)/llvm21.runtime.pkgar" "$@.partial"
pkgar extract --pkey $(PREFIX)/id_ed25519.pub.toml --archive "$(PREFIX)/clang21.pkgar" "$@.partial"
pkgar extract --pkey $(PREFIX)/id_ed25519.pub.toml --archive "$(PREFIX)/lld21.pkgar" "$@.partial"
touch "$@.partial"
mv "$@.partial" "$@"
endif
endif
else
# BUILD GCC ---------------------------------------------------
@ -154,7 +301,7 @@ else
rm -rf "$@.partial" "$@"
mkdir -p "$@.partial"
export $(PREFIX_CONFIG) COOKBOOK_HOST_SYSROOT=/usr && \
./target/release/repo cook host:libtool
$(REPO_BIN) cook host:libtool
cp -r "$(LIBTOOL_TARGET)/stage/usr/". "$@.partial"
mv "$@.partial/bin/libtoolize" "$@.partial/bin/libtoolize.orig"
# adapt path for libtoolize
@ -173,7 +320,7 @@ else
mkdir -p "$@.partial"
export $(PREFIX_CONFIG) PATH="$(ROOT)/$(PREFIX)/libtool-install/bin:$$PATH" \
COOKBOOK_HOST_SYSROOT=/usr COOKBOOK_CROSS_TARGET=$(TARGET) COOKBOOK_CROSS_GNU_TARGET=$(GNU_TARGET) && \
./target/release/repo cook host:binutils-gdb
$(REPO_BIN) cook host:binutils-gdb
cp -r "$(BINUTILS_TARGET)/stage/usr/". "$@.partial"
touch "$@.partial"
mv "$@.partial" "$@"
@ -189,7 +336,7 @@ else
export $(PREFIX_CONFIG) PATH="$(ROOT)/$(PREFIX)/libtool-install/bin:$(ROOT)/$(PREFIX)/binutils-install/bin:$$PATH" \
COOKBOOK_LIBTOOL_DIR=$(ROOT)/$(PREFIX)/libtool-install COOKBOOK_CROSS_TARGET=$(TARGET) COOKBOOK_CROSS_GNU_TARGET=$(GNU_TARGET) \
COOKBOOK_HOST_SYSROOT=/usr COOKBOOK_CROSS_SYSROOT=$(ROOT)/$(PREFIX)/relibc-freestanding-install/$(GNU_TARGET) && \
./target/release/repo cook host:gcc13
$(REPO_BIN) cook host:gcc13
cp -r "$(GCC_TARGET)/stage/usr/". "$@.partial"
cp -r "$(GCC_TARGET)/stage.cxx/usr/". "$@.partial"
cp -r "$(PREFIX)/binutils-install/". "$@.partial"
@ -209,7 +356,7 @@ else
export PATH="$(ROOT)/$(PREFIX)/gcc-freestanding-install/bin:$$PATH" && \
export CC_$(subst -,_,$(TARGET))="$(GNU_TARGET)-gcc -isystem $(ROOT)/$@.partial/$(GNU_TARGET)/include" LINKFLAGS="" && \
export $(PREFIX_CONFIG) COOKBOOK_HOST_SYSROOT=/usr COOKBOOK_CROSS_TARGET=$(HOST_TARGET) && \
./target/release/repo cook relibc
$(REPO_BIN) cook relibc
cp -r "$(RELIBC_FREESTANDING_TARGET)/stage/usr/". "$@.partial/$(GNU_TARGET)"
touch "$@.partial"
mv "$@.partial" "$@"
@ -245,7 +392,7 @@ else
# hosted libstdcxx
export PATH="$(ROOT)/$@.partial/bin:$$PATH" && \
export $(PREFIX_CONFIG) "COOKBOOK_HOST_SYSROOT=$(ROOT)/$@.partial" COOKBOOK_CROSS_TARGET=$(HOST_TARGET) && \
rm -rf "$(LIBSTDCXX_TARGET)/stage" && ./target/release/repo cook libstdcxx-v3
rm -rf "$(LIBSTDCXX_TARGET)/stage" && $(REPO_BIN) cook libstdcxx-v3
cp -r "$(LIBSTDCXX_TARGET)/stage/usr/". "$@.partial/$(GNU_TARGET)"
rm -rf "$@-build.partial"
touch "$@.partial"
@ -356,7 +503,7 @@ else
rm -rf "$@.partial" "$@"
export PATH="$(ROOT)/$(PREFIX)/libtool-install/bin:$$PATH" \
$(PREFIX_CONFIG) COOKBOOK_HOST_SYSROOT=/usr COOKBOOK_CROSS_TARGET=$(TARGET) && \
./target/release/repo cook host:llvm21 host:rust
$(REPO_BIN) cook host:llvm21 host:rust
cp -r "$(RUST_TARGET)/stage/usr/". "$@.partial"
cp -r "$(LLVM_TARGET)/stage/usr/". "$@.partial"
mv "$@.partial" "$@"
@ -384,7 +531,7 @@ else
rm -rf "$@.partial" "$@"
export PATH="$(ROOT)/$(PREFIX)/libtool-install/bin:$$PATH" \
$(PREFIX_CONFIG) COOKBOOK_HOST_SYSROOT=/usr COOKBOOK_CROSS_TARGET=$(TARGET) && \
./target/release/repo cook host:llvm21 host:clang21 host:lld21
$(REPO_BIN) cook host:llvm21 host:clang21 host:lld21
# llvm libraries is already in rust if building
ifeq ($(PREFIX_USE_UPSTREAM_RUST_COMPILER),1)
cp -r "$(LLVM_TARGET)/stage/usr/". "$@.partial"

View File

@ -6,7 +6,7 @@ ifeq ($(PODMAN_BUILD),1)
else
export PATH="$(PREFIX_PATH):$$PATH" && \
export COOKBOOK_HOST_SYSROOT="$(ROOT)/$(PREFIX_INSTALL)" && \
./target/release/repo cook $(COOKBOOK_OPTS) --with-package-deps
$(REPO_BIN) cook $(COOKBOOK_OPTS) --with-package-deps
mkdir -p $(BUILD)
touch $@
endif
@ -18,7 +18,7 @@ repo-tree: $(FSTOOLS_TAG) $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
@./target/release/repo cook-tree $(COOKBOOK_OPTS) --with-package-deps
@$(REPO_BIN) cook-tree $(COOKBOOK_OPTS) --with-package-deps
endif
# List all recipes in a push-tree fashion specified by the filesystem config
@ -26,7 +26,7 @@ image-tree: $(FSTOOLS_TAG) $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
@./target/release/repo push-tree $(COOKBOOK_OPTS) --with-package-deps
@$(REPO_BIN) push-tree $(COOKBOOK_OPTS) --with-package-deps
endif
# Fetch all recipes source or binary from filesystem config
@ -36,7 +36,7 @@ ifeq ($(PODMAN_BUILD),1)
else
export PATH="$(PREFIX_PATH):$$PATH" && \
export COOKBOOK_HOST_SYSROOT="$(ROOT)/$(PREFIX_INSTALL)" && \
./target/release/repo fetch $(COOKBOOK_OPTS) --with-package-deps
$(REPO_BIN) fetch $(COOKBOOK_OPTS) --with-package-deps
endif
# Find recipe for one or more targets separated by comma
@ -44,7 +44,7 @@ find.%: $(FSTOOLS_TAG) FORCE
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
@./target/release/repo find $(foreach f,$(subst $(comma), ,$*),$(f))
@$(REPO_BIN) find $(foreach f,$(subst $(comma), ,$*),$(f))
endif
# Invoke clean for relibc in recipe and relibc in sysroot
@ -52,7 +52,7 @@ c.relibc: $(FSTOOLS_TAG) FORCE
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
./target/release/repo clean relibc
$(REPO_BIN) clean relibc
rm -rf $(PREFIX)/relibc-install $(PREFIX)/sysroot $(REPO_TAG)
@echo "\033[1;36;49mSysroot cleaned\033[0m"
endif
@ -62,7 +62,7 @@ c.%: $(FSTOOLS_TAG) FORCE
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
./target/release/repo clean $(foreach f,$(subst $(comma), ,$*),$(f))
$(REPO_BIN) clean $(foreach f,$(subst $(comma), ,$*),$(f))
endif
# Invoke fetch for one or more targets separated by comma
@ -72,7 +72,7 @@ ifeq ($(PODMAN_BUILD),1)
else
export PATH="$(PREFIX_PATH):$$PATH" && \
export COOKBOOK_HOST_SYSROOT="$(ROOT)/$(PREFIX_INSTALL)" && \
./target/release/repo fetch $(foreach f,$(subst $(comma), ,$*),$(f)) $(COOKBOOK_OPTS)
$(REPO_BIN) fetch $(foreach f,$(subst $(comma), ,$*),$(f)) $(COOKBOOK_OPTS)
endif
# Invoke cook for one or more targets separated by comma
@ -82,7 +82,7 @@ ifeq ($(PODMAN_BUILD),1)
else
export PATH="$(PREFIX_PATH):$$PATH" && \
export COOKBOOK_HOST_SYSROOT="$(ROOT)/$(PREFIX_INSTALL)" && \
./target/release/repo cook $(foreach f,$(subst $(comma), ,$*),$(f)) $(COOKBOOK_OPTS)
$(REPO_BIN) cook $(foreach f,$(subst $(comma), ,$*),$(f)) $(COOKBOOK_OPTS)
endif
# Show what to cook
@ -90,7 +90,7 @@ rt.%: $(FSTOOLS_TAG) FORCE
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
./target/release/repo cook-tree $(foreach f,$(subst $(comma), ,$*),$(f)) $(COOKBOOK_OPTS)
$(REPO_BIN) cook-tree $(foreach f,$(subst $(comma), ,$*),$(f)) $(COOKBOOK_OPTS)
endif
MOUNTED_TAG=$(MOUNT_DIR)~
@ -108,7 +108,7 @@ endif
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@ ALLOW_FSTOOLS=$(FSTOOLS_IN_PODMAN)
else
./target/release/repo push $(foreach f,$(subst $(comma), ,$*),$(f)) "--sysroot=$(MOUNT_DIR)"
$(REPO_BIN) push $(foreach f,$(subst $(comma), ,$*),$(f)) "--sysroot=$(MOUNT_DIR)"
endif
ifeq ($(ALLOW_FSTOOLS),1)
@if [ -f $(MOUNTED_TAG) ]; then \
@ -126,7 +126,7 @@ pt.%: $(FSTOOLS_TAG) FORCE
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
./target/release/repo push-tree $(foreach f,$(subst $(comma), ,$*),$(f)) $(COOKBOOK_OPTS)
$(REPO_BIN) push-tree $(foreach f,$(subst $(comma), ,$*),$(f)) $(COOKBOOK_OPTS)
endif
# Show what to push (with deps)
@ -145,7 +145,7 @@ endif
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@ ALLOW_FSTOOLS=$(FSTOOLS_IN_PODMAN)
else
./target/release/repo push $(COOKBOOK_OPTS) --with-package-deps "--sysroot=$(MOUNT_DIR)"
$(REPO_BIN) push $(COOKBOOK_OPTS) --with-package-deps "--sysroot=$(MOUNT_DIR)"
endif
ifeq ($(ALLOW_FSTOOLS),1)
@if [ -f $(MOUNTED_TAG) ]; then \
@ -159,7 +159,7 @@ u.%: $(FSTOOLS_TAG) FORCE
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
./target/release/repo unfetch $(foreach f,$(subst $(comma), ,$*),$(f))
$(REPO_BIN) unfetch $(foreach f,$(subst $(comma), ,$*),$(f))
endif
# Invoke clean, and repo.sh for one of more targets separated by comma

View File

@ -882,18 +882,24 @@ redox()
echo "Installing necessary build tools..."
# Core development packages that are likely available on Redox
# This list is conservative and only includes essentials
# Core development packages that are available on x86_64 Redox
# This list is based on list of "cookbook" and "dev-essential" recipe
packages="autoconf \
automake \
cbindgen \
expat \
gcc13 \
gcc13.cxx \
git \
gnu-grep \
gnu-make \
installer \
libgmp \
libjpeg \
libpng \
nasm \
patch \
pkgar \
pkg-config \
rust \
rustpython \
@ -955,6 +961,10 @@ usage()
#############################################################
cargoInstall()
{
if is_os_redox ; then
# in redox OS, cargo is not based on rustup. Packages are managed by pkg
return 0
fi
if [[ "`cargo +stable install --list`" != *"$1 v$2"* ]]; then
cargo +stable install --force --version "$2" "$1"
else
@ -970,6 +980,10 @@ cargoInstall()
#############################################################################
rustInstall()
{
if is_os_redox ; then
# in redox OS, rustup is not available. Packages are managed by pkg
return 0
fi
noninteractive=$1
# Check to see if multirust is installed, we don't want it messing with rustup
# In the future we can probably remove this but I believe it's good to have for now

View File

@ -2,5 +2,8 @@
git = "https://gitlab.redox-os.org/redox-os/pkgar.git"
[build]
template = "cargo"
package_path = "pkgar"
template = "custom"
script = """
DYNAMIC_INIT
PACKAGE_PATH="pkgar" cookbook_cargo --features "cli"
"""

View File

@ -2,7 +2,7 @@
tar = "https://ftp.gnu.org/gnu/wget/wget-1.21.4.tar.gz"
[build]
dependencies = [
"openssl1",
"openssl3",
]
template = "configure"
configureflags = [

View File

@ -11,19 +11,21 @@ cp -rv "${COOKBOOK_SOURCE}"/* "${COOKBOOK_STAGE}/home/user/cookbook"
"""
[package]
# Dependencies below does not include Rust / GCC
# because it will be downloaded as prefix binary.
dependencies = [
# TODO: When rust working, use this
# "dev-essential",
"autoconf",
"automake",
"gcc13",
"gcc13.cxx",
"git",
"cbindgen",
"gnu-binutils",
"gnu-grep",
"gnu-make",
"libtool",
"patch",
"installer",
"nasm",
"pkg-config",
"pkgar",
"rustpython",
"sed",
"wget",
]

View File

@ -380,13 +380,14 @@ pub fn build(
let cookbook_sysroot = sysroot_dir.canonicalize().unwrap();
let cookbook_toolchain = toolchain_dir.canonicalize().ok();
let bash_args = if cli_verbose { "-ex" } else { "-e" };
let mut command = if is_redox() {
let mut command = Command::new("bash");
let local_redoxer = Path::new("target/release/cookbook_redoxer");
let mut command = if is_redox() && !local_redoxer.is_file() {
let mut command = Command::new("cookbook_redoxer");
command.arg(bash_args);
command.env("COOKBOOK_REDOXER", "cargo");
command.env("COOKBOOK_REDOXER", "cookbook_redoxer");
command
} else {
let cookbook_redoxer = Path::new("target/release/cookbook_redoxer")
let cookbook_redoxer = local_redoxer
.canonicalize()
.unwrap_or(PathBuf::from("/bin/false"));
let mut command = Command::new(&cookbook_redoxer);

View File

@ -489,10 +489,11 @@ pub(crate) fn fetch_cargo(
source_dir = source_dir.join(package_path);
}
let mut command = if is_redox() {
Command::new("cargo")
let local_redoxer = Path::new("target/release/cookbook_redoxer");
let mut command = if is_redox() && !local_redoxer.is_file() {
Command::new("cookbook_redoxer")
} else {
let cookbook_redoxer = Path::new("target/release/cookbook_redoxer")
let cookbook_redoxer = local_redoxer
.canonicalize()
.unwrap_or(PathBuf::from("cargo"));
Command::new(&cookbook_redoxer)