diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 413ca6aeb..8a699b1be 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,15 +1,27 @@ # The GitLab Continuous Integration configuration -image: "ubuntu:24.04" variables: GIT_STRATEGY: "clone" - GIT_SUBMODULE_STRATEGY: "recursive" stages: + - lint - test - - retag + +fmt: + stage: lint + script: + - rustup component add rustfmt + - cargo fmt -- --check + +cargo-test: + stage: lint + script: + # TODO: we should omit fuse from cargo install chains + - apt update && apt install -y fuse3 libfuse3-dev + - cargo test --locked img: + image: "ubuntu:24.04" stage: test rules: - if: '$CI_COMMIT_BRANCH == "master" && $CI_PROJECT_NAMESPACE == "redox-os"' @@ -35,16 +47,14 @@ img: help2man \ autoconf \ automake \ - zstd && - curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none + zstd script: - | - source "$HOME/.cargo/env" && + export PATH="$HOME/.cargo/bin:$PATH" && bash podman/rustinstall.sh && - cargo build --manifest-path installer/Cargo.toml --release && - PODMAN_BUILD=0 REPO_BINARY=1 make ci-img IMG_TAG=$CI_COMMIT_REF_NAME && + PODMAN_BUILD=0 REPO_BINARY=1 COOKBOOK_VERBOSE=false make ci-img IMG_TAG=$CI_COMMIT_REF_NAME && ([ $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master" ] && rm -rf build/img/* || true) artifacts: paths: - build/img/ - expire_in: 1 week \ No newline at end of file + expire_in: 1 week diff --git a/Cargo.lock b/Cargo.lock index 9b1567786..a09e7b856 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2166,9 +2166,8 @@ dependencies = [ [[package]] name = "redoxer" -version = "0.2.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ef2d308648e7006723774da783dd5d9a6c931387b3dc7f903a10fa1c2026d0d" +version = "0.2.61" +source = "git+https://gitlab.redox-os.org/redox-os/redoxer#ea965186ce02cfc01a7d2085dfd007cdc67649c6" dependencies = [ "anyhow", "dirs 6.0.0", diff --git a/Cargo.toml b/Cargo.toml index dd212b993..0a4de9c02 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,7 +38,7 @@ pkgar-core = { git = "https://gitlab.redox-os.org/redox-os/pkgar.git" } pkgar-keys = { git = "https://gitlab.redox-os.org/redox-os/pkgar.git" } redox-pkg = "0.2.8" redox_installer = "0.2.37" -redoxer = "0.2.60" +redoxer = { git = "https://gitlab.redox-os.org/redox-os/redoxer" } regex = "1.11" serde = { version = "=1.0.197", features = ["derive"] } termion = "4" diff --git a/Makefile b/Makefile index 1254c8792..982a3a592 100644 --- a/Makefile +++ b/Makefile @@ -69,8 +69,6 @@ endif # PODMAN_BUILD pull: git pull - git submodule sync --recursive - git submodule update --recursive --init repo: $(BUILD)/repo.tag diff --git a/config.sh b/config.sh deleted file mode 100755 index 9806b8ccf..000000000 --- a/config.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/env bash -set -e - -# Configuration -if [ -z "${TARGET}" ] -then - export TARGET=x86_64-unknown-redox -fi -if [ $(uname -s) = 'Redox' ] -then - export IS_REDOX="1" -fi - -ARCH="${TARGET%%-*}" -HOST="$TARGET" -if [ x"${HOST}" == x"riscv64gc-unknown-redox" ] ; then - HOST="riscv64-unknown-redox" -fi - -# Cookbook requires correct CWD to work -cd `dirname "$0"` - -# Automatic variables -ROOT=`pwd` - -export AR="${HOST}-gcc-ar" -export AS="${HOST}-as" -export CC="${HOST}-gcc" -export CXX="${HOST}-g++" -export LD="${HOST}-ld" -export NM="${HOST}-gcc-nm" -export OBJCOPY="${HOST}-objcopy" -export OBJDUMP="${HOST}-objdump" -export PKG_CONFIG="${HOST}-pkg-config" -export RANLIB="${HOST}-gcc-ranlib" -export READELF="${HOST}-readelf" -export STRIP="${HOST}-strip" - -if [ -n "${CC_WRAPPER}" ] -then - export CC="${CC_WRAPPER} ${CC}" - export CXX="${CC_WRAPPER} ${CXX}" -fi - -BUILD="$(cc -dumpmachine)" - -export PKG_CONFIG_FOR_BUILD="pkg-config" - -if [[ "$OSTYPE" == "darwin"* ]] || [[ "$OSTYPE" == "FreeBSD" ]]; then - # GNU find - FIND="gfind"; -else - FIND="find"; -fi - -export FIND - -if [ -z "${IS_REDOX}" ] -then -function repo { - "$ROOT/target/release/repo" "$@" -} -fi diff --git a/mk/ci.mk b/mk/ci.mk index e150b8003..e1faf617f 100644 --- a/mk/ci.mk +++ b/mk/ci.mk @@ -28,7 +28,7 @@ ifeq ($(PODMAN_BUILD),1) else $(HOST_CARGO) build --manifest-path Cargo.toml --release export CI=1 COOKBOOK_LOGS=true PATH="$(PREFIX_PATH):$$PATH" COOKBOOK_HOST_SYSROOT="$(ROOT)/$(PREFIX_INSTALL)" && \ - ./repo.sh $(REPO_APPSTREAM) $(REPO_NONSTOP) --with-package-deps "--filesystem=config/$(ARCH)/ci.toml" + ./target/release/repo cook --with-package-deps "--filesystem=config/$(ARCH)/ci.toml" endif # CI toolchain diff --git a/mk/config.mk b/mk/config.mk index 64c973376..45f43bb31 100644 --- a/mk/config.mk +++ b/mk/config.mk @@ -78,19 +78,13 @@ endif endif ifeq ($(REPO_APPSTREAM),1) - REPO_APPSTREAM=--appstream -else ifeq ($(REPO_APPSTREAM),0) - REPO_APPSTREAM= + export COOKBOOK_APPSTREAM=true endif ifeq ($(REPO_NONSTOP),1) - REPO_NONSTOP=--nonstop -else ifeq ($(REPO_NONSTOP),0) - REPO_NONSTOP= + export COOKBOOK_NONSTOP=true endif ifeq ($(REPO_OFFLINE),1) - REPO_OFFLINE=--offline -else ifeq ($(REPO_OFFLINE),0) - REPO_OFFLINE= + export COOKBOOK_OFFLINE=true endif ifeq ($(REPO_DEBUG),1) export COOKBOOK_NOSTRIP=true @@ -141,13 +135,11 @@ FSTOOLS=build/fstools INSTALLER=$(FSTOOLS)/bin/redox_installer REDOXFS=$(FSTOOLS)/bin/redoxfs REDOXFS_MKFS=$(FSTOOLS)/bin/redoxfs-mkfs -INSTALLER_OPTS= +INSTALLER_OPTS=--cookbook=. COOKBOOK_OPTS="--filesystem=$(FILESYSTEM_CONFIG)" -ifeq ($(REPO_BINARY),0) -INSTALLER_OPTS+=--cookbook=. -else -INSTALLER_OPTS+=--cookbook=. --repo-binary -COOKBOOK_OPTS+=" --repo-binary" +ifeq ($(REPO_BINARY),1) +INSTALLER_OPTS+=--repo-binary +COOKBOOK_OPTS+=--repo-binary endif REPO_TAG=$(BUILD)/repo.tag diff --git a/mk/prefix.mk b/mk/prefix.mk index 12addd823..4fa0e8716 100644 --- a/mk/prefix.mk +++ b/mk/prefix.mk @@ -47,7 +47,7 @@ endif $(PREFIX)/relibc: | $(RELIBC_SOURCE) mkdir -p "$(@D)" rm -rf "$@.partial" "$@" - cp -r "$^" "$@.partial" + cp -r "$(RELIBC_SOURCE)" "$@.partial" touch "$@.partial" mv "$@.partial" "$@" @@ -162,6 +162,7 @@ endif else $(ROOT)/rust/configure: + git submodule sync --recursive git submodule update --progress --init --recursive --checkout rust PREFIX_FREESTANDING_INSTALL=$(PREFIX)/gcc-freestanding-install @@ -247,7 +248,7 @@ endif $(PREFIX)/relibc-freestanding: | $(RELIBC_SOURCE) mkdir -p "$(@D)" rm -rf "$@.partial" "$@" - cp -r "$^" "$@.partial" + cp -r "$(RELIBC_SOURCE)" "$@.partial" touch "$@.partial" mv "$@.partial" "$@" diff --git a/mk/repo.mk b/mk/repo.mk index 2a105bef0..df04615f0 100644 --- a/mk/repo.mk +++ b/mk/repo.mk @@ -6,7 +6,7 @@ ifeq ($(PODMAN_BUILD),1) else export PATH="$(PREFIX_PATH):$$PATH" && \ export COOKBOOK_HOST_SYSROOT="$(ROOT)/$(PREFIX_INSTALL)" && \ - ./repo.sh $(REPO_APPSTREAM) $(REPO_NONSTOP) $(REPO_OFFLINE) $(COOKBOOK_OPTS) --with-package-deps + ./target/release/repo cook $(COOKBOOK_OPTS) --with-package-deps mkdir -p $(BUILD) touch $@ endif @@ -54,7 +54,7 @@ ifeq ($(PODMAN_BUILD),1) else export PATH="$(PREFIX_PATH):$$PATH" && \ export COOKBOOK_HOST_SYSROOT="$(ROOT)/$(PREFIX_INSTALL)" && \ - ./repo.sh $(REPO_OFFLINE) $(foreach f,$(subst $(comma), ,$*),$(f)) $(COOKBOOK_OPTS) + ./target/release/repo cook $(foreach f,$(subst $(comma), ,$*),$(f)) $(COOKBOOK_OPTS) endif MOUNTED_TAG=$(MOUNT_DIR)~ @@ -70,7 +70,6 @@ else $(MAKE) mount; \ touch $(MOUNTED_TAG); \ fi - $(if $(findstring nonstop,$(REPO_NONSTOP)),export COOKBOOK_NONSTOP=true && ,) \ ./target/release/repo push $(foreach f,$(subst $(comma), ,$*),$(f)) "--sysroot=$(MOUNT_DIR)" @if [ -f $(MOUNTED_TAG) ]; then \ $(MAKE) unmount && rm -f $(MOUNTED_TAG); \ @@ -92,7 +91,6 @@ else $(MAKE) mount; \ touch $(MOUNTED_TAG); \ fi - $(if $(findstring nonstop,$(REPO_NONSTOP)),export COOKBOOK_NONSTOP=true && ,) \ ./target/release/repo push $(COOKBOOK_OPTS) --with-package-deps "--sysroot=$(MOUNT_DIR)" @if [ -f $(MOUNTED_TAG) ]; then \ $(MAKE) unmount && rm -f $(MOUNTED_TAG); \ diff --git a/native_bootstrap.sh b/native_bootstrap.sh index ac40762a0..3c89dc87b 100755 --- a/native_bootstrap.sh +++ b/native_bootstrap.sh @@ -1014,7 +1014,7 @@ statusCheck() boot() { echo "Cloning gitlab repo..." - git clone https://gitlab.redox-os.org/redox-os/redox.git --origin upstream --recursive + git clone https://gitlab.redox-os.org/redox-os/redox.git --origin upstream echo "Creating .config with PODMAN_BUILD=0" echo 'PODMAN_BUILD?=0' > redox/.config echo "Cleaning up..." @@ -1047,7 +1047,6 @@ if [ "$1" == "-h" ] || [ "$1" == "--help" ]; then usage elif [ "$1" == "-u" ]; then git pull upstream master - git submodule update --recursive --init exit elif [ "$1" == "-s" ]; then statusCheck @@ -1088,7 +1087,6 @@ fi if [ "$update" == "true" ]; then git pull upstream master - git submodule update --recursive --init exit fi diff --git a/podman_bootstrap.sh b/podman_bootstrap.sh index 55f34997f..a13f96961 100755 --- a/podman_bootstrap.sh +++ b/podman_bootstrap.sh @@ -560,7 +560,7 @@ rustInstall() boot() { echo "Cloning gitlab repo..." - git clone https://gitlab.redox-os.org/redox-os/redox.git --origin upstream --recursive + git clone https://gitlab.redox-os.org/redox-os/redox.git --origin upstream echo "Creating .config with PODMAN_BUILD=1" echo 'PODMAN_BUILD?=1' > redox/.config if [[ "$(uname -m)" == "arm64" ]]; then @@ -596,7 +596,6 @@ if [ "$1" == "-h" ] || [ "$1" == "--help" ]; then usage elif [ "$1" == "-u" ]; then git pull upstream master - git submodule update --recursive --init exit fi @@ -622,7 +621,6 @@ rustInstall "$noninteractive" if [ "$update" == "true" ]; then git pull upstream master - git submodule update --recursive --init exit fi diff --git a/recipes/wip/db/clickhouse/recipe.toml b/recipes/wip/db/clickhouse/recipe.toml index 5c52357eb..67eff9c3b 100644 --- a/recipes/wip/db/clickhouse/recipe.toml +++ b/recipes/wip/db/clickhouse/recipe.toml @@ -1,12 +1,13 @@ #TODO not compiled or tested # build instructions: https://clickhouse.com/docs/en/development/build#how-to-build-clickhouse-on-any-linux -#TODO probably disable some submodules to use our recipes [source] -tar = "https://github.com/ClickHouse/ClickHouse" +git = "https://github.com/ClickHouse/ClickHouse" +rev = "v25.10.2.65-stable" +shallow_clone = true [build] template = "cmake" dependencies = [ "curl", - "openssl1", + "openssl3", "xz", ] diff --git a/recipes/wip/db/memcached/recipe.toml b/recipes/wip/db/memcached/recipe.toml index 89f494be8..5e6ebc378 100644 --- a/recipes/wip/db/memcached/recipe.toml +++ b/recipes/wip/db/memcached/recipe.toml @@ -1,5 +1,5 @@ -#TODO probably wrong template, see https://github.com/memcached/memcached/wiki/Install#from-source -#TODO make libevent works +#TODO not compiled or tested +# build instructions: https://docs.memcached.org/serverguide/#from-source [source] tar = "https://www.memcached.org/files/memcached-1.6.22.tar.gz" [build] diff --git a/recipes/wip/db/mysql-server/recipe.toml b/recipes/wip/db/mysql-server/recipe.toml index 4c9785001..c94fb4448 100644 --- a/recipes/wip/db/mysql-server/recipe.toml +++ b/recipes/wip/db/mysql-server/recipe.toml @@ -3,13 +3,9 @@ [source] tar = "https://dev.mysql.com/downloads/file/?id=523432" [build] -template = "custom" +template = "cmake" dependencies = [ "boost", "ncurses", - "openssl1", + "openssl3", ] -script = """ -export CPPFLAGS="-I${COOKBOOK_SYSROOT}/include/ncurses" -cookbook_cmake -""" diff --git a/recipes/wip/db/mysql-shell/recipe.toml b/recipes/wip/db/mysql-shell/recipe.toml index 03b5312ff..596ca67dd 100644 --- a/recipes/wip/db/mysql-shell/recipe.toml +++ b/recipes/wip/db/mysql-shell/recipe.toml @@ -1,4 +1,4 @@ -#TODO missing script for cross-compilation +#TODO missing script [source] tar = "https://dev.mysql.com/downloads/file/?id=524161" [build] diff --git a/recipes/wip/db/rocksdb/recipe.toml b/recipes/wip/db/rocksdb/recipe.toml index 844a64945..94e5507e7 100644 --- a/recipes/wip/db/rocksdb/recipe.toml +++ b/recipes/wip/db/rocksdb/recipe.toml @@ -1,7 +1,8 @@ -#TODO missing script for "make", see https://github.com/facebook/rocksdb/blob/main/INSTALL.md +#TODO missing script for gnu make: https://github.com/facebook/rocksdb/blob/main/INSTALL.md [source] git = "https://github.com/facebook/rocksdb" -rev = "49ce8a1064dd1ad89117899839bf136365e49e79" +rev = "v10.7.5" +shallow_clone = true [build] template = "custom" dependencies = [ diff --git a/recipes/wip/files/gnome-files/recipe.toml b/recipes/wip/files/gnome-files/recipe.toml new file mode 100644 index 000000000..18199b870 --- /dev/null +++ b/recipes/wip/files/gnome-files/recipe.toml @@ -0,0 +1,19 @@ +#TODO not compiled or tested +#TODO discover minimum dependencies from meson log +[source] +tar = "https://download.gnome.org/sources/nautilus/49/nautilus-49.1.tar.xz" +[build] +template = "meson" +mesonflags = [ + "-Dextensions=false", + "-Dintrospection=false", + "-Dpackagekit=false", + "-Dselinux=disabled", + "-Dcloudproviders=disabled", + "-Dtests=none", +] +#[package] # probably optional dependencies +#dependencies = [ +# "localsearch", +# "xdg-user-dirs-gtk", +#] diff --git a/recipes/wip/files/kde-dolphin/recipe.toml b/recipes/wip/files/kde-dolphin/recipe.toml new file mode 100644 index 000000000..e562f033d --- /dev/null +++ b/recipes/wip/files/kde-dolphin/recipe.toml @@ -0,0 +1,8 @@ +#TODO not compiled or tested +#TODO discover minimum dependencies from cmake log +[source] +git = "https://invent.kde.org/system/dolphin" +branch = "release/25.08" +shallow_clone = true +[build] +template = "cmake" diff --git a/recipes/wip/libs/gtk/xdg-user-dirs-gtk/recipe.toml b/recipes/wip/libs/gtk/xdg-user-dirs-gtk/recipe.toml new file mode 100644 index 000000000..53fbbc03d --- /dev/null +++ b/recipes/wip/libs/gtk/xdg-user-dirs-gtk/recipe.toml @@ -0,0 +1,5 @@ +#TODO not compiled or tested +[source] +tar = "https://download.gnome.org/sources/xdg-user-dirs-gtk/0.14/xdg-user-dirs-gtk-0.14.tar.xz" +[build] +template = "meson" diff --git a/recipes/wip/math/gnome-calculator/recipe.toml b/recipes/wip/math/gnome-calculator/recipe.toml index 333ffd55d..2b0c34330 100644 --- a/recipes/wip/math/gnome-calculator/recipe.toml +++ b/recipes/wip/math/gnome-calculator/recipe.toml @@ -1,6 +1,5 @@ #TODO not compiled or tested -# lacking build instructions -# build options: https://gitlab.gnome.org/GNOME/gnome-calculator/-/blob/main/meson_options.txt?ref_type=heads +#TODO determine minimum dependencies from meson log [source] tar = "https://download.gnome.org/sources/gnome-calculator/49/gnome-calculator-49.1.1.tar.xz" [build] diff --git a/recipes/wip/net/http/apache-httpd/recipe.toml b/recipes/wip/net/http/apache-httpd/recipe.toml index b882a489b..f75c1f022 100644 --- a/recipes/wip/net/http/apache-httpd/recipe.toml +++ b/recipes/wip/net/http/apache-httpd/recipe.toml @@ -1,6 +1,6 @@ #TODO compiles but requires setgroups syscall at startup [source] -tar="https://dlcdn.apache.org/httpd/httpd-2.4.61.tar.bz2" +tar= "https://dlcdn.apache.org/httpd/httpd-2.4.61.tar.bz2" patches = [ "redox.patch", ] diff --git a/recipes/wip/net/ssh/dropbear/recipe.toml b/recipes/wip/net/ssh/dropbear/recipe.toml index 487c164ce..fdffc6bd0 100644 --- a/recipes/wip/net/ssh/dropbear/recipe.toml +++ b/recipes/wip/net/ssh/dropbear/recipe.toml @@ -1,23 +1,19 @@ +#TODO test dynamic linking [source] git = "https://gitlab.redox-os.org/tfinnegan937/dropbear.git" rev = "4c6828d39f988712cf4d2a64c7acf15d76f24aa9" - [build] -template = "custom" +template = "configure" +configureflags = [ + "--disable-syslog", + "--disable-utmpx", + "--disable-utmp", + "--disable-lastlog", + "--disable-loginfunc", + "--disable-wtmp", + "--disable-wtmpx", +] dependencies = [ "openssl1", "zlib" ] -script=""" -COOKBOOK_CONFIGURE_FLAGS+=( - --enable-static - --disable-syslog - --disable-utmpx - --disable-utmp - --disable-lastlog - --disable-loginfunc - --disable-wtmp - --disable-wtmpx -) -cookbook_configure -""" diff --git a/recipes/wip/search/localsearch/recipe.toml b/recipes/wip/search/localsearch/recipe.toml new file mode 100644 index 000000000..6687bc50f --- /dev/null +++ b/recipes/wip/search/localsearch/recipe.toml @@ -0,0 +1,14 @@ +#TODO not compiled or tested +#TODO discover minimum dependencies from meson log +[source] +tar = "https://download.gnome.org/sources/localsearch/3.10/localsearch-3.10.1.tar.xz" +[build] +template = "meson" +mesonflags = [ + "-Dfunctional_tests=false", + "-Dsandbox_tests=false", + "-Dseccomp=false", + "-Dbattery_detection=none", + "-Dsystemd_user_services=false", + "-Dman=false", +] diff --git a/recipes/wip/system/discover/recipe.toml b/recipes/wip/system/discover/recipe.toml new file mode 100644 index 000000000..32828d4da --- /dev/null +++ b/recipes/wip/system/discover/recipe.toml @@ -0,0 +1,8 @@ +#TODO not compiled or tested +#TODO determine minimum dependencies from cmake log +[source] +git = "https://invent.kde.org/plasma/discover" +branch = "Plasma/6.5" +shallow_clone = true +[build] +template = "cmake" diff --git a/repo.sh b/repo.sh deleted file mode 100755 index ab6ea895c..000000000 --- a/repo.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash -set -e - -source `dirname "$0"`/config.sh - -COOK_OPT="" -recipes="" -for arg in "${@:1}" -do - if [[ "$arg" == "--appstream" ]] - then - export APPSTREAM="1" - elif [[ "$arg" == "--offline" ]] - then - export COOKBOOK_OFFLINE=true - elif [[ "$arg" == "--nonstop" ]] - then - export COOKBOOK_NONSTOP=true - elif [[ $arg == "--*" ]] - then - COOK_OPT+=" ${arg}" - else - recipes+=" $arg" - fi -done - -repo cook $COOK_OPT $recipes diff --git a/src/bin/repo.rs b/src/bin/repo.rs index 429d23222..b3f09a226 100644 --- a/src/bin/repo.rs +++ b/src/bin/repo.rs @@ -65,6 +65,7 @@ const REPO_HELP_STR: &str = r#" CI= set to any value to disable TUI COOKBOOK_LOGS= whether to capture build logs (default is !CI) COOKBOOK_OFFLINE=false prevent internet access if possible + ignored when command "fetch" is used COOKBOOK_NONSTOP=false pkeep running even a recipe build failed COOKBOOK_VERBOSE=true print success/error on each recipe COOKBOOK_MAKE_JOBS= override build jobs count from nproc @@ -277,8 +278,9 @@ fn repo_inner( Ok(match *command { CliCommand::Fetch | CliCommand::Cook => { let repo_inner_fn = move |logger: &PtyOut| -> Result<(), anyhow::Error> { - let source_dir = handle_fetch(recipe, config, logger)?; - if *command == CliCommand::Cook { + let is_cook = *command == CliCommand::Cook; + let source_dir = handle_fetch(recipe, config, is_cook, logger)?; + if is_cook { handle_cook(recipe, config, source_dir, recipe.is_deps, logger)?; } Ok(()) @@ -534,10 +536,11 @@ fn parse_args(args: Vec) -> anyhow::Result<(CliConfig, CliCommand, Vec anyhow::Result { let recipe_dir = &recipe.dir; - let source_dir = match config.cook.offline { + let source_dir = match config.cook.offline && allow_offline { true => fetch_offline(recipe_dir, &recipe.recipe, logger), false => fetch(recipe_dir, &recipe.recipe, logger), } @@ -1102,7 +1105,7 @@ fn run_tui_cook( fetcher_status_tx .send(StatusUpdate::StartFetch(name.clone())) .unwrap(); - let handler = handle_fetch(&recipe, &fetcher_config, &logger); + let handler = handle_fetch(&recipe, &fetcher_config, true, &logger); if let Some(log_path) = fetcher_config.logs_dir.as_ref() // successful fetch log usually not that helpful && handler.is_err() diff --git a/src/bin/repo_builder.rs b/src/bin/repo_builder.rs index 400391bd5..c6758a9f4 100644 --- a/src/bin/repo_builder.rs +++ b/src/bin/repo_builder.rs @@ -90,7 +90,7 @@ fn publish_packages(recipe_list: Vec, repo_dir: String) -> anyhow::Resul } // === 2. Optional AppStream generation === - if env::var("APPSTREAM").ok().as_deref() == Some("1") { + if env::var("COOKBOOK_APPSTREAM").ok().as_deref() == Some("true") { eprintln!("\x1b[01;38;5;155mrepo - generating appstream data\x1b[0m"); let root = env::var("ROOT").unwrap_or_else(|_| ".".into()); diff --git a/src/cook/cook_build.rs b/src/cook/cook_build.rs index fde4d0687..2fb19b6bb 100644 --- a/src/cook/cook_build.rs +++ b/src/cook/cook_build.rs @@ -411,7 +411,13 @@ fn build_auto_deps( } fn get_remote_url(name: &PackageName, ext: &str) -> String { - return format!("{}/{}/{}.{}", REMOTE_PKG_SOURCE, redoxer::target(), name, ext); + return format!( + "{}/{}/{}.{}", + REMOTE_PKG_SOURCE, + redoxer::target(), + name, + ext + ); } fn get_pubkey_url() -> String { return format!("{}/id_ed25519.pub.toml", REMOTE_PKG_SOURCE); diff --git a/src/cook/script.rs b/src/cook/script.rs index a5b221259..57c06990f 100644 --- a/src/cook/script.rs +++ b/src/cook/script.rs @@ -84,10 +84,7 @@ function GNU_CONFIG_GET { pub(crate) static BUILD_PRESCRIPT: &str = r#" # Add cookbook bins to path -if [ -z "${IS_REDOX}" ] -then export PATH="${COOKBOOK_ROOT}/bin:${PATH}" -fi # This puts cargo build artifacts in the build directory export CARGO_TARGET_DIR="${COOKBOOK_BUILD}/target" @@ -185,16 +182,6 @@ COOKBOOK_CONFIGURE_FLAGS=( ) COOKBOOK_MAKE="make" -if [ -z "${COOKBOOK_MAKE_JOBS}" ] -then -if [ -z "${IS_REDOX}" ] -then -COOKBOOK_MAKE_JOBS="$(nproc)" -else -COOKBOOK_MAKE_JOBS="1" -fi -fi - function cookbook_configure { "${COOKBOOK_CONFIGURE}" "${COOKBOOK_CONFIGURE_FLAGS[@]}" "$@" "${COOKBOOK_MAKE}" -j "${COOKBOOK_MAKE_JOBS}"