Rebase x86_64_v2 reporegistry patch onto relocated osbuild/image-builder vendor path #5

Merged
eabdullin merged 1 commits from triage/fix-osbuild-composer-manual-68321 into a10s 2026-07-22 09:49:51 +00:00
Owner

Problem

The osbuild-composer 164->176 update restructured the vendored library: the
reporegistry package (and its rpmmd/distroidparser siblings) moved from
vendor/github.com/osbuild/images/... to vendor/github.com/osbuild/image-builder/....

The downstream AlmaLinux patch #1000
(0001-reporegistry-serve-x86_64_v2-RPMs-on-AlmaLinux-10-x8.patch) still
targeted the old path vendor/github.com/osbuild/images/pkg/reporegistry/reporegistry.go,
which no longer exists in the 176 Source0 tarball. rpmbuild's %prep aborted with
"No file to patch. Skipping patch. / 3 out of 3 hunks ignored".

Fix

Rebased the patch against the new vendor location
vendor/github.com/osbuild/image-builder/pkg/reporegistry/reporegistry.go.
The file content of reposByDistroArch() and the surrounding functions is
otherwise unchanged between 164 and 176, so all three hunks re-express at the
same offsets:

  • Hunk 1 (@@ -4,6 +4,9 @@): add os/exec, runtime, strings imports.
    The two import context lines were updated to the new osbuild/image-builder
    package paths.
  • Hunk 2 (@@ -99,6 +102,52 @@): the hostIsX8664V2(),
    distroHasX8664V2Variant() and rewriteBaseurlsTov2() helpers, inserted
    between ReposByArchName and reposByDistroArch.
  • Hunk 3 (@@ -117,6 +166,10 @@): the x86_64->x86_64_v2 baseurl rewrite
    dispatch inside reposByDistroArch.

Verified rpmmd.RepoConfig.BaseURLs and distroidparser.DefaultParser still
exist under the new path. The downstream-only x86_64_v2 rewrite behaviour is
preserved exactly.

Verification

patch -p1 --fuzz=0 applies all 3 hunks cleanly against the unpacked
osbuild-composer-176 tree (dry-run and real apply both succeed).

Follow-up (separate file, not fixed here)

The same vendor relocation affects config.yaml: its replace block injects
%install lines referencing vendor/github.com/osbuild/images/data/repositories/almalinux*,
but that data now lives under
vendor/github.com/osbuild/image-builder/data/repositories/. This would fail
later in %install and should be updated to the image-builder path in a
follow-up change (out of scope for the single-file %prep unblock here).

## Problem The osbuild-composer 164->176 update restructured the vendored library: the `reporegistry` package (and its `rpmmd`/`distroidparser` siblings) moved from `vendor/github.com/osbuild/images/...` to `vendor/github.com/osbuild/image-builder/...`. The downstream AlmaLinux patch #1000 (`0001-reporegistry-serve-x86_64_v2-RPMs-on-AlmaLinux-10-x8.patch`) still targeted the old path `vendor/github.com/osbuild/images/pkg/reporegistry/reporegistry.go`, which no longer exists in the 176 Source0 tarball. rpmbuild's `%prep` aborted with "No file to patch. Skipping patch. / 3 out of 3 hunks ignored". ## Fix Rebased the patch against the new vendor location `vendor/github.com/osbuild/image-builder/pkg/reporegistry/reporegistry.go`. The file content of `reposByDistroArch()` and the surrounding functions is otherwise unchanged between 164 and 176, so all three hunks re-express at the same offsets: - Hunk 1 (`@@ -4,6 +4,9 @@`): add `os/exec`, `runtime`, `strings` imports. The two import context lines were updated to the new `osbuild/image-builder` package paths. - Hunk 2 (`@@ -99,6 +102,52 @@`): the `hostIsX8664V2()`, `distroHasX8664V2Variant()` and `rewriteBaseurlsTov2()` helpers, inserted between `ReposByArchName` and `reposByDistroArch`. - Hunk 3 (`@@ -117,6 +166,10 @@`): the x86_64->x86_64_v2 baseurl rewrite dispatch inside `reposByDistroArch`. Verified `rpmmd.RepoConfig.BaseURLs` and `distroidparser.DefaultParser` still exist under the new path. The downstream-only x86_64_v2 rewrite behaviour is preserved exactly. ## Verification `patch -p1 --fuzz=0` applies all 3 hunks cleanly against the unpacked osbuild-composer-176 tree (dry-run and real apply both succeed). ## Follow-up (separate file, not fixed here) The same vendor relocation affects `config.yaml`: its `replace` block injects `%install` lines referencing `vendor/github.com/osbuild/images/data/repositories/almalinux*`, but that data now lives under `vendor/github.com/osbuild/image-builder/data/repositories/`. This would fail later in `%install` and should be updated to the `image-builder` path in a follow-up change (out of scope for the single-file %prep unblock here).
eabdullin added 1 commit 2026-07-22 09:45:13 +00:00
eabdullin merged commit 9235599703 into a10s 2026-07-22 09:49:51 +00:00
eabdullin deleted branch triage/fix-osbuild-composer-manual-68321 2026-07-22 09:49:51 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: autopatch/osbuild-composer#5
No description provided.