komodo: 1.19.5 -> 2.2.0 (#530194)

This commit is contained in:
Sandro
2026-06-13 22:08:34 +00:00
committed by GitHub
3 changed files with 20 additions and 61 deletions
@@ -42,6 +42,8 @@
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
- `komodo` has been updated to the v2 release line (2.x). See the [upstream v1 → v2 upgrade guide](https://github.com/moghtech/komodo/releases/tag/v2.0.0).
- `boot.loader.systemd-boot` gained support for [Automatic Boot Assessment](https://systemd.io/AUTOMATIC_BOOT_ASSESSMENT/) via the new [`boot.loader.systemd-boot.bootCounting`](#opt-boot.loader.systemd-boot.bootCounting.enable) options, allowing automatic detection of and recovery from bad NixOS generations. As part of this change, boot loader entries on the ESP/XBOOTLDR partition are now named `nixos-<content-hash>.conf` instead of `nixos-generation-<n>.conf`; existing entries are migrated automatically on the next `nixos-rebuild boot`/`switch`.
- The `newuidmap` and `newgidmap` security wrappers are now installed with `cap_setuid`/`cap_setgid` file capabilities instead of the setuid-root bit, matching shadow's `--with-fcaps` install mode and other major distributions. Rootless containers (podman, docker-rootless, unprivileged user namespaces) are unaffected. The only behavioural change is that mapping host uid 0 via `/etc/subuid` (which NixOS never configures by default) additionally requires `cap_setfcap`; users who explicitly grant uid 0 in a subuid range can restore the previous behaviour with `security.wrappers.newuidmap.capabilities = lib.mkForce "cap_setuid,cap_setfcap+ep";`.
+18 -9
View File
@@ -2,32 +2,38 @@
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
openssl,
nix-update-script,
nixosTests,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "komodo";
version = "1.19.5";
version = "2.2.0";
src = fetchFromGitHub {
owner = "moghtech";
repo = "komodo";
tag = "v${finalAttrs.version}";
hash = "sha256-dLBgdcrIp5QM2TVIa86qX7m1c5n+qOIQJtqJPGvIZ+0=";
hash = "sha256-Hw0JD4e/ODK19M/bZtX9foCu5c79XA8Jgv2fleltdLs=";
};
# Temporary fix to get build to pass until https://github.com/moghtech/komodo/pull/1122
patches = [
./rustc-1_9_2-fixes.patch
];
cargoHash = "sha256-b/AgQBmS1QfP+BOCT4xL8majVKobig5M2YJhGuXMToc=";
cargoHash = "sha256-jf/Jp28g3inGn5jQp3cACdhl//tbXTMc1vP1K3g/CyQ=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ];
# disable for check. document generation is fail
# > error: doctest failed, to rerun pass `-p komodo_client --doc`
doCheck = false;
# xtask is a workspace-internal build helper, not a user-facing program.
postInstall = ''
rm -f $out/bin/xtask
'';
passthru = {
updateScript = nix-update-script { };
tests = {
@@ -53,8 +59,11 @@ rustPlatform.buildRustPackage (finalAttrs: {
'';
homepage = "https://komo.do";
changelog = "https://github.com/moghtech/komodo/releases/tag/v${finalAttrs.version}";
mainProgram = "komodo";
maintainers = with lib.maintainers; [ r17x ];
mainProgram = "km";
maintainers = with lib.maintainers; [
r17x
channinghe
];
license = lib.licenses.gpl3;
};
})
@@ -1,52 +0,0 @@
diff --git a/bin/core/src/alert/discord.rs b/bin/core/src/alert/discord.rs
index 427227d..6d19678 100644
--- a/bin/core/src/alert/discord.rs
+++ b/bin/core/src/alert/discord.rs
@@ -230,14 +230,13 @@ pub async fn send_alert(
)
}
AlertData::Custom { message, details } => {
- format!(
- "{level} | {message}{}",
- if details.is_empty() {
- format_args!("")
- } else {
- format_args!("\n{details}")
- }
- )
+ let details_str = if details.is_empty() {
+ String::new()
+ } else {
+ format!("\n{details} f")
+ };
+
+ format!("{level} | {message}{details_str}")
}
AlertData::None {} => Default::default(),
};
diff --git a/bin/core/src/alert/mod.rs b/bin/core/src/alert/mod.rs
index 9eba5da..1f51ac2 100644
--- a/bin/core/src/alert/mod.rs
+++ b/bin/core/src/alert/mod.rs
@@ -474,14 +474,13 @@ fn standard_alert_content(alert: &Alert) -> String {
)
}
AlertData::Custom { message, details } => {
- format!(
- "{level} | {message}{}",
- if details.is_empty() {
- format_args!("")
- } else {
- format_args!("\n{details}")
- }
- )
+ let details_str = if details.is_empty() {
+ String::new()
+ } else {
+ format!("\n{details}")
+ };
+
+ format!("{level} | {message}{details_str}")
}
AlertData::None {} => Default::default(),
}