Merge branch 'fix-ci-prefix' into 'master'

Fix fetch-changed prefix, use rustinstall.sh for img

See merge request redox-os/redox!2237
This commit is contained in:
Jeremy Soller 2026-07-14 09:52:06 -06:00
commit f2e118a59f
5 changed files with 23 additions and 22 deletions

View File

@ -29,21 +29,25 @@ fetch-changed:
image: "redoxos/redox-base-x86_64"
stage: test
script:
- echo 'progress = bar:force:noscroll' > /etc/wgetrc
- curl "https://sh.rustup.rs" -sSf | sh -s -- -y --default-toolchain stable --profile minimal
- export PATH="$HOME/.cargo/bin:$PATH" PODMAN_BUILD=0 SKIP_CHECK_TOOLS=1
- make prefix/x86_64-unknown-redox/gcc-install
- ln -s gcc-install prefix/x86_64-unknown-redox/sysroot
- |
export PATH="$HOME/.cargo/bin:$PATH" &&
(curl "https://sh.rustup.rs" -sSf | sh -s -- -y --default-toolchain stable --profile minimal ) &&
cargo install cbindgen &&
env PODMAN_BUILD=0 SKIP_CHECK_TOOLS=1 ./scripts/fetch-changed.sh
(cd prefix/x86_64-unknown-redox/sysroot &&
sed "s|/usr/share|$(pwd)/share|g" "bin/libtoolize.orig" > "bin/libtoolize")
- ./scripts/fetch-changed.sh
img:
image: "redoxos/redox-base-x86_64"
stage: test
script:
- |
export PATH="$HOME/.cargo/bin:$PATH" &&
(curl "https://sh.rustup.rs" -sSf | sh -s -- -y --default-toolchain stable --profile minimal ) &&
cargo install cbindgen &&
PODMAN_BUILD=0 SKIP_CHECK_TOOLS=1 REPO_BINARY=1 FSTOOLS_NO_MOUNT=1 COOKBOOK_VERBOSE=false make ci-img IMG_TAG=$CI_COMMIT_REF_NAME
- echo 'progress = bar:force:noscroll' > /etc/wgetrc
- export PATH="$HOME/.cargo/bin:$PATH"
- export PODMAN_BUILD=0 SKIP_CHECK_TOOLS=1 REPO_BINARY=1 FSTOOLS_NO_MOUNT=1 COOKBOOK_VERBOSE=false
- ./podman/rustinstall.sh
- make ci-img IMG_TAG=$CI_COMMIT_REF_NAME
pkg:
image: "rust:trixie"

View File

@ -116,7 +116,7 @@
];
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
NIX_SHELL_BUILD = "1";
SKIP_CHECK_TOOLS = "1";
FSTOOLS_IN_PODMAN = "1";
shellHook = ''
# Install required configuration

View File

@ -5,15 +5,11 @@ ifneq ($(PODMAN_BUILD),1)
# Don't check for dependencies if you will be using Hosted Redox
ifneq ($(HOSTED_REDOX),1)
# don't check for Rust and Cargo if building on a Nix system
ifneq ($(NIX_SHELL_BUILD),1)
# don't check for compile tools, used when tools are managed externally, like in nix or CI
ifneq ($(SKIP_CHECK_TOOLS),1)
ifeq ($(shell which rustup),)
$(error rustup not found, install from "https://rustup.rs/")
endif
endif
# 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

View File

@ -58,8 +58,9 @@ cookbook_configure
# monkey patching to make paths working in target system
if [ "$TARGET" != "$COOKBOOK_HOST_TARGET" ]; then
PYTHON_INIT
sed -i "s/sccache //g" "$COOKBOOK_STAGE/usr/lib/$COOKBOOK_PYTHON_V/$_PYTHON_SYSCONFIGDATA_NAME.py"
sed -i "s|${COOKBOOK_SYSROOT}|/usr|g" "$COOKBOOK_STAGE/usr/lib/$COOKBOOK_PYTHON_V/$_PYTHON_SYSCONFIGDATA_NAME.py"
CONF="$COOKBOOK_STAGE/usr/lib/$COOKBOOK_PYTHON_V/$_PYTHON_SYSCONFIGDATA_NAME.py"
sed -i "s/sccache //g" "$CONF"
sed -i "s|${COOKBOOK_SYSROOT}|/usr|g" $CONF"
fi
"""

View File

@ -657,7 +657,7 @@ pub(crate) fn fetch_cargo(
cargopath: Option<&String>,
logger: &PtyOut,
) -> Result<()> {
if !check_toolchain_available() {
if !check_cargo_available() {
return Ok(());
}
@ -682,12 +682,12 @@ pub(crate) fn fetch_cargo(
Ok(())
}
/// Check if "REDOXER_TOOLCHAIN" is available.
fn check_toolchain_available() -> bool {
/// Check if "$REDOXER_TOOLCHAIN/bin/cargo" is available.
fn check_cargo_available() -> bool {
let Ok(dir) = std::env::var("REDOXER_TOOLCHAIN") else {
return false;
};
PathBuf::from(dir).is_dir()
PathBuf::from(dir).join("bin/cargo").is_file()
}
pub fn fetch_remote(