instance_id
stringlengths
10
65
repo
stringlengths
5
59
pr_number
int64
1
313k
task_type
stringclasses
1 value
base_commit
stringlengths
40
40
review_commit
stringlengths
40
40
title
stringlengths
2
282
body
stringlengths
7
3k
patch
stringlengths
202
204k
n_defects
int64
1
72
n_supported
int64
1
65
n_major
int64
0
32
defects
stringlengths
140
18.8k
certifier_count
int64
sysprog21__concurrent-programs__22
sysprog21/concurrent-programs
22
defect
b0b56b09fcd646d5a928c2c1aa826b2a546259c8
a048e3373ee048d8e3c909dff4a0906c9c6479bb
cmap: Fix data race reported by ThreadSanitizer
There are some data races on the `cmap` example, and this pull request tries to fix it. Most of the race can be simply fixed by applying atomic operation. For example, the synchronization on the counter or status variables. However, there are still fixes that may have to be considered carefully. As the behavior may ...
diff --git a/cmap/Makefile b/cmap/Makefile index 5826f46..246171e 100644 --- a/cmap/Makefile +++ b/cmap/Makefile @@ -1,5 +1,11 @@ +CFLAGS = -Wall -O2 + +ifeq ("$(TSAN)", "1") + CFLAGS += -g -fsanitize=thread +endif + all: - gcc -Wall -O2 -o test-cmap \ + gcc $(CFLAGS) -o test-cmap \ cmap.c random.c rcu.c test...
1
1
0
[{"id": "G0", "claim": "The FIXME comment on the deferred-free workaround should mention some feasible approaches (better reclamation strategies) for further reference.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
sysprog21__concurrent-programs__9
sysprog21/concurrent-programs
9
defect
9fa5bf8fd3f7a7de258ef5c1fab4e40da6d3d006
538923cd0dae490fcda7b14b1aca2d03b436789e
Add more operation analysis, combine with deletes and inserts variables.
Add more operation analysis, combine with deletes and inserts variables. And Using the preprocessor to decide the analysis being set or not. For example: ``` retry : 187 contains : 0 traversal : 21028166 fail : 0 del : 0 ins : 0 load : 63167962 store : 4096 deletes : 4098 ...
diff --git a/hp_list/Makefile b/hp_list/Makefile index b934dea..80f3367 100644 --- a/hp_list/Makefile +++ b/hp_list/Makefile @@ -1,6 +1,11 @@ +CFLAG=-D ANALYSIS_OPS + all: $(CC) -Wall -o list main.c -lpthread -g -fsanitize=thread +analysis: + $(CC) -Wall $(CFLAG) -o list main.c -lpthread -g -fsanitize=thread + in...
13
13
1
[{"id": "G0", "claim": "The feature macro name ANALYSIS_OPS is misleading; it should be RUNTIME_STAT, which maintains detailed statistics.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new Makefile target should get some related explanatory comments...
null
sysprog21__elfuse__16
sysprog21/elfuse
16
defect
c5ccb22096b4e0ce240949ca525f79496fcfd1d2
1be8357399bf3803bd3ae94c8fedaccff8aed2d9
Honor MAP_SHARED coherence across fork
Both fork paths (CoW shm and legacy IPC byte-copy) silently broke MAP_SHARED visibility across fork: the child mapped the slab MAP_PRIVATE or got a fresh byte copy, so writes from either side stayed local and never reached the kernel page cache the parent shared with the file. MAP_SHARED|MAP_ANONYMOUS, the standard par...
diff --git a/src/runtime/fork-state.c b/src/runtime/fork-state.c index 1cb99f210..37e56f30c 100644 --- a/src/runtime/fork-state.c +++ b/src/runtime/fork-state.c @@ -21,6 +21,7 @@ #include "debug/log.h" #include "syscall/abi.h" #include "syscall/internal.h" +#include "syscall/mem.h" #include "syscall/proc.h" int ...
1
1
1
[{"id": "G0", "claim": "On the parent's failure path in the cross-fork MAP_SHARED test, close the parent-to-child pipe before reaping; otherwise the child can block forever in wait_byte() and the test hangs.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
sysprog21__elfuse__20
sysprog21/elfuse
20
defect
1e008082f44ff0e7faddaf67fb2e3c865e879872
cf82866f237334a1a37f2a41572d1893835dacb8
Stub /sys/devices/system/cpu and harden checks
Java GC, Go scheduler init, and libnuma probe /sys/devices/system/cpu/{online,possible,present} plus per-CPU dirs to size thread pools. macOS has no /sys, so the lack of these files made those probes fall back to suboptimal heuristics or fail outright. ensure_syscpu_dir lazily builds /tmp/elfuse-syscpu-XXXXXX/ on f...
diff --git a/src/runtime/procemu.c b/src/runtime/procemu.c index 7219323f5..61698b636 100644 --- a/src/runtime/procemu.c +++ b/src/runtime/procemu.c @@ -77,6 +77,27 @@ static char proc_tmpdir[128]; static bool proc_tmpdir_ok; static pthread_mutex_t proc_tmpdir_lock = PTHREAD_MUTEX_INITIALIZER; +/* Synthetic /sys/de...
1
1
1
[{"id": "G0", "claim": "The uid 0 branch of path_check_intercept_access does not match CAP_DAC_OVERRIDE semantics: read and write should be granted unconditionally for root, with only execute requiring at least one x-bit set.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
sysprog21__elfuse__3
sysprog21/elfuse
3
defect
d86284434329bffa6abd3f49e6b949659cf852b1
c7f270c180fa6c4f1f0762aa3653e0237eace07c
Tighten madvise Linux parity for hole/anon/shared
sys_madvise silently accepted unmapped holes for every advice except MADV_DONTNEED: MADV_FREE/COLD/PAGEOUT/HUGEPAGE/NOHUGEPAGE/NORMAL/RANDOM/ SEQUENTIAL/WILLNEED returned 0 even when the range walked off into unmapped territory. Linux's madvise_walk_vmas returns -ENOMEM on the first gap, so guests that probed for unmap...
diff --git a/src/syscall/mem.c b/src/syscall/mem.c index ad584d615..5c4a068eb 100644 --- a/src/syscall/mem.c +++ b/src/syscall/mem.c @@ -1018,6 +1018,29 @@ int64_t sys_mremap(guest_t *g, /* sys_madvise. */ +/* Returns true if [off, off+length) is fully covered by mapped regions. + * Mirrors Linux madvise_walk_vmas...
1
1
1
[{"id": "G0", "claim": "sys_madvise should return -ENOMEM (not -EINVAL) when the advised range lies outside the process address space.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
sysprog21__zhtw-mcp__20
sysprog21/zhtw-mcp
20
defect
561a41392156ad1b81dbb8742ff7e6983deaacb1
68d03bc5bc4ca5313b0e223563bc1a3dc5dc6379
Add LLM-optimized compact output for CLI and MCP
CLI: --format compact emits grep-style one-line-per-issue with single-letter severity, first suggestion +N, deduplication with line:col positions, relative paths, and zero output on clean files. MCP: auto-detects AI agent clients (claude-code, cursor, cline, etc.) from clientInfo.name during initialize and defaults ...
diff --git a/src/main.rs b/src/main.rs index 94ef2746..b6396780 100644 --- a/src/main.rs +++ b/src/main.rs @@ -53,7 +53,7 @@ fn main() -> Result<()> { // zhtw-mcp --overrides <path> — custom overrides JSON path // zhtw-mcp --suppressions <path> — custom suppressions JSON path // ...
2
2
0
[{"id": "G0", "claim": "The cli_lint_compact_format_clean_is_empty test should assert the command succeeded, since currently it can pass on a failing run that produces empty stdout.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The compact no-file-pref...
null
sysprog21__zhtw-mcp__28
sysprog21/zhtw-mcp
28
defect
3a0636c7f4f5afdc7892d4abee3a4b5e6a0dbdc3
5cd353d776a42f3b0364f294cf79d1c444ab1e55
Harden transport layer
Transport error handling: - Add TransportError enum (Io, Closed, Parse, InvalidUtf8, InvalidRequest, StaleResponse) with JSON-RPC error code mapping and id correlation. - InvalidRequest carries Option<RequestId> so error responses echo the client's request id. into_response() prefers carried id over fallback. - Stal...
diff --git a/src/mcp/transport.rs b/src/mcp/transport.rs index ff11ae8b..33e476bd 100644 --- a/src/mcp/transport.rs +++ b/src/mcp/transport.rs @@ -15,7 +15,7 @@ use std::collections::VecDeque; use std::io::{self, BufRead, Read, Write}; -use std::string::FromUtf8Error; +use std::str; use std::sync::mpsc; use std::...
2
2
0
[{"id": "G0", "claim": "The malformed-input tests should assert the MCP child exited successfully after each case; `wait().unwrap()` alone will miss crash regressions.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The missing-jsonrpc-field test should ...
null
sysprog21__zhtw-mcp__30
sysprog21/zhtw-mcp
30
defect
02705f1307979773ab41c653ee347a22e3a9988d
75dbf3d2b6304c9041929debd112d406b966e4e8
Implement confidence-based fix policy
This replaces FixMode::Safe/Aggressive with four-tier hierarchy: None < Orthographic < LexicalSafe < LexicalContextual. Orthographic fixes punctuation, spacing, case, variant, grammar only. LexicalSafe adds deterministic single-suggestion term substitutions, with anchor_match gating when --verify calibration is acti...
diff --git a/TODO.md b/TODO.md new file mode 100644 index 00000000..9838a602 --- /dev/null +++ b/TODO.md @@ -0,0 +1,855 @@ +# TODO.md + +Technical roadmap. Completed items in CHANGELOG.md. Epic IDs (e.g. 20.x) persist +across sections, reflect origin not priority. Section order: Reliability → +Performance → Architectur...
7
7
3
[{"id": "G0", "claim": "`LexicalContextual` ignores `anchor_match == Some(false)` for non-contextual lexical fixes.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "LexicalContextual still auto-fixes ambiguous multi-suggestion terms by taking `suggest...
null
sysprog21__zhtw-mcp__48
sysprog21/zhtw-mcp
48
defect
1bd3480b4a8e76bee7d4daf48217b8c590f60578
d3f690803f6f97ffe11f7cfca02d6f68743c8bb6
Add corpus evaluation suite with diverse test
This implements evaluation corpora (AI-generated, native zh-TW, CN-to- TW conversion) with precision/recall/FP-rate/safe-fix metrics and gate assertions (precision>=90%, FP<=5%, safe-fix>=85%). Corpus diversity: AI-generated cases covering cross_strait, confusable, ai_filler (fixable and unfixable), and punctuation ...
diff --git a/Makefile b/Makefile index 5f84e96b..b40c3f84 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,10 @@ indent: $(S2T_DATA) python3 scripts/check-ruleset.py --lint black scripts/*.py -.PHONY: all clean distclean check check-size indent install uninstall status +corpus: $(S2T_DATA) + cargo test --test co...
4
1
0
[{"id": "G0", "claim": "`cn_opensource_algo` has inconsistent expectations: replacements declared in `expected_issues` (notably `項目`→`專案`) are not applied in `expected_fixed`.", "category": "correctness", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The `ai_confusable_functio...
null
sysprog21__zhtw-mcp__65
sysprog21/zhtw-mcp
65
defect
2bc4e6c79646c520479659bd6df25c1677fa86a6
301aaede3cfddf6e3544842ab32987866b8a9167
Add e2e test for notification carrying an id
JSON-RPC 2.0 specifies that notifications must not carry an id field and must not receive a response. Since notifications/initialized is a notification under MCP, receiving it with an id is invalid. Close #17 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Enforce JSON-RPC 2.0...
diff --git a/tests/e2e-mcp.rs b/tests/e2e-mcp.rs index becd56ff..29ef4f4d 100644 --- a/tests/e2e-mcp.rs +++ b/tests/e2e-mcp.rs @@ -1260,6 +1260,41 @@ fn e2e_response_shaped_without_id_discarded() { assert!(status.success(), "child exited with {status}"); } +#[test] +fn e2e_notification_with_id_no_response() { +...
5
3
1
[{"id": "G0", "claim": "The server's notification-only arm unconditionally returns Some(None), silently swallowing messages that carry an id, so the server should return an error response (e.g. -32600 Invalid Request) when notification-only methods carry an id and the new e2e test should assert that error instead of co...
null
sysprog21__zhtw-mcp__69
sysprog21/zhtw-mcp
69
defect
96709032a218faa530efc35fa69fc05f947830d2
507ab946f7307846ad9dfb8728496d0fdc0b0d38
Detect repetition and acronym rejoining
This introduces scan passes and metadata for transcript linting, driven by recent experience with Whisper-generated zh-TW lecture subtitles. New scan passes: - repetition.rs: detect consecutive duplicate CJK chars/words and Latin words (e.g. 去去, cache cache) with ~100-entry reduplication whitelist to suppress legit...
diff --git a/assets/ruleset.json b/assets/ruleset.json index a05cfed7..bd0b8b7c 100644 --- a/assets/ruleset.json +++ b/assets/ruleset.json @@ -3078,7 +3078,8 @@ "to": ["線上"], "type": "cross_strait", "context": "@domain 作業系統", - "english": "online" + "english": "online", + "negative_c...
1
1
1
[{"id": "G0", "claim": "The whitespace scan only handles literal spaces, so duplicate words separated by tabs or newlines are missed.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
sysprog21__zhtw-mcp__71
sysprog21/zhtw-mcp
71
defect
97b542c66f2cd056799cf4211e7db8e463f879ca
b8a74e6220cc65c58c80979179c0b79ed3f6f300
Refine cross-strait rules and clue indexing
- Add bare 原子, 原子性 rules with TW CS context gating; consolidate atomic-family vocabulary with parallel English alternatives. - Add 刷新 negative clues for TLB/cache flush contexts; drop 映射 and bare 返回 rules (standard TW CS usage). - Whitelist 一步一步 natural reduplication. - Fix clue AC offset ordering: find_overlapping_...
diff --git a/assets/ruleset.json b/assets/ruleset.json index d038cc0e..b135ef06 100644 --- a/assets/ruleset.json +++ b/assets/ruleset.json @@ -1942,9 +1942,10 @@ "from": "刷新", "to": ["重新整理"], "type": "cross_strait", - "context": "@domain UI。「刷新紀錄」(break a record) 為正確用法,不應替換", + "context":...
1
1
1
[{"id": "G0", "claim": "The assertion checks i.found != \"原子\" instead of \"原子性\", so this test can pass even when 原子性 is incorrectly flagged.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
sysprog21__zhtw-mcp__72
sysprog21/zhtw-mcp
72
defect
9f6c0550f56f6d49d50b22a04c3509dd66f77a80
2409e1459324df8fc36453d531127a05ecb5d507
Detect AI writing and translationese patterns
This adds 2 new default-on linting dimensions sourced from the humanize and dewesternise skill checklists published at tzengyuxio/skills [1]. Checklists distil 余光中's 歐化中文 framework and the observed tells of LLM prose; they are used here as the authoritative source for which patterns to flag and how the fixer should rew...
diff --git a/assets/ruleset.json b/assets/ruleset.json index b135ef06..1354e445 100644 --- a/assets/ruleset.json +++ b/assets/ruleset.json @@ -47,35 +47,35 @@ }, { "from": "GSM移動", - "to": ["GSM行動"], + "to": ["GSM 行動"], "type": "cross_strait", "context": "@domain IT", "en...
2
2
2
[{"id": "G0", "claim": "The suggestion-is-from check skips translationese target rules under the assumption they are opt-in via --detect-translationese, but translationese is enabled by default in both profiles, hiding non-converging fix chains that will still run in default scans.", "category": "correctness", "verdict...
null
systemd__mkosi__2186
systemd/mkosi
2,186
defect
d48eaa3042fe403d3dc2e53bc12040a6e4063e9b
44cd14d2eaafd32ad8df9139b5796ae635cce226
Output file names now use `Output=` without version appended
Previously when `Output=` was not specified its value was set to the value of `ImageId=` or `image` and only when actually writing the file was the version appended. This did not match the documentation, which states that the value of `Output=` is set to `ImageId=` and `ImageVersion=` if they exist. The main problem th...
diff --git a/mkosi/__init__.py b/mkosi/__init__.py index b57a014f28..306d1c3528 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -1804,17 +1804,22 @@ def unlink_output(args: MkosiArgs, config: MkosiConfig) -> None: if args.verb == Verb.clean: remove_build_cache = args.force > 0 remove_pa...
2
2
1
[{"id": "G0", "claim": "The version-appending default-output logic in load_config() should be moved into a config_default_output() function used as the default_factory for the output setting, with default_factory_depends on the image_id and image_version settings.", "category": "design", "verdict": "supported", "priori...
null
systemd__mkosi__2351
systemd/mkosi
2,351
defect
d3b035a1e1cef4f744d982b6187cbfd07894dd5b
ee2489c3682a51e0c6e31592d164d7a19245842a
Add support for oci-dir output (fixes #1865)
A first draft for rudimentary OCI image outputs PS: I intend to squash this once more questions are answered/resolved
diff --git a/mkosi/__init__.py b/mkosi/__init__.py index ac7f2e8ab5..3f7c5368c5 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -21,7 +21,7 @@ from pathlib import Path from typing import Optional, TextIO, Union, cast -from mkosi.archive import extract_tar, make_cpio, make_tar +from mkosi.archive import ex...
7
3
1
[{"id": "G0", "claim": "hashlib.file_digest only exists in Python 3.11, so computing the layer digest with it breaks on the supported older Pythons; use a loop like the existing SHA256SUM logic instead.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": ...
null
systemd__mkosi__2478
systemd/mkosi
2,478
defect
69c70a224eb4fc7dfde6c83949aa261813f8fa20
2439fbe816cebfd21f7f04623c47f5ad08984ba3
Boot improvements
Fixes #2472
diff --git a/mkosi.conf b/mkosi.conf index a4aa044169..4acc3781d5 100644 --- a/mkosi.conf +++ b/mkosi.conf @@ -9,7 +9,7 @@ [Content] Autologin=yes -@ShimBootloader=signed +@ShimBootloader=unsigned BuildSources=. BuildSourcesEphemeral=yes diff --git a/mkosi.conf.d/20-arch.conf b/mkosi.conf.d/20-arch.conf index 9...
10
7
0
[{"id": "G0", "claim": "The documentation should drop the link to the virt-firmware project and simply mention that the tool is installed in the tools tree.", "category": "documentation", "verdict": "uncertain", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "The documentation section about where Deb...
null
systemd__mkosi__2583
systemd/mkosi
2,583
defect
c4179c32f9d26387ce01862998f6a1f44e243bef
61fc857c77dd7c595eea3cf6552c292c683938e2
Add specifiers for various paths
Fixes #2579
diff --git a/mkosi/config.py b/mkosi/config.py index 54554e0742..745ed0f78b 100644 --- a/mkosi/config.py +++ b/mkosi/config.py @@ -1133,6 +1133,12 @@ class Match: match: Callable[[str], bool] +@dataclasses.dataclass(frozen=True) +class Specifier: + char: str + callback: Callable[[argparse.Namespace, Path...
3
3
2
[{"id": "G0", "claim": "The new specifiers should be tested in every combination in test_specifiers — each of %D, %C and %P in the root config, in mkosi.conf.d/abc.conf and in mkosi.conf.d/qed/mkosi.conf — rather than one specifier per file.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "i...
null
systemd__mkosi__2704
systemd/mkosi
2,704
defect
bf02b63aaa9901d0f68730896f42a5ba427dfd87
d87ca7e7e109aed08331d08b8fcc0583481cedbf
Add optional file ID for qemu drives
For testing multipath in systemd's integration tests, we need multiple qemu drives backed by the same file. Let's allow specifying an additional file ID to make this possible with QemuDrive=.
diff --git a/mkosi/config.py b/mkosi/config.py index 759a54dc4c..8bac3bdacd 100644 --- a/mkosi/config.py +++ b/mkosi/config.py @@ -138,6 +138,7 @@ class QemuDrive: size: int directory: Optional[Path] options: Optional[str] + file_id: str # We use negative numbers for specifying special constants ...
4
3
1
[{"id": "G0", "claim": "In the new groupby helper the key function should be called only once per element instead of three times.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The groupby return annotation should be list[tuple[S, list[T]]] rather t...
null
systemd__mkosi__2850
systemd/mkosi
2,850
defect
01dbb57fcbde2e72ba028280466880babcb7d387
6a60a3a0f2dc1d77454d5ab00005f3426529d712
Track local packages in cache manifest
Let's track the modification timestamps of the packages from configured package directories so we can rebuild the image if new packages appear or are removed or changed.
diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 54ab754a41..185e803374 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -28,6 +28,7 @@ from mkosi.archive import can_extract_tar, extract_tar, make_cpio, make_tar from mkosi.burn import run_burn from mkosi.config import ( + PACKAGE_GLOBS, Args...
1
1
0
[{"id": "G0", "claim": "The `packages` parameter of finalize_default_initrd is a confusing name because it holds a directory while the `package` flags above hold actual package names.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
systemd__mkosi__2954
systemd/mkosi
2,954
defect
d53f31b4b32018d5383a2efce6f1bd15daa5480d
05fa3ce0453722d44021aa0afc7cd161d9888dff
Add executable `mkosi.version` support for generating the version dynamically
The script is executed unsandboxed (not a fan of this, but unsure how this should be done before any configuration even exists) and reads `stdout` to figure out the version. First commit allows more configurable handling of "standard config paths". Maybe this change should also be extended to `mkosi.rootpw` to allow...
diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 72851ecd9b..98ae974b2c 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -4386,23 +4386,28 @@ def generate_key_cert_pair(args: Args) -> None: def bump_image_version() -> None: """Write current image version plus one to mkosi.version""" - versio...
9
7
3
[{"id": "G0", "claim": "Fold mkosi.version.run into a single mkosi.version that is executed when it is executable and read as the regular version file otherwise.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Consider running the mkosi.version script jus...
null
systemd__mkosi__3008
systemd/mkosi
3,008
defect
671708a10bfd74b7a36391a78de6eb80a00bbf78
0bb418688a22ef1a8a03d871c8a2d8f7f571b21f
Use more directories of sandbox trees in the sandbox
Previously, we only picked up /usr and /etc from the sandbox trees. Let's make this more generic and pick up a bunch of extra directories as well. To avoid any changes persisting outside of the sandbox, let's use overlayfs with a temporary writable directory as the upperdir of the overlayfs (and make sure we use a ...
diff --git a/mkosi/__init__.py b/mkosi/__init__.py index cd8bcc8e7a..ce90f6bb24 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -104,6 +104,7 @@ MS_SLAVE, __version__, acquire_privileges, + joinpath, mount, mount_rbind, umask, @@ -498,7 +499,6 @@ def run_configure_scripts(conf...
4
2
1
[{"id": "G0", "claim": "In the non-relaxed case the new code only binds /sys and /dev when devices is set, whereas the previous code also bind-mounted /run there.", "category": "correctness", "verdict": "opposed", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The `continue` under `if not overlay and ...
null
systemd__mkosi__3057
systemd/mkosi
3,057
defect
347ccd0971119d26eefab2cce1a5a779907a9323
e7fcf9b959c27bb457ee0f75533929ec8e9773ed
Parse profiles after mkosi.conf.d
Currently profiles can't depend on any of the configuration set in mkosi.conf.d as they are parsed before mkosi.conf.d is parsed. Let's parse the profile related configuration last instead so it can match on all the configuration set in mkosi.conf.d. To set the distribution and release and such based on the profile,...
diff --git a/.gitignore b/.gitignore index 4d1b379d3e..6d489f55e1 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ /mkosi.output /mkosi.nspawn /mkosi.rootpw +mkosi.local mkosi.local.conf /mkosi.key /mkosi.crt diff --git a/NEWS.md b/NEWS.md index 95f8da062e..ad08c83b7b 100644 --- a/NEWS.md +++ b/NEWS.md ...
3
1
0
[{"id": "G0", "claim": "The in-place path operators added in parse_config_one hurt readability for paths and should not be used.", "category": "maintainability", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The profile lookup loop can be replaced with an any() check calling die...
null
systemd__mkosi__3090
systemd/mkosi
3,090
defect
601b1525ac85e0aa68c49a8e95914f42d4b6a0d1
8c3e3ed1a7e9dcc0552f6079554ecdefc711107b
Introduce UnifiedKernelImageProfiles=
Same concept as PEAddons=, except these are added as additional profiles to every UKI built by mkosi. Accompanying systemd PR: https://github.com/systemd/systemd/pull/34608
diff --git a/mkosi/__init__.py b/mkosi/__init__.py index d81d23e4e7..dbc891f528 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -70,6 +70,7 @@ format_bytes, parse_boolean, parse_config, + parse_ini, summary, systemd_tool_version, want_selinux_relabel, @@ -1481,16 +1482,27 @@ d...
1
1
0
[{"id": "G0", "claim": "Use os.fspath(profile) instead of str(profile) for the --join-profile argument and the --ro-bind profile pairs.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}]
null
systemd__mkosi__3094
systemd/mkosi
3,094
defect
6c358aef1c2183d78785ad3cb3896e9117f5c3f9
8527bfb85ffe3fd924d4f34c10d8d3c16a0bee1b
Allow specifying OpenPGP implementation to use for signing
Hi :wave: I'm pushing a first preview of SOP signing for SHA256SUMs. I've tested that locally and also added tests for rsop and old gpg (just in case) and will begin to refactor this a bit. Since I'm new to both mkosi and Python I think it's good to get feedback earlier in the process if something looks particularl...
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fa25f5705c..5a61b5d419 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -151,7 +151,7 @@ jobs: - name: Install run: | sudo apt-get update - sudo apt-get install python3-pytest lvm2 cryptsetu...
10
9
3
[{"id": "G0", "claim": "The OpenPGP tool in the summary can never be None since gpg is the default, so the line should simply use config.openpgp_tool or \"gpg\".", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Since openpgp_tool has a default val...
null
systemd__mkosi__3305
systemd/mkosi
3,305
defect
9ca1f93c199d030392941945d3814067a1dbf74f
a37aa923799e67e4ac74c2862710ad03fdb5568d
Rename various [Runtime] options and rename mkosi qemu to mkosi vm
- Let's get rid of the "Qemu" prefix for runtime options as they apply both to the qemu and vmspawn verbs. - Let's rename QemuGui= to Console= and make it take all the options that are accepted by vmspawn's --console= option. - Let's rename the various runtime options to the corresponding vmspawn option where applica...
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4a8f7f83dc..ee0c62dffe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -178,7 +178,7 @@ jobs: Environment=SYSTEMD_REPART_MKFS_OPTIONS_EROFS="--quiet" [Runtime] - QemuKvm=yes + KVM=yes...
1
1
1
[{"id": "G0", "claim": "The new `console` [Runtime] ConfigSetting in mkosi/config.py needs a non-`None` default.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
systemd__mkosi__3312
systemd/mkosi
3,312
defect
069e29955ba1362319ed18d06a884460d922c55b
3b68500e6af883f15d86097505dfa6fe78fc140b
Modules and firmware includes
In order to include out-of-tree modules (and their required firmware) installed in an `updates` subfolder, a special case is added when a file is found below that folder. Furthermore, a firmware file required by a module might be a symbolic link to the real firmware file. Add handling of this case too.
diff --git a/mkosi/kmod.py b/mkosi/kmod.py index 91368f5f06..f56a3700cf 100644 --- a/mkosi/kmod.py +++ b/mkosi/kmod.py @@ -218,12 +218,16 @@ def process_kernel_modules( with complete_step("Applying kernel module filters"): required = set(gen_required_kernel_modules(root, kver, include=include, exclude=e...
4
4
2
[{"id": "G0", "claim": "The added comment should fix the typo 'mopdules' to 'modules' (and the commit messages contain typos too: 'lnk' instead of 'link' and 'an' instead of 'and').", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new standalone...
null
systemd__mkosi__3420
systemd/mkosi
3,420
defect
10918a956159dfb9559e1c88f8ab83c8c909dbc5
8d94e4f06b4c17bd53f3f7d77f85ca10eec5eb3f
Use resource_path() to access files in our own module
__file__ doesn't work if mkosi is packaged up as a zipapp, let's use resource_path() which is specifically intended to solve this problem and works regardless of whether we're in a zipapp or not.
diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 37a1c82327..d474634973 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -139,6 +139,7 @@ make_executable, one_zero, read_env_file, + resource_path, scopedenv, ) from mkosi.versioncomp import GenericVersion @@ -3902,12 +3903,11 @@...
3
3
2
[{"id": "G0", "claim": "The local variable home in sandbox_cmd() in mkosi/run.py is assigned but never used (dead code).", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Calling resource_path(sys.modules[__name__]) in sandbox_cmd() crashes with Ty...
null
systemd__mkosi__3440
systemd/mkosi
3,440
defect
4bf31f19b694a98f9c3e671f9805bc3fbbe970f4
aaab4fc68c2a978129bdb7ea0b68c7b3924b0e16
Add SignExpectedPcr= setting for UKI profiles
Needs https://github.com/systemd/systemd/pull/36199
diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 9e24c8ec80..385c713747 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -1639,6 +1639,14 @@ def build_uki( *flatten(["--join-profile", os.fspath(workdir(profile))] for profile in profiles), ] # fmt: skip + if context.config.unified_ke...
1
1
0
[{"id": "G0", "claim": "The man page entry for SignExpectedPcr= ends with a lowercase sentence fragment ('Takes a boolean. enabled by default.') and should be reworded to 'Takes a boolean, enabled by default.' or 'Takes a boolean. Enabled by default.'.", "category": "documentation", "verdict": "supported", "priority": ...
null
systemd__mkosi__3480
systemd/mkosi
3,480
defect
a79e0934e5cd32bfd6020e011370d64f45e73af3
391d69ea9d19162ac92527a72190913612d25d69
Use `os.fspath` in more places
Should hopefully be all of them (outside of sandbox).
diff --git a/docs/CODING_STYLE.md b/docs/CODING_STYLE.md new file mode 100644 index 0000000000..d74dbea3a6 --- /dev/null +++ b/docs/CODING_STYLE.md @@ -0,0 +1,40 @@ +--- +title: Coding Style +category: Contributing +layout: default +SPDX-License-Identifier: LGPL-2.1-or-later +--- + +# Coding Style + +## Python Version ...
6
3
0
[{"id": "G0", "claim": "The documentation says to use `.editconfig`, which is a typo for `.editorconfig`.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The sentence 'For Python files we use the style from `ruff format` with a line length of 109 c...
null
systemd__mkosi__3493
systemd/mkosi
3,493
defect
b3c15c12315386593f0ebcded41bea4ee08426f4
3ed938f8a9278de0675d03de24560755ed6ccad5
serve: Add StorageTargetMode= feature
Let's make it configurable whether we run systemd-storagetm as part of serve.
diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 75d47c76e5..c845faa6af 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -101,6 +101,7 @@ start_journal_remote, ) from mkosi.run import ( + Popen, apivfs_options, chroot_cmd, chroot_options, @@ -4310,14 +4311,46 @@ def run_coredum...
1
1
0
[{"id": "G0", "claim": "Use systemctl freeze/thaw instead of sending SIGSTOP directly to the qemu process, so the whole scope is frozen at once and the systemd APIs get dogfooded.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
systemd__mkosi__3499
systemd/mkosi
3,499
defect
3b74d371df1a8d2610717e11a4716c5ac8788e02
f8499c694744eb719996e7c362ac8811f8738012
Allow building "netesp" images with the esp output format.
Coined by @poettering, netesp images only have a boot loader in them and nothing else and should use raw.img as their extension, so let's add the necessary knobs to enable this use case.
diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 7290f3a0c4..d32af04a05 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -2035,15 +2035,12 @@ def replacer(match: re.Match[str]) -> str: return re.sub(r"&(?P<specifier>[&a-zA-Z])", replacer, text) -def install_uki( +def finalize_bootloader_entry_...
2
2
1
[{"id": "G0", "claim": "The JSON serialisation for the pull request's new output-extension handling is missing.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The local variable uki is assigned but never used in make_esp.", "category": "maintainabil...
null
systemd__mkosi__3509
systemd/mkosi
3,509
defect
b53b949ef20f0198480831ff0921d8483212c1eb
83afb8db43e8e5805be4517f31bb809a1323cfe3
Add BuildKey= and CacheKey= settings
Let's give users more control over how many different cache and build subdirectories we maintain by introducing CacheKey= and BuildKey= with support for delayed specifiers.
diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 15b5546e47..215ab8bda5 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -421,7 +421,7 @@ def configure_extension_release(context: Context) -> None: if f"{prefix}_SCOPE" not in extrelease: f.write( f"{prefix}_SCOPE="...
8
7
1
[{"id": "G0", "claim": "The environment variables this code sets or forwards (SUBIMAGE, the proxy variables, MKOSI_DNF, GNUPGHOME) should be documented, or at least noted as set by mkosi for internal use.", "category": "documentation", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim"...
null
systemd__mkosi__3531
systemd/mkosi
3,531
defect
d98f5dadb06f0643836a3d433c3dffb2a5784162
9048eb8022f8f5c5b12ee3027b6aaf1de7bb71c7
Add new option syntax with globs
I think we want to make the switch. This is the first part, conversion of `KernelModules{Initrd,}{Include,Exclude}`. I didn't do the docs. I'll add that if we have general agreement that this makes sense. After doing the conversion, I find the new syntax much easier to write and easier to get correct. There are some...
diff --git a/mkosi.conf b/mkosi.conf index 03e43b75c1..98b2698c9b 100644 --- a/mkosi.conf +++ b/mkosi.conf @@ -46,8 +46,8 @@ KernelCommandLine= printk.devkmsg=on systemd.early_core_pattern=/core -KernelModulesInitrdExclude=.* -KernelModulesInitrdInclude=default +KernelModulesInitrdExcludeGlob=* +Ker...
16
12
2
[{"id": "G0", "claim": "The new test file tests/test_kmod.py imports pytest without using it.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Move the inline lambda that prefixes module filter values with 're:' into a named function such as parse...
null
systemd__mkosi__3532
systemd/mkosi
3,532
defect
d98f5dadb06f0643836a3d433c3dffb2a5784162
7ccfda87f470fb91c8187c8667f5fb1ac80a1021
initrd: add modules for fido2 and amd laptop
Needed for FIDO2 unlock and other stuff on my laptop. Adds ~200kb or so to the UKI.
diff --git a/mkosi/resources/mkosi-initrd/mkosi.conf b/mkosi/resources/mkosi-initrd/mkosi.conf index 00d6bb41ba..10aa1897d3 100644 --- a/mkosi/resources/mkosi-initrd/mkosi.conf +++ b/mkosi/resources/mkosi-initrd/mkosi.conf @@ -43,6 +43,9 @@ WithDocs=no # Make sure various core modules are always included in the initrd...
2
2
1
[{"id": "G0", "claim": "The per-distribution initrd size limits in test_initrd_size need to be raised (and raised again) to fit the larger initrd produced by the kernel modules this pull request adds.", "category": "testing", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "think...
null
systemd__mkosi__3558
systemd/mkosi
3,558
defect
7ff9a890c1947b4111010e81e0e64e06a0e8d800
1966b60aa99b9120bc1d0ca952864362914973ed
Add InitrdProfiles= with initial storage profile
Let's allow not installing lvm2 in the initrd by introducing a storage profile which users can disable.
diff --git a/REUSE.toml b/REUSE.toml index c277d5aea8..8b566d27f3 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -44,8 +44,8 @@ SPDX-License-Identifier = "LGPL-2.1-or-later" [[annotations]] path = [ - "mkosi/resources/mkosi-initrd/mkosi.extra/usr/lib/udev/rules.d/10-mkosi-initrd-md.rules", - "mkosi/resources/mko...
1
1
1
[{"id": "G0", "claim": "The transformers dictionary needs a `list[InitrdProfile]: enum_list_transformer,` entry.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
systemd__mkosi__3572
systemd/mkosi
3,572
defect
e330200c03e68cfe47d93160b22822f1b994535c
aa4c8339484363df032ac72d4a739f4bbc16e183
Improve parsing of local mkosi config
Clarify that mkosi.local shall be a directory with a mkosi.conf file inside of it.
diff --git a/mkosi/config.py b/mkosi/config.py index 82d5a5e65f..2cd7e680e7 100644 --- a/mkosi/config.py +++ b/mkosi/config.py @@ -4561,11 +4561,10 @@ def match_config(self, path: Path) -> bool: def parse_config_one(self, path: Path, parse_profiles: bool = False, parse_local: bool = False) -> bool: s: O...
2
2
0
[{"id": "G0", "claim": "Also parse mkosi.local/ unconditionally whenever it is a directory, so that setups like mkosi.local/mkosi.conf.d/... work without requiring a mkosi.conf file inside for detection.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "I...
null
systemd__mkosi__3582
systemd/mkosi
3,582
defect
68545c26f8cca5e6beb450417dc73eb1204e4f22
369b2104fc22b603740a2629d566456cad2d48ad
Move package installation and removal to PackageManager interface
There's no need for these to be implemented by the Distribution interface as they don't need distribution specific knowledge so let's move them to the PackageManager interface instead.
diff --git a/mkosi/__init__.py b/mkosi/__init__.py index ecef227594..6ab11017ae 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -239,7 +239,9 @@ def install_distribution(context: Context) -> None: return with complete_step(f"Installing extra packages for {context.config.distribution.pr...
2
1
0
[{"id": "G0", "claim": "Rewrite package_sort_key to test package with startswith instead of indexing package[0], so that an empty package name cannot raise an IndexError (a case the reviewer notes should not happen but cannot be encoded in the type).", "category": "correctness", "verdict": "supported", "priority": "P2"...
null
systemd__mkosi__3585
systemd/mkosi
3,585
defect
ec2739908365f6e3c863efd6cb0bf2e1e9e39f5f
1279c9a3195593ef4f1543e0dd1deff728d8f2d4
Rework --run-build-scripts
Instead of (optionally) building the image when this option is enabled, let's insist that the image has already been built and cached. This allows us to reuse the history of the previous build if History= is enabled. At the same time, rename the option to --rerun-build-scripts to indicate more clearly that the imag...
diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 6ab11017ae..fa72cf88cc 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -3928,10 +3928,7 @@ def build_image(context: Context) -> None: check_root_populated(context) run_build_scripts(context) - if context.config.output_format =...
2
2
1
[{"id": "G0", "claim": "The docs for --rerun-build-scripts should probably also clearly spell out that configure scripts will not be rerun.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The out-of-date-cache check reads badly because both branche...
null
systemd__mkosi__3662
systemd/mkosi
3,662
defect
988c855b060151595c97b9824c8217fa3b3f8fce
10d4ffb53867215ea0d88671d106ae1780d35c86
Allow MinimumVersion to be a git sha
In systemd we very often require newer mkosi git commits which means that setting MinimumVersion=25~devel doesn't work anymore. Let's allow the MinimumVersion= to be a git sha so that we can enforce the mkosi version to be new enough. We skip git commit checks if we're in the sandbox since mkosi will be a zipapp the...
diff --git a/mkosi/config.py b/mkosi/config.py index c0613847ac..15bf568f28 100644 --- a/mkosi/config.py +++ b/mkosi/config.py @@ -1463,22 +1463,33 @@ def config_parse_vsock_cid(value: Optional[str], old: Optional[int]) -> Optional return cid -def config_parse_minimum_version( - value: Optional[str], - o...
1
1
1
[{"id": "G0", "claim": "The man page for MinimumVersion= should say the minimum version can be specified as an unabbreviated git commit hash, not just a git commit hash.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
systemd__mkosi__3678
systemd/mkosi
3,678
defect
7e4ec15aee6b98300b2ee14265bc647a716a9f8a
254619f8b193de378f434ff32b0df5d4768a28bb
Rework history <=> sandbox integration
Until now, we read the tools tree configuration both inside and outside the sandbox. This is problematic for a few reasons: - For a number of reasons, the tools tree configuration inside and outside the sandbox may be different. This is especially true when the history is used, as when invoking mkosi sandbox and mko...
diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 9187e1b3ac..0fcb26deb7 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -4126,6 +4126,8 @@ def run_sandbox(args: Args, config: Config) -> None: env |= {"MKOSI_HOST_DISTRIBUTION": str(hd)} if hr: env |= {"MKOSI_HOST_RELEASE": hr} + ...
2
1
0
[{"id": "G0", "claim": "The lower `if args.verb.needs_build() and args.force > 0 and not args.rerun_build_scripts` return in have_history cannot be hit, because when args.verb.needs_build() is true and args.force is non-zero, the upper `args.verb.needs_tools() and args.force > 0` check would already have returned False...
null
systemd__mkosi__3696
systemd/mkosi
3,696
defect
a7e90514fa298a03b5880bb4c9d79dc5e7d55eca
47e047dc0aa9daaf81ee2cf15e462f268581e2d7
Only write CLI arguments to history instead of full config
The huge downside of writing the full config to the history is that any modifications to config files are ignored until the image is rebuilt. If we make the argument that changes to config files are usually supposed to be permanent rather than ephemeral, it doesn't make sense to not take them into account when r...
diff --git a/mkosi/__init__.py b/mkosi/__init__.py index c282d3d505..fdb0215538 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -69,10 +69,10 @@ Verity, Vmm, cat_config, + dump_json, expand_delayed_specifiers, + finalize_configdir, format_bytes, - get_configdir, - have_his...
6
3
1
[{"id": "G0", "claim": "The chained assignment to 'config' in the image loop is unnecessary as it is redefined before its value is used (code scanning flags four such assignments).", "category": "maintainability", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The `--rerun-buil...
null
systemd__mkosi__3796
systemd/mkosi
3,796
defect
deab0bfac7152cc1cf83fffc1616e99c458000db
baeb84f9111e9275d0ec276f997064fdced6f4f3
Fixes for arm64 images, add CI job
Some fixes to build arm64 images, and add a build-only CI job for it
diff --git a/mkosi/qemu.py b/mkosi/qemu.py index c75fa5ba61..006cb62baa 100644 --- a/mkosi/qemu.py +++ b/mkosi/qemu.py @@ -700,9 +700,9 @@ def finalize_firmware( ): return Firmware.linux - # At the moment there are no qemu firmware descriptions for non-x86 architectures that advertise - # secure-b...
2
1
1
[{"id": "G0", "claim": "Enabling secure boot for arm variants cannot be guaranteed to work because the necessary qemu firmware descriptions vary across distros, so the enablement should be limited (the author proposed limiting it to Debian/Ubuntu) or proper due diligence across distros should be done.", "category": "co...
null
systemd__mkosi__3809
systemd/mkosi
3,809
defect
27b0f3b5ebfbbee8f801e9c70d7a538420409f8a
981a0f7ba61362166ad5375de4ab81a896cb6ad9
Change UnifiedKernelImages to enum and accept signed/unsigned
With custom firmware we enroll our keys in db, so local UKIs can be built and there's no need to fail the build. Many distributions ship signed bootloaders, but they still don't ship UKIs. Add an enum and a parser (to keep backward compat), and if set to unsigned build locally instead of failing when the bootloader...
diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 415e2b6a04..2a4445bb18 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -2133,17 +2133,22 @@ def install_uki( with umask(~0o700): boot_binary.parent.mkdir(parents=True, exist_ok=True) + needs_build = True if context.config.bootloa...
3
2
0
[{"id": "G0", "claim": "FirmwareVariables is a runtime setting that cannot affect image builds, and the author is asked to explain what they are trying to do.", "category": "design", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The extra needs_build conditional makes install_uk...
null
systemd__mkosi__3832
systemd/mkosi
3,832
defect
ec4475a84699ec639dfa5c4e75fdc4c9291d90ad
789b8f176352105ad2a60b950440e2ac3746d5e8
Add devicetree-auto support for UKI
This renames Devicetree --> Devicetrees, and adds support for listing globs and files as currently supported for KernelModule* options. When multiple devicetrees are found, they are added to dtbauto sections when building a UKI. Multiple dtbs are not supported for type 1 booting. Fixes https://github.com/systemd...
diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 1ebb627c7c..adf1c18d88 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -1585,6 +1585,27 @@ def find_devicetree(context: Context, kver: str) -> Path: die(f"Requested devicetree {context.config.devicetree} not found") +def find_devicetrees_auto(c...
3
3
2
[{"id": "G0", "claim": "Drop the redundant existence checks before rglob in the devicetree lookup, since a missing directory (or an empty glob) simply produces no matches.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "find_devicetrees_auto shou...
null
systemd__mkosi__3910
systemd/mkosi
3,910
defect
62765f2d0723454fc45a4a78e1d29ab923053ad3
e8b523500e15eacd5ad56db3220798c607da0e5d
Add cxl config option support
x86 and ARM machines now support CXL devices, but these require cxl=on and maxmem arguments in the machine and memory configuration lines respectively. Add support for these options.
diff --git a/mkosi/config.py b/mkosi/config.py index 3823090e4c..fdefb74267 100644 --- a/mkosi/config.py +++ b/mkosi/config.py @@ -575,6 +575,9 @@ def supports_smm(self) -> bool: def supports_hpet(self) -> bool: return self.is_x86_variant() + def supports_cxl(self) -> bool: + return self.is_x8...
4
4
4
[{"id": "G0", "claim": "The brand-new MAXMEM and CXL settings should not carry compat_longs/compat_names entries, since those are only for settings that had different names in the past.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Both new settings (MA...
null
systemd__mkosi__3922
systemd/mkosi
3,922
defect
ab05ead5ebb726b0f84b092be2ee3678fda1091b
03ee01b6a5d11763c34a2ec33af96ca7f41df4b5
Treat default initrd as a regular subimage
Currently, because we build the default initrd as a substep of building a regular image, we have lots of special cased logic for it and we still propagate settings manually from the regular image to its default initrd. Let's streamline this by treating the default initrd as a regular image. The only complication ...
diff --git a/mkosi/__init__.py b/mkosi/__init__.py index ee61f7c30b..1796d38613 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -1,7 +1,6 @@ # SPDX-License-Identifier: LGPL-2.1-or-later import contextlib -import dataclasses import datetime import functools import getpass @@ -82,6 +81,7 @@ resolve_...
4
3
0
[{"id": "G0", "claim": "Add parentheses around the conditional expression in the initrds list comprehension so the line is less of a glyph soup.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Split the config_make_list_parser call for --initrd o...
null
systemd__mkosi__4035
systemd/mkosi
4,035
defect
c5c5c225e81b0ffba95399506307da7b23d82512
f9328a95cbe58cf67ee13773fc1712ff7bb79d7c
Match KernelModules= globs relative to modules root dir
**Update:** folded in the reverted changes from #4025 #4025 broke back-compat and was reverted. My bad. The old code, matched globs relative to `/lib/modules/KVER/kernel`. I didn't realize #4025 changed this behavior and now matches relative to `/lib/modules/KVER` . This broke absolute globs like `/drivers/mmc/...
diff --git a/mkosi/kmod.py b/mkosi/kmod.py index ecce5193ff..7432492b51 100644 --- a/mkosi/kmod.py +++ b/mkosi/kmod.py @@ -42,8 +42,10 @@ def globs_match_filename( glob += "*" if ( + # for backcompat, allow absolute paths relative to resolve relative /kernel/ dir + (glob.st...
4
4
2
[{"id": "G0", "claim": "The new code comment should not frame absolute-glob matching outside kernel/ as backwards compatibility; out-of-tree modules are a niche use case and looking in the kernel/ directory by default makes sense.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introd...
null
systemd__mkosi__4116
systemd/mkosi
4,116
defect
6f4684c7775b584e3c1a742510aa8aa6bdd473a7
0081ee5ec97bf6c54ab5ae643172f0c5ed35b1c8
Make sure we pass the right context to finalize_default_initrd()
We mess around with the context object to make it for for use when reading the subimages. But we need the full context again for parsing the default initrd later on, so make a copy before we delete stuff and pass that to finalize_default_initrd() Fixes #4114
diff --git a/mkosi/config.py b/mkosi/config.py index 5e5574c1c2..f90fcff4a2 100644 --- a/mkosi/config.py +++ b/mkosi/config.py @@ -5333,6 +5333,8 @@ def parse_config( context.parse_config_one(configdir, parse_profiles=True, parse_local=True) config = context.finalize() + # Keep a copy around for ...
1
1
1
[{"id": "G0", "claim": "The new test_initrd_packages test does not test what it is supposed to test: it still passes when the pull request's changes are removed, so it does not exercise the finalize_default_initrd() context fix.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
systemd__mkosi__4126
systemd/mkosi
4,126
defect
704f163ec0234c50f897c529e121398effbd48e9
58aa8e0b3fdf3e54e9bd92e6d200557b27a2500e
Allow specifying "default" value for Initrds=
Also use it as the default value for Initrds= when we decide a default initrd is needed. This allows both using the default initrd alongside other initrds as well as disabling building the default initrd by assigning the empty string to Initrds=.
diff --git a/mkosi/config.py b/mkosi/config.py index f90fcff4a2..35651199c7 100644 --- a/mkosi/config.py +++ b/mkosi/config.py @@ -1116,6 +1116,31 @@ def config_default_proxy_peer_certificate(namespace: dict[str, Any]) -> Optional return None +def config_default_initrds(namespace: dict[str, Any]) -> list[Path]...
1
1
0
[{"id": "G0", "claim": "The PR could keep the descriptive want_default_initrd function around, implemented as `return Path(\"default\") in config.initrds`, which would also make the following diff smaller.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
systemd__mkosi__4133
systemd/mkosi
4,133
defect
41cd2067bcbc3e985418a95e2aa9f8426260136d
af690167c5cab47795d0ba0aac9e825f0326e3ae
Support resizing output image
When the final image does not contain the rootfs it must be grown before being able to boot it. Since the exact size to grow is not easily known to the user, it's best if the image is already grown to the right size. Also, when flashing to disk it helps to have the image be the minimum size needed because otherwise fla...
diff --git a/mkosi/__init__.py b/mkosi/__init__.py index b225c334ed..e5fd13087c 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -4128,6 +4128,13 @@ def build_image(context: Context) -> None: elif context.config.output_format == OutputFormat.directory: context.root.rename(context.staging / contex...
1
1
0
[{"id": "G0", "claim": "When the requested output size is not larger than the current image size, mkosi should log a notice (instead of silently doing nothing) since the resize can only grow the image.", "category": "UX", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
systemd__mkosi__4144
systemd/mkosi
4,144
defect
5901524c4821858c4e32715355de9f04782176b6
380826f265cb954e20f85fe1400fa1e232235afb
Add MakeScriptsExecutable= setting to optionally try to make scripts executable before bailing out
If it fails, it was going to die() anyway. OBS sources defined inline (ie, not in a tarball) cannot have the mode preserved, so it's not possible to have mkosi.build or so as a bare script in an OBS project, one needs to tar it up and extract it again later, which means it cannot be edited by the inline editor, whic...
diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 03ec72e823..f3af5f0c99 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -655,7 +655,11 @@ def run_configure_scripts(config: Config) -> Config: for script in config.configure_scripts: if not os.access(script, os.X_OK): - die(f"{...
4
4
2
[{"id": "G0", "claim": "The new behaviour of chmodding and running scripts the user did not mark executable should be opt-in via a configuration option instead of happening implicitly.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The repeated not-execu...
null
systemd__mkosi__4157
systemd/mkosi
4,157
defect
1680fc5789588d33164fcf396e40f75c370879f5
6986021989a3d2a1195d88d098cf99a9f9bae364
oci: allow user defined labels and annotations
Adds `OciLabels=` and `OciAnnotations=` to `[Output]` section of mkosi config. OciLabels map to `.config.Labels` in the OCI config blob (Equiv to LABEL in Dockerfile) OciAnnotations maps to `.annotations` in the OCI manifest. Auto-set `org.opencontainers.image.ref.name` to mkosi ImageID as a convenience feature....
diff --git a/mkosi/__init__.py b/mkosi/__init__.py index cd411dcc34..2f54bfaccc 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -3678,6 +3678,7 @@ def make_oci(context: Context, root_layer: Path, dst: Path) -> None: "/sbin/init", *context.config.kernel_command_line, ...
3
1
0
[{"id": "G0", "claim": "Drop the match=config_match_key_value patterns from the OciLabels= and OciAnnotations= settings, since there is no clear use case for them yet.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The dict() call wrapping context.config...
null
systemd__mkosi__4165
systemd/mkosi
4,165
defect
0d4cb2dc413127537c88b52b0f83dfd488a1042e
ba904e8443383b44265da58f1db1a5fea2cf14a6
Rework sandbox globbing and exist checks
Using bash to glob in the sandbox is rather primitive. Let's do better by taking advantage of the fact that we can run mkosi-sandbox without executing another binary. We beef up fork_and_wait() to allow passing in a sandbox and use a pipe to send the pickled result of the target function back to the parent process so w...
diff --git a/mkosi/distribution/rhel.py b/mkosi/distribution/rhel.py index 752fd37d03..2b22b9b8e8 100644 --- a/mkosi/distribution/rhel.py +++ b/mkosi/distribution/rhel.py @@ -31,7 +31,7 @@ def sslcacert(context: Context) -> Path | None: if context.config.mirror: return None - path = Path(...
2
1
0
[{"id": "G0", "claim": "The new `except BaseException:` block in fork_and_wait directly handles BaseException, which the code scanner flags and should be narrowed or handled differently.", "category": "security", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The checks for Non...
null
systemd__mkosi__4228
systemd/mkosi
4,228
defect
56d5ed4247deb3d0b11f7a6aec5a1a9f580ccde5
0501799eda2ab071140e08740f88d465fad3fff4
Add DriveType= setting for qemu root disk device type
Add a new DriveType= setting that allows configuring the device type used for the root disk when booting a virtual machine with qemu. The supported types are virtio-blk (default, preserving existing behavior), virtio-scsi, and nvme. Previously, the only way to use nvme was by manually adding qemu device arguments vi...
diff --git a/mkosi/config.py b/mkosi/config.py index 03574dff7e..7d3e5c1668 100644 --- a/mkosi/config.py +++ b/mkosi/config.py @@ -405,6 +405,12 @@ class Vmm(StrEnum): vmspawn = enum.auto() +class QemuDriveType(StrEnum): + virtio_blk = enum.auto() + virtio_scsi = enum.auto() + nvme = enum.auto() + + ...
5
5
2
[{"id": "G0", "claim": "Don't bother adding a compat name to the newly introduced DriveType= option; drop compat_names from the new ConfigSetting.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new DriveType= setting also needs to be added t...
null
systemd__systemd__24855
systemd/systemd
24,855
defect
1aefb25f37fbfb42c2e229d245e22735b897db6e
b67a9ce24f984f946b1279933de3fe39b2eb603a
better qemu support (handle direct kernel boot etc).
Fixes #25794
diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c index fdbc55b884fd..a782bba18915 100644 --- a/src/boot/efi/boot.c +++ b/src/boot/efi/boot.c @@ -2672,7 +2672,11 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) { export_variables(loaded_image, loaded_image_path, init_usec); - ...
36
29
3
[{"id": "G0", "claim": "The newly added #include \"drivers.h\" sits after ticks.h/util.h; please sort the include block alphabetically.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new code uses BOOLEAN/FALSE/CHAR16; it should use bool/fal...
null
systemd__systemd__31550
systemd/systemd
31,550
defect
f557129ecba0826f2a2bfe055a21e7e33ccb57b0
4fce09d62916b98dfd2ec536c637457006f9b779
Dynamically load compression libraries
Dynamically load compression libraries (LZ4, ZSTD, LZMA) so we can reduce the size of the initram images by omitting libraries which aren't really used.
diff --git a/src/basic/compress.c b/src/basic/compress.c index ac0bfdfcd5fe..e890cd5c28ea 100644 --- a/src/basic/compress.c +++ b/src/basic/compress.c @@ -23,6 +23,7 @@ #endif #include "alloc-util.h" +#include "dlfcn-util.h" #include "compress.h" #include "fd-util.h" #include "fileio.h" @@ -34,8 +35,25 @@ #incl...
11
6
3
[{"id": "G0", "claim": "Before merging this dlopen-based approach the author should first investigate replacing the individually loaded compression libraries with libarchive, since adding more dlopen'd dependencies is hard to manage and the reduced dependency tree is not user-observable.", "category": "design", "verdic...
null
systemd__systemd__37271
systemd/systemd
37,271
defect
3e9c399465f7c6363778cb822764b246feb3e721
b7c78493c5219125527b38671000dc6c30dbcfed
core/namespace: fix issue in PrivateTmp=disconnected vs var.mount
Fixes #37258. Replaces #37259.
diff --git a/src/core/namespace.c b/src/core/namespace.c index 207f3a2d667e..09d5f245b7a0 100644 --- a/src/core/namespace.c +++ b/src/core/namespace.c @@ -60,6 +60,7 @@ typedef enum MountMode { MOUNT_PRIVATE_DEV, MOUNT_BIND_DEV, MOUNT_EMPTY_DIR, + MOUNT_EMPTY_DIR_WHEN_EMPTY, M...
3
3
0
[{"id": "G0", "claim": "The MOUNT_EMPTY_DIR_WHEN_EMPTY mechanism mounted on /var/ should be dropped: what the service sees for /var/ becomes racy, later host mounts can no longer propagate into the namespace, and a non-mount yet empty /var/ would get a pointless tmpfs.", "category": "design", "verdict": "supported", "p...
null
systemd__systemd__37434
systemd/systemd
37,434
defect
798d140cacb415bbe4f15222d3f5e391b94f2e39
0162a5907e3df7d3d8532d6f520b4689c98821b5
validatefs: fix checks on file systems backed by multiple devices (i.e. verity)
Fixes #37157
diff --git a/man/repart.d.xml b/man/repart.d.xml index 27c78f63dad2..fde83b09786c 100644 --- a/man/repart.d.xml +++ b/man/repart.d.xml @@ -962,12 +962,12 @@ <varlistentry> <term><varname>AddValidateFS=</varname></term> - <listitem><para>Takes a boolean argument. If enabled will set the <varname...
9
9
2
[{"id": "G0", "claim": "Fix the documentation typo where the added sentence reads \"checked against this lest\" instead of \"checked against this list\".", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Fix the grammar of the added sentence so it re...
null
systemd__systemd__37725
systemd/systemd
37,725
defect
8f8148cb08bf9f2c0e1f7fe6a5e6eb383115957b
08e86564fcad01dea0a8a762ac28936cf6d6fba4
sd-lldp-rx: add VLAN ID parsing
While the `port_vlan_id` field was already present in the `sd_lldp_neighbor`, it wasn't currently parsed from the LLDP packet. I added support for that as well as a small parsing test. Closes #28354.
diff --git a/src/libsystemd-network/lldp-neighbor.c b/src/libsystemd-network/lldp-neighbor.c index e93cf566fa7a..813ae536cb27 100644 --- a/src/libsystemd-network/lldp-neighbor.c +++ b/src/libsystemd-network/lldp-neighbor.c @@ -315,6 +315,18 @@ int lldp_neighbor_parse(sd_lldp_neighbor *n) { ...
11
9
3
[{"id": "G0", "claim": "The log_lldp_rx_errno() call reporting the bad 802.1 VLAN ID TLV length should be reformatted to follow the indentation and line-breaking style used elsewhere, without the spurious line break.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id...
null
systemd__systemd__37972
systemd/systemd
37,972
defect
a7bfb9f76b96888d60b4f287f29dcbf758ba34c0
008bd07cabc4547b7f0be8423dbc6eed4aa285b5
conf-files: fixes root directory handling, and split CONF_FILES_FILTER_MASKED into two
Then, use the new CONF_FILES_FILTER_MASKED_BY_SYMLINK flag in userdb, to make .membership files correctly enumerated. Fixes #37945.
diff --git a/src/shared/userdb.c b/src/shared/userdb.c index 2238073e01f0..47adb504a436 100644 --- a/src/shared/userdb.c +++ b/src/shared/userdb.c @@ -1669,7 +1669,7 @@ static void discover_membership_dropins(UserDBIterator *i, UserDBFlags flags) { &i->dropins, ".member...
4
3
2
[{"id": "G0", "claim": "Dropping CONF_FILES_FILTER_MASKED from the .membership drop-in lookup removes the ability to mask a membership file via a symlink to /dev/null; the flag should be split (e.g. into FILTER_MASKED_BY_SYMLINK and FILTER_MASKED_BY_EMPTY) so the symlink-mask filtering can be retained here.", "category...
null
systemd__systemd__38113
systemd/systemd
38,113
defect
a2123bf9d482f8d7f8679802fa9e5386d15cfde4
b018cd3dedf3aebe89efbd718f6f8fc442cfbdf1
Support global sysext/confext in systemd-stub/systemd-sysext
Systemd-stub supports loading addons, credentials, system and configuration extensions from ESP and while addons and credentials can be both global and per-UKI, sysext/confext are only per-UKI. Add support for global sysext/confext to systemd-stub/systemd-sysext. Fixes #37993
diff --git a/man/systemd-stub.xml b/man/systemd-stub.xml index abba8834fba3..cf27916b8c7e 100644 --- a/man/systemd-stub.xml +++ b/man/systemd-stub.xml @@ -36,6 +36,8 @@ <member><filename><replaceable>ESP</replaceable>/.../<replaceable>foo</replaceable>.efi.extra.d/*.confext.raw</filename></member> <member...
4
2
2
[{"id": "G0", "claim": "The new man-page entries describe the global sysext/confext images as being picked up from /loader/credentials/, but those files are not credentials, so the synopsis should name the right directories (e.g. sysexts/ and confexts/).", "category": "documentation", "verdict": "supported", "priority"...
null
systemd__systemd__38586
systemd/systemd
38,586
defect
57aeb4a403bd6897b99f07c6efa9e8618df55731
0caa1acf458715f9454ca88e75c23909ef404e3d
Avoid triggering assertions by nss modules when uname and/or sigprocmask are masked
Fixes #38582.
diff --git a/src/basic/assert-util.c b/src/basic/assert-util.c index a1aa5c82e23e..bbd2aff6083e 100644 --- a/src/basic/assert-util.c +++ b/src/basic/assert-util.c @@ -4,6 +4,7 @@ #include <stdlib.h> #include "assert-util.h" +#include "env-util.h" #include "errno-util.h" #include "log.h" @@ -17,6 +18,14 @@ void ...
2
2
1
[{"id": "G0", "claim": "log_set_assert_return_is_critical_from_env() should cache the parsed value of $SYSTEMD_ASSERT_RETURN_IS_CRITICAL, given it may be called many times.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The environment lookup in log...
null
systemd__systemd__39260
systemd/systemd
39,260
defect
9fe0b9000561fbe18e0b9929326720f49866373a
1858be0958bd43030e02784ad9e90e3bde611242
network: add DHCP server domain name option support
Implements DHCP option 15 (Domain Name) for systemd-networkd's DHCP server, allowing administrators to configure the DNS default domain that clients should use. This addresses the feature request in issue #37077, where users needed to manually configure domain names using SendOption=15:string:example.com as a workar...
diff --git a/man/systemd.network.xml b/man/systemd.network.xml index eefaa5572c24..26db136b2a50 100644 --- a/man/systemd.network.xml +++ b/man/systemd.network.xml @@ -3992,6 +3992,19 @@ ServerAddress=192.168.0.1/24</programlisting> <xi:include href="version-info.xml" xpointer="v226"/></listitem> </varli...
4
4
3
[{"id": "G0", "claim": "The single varlistentry describes both EmitDomain= and Domain= as 'Takes a boolean', which is wrong for Domain=, so the options must be split into two separate varlistentry sections.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "cl...
null
systemd__systemd__39391
systemd/systemd
39,391
defect
28aa0a1f25470b21fbe3b8af2d9d99e616c000a4
259d77f911b43bef5cb2ee19474760434c99db63
core: implement Kill/Automount/Mount Context/Runtime for io.systemd.Unit.List
The PR implements the following objects + tests for `io.systemd.Unit.List`: - `KillContext` - `AutomountContext` - `AutomountRuntime` - `MountContext` - `MountRuntime` It's a continuation of the following PRs: * https://github.com/systemd/systemd/pull/37432 * https://github.com/systemd/systemd/pull/37646 * h...
diff --git a/src/basic/unit-def.c b/src/basic/unit-def.c index a2b2f9d6f05d..cfbd8abe1fbe 100644 --- a/src/basic/unit-def.c +++ b/src/basic/unit-def.c @@ -72,6 +72,14 @@ const char* unit_dbus_interface_from_name(const char *name) { return unit_dbus_interface_from_type(t); } +const char* unit_type_to_capital...
1
1
0
[{"id": "G0", "claim": "The failure message in exec_command_build_json should say the exec command flags were converted to a strv, not \"to string\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
systemd__systemd__39742
systemd/systemd
39,742
defect
c15bd80eb99c336a9503c4def2e77d2d66270794
9902f112d1a7e5455d16ea4576cad4b22fb68c0b
network: Support interface-bound ECMP routes in MultiPathRoute=
MultiPathRoute= can now specify device-only nexthops without a gateway address, e.g. MultiPathRoute=@wg0. This enables ECMP configurations over interfaces that don't use gateway addresses, such as WireGuard tunnels. The syntax is extended from "address[@device] [weight]" to "[address]@device [weight]". The address i...
diff --git a/man/systemd.network.xml b/man/systemd.network.xml index dda1e117ed88..075adf118c7a 100644 --- a/man/systemd.network.xml +++ b/man/systemd.network.xml @@ -2322,15 +2322,24 @@ NFTSet=prefix:netdev:filter:eth_ipv4_prefix</programlisting> </varlistentry> <varlistentry> - <term><varname>M...
23
21
3
[{"id": "G0", "claim": "The log_syntax() call in config_parse_multipath_route() should keep its original compact formatting instead of being broken across many lines.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The parser should check earlier...
null
systemd__systemd__39980
systemd/systemd
39,980
defect
929ce35f8d24db3f2e951c2e68cd23856010600d
a3274623b19bccdb03aab357c73c5b0bc12daef5
sysext: Skip refresh if no changes are found
When the extensions for the final system are already set up from the initrd we should avoid disrupting the boot process with the remount (which currently isn't atomic) and the daemon reload for systemd-confext and systemd-sysext. Similarly, when sysupdate ran and updated extensions it's best to avoi...
diff --git a/man/systemd-sysext.xml b/man/systemd-sysext.xml index b5ab6826a2e8..0facf78960a7 100644 --- a/man/systemd-sysext.xml +++ b/man/systemd-sysext.xml @@ -371,6 +371,17 @@ <xi:include href="version-info.xml" xpointer="v248"/></listitem> </varlistentry> + <varlistentry> + <term><opt...
19
15
2
[{"id": "G0", "claim": "ShellCheck (SC2086) flags the unquoted $fake_root expansions in TEST-50-DISSECT.sysext.sh, which should be double-quoted to prevent globbing and word splitting.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "name_to_handle_at...
null
systemd__systemd__40168
systemd/systemd
40,168
defect
27de9c391d0111655b8607972f1c592896908eb4
86eb36b502e42f4790001fa1fd345cf9069d32a6
Follow ups for #39806
Fixes #40166
diff --git a/src/home/homework-luks.c b/src/home/homework-luks.c index 8ed455545114..10ed181fcf53 100644 --- a/src/home/homework-luks.c +++ b/src/home/homework-luks.c @@ -7,7 +7,6 @@ #include <sys/ioctl.h> #include <sys/xattr.h> #include <unistd.h> -#include "pidref.h" #if HAVE_VALGRIND_MEMCHECK_H #include <valgri...
3
3
1
[{"id": "G0", "claim": "The new comment in bus_image_common_remove should be worded as \"takes over ownership internally\" instead of \"makes a copy\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "sd_event_add_child_pidfd needs the same update t...
null
systemd__systemd__41028
systemd/systemd
41,028
defect
45e4e035f7f2dc30e841ec3f218f90bb8f2e55d8
704b7a9ab5f4a819f80895de57d446da78e3727c
network-generator: support BOOTIF= and rd.bootif=0 options
The network generator currently supports many of the options described by dracut.cmdline(7), but not everything. This commit adds support for the BOOTIF= option (and the related rd.bootif= option) used in PXE setups. This is implemented by treating BOOTIF as a special name/placeholder when used as an interface na...
diff --git a/src/network/generator/network-generator-main.c b/src/network/generator/network-generator-main.c index c449a6d305ba..0cef0a6f6b9f 100644 --- a/src/network/generator/network-generator-main.c +++ b/src/network/generator/network-generator-main.c @@ -233,6 +233,10 @@ static int run(int argc, char *argv[]) { ...
10
9
3
[{"id": "G0", "claim": "Using \"BOOTIF\" as a special network interface name is questionable - it is not supported by dracut's ip= handling, and yuwata asked not to use it as an interface name, suggesting a safe dummy name such as \":BOOTIF\" instead.", "category": "design", "verdict": "opposed", "priority": "P2", "sco...
null
systemd__systemd__41099
systemd/systemd
41,099
defect
cec4f04faabd26d1f1a41354efe6049b5f4b98fa
f40af6160c04b34f04340c89022df79d379afa4d
measure: make tpm_log_tagged_event() measure CC as well
tpm_log_tagged_event() only measures the event to the TPM while tpm_log_ipl_event() measures the event both to the TPM and CC. Fix the inconsistency. Note, this is a potentially breaking change for TDX guests as systemd will now measure more stuff to the MRTD/RTMRs, reference values for attestation may need to be ad...
diff --git a/src/boot/measure.c b/src/boot/measure.c index cf3d4254b86c..5597c8a035c7 100644 --- a/src/boot/measure.c +++ b/src/boot/measure.c @@ -293,6 +293,7 @@ EFI_STATUS tpm_log_tagged_event( EFI_TCG2_PROTOCOL *tpm2; EFI_STATUS err; + bool tpm_ret_measured = false, cc_ret_measured; ...
3
3
1
[{"id": "G0", "claim": "The declaration `bool tpm_ret_measured = false, cc_ret_measured;` mixes an initialized and an uninitialized variable in a single comma-separated declaration and is easy to misread; it should be split into two declarations or both variables initialized.", "category": "maintainability", "verdict":...
null
systemd__systemd__41131
systemd/systemd
41,131
defect
cccb77304b14bd3dcde0eb04f2b261f170b8a7d3
f61c19afdbfe1f17c9c498a1e74176768bf5d756
repart: Make it possible to set persistent allow-discards activation flag
Another thing we need to do in GNOME OS that would be nice to move to systemd-repart. AllowDiscards= will set allow-discards in the persistent flags which will make activating the device automatically activate with that option. This is useful for devices discovered through gpt-auto-generator without needing to use s...
diff --git a/src/repart/repart.c b/src/repart/repart.c index f6ca9aca0565..b5d17195072b 100644 --- a/src/repart/repart.c +++ b/src/repart/repart.c @@ -471,6 +471,7 @@ typedef struct Partition { char *compression; char *compression_level; uint64_t fs_sector_size; + bool allow_discards; ...
7
7
2
[{"id": "G0", "claim": "The default `allow_discards = true` is a behavioral change that would set the CRYPT_ACTIVATE_ALLOW_DISCARDS persistent flag on all newly created encrypted partitions; if intentional it should be documented, otherwise the default should be false.", "category": "design", "verdict": "supported", "p...
null
systemd__systemd__41243
systemd/systemd
41,243
defect
bb7486db618f4cf5109abdfef797ee70c47223c0
16a1b902c760c53b604125625e1ee0a44efb6263
sd-varlink: gracefully reject arrays/maps with a null element
Follow-up for 799392286ec0797c0a2a1260c444360b47ef36fc.
diff --git a/src/libsystemd/sd-varlink/sd-varlink-idl.c b/src/libsystemd/sd-varlink/sd-varlink-idl.c index a70cbe529ce2..751277f45d9a 100644 --- a/src/libsystemd/sd-varlink/sd-varlink-idl.c +++ b/src/libsystemd/sd-varlink/sd-varlink-idl.c @@ -1705,7 +1705,12 @@ static int varlink_idl_validate_symbol(const sd_varlink_sy...
2
2
0
[{"id": "G0", "claim": "The new null_array_element and null_map_element tests should assert bad_field after the ASSERT_ERROR check (ASSERT_STREQ(bad_field, \"arr\") and ASSERT_STREQ(bad_field, \"m\")), matching the nearby `any` test and verifying the full error propagation path.", "category": "testing", "verdict": "sup...
null
systemd__systemd__41302
systemd/systemd
41,302
defect
7aa94251fe07a62745df8014af2c93c3105fcb69
d908e8e476471d6322296ccfa7e140b8b1221816
A batch of conversions to the new options parsers
This was done with Claude, but it needed an insane amount of prodding to not do stupid things.
diff --git a/man/systemd-update-done.service.xml b/man/systemd-update-done.service.xml index d9d78262a142..8bb92ca5b504 100644 --- a/man/systemd-update-done.service.xml +++ b/man/systemd-update-done.service.xml @@ -79,6 +79,7 @@ </varlistentry> <xi:include href="standard-options.xml" xpointer="help" /> ...
8
7
4
[{"id": "G0", "claim": "The validatefs --root handler uses the getopt global optarg instead of the new option parser's arg variable, so streq(optarg, \"auto\") will crash with a segfault when --root= is passed.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "...
null
systemd__systemd__41400
systemd/systemd
41,400
defect
b3c3a40b35e94806c590116e50e9c49929b20efc
003da28522a2b2009b9ae7f6d908275fc13c326a
many: another set of checks for pointer access without NULL check
Followup for https://github.com/systemd/systemd/pull/41370 Next set of pointer-deref coccinelle tweaks for: ''src/core/' 'src/journal/' 'src/network/' ''src/nspawn/'
diff --git a/meson.build b/meson.build index 5c02ab866406..c9e96b259149 100644 --- a/meson.build +++ b/meson.build @@ -2978,11 +2978,7 @@ if spatch.found() # Remove directories from this list as they are cleaned up. coccinelle_exclude = [ 'src/basic/', - 'src/core/', - ...
6
4
1
[{"id": "G0", "claim": "In `ifindex_str_compare_func` the `a` and `b` parameters of the qsort comparison callback can never be NULL, so `POINTER_MAY_BE_NULL(a)`/`POINTER_MAY_BE_NULL(b)` misleadingly documents them as intentionally nullable and `assert(a); assert(b);` should be used instead, as other comparison function...
null
systemd__systemd__41401
systemd/systemd
41,401
defect
7471dc299451f37517125a25539ea8821630a1b4
86c7ce606f28d8b0982e4d4ff1349574e8001659
terminal-util: fix boot hang from ANSI terminal size queries
Since v257, terminal_fix_size() is called during early boot via console_setup() → reset_dev_console_fd() to query terminal dimensions via ANSI escape sequences. This has caused intermittent boot hangs where the system gets stuck with a blinking cursor and requires a keypress to continue (see systemd/systemd#35499). ...
diff --git a/src/basic/terminal-util.c b/src/basic/terminal-util.c index 732ab0824d4d..ff0c4dd2ab1d 100644 --- a/src/basic/terminal-util.c +++ b/src/basic/terminal-util.c @@ -2371,59 +2371,33 @@ int get_default_background_color(double *ret_red, double *ret_green, double *ret return r; } -int terminal_get_si...
2
2
1
[{"id": "G0", "claim": "The public wrapper functions terminal_get_size_by_dsr and terminal_get_size_by_csi18 in basic/ are used only by tests, so the API should be refactored into static query helpers plus a single terminal_get_size(input_fd, output_fd, ret_rows, ret_columns, try_dsr, try_csi18) with the two bools set ...
null
systemd__systemd__41414
systemd/systemd
41,414
defect
365361f4908d9cfa9a371cd2c52a19c2414cb554
d336bd99770da5d80c38e9dea6aee274e96a6aa8
repart: allow --el-torito= with any --empty= value
The restriction requiring --empty= to be require, force, or create when using --el-torito= is unnecessary. context_verify_eltorito_overlap() already validates that the ISO 9660 blocks don't collide with GPT partition entries or the first usable LBA, which is sufficient to guarantee safety regardless of the empty mode....
diff --git a/src/repart/repart.c b/src/repart/repart.c index 5c36bad0758f..d672db6d266b 100644 --- a/src/repart/repart.c +++ b/src/repart/repart.c @@ -10280,10 +10280,6 @@ static int parse_argv(int argc, char *argv[]) { arg_pager_flags |= PAGER_DISABLE; } - if (arg_eltorito && !IN_SET...
2
2
2
[{"id": "G0", "claim": "The man page at man/systemd-repart.xml:734-736 still documents that --el-torito= is available only when --empty= is require, force or create, which is now incorrect after the pull request removed the code restriction, so the paragraph should be removed or reworded to match the new behavior.", "c...
null
systemd__systemd__41415
systemd/systemd
41,415
defect
365361f4908d9cfa9a371cd2c52a19c2414cb554
dd3b26d7695d08b3732673a5e5c85e829bb282c8
loop-util: create loop device for block devices with sector size mismatch
loop-util: create loop device for block devices with sector size mismatch Previously, loop_device_make_internal() always used the block device directly (via loop_device_open_from_fd()) for whole-device access, regardless of sector size. This is incorrect when the GPT partition table was written with a different s...
diff --git a/src/boot/part-discovery.c b/src/boot/part-discovery.c index 25f60521acf3..a6ea58bce7ae 100644 --- a/src/boot/part-discovery.c +++ b/src/boot/part-discovery.c @@ -293,6 +293,138 @@ EFI_STATUS partition_open(const EFI_GUID *type, EFI_HANDLE *device, EFI_HANDLE * return EFI_SUCCESS; } +static char...
9
4
3
[{"id": "G0", "claim": "In the new bootloader GPT probing, entries_size is the sector-size-aligned size, but per the UEFI spec PartitionEntryArrayCRC32 covers exactly NumberOfPartitionEntries * SizeOfPartitionEntry bytes, so for entry arrays not aligned to the sector size the CRC check spuriously fails and the function...
null
systemd__systemd__41424
systemd/systemd
41,424
defect
365361f4908d9cfa9a371cd2c52a19c2414cb554
a6d0c5715193698df3ecf669663b73d5ef83159c
loop-util: use auto-detect open mode for loop device setup
When callers do not explicitly request read-only mode, pass open_flags as -1 (auto-detect) instead of hardcoding O_RDWR. This enables the existing O_RDWR-to-O_RDONLY retry logic in loop_device_make_by_path_at() which falls back to O_RDONLY when opening the backing device with O_RDWR fails with EROFS or similar errors. ...
diff --git a/src/dissect/dissect.c b/src/dissect/dissect.c index d36f31e5c717..c8dfcdc8a165 100644 --- a/src/dissect/dissect.c +++ b/src/dissect/dissect.c @@ -2015,7 +2015,7 @@ static int run(int argc, char *argv[]) { uint32_t loop_flags; int open_flags; - ...
1
1
1
[{"id": "G0", "claim": "In mstack_open_images() the new -1 open mode makes loop_device_make() auto-detect on m->what_fd, which is always an O_PATH fd, so loop_device_make_internal() returns -EBADFD and the IMAGE_BLOCK path that previously worked with the explicit O_RDWR argument breaks.", "category": "correctness", "ve...
null
systemd__systemd__41490
systemd/systemd
41,490
defect
0508f15b7fc6c6f3c6760e9f79b6d8de344e56ef
5e2502481f21dc41367cfc640ab8573d3b523c84
repart: Use --shrink with mkfs.btrfs to get a minimal filesystem
Avoids populating the filesystem twice similar to read-only filesystems.
diff --git a/man/repart.d.xml b/man/repart.d.xml index d0992830b782..f3ed246b6ec4 100644 --- a/man/repart.d.xml +++ b/man/repart.d.xml @@ -842,9 +842,9 @@ <literal>off</literal> when false, and <literal>best</literal> when true). Defaults to <literal>off</literal>. If set to <literal>best</literal>, t...
2
2
0
[{"id": "G0", "claim": "The new Minimize=best error message should use the Oxford comma: \"read-only filesystems, btrfs, or Verity=hash.\"", "category": "style", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The new Minimize=best conditional should be spread over multiple line...
null
systemd__systemd__41615
systemd/systemd
41,615
defect
4bbdc8a6a2eaca3b717810bbae0265eb375ab68c
055c1a87b8fcfc266692e073fe6a85a158172959
tree-wide: convert remaining varlink string fields to enum types
Follow-up to #40972. Convert remaining plain string fields to proper varlink enum types across all interfaces, per the policy that user-controlled/API fields should be declared as proper enums in the IDL. Interfaces converted: - io.systemd.Manager — LogTarget, DefaultStandardOutput/Error, DefaultMemory/CPU/IOPres...
diff --git a/src/core/varlink-execute.c b/src/core/varlink-execute.c index 054a79401d7f..3e43ad52890a 100644 --- a/src/core/varlink-execute.c +++ b/src/core/varlink-execute.c @@ -27,6 +27,9 @@ #include "varlink-common.h" #include "varlink-execute.h" +#define JSON_BUILD_PAIR_MOUNT_PROPAGATION_FLAG(name, s) \ + ...
9
4
0
[{"id": "G0", "claim": "Consider replacing the single-use JSON_BUILD_PAIR_MOUNT_PROPAGATION_FLAG macro with an inline condition or a callback consistent with existing patterns, and avoid the macro's double evaluation of its argument.", "category": "design", "verdict": "opposed", "priority": "P2", "scope": "introduced"}...
null
systemd__systemd__41651
systemd/systemd
41,651
defect
961e92854aac36444c91fab3957b3ed14d91e7f3
5d46e4e059ae9b3dabebb404d8dcdae5dd3c9715
Support for "positional options" and another batch of conversions
To make review more sensible, I split out the reordering into separate commits when there was a lot of reordering.
diff --git a/src/shared/options.c b/src/shared/options.c index dc2fb34cf62f..af972101e3e7 100644 --- a/src/shared/options.c +++ b/src/shared/options.c @@ -87,9 +87,10 @@ int option_parse( const char *optname = NULL, *optval = NULL; _cleanup_free_ char *_optname = NULL; /* allocated option name */ ...
9
7
1
[{"id": "G0", "claim": "OPTION_POSITIONAL_ENTRY is missing from option_is_metadata(), so partial_match_error() could list the '(positional)' entry among the candidate options in its error message.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The c...
null
systemd__systemd__41652
systemd/systemd
41,652
defect
0d57260976b87ff213edfe3cb29e352c67e54d48
8f3b786094de9d6389322336d0e053428eb6e3d1
chase: add explicit root_fd parameter to chaseat() and drop CHASE_AT_RESOLVE_IN_ROOT
Split the single directory fd that chaseat() used to take into two separate fds: a root_fd that sets the chroot boundary (symlinks may not escape it, absolute symlinks resolve relative to it), and a dir_fd that path resolution starts from. This makes the chroot semantics of chaseat() explicit at every call site ins...
diff --git a/src/basic/chase.c b/src/basic/chase.c index 82946eae5f19..6b676105fb05 100644 --- a/src/basic/chase.c +++ b/src/basic/chase.c @@ -1,7 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #include <linux/magic.h> -#include <sys/mount.h> #include <unistd.h> #include "alloc-util.h" @@ -18,18 +17,4...
29
15
3
[{"id": "G0", "claim": "Add `result = mfree(result);` between the chaseat() calls in TEST(chaseat_separate_root_and_dir) because the CHASE_NONEXISTENT call heap-allocates result and the next chaseat() call overwrites it without freeing (and ideally also assert on the expected value).", "category": "correctness", "verdi...
null
systemd__systemd__41657
systemd/systemd
41,657
defect
4efb5d389c9653e3a61e583c64dc3d094eb8911e
424b3d74fac9ea6b32d84b348c4720c03f448651
string-util: beef up string_is_safe()
Let's make string_is_safe() more useful. It currently refuses quotes, but the occasional reader will not figure that out by its name, and it's not obvious that that's what "safe" means. Let's hence add a flags parameter with an explicit flags STRING_NO_QUOTES that makes this clear, i.e. is a compiler-honoured form o...
diff --git a/src/basic/string-util.c b/src/basic/string-util.c index bd79dbfd2473..3678456aa942 100644 --- a/src/basic/string-util.c +++ b/src/basic/string-util.c @@ -1094,25 +1094,37 @@ int strdup_to_full(char **ret, const char *src) { } }; -bool string_is_safe(const char *p) { - if (!p) +bool strin...
12
8
4
[{"id": "G0", "claim": "Backslashes are silently accepted by the new baseline where the old string_is_safe() rejected them, and this relaxation should be reversed by putting backslash rejection in the baseline (or at least documented).", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduc...
null
systemd__systemd__41661
systemd/systemd
41,661
defect
4efb5d389c9653e3a61e583c64dc3d094eb8911e
d8ca30d7ab37b453163161d63c130bbe94fc4af4
string-util: check for overflow in strrep()
This simply mirrors the same overflow check we already have in strrepa(), in case someone passed us a sufficiently long string. strrep() is currently used only in tests, so this is just hardening.
diff --git a/src/basic/string-util.c b/src/basic/string-util.c index bd79dbfd2473..c830683ff323 100644 --- a/src/basic/string-util.c +++ b/src/basic/string-util.c @@ -984,7 +984,10 @@ char* strrep(const char *s, unsigned n) { assert(s); l = strlen(s); - p = r = malloc(l * n + 1); + if ...
2
2
1
[{"id": "G0", "claim": "The overflow check should also cover the +1 addition in the malloc size, i.e. use INC_SAFE to add the 1 extra value.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The types of n and i should be changed to size_t, and the var...
null
systemd__systemd__41682
systemd/systemd
41,682
defect
e6fbf51fd69fa9cc7bd8998bc17dca8d05d0293a
09b3f5ba196718c7fbfac6501d035122dc41c199
shared/curl-util: load libcurl via dlopen
Convert curl-util to the dlopen pattern used by other optional shared libraries in libshared (libarchive, pcre2, idn, ...). Declare the curl API entry points with DLSYM_PROTOTYPE, resolve them in a dlopen_curl() helper, and call the sym_* wrappers from callers. curl_glue_new() now loads the library on first use, so con...
diff --git a/meson.build b/meson.build index e0e7102a39f4..087539037995 100644 --- a/meson.build +++ b/meson.build @@ -1296,6 +1296,7 @@ endforeach libcurl = dependency('libcurl', version : '>= 7.32.0', required : get_option('libcurl')) +libcurl_cflags = libcurl.partial_depe...
4
3
1
[{"id": "G0", "claim": "Move the dlopen_curl() call in imdsd.c (and likewise in journal-upload.c) after parse_argv()/config parsing so that --help and --version still work.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "dlopen_curl() logs a missing ...
null
systemd__systemd__41736
systemd/systemd
41,736
defect
e6fbf51fd69fa9cc7bd8998bc17dca8d05d0293a
25ebb067c8917cd36e6c3c7e4b29b4ad2f85b259
fdisk-util: load libfdisk via dlopen
Convert fdisk-util to the dlopen pattern used by other optional shared libraries in libshared. Declare the libfdisk API entry points with DLSYM_PROTOTYPE, resolve them in a dlopen_fdisk() helper, and call the sym_* wrappers from the homework, sysupdate and repart binaries that use them. With this in place fdisk-util...
diff --git a/meson.build b/meson.build index e0e7102a39f4..ecbe1a1e14d8 100644 --- a/meson.build +++ b/meson.build @@ -1158,6 +1158,7 @@ libfdisk = dependency('fdisk', version : '>= 2.32', disabler : true, required : get_option('fdisk')) +libfdisk_cfl...
7
7
5
[{"id": "G0", "claim": "dlopen_fdisk() is called before parse_argv() in repart, so systemd-repart --help/--version will fail at runtime if libfdisk.so.1 is not installed; the call should be moved after parse_argv()/the early-exit paths.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "in...
null
systemd__systemd__41746
systemd/systemd
41,746
defect
c99e93ce0a195eafe988b1769729c526ca68352b
dbc13f4ab6b577594756b6fc6f450960ef1b6a8c
shared: load libgnutls and libmicrohttpd via dlopen
Convert the GnuTLS and libmicrohttpd usage in journal-remote to the dlopen pattern used by other optional shared libraries. A new src/shared/gnutls-util.{h,c} declares the GnuTLS entry points via DLSYM_PROTOTYPE and resolves them in dlopen_gnutls(); microhttpd-util is moved from src/journal-remote to src/shared and gai...
diff --git a/meson.build b/meson.build index 087539037995..653afb08da45 100644 --- a/meson.build +++ b/meson.build @@ -1261,6 +1261,7 @@ libmicrohttpd = dependency('libmicrohttpd', version : '>= 0.9.33', required : get_option('microhttpd')) conf.set10('HAVE_MICRO...
12
8
2
[{"id": "G0", "claim": "run() guards dlopen_microhttpd() with arg_listen_http || arg_listen_https only, so with fd-based --listen-http/--listen-https arguments (http_socket/https_socket set, the args NULL) create_remoteserver() still calls setup_microhttpd_server(), whose sym_MHD_* wrappers are unresolved and lead to a...
null
systemd__systemd__41747
systemd/systemd
41,747
defect
c99e93ce0a195eafe988b1769729c526ca68352b
1d75e4118f84f4be5cbf890eec2d23c525b321f8
cryptsetup: load libcryptsetup via dlopen in setup binaries
Convert systemd-cryptsetup, systemd-cryptenroll, systemd-veritysetup and systemd-integritysetup to go through the existing dlopen wrapper for libcryptsetup instead of linking the library directly. Each binary calls dlopen_cryptsetup() at the start of its run() and uses the sym_* variants for every libcryptsetup entry p...
diff --git a/src/cryptenroll/cryptenroll-fido2.c b/src/cryptenroll/cryptenroll-fido2.c index 822cf26c896a..600207e947b8 100644 --- a/src/cryptenroll/cryptenroll-fido2.c +++ b/src/cryptenroll/cryptenroll-fido2.c @@ -54,7 +54,7 @@ int load_volume_key_fido2( if (passphrase_size < 0) return log_oo...
5
4
2
[{"id": "G0", "claim": "A brief comment should be added noting that crypt_activate_by_token_pin and crypt_token_external_path are loaded unconditionally via dlopen_many_sym_or_warn() and therefore depend on the libcryptsetup >= 2.4.0 version floor.", "category": "documentation", "verdict": "uncertain", "priority": "P2"...
null
systemd__systemd__41771
systemd/systemd
41,771
defect
b5f219d834d68c4c151616f203b015598c0586f2
ffeac0589c8c32b2c62f1d76a28904c3f5fa3de7
repart: trim NUL bytes from verity sig split artifact
The verity signature partition content is a bare JSON object. Repart pads it with zeros to fill the GPT partition. But when splitting out the content as an individual file, the padding remains, so it's not a valid text file. jq started rejecting files with NUL bytes to fix a security issue: https://github.com/jqlang...
diff --git a/src/repart/repart.c b/src/repart/repart.c index d66eea69875e..c025004d1d06 100644 --- a/src/repart/repart.c +++ b/src/repart/repart.c @@ -7754,9 +7754,27 @@ static int context_split(Context *context) { if (lseek(fd, p->offset, SEEK_SET) < 0) return log_error_errno(...
1
1
1
[{"id": "G0", "claim": "A log warning should be added for the edge case where all partition content is NUL bytes, so that len is 0 and the split-out output file is empty, since an all-NUL verity signature partition would indicate data corruption and a warning would aid debugging.", "category": "correctness", "verdict":...
null
systemd__systemd__41814
systemd/systemd
41,814
defect
d41555dd2cb8b3bc3876edd4869b3142048393fe
8e5f5e7420104efe349b5932d2df83caafa3c431
preparatory work for the storage provider work in #41776
nothing earth shattering, but generally useful. without #41776 it has no immediate users though
diff --git a/src/basic/fs-util.c b/src/basic/fs-util.c index d041a9afcff7..3960938309fc 100644 --- a/src/basic/fs-util.c +++ b/src/basic/fs-util.c @@ -1191,6 +1191,9 @@ int xopenat_full(int dir_fd, const char *path, int open_flags, XOpenFlags xopen_ assert(!(FLAGS_SET(xopen_flags, XO_TRIGGER_AUTOMOUNT) && FLAG...
13
6
2
[{"id": "G0", "claim": "BLOCK_DEVICE_NULL omits an initializer for the new read_only field, so it is zero-initialized to 0 (\"not read-only\") instead of the -1 (\"unknown\") sentinel convention used in blockdev-list.c.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id"...
null
systemd__systemd__41863
systemd/systemd
41,863
defect
bb17ded158f820278af849ae6b6a5b122a07f797
55eb41685ed38d886af904323edf66f5c9cf652f
sd-boot related work from #41543 (add "extra" stanza to bls type 1)
This implements the "extra" stanza for type 1 entries in systemd-boot, see: https://github.com/uapi-group/specifications/commit/bde167a46c866c44e1240120695f70f0bf70aadc It comes with a really thorough test suite matching our currently level of testing of systemd-boot (read: there is none, I ask you to trust me, C...
diff --git a/src/boot/boot.c b/src/boot/boot.c index df5ce31fa3a3..daf2cdebc0a6 100644 --- a/src/boot/boot.c +++ b/src/boot/boot.c @@ -3,6 +3,7 @@ #include "bcd.h" #include "bootspec-fundamental.h" #include "console.h" +#include "cpio.h" #include "device-path-util.h" #include "devicetree.h" #include "drivers.h" @...
9
2
1
[{"id": "G0", "claim": "In load_extras() the TPM measurement failure path returns the error and aborts, so the message saying 'ignoring' is misleading; either actually ignore the error or drop ', ignoring' from the message.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {...
null
systemd__systemd__41912
systemd/systemd
41,912
defect
2cfaf50cc86670b4b671dd4d4f9614b2c2cfb736
4ead20162606c8446d4a77f54866f505a08e9800
iovec-util: introduce iovec_done_and_memdup()
It is similar to free_and_strdup(), but for struct iovec.
diff --git a/src/basic/iovec-util.c b/src/basic/iovec-util.c index dab734b9010f..429f08dea9ad 100644 --- a/src/basic/iovec-util.c +++ b/src/basic/iovec-util.c @@ -129,6 +129,21 @@ struct iovec* iovec_memdup(const struct iovec *source, struct iovec *ret) { return ret; } +int iovec_done_and_memdup(struct iove...
1
1
1
[{"id": "G0", "claim": "The new test uses ASSERT_OK() for every call and so never verifies the return contract of iovec_done_and_memdup() — 0 when the iovec is unchanged versus 1 when changed, mirroring free_and_strdup() — leaving the function's return semantics untested.", "category": "testing", "verdict": "supported"...
null
systemd__systemd__41914
systemd/systemd
41,914
defect
2cfaf50cc86670b4b671dd4d4f9614b2c2cfb736
32a1d14f14c8698ee20df93befd0e9d14ad9e98b
socket-util: introduce tos_to_priority()
This maps from TOS, which can be used for setsockopt(IPPROTO_IP, IP_TOS), to socket priority, which can be used for setsockopt(SOL_SOCKET, SO_PRIORITY). With this, we can set priority like the following: ``` uint8_t tos = IPTOS_CLASS_CS6; setsockopt_int(fd, IPPROTO_IP, IP_TOS, tos); setsockopt_int(fd, SOL_SOCKET...
diff --git a/src/basic/socket-util.c b/src/basic/socket-util.c index 698aa69a4b0f..8b974b846670 100644 --- a/src/basic/socket-util.c +++ b/src/basic/socket-util.c @@ -3,6 +3,7 @@ #include <fcntl.h> #include <linux/if.h> #include <linux/if_arp.h> +#include <linux/pkt_sched.h> #include <mqueue.h> #include <net/if.h>...
3
3
0
[{"id": "G0", "claim": "The hex values, CS codes and descriptions in the IPTOS_PREC_INTERNETCONTROL and IPTOS_PREC_NETCONTROL case comments are swapped and should be corrected (0xc0/CS6 for INTERNETCONTROL, 0xe0/CS7 for NETCONTROL).", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "intr...
null
systemd__zram-generator__106
systemd/zram-generator
106
defect
9b61736d58ebae673e19fa703a297d695db21e36
4e72cd74c454bad161709fa4a4eb8eb9952b006b
Miscellaneous cleanup
1. Move per-test matching into each test 2. Lift out write_optional_mb() into a Displayable wrapper 2. Simplify is_swap() and effective_fs_type() 3. Use the original rounding mechanism for both read_*_device()s 4. Don't overallocate in locate_fragments() 5. Use collect() instead of spelling it out in verify_mount...
diff --git a/src/config.rs b/src/config.rs index f6c35a3a..95de2831 100644 --- a/src/config.rs +++ b/src/config.rs @@ -47,20 +47,11 @@ impl Device { } } - fn write_optional_mb(f: &mut fmt::Formatter<'_>, val: Option<u64>) -> fmt::Result { - match val { - Some(val) => { - ...
1
1
0
[{"id": "G0", "claim": "The match-based rewrite of is_swap is much more complex than the old straightforward version, so that chunk should be dropped and the old implementation kept.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
systemd__zram-generator__43
systemd/zram-generator
43
defect
7b6c6e1b8b55afc2c56231842e5b987af3d43ec3
6cce58cdf6bc3dd7e9ccb20d813768a0fd1e9a57
Add option in /proc/cmdline to enable/disable the generator
Closes #42.
diff --git a/man/zram-generator.md b/man/zram-generator.md index 0c01eed0..a7d32c2c 100644 --- a/man/zram-generator.md +++ b/man/zram-generator.md @@ -20,6 +20,9 @@ The generator will be invoked by systemd early at boot. The generator will then: The generator does nothing if run inside a container (as determined by ...
3
2
0
[{"id": "G0", "claim": "The word-matching loop in _kernel_has_option should be rewritten as a fold over split_whitespace, which is clearer and avoids allocating up to eight times per item.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Given Anacond...
null
systemd__zram-generator__60
systemd/zram-generator
60
defect
a143b37a9d3064439b42af77b46de5998ddf7b51
c405c8e9c17e4d9dccb288b040d76ea5aa05fcbf
fix: Load kernel module for compressors when required
**EDIT:** True cause is due to SELinux policy preventing implicit loading of kernel modules when required. The PR identifies the modules that need to be loaded to support a users configuration and explicitly calls `modprobe` which isn't blocked by the SELinux policy. --- While some distros like Ubuntu 20.10 are f...
diff --git a/src/generator.rs b/src/generator.rs index 95cdfa44..1af2908b 100644 --- a/src/generator.rs +++ b/src/generator.rs @@ -4,6 +4,7 @@ use crate::config::Device; use anyhow::{anyhow, Context, Result}; use log::{info, warn}; use std::cmp; +use std::collections::BTreeSet; use std::fs; use std::os::unix::fs::...
5
3
0
[{"id": "G0", "claim": "The commit message misdescribes the failure and the kernel's behaviour: the kernel does not normally load the compressor module when a device with a given compression module is loaded, /sys/block/zram0/comp_algorithm does not only list compressors known to zram, and the ENOMEM failure is consist...
null
systemjs__systemjs__1957
systemjs/systemjs
1,957
defect
3616ff8d24be85a1fe10d3f34add3c78e8695f7a
2ffafbdbaba4eb91100749a11cf9001c649759d2
Take base href into account when creating baseUrl
Fixes https://github.com/systemjs/systemjs/issues/1956 I couldn't find where you are testing the current baseUrl logic. If you'd like me to add a test for this please advice on the approach. :)
diff --git a/dist/s.js b/dist/s.js index bb509d934..4cae8a1f2 100644 --- a/dist/s.js +++ b/dist/s.js @@ -8,7 +8,14 @@ const envGlobal = hasSelf ? self : global; let baseUrl; - if (typeof location !== 'undefined') { + + if (typeof document !== 'undefined') { + const baseEl = document.head.querySelector('bas...
1
1
1
[{"id": "G0", "claim": "The base element lookup added in dist/s.js (mirroring src/common.js) repeats the feedback from es-module-shims#26: querying document.head for 'base[href]' is wrong and the lookup should not be scoped to the head (a base element may not be in head), as was raised on that earlier PR.", "category":...
null
systemjs__systemjs__1984
systemjs/systemjs
1,984
defect
a8d4dc57dacae6e33e3c9967b9919c8f1afa1d76
cead66f78ebf2517ba99dd00d75cbac1428299f3
Supporting System.import for a single named System.register module
See [this codepen](https://codepen.io/joeldenning/project/editor/ABpkMK#) for the weird behavior that this fixes. Also see #1980 where people are doing a double System.import() to work around the current odd behavior.
diff --git a/README.md b/README.md index 79d948a96..d1de466cf 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,8 @@ The following [pluggable extras](dist/extras) are provided which can be dropped * [AMD loading](dist/extras/amd.js) support (through `Window.define` which is created). * [Global loading](dist/extras/...
4
4
2
[{"id": "G0", "claim": "The isInstantiating-flag approach in named-register.js will be prone to timing bugs; instead keep a lastNamedDefine set in register and surface and clear it in a getRegister hook.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim":...
null
systemjs__systemjs__2029
systemjs/systemjs
2,029
defect
de84d0137fff0c9ff8e83f6b8de26e9c15c98635
54e9cfc5e19c6af3aa4f184bf8b44b6422f9d8d9
Fixing bug with AMD extra. Resolves #2026.
Resolves #2026 If an inline script calls `define('name', ...)` and then the next `System.import()` calls `define('other-name', ...)`, SystemJS currently accidentally counts the first call to `define()` to be the export for the System.import(), even though it's not even in the same file. This behavior is related to ...
diff --git a/src/extras/amd.js b/src/extras/amd.js index 862f3b726..e11f7ff4d 100644 --- a/src/extras/amd.js +++ b/src/extras/amd.js @@ -69,6 +69,13 @@ systemRegister.apply(this, arguments); }; + const prepareImport = systemPrototype.prepareImport; + systemPrototype.prepareImport = function() { + // Rese...
1
1
1
[{"id": "G0", "claim": "Move the 'currently executing script' reset (amdDefineDeps = null) from the prepareImport wrapper to the beginning of instantiate, so it runs as close to the time of script injection as possible.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
systemjs__systemjs__2074
systemjs/systemjs
2,074
defect
5091dab28b3c5ebbeb6524c5959ab57de2caf2bf
b275ec33aac79442ad8e1deaa58c6f31387b0371
Fixing bug where named-exports didn't work on named registers. Resolves #2073.
Resolves #2073. I verified that this adds 49 bytes to the amd.min.js extra.
diff --git a/src/extras/amd.js b/src/extras/amd.js index c4cd98767..6ecb8ba1d 100644 --- a/src/extras/amd.js +++ b/src/extras/amd.js @@ -10,6 +10,8 @@ throw Error('AMD require not supported.'); } + let tempRegister; + function emptyFn () {} const requireExportsModule = ['require', 'exports', 'module'...
2
2
0
[{"id": "G0", "claim": "The helper function `insertToRegisterRegistry` should be named `addToRegisterRegistry`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The module-level variable `tempRegister` should be named `tmpRegister`.", "category": ...
null
systemjs__systemjs__2108
systemjs/systemjs
2,108
defect
bfce71e44b92816ce1cfc5de2a70786d88c80f75
0d535b9e59f69c44a1d06b8c675ac9a77d2db4d4
Prefer import map resolution over registerRegistry. Resolves #2107.
Resolves #2107. Note that this behavior could potentially impact some code that is relying on (what I consider to be broken) behavior in systemjs@6.1.9.
diff --git a/src/extras/named-register.js b/src/extras/named-register.js index 212e568b6..47ce3380b 100644 --- a/src/extras/named-register.js +++ b/src/extras/named-register.js @@ -42,11 +42,14 @@ const resolve = systemJSPrototype.resolve; systemJSPrototype.resolve = function (id, parentURL) { - if (id[0] ==...
1
1
1
[{"id": "G0", "claim": "`resolve.call(this, id, parentURL) || this.registerRegistry[id]` would return `this.registerRegistry[id]` — a promise object, not a resolution string, and possibly `undefined` — when the import-map resolution fails, while `System.resolve` should either throw or return a valid resolution.", "cate...
null