-
Notifications
You must be signed in to change notification settings - Fork 58
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: osbuild/images
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.128.0
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
...
head repository: osbuild/images
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.129.0
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
- 8 commits
- 17 files changed
- 3 contributors
Commits on Mar 27, 2025
-
disk: add luks/lvm payload loading support via json/yaml
This commit adds support to load payloads for LUKS/LVM via json/yaml. This is needed for PR#1339 where we extract the partition tables into YAML. We have nested LUKS/LVM partitions in e.g. the iot simplified installer. This sadly involves some duplicated code in the Partition, LUKSContainer, LVMLogicalVolume `UnmarshalJSON()` code. Ideally we would write somethign like: ```go func payloadUnmarshaller[T any](data []byte) (*T, error) { type alias T var withoutPayload struct { alias Payload json.RawMessage `json:"payload"` PayloadType string `json:"payload_type"` } if err := jsonUnmarshalStrict(data, &withoutPayload); err != nil { return nil, fmt.Errorf("cannot unmarshal %q: %w", data, err) } t := T(withoutPayload.alias) payload, err := unmarshalJSONPayload(data) t.Payload = payload return payload, err } func (lv *LVMLogicalVolume) UnmarshalJSON(data []byte) (err error) { *lv, err = payloadUnmarshaller[*LVMLogicalVolume](data) return err } ``` but GO does not let us and sadly its pretty fundamental: ``` ./lvm.go:248:13: cannot use a type parameter as RHS in type declaration ``` and without type aliases in the custom unmarshaler we run into an infinite recursion. So unless go supports this we will have to live with the duplication.
Configuration menu - View commit details
-
Copy full SHA for 2c41be1 - Browse repository at this point
Copy the full SHA 2c41be1View commit details -
defs: extract
splitDistroNameVer()
helperThis helper can split name,version from a distro name like `centos-stream-10`. Note that we cannot use distroidparser here (which would be preferable) because of import cycles.
Configuration menu - View commit details
-
Copy full SHA for 1c8c5a6 - Browse repository at this point
Copy the full SHA 1c8c5a6View commit details -
distro/defs: add
defs.PartitionTable()
helperThe new `defs.PartitionTable()` can load the base partition table configuration from YAML and add some json tags to the disk package for minimal partition table loading.
Configuration menu - View commit details
-
Copy full SHA for 3cc50c1 - Browse repository at this point
Copy the full SHA 3cc50c1View commit details -
distro: move fedora partition tables into YAML
This commit moves all partition table handling for fedora out into the `distro.yaml`.
Configuration menu - View commit details
-
Copy full SHA for 5d69f6e - Browse repository at this point
Copy the full SHA 5d69f6eView commit details -
defs: add
partition_table_override
todistro.yaml
With the most recent changes for the `iot-raw` imagetype in fedora we need a way to conditionally override parts of the partition table. This commit adds this support via a simple: ```yaml partition_table_override: condition: version_greater_or_equal: "42": - select_partition: 2 fstab_options: "defaults,ro" ``` It currently supports `size` (we will need this for RHEL) and `fstab_options`. It is sadly not generic (we can look into this using reflection) and a bit ad-hoc, i.e. the selector is currently very primitive and will fail for nested payloads (like overrides for a FS inside LUKS). We have no need for the nesting yet though and if it comes up we could invent a notion like (`select_partiton: 2:1` or similar /if/ we need it).
Configuration menu - View commit details
-
Copy full SHA for dcacef3 - Browse repository at this point
Copy the full SHA dcacef3View commit details -
fedora: use partition_table_override to tweak iot_raw_image
This is doing the equivalent of #1352
Configuration menu - View commit details
-
Copy full SHA for 06808df - Browse repository at this point
Copy the full SHA 06808dfView commit details
Commits on Mar 28, 2025
-
osbuild: create .mount and .swap units in /etc/systemd
Create .mount and .swap units, which replace /etc/fstab, under /etc/systemd instead of /usr/lib/systemd. This is needed for ostree-based images. It's also probably more correct to put the files in /etc in general.
Configuration menu - View commit details
-
Copy full SHA for 4394425 - Browse repository at this point
Copy the full SHA 4394425View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3ff9568 - Browse repository at this point
Copy the full SHA 3ff9568View commit details
There are no files selected for viewing