Skip to content

kernel: add dependency of initramfs-tools for linux-image package#9727

Merged
amazingfate merged 1 commit intoarmbian:mainfrom
amazingfate:kernel-dep-initramfs
Apr 26, 2026
Merged

kernel: add dependency of initramfs-tools for linux-image package#9727
amazingfate merged 1 commit intoarmbian:mainfrom
amazingfate:kernel-dep-initramfs

Conversation

@amazingfate
Copy link
Copy Markdown
Contributor

@amazingfate amazingfate commented Apr 26, 2026

Description

I'm trying to build an iso with armbian's kernel by live-build script: https://salsa.debian.org/live-team/live-build/-/blob/master/test/rebuild.sh?ref_type=heads, while the script is installing kernel and initramfs in a single apt command, and it would fall if kernel doesn't depend on initramfs. initramfs has to be configured before kernel image package.

Summary by CodeRabbit

  • Bug Fixes
    • Kernel package now declares explicit dependency on boot utilities, ensuring required components are properly installed alongside the kernel.

@amazingfate amazingfate requested a review from a team as a code owner April 26, 2026 06:09
@amazingfate amazingfate requested review from catalinii and swissiety and removed request for a team April 26, 2026 06:09
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 26, 2026

📝 Walkthrough

Walkthrough

The linux-image Debian package control metadata now declares a runtime dependency on initramfs-tools by adding a Depends field to the generated DEBIAN/control file during kernel package compilation.

Changes

Cohort / File(s) Summary
Kernel Debian Package Metadata
lib/functions/compilation/kernel-debs.sh
Added initramfs-tools as a runtime dependency to the linux-image package control file.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A hop, a skip, and one line more,
The kernel now declares what it's for—
initramfs-tools, forever bound,
In metadata where dependencies are found! 📦✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the primary change: adding an initramfs-tools dependency to the linux-image package, which matches the single-line change in the DEBIAN/control file metadata.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added 05 Milestone: Second quarter release size/small PR with less then 50 lines Needs review Seeking for review Framework Framework components labels Apr 26, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
lib/functions/compilation/kernel-debs.sh (1)

268-268: Consider allowing linux-initramfs-tool as an alternative provider.

Debian's stock linux-image-* packages declare the dependency as initramfs-tools | linux-initramfs-tool so dracut (which Provides: linux-initramfs-tool) can be substituted as the initramfs generator. The hook scheme in this very file already accommodates that — see the comment on line 279: "recent versions of dracut and initramfs-tools will obey this" via $INITRD. Hard-pinning to initramfs-tools here forecloses dracut-based setups even though the postinst hooks already work with both.

This still satisfies the PR's motivation (live-build's single-shot apt install will pull in initramfs-tools when nothing else provides linux-initramfs-tool).

♻️ Proposed change
-		Depends: initramfs-tools
+		Depends: initramfs-tools | linux-initramfs-tool
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@lib/functions/compilation/kernel-debs.sh` at line 268, Replace the hard
dependency on initramfs-tools with a disjunctive dependency to allow alternative
providers: update the package dependency line that currently reads "Depends:
initramfs-tools" to include "linux-initramfs-tool" as an alternative (e.g.,
"Depends: initramfs-tools | linux-initramfs-tool"); ensure the postinst/postrm
hook behavior that uses the INITRD variable and the existing dracut
compatibility comments remains unchanged so dracut (which Provides:
linux-initramfs-tool) can satisfy the dependency.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@lib/functions/compilation/kernel-debs.sh`:
- Line 268: Replace the hard dependency on initramfs-tools with a disjunctive
dependency to allow alternative providers: update the package dependency line
that currently reads "Depends: initramfs-tools" to include
"linux-initramfs-tool" as an alternative (e.g., "Depends: initramfs-tools |
linux-initramfs-tool"); ensure the postinst/postrm hook behavior that uses the
INITRD variable and the existing dracut compatibility comments remains unchanged
so dracut (which Provides: linux-initramfs-tool) can satisfy the dependency.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 81966e49-7f88-440e-acb2-5f9750e2d0d9

📥 Commits

Reviewing files that changed from the base of the PR and between 39fdcef and 52f9779.

📒 Files selected for processing (1)
  • lib/functions/compilation/kernel-debs.sh

@github-actions
Copy link
Copy Markdown
Contributor

✅ This PR has been reviewed and approved — all set for merge!

@github-actions github-actions Bot added Ready to merge Reviewed, tested and ready for merge and removed Needs review Seeking for review labels Apr 26, 2026
@amazingfate amazingfate merged commit 0676a24 into armbian:main Apr 26, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

05 Milestone: Second quarter release Framework Framework components Ready to merge Reviewed, tested and ready for merge size/small PR with less then 50 lines

Development

Successfully merging this pull request may close these issues.

3 participants