Skip to content

cleanup: drop ineffective /var/home compat workaround for GIS useradd bug #22

@hanthor

Description

@hanthor

Summary

The /var/home relabel workaround added to the compat RPMs did not solve the reused-disk / preserved-/var gnome-initial-setup failure on TunaOS bootc installs, so we should stop treating that as the fix for the user-creation bug and consider dropping the COPR-side workaround if it is no longer needed for any other path.

What was tried

We added compose-time %post relabeling in:

  • e43cc6ccompat: restorecon /var/home in %post to fix useradd exit 12
  • gnome49-el10-compat
  • gnome50-el10-compat

That was intended to address the useradd exit 12 failure seen during gnome-initial-setup.

Why it did not actually fix the real-world TunaOS case

On TunaOS/bootc installs, the failing scenario is a reused target disk where /var is preserved on the deployed system (for example, boot drive attached via USB enclosure, reinstall onto same disk, existing /var/home tree carried forward).

In that case, an RPM %post scriptlet executed during image compose cannot reliably relabel the deployed machine's preserved /var/home, because that filesystem content is not the same runtime /var tree that GIS later operates on.

So the COPR workaround may help a narrow labeling case inside the compose/rootfs environment, but it does not solve the deployed-system regression users are still hitting.

Current understanding

There are two separate problems that got conflated:

  1. SELinux labeling issue on /var/home
  2. shadow-utils 4.15 useradd -m failure when the target home already exists (EEXIST -> exit 12 / E_HOMEDIR)

The compose-time compat %post only attempted to help with #1, and only in a limited context.

The persistent reused-disk failure is still better explained by issue #17: existing home / preserved /var on the deployed system.

Proposed cleanup

  1. Stop referring to the compat %post restorecon /var/home change as the fix for the GIS/useradd bug.
  2. Reevaluate whether the %post restorecon -RF /var/home lines in gnome49-el10-compat and gnome50-el10-compat should be removed entirely.
  3. Keep the actual durable fix on the image/runtime side (TunaOS first-boot/deployed-system relabel before GDM), or alternatively patch accountsservice / gnome-initial-setup / shadow-utils for the existing-home case.

Related

This issue is specifically about dropping the workaround that didn't solve the deployed TunaOS case, to avoid future confusion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions