Compare commits

...

17 Commits

Author SHA1 Message Date
joshua Williams
24db9d9e2d Merge branch 'posix-bins-2' into 'master'
Draft: Second attempt to add redox-posix-tests bins recipe

See merge request redox-os/redox!2139
2026-06-26 15:10:51 +00:00
Jeremy Soller
1d296edf95 sdl3: disable GUI support until orbital is ported 2026-06-26 08:47:11 -06:00
Jeremy Soller
44c8606201 sdl3: use git fork 2026-06-26 08:36:44 -06:00
Jeremy Soller
917bdb3358 Merge branch 'all-in-repo' into 'master'
cookbook: Pass --all to reference all recipes built

See merge request redox-os/redox!2202
2026-06-24 14:40:21 -06:00
Jeremy Soller
6433af6d28 Merge branch 'os-test-bins' into 'master'
Update os-test-bins to resolve installation order

See merge request redox-os/redox!2204
2026-06-24 13:50:27 -06:00
Wildan M
ab507ede74
Update os-test-bins to resolve installation order 2026-06-24 21:39:32 +07:00
Wildan Mubarok
e0334334af Merge branch 'web-gen' into 'master'
Fix possible panic in web generator

See merge request redox-os/redox!2205
2026-06-24 12:53:46 +00:00
Wildan M
49a1cbd938
Fix possible panic in web generator 2026-06-24 19:21:38 +07:00
Jeremy Soller
d5b63b1f01 schismtracker: compile dynamically 2026-06-23 14:25:14 -06:00
Jeremy Soller
fcd1190eae openttd: compile dynamically 2026-06-23 14:05:40 -06:00
Jeremy Soller
3c79ff442c openjazz: compile dynamically 2026-06-23 14:05:26 -06:00
Jeremy Soller
ad6defe587 Merge branch 'static-programs' into 'master'
Support compiling more i586 programs

See merge request redox-os/redox!2201
2026-06-21 13:41:52 -06:00
Wildan M
2ba2fd843e Support compiling more i586 programs 2026-06-21 20:51:08 +02:00
Wildan M
f24f27c959
cookbook: Pass --all to reference all recipes built 2026-06-21 16:51:41 +07:00
Ribbon
affe2ef023 Merge branch 'remove-perm' into 'master'
Remove unnecessary permission from auto-test script

See merge request redox-os/redox!2199
2026-06-21 03:09:04 -03:00
Ribbon
d77108f56a Remove unnecessary permission from auto-test script 2026-06-21 00:03:12 -03:00
Josh Williams
77ae869c86 Second attempt to add redox-posix-tests bins recipie 2026-05-10 23:16:51 -07:00
25 changed files with 308 additions and 79 deletions

View File

@ -0,0 +1 @@
x86_64-unknown-redox-llvm-config

View File

@ -7,6 +7,7 @@
import os
import sys
import subprocess
import re
LLVM_CONFIG = "/bin/llvm-config"
@ -50,6 +51,8 @@ def main():
target_arch = target_triple.split('-')[0] if target_triple else ""
mapped_archs = ARCH_MAP.get(target_arch)
target_built_name, comp_prefix, lib_prefix = mapped_archs
toolchain_path = toolchain_path.rstrip(os.sep)
sysroot_path = sysroot_path.rstrip(os.sep)
cmd = [toolchain_path + LLVM_CONFIG] + sys.argv[1:]
@ -57,7 +60,7 @@ def main():
result = subprocess.run(
cmd,
stdout=subprocess.PIPE,
stderr=sys.stderr,
stderr=subprocess.PIPE,
check=False,
text=True
)
@ -65,13 +68,27 @@ def main():
print(f"Error: Could not find executable '{LLVM_CONFIG}'", file=sys.stderr)
sys.exit(1)
if result.returncode != 0:
sys.exit(result.returncode)
output = result.stdout.strip()
args_set = set(sys.argv[1:])
if result.returncode != 0:
# static libs is not part of the toolchain, but they do
# exist for platforms without dynamic library support
if "--link-static" in args_set and "--libfiles" in args_set:
output = result.stderr.strip()
output = output.replace("llvm-config: error: missing: ", "")
elif "--link-static" in args_set and "--libs" in args_set:
output = result.stderr.strip()
libpath = toolchain_path + "/lib"
output = output.replace(f"llvm-config: error: missing: {libpath}/lib", "-l")
output = output.replace(f".a", "")
output = re.sub('-lLLVMX86\w+ ?', '', output, count=0, flags=0) # TODO: why?
output = f"-L{libpath} {output}"
else:
print(result.stderr)
sys.exit(result.returncode)
else:
output = result.stdout.strip()
if "--bindir" in args_set:
output = toolchain_path + "/usr/bin"
@ -89,13 +106,9 @@ def main():
output = " ".join(filtered)
# if "--ldflags" in args_set:
src = toolchain_path.rstrip(os.sep)
dst = sysroot_path.rstrip(os.sep)
output = output.replace(src, dst)
output = output.replace(toolchain_path, sysroot_path)
else:
src = toolchain_path.rstrip(os.sep)
dst = sysroot_path.rstrip(os.sep)
output = output.replace(src, dst)
output = output.replace(toolchain_path, sysroot_path)
print(output + '\n', end='')

View File

@ -10,5 +10,10 @@ DYNAMIC_STATIC_INIT
# required by llvm21 as zstd statically linked there
export CPPFLAGS="$CPPFLAGS -fPIC"
COOKBOOK_SOURCE="$COOKBOOK_SOURCE/build/cmake"
if [ "${COOKBOOK_DYNAMIC}" != "1" ]; then
COOKBOOK_CMAKE_FLAGS+=(
-DZSTD_BUILD_SHARED=OFF
)
fi
cookbook_cmake
"""

View File

@ -28,9 +28,22 @@ fi
# This just build the LLVM library and tools just enough for Rust, to build the rest of LLVM see
# https://github.com/llvm/llvm-zorg/blob/main/zorg/buildbot/builders/annotated/standalone-build.sh
if [ "${COOKBOOK_DYNAMIC}" = "1" ]; then
COOKBOOK_CMAKE_FLAGS+=(
-DLLVM_BUILD_LLVM_DYLIB=On
-DLLVM_LINK_LLVM_DYLIB=On
)
else
COOKBOOK_CMAKE_FLAGS+=(
-DLLVM_BUILD_LLVM_DYLIB=OFF
-DLLVM_LINK_LLVM_DYLIB=OFF
-DLLVM_BUILD_STATIC=True
-DLLVM_ENABLE_PIC=False
)
fi
COOKBOOK_CMAKE_FLAGS+=(
-DLLVM_BUILD_LLVM_DYLIB=On
-DLLVM_LINK_LLVM_DYLIB=On
-DLLVM_INCLUDE_UTILS=On
-DLLVM_INSTALL_UTILS=On
-DLLVM_TOOL_LLVM_COV_BUILD=On

View File

@ -11,6 +11,8 @@ dependencies = [
"zlib",
]
script = """
DYNAMIC_INIT
export CFLAGS="${CFLAGS} -I${COOKBOOK_SYSROOT}/include"
export CXXFLAGS="${CXXFLAGS} -I${COOKBOOK_SYSROOT}/include"
export DATAPATH="/usr/share/games/openjazz/"

View File

@ -16,6 +16,8 @@ dependencies = [
"zlib",
]
script = """
DYNAMIC_INIT
rsync -av --delete "${COOKBOOK_SOURCE}/" ./
# Unsure if the bundle dir is necessary
@ -25,7 +27,7 @@ rsync -av --delete "${COOKBOOK_SOURCE}/" ./
--build="$(gcc -dumpmachine)" \\
--host="${TARGET}" \\
--prefix="" \\
--enable-static \\
--disable-static \\
--without-liblzo2 \\
--disable-network \\
--without-threads

View File

@ -5,13 +5,13 @@ template = "custom"
script = """
mkdir -pv "${COOKBOOK_STAGE}/usr/bin"
cp -rv "${COOKBOOK_RECIPE}/auto-test.ion" "${COOKBOOK_STAGE}/usr/bin/auto-test"
chmod a+x "${COOKBOOK_STAGE}/usr/bin/auto-test"
chmod +x "${COOKBOOK_STAGE}/usr/bin/auto-test"
"""
[package]
dependencies = [
"acid",
"coreutils",
"ion",
"os-test-bins",
"os-test-bins.outputs",
"relibc-tests-bins",
]

View File

@ -19,9 +19,17 @@ script = """
DYNAMIC_INIT
export CFLAGS="$CFLAGS -I$COOKBOOK_SYSROOT/include/inotify"
export LDFLAGS="$LDFLAGS -linotify"
LIBRARY=shared
if [ "${COOKBOOK_DYNAMIC}" != "1" ]; then
LIBRARY=static
fi
cookbook_meson \
-Ddefault_library=shared \
-Ddefault_library=$LIBRARY \
-Dxattr=false \
-Dtests=false \
-Dfile_monitor_backend=inotify
if [ "${COOKBOOK_DYNAMIC}" != "1" ]; then
sed -i 's/^Libs:.*$/& -linotify/' "${COOKBOOK_STAGE}/usr/lib/pkgconfig/gio-2.0.pc"
fi
"""

View File

@ -1,9 +1,13 @@
[source]
tar = "https://github.com/willnode/inotify-stub/archive/refs/tags/v0.1.tar.gz"
tar = "https://github.com/willnode/inotify-stub/archive/refs/tags/v0.2.tar.gz"
blake3 = "f76d204b0453e56688a4d8609d0b5680163eb9d2984cbd9e897f514becaf8e31"
[build]
template = "custom"
script = """
DYNAMIC_INIT
make -C "$COOKBOOK_SOURCE" install BUILD="$(pwd)" DESTDIR="$COOKBOOK_STAGE/usr"
COOKBOOK_DYNAMIC=${COOKBOOK_DYNAMIC:-0}
make -C "$COOKBOOK_SOURCE" install \
SHARED="${COOKBOOK_DYNAMIC}" BUILD="$(pwd)" \
DESTDIR="$COOKBOOK_STAGE/usr"
"""

View File

@ -4,6 +4,9 @@ blake3 = "e4bfbda32f4fdf5ed96c152efe3a3867193b690faa5378d02a2a6fd052ee3393"
script = """
autotools_recursive_regenerate
"""
patches = [
"redox.patch"
]
[build]
template = "custom"

View File

@ -0,0 +1,43 @@
diff --color -ruwN source/getopt1.c source-new/getopt1.c
--- source/getopt1.c 2023-06-01 20:40:35.000000000 +0200
+++ source-new/getopt1.c 2026-06-21 12:59:43.982043176 +0200
@@ -45,6 +45,10 @@
#endif
#endif
+#ifdef __RELIBC__
+#define ELIDE_CODE
+#endif
+
#ifndef ELIDE_CODE
diff --color -ruwN source/getopt.c source-new/getopt.c
--- source/getopt.c 2023-06-01 20:40:35.000000000 +0200
+++ source-new/getopt.c 2026-06-21 12:59:43.982043176 +0200
@@ -51,6 +51,10 @@
# endif
#endif
+#ifdef __RELIBC__
+#define ELIDE_CODE
+#endif
+
#ifndef ELIDE_CODE
diff --color -ruwN source/getopt.h source-new/getopt.h
--- source/getopt.h 2023-06-01 20:40:35.000000000 +0200
+++ source-new/getopt.h 2026-06-21 12:59:44.908095155 +0200
@@ -22,6 +22,11 @@
# define _GETOPT_H 1
#endif
+#ifdef __RELIBC__
+#define __GNU_LIBRARY__
+#endif
+
+
/* If __GNU_LIBRARY__ is not already defined, either we are being used
standalone, or this is the first header included in the source file.
If we are being used with glibc, we need to include <features.h>, but

View File

@ -23,21 +23,20 @@ export CFLAGS+=" -DHAVE_PTHREAD=1 -I${COOKBOOK_SYSROOT}/include/libdrm"
export LLVM_CONFIG="${TARGET}-llvm-config"
export LDFLAGS+=" -lorbital"
if [ "${COOKBOOK_DYNAMIC}" == "1" ]; then
COOKBOOK_MESON_FLAGS+=(-Dshared-llvm=enabled)
if [ "${COOKBOOK_DYNAMIC}" = "1" ]; then
# TODO: Fix wayland-scanner and enable wayland platform
COOKBOOK_MESON_FLAGS+=(-Dshared-llvm=enabled -Degl=enabled -Dplatforms=redox -Dvulkan-drivers=swrast)
else
COOKBOOK_MESON_FLAGS+=(-Dshared-llvm=disabled)
# No vulkan, lavapipe or EGL which is strictly requires shared library support
COOKBOOK_MESON_FLAGS+=(-Dshared-llvm=disabled -Dshared-glapi=disabled -Dgbm=disabled -Dplatforms=)
fi
cookbook_meson \
-Ddri-drivers-path=/usr/lib/dri \
-Degl=enabled \
-Dglx=disabled \
-Dllvm=enabled \
-Dosmesa=true \
-Dplatforms=redox \
-Dshader-cache=disabled \
-Dvulkan-drivers=swrast \
-Dgallium-drivers=swrast
# Hack to add LLVM libs, the list can be seen from meson log and check for matches $("${LLVM_CONFIG}" --libs)

View File

@ -30,8 +30,16 @@ make OS=Redox \
-j "${COOKBOOK_MAKE_JOBS}" \
all
make OS=Redox \
CC="${CC_WRAPPER} ${GNU_TARGET}-gcc" \
CFLAGS="-I${COOKBOOK_SYSROOT}/include" \
CPPFLAGS="-I${COOKBOOK_SYSROOT}/include" \
LDFLAGS="-L${COOKBOOK_SYSROOT}/lib" \
EXTRA_LDFLAGS= \
misc/html
skips=(
# These tests hang
# These tests hang https://gitlab.redox-os.org/redox-os/redox/-/issues/1752
basic/poll/poll
basic/pthread/pthread_barrierattr_setpshared
basic/pthread/pthread_condattr_setpshared
@ -46,7 +54,8 @@ skips=(
for skip in "${skips[@]}"
do
mkdir -p out.known/redox/"$(dirname "${skip}")"
echo "skipped" > out.known/redox/"${skip}.out"
echo "hang" > out.known/redox/"${skip}.out"
echo out.known/redox/"${skip}.out" >> "skipped.txt"
done
cp -t out -R out.known/redox
@ -58,25 +67,37 @@ cat > "${COOKBOOK_STAGE}/usr/bin/os-test-runner" <<EOF
set -e
cd /home/user/os-test
echo "Ensuring executables are newer than sources"
find . -type f -perm /111 -exec touch '{}' ';'
echo "Ensuring outputs are newer than sources and executables"
find out -type f -exec touch '{}' ';'
make test
make html
make json
make test html json
EOF
chmod +x "${COOKBOOK_STAGE}/usr/bin/os-test-runner"
"""
[package]
dependencies = [
"gcc13",
"gnu-binutils",
"gnu-grep",
"gnu-make",
"libarchive",
"sed",
]
# The installation order must be exact in order to satisfy Makefile requirement
# Cookbook/installer install order is based on package name, while pkg is based on dependencies
[[optional-packages]]
name = "a-sources"
files = [
"home/user/os-test/**/*.c",
]
[[optional-packages]]
name = "outputs"
dependencies = [ ".bins" ]
files = [
"home/user/os-test/out/**",
]
[[optional-packages]]
name = "bins"
dependencies = [ ".a-sources" ]
files = [
"home/user/os-test/**",
]

View File

@ -0,0 +1,59 @@
[source]
same_as = "../redox-posix-tests"
[build]
#dependencies = [
# "gettext",
# "libarchive",
# "libiconv",
#]
template = "custom"
script = """
DYNAMIC_INIT
# Copy source to /usr/share/redox-posix-tests
mkdir -p "${COOKBOOK_STAGE}/usr/share/redox-posix-tests"
cd "${COOKBOOK_STAGE}/usr/share/redox-posix-tests"
rsync -a "${COOKBOOK_SOURCE}/" "./"
# Pre-compile tests for Redox
make OS=Redox \
CC="${CC_WRAPPER} ${GNU_TARGET}-gcc" \
CFLAGS="-I${COOKBOOK_SYSROOT}/include" \
CPPFLAGS="-I${COOKBOOK_SYSROOT}/include" \
LDFLAGS="-L${COOKBOOK_SYSROOT}/lib" \
EXTRA_LDFLAGS= \
CC_FOR_BUILD="${CC_WRAPPER} cc" \
CFLAGS_FOR_BUILD= \
CPPFLAGS_FOR_BUILD= \
LDFLAGS_FOR_BUILD= \
-j "${COOKBOOK_MAKE_JOBS}" \
all
# Create runner script
mkdir -p "${COOKBOOK_STAGE}/usr/bin"
cat > "${COOKBOOK_STAGE}/usr/bin/redox-posix-tests-runner" <<EOF
#!/usr/bin/env bash
set -e
cd /usr/share/redox-posix-tests
echo "Ensuring executables are newer than sources"
find . -type f -perm /111 -exec touch '{}' ';'
make run_anyway
EOF
chmod +x "${COOKBOOK_STAGE}/usr/bin/redox-posix-tests-runner"
"""
[package]
dependencies = [
"gnu-binutils",
"gnu-grep",
"gnu-make",
"libarchive",
"sed",
]

View File

@ -14,6 +14,8 @@ dependencies = [
"libiconv",
]
script = """
DYNAMIC_INIT
export CFLAGS="${CFLAGS} -I${COOKBOOK_SYSROOT}/include/SDL"
export SDL_CONFIG="${COOKBOOK_SYSROOT}/bin/sdl-config"
@ -25,4 +27,4 @@ COOKBOOK_CONFIGURE_FLAGS=(
)
cookbook_configure
"""
"""

View File

@ -40,6 +40,11 @@ template = "custom"
script = """
DYNAMIC_INIT
CFLAGS="${CFLAGS} -DM_SQRT2=1.41421356237309504880"
if [ "${COOKBOOK_DYNAMIC}" != "1" ]; then
COOKBOOK_MESON_FLAGS+=(-Dwayland_backend=false)
fi
cookbook_meson \
-Dexamples=false \
-Dintrospection=false \

View File

@ -4,14 +4,21 @@ blake3 = "0ccee9635115fe417cfc4bc33ffd160bf1e2852bd6c03816b4af771d59462f53"
patches = ["redox.patch"]
[build]
template = "meson"
template = "custom"
dev-dependencies = [
"libx11",
"mesa",
]
mesonflags = [
"-Degl=yes",
# we're forcing x11 backend via EGL
"-Dx11=true",
"-Dtests=false",
]
script = """
DYNAMIC_INIT
if [ "${COOKBOOK_DYNAMIC}" = "1" ]; then
# Forcing x11 via EGL
COOKBOOK_MESON_FLAGS+=(-Degl=yes)
else
# No EGL, No wayland
COOKBOOK_MESON_FLAGS+=(-Degl=no)
fi
COOKBOOK_MESON_FLAGS+=(-Dx11=true -Dtests=false)
cookbook_meson
"""

View File

@ -2,6 +2,9 @@
[source]
tar = "https://download.gnome.org/sources/libnotify/0.8/libnotify-0.8.4.tar.xz"
blake3 = "1c749e4f1cc85f88348bb363b6d78c8373baa19a6db4d2b3a4cf537c1af6b929"
patches = [
"redox.patch"
]
[build]
dependencies = [
@ -15,4 +18,3 @@ mesonflags = [
"-Dtests=false",
"-Dintrospection=disabled",
]

View File

@ -0,0 +1,11 @@
diff -ruwN source/tools/notify-send.c source-new/tools/notify-send.c
--- source/tools/notify-send.c 2025-02-20 03:59:41.000000000 +0100
+++ source-new/tools/notify-send.c 2026-06-21 12:16:03.152538528 +0200
@@ -25,6 +25,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <strings.h>
#include <glib.h>
#include <glib-unix.h>
#include <glib/gprintf.h>

View File

@ -23,5 +23,8 @@ cookbook_meson \
-Dsysprof=disabled \
-Dtests=false \
-Dtls_check=false
if [ "${COOKBOOK_DYNAMIC}" = "1" ]; then
patchelf --replace-needed "${COOKBOOK_SYSROOT}/usr/lib/libsqlite3.so" "libsqlite3.so" "${COOKBOOK_STAGE}/usr/lib/libsoup-3.0.so"
fi
"""

View File

@ -3,21 +3,24 @@
# build instructions: https://github.com/libsdl-org/SDL/blob/main/docs/README-cmake.md
# dependencies: https://github.com/libsdl-org/SDL/blob/main/docs/README-linux.md
[source]
tar = "https://github.com/libsdl-org/SDL/releases/download/release-3.4.0/SDL3-3.4.0.tar.gz"
git = "https://gitlab.redox-os.org/redox-os/sdl3.git"
branch = "redox-3.4.10"
[build]
template = "cmake"
cmakeflags = [
"-DSDL_DBUS=OFF",
"-DSDL_DISABLE_INSTALL_DOCS=ON",
"-DSDL_IBUS=OFF",
"-DSDL_LIBUDEV=OFF",
"-DSDL_LIBURING=OFF",
"-DSDL_OPENGL=OFF",
"-DSDL_OPENGLES=OFF",
"-DSDL_SHARED=ON",
"-DSDL_STATIC=OFF",
"-DSDL_TEST_LIBRARY=OFF",
"-DSDL_DISABLE_INSTALL_DOCS=ON",
"-DSDL_DBUS=OFF",
"-DSDL_LIBURING=OFF",
"-DSDL_IBUS=OFF",
"-DSDL_OPENGL=OFF",
"-DSDL_OPENGLES=OFF",
"-DSDL_LIBUDEV=OFF",
"-DSDL_AUDIO=OFF",
#TODO: orbital support
"-DSDL_UNIX_CONSOLE_BUILD=ON",
]
#dependencies = [
# "liborbital",

View File

@ -22,10 +22,16 @@ dev-dependencies = [
script = """
DYNAMIC_INIT
if [ "${COOKBOOK_DYNAMIC}" = "1" ]; then
COOKBOOK_MESON_FLAGS+=(-Dglx=dri)
else
COOKBOOK_MESON_FLAGS+=(-Dglx=xlib -Dshared-glapi=disabled)
fi
cookbook_meson \
-Ddri-drivers-path=/usr/lib/dri \
-Degl=disabled \
-Dglx=dri \
-Dllvm=enabled \
-Dgles1=disabled \
-Dgles2=disabled \

View File

@ -24,6 +24,7 @@ dependencies = [
"mesa-x11",
"openssl3",
"pixman",
"xkbcomp",
"x11proto",
"xtrans",
"zlib",
@ -31,6 +32,11 @@ dependencies = [
template = "custom"
script = """
DYNAMIC_INIT
if [ "${COOKBOOK_DYNAMIC}" != "1" ]; then
COOKBOOK_MESON_FLAGS+=(-Dglx=false -Dxnest=false)
fi
cookbook_meson \
-Ddri1=false \
-Dglamor=false \

View File

@ -4,7 +4,7 @@ use cookbook::cook::cook_build::{build, get_stage_dirs, remove_stage_dir};
use cookbook::cook::fetch::{FetchResult, fetch, fetch_offline};
use cookbook::cook::fs::{
create_dir, create_target_dir, get_git_commit_date, get_git_head_rev, get_git_rev_before_date,
remove_all, run_command,
read_toml, remove_all, run_command,
};
use cookbook::cook::package::{package, package_handle_push};
use cookbook::cook::pty::{PtyOut, UnixSlavePty, flush_pty, setup_pty, write_to_pty};
@ -24,7 +24,7 @@ use ratatui::text::{Line, Span, Text};
use ratatui::widgets::{Block, Borders, Clear, List, ListItem, ListState, Paragraph, Wrap};
use redox_installer::PackageConfig;
use std::borrow::Cow;
use std::collections::{BTreeMap, HashMap, HashSet};
use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet};
use std::io::{Read, Write, stderr, stdin, stdout};
use std::path::PathBuf;
use std::process::Command;
@ -515,30 +515,41 @@ fn parse_args(args: Vec<String>) -> Result<(CliConfig, CliCommand, Vec<CookRecip
if recipe_names.is_empty() {
if config.all || config.category.is_some() {
if !recipe_names.is_empty() {
bail_options_err!(
"Do not specify recipe names when using the --all or --category flag"
);
}
if config.all && config.category.is_some() {
bail_options_err!("Do not specify both --all and --category flag.");
}
if config.all && !command.is_cleaning() {
// because read_recipe is false by logic below
// some recipes on wip folders are invalid anyway
bail_options_err!(
"Refusing to run an unrealistic command to {} all recipes",
command.to_string()
);
}
let all_recipes_path = match command.is_cleaning() || config.all {
true => staged_pkg::list(""),
false => {
// get the list from repo/TARGET/repo.toml
let repo_toml_path = config.repo_dir.join(redoxer::target()).join("repo.toml");
if !repo_toml_path.is_file() {
bail_options_err!(
"The repository is not found: {}",
repo_toml_path.display()
);
};
let repos: pkg::Repository = read_toml(&repo_toml_path)?;
repos
.packages
.keys()
.filter_map(|n| staged_pkg::find(n).map(|s| s.to_path_buf()))
.collect::<BTreeSet<_>>()
}
};
let all_recipes_path = match &config.category {
None => staged_pkg::list(""),
Some(prefix) => staged_pkg::list("")
None => all_recipes_path,
Some(prefix) => all_recipes_path
.into_iter()
.filter(|p| p.starts_with(prefix))
.collect(),
};
if all_recipes_path.is_empty() {
bail_options_err!(
"No recipes found from the combination.\n\
Try pass both --all and --category=name"
);
}
for path in all_recipes_path {
// TODO: Allow selecting recipes from category as host?
let recipe = CookRecipe::from_path(&path, !command.is_cleaning(), false)?;

View File

@ -196,7 +196,7 @@ pub fn generate_html_pkg(
</html>"#,
network_size = format_size(package.network_size),
storage_size = format_size(package.storage_size),
published_short = &package.time_identifier[0..10],
published_short = &package.time_identifier.get(0..10).unwrap_or("-"),
published = package.time_identifier,
blake3 = package.blake3,
);