Skip to content

Conversation

thozza
Copy link
Member

@thozza thozza commented Oct 8, 2025

Port of osbuild/images#1907

Among other things, the worker depsolve job wire format for depsolved packages is decoupled from rpmmd data structures. A backward compatibility layer is added in the worker code, ensuring that the new composer-worker-server can still successfully accept depsolve job results from the old composer-worker.

osbuild/images is updated to v0.204.0 as part of this PR:

Changes with 0.203.0


— Somewhere on the Internet, 2025-10-07


Changes with 0.204.0


— Somewhere on the Internet, 2025-10-09

/jira-epic HMS-8910

JIRA: HMS-9504

@thozza thozza requested a review from a team as a code owner October 8, 2025 08:58
@thozza thozza requested review from bcl, croissanne and lzap and removed request for a team October 8, 2025 08:58
@schutzbot schutzbot changed the title Many: adjust code to unified rpmmd.Package struct Many: adjust code to unified rpmmd.Package struct (HMS-9504) Oct 8, 2025
@thozza thozza marked this pull request as draft October 8, 2025 09:10
@thozza thozza removed request for bcl, croissanne and lzap October 8, 2025 09:10
@thozza thozza added the WIP+test Work in progress but run Gitlab CI. label Oct 8, 2025
@thozza thozza force-pushed the port-rpmmd-package-consolidation branch 3 times, most recently from 91d424d to 6a77800 Compare October 8, 2025 12:47
This is needed for Weldr API blueprints freeze endpoint.

Signed-off-by: Tomáš Hozza <[email protected]>
Weldr API endpoints depsolving and freezing blueprints were using the
rpmmd.PackageSpec struct for serialization. Replace its use with
weldrtypes.DepsolvedPackageInfo struct.

Signed-off-by: Tomáš Hozza <[email protected]>
Don't use the rpmmd.PackageSpec type for worker server public API,
specifically in the DepsolveJobResult. This will enable the unification
of RPM data structures for RPM in osbuild/images and implementing a
compatibility layer on osbuild-composer's side.

Signed-off-by: Tomáš Hozza <[email protected]>
Add unit tests for the DepsolvedPackag type JSON (un)marshal.

Signed-off-by: Tomáš Hozza <[email protected]>
Packages need to have remote location URL specified for the curl
osbuild source,when generating the manifest.

Signed-off-by: Tomáš Hozza <[email protected]>
Changes with 0.203.0

----------------
  - bootc: actually use `BootMode` (osbuild#1937)
    - Author: Simon de Vlieger, Reviewers: Achilleas Koutsou, Michael Vogt
  - disk: drop static UUIDs in defs (osbuild#1922)
    - Author: Simon de Vlieger, Reviewers: Achilleas Koutsou, Brian C. Lane
  - distro: add support for `default_size` to be a string (osbuild#1929)
    - Author: Michael Vogt, Reviewers: Achilleas Koutsou, Simon de Vlieger
  - fedora/minimal: riscv comps groups (osbuild#1933)
    - Author: Simon de Vlieger, Reviewers: Michael Vogt, Tomáš Hozza
  - many: make `required_partition_sizes` take datasize.Size (osbuild#1931)
    - Author: Michael Vogt, Reviewers: Simon de Vlieger, Tomáš Hozza

— Somewhere on the Internet, 2025-10-07

---

Changes with 0.204.0

----------------
  - Catch invalid root user kickstart options early [HMS-9378] (osbuild#1879)
    - Author: Achilleas Koutsou, Reviewers: Simon de Vlieger, Tomáš Hozza
  - Support setting the `releasever` dnf variable through the Blueprint customization [HMS-9368] (osbuild#1896)
    - Author: Achilleas Koutsou, Reviewers: Simon de Vlieger, Tomáš Hozza
  - fedora/minimal: disk start offset for x86 (osbuild#1934)
    - Author: Simon de Vlieger, Reviewers: Michael Vogt, Tomáš Hozza
  - many: use datasizes.Size/disk.Offset types in disk package (osbuild#1935)
    - Author: Michael Vogt, Reviewers: Simon de Vlieger, Tomáš Hozza
  - pkg/awscloud: custom AWSTag sctruct instead of slices (osbuild#1939)
    - Author: Jakub Kadlčík, Reviewers: Michael Vogt, Simon de Vlieger
  - pkg/rpmmd: unify RPM package structure implementations (HMS-8911) (osbuild#1907)
    - Author: Tomáš Hozza, Reviewers: Achilleas Koutsou, Simon de Vlieger
  - potential kernel arguments options support for all installers (HMS-8999) (osbuild#1786)
    - Author: Michael Vogt, Reviewers: Achilleas Koutsou, Simon de Vlieger

— Somewhere on the Internet, 2025-10-09

Signed-off-by: Tomáš Hozza <[email protected]>
Adjust the code to the consolidated rpmmd.Package and removed
rpmmd.PackageSpec in the latest version of osbuild/images.

Signed-off-by: Tomáš Hozza <[email protected]>
@thozza thozza force-pushed the port-rpmmd-package-consolidation branch from 6a77800 to f16c8d6 Compare October 10, 2025 08:23
@thozza thozza marked this pull request as ready for review October 10, 2025 08:24
@thozza thozza marked this pull request as draft October 10, 2025 08:32
Modify the worker.DepsolvedPackage DTO properties and types to match the
rpmmd.Package implementation. The backward compatibility between old
composer-worker and new composer-worker-server is achieved on the JSON
Unmarshaller level. This means that the server will be able to process
DepsolveJobResults from the old worker that uses DTO that matches the
old rpmmd.PackageSpec. We explicitly test for this scenario in the CI
where the new osbuild-composer is ran with old composer-worker.

The checksum is now represented as a struct, instead of a string value.
The DepsolvedPackageChecksum supports Unmarshalling from JSON string and
object representation. For backward compatibility reason, the struct is
still Marshalled as a string value, which is consistent with the old
implementation.

Signed-off-by: Tomáš Hozza <[email protected]>
Modify the worker.DepsolvedPackage DTO to fully match rpmmd.Package.
This will be useful in the future once the depsolvednf and
osbuild-depsolve-dnf will be able to fill all the additional metadata,
which were previously not included in the rpmmd.PackageSpec.

Introduce new DTOs for rpmmd.RelDep.

Signed-off-by: Tomáš Hozza <[email protected]>
@thozza thozza force-pushed the port-rpmmd-package-consolidation branch from f16c8d6 to 5f36da3 Compare October 10, 2025 09:33
@thozza thozza marked this pull request as ready for review October 10, 2025 09:35
@thozza thozza removed the WIP+test Work in progress but run Gitlab CI. label Oct 10, 2025
@thozza thozza requested review from a team, achilleas-k, bcl, croissanne, lzap, mvo5 and supakeen and removed request for a team and lzap October 10, 2025 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants