Skip to content

Bake base passwd/group into the ISO instead of running dnf in pre-install#64

Draft
nabeya11 wants to merge 5 commits into
mainfrom
bake-base-passwd-group
Draft

Bake base passwd/group into the ISO instead of running dnf in pre-install#64
nabeya11 wants to merge 5 commits into
mainfrom
bake-base-passwd-group

Conversation

@nabeya11

@nabeya11 nabeya11 commented Jul 2, 2026

Copy link
Copy Markdown
Member

The Fedora >= 42 installer environment ships no dnf CLI (only
dnf-3/dnf4), so the kickstart's dnf install setup — used to get the
base passwd/group — fails with command not found.

This moves the extraction to build time:

  • entrypoint.sh pulls etc/passwd and etc/group from the setup RPM
    and bakes them into the ISO as etc-passwd-base/etc-group-base.
  • %pre-install just copies them and appends our static UID/GID entries.

…stall

The Fedora >= 42 installer image ships no dnf CLI (only dnf-3/dnf4, no
dnf/dnf5), so the kickstart's `dnf install setup` to obtain the base
passwd/group no longer works. Extract those files from the setup package
in the builder (which has a working package manager) and bake them into
the ISO, so %pre-install just copies them and needs no package manager.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Fedora installer flow for Fedora >= 42 by moving “base passwd/group” extraction from kickstart install-time (which depended on dnf) to ISO build-time, then consuming the baked-in files during %pre-install.

Changes:

  • Build-time: extract /etc/passwd and /etc/group from the setup RPM and place them on the ISO as etc-passwd-base / etc-group-base.
  • Install-time: %pre-install now copies the baked base files and appends the project’s static UID/GID entries from etc-passwd / etc-group.
  • Removes the prior %pre-install dnf install setup approach that fails in Fedora >= 42 installer environments lacking a dnf CLI.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
ks.tpl.cfg Switches %pre-install to consume baked-in etc-*-base files and append static UID/GID entries.
entrypoint.sh Extracts passwd/group from the setup RPM at build time and writes etc-passwd-base/etc-group-base into the ISO root.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ks.tpl.cfg Outdated
Comment thread entrypoint.sh Outdated
Comment thread ks.tpl.cfg
nabeya11 and others added 2 commits July 2, 2026 17:03
- Add `curl -fsS` for the PXE downloads so an HTTP error aborts instead of
  writing an error page into passwd/group.
- Select the setup RPM via a glob array with an exact-count check and
  extract into a mktemp dir instead of `ls | head` and a fixed directory.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Match the %post cleanup pattern so the mountpoint does not linger.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread ks.tpl.cfg Outdated
Comment thread entrypoint.sh Outdated
nabeya11 and others added 2 commits July 2, 2026 18:41
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants