From 5330af8cc09cbe02a778a6b0ad18ef1bde78fd3c Mon Sep 17 00:00:00 2001 From: J Robert Ray Date: Mon, 8 Jun 2026 17:53:07 -0700 Subject: [PATCH 1/8] Handle Rust 1.93 lint regressions Add module-level unused_assignments allowances to the thiserror-heavy error modules and migration graph code that now trigger macro-generated warnings under Rust 1.93 while linting with -Dwarnings. Also mark the cmd-build environment-ops test with spfstest so the staged branch state continues to pass the test suite. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: J Robert Ray --- crates/spfs-vfs/src/error.rs | 2 ++ crates/spfs/src/storage/fs/migrations/error.rs | 2 ++ crates/spk-cli/cmd-build/src/cmd_build_test/mod.rs | 1 + crates/spk-cli/common/src/error.rs | 2 ++ crates/spk-config/src/error.rs | 2 ++ crates/spk-exec/src/error.rs | 2 ++ crates/spk-schema/src/error.rs | 2 ++ crates/spk-solve/crates/graph/src/error.rs | 2 ++ crates/spk-solve/crates/graph/src/graph.rs | 2 ++ crates/spk-solve/crates/package-iterator/src/error.rs | 2 ++ crates/spk-solve/crates/solution/src/error.rs | 2 ++ crates/spk-solve/crates/validation/src/error.rs | 2 ++ crates/spk-solve/src/error.rs | 2 ++ crates/spk-storage/src/error.rs | 2 ++ crates/spk-workspace/src/error.rs | 2 ++ 15 files changed, 29 insertions(+) diff --git a/crates/spfs-vfs/src/error.rs b/crates/spfs-vfs/src/error.rs index b80cbe0133..6aeb2ac785 100644 --- a/crates/spfs-vfs/src/error.rs +++ b/crates/spfs-vfs/src/error.rs @@ -2,6 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 // https://github.com/spkenv/spk +#![allow(unused_assignments)] + use thiserror::Error; /// Errors specific to fuse operations. diff --git a/crates/spfs/src/storage/fs/migrations/error.rs b/crates/spfs/src/storage/fs/migrations/error.rs index abd937f0ba..8f09dfb1aa 100644 --- a/crates/spfs/src/storage/fs/migrations/error.rs +++ b/crates/spfs/src/storage/fs/migrations/error.rs @@ -2,6 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 // https://github.com/spkenv/spk +#![allow(unused_assignments)] + pub type MigrationResult = std::result::Result; #[derive(Debug, miette::Diagnostic, thiserror::Error)] diff --git a/crates/spk-cli/cmd-build/src/cmd_build_test/mod.rs b/crates/spk-cli/cmd-build/src/cmd_build_test/mod.rs index 13da4ef3cd..873ae6526b 100644 --- a/crates/spk-cli/cmd-build/src/cmd_build_test/mod.rs +++ b/crates/spk-cli/cmd-build/src/cmd_build_test/mod.rs @@ -950,6 +950,7 @@ build: .expect("Expected build of consumer to succeed"); } +#[spfstest] #[rstest] #[case::cli("cli")] #[case::checks("checks")] diff --git a/crates/spk-cli/common/src/error.rs b/crates/spk-cli/common/src/error.rs index 5832ec9207..ee7dc8b365 100644 --- a/crates/spk-cli/common/src/error.rs +++ b/crates/spk-cli/common/src/error.rs @@ -2,6 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 // https://github.com/spkenv/spk +#![allow(unused_assignments)] + use colored::Colorize; use miette::Diagnostic; use spk_schema::foundation::format::FormatError; diff --git a/crates/spk-config/src/error.rs b/crates/spk-config/src/error.rs index edbed00b4c..b8488ad936 100644 --- a/crates/spk-config/src/error.rs +++ b/crates/spk-config/src/error.rs @@ -2,6 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 // https://github.com/spkenv/spk +#![allow(unused_assignments)] + use std::io; use miette::Diagnostic; diff --git a/crates/spk-exec/src/error.rs b/crates/spk-exec/src/error.rs index b3671c4727..150329772c 100644 --- a/crates/spk-exec/src/error.rs +++ b/crates/spk-exec/src/error.rs @@ -2,6 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 // https://github.com/spkenv/spk +#![allow(unused_assignments)] + use miette::Diagnostic; use thiserror::Error; diff --git a/crates/spk-schema/src/error.rs b/crates/spk-schema/src/error.rs index 40a205bf1a..c932f34643 100644 --- a/crates/spk-schema/src/error.rs +++ b/crates/spk-schema/src/error.rs @@ -2,6 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 // https://github.com/spkenv/spk +#![allow(unused_assignments)] + use miette::Diagnostic; use thiserror::Error; diff --git a/crates/spk-solve/crates/graph/src/error.rs b/crates/spk-solve/crates/graph/src/error.rs index 700ed48f9e..8c63182485 100644 --- a/crates/spk-solve/crates/graph/src/error.rs +++ b/crates/spk-solve/crates/graph/src/error.rs @@ -2,6 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 // https://github.com/spkenv/spk +#![allow(unused_assignments)] + use std::fmt::Write; use colored::Colorize; diff --git a/crates/spk-solve/crates/graph/src/graph.rs b/crates/spk-solve/crates/graph/src/graph.rs index 52dde58b99..12133ab50b 100644 --- a/crates/spk-solve/crates/graph/src/graph.rs +++ b/crates/spk-solve/crates/graph/src/graph.rs @@ -2,6 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 // https://github.com/spkenv/spk +#![allow(unused_assignments)] + use std::collections::hash_map::{DefaultHasher, Entry}; use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet, VecDeque}; use std::hash::{Hash, Hasher}; diff --git a/crates/spk-solve/crates/package-iterator/src/error.rs b/crates/spk-solve/crates/package-iterator/src/error.rs index 274bb0335c..e6e23b7958 100644 --- a/crates/spk-solve/crates/package-iterator/src/error.rs +++ b/crates/spk-solve/crates/package-iterator/src/error.rs @@ -2,6 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 // https://github.com/spkenv/spk +#![allow(unused_assignments)] + use miette::Diagnostic; use thiserror::Error; diff --git a/crates/spk-solve/crates/solution/src/error.rs b/crates/spk-solve/crates/solution/src/error.rs index a3a19a63ef..ba5cbbbb21 100644 --- a/crates/spk-solve/crates/solution/src/error.rs +++ b/crates/spk-solve/crates/solution/src/error.rs @@ -2,6 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 // https://github.com/spkenv/spk +#![allow(unused_assignments)] + use miette::Diagnostic; use thiserror::Error; diff --git a/crates/spk-solve/crates/validation/src/error.rs b/crates/spk-solve/crates/validation/src/error.rs index 976baf9bce..bb01db0b70 100644 --- a/crates/spk-solve/crates/validation/src/error.rs +++ b/crates/spk-solve/crates/validation/src/error.rs @@ -2,6 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 // https://github.com/spkenv/spk +#![allow(unused_assignments)] + use colored::Colorize; use miette::Diagnostic; use spk_schema::foundation::format::FormatError; diff --git a/crates/spk-solve/src/error.rs b/crates/spk-solve/src/error.rs index 4b7617552a..a24de7075c 100644 --- a/crates/spk-solve/src/error.rs +++ b/crates/spk-solve/src/error.rs @@ -2,6 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 // https://github.com/spkenv/spk +#![allow(unused_assignments)] + use std::path::PathBuf; use colored::Colorize; diff --git a/crates/spk-storage/src/error.rs b/crates/spk-storage/src/error.rs index 6914fb10c6..6c730d324d 100644 --- a/crates/spk-storage/src/error.rs +++ b/crates/spk-storage/src/error.rs @@ -2,6 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 // https://github.com/spkenv/spk +#![allow(unused_assignments)] + use miette::Diagnostic; use spk_schema::{AnyIdent, VersionIdent}; use thiserror::Error; diff --git a/crates/spk-workspace/src/error.rs b/crates/spk-workspace/src/error.rs index 35929ed44e..29edad4539 100644 --- a/crates/spk-workspace/src/error.rs +++ b/crates/spk-workspace/src/error.rs @@ -2,6 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 // https://github.com/spkenv/spk +#![allow(unused_assignments)] + //! Errors reported by this crate. use std::path::PathBuf; From 7aa0b53c87b9bbafd1d9093a11edb85027e3af4b Mon Sep 17 00:00:00 2001 From: J Robert Ray Date: Mon, 15 Jun 2026 15:41:46 -0700 Subject: [PATCH 2/8] Disable default repo index use Use the global solver.use_indexes setting when a non-destructive repo operation reaches an unconfigured repository instead of assuming every non-local repo should use an index. Add a regression test that exercises an unconfigured origin repo, and serialize it under a dedicated spk_config lock because it mutates the global spk config. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: J Robert Ray --- Cargo.lock | 1 + crates/spk-cli/common/Cargo.toml | 1 + crates/spk-cli/common/src/flags.rs | 6 ++- crates/spk-cli/common/src/flags_test.rs | 57 +++++++++++++++++++++++++ cspell.json | 1 + 5 files changed, 64 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7999cfc455..a56d5ae213 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4369,6 +4369,7 @@ dependencies = [ "sentry-tracing", "serde_json", "serde_yaml 0.9.34+deprecated", + "serial_test", "spfs", "spfstest", "spk-build", diff --git a/crates/spk-cli/common/Cargo.toml b/crates/spk-cli/common/Cargo.toml index c18133beb7..d45e83c8bd 100644 --- a/crates/spk-cli/common/Cargo.toml +++ b/crates/spk-cli/common/Cargo.toml @@ -57,5 +57,6 @@ nix = { workspace = true } [dev-dependencies] rstest = { workspace = true } +serial_test = { workspace = true } spfstest = { workspace = true } \ No newline at end of file diff --git a/crates/spk-cli/common/src/flags.rs b/crates/spk-cli/common/src/flags.rs index 8828691217..dc66d2d1dc 100644 --- a/crates/spk-cli/common/src/flags.rs +++ b/crates/spk-cli/common/src/flags.rs @@ -1321,8 +1321,10 @@ impl Repositories { } // The fallback default if there's no configuration for this repo. None => { - // Enable index use on all repositories, except the 'local' repo. - let default_index_use = name != "local"; + // Respect the global solver setting for unconfigured repos. + // Local repos remain non-indexed by default because they are + // usually small and often do not have an index at all. + let default_index_use = config.solver.use_indexes && name != "local"; tracing::debug!( "Using default use index setting for '{name}' repo, which is: {} ({} index use)", default_index_use, diff --git a/crates/spk-cli/common/src/flags_test.rs b/crates/spk-cli/common/src/flags_test.rs index 29a89b25d0..8d978859c8 100644 --- a/crates/spk-cli/common/src/flags_test.rs +++ b/crates/spk-cli/common/src/flags_test.rs @@ -2,16 +2,33 @@ // SPDX-License-Identifier: Apache-2.0 // https://github.com/spkenv/spk +use clap::Parser; use rstest::rstest; +use spfs::RemoteAddress; +use spfs::config::Remote; +use spfstest::spfstest; use spk_schema::RequestWithOptions; use spk_schema::foundation::name::OptName; use spk_schema::foundation::option_map::OptionMap; use spk_schema::ident::{PkgRequestOptionValue, VarRequest}; use spk_schema::option_map::HOST_OPTIONS; use spk_solve::Solver; +use spk_storage::RepositoryHandle; +use spk_storage::fixtures::{spfs_runtime, spfsrepo}; use crate::flags::{DecisionFormatterSettings, SolverToRun, SolverToShow}; +struct SpkConfigRestore(spk_config::Config); + +impl Drop for SpkConfigRestore { + fn drop(&mut self) { + self.0 + .clone() + .make_current() + .expect("Failed to restore spk config after test"); + } +} + #[rstest] #[case(&["hello:world"], &[("hello", "world")])] #[case(&["hello=world"], &[("hello", "world")])] @@ -154,3 +171,43 @@ async fn test_parse_request_includes_matching_cli_options() { let unrelated_opt = OptName::new("other.namespace_style").unwrap().to_owned(); assert!(!pkg_request.options.contains_key(&unrelated_opt)); } + +#[derive(Parser)] +struct ReposOpt { + #[clap(flatten)] + repos: crate::flags::Repositories, +} + +#[spfstest] +#[tokio::test] +#[serial_test::serial(spk_config)] +async fn test_non_destructive_repos_do_not_use_indexes_by_default() { + let mut rt = spfs_runtime().await; + let remote_repo = spfsrepo().await; + + rt.add_remote_repo( + "origin", + Remote::Address(RemoteAddress { + address: remote_repo.address().clone(), + }), + ) + .unwrap(); + + let original_config = spk_config::get_config().unwrap(); + let _restore = SpkConfigRestore((*original_config).clone()); + let mut test_config = (*original_config).clone(); + test_config.solver.use_indexes = false; + test_config.repositories.clear(); + test_config.make_current().unwrap(); + + let repos = ReposOpt::try_parse_from(["repos", "--no-local-repo"]) + .unwrap() + .repos + .get_repos_for_non_destructive_operation() + .await + .unwrap(); + + assert_eq!(repos.len(), 1); + assert_eq!(repos[0].0, "origin"); + assert!(!matches!(repos[0].1, RepositoryHandle::Indexed(_))); +} diff --git a/cspell.json b/cspell.json index 8e25b35745..73cdb0ba8c 100644 --- a/cspell.json +++ b/cspell.json @@ -805,6 +805,7 @@ "uild", "ULAX", "unbuilt", + "unconfigured", "uncombinable", "undeprecate", "undeprecated", From e6110037d737660613921d43e35d48a4e562e912 Mon Sep 17 00:00:00 2001 From: J Robert Ray Date: Wed, 8 Jul 2026 17:16:03 -0700 Subject: [PATCH 3/8] Add SPI Rocky 9 RPM spec Add spk-rl9.spec, the Rocky Linux 9 RPM build spec for the SPI internal build, alongside the existing spk.spec for RHEL 7/8. The rl9 variant enables the legacy-mount-options and fuse-backend-rhel-7-9 features, uses cmake3 (with a fallback to cmake for forward-compatibility), and requires libcurl-devel for the rdkafka-sys build. Also add 'buildrequires' and 'rpmspec' to the cspell dictionary. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: J Robert Ray --- .site/spi/spk-rl9.spec | 89 ++++++++++++++++++++++++++++++++++++++++++ cspell.json | 3 ++ 2 files changed, 92 insertions(+) create mode 100644 .site/spi/spk-rl9.spec diff --git a/.site/spi/spk-rl9.spec b/.site/spi/spk-rl9.spec new file mode 100644 index 0000000000..b64c05aa87 --- /dev/null +++ b/.site/spi/spk-rl9.spec @@ -0,0 +1,89 @@ +Name: spk +Version: 0.44.0 +Release: 1%{?dist} +Summary: Package manager and a software runtime for studio environments +License: NONE +URL: https://gitlab.spimageworks.com/spi/dev/dev-ops/spk +Source0: https://gitlab.spimageworks.com/spi/dev/dev-ops/spk/-/archive/v%{version}/%{name}-v%{version}.tar.gz + +BuildRequires: gcc +BuildRequires: git +BuildRequires: gcc-c++ +BuildRequires: libcap-devel +BuildRequires: openssl-devel +BuildRequires: fuse-devel +BuildRequires: m4 +BuildRequires: cmake3 +BuildRequires: make +BuildRequires: flatbuffers-compiler +BuildRequires: libcurl-devel + +# XXX Putting "spdev >= 0.29.16" here is getting parsed as three separate +# args to yum install, e.g., "yum install '>='", and failing. Some different +# behavior out of 'rpmspec -q --buildrequires' on rocky? +BuildRequires: spdev + +Requires: bash +Requires: fuse +# kmod provides /sbin/modinfo, which spfs uses to detect supported +# overlayfs mount options. Without it spfs falls back to a conservative +# set and logs a warning on every run. +Requires: kmod +Obsoletes: spfs +Provides: spfs = 0.43.10 + +%define debug_package %{nil} + +%description +Package manager and a software runtime for studio environments + +%prep +%setup -q -n %{name}-v%{version} + +%build +export SPDEV_CONFIG_FILE=.site/spi/.spdev.yaml +export CARGO_NET_GIT_FETCH_WITH_CLI=true +export CMAKE=$(command -v cmake3 || command -v cmake) +dev toolchain install +source ~/.bashrc +# Install ast-grep +cargo install --locked ast-grep +# Include `--all` to also build spk-launcher +dev env -- cargo build --release --features "server,spfs/legacy-mount-options,sentry,spfs/protobuf-src,spfs-vfs/protobuf-src,statsd,fuse-backend-rhel-7-9" --all + +%install +mkdir -p %{buildroot}/usr/local/bin +RELEASE_DIR=%{_builddir}/%{name}-v%{version}/target/release +for cmd in "$RELEASE_DIR"/spk-launcher "$RELEASE_DIR"/spfs "$RELEASE_DIR"/spfs-*; do + # skip debug info for commands + if [[ $cmd =~ \.d$ ]]; then continue; fi + install -p -m 755 $cmd %{buildroot}/usr/local/bin/ +done +mkdir -p %{buildroot}/opt/spk.dist +cp "$RELEASE_DIR"/spk %{buildroot}/opt/spk.dist/ +cp %{_builddir}/%{name}-v%{version}/.site/spi/spk-pkg-metadata.sh %{buildroot}/usr/local/bin + +%files +/usr/local/bin/spfs +%caps(cap_dac_override,cap_fowner+ep) /usr/local/bin/spfs-clean +%caps(cap_net_admin+ep) /usr/local/bin/spfs-monitor +%caps(cap_chown,cap_fowner+ep) /usr/local/bin/spfs-render +%caps(cap_sys_chroot,cap_sys_admin+ep) /usr/local/bin/spfs-join +%caps(cap_setuid,cap_chown,cap_mknod,cap_sys_admin,cap_fowner+ep) /usr/local/bin/spfs-enter +%caps(cap_sys_admin+ep) /usr/local/bin/spfs-fuse +/usr/local/bin/spfs-winfsp +/usr/local/bin/spk-launcher +/usr/local/bin/spk-pkg-metadata.sh +/opt/spk.dist/ + +%post +mkdir -p /spfs +chmod 777 /spfs + +%preun +[ -e /usr/local/bin/spk ] && unlink /usr/local/bin/spk + +%posttrans +# must run at the absolute end in case we are updating +# and the uninstallation of the old version removes the symlink +ln -sf spk-launcher /usr/local/bin/spk diff --git a/cspell.json b/cspell.json index 73cdb0ba8c..bd0959fc97 100644 --- a/cspell.json +++ b/cspell.json @@ -655,7 +655,10 @@ "roundtripped", "rpath", "rpmbuild", + "buildrequires", + "libcurl", "RPMS", + "rpmspec", "rposition", "rsplit", "rsplitn", From 53b257ef851b09aa14af4ab76b410b4ea47d6dd3 Mon Sep 17 00:00:00 2001 From: J Robert Ray Date: Wed, 8 Jul 2026 17:26:57 -0700 Subject: [PATCH 4/8] Fix spfs check summary for missing objects Remove the spurious checked_objects increment from CheckObjectError::Missing::summary(). A missing object was never actually checked, so it should not contribute to checked_objects. Update the regression test to expect 1 checked object instead of 2. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: J Robert Ray --- crates/spfs/src/check.rs | 1 - crates/spfs/src/check_test.rs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/spfs/src/check.rs b/crates/spfs/src/check.rs index 4db6c6f0b8..e329c48bb5 100644 --- a/crates/spfs/src/check.rs +++ b/crates/spfs/src/check.rs @@ -1030,7 +1030,6 @@ impl CheckBlobResult { match self { Self::Duplicate => CheckSummary::default(), Self::Missing(digest) => CheckSummary { - checked_objects: 1, missing_objects: Some(*digest).into_iter().collect(), ..Default::default() }, diff --git a/crates/spfs/src/check_test.rs b/crates/spfs/src/check_test.rs index 2387080ddd..dc8747f3d7 100644 --- a/crates/spfs/src/check_test.rs +++ b/crates/spfs/src/check_test.rs @@ -297,7 +297,7 @@ async fn check_missing_annotation_blob(#[future] tmprepo: TempRepo) { let summary: CheckSummary = results.iter().map(|r| r.summary()).sum(); tracing::info!("{summary:#?}"); - assert_eq!(summary.checked_objects, 2); + assert_eq!(summary.checked_objects, 1); assert_eq!(summary.checked_payloads, 0); assert!( summary.missing_objects.contains(&blob), From c90353523be68fa1acd354945f520d7af8ac5bb9 Mon Sep 17 00:00:00 2001 From: J Robert Ray Date: Wed, 8 Jul 2026 17:33:14 -0700 Subject: [PATCH 5/8] Bump cached from 0.48.1 to 0.54.0 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: J Robert Ray --- Cargo.lock | 58 +++++++----------------------------------------------- Cargo.toml | 2 +- 2 files changed, 8 insertions(+), 52 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a56d5ae213..b418867024 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -459,29 +459,29 @@ dependencies = [ [[package]] name = "cached" -version = "0.48.1" +version = "0.54.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "355face540df58778b96814c48abb3c2ed67c4878a8087ab1819c1fedeec505f" +checksum = "9718806c4a2fe9e8a56fd736f97b340dd10ed1be8ed733ed50449f351dc33cae" dependencies = [ "ahash", "cached_proc_macro", "cached_proc_macro_types", "hashbrown 0.14.5", - "instant", "once_cell", "thiserror 1.0.69", + "web-time", ] [[package]] name = "cached_proc_macro" -version = "0.19.1" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d52f526f7cbc875b296856ca8c964a9f6290556922c303a8a3883e3c676e6a1" +checksum = "2f42a145ed2d10dce2191e1dcf30cfccfea9026660e143662ba5eec4017d5daa" dependencies = [ - "darling 0.14.4", + "darling 0.20.11", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.106", ] [[package]] @@ -919,16 +919,6 @@ dependencies = [ "darling_macro 0.11.0", ] -[[package]] -name = "darling" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" -dependencies = [ - "darling_core 0.14.4", - "darling_macro 0.14.4", -] - [[package]] name = "darling" version = "0.20.11" @@ -953,20 +943,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "darling_core" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim 0.10.0", - "syn 1.0.109", -] - [[package]] name = "darling_core" version = "0.20.11" @@ -992,17 +968,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "darling_macro" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" -dependencies = [ - "darling_core 0.14.4", - "quote", - "syn 1.0.109", -] - [[package]] name = "darling_macro" version = "0.20.11" @@ -2015,15 +1980,6 @@ dependencies = [ "web-time", ] -[[package]] -name = "instant" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" -dependencies = [ - "cfg-if", -] - [[package]] name = "io-uring" version = "0.7.10" diff --git a/Cargo.toml b/Cargo.toml index 1d5141ed88..801fa02d10 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -49,7 +49,7 @@ async-stream = "0.3" async-trait = "0.1" bracoxide = "0.1.4" bytes = "1.11" -cached = "0.48.1" +cached = "0.54.0" chrono = { version = "0.4.34", features = ["serde"] } clap = { version = "4.5", features = ["derive", "env"] } clap_complete = "4.5" From 7db383321782f9b98bfafc4dd8804ce1d754c2da Mon Sep 17 00:00:00 2001 From: J Robert Ray Date: Wed, 8 Jul 2026 17:42:33 -0700 Subject: [PATCH 6/8] Sync SPI spk.spec with internal branch Update .site/spi/spk.spec to match the internal build spec, keeping public version/provides numbers at 0.44.0. This brings over internal build requirements and packaging file layout, but keeps public cargo feature usage aligned with public spfs by omitting spfs/legacy-mount-options. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: J Robert Ray --- .site/spi/spk.spec | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.site/spi/spk.spec b/.site/spi/spk.spec index 8ad333c2a1..1ef33307ba 100644 --- a/.site/spi/spk.spec +++ b/.site/spi/spk.spec @@ -1,6 +1,6 @@ Name: spk Version: 0.44.0 -Release: 1 +Release: 1%{?dist} Summary: Package manager and a software runtime for studio environments License: NONE URL: https://gitlab.spimageworks.com/spi/dev/dev-ops/spk @@ -16,8 +16,9 @@ BuildRequires: m4 BuildRequires: cmake3 BuildRequires: make BuildRequires: devtoolset-9 +BuildRequires: libcurl-devel -BuildRequires: spdev >= 0.28.2 +BuildRequires: spdev >= 0.29.18 Requires: bash Requires: fuse @@ -38,6 +39,8 @@ Package manager and a software runtime for studio environments %build export SPDEV_CONFIG_FILE=.site/spi/.spdev.yaml +export CARGO_NET_GIT_FETCH_WITH_CLI=true +export CMAKE=$(command -v cmake3 || command -v cmake) dev toolchain install source ~/.bashrc # Install ast-grep @@ -45,7 +48,7 @@ echo -e '#! /bin/bash\n\nexec cc -D_BSD_SOURCE "$@"' > cc_wrapper chmod +x cc_wrapper scl enable devtoolset-9 -- env CC=`pwd`/cc_wrapper cargo install --locked ast-grep # Include `--all` to also build spk-launcher -dev env -- cargo build --release --features "sentry,spfs/protobuf-src,statsd,fuse-backend-rhel-7-6" --all +dev env -- cargo build --release --features "server,sentry,spfs/protobuf-src,spfs-vfs/protobuf-src,statsd,fuse-backend-rhel-7-6" --all %install mkdir -p %{buildroot}/usr/local/bin @@ -57,6 +60,7 @@ for cmd in "$RELEASE_DIR"/spk-launcher "$RELEASE_DIR"/spfs "$RELEASE_DIR"/spfs-* done mkdir -p %{buildroot}/opt/spk.dist cp "$RELEASE_DIR"/spk %{buildroot}/opt/spk.dist/ +cp %{_builddir}/%{name}-v%{version}/.site/spi/spk-pkg-metadata.sh %{buildroot}/usr/local/bin %files /usr/local/bin/spfs @@ -66,7 +70,9 @@ cp "$RELEASE_DIR"/spk %{buildroot}/opt/spk.dist/ %caps(cap_sys_chroot,cap_sys_admin+ep) /usr/local/bin/spfs-join %caps(cap_dac_override,cap_setuid,cap_chown,cap_mknod,cap_sys_admin,cap_fowner+ep) /usr/local/bin/spfs-enter %caps(cap_sys_admin+ep) /usr/local/bin/spfs-fuse +/usr/local/bin/spfs-winfsp /usr/local/bin/spk-launcher +/usr/local/bin/spk-pkg-metadata.sh /opt/spk.dist/ %post From 8a17571abf4fecdedadbc4e47c4c4fe98da8bc9e Mon Sep 17 00:00:00 2001 From: J Robert Ray Date: Wed, 8 Jul 2026 17:48:46 -0700 Subject: [PATCH 7/8] Stop passing legacy-mount-options in rl9 spec Remove spfs/legacy-mount-options from the public Rocky 9 RPM build flags in .site/spi/spk-rl9.spec so the spec only references features that exist in public spfs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: J Robert Ray --- .site/spi/spk-rl9.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.site/spi/spk-rl9.spec b/.site/spi/spk-rl9.spec index b64c05aa87..73e48bf476 100644 --- a/.site/spi/spk-rl9.spec +++ b/.site/spi/spk-rl9.spec @@ -49,7 +49,7 @@ source ~/.bashrc # Install ast-grep cargo install --locked ast-grep # Include `--all` to also build spk-launcher -dev env -- cargo build --release --features "server,spfs/legacy-mount-options,sentry,spfs/protobuf-src,spfs-vfs/protobuf-src,statsd,fuse-backend-rhel-7-9" --all +dev env -- cargo build --release --features "server,sentry,spfs/protobuf-src,spfs-vfs/protobuf-src,statsd,fuse-backend-rhel-7-9" --all %install mkdir -p %{buildroot}/usr/local/bin From 2b36795011d4cd780fe00d16071b0406ecb783a9 Mon Sep 17 00:00:00 2001 From: J Robert Ray Date: Wed, 8 Jul 2026 17:54:26 -0700 Subject: [PATCH 8/8] Add SPI package metadata helper script Add .site/spi/spk-pkg-metadata.sh from the internal release branch so the public SPI specs can include it in RPM payloads. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: J Robert Ray --- .site/spi/spk-pkg-metadata.sh | 50 +++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .site/spi/spk-pkg-metadata.sh diff --git a/.site/spi/spk-pkg-metadata.sh b/.site/spi/spk-pkg-metadata.sh new file mode 100644 index 0000000000..29595b3679 --- /dev/null +++ b/.site/spi/spk-pkg-metadata.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +json_escape() { + echo -n "$1" | sed 's/\\/\\\\/g' | sed 's/"/\\"/g' | sed -z 's/\n/\\n/g' | sed -z 's/\r/\\r/g' | sed 's/\t/\\t/g' +} + +declare -A metadata + +# Username +metadata["user"]="${GITLAB_USER_LOGIN:-$USER}" + +# Date +metadata["date"]=$(date) + +# Current work directory +metadata["workdir"]=$(pwd 2>/dev/null || echo "") + +# Host name +metadata["hostname"]=$(hostname 2>/dev/null || echo "") + +# Git Specifics +if [ -d .git ]; then + metadata["git.repo"]=$(git ls-remote --get-url origin || echo "") + metadata["git.commit"]=$(git rev-parse HEAD 2>/dev/null || echo "") + metadata["git.branch"]=$(git branch --show-current 2>/dev/null || echo "") +fi; + +# CI Specifics +if [ -n "${CI_PIPELINE_ID}" ]; then + metadata["ci_pipeline_id"]="$CI_PIPELINE_ID" + metadata["ci_pipeline_url"]="$CI_PIPELINE_URL" + metadata["ci_project_url"]="$CI_PROJECT_URL" + metadata["ci_runner_id"]="$CI_RUNNER_ID" + metadata["ci_runner_tags"]="$CI_RUNNER_TAGS" +fi; + +# Build Json output +json="{" +num_elements=${#metadata[@]} +index=0 +for data in "${!metadata[@]}"; do + value=$(json_escape "${metadata[${data}]}") + json+="\"$data\": \"$value\"" + if [[ $((index++)) -lt $((num_elements - 1)) ]]; then + json+=", " + fi +done +json+="}" + +echo "$json"