Skip to content

Conversation

@igorpecovnik
Copy link
Member

@igorpecovnik igorpecovnik commented Sep 29, 2025

Description

Inserting firstboot.conf from userpatches/ folder.

Documentation summary for feature / change

Config usage: https://docs.armbian.com/User-Guide_Autoconfig/

How Has This Been Tested?

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings

@igorpecovnik igorpecovnik requested a review from a team as a code owner September 29, 2025 18:46
@igorpecovnik igorpecovnik added the Work in progress Unfinished / work in progress label Sep 29, 2025
@github-actions github-actions bot added size/small PR with less then 50 lines 11 Milestone: Fourth quarter release labels Sep 29, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 29, 2025

Walkthrough

  • Adds logic in lib/functions/rootfs/distro-agnostic.sh to apply a user-provided firstboot config by checking for ${USERPATCHES_PATH}/firstboot.conf.
  • If the file exists, it prints an informational message and copies it to ${SDCARD}/root/.not_logged_in_yet.
  • This copy occurs before desktop autologin is enabled to ensure the firstboot config is present prior to first-boot actions.
  • No public/exported declarations were added or modified.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The PR title "Introduce including user provided first-boot config at build time" directly and accurately summarizes the main change described in the raw summary, which adds logic to apply user-provided firstboot config from the userpatches directory during the build process. The title is concise, specific, and avoids vague terminology or noise. A developer scanning the repository history would clearly understand that this change enables users to provide firstboot configuration that gets included at build time, making it fully aligned with the primary objective of the changeset.
Description Check ✅ Passed The PR description is directly related to the changeset, specifically stating "Inserting firstboot.conf from userpatches/ folder," which matches the raw summary that describes copying a firstboot.conf file from the userpatches path. The description includes a documentation reference for the feature and notes about testing, providing meaningful context without being overly vague or generic. The description is clearly connected to the changes being made rather than being off-topic or misleading.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch sdk

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 5a8c30d and 21a31e0.

📒 Files selected for processing (1)
  • lib/functions/rootfs/distro-agnostic.sh (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • lib/functions/rootfs/distro-agnostic.sh

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 Needs review Seeking for review Framework Framework components labels Sep 29, 2025
Copy link
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.

Actionable comments posted: 0

🧹 Nitpick comments (1)
action.yml (1)

15-19: Consider splitting unrelated changes into separate PRs.

This PR's objective is to "Introduce including user provided first-boot config at build time," but these changes add release artifact cleanup functionality, which appears unrelated to firstboot configuration.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between badbc99 and 6a08b23.

📒 Files selected for processing (2)
  • action.yml (2 hunks)
  • lib/functions/rootfs/distro-agnostic.sh (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
lib/functions/rootfs/distro-agnostic.sh (1)
.github/generate_CODEOWNERS.sh (1)
  • display_alert (6-6)
🔇 Additional comments (2)
action.yml (1)

215-215: LGTM!

The usage of inputs.armbian_release_clean for removeArtifacts is correct and properly defaults to "false".

lib/functions/rootfs/distro-agnostic.sh (1)

112-116: [scratchpad]

The destination path for firstboot.conf is correct.

The review comment incorrectly assumes that .not_logged_in_yet should be a separate marker file and that firstboot.conf should be copied to a different location.

Analysis of the armbian-firstlogin script shows that /root/.not_logged_in_yet serves a dual purpose:

  1. Its presence triggers the first-login logic (checked at line 613: if [[ -f /root/.not_logged_in_yet && -n $(tty) ]]; then)
  2. It contains bash variable definitions that are sourced (line 93: source "$fp_config") to configure the automated setup

The script validates and sources this file as a bash script (lines 87-93), loading PRESET_* variables. The preset-firstrun.sh extension demonstrates this pattern by writing configuration variables directly to .not_logged_in_yet (lines 4-51).

Therefore, overwriting the empty marker file created at line 110 with the user's firstboot.conf at line 115 is the intended behavior.

Likely an incorrect or invalid review comment.

@igorpecovnik igorpecovnik force-pushed the sdk branch 2 times, most recently from 8df8645 to 5a8c30d Compare September 29, 2025 18:58
@igorpecovnik igorpecovnik added the Needs Documentation New feature needs documentation entry label Sep 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

11 Milestone: Fourth quarter release Framework Framework components Needs Documentation New feature needs documentation entry Needs review Seeking for review size/small PR with less then 50 lines Work in progress Unfinished / work in progress

Development

Successfully merging this pull request may close these issues.

1 participant