Skip to content

feat: add rechunker-group-fix safety net for legacy rechunk migration - #4633

Closed
dylanmtaylor wants to merge 1 commit into
ublue-os:mainfrom
dylanmtaylor:rechunker-group-fix
Closed

feat: add rechunker-group-fix safety net for legacy rechunk migration#4633
dylanmtaylor wants to merge 1 commit into
ublue-os:mainfrom
dylanmtaylor:rechunker-group-fix

Conversation

@dylanmtaylor

Copy link
Copy Markdown
Contributor

Adds a one-shot systemd unit that regenerates /etc/gshadow on first boot when migrating from images built with hhd-dev/legacy-rechunk's nss-altfiles handling. Without this, users rebasing to images that no longer use the legacy rechunker hit black screens or fail to boot.

The unit is gated by ConditionPathExists=!/var/lib/.rechunker-group-fix-done so it runs once per system and never again.

Lands ahead of the rechunker swap so the fix is baked into running systems before they encounter post-swap images.

Split out of #4564 to derisk the change based on feedback by @bsherman.

Refs #4510, #3917

Copilot AI review requested due to automatic review settings May 16, 2026 01:17
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. area/services System Services and Management kind/enhancement New feature, don't implement without a spec and consensus labels May 16, 2026
@dylanmtaylor
dylanmtaylor force-pushed the rechunker-group-fix branch from a4ce989 to 32fd679 Compare May 16, 2026 01:18
@codacy-production

codacy-production Bot commented May 16, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a one-shot systemd migration safety net intended to regenerate /etc/gshadow for systems moving away from legacy rechunker/nss-altfiles handling.

Changes:

  • Adds rechunker-group-fix.service to run the migration once on ostree-booted systems.
  • Adds /usr/bin/rechunker-group-fix helper to add missing /etc/gshadow entries.
  • Enables the new service during image cleanup.

Reviewed changes

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

File Description
system_files/shared/usr/lib/systemd/system/rechunker-group-fix.service Defines the one-shot boot-time migration unit.
system_files/shared/usr/bin/rechunker-group-fix Adds helper logic to populate missing gshadow groups.
build_files/base/17-cleanup.sh Enables the migration unit in built images.

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

Comment on lines +25 to +27
ExecStart=/usr/bin/bash -c 'rm -f /etc/gshadow'
ExecStart=/usr/bin/systemd-sysusers
ExecStart=/usr/bin/rechunker-group-fix

@dylanmtaylor dylanmtaylor May 16, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't want to deviate rechunker-group-fix from Aurora. The script is intentionally aligned with Aurora to keep cross-distro behavior consistent and reduce risk by shipping something that is known to work.


# see /usr/bin/rechunker-group-fix
# DO NOT REMOVE THIS
systemctl enable rechunker-group-fix.service
@dylanmtaylor

Copy link
Copy Markdown
Contributor Author

I am going to test/validate this on my own machine and report back with results.

@dylanmtaylor
dylanmtaylor force-pushed the rechunker-group-fix branch from 32fd679 to 7252595 Compare May 16, 2026 01:31
@renner0e

Copy link
Copy Markdown
Member

I would put this change in the PR where you remove the hdd rechunker (and move to another one for damage control on the update sizes)

Adds a one-shot systemd unit that regenerates /etc/gshadow on first
boot when migrating from images built with hhd-dev/legacy-rechunk's
nss-altfiles handling. Without this, users rebasing to images that no
longer use the legacy rechunker hit black screens or fail to boot.

The unit is gated by ConditionPathExists=!/var/lib/.rechunker-group-fix-done
so it runs once and never again.

Lands ahead of the rechunker swap so the fix is baked into running
systems before they encounter post-swap images.

Split out of ublue-os#4564 to derisk the change based on feedback by @bsherman.

Refs ublue-os#4510, ublue-os#3917
@dylanmtaylor
dylanmtaylor force-pushed the rechunker-group-fix branch from 7252595 to 4d735d7 Compare May 22, 2026 15:52
dylanmtaylor added a commit to dylanmtaylor/bluefin that referenced this pull request May 22, 2026
Switches the rechunk pipeline from hhd-dev/legacy-rechunk to
rpm-ostree's built-in compose build-chunked-oci. Adds incremental
rebuild support via --previous-build when a prior image is available.
Adds load-rootful and export-oci helpers; export-oci is wired into
the CI workflow to upload an OCI archive artifact for PR testing.

Workflow changes: switches to a BTRFS-mounted podman storage,
installs a newer podman from brew to work around a missing layer
annotation push (podman-container-tools/podman#27796), and pushes images twice
to ensure annotations are sent.

Depends on:
- ublue-os#4633 rechunker-group-fix safety net
- the SBOM/changelogs split-out PR (provides the gen-sbom Just
  recipe this workflow calls)

Closes ublue-os#4510, ublue-os#3917

Split out of ublue-os#4564 to derisk the change based on feedback by
@bsherman and @renner0e.
@dylanmtaylor
dylanmtaylor deleted the rechunker-group-fix branch May 22, 2026 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/services System Services and Management kind/enhancement New feature, don't implement without a spec and consensus size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants